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-stream
|
|
2
|
+
|
|
3
|
+
Contains @volter/twin-stream 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{applyTwinWrite as Ge,projectResources as _e,worldNow as Ie}from"../../engine/v2/volter_world-core.mjs";import{nodeBuiltin as Be,worldNow as De}from"../../engine/v2/volter_world-core.mjs";function ne(){return Be("node:crypto")}function W(e){return Buffer.from(e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function te(e){return W(JSON.stringify(e))}function re(e){let n=e.split(".");if(n.length!==3)throw new Error("malformed jwt");let t=r=>JSON.parse(Buffer.from(r.replace(/-/g,"+").replace(/_/g,"/"),"base64").toString("utf8"));return{header:t(n[0]),payload:t(n[1])}}function se(e,n){let{createHmac:t}=ne(),s=`${te({alg:"HS256",typ:"JWT"})}.${te(e)}`,i=W(t("sha256",n).update(s).digest());return`${s}.${i}`}function z(e){return se({server:!0},e)}function ae(e,n,t={}){let{createHmac:r,timingSafeEqual:s}=ne(),i,d,a;try{if(a=e.split("."),a.length!==3)return{valid:!1,reason:"malformed"};({header:d,payload:i}=re(e))}catch{return{valid:!1,reason:"malformed"}}if(d.alg!=="HS256")return{valid:!1,reason:"unexpected_alg"};let o=W(r("sha256",n).update(`${a[0]}.${a[1]}`).digest()),_=Buffer.from(a[2],"utf8"),c=Buffer.from(o,"utf8");if(_.length!==c.length||!s(_,c))return{valid:!1,reason:"bad_signature"};let u=t.now??Math.floor(Date.parse(De())/1e3);return typeof i.exp=="number"&&u>=i.exp?{valid:!1,reason:"expired"}:{valid:!0,payload:i}}function V(e,n,t={}){if(!e)return{kind:"invalid",reason:"no_token"};let r=ae(e,n,t);return!r.valid||!r.payload?{kind:"invalid",reason:r.reason??"invalid"}:typeof r.payload.user_id=="string"?{kind:"user",userId:r.payload.user_id,payload:r.payload}:r.payload.server===!0?{kind:"server",payload:r.payload}:{kind:"invalid",reason:"no_subject"}}var N="stream",C={user:"user",channel:"chan",message:"msg",reaction:"rxn",channeltype:"ctype",device:"dev",ban:"ban",mute:"mute",flag:"flag",read:"read",invite:"invite",app:"app",attachment:"att"};function Ne(e){return e.secret??process.env.STREAM_API_SECRET??"qa-stream-api-secret"}function m(e,n=404,t=16){return{status:n,body:{code:t,message:e,StatusCode:n,duration:"0.00ms",more_info:"https://getstream.io/chat/docs/api_errors_response"}}}function S(e){return e?new Date(e).toISOString():Ie()}function le(e){if(!e)return{};try{let n=JSON.parse(e);return n&&typeof n=="object"?n:{}}catch{return{}}}function A(e,n){return _e(N,n).filter(t=>t.type===e&&!t.id.startsWith("_")&&t.deleted!==!0)}function f(e,n,t){return A(e,t).find(r=>r.id===n)}async function y(e,n,t,r,s){let{resource:i}=await Ge(N,{operation:r,subjectType:e,subjectId:n,fields:t,...s.occurredAt?{occurredAt:s.occurredAt}:{},actor:{kind:"agent"}},s.root);return i}function x(e){if(Array.isArray(e))return e.map(x);if(e&&typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))t.startsWith("_")||t==="type"||t==="id"||t==="updatedAt"||(n[t]=x(r));return n}return e}var $=e=>`${C.user}:${e}`,v=(e,n)=>`${C.channel}:${e}:${n}`,T=e=>`${C.message}:${e}`,X=e=>`${C.device}:${e}`,R=e=>`${C.channeltype}:${e}`,M=(e,n)=>`${C.ban}:${n}:${e}`,Y=(e,n)=>`${C.mute}:${e}:${n}`,He=e=>`${C.flag}:${e}`,Q=(e,n)=>`${C.read}:${e}:${n}`,K=()=>`${C.app}:settings`;function Le(e,n){let t="";for(let r=0;t.length<n;r+=1){let s=2166136261,i=`${r}:${e}`;for(let d=0;d<i.length;d+=1)s^=i.charCodeAt(d),s=Math.imul(s,16777619)>>>0;t+=s.toString(16).padStart(8,"0")}return t.slice(0,n)}function Z(e,n){let t=_e(N,n.root).filter(r=>r.type===e).length;return Le(`${e}:${S(n.occurredAt)}:${t}`,32)}function U(e){let n=x(e._data);return{id:e._user_id,role:e._role??"user",created_at:e._created_at,updated_at:e._updated_at,last_active:e._last_active??e._updated_at,banned:e._banned===!0,online:!1,...e._deactivated_at?{deactivated_at:e._deactivated_at}:{},...n}}async function Fe(e,n){let t=e.users??{},r=S(n.occurredAt),s={};for(let[i,d]of Object.entries(t)){let a=String(d?.id??i),o=f("user",$(a),n.root),{id:_,role:c,...u}=d??{},l=o?._created_at??r;await y("user",$(a),{_user_id:a,_role:c??o?._role??"user",_created_at:l,_updated_at:r,_data:{...o?._data??{},...u},...o?._banned!==void 0?{_banned:o._banned}:{}},"user.upsert",n),s[a]=U(f("user",$(a),n.root))}return{status:200,body:{users:s,duration:"0.00ms"}}}function Je(e,n){let t=e.payload??{},r=t.filter_conditions??{},s=A("user",n.root).map(U),i=r.id??null;if(i&&Array.isArray(i.$in)){let _=new Set(i.$in.map(String));s=s.filter(c=>_.has(String(c.id)))}else typeof r.id=="string"&&(s=s.filter(_=>String(_.id)===r.id));let d=t.sort??[];d.length&&(s=s.slice().sort((_,c)=>{for(let u of d){let l=String(u.field),p=String(_[l]??"").localeCompare(String(c[l]??""));if(p!==0)return p*Number(u.direction??-1)}return 0}));let a=Number(t.offset??0),o=t.limit!==void 0?Number(t.limit):s.length;return{status:200,body:{users:s.slice(a,a+o),duration:"0.00ms"}}}async function We(e,n){let t=e.users??[],r=S(n.occurredAt),s={};for(let i of t){let d=String(i.id),a=f("user",$(d),n.root);if(!a)return m(`user ${d} does not exist`,404,16);let o=i.set??{},_=i.unset??[],c={...a._data??{},...o};for(let u of _)delete c[u];await y("user",$(d),{_data:c,_updated_at:r},"user.partial_update",n),s[d]=U(f("user",$(d),n.root))}return{status:200,body:{users:s,duration:"0.00ms"}}}async function ze(e,n){if(!f("user",$(e),n.root))return m(`user ${e} does not exist`,404,16);let r=S(n.occurredAt);return await y("user",$(e),{_deactivated_at:r,_updated_at:r},"user.deactivate",n),{status:200,body:{user:U(f("user",$(e),n.root)),duration:"0.00ms"}}}async function Ve(e,n){let t=f("user",$(e),n.root);if(!t)return m(`user ${e} does not exist`,404,16);if(!t._deactivated_at)return m(`user ${e} is not deactivated`,400,4);let r=S(n.occurredAt);return await y("user",$(e),{_deactivated_at:null,_updated_at:r},"user.reactivate",n),{status:200,body:{user:U(f("user",$(e),n.root)),duration:"0.00ms"}}}async function Xe(e,n){let t=f("user",$(e),n.root);return t?(await y("user",$(e),{deleted:!0},"user.delete",n),{status:200,body:{user:U(t),duration:"0.00ms"}}):m(`user ${e} does not exist`,404,16)}function Ye(e,n,t){let r=String(e.user_id),s=f("user",$(r),t),i=s?s._data?.name??r:r;return{user_id:r,user:{id:r,name:i},role:String(e.role??"member"),channel_role:String(e.role??"member")==="member"?"channel_member":`channel_${e.role}`,created_at:String(e.created_at??n),updated_at:n,...e.invited?{invited:!0}:{},...e.invite_accepted_at?{invite_accepted_at:e.invite_accepted_at}:{},...e.invite_rejected_at?{invite_rejected_at:e.invite_rejected_at}:{}}}function H(e,n){let t=String(e._channel_type),r=String(e._cid),s=(e._members??[]).map(c=>Ye(c,String(e._created_at),n.root)),i=A("message",n.root).filter(c=>c._cid===r),d=i.filter(c=>!c._parent_id||c._show_in_channel===!0).map(c=>E(c,n.root)).sort((c,u)=>String(c.created_at).localeCompare(String(u.created_at))),a=i.filter(c=>c._pinned===!0).map(c=>E(c,n.root)).sort((c,u)=>String(c._pinned_at).localeCompare(String(u._pinned_at))),o={id:e._channel_id,type:t,cid:r,created_at:e._created_at,updated_at:e._updated_at,own_capabilities:["send-message","read-events","update-channel-members","delete-channel"],config:Ke(t,n.root),member_count:s.length,frozen:e._frozen===!0,disabled:e._disabled===!0,...e._truncated_at?{truncated_at:e._truncated_at}:{},...x(e._data),...e._created_by_id?{created_by:{id:e._created_by_id}}:{}},_=(e._members??[]).map(c=>{let u=f("read",Q(r,String(c.user_id)),n.root),l=u?String(u._last_read):"",p=d.filter(g=>g.silent!==!0&&String(g.created_at)>l&&String(g.user.id)!==String(c.user_id)).length;return{user:{id:c.user_id},last_read:u?l:String(e._created_at),unread_messages:p}});return{channel:o,messages:d,pinned_messages:a,watchers:[],watcher_count:0,members:s,membership:s[0]??null,read:_,duration:"0.00ms"}}function Ke(e,n){let t=f("channeltype",R(e),n);return t?x(t._config):{name:e,typing_events:!0,read_events:!0,connect_events:!0,reactions:!0,replies:!0,mutes:!0,message_retention:"infinite",max_message_length:5e3,automod:"disabled"}}function Qe(e){return`!members-${[...e].map(String).sort().join(",")}`}async function ie(e,n,t,r){let s=t.data??{},i=(s.members??[]).map(String),d=n||Qe(i),a=`${e}:${d}`,o=f("channel",v(e,d),r.root),_=S(r.occurredAt);if(!o){let c=(s.invites??[]).map(String),u=i.map(b=>({user_id:b,role:"member",created_at:_,...c.includes(b)?{invited:!0}:{}})),{members:l,invites:p,...g}=s;await y("channel",v(e,d),{_channel_type:e,_channel_id:d,_cid:a,_created_at:_,_updated_at:_,_members:u,...n?{}:{_distinct:!0},...s.created_by_id?{_created_by_id:s.created_by_id}:{},_data:g},"channel.create",r),o=f("channel",v(e,d),r.root)}return{status:200,body:H(o,r)}}async function oe(e,n,t,r,s){let i=f("channel",v(e,n),r.root);if(!i)return m(`channel ${e}:${n} does not exist`,404,16);let d=S(r.occurredAt),a=(i._members??[]).map(h=>({...h})),o=t.add_members??[],_=t.remove_members??[];for(let h of o){let w=typeof h=="object"&&h!==null,O=typeof h=="string"?h:String(h.user_id??h.id),k=w?h.channel_role??h.role:void 0;a.some(G=>G.user_id===O)||a.push({user_id:O,role:k??"member",created_at:d})}if(_.length){let h=new Set(_.map(w=>typeof w=="string"?w:String(w.user_id)));a=a.filter(w=>!h.has(String(w.user_id)))}for(let h of t.assign_roles??[]){let w=a.find(O=>String(O.user_id)===String(h.user_id));w&&(w.role=String(h.channel_role??h.role??w.role))}let c=s.kind==="user"?s.userId:String(t.user_id??t.user?.id??"");if(t.accept_invite===!0){let h=a.find(w=>String(w.user_id)===c);if(!h||h.invited!==!0)return m(`no pending invite for ${c}`,400,4);delete h.invited,h.invite_accepted_at=d}if(t.reject_invite===!0){let h=a.find(w=>String(w.user_id)===c);if(!h||h.invited!==!0)return m(`no pending invite for ${c}`,400,4);h.invite_rejected_at=d}for(let h of t.invites??[]){let w=String(h),O=a.find(k=>String(k.user_id)===w);O?O.invited=!0:a.push({user_id:w,role:"member",created_at:d,invited:!0})}let u={_members:a,_updated_at:d},l=t.set??t.data??{};"frozen"in l&&(u._frozen=l.frozen===!0);let{frozen:p,...g}=l,b=t.unset??[];if(Object.keys(g).length||b.length){let h={...i._data??{},...g};for(let w of b)delete h[w];u._data=h}return await y("channel",v(e,n),u,"channel.update",r),{status:200,body:H(f("channel",v(e,n),r.root),r)}}async function Ze(e,n,t){return f("channel",v(e,n),t.root)?(await y("channel",v(e,n),{deleted:!0},"channel.delete",t),{status:200,body:{channel:{id:n,type:e,cid:`${e}:${n}`,deleted_at:S(t.occurredAt)},duration:"0.00ms"}}):m(`channel ${e}:${n} does not exist`,404,16)}function qe(e,n,t){let r=e.filter_conditions??{},s=A("channel",n.root),i=r.type;typeof i=="string"&&(s=s.filter(g=>g._channel_type===i));let d=r.members??null;if(d&&Array.isArray(d.$in)){let g=new Set(d.$in.map(String));s=s.filter(b=>(b._members??[]).some(h=>g.has(String(h.user_id))))}let a=t.kind==="user"?t.userId:e.user_id?String(e.user_id):d&&Array.isArray(d.$in)&&d.$in.length===1?String(d.$in[0]):"",o=g=>(g._hidden_for??[]).includes(a);a&&(r.hidden===!0?s=s.filter(o):s=s.filter(g=>!o(g)));let _=e.sort??[],c=(g,b)=>String(b==="id"?g._channel_id??"":b==="cid"?g._cid??"":b==="created_at"||b==="updated_at"?g[`_${b}`]??"":b==="last_message_at"?g._updated_at??"":g._data?.[b]??"");_.length&&(s=s.slice().sort((g,b)=>{for(let h of _){let w=c(g,String(h.field)).localeCompare(c(b,String(h.field)));if(w!==0)return w*Number(h.direction??-1)}return 0}));let u=Number(e.offset??0),l=e.limit!==void 0?Number(e.limit):s.length;return{status:200,body:{channels:s.slice(u,u+l).map(g=>H(g,n)),duration:"0.00ms"}}}async function et(e,n,t){let r=`${e}:${n}`;if(!f("channel",v(e,n),t.root))return m(`channel ${r} does not exist`,404,16);let i=S(t.occurredAt);for(let d of A("message",t.root).filter(a=>a._cid===r))await y("message",T(String(d._message_id)),{deleted:!0},"message.truncate",t);return await y("channel",v(e,n),{_truncated_at:i,_updated_at:i},"channel.truncate",t),{status:200,body:H(f("channel",v(e,n),t.root),t)}}async function tt(e,n,t,r,s){let i=`${e}:${n}`;if(!f("channel",v(e,n),r.root))return m(`channel ${i} does not exist`,404,16);let a=s.kind==="user"?s.userId:String(t.user_id??t.user?.id??"");if(!a)return m("user_id is required to mark read",400,4);let o=S(r.occurredAt);for(let _ of A("message",r.root).filter(c=>c._cid===i&&!c._deleted_at))String(_._created_at)>o&&(o=String(_._created_at));return await y("read",Q(i,a),{_cid:i,_user_id:a,_last_read:o},"channel.read",r),{status:200,body:{event:{type:"message.read",cid:i,user:{id:a},created_at:o},duration:"0.00ms"}}}async function de(e,n,t,r,s,i){let d=`${e}:${n}`,a=f("channel",v(e,n),s.root);if(!a)return m(`channel ${d} does not exist`,404,16);let o=i.kind==="user"?i.userId:String(r.user_id??"");if(!o)return m("user_id is required",400,4);let _=new Set(a._hidden_for??[]);return t?_.add(o):_.delete(o),await y("channel",v(e,n),{_hidden_for:[..._],_updated_at:S(s.occurredAt)},t?"channel.hide":"channel.show",s),{status:200,body:{duration:"0.00ms"}}}async function nt(e,n,t,r,s){let i=`${e}:${n}`;if(!f("channel",v(e,n),r.root))return m(`channel ${i} does not exist`,404,16);let a=t.event??{};if(!a.type)return m("event type is required",400,4);let o=s.kind==="user"?s.userId:String(a.user_id??a.user?.id??"system"),_=S(r.occurredAt);return{status:200,body:{event:{...a,type:a.type,cid:i,user:{id:o},created_at:_},duration:"0.00ms"}}}async function ue(e,n,t,r,s,i){let d=`${e}:${n}`;if(!f("channel",v(e,n),s.root))return m(`channel ${d} does not exist`,404,16);let o=Z("attachment",s),_=String(r.name??r.file?.name??`upload-${o}`),c=`https://twin-cdn.local/${N}/${d}/${o}/${encodeURIComponent(_)}`,u=S(s.occurredAt),l=i.kind==="user"?i.userId:String(r.user_id??"system");return await y("attachment",`${C.attachment}:${o}`,{_cid:d,_kind:t,_name:_,_url:c,_user_id:l,_created_at:u},"attachment.upload",s),{status:201,body:{file:c,...t==="image"?{thumb_url:c}:{},duration:"0.00ms"}}}function rt(e,n){let t=e.filter_conditions??{},r=e.query!==void 0?String(e.query):void 0,s=e.message_filter_conditions??{};if(r===void 0&&Object.keys(s).length===0)return m("search requires a query or message_filter_conditions",400,4);let i=A("channel",n.root),d=t.members??null;if(d&&Array.isArray(d.$in)){let u=new Set(d.$in.map(String));i=i.filter(l=>(l._members??[]).some(p=>u.has(String(p.user_id))))}let a=new Set(i.map(u=>String(u._cid))),o=A("message",n.root).filter(u=>a.has(String(u._cid))&&!u._deleted_at);if(r!==void 0){let u=r.toLowerCase();o=o.filter(l=>String(l._text??"").toLowerCase().includes(u))}let _=s.text??null;if(_){let u=String(_.$q??_.$autocomplete??_.$eq??"").toLowerCase();u&&(o=o.filter(l=>String(l._text??"").toLowerCase().includes(u)))}return o.sort((u,l)=>String(u._created_at).localeCompare(String(l._created_at))),{status:200,body:{results:o.map(u=>({message:E(u,n.root)})),duration:"0.00ms"}}}function st(e,n){if(!e)return m("user_id is required",400,4);let t=0,r=0,s=[];for(let i of A("channel",n.root)){if(!(i._members??[]).some(u=>String(u.user_id)===e))continue;let a=String(i._cid),o=f("read",Q(a,e),n.root),_=o?String(o._last_read):"",c=A("message",n.root).filter(u=>u._cid===a&&!u._deleted_at&&u._silent!==!0&&String(u._created_at)>_&&String(u._user_id)!==e&&!u._parent_id).length;c>0&&(r+=1,t+=c,s.push({channel_id:a,unread_count:c,last_read:o?_:String(i._created_at)}))}return{status:200,body:{total_unread_count:t,total_unread_threads_count:0,channel_type:[],channels:s,unread_channels:r,duration:"0.00ms"}}}var fe={name:"twin-app",disable_auth_checks:!1,disable_permissions_checks:!1,multi_tenant_enabled:!1,async_url_enrich_enabled:!1,max_message_length:5e3,permission_version:"v2"};function at(e){let n=f("app",K(),e.root);return{status:200,body:{app:{...fe,...n?._settings??{}},duration:"0.00ms"}}}async function it(e,n){let r={...f("app",K(),n.root)?._settings??{},...e};return await y("app",K(),{_settings:r,_updated_at:S(n.occurredAt)},"app.update",n),{status:200,body:{app:{...fe,...r},duration:"0.00ms"}}}function E(e,n){let t=e._reactions??[],r={},s={};for(let o of t)r[String(o.type)]=(r[String(o.type)]??0)+1,s[String(o.type)]=(s[String(o.type)]??0)+Number(o.score??1);let i=e._message_id?A("message",n).filter(o=>o._parent_id===e._message_id).length:0,d;if(e._quoted_message_id){let o=f("message",T(String(e._quoted_message_id)),n);o&&(d=ot(o))}let a=e._mentioned_users??[];return{id:e._message_id,text:e._text??"",html:e._html??"",type:e._msg_type??"regular",cid:e._cid,user:{id:e._user_id},attachments:e._attachments??[],created_at:e._created_at,updated_at:e._updated_at,reaction_counts:r,reaction_scores:s,latest_reactions:t,own_reactions:[],reply_count:i,silent:e._silent===!0,pinned:e._pinned===!0,...e._pinned?{pinned_at:e._pinned_at,pinned_by:{id:e._pinned_by}}:{pinned_at:null,pinned_by:null},mentioned_users:a.map(o=>({id:o})),...e._parent_id?{parent_id:e._parent_id,show_in_channel:e._show_in_channel===!0}:{},...e._quoted_message_id?{quoted_message_id:e._quoted_message_id,...d?{quoted_message:d}:{}}:{},...x(e._data),...e._deleted_at?{deleted_at:e._deleted_at,type:"deleted"}:{}}}function ot(e){return{id:e._message_id,text:e._text??"",type:e._msg_type??"regular",cid:e._cid,user:{id:e._user_id},created_at:e._created_at,updated_at:e._updated_at,...x(e._data)}}async function dt(e,n,t,r,s){let i=`${e}:${n}`,d=f("channel",v(e,n),r.root);if(!d)return m(`channel ${e}:${n} does not exist`,404,16);let a=t.message??{},o=S(r.occurredAt),_=String(a.id??`${n}-${Z("message",r)}`),c=String(a.user?.id??a.user_id??(s.kind==="user"?s.userId:"system"));if(ut(c,i,r.root))return m(`user ${c} is banned from channel ${i}`,403,17);if(d._frozen===!0)return m(`channel ${i} is frozen`,403,17);let{id:u,text:l,user:p,user_id:g,parent_id:b,quoted_message_id:h,show_in_channel:w,silent:O,mentioned_users:k,attachments:G,html:ee,...Me}=a;return b!==void 0&&!f("message",T(String(b)),r.root)?m(`parent message ${b} does not exist`,404,16):(await y("message",T(_),{_message_id:_,_cid:i,_text:l??"",_user_id:c,_created_at:o,_updated_at:o,_msg_type:"regular",_data:Me,_reactions:[],...ee!==void 0?{_html:ee}:{},...G!==void 0?{_attachments:G}:{},...b!==void 0?{_parent_id:String(b),_show_in_channel:w===!0}:{},...h!==void 0?{_quoted_message_id:String(h)}:{},...O===!0?{_silent:!0}:{},...Array.isArray(k)?{_mentioned_users:k.map(String)}:{}},"message.send",r),{status:201,body:{message:E(f("message",T(_),r.root),r.root),duration:"0.00ms"}})}function ut(e,n,t){let r=f("ban",M(e,"global"),t);if(r&&r.deleted!==!0)return!0;let s=f("ban",M(e,n),t);return!!s&&s.deleted!==!0}function ct(e,n){return f("message",T(e),n.root)?{status:200,body:{messages:A("message",n.root).filter(s=>s._parent_id===e).map(s=>E(s,n.root)).sort((s,i)=>String(s.created_at).localeCompare(String(i.created_at))),duration:"0.00ms"}}:m(`message ${e} does not exist`,404,16)}async function I(e,n,t,r,s){if(!f("message",T(e),r.root))return m(`message ${e} does not exist`,404,16);let d=S(r.occurredAt),a=s.kind==="user"?s.userId:String(t.user_id??t.user?.id??"system"),o=n?{_pinned:!0,_pinned_at:d,_pinned_by:a,_updated_at:d}:{_pinned:!1,_pinned_at:null,_pinned_by:null,_updated_at:d};return await y("message",T(e),o,n?"message.pin":"message.unpin",r),{status:200,body:{message:E(f("message",T(e),r.root),r.root),duration:"0.00ms"}}}function _t(e,n){let t=f("message",T(e),n.root);return t?{status:200,body:{message:E(t,n.root),duration:"0.00ms"}}:m(`message ${e} does not exist`,404,16)}async function ce(e,n,t,r){let s=f("message",T(e),t.root);if(!s)return m(`message ${e} does not exist`,404,16);let i=n.message??{};if(n.set||n.unset){let o=n.set??{};if("pinned"in o)return await I(e,o.pinned===!0,n,t,r);let _=S(t.occurredAt),c={...s._data??{},...o};for(let l of n.unset??[])delete c[l];let u={_data:c,_updated_at:_};return typeof o.text=="string"&&(u._text=o.text),await y("message",T(e),u,"message.partial_update",t),{status:200,body:{message:E(f("message",T(e),t.root),t.root),duration:"0.00ms"}}}let a={_updated_at:S(t.occurredAt)};return typeof i.text=="string"&&(a._text=i.text),i.attachments!==void 0&&(a._attachments=i.attachments),i.pinned!==void 0?await I(e,i.pinned===!0,{...n,user_id:i.pinned_by?.id},t,r):(await y("message",T(e),a,"message.update",t),{status:200,body:{message:E(f("message",T(e),t.root),t.root),duration:"0.00ms"}})}async function lt(e,n){if(!f("message",T(e),n.root))return m(`message ${e} does not exist`,404,16);let r=S(n.occurredAt);return await y("message",T(e),{_deleted_at:r},"message.delete",n),{status:200,body:{message:E(f("message",T(e),n.root),n.root),duration:"0.00ms"}}}async function ft(e,n,t,r){let s=f("message",T(e),t.root);if(!s)return m(`message ${e} does not exist`,404,16);let i=n.reaction??{},d=S(t.occurredAt),a=String(i.user_id??(r.kind==="user"?r.userId:"system")),o=String(i.type??"like"),_=(s._reactions??[]).filter(u=>!(u.type===o&&u.user_id===a));_.push({type:o,user_id:a,message_id:e,created_at:d,updated_at:d}),await y("message",T(e),{_reactions:_,_updated_at:d},"reaction.add",t);let c=f("message",T(e),t.root);return{status:201,body:{message:E(c,t.root),reaction:{type:o,user_id:a,message_id:e,created_at:d},duration:"0.00ms"}}}async function mt(e,n,t,r){let s=f("message",T(e),t.root);if(!s)return m(`message ${e} does not exist`,404,16);let i=r.kind==="user"?r.userId:String(le(t.body).user_id??"system"),d=(s._reactions??[]).filter(a=>!(a.type===n&&a.user_id===i));return await y("message",T(e),{_reactions:d,_updated_at:S(t.occurredAt)},"reaction.delete",t),{status:200,body:{message:E(f("message",T(e),t.root),t.root),duration:"0.00ms"}}}async function gt(e,n){let t=String(e.name??"");if(!t)return m("channel type name is required",400,4);if(f("channeltype",R(t),n.root))return m(`channel type ${t} already exists`,400,4);let r=S(n.occurredAt),{name:s,...i}=e;await y("channeltype",R(t),{_name:t,_config:{name:t,...i},_created_at:r,_updated_at:r},"channeltype.create",n);let d=f("channeltype",R(t),n.root);return{status:201,body:{...x(d._config),created_at:r,updated_at:r,duration:"0.00ms"}}}function pt(e){let n={};for(let t of A("channeltype",e.root))n[String(t._name)]=x(t._config);return{status:200,body:{channel_types:n,duration:"0.00ms"}}}function ht(e,n){let t=f("channeltype",R(e),n.root);return t?{status:200,body:{...x(t._config),duration:"0.00ms"}}:m(`channel type ${e} does not exist`,404,16)}async function yt(e,n,t){let r=f("channeltype",R(e),t.root);if(!r)return m(`channel type ${e} does not exist`,404,16);let s=S(t.occurredAt),{name:i,...d}=n,a={...r._config??{},...d,name:e};await y("channeltype",R(e),{_config:a,_updated_at:s},"channeltype.update",t);let o=f("channeltype",R(e),t.root);return{status:200,body:{...x(o._config),updated_at:s,duration:"0.00ms"}}}async function St(e,n){return f("channeltype",R(e),n.root)?(await y("channeltype",R(e),{deleted:!0},"channeltype.delete",n),{status:200,body:{duration:"0.00ms"}}):m(`channel type ${e} does not exist`,404,16)}async function bt(e,n){let t=String(e.id??""),r=String(e.user_id??e.user?.id??"");if(!t||!r)return m("device id and user_id are required",400,4);let s=S(n.occurredAt);return await y("device",X(t),{_device_id:t,_user_id:r,_push_provider:e.push_provider??"firebase",...e.push_provider_name?{_push_provider_name:e.push_provider_name}:{},_created_at:s},"device.add",n),{status:201,body:{duration:"0.00ms"}}}function wt(e,n){let t=e.user_id?String(e.user_id):null;return{status:200,body:{devices:A("device",n.root).filter(s=>!t||s._user_id===t).map(s=>({id:s._device_id,user_id:s._user_id,push_provider:s._push_provider,...s._push_provider_name?{push_provider_name:s._push_provider_name}:{},created_at:s._created_at})),duration:"0.00ms"}}}async function Tt(e,n){return f("device",X(e),n.root)?(await y("device",X(e),{deleted:!0},"device.delete",n),{status:200,body:{duration:"0.00ms"}}):m(`device ${e} does not exist`,404,16)}async function $t(e,n){let t=String(e.target_user_id??"");if(!t)return m("target_user_id is required",400,4);if(!f("user",$(t),n.root))return m(`user ${t} does not exist`,404,16);let r=e.type&&e.id?`${e.type}:${e.id}`:"global",s=S(n.occurredAt);return await y("ban",M(t,r),{_target:t,_channel_cid:r,_banned_by:e.banned_by_id??e.user_id??null,_reason:e.reason??null,_timeout:e.timeout??null,_created_at:s,deleted:!1},"ban.create",n),r==="global"&&await y("user",$(t),{_banned:!0,_updated_at:s},"user.ban",n),{status:201,body:{duration:"0.00ms"}}}async function vt(e,n){let t=String(e.target_user_id??"");if(!t)return m("target_user_id is required",400,4);let r=e.type&&e.id?`${e.type}:${e.id}`:"global",s=f("ban",M(t,r),n.root);if(!s||s.deleted===!0)return m(`ban for ${t} does not exist`,404,16);let i=S(n.occurredAt);return await y("ban",M(t,r),{deleted:!0},"ban.delete",n),r==="global"&&await y("user",$(t),{_banned:!1,_updated_at:i},"user.unban",n),{status:200,body:{duration:"0.00ms"}}}async function At(e,n){let t=String(e.target_id??(Array.isArray(e.target_ids)?e.target_ids[0]:""));if(!t)return m("target_id is required",400,4);if(!f("user",$(t),n.root))return m(`user ${t} does not exist`,404,16);let r=String(e.user_id??"system"),s=S(n.occurredAt);return await y("mute",Y(r,t),{_actor:r,_target:t,_created_at:s,deleted:!1},"mute.create",n),{status:201,body:{mute:{user:{id:r},target:{id:t},created_at:s,updated_at:s},duration:"0.00ms"}}}async function Et(e,n){let t=String(e.target_id??(Array.isArray(e.target_ids)?e.target_ids[0]:""));if(!t)return m("target_id is required",400,4);let r=String(e.user_id??"system"),s=f("mute",Y(r,t),n.root);return!s||s.deleted===!0?m("mute does not exist",404,16):(await y("mute",Y(r,t),{deleted:!0},"mute.delete",n),{status:200,body:{duration:"0.00ms"}})}async function xt(e,n,t){let r=e.target_message_id?String(e.target_message_id):null,s=e.target_user_id?String(e.target_user_id):null;if(!r&&!s)return m("target_message_id or target_user_id is required",400,4);let i=S(n.occurredAt),d=`flag-${Z("flag",n)}`,a=t.kind==="user"?t.userId:String(e.user_id??"system");return await y("flag",He(d),{_flag_id:d,_target_message_id:r,_target_user_id:s,_user_id:a,_created_at:i},"flag.create",n),{status:201,body:{flag:{created_at:i,updated_at:i,...r?{target_message_id:r}:{},...s?{target_user_id:s}:{},user:{id:a}},duration:"0.00ms"}}}function Ct(e){let n=e.headers??{};for(let t of Object.keys(n))if(t.toLowerCase()==="authorization")return n[t]}async function q(e){let n=new URL(e.path,"http://twin.local"),t=n.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean),r=e.method.toUpperCase(),s=le(e.body),i=V(Ct(e),Ne(e));if(i.kind==="invalid")return m("Stream-Auth-Type header / token missing or invalid",401,5);let d=r!=="GET"&&!(r==="POST"&&t[0]==="users"&&t.length===1&&n.searchParams.has("payload"));if(e.readOnly&&d)return m("this twin was started read-only; omit readOnly to accept writes",405,17);try{if(t[0]==="app"&&t.length===1){if(r==="GET")return at(e);if(r==="PATCH"||r==="PUT"||r==="POST")return await it(s,e)}if(t[0]==="unread"&&t.length===1&&r==="GET"){let a=i.kind==="user"?i.userId:n.searchParams.get("user_id")??"";return st(a,e)}if(t[0]==="search"&&t.length===1&&(r==="GET"||r==="POST")){let a=n.searchParams.get("payload");return rt(a?JSON.parse(a):s,e)}if(t[0]==="users"){if(t.length===1&&r==="POST")return await Fe(s,e);if(t.length===1&&r==="GET"){let a=n.searchParams.get("payload");return Je(a?{payload:JSON.parse(a)}:{},e)}if(t.length===1&&r==="PATCH")return await We(s,e);if(t.length===3&&r==="POST"&&t[2]==="deactivate")return await ze(t[1],e);if(t.length===3&&r==="POST"&&t[2]==="reactivate")return await Ve(t[1],e);if(t.length===2&&r==="DELETE")return await Xe(t[1],e)}if(t[0]==="channels"){if(t.length===1&&r==="POST")return qe(s,e,i);let a=t[1],o=t[2];if(a&&r==="POST"&&t.length===3&&t[2]==="query")return await ie(a,"",s,e);if(a&&o&&r==="POST"&&t[3]==="query")return await ie(a,o,s,e);if(a&&o&&r==="POST"&&t[3]==="message")return await dt(a,o,s,e,i);if(a&&o&&r==="POST"&&t[3]==="read")return await tt(a,o,s,e,i);if(a&&o&&r==="POST"&&t[3]==="truncate")return await et(a,o,e);if(a&&o&&r==="POST"&&t[3]==="hide")return await de(a,o,!0,s,e,i);if(a&&o&&r==="POST"&&t[3]==="show")return await de(a,o,!1,s,e,i);if(a&&o&&r==="POST"&&t[3]==="event")return await nt(a,o,s,e,i);if(a&&o&&r==="POST"&&t[3]==="file")return await ue(a,o,"file",s,e,i);if(a&&o&&r==="POST"&&t[3]==="image")return await ue(a,o,"image",s,e,i);if(a&&o&&r==="POST"&&t.length===3)return await oe(a,o,s,e,i);if(a&&o&&r==="PATCH"&&t.length===3)return await oe(a,o,s,e,i);if(a&&o&&r==="DELETE"&&t.length===3)return await Ze(a,o,e)}if(t[0]==="messages"&&t[1]){let a=t[1];if(t.length===2&&r==="GET")return _t(a,e);if(t.length===2&&r==="POST")return await ce(a,s,e,i);if(t.length===2&&(r==="PUT"||r==="PATCH"))return await ce(a,s,e,i);if(t.length===2&&r==="DELETE")return await lt(a,e);if(t.length===3&&t[2]==="replies"&&r==="GET")return ct(a,e);if(t.length===3&&t[2]==="pin"&&r==="POST")return await I(a,!0,s,e,i);if(t.length===3&&t[2]==="unpin"&&r==="POST")return await I(a,!1,s,e,i);if(t.length===3&&t[2]==="reaction"&&r==="POST")return await ft(a,s,e,i);if(t.length===4&&t[2]==="reaction"&&r==="DELETE")return await mt(a,t[3],e,i)}if(t[0]==="channeltypes"){if(t.length===1&&r==="POST")return await gt(s,e);if(t.length===1&&r==="GET")return pt(e);if(t.length===2&&r==="GET")return ht(t[1],e);if(t.length===2&&(r==="PUT"||r==="PATCH"))return await yt(t[1],s,e);if(t.length===2&&r==="DELETE")return await St(t[1],e)}if(t[0]==="devices"){if(t.length===1&&r==="POST")return await bt(s,e);if(t.length===1&&r==="GET")return wt({user_id:n.searchParams.get("user_id")??void 0},e);if(t.length===1&&r==="DELETE")return await Tt(n.searchParams.get("id")??"",e)}if(t[0]==="moderation"){if(t[1]==="ban"&&r==="POST")return await $t(s,e);if(t[1]==="ban"&&r==="DELETE")return await vt({...s,target_user_id:n.searchParams.get("target_user_id")??s.target_user_id,type:n.searchParams.get("type")??s.type,id:n.searchParams.get("id")??s.id},e);if(t[1]==="mute"&&r==="POST")return await At(s,e);if(t[1]==="unmute"&&r==="POST")return await Et(s,e);if(t[1]==="flag"&&r==="POST")return await xt(s,e,i)}return m(`route ${r} ${n.pathname} is not modeled by the twin`,404,16)}catch(a){return m(`internal twin error: ${a.message}`,500,1)}}import{serveHttp as Vt}from"../../engine/v2/volter_world-core.mjs";import{createTwinFetchFromHandler as Rt,statefulTwinManifest as Ot}from"../../engine/v2/volter_world-core.mjs";function me(e){return Rt(q,{root:e.root,readOnly:e.readOnly,manifest:Ot({vendor:"stream",twinOf:"the GetStream Chat API",stores:"channels, members, messages and reactions"}),handlerOptions:{...e.secret!==void 0?{secret:e.secret}:{}}})}import{observeResources as ve}from"../../engine/v2/volter_world-core.mjs";import{declareRateBudget as Pt,rateBudgetPath as Zt,rateBudgetWeight as qt,RateBudget as pe,RateBudgetError as Ut}from"../../engine/v2/volter_world-core.mjs";import{RateBudgetError as Dt}from"../../engine/v2/volter_world-core.mjs";var he="stream",ye=6e4,Se=150,be=300,L={admin:5,write:2,other:1},we=["queryChannels","queryUsers","upsertUser"],F={windowMs:ye,ceiling:Se,defaultWeight:L.other,maxRetryAfterSeconds:be,rules:[{match:"(^|\\.)(deleteChannels|exportChannel|exportUsers?|updateAppSettings|truncate)$",weight:L.admin},{match:"(^|\\.)(upsertUsers?|updateUsers?|partialUpdateUsers?|queryMembers|update|search|banUser|unbanUser|shadowBan|removeShadowBan)$",weight:L.write}],reason:"Stream publishes a per-endpoint, per-minute rate-limit table and this connector's three calls land on three different tiers: QueryChannels 10,000/min, QueryUsers 1,000/min, UpdateUsers (upsertUser) 300/min; admin ops (DeleteChannel, ExportChannel/User, TruncateChannel, UpdateApp) are 60/min. THIS DECLARATION IS MORE PERMISSIVE THAN the kernel's DEFAULT_RATE_BUDGET (30 calls/min) and the documented table is why: 150 units / 60s at weight 1 admits 150 calls/min, set from the TIGHTEST tier this connector touches (half of upsertUser's 300/min, 1.5% of queryChannels' 10,000/min). Weights mirror the published ratios: the 300/min tier costs 2 (75/min admitted vs 300 documented), the 60/min admin tier costs 5 (30/min admitted vs 60 documented). The selectors are the STREAM-CHAT SDK method names (deleteChannels, updateAppSettings, channel.truncate, channel.update), not the table's operation names: a \xA79 review caught an earlier revision matching deleteChannel/truncateChannel/updateApp/updateChannel, none of which exists on the SDK, so the whole 60/min tier was silently priced at 1. Everything else costs 1. Two documented facts this cannot model: Stream derives a per-second limit as per-minute/30 (a pacing rule; this module refuses, it never paces) and counts each platform separately (one per-credential ledger cannot tell them apart). Stream signals back-off with X-RateLimit-Reset rather than Retry-After; the kernel reads the exhaustion/reset pair as a cooldown."};Pt(he,F);var j=class extends pe{constructor(n={}){super({...n,vendor:he})}};function D(e){return{...e.budget!==void 0?{budget:e.budget}:{},...e.budgetOptions!==void 0?{budgetOptions:e.budgetOptions}:{}}}var Te=Symbol("@volter/twin-stream.budget.guarded");function $e(e){let n=e?.[Te];return n instanceof pe?n:void 0}function P(e,n={}){if(n.budget!==void 0&&n.budget!==null&&!(n.budget instanceof j))throw new Error("guardStreamClient: `budget` must be a StreamBudget \u2014 refusing to guard a Stream client with an unverified rate guard");if($e(e))return e;let t=n.budget instanceof j?n.budget:new j({...process.env.STREAM_API_SECRET!==void 0?{token:process.env.STREAM_API_SECRET}:{},...n.budgetOptions??{}}),r=(o,_,c)=>{let u=ge(c),l=Bt(c);u!==void 0||l!==void 0?t.recordCall(o,l,{status:u,reservation:_}):t.recordCall(o,void 0,{reservation:_})},s=(o,_,c)=>{try{r(o,_,c)}catch(u){let l=ge(c);if(!(u instanceof Ut)||l!==void 0&&(l<200||l>=300))throw u}},i=(o,_)=>async(...c)=>{let u=t.weightFor(o),l=t.checkBudget(u);try{let p=await _(...c);return s(u,l,p),p}catch(p){throw r(u,l,p),p}},d=(o,_)=>(...c)=>{let u=t.weightFor(o),l=t.checkBudget(u),p;try{p=_(...c)}catch(g){throw r(u,l,g),g}return jt(p)?p.then(g=>(s(u,l,g),g),g=>{throw r(u,l,g),g}):(r(u,l,void 0),p!==null&&(typeof p=="object"||typeof p=="function")?B({},p,o,d):p)},a={};for(let o of we){let _=o.split("."),c=_[_.length-1],u=e;for(let g of _.slice(0,-1))u=u?.[g];if(typeof u?.[c]!="function")continue;let l=u,p=a;for(let g of _.slice(0,-1))p=p[g]??={};p[c]=i(o,(...g)=>l[c].apply(l,g))}return Object.defineProperty(a,Te,{value:t,enumerable:!1}),B(a,e,"",d)}var kt=new Set(["then","catch","finally","constructor","prototype","toJSON","toString","valueOf","inspect"]);function jt(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var Mt=new Set([Symbol.asyncIterator,Symbol.iterator]);function B(e,n,t,r,s){let d=typeof n=="function"?function(){}:e;return new Proxy(d,{apply(a,o,_){return r(t||"call",(...c)=>n.apply(s,c))(..._)},get(a,o,_){if(typeof o=="symbol"){let g=Reflect.get(e,o,_);if(g!==void 0)return g;let b=n?.[o];return Mt.has(o)&&typeof b=="function"?r(`${t}[${o.description??"iterator"}]`,(...h)=>b.apply(n,h)):b}let c=String(o);if(kt.has(c))return Reflect.get(e,o,_);let u=t?`${t}.${c}`:c,l=Reflect.get(e,o,_),p=n?.[c];return typeof l=="function"?l:l&&typeof l=="object"?p&&(typeof p=="object"||typeof p=="function")?B(l,p,u,r,n):l:l!==void 0?l:typeof p=="function"?B({},p,u,r,n):p&&typeof p=="object"?B({},p,u,r,n):p},has(a,o){return Reflect.has(e,o)||n!==null&&Reflect.has(n,o)}})}function ge(e){let n=e?.status;return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Bt(e){let n=e?.headers;if(!n||typeof n!="object")return;let t={};if(typeof n.forEach=="function")n.forEach((r,s)=>{t[String(s).toLowerCase()]=String(r)});else for(let[r,s]of Object.entries(n))t[r.toLowerCase()]=String(s);return Object.keys(t).length>0?t:void 0}var J="stream";function Ae(e){let{id:n,role:t,created_at:r,updated_at:s,banned:i,...d}=e;return{type:"user",id:`user:${n}`,fields:{_user_id:String(n),_role:t??"user",_created_at:r??null,_updated_at:s??r??null,_banned:i===!0,_data:d}}}function Ee(e){let n=e.data??{},t=String(e.type??n.type??"messaging"),r=String(e.id??n.id??""),s=String(e.cid??n.cid??`${t}:${r}`),i=e.state?.members??{},a=(Array.isArray(i)?i:Object.values(i)).map(g=>({user_id:String(g.user_id??g.user?.id??""),role:g.role??"member",created_at:n.created_at??null})),{id:o,type:_,cid:c,created_at:u,updated_at:l,...p}=n;return{type:"channel",id:`chan:${t}:${r}`,fields:{_channel_type:t,_channel_id:r,_cid:s,_created_at:u??null,_updated_at:l??u??null,_members:a,_data:p}}}var xe=e=>e.occurredAt??new Date().toISOString();async function Ce(e,n={}){let t=P(e,D(n)),{users:r}=await t.queryUsers(n.filter??{}),s=xe(n),i=ve(J,r.map(Ae).map(d=>({type:d.type,id:d.id,fields:d.fields})),{...n.root!==void 0?{root:n.root}:{},at:s,batch:`obs:${J}:${s}`});return{observed:i.observed,deltasAppended:i.appended}}async function Re(e,n={}){let r=await P(e,D(n)).queryChannels(n.filter??{}),s=xe(n),i=ve(J,r.map(Ee).map(d=>({type:d.type,id:d.id,fields:d.fields})),{...n.root!==void 0?{root:n.root}:{},at:s,batch:`obs:${J}:${s}`});return{observed:i.observed,deltasAppended:i.appended}}async function Oe(e,n={}){let t=P(e,D(n)),r=await Ce(t,n),s=await Re(t,n);return{users:r,channels:s}}async function Pe(e,n,t={}){let r=P(e,D(t)),s=n.fields??{};if(n.operation==="user.upsert"&&s._user_id){let i=s._data??{};return await r.upsertUser({id:String(s._user_id),role:s._role,...i}),"confirmed"}return"skipped"}function Ue(e){let n=async(t,r,s)=>{let i=await e({method:t,path:r,headers:{accept:"application/json",authorization:z("qa-stream-api-secret"),"stream-auth-type":"jwt",...s?{"content-type":"application/json"}:{}},...s?{body:JSON.stringify(s)}:{}});if(i.status<200||i.status>=300)throw new Error(`stream ${t} ${r} refused: HTTP ${i.status} ${i.body.slice(0,200)}`);return JSON.parse(i.body||"{}")};return{queryUsers:async()=>({users:(await n("GET","/users")).users??[]}),queryChannels:async()=>(await n("POST","/channels",{})).channels??[],upsertUser:async t=>n("POST","/users",{users:{[String(t.id)]:t}})}}async function ke(e,n={}){return Oe(P(Ue(e)),{...n.root!==void 0?{root:n.root}:{},...n.occurredAt!==void 0?{occurredAt:n.occurredAt}:{}})}async function je(e,n,t){return await Pe(P(Ue(e)),n)==="skipped"?{externalId:n.subject.id,data:{performed:!1,reason:`${n.operation??n.subject.type} is the twin's own record \u2014 nothing at Stream to write`}}:{externalId:n.subject.id}}import{registerPack as Gt}from"../../engine/v2/volter_world-core.mjs";var It={protocol:"2",refresh:{every:"5m",webhook:!0,onDemand:{atMost:"30s"}},stateSystem:{perform:je,refresh:ke},roundTrip:{method:"POST",path:"/users",body:{users:{"round-trip":{id:"round-trip",name:"Round Trip",role:"user"}}},headers:{authorization:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2ZXIiOnRydWV9.yNUI5AUySp_z-6P_Ce8KdivrMGGjn7C9WavZ_l2IJKQ","stream-auth-type":"jwt"}},parityOrigin:"http://twin",shapeParity:"held",rateBudget:F,vendor:"stream",transport:"rest",archetype:"crud",bin:"world-stream",resources:["user","channel","message","channeltype","device","ban","mute","flag"],specSource:"stream-conformance.ts (per-object JSON Schemas from the GetStream Chat REST API docs)",description:"GetStream Chat API twin \u2014 users/channels/messages/reactions/moderation, real HS256 server+user JWTs signed with the API secret.",adoption:{pypi:["stream-chat"],sdks:["stream-chat"],envStems:["STREAM","GETSTREAM"]},hosts:[{host:"chat.stream-io-api.com"}],browserRouting:{apiPathPrefix:"/",loaderHost:"https://chat.stream-io-api.com"}};Gt(It);export{me 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-stripe
|
|
2
|
+
|
|
3
|
+
Contains @volter/twin-stripe 3.0.5 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.
|