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,12 @@
|
|
|
1
|
+
import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
|
|
2
|
+
import{applyTwinWrite as Be,projectResources as at}from"../../engine/v2/volter_world-core.mjs";import{applyTwinWrite as et,projectResources as tt}from"../../engine/v2/volter_world-core.mjs";function y(e){return e?Math.max(1,Math.ceil(e.length/4)):0}function k(e){return typeof e=="string"?e:e==null||!Array.isArray(e)?"":e.map(t=>t&&typeof t=="object"&&t.type==="text"?String(t.text??""):JSON.stringify(t)).join(`
|
|
3
|
+
`)}function _e(e){let t=y(k(e.content));e.name&&(t+=y(e.name)),typeof e.reasoning_content=="string"&&(t+=y(e.reasoning_content));for(let n of e.tool_calls??[])t+=y(JSON.stringify(n));return t}function R(e){let t=0;for(let n of e)t+=_e(n);return t}function v(e){for(let t=e.length-1;t>=0;t--)if(e[t].role==="user")return k(e[t].content);return e.length?k(e[e.length-1].content):""}function X(e,t){let n=v(e).trim(),o=n.length>200?`${n.slice(0,200)}\u2026`:n;return`[twin-stub:${t}] This is a deterministic stub from the DeepSeek twin (no model weights are run). Echoing your last message: ${o||"(empty)"}`}function Y(e,t,n){return`[twin-stub:${t}] deterministic stub reasoning_content (no model weights are run, reasoning_effort=${n}) for: ${v(e).trim().slice(0,120)||"(empty)"}`}function z(e,t,n){let o=n?` bridging to suffix "${n.slice(0,60)}"`:"";return`[twin-stub:${e}] deterministic fill-in-the-middle stub (no model weights are run)${o} after: ${t.trim().slice(0,120)||"(empty)"}`}function N(e,t,n,o=0){let r=Math.max(0,Math.min(n,e));return{prompt_tokens:e,completion_tokens:t,total_tokens:e+t,prompt_cache_hit_tokens:r,prompt_cache_miss_tokens:e-r,prompt_tokens_details:{cached_tokens:r},...o>0?{completion_tokens_details:{reasoning_tokens:o}}:{}}}function be(e){let t=e;return t?.function&&typeof t.function.name=="string"?t.function.name:"unknown_function"}function qe(e){let t=e;if(Array.isArray(t?.enum)&&t.enum.length)return t.enum[0];switch(t?.type){case"number":case"integer":return 0;case"boolean":return!1;case"array":return[];case"object":return{};default:return""}}function ye(e){let n=e?.function?.parameters,o=n&&typeof n=="object"?n.properties:void 0;if(!o||typeof o!="object")return"{}";let r={};for(let[a,i]of Object.entries(o))r[a]=qe(i);return JSON.stringify(r)}function C(e,t,n){if(!Array.isArray(e)||e.length===0)return null;let o=n?e.find(r=>be(r)===n)??e[0]:e[0];return{id:`call_twin_${t}`,type:"function",function:{name:be(o),arguments:ye(o)}}}function V(e,t){return JSON.stringify({_twin_stub:!0,model:t,echo:v(e).slice(0,200)})}function T(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function M(e){return`fp_${T(e).toString(16).padStart(8,"0")}_twin_stub_kvcache`}var Ee="deepseek";function Se(e){let t=(e.tool_calls??[]).map(a=>JSON.stringify(a)).join(","),n=e.name??"",o=e.reasoning_content??"",r=e.tool_call_id??"";return`${e.role}|${n}|${r}:${k(e.content)}|r:${o}${t?`|tools:${t}`:""}`}function Q(e,t){return e.slice(0,t).map(Se).join(`
|
|
4
|
+
\0
|
|
5
|
+
`)}function Z(e){return`cachepfx_twin_${T(e).toString(36)}_${e.length}`}function nt(e){return tt(Ee,e).filter(t=>t.type==="cache_prefix")}function q(e,t){if(e.length<1)return 0;let n=new Map;for(let o of nt(t))o._deleted||n.set(String(o.id),o);if(n.size===0)return 0;for(let o=e.length;o>=1;o--)if(n.has(Z(Q(e,o))))return R(e.slice(0,o));return 0}async function ee(e,t,n,o){let r=[e];t&&r.push([...e,t]);for(let a of r){if(a.length===0)continue;let i=Q(a,a.length),f=Z(i);await et(Ee,{operation:"cache_prefix.observe",subjectType:"cache_prefix",subjectId:f,fields:{key:i.slice(0,512),messages:a.length},...n?{occurredAt:n}:{},actor:{kind:"agent"}},o)}}var te=e=>({id:e,object:"model",owned_by:"deepseek"}),L=[te("deepseek-v4-flash"),te("deepseek-v4-pro"),te("deepseek-v4-flash-vision-exp")];function ne(e){return L.find(t=>t.id===e)}var oe=new Set(["deepseek-chat","deepseek-reasoner"]),F=new Set(["deepseek-v4-pro"]);function U(e){return e.includes("deepseek-v4")}import{getActiveWorldStore as ot,parseScenarioDocument as rt,ScenarioError as st,ScenarioEngine as it}from"../../engine/v2/volter_world-core.mjs";var xe=new Set(["text","reasoning","toolCalls","finishReason","error"]),ke=new Set(["stop","length","content_filter","tool_calls","insufficient_system_resource"]),we=new Set(["rate_limit_exceeded","insufficient_balance","internal_server_error","server_overloaded"]),Te=new Set(["enabled","disabled"]),D=e=>typeof e=="string"&&e.length>0;function Ae(e){let t=new Set,n=e[e.length-1];if(!n||n.role!=="tool"||typeof n.tool_call_id!="string")return t;for(let o of e){let r=o;if(!(r.role!=="assistant"||!Array.isArray(r.tool_calls)))for(let a of r.tool_calls)a?.id===n.tool_call_id&&typeof a?.function?.name=="string"&&t.add(a.function.name)}return t}function ve(e){return Array.isArray(e)?e.map(t=>typeof t?.function?.name=="string"?t.function.name:typeof t?.name=="string"?t.name:null).filter(t=>t!==null):[]}var re={vendor:"deepseek",features:e=>({model:e.model,lastUserText:v(e.messages).slice(0,300),tools:ve(e.tools),lastMessageIsToolResult:e.messages[e.messages.length-1]?.role==="tool",toolResultFor:[...Ae(e.messages)],thinking:e.thinking??"enabled"}),matchers:{modelEquals:(e,t)=>D(t)&&e.model===t,userTextIncludes:(e,t)=>D(t)&&v(e.messages).toLowerCase().includes(t.toLowerCase()),anyTextIncludes:(e,t)=>D(t)&&e.messages.map(n=>k(n.content)).join(`
|
|
6
|
+
`).toLowerCase().includes(t.toLowerCase()),lastMessageIsToolResult:(e,t)=>typeof t=="boolean"&&e.messages[e.messages.length-1]?.role==="tool"===t,toolResultFor:(e,t)=>D(t)&&Ae(e.messages).has(t),hasTool:(e,t)=>D(t)&&ve(e.tools).includes(t),thinkingEquals:(e,t)=>D(t)&&(e.thinking??"enabled")===t},text:e=>e.messages.map(t=>k(t.content)).join(`
|
|
7
|
+
`),validateOn:e=>{for(let t of["modelEquals","userTextIncludes","anyTextIncludes","toolResultFor","hasTool"])if(e[t]!==void 0&&(typeof e[t]!="string"||!e[t]))return`on.${t} is a non-empty string`;return e.lastMessageIsToolResult!==void 0&&typeof e.lastMessageIsToolResult!="boolean"?"on.lastMessageIsToolResult is a boolean":e.thinkingEquals!==void 0&&(typeof e.thinkingEquals!="string"||!Te.has(e.thinkingEquals))?`on.thinkingEquals is one of ${[...Te].join(", ")}`:null},validateRespond:e=>{if(typeof e!="object"||e===null||Array.isArray(e))return"respond is an object { text?, reasoning?, toolCalls?, finishReason?, error? }";let t=e;for(let n of Object.keys(t))if(!xe.has(n))return`respond: unknown key "${n}" (valid: ${[...xe].join(", ")})`;if(t.error!==void 0){let n=t.error;if(!n||typeof n!="object"||Array.isArray(n))return"respond.error is an object { type, message? }";if(typeof n.type!="string"||!we.has(n.type))return`respond.error.type is one of ${[...we].join(", ")}`;if(n.message!==void 0&&typeof n.message!="string")return"respond.error.message is a string";for(let o of["text","reasoning","toolCalls","finishReason"])if(t[o]!==void 0)return`respond.error cannot be combined with respond.${o}`;return null}if(t.text!==void 0&&typeof t.text!="string")return"respond.text is a string";if(t.reasoning!==void 0&&typeof t.reasoning!="string")return"respond.reasoning is a string";if(t.finishReason!==void 0&&(typeof t.finishReason!="string"||!ke.has(t.finishReason)))return`respond.finishReason is one of ${[...ke].join(", ")}`;if(t.toolCalls!==void 0)for(let n of Array.isArray(t.toolCalls)?t.toolCalls:[t.toolCalls]){let o=n;if(!o||typeof o!="object"||Array.isArray(o))return"respond.toolCalls entries are objects";if(typeof o.name!="string"||!o.name)return"respond.toolCalls[].name is a non-empty string";if(!o.arguments||typeof o.arguments!="object"||Array.isArray(o.arguments))return"respond.toolCalls[].arguments is an object";if(o.id!==void 0&&typeof o.id!="string")return"respond.toolCalls[].id is a string"}return t.text===void 0&&t.toolCalls===void 0?"respond needs text or toolCalls (or an error)":null}};function se(e){let t;try{let n=ot().read(e);if(n===null)throw new Error(`ENOENT: no such file or directory, open '${e}'`);t=JSON.parse(n)}catch(n){throw new st(`deepseek scenario: cannot read/parse ${e}: ${n instanceof Error?n.message:String(n)}`)}return rt(t,re)}function ie(e){return new it(re,e)}function ae(e){let t=[];return(e.toolCalls?Array.isArray(e.toolCalls)?e.toolCalls:[e.toolCalls]:[]).forEach((o,r)=>{let a=`${r}:${o.name}:${JSON.stringify(o.arguments)}`,i=2166136261;for(let f=0;f<a.length;f++)i^=a.charCodeAt(f),i=Math.imul(i,16777619);t.push({id:o.id??`call_scripted_${(i>>>0).toString(36)}`,type:"function",function:{name:o.name,arguments:JSON.stringify(o.arguments)}})}),{text:e.text??(t.length?null:""),reasoning:e.reasoning??null,toolCalls:t,finishReason:e.finishReason??(t.length?"tool_calls":"stop")}}var pe="deepseek",$="/beta",fe="/anthropic";function E(e,t){return{error:{message:e,...t!==void 0?{type:t}:{}}}}function ce(e){return{status:400,body:E(`Invalid request body format: ${e}`,"invalid_request_error")}}function c(e){return{status:422,body:E(`Your request contains invalid parameters: ${e}`)}}function Ie(){return{status:401,body:E("Authentication fails due to the wrong API key","authentication_error")}}function de(){return{status:402,body:E("You have run out of balance")}}function Ge(){return{status:429,body:E("You are sending requests too quickly","rate_limit_exceeded")}}function j(e){return{status:404,body:E(e,"not_found_error")}}function ct(e){let t=e.headers?.authorization,n=typeof t=="string"&&t.toLowerCase().startsWith("bearer ")?t.slice(7).trim():"",o=(e.apiKey??"").trim()||n;return!o||o==="sk_invalid"||o==="invalid"?Ie():null}function lt(e,t){let n=e.headers?.[t];return n==="1"||n==="true"}function B(e){return Math.floor((e?Date.parse(e):0)/1e3)}function J(e,t){return at(pe,t).filter(n=>n.type===e)}var ut=/^file-api-twin(\d{12})$/;function ft(e){let t=0;for(let n of J("file",e)){let o=ut.exec(String(n.id));o&&(t=Math.max(t,Number(o[1])))}return`file-api-twin${String(t+1).padStart(12,"0")}`}function dt(e){return J("model",e).filter(t=>!t._deleted).map(t=>({id:t.id,object:"model",owned_by:t.owned_by??"deepseek"}))}function pt(e){let t=new Map;for(let n of L)t.set(n.id,n);for(let n of dt(e))t.set(String(n.id),n);return[...t.values()]}function G(e,t,n){return J(e,n).find(o=>o.id===t)}var De={is_available:!0,balance_infos:[{currency:"CNY",total_balance:"110.00",granted_balance:"10.00",topped_up_balance:"100.00"}]};function le(e){let t=G("balance","account",e);return t?{is_available:t.is_available!==!1,balance_infos:Array.isArray(t.balance_infos)?t.balance_infos:De.balance_infos}:De}function ht(e){if(!e||!e.trim())return{error:ce("a JSON request body is required")};try{let t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{error:ce("the request body must be a JSON object")}:{params:t}}catch{return{error:ce("the request body is not valid JSON")}}}var O="user",mt=new Set(["messages","model","thinking","max_tokens","response_format","stop","stream","stream_options","temperature","top_p","tools","tool_choice","logprobs","top_logprobs","user_id","frequency_penalty","presence_penalty","reasoning_effort",O]),gt=new Set(["model","prompt","suffix","echo","max_tokens","temperature","top_p","logprobs","stop","stream","stream_options","frequency_penalty","presence_penalty"]),$e=new Set(["system","user","assistant","tool"]),Re=new Set(["enabled","disabled"]),je=new Set(["low","high","max"]),Oe={medium:"high",xhigh:"high"},K=16,Pe=128,bt=/^[a-zA-Z0-9_-]+$/,Ne=512;function Ke(e){return typeof e=="string"?[e]:Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}function _t(e,t){for(let s of Object.keys(e))if(!mt.has(s))return{error:c(`'${s}' is not a parameter of the DeepSeek chat completions API`)};if(!Array.isArray(e.messages))return{error:c("'messages' is a required array")};if(e.messages.length===0)return{error:c("'messages' must contain at least 1 item")};let n=e.messages;for(let s of n){if(!s||typeof s!="object"||typeof s.role!="string")return{error:c("each entry of 'messages' must be an object with a 'role'")};if(!$e.has(s.role))return{error:c(`'messages[].role' must be one of ${[...$e].map(_=>`'${_}'`).join(", ")}`)};for(let _ of["name","reasoning_content","tool_call_id"]){let w=s[_];if(w!=null&&typeof w!="string")return{error:c(`'messages[].${_}' must be a string`)}}if(s.tool_calls!==void 0&&s.tool_calls!==null&&!Array.isArray(s.tool_calls))return{error:c("'messages[].tool_calls' must be an array")};for(let _ of s.tool_calls??[])if(!_||typeof _!="object"||typeof _.function?.name!="string"||typeof _.function?.arguments!="string")return{error:c("each entry of 'messages[].tool_calls' must be { id, type: 'function', function: { name, arguments } }")}}if(typeof e.model!="string"||!e.model)return{error:c("'model' is a required string")};let o=e.model;if(!ne(o))return oe.has(o)?{error:c(`'model' "${o}" was retired on 2026-07-24; use 'deepseek-v4-flash' or 'deepseek-v4-pro'`)}:{error:c(`'model' "${o}" does not exist`)};let r=U(o),a=e.reasoning_effort,i=e.thinking;if(i!=null){if(typeof i!="object"||Array.isArray(i))return{error:c("'thinking' must be an object")};let s=i;if(s.type!==void 0&&s.type!==null){if(typeof s.type!="string"||!Re.has(s.type))return{error:c(`'thinking.type' must be one of ${[...Re].map(_=>`'${_}'`).join(", ")}`)};r=s.type==="enabled"}s.reasoning_effort!==void 0&&s.reasoning_effort!==null&&(a=s.reasoning_effort)}let f="high";if(a!=null){let s=typeof a=="string"?a:"";if(je.has(s))f=s;else if(s in Oe)f=Oe[s];else return{error:c(`'reasoning_effort' must be one of ${[...je].map(_=>`'${_}'`).join(", ")}`)}}if(e.temperature!==void 0&&e.temperature!==null){let s=e.temperature;if(typeof s!="number"||Number.isNaN(s)||s<0||s>2)return{error:c("'temperature' must be a number between 0 and 2")}}if(e.top_p!==void 0&&e.top_p!==null){let s=e.top_p;if(typeof s!="number"||Number.isNaN(s)||s<=0||s>1)return{error:c("'top_p' must be a number in (0, 1]")}}let p;if(e.max_tokens!==void 0&&e.max_tokens!==null){let s=e.max_tokens;if(typeof s!="number"||!Number.isInteger(s)||s<1)return{error:c("'max_tokens' must be an integer >= 1")};p=s}let l;if(e.stop!==void 0&&e.stop!==null){let s=Ke(e.stop);if(s===null)return{error:c("'stop' must be a string or an array of strings")};if(s.length>K)return{error:c(`'stop' supports up to ${K} sequences`)};l=s}let u="text",h=e.response_format;if(h!=null){if(typeof h!="object"||Array.isArray(h))return{error:c("'response_format' must be an object")};let s=h.type;if(s!=null)if(s==="json_object")u="json_object";else if(s==="text")u="text";else return{error:c("'response_format.type' must be one of 'text', 'json_object'")}}if(e.logprobs!==void 0&&e.logprobs!==null&&typeof e.logprobs!="boolean")return{error:c("'logprobs' must be a boolean")};let d=e.logprobs===!0,m;if(e.top_logprobs!==void 0&&e.top_logprobs!==null){let s=e.top_logprobs;if(typeof s!="number"||!Number.isInteger(s)||s<0||s>20)return{error:c("'top_logprobs' must be an integer between 0 and 20")};if(!d)return{error:c("'top_logprobs' requires 'logprobs' to be true")};m=s}if(e[O]!==void 0&&e[O]!==null&&typeof e[O]!="string")return{error:c(`'${O}' must be a string`)};let g;if(e.user_id!==void 0&&e.user_id!==null){let s=e.user_id;if(typeof s!="string"||!bt.test(s))return{error:c("'user_id' must match /^[a-zA-Z0-9_-]+$/")};if(s.length>Ne)return{error:c(`'user_id' must be at most ${Ne} characters long`)};g=s}let b;if(e.tools!==void 0&&e.tools!==null){if(!Array.isArray(e.tools))return{error:c("'tools' must be an array")};if(e.tools.length>Pe)return{error:c(`'tools' supports at most ${Pe} functions`)};for(let _ of e.tools){let w=_;if(!w||typeof w!="object"||w.type!=="function"||typeof w.function?.name!="string")return{error:c("each entry of 'tools' must be { type: 'function', function: { name } }")}}let s=e.tools.map(_=>_.function?.strict===!0);if(s.some(Boolean)){if(!t)return{error:c("strict tool calls require the beta base URL (append '/beta' to your base_url)")};if(!s.every(Boolean))return{error:c("strict mode requires every function tool to set 'strict': true")}}b=e.tools}let S,x=e.tool_choice;if(x!=null)if(typeof x=="string"){if(!["auto","none","required"].includes(x))return{error:c("'tool_choice' must be one of 'none', 'auto', 'required' or a named function")};S=x}else if(typeof x=="object"&&!Array.isArray(x)){let s=x.function?.name;if(typeof s!="string"||!s)return{error:c("'tool_choice.function.name' is required for a named tool choice")};S={name:s}}else return{error:c("'tool_choice' must be a string or an object")};if(b!==void 0&&U(o)){for(let s of n)if(s.role==="assistant"&&typeof s.reasoning_content!="string")return{error:{status:400,body:E("Invalid request body format: when 'tools' is set, every previous assistant message must carry back its 'reasoning_content'","invalid_request_error")}}}let I=n.map((s,_)=>s.prefix===!0?_:-1).filter(s=>s>=0);if(I.length>0){for(let s of I)if(n[s].role!=="assistant")return{error:c("'prefix' is only valid on an assistant message")};if(!t)return{error:c("chat prefix completion requires the beta base URL (append '/beta' to your base_url)")};if(I.length>1||I[0]!==n.length-1)return{error:c("the message carrying 'prefix' must be the final message")}}if(e.stream!==void 0&&e.stream!==null&&typeof e.stream!="boolean")return{error:c("'stream' must be a boolean")};let P=e.stream===!0,A=!1;if(e.stream_options!==void 0&&e.stream_options!==null){if(typeof e.stream_options!="object"||Array.isArray(e.stream_options))return{error:c("'stream_options' must be an object")};A=P&&e.stream_options.include_usage===!0}return{args:{model:o,messages:n,...b!==void 0?{tools:b}:{},...p!==void 0?{maxTokens:p}:{},...l!==void 0?{stop:l}:{},stream:P,includeUsage:A,...S!==void 0?{toolChoice:S}:{},responseFormat:u,thinkingEnabled:r,reasoningEffort:f,logprobs:d,...m!==void 0?{topLogprobs:m}:{},...g!==void 0?{userId:g}:{},beta:t}}}function yt(e){let t=Array.isArray(e.tools)&&e.tools.length>0,n=e.toolChoice==="none",o=typeof e.toolChoice=="object"?e.toolChoice.name:void 0,r=e.thinkingEnabled?Y(e.messages,e.model,e.reasoningEffort):void 0,a=r?y(r):0;if(t&&!n){let d=e.tools,m=[];if(o){let g=C(d,1,o);g&&m.push(g)}else for(let g=0;g<d.length;g++){let b=C([d[g]],g+1);b&&m.push(b)}if(m.length){let g={role:"assistant",content:null,tool_calls:m};return r&&(g.reasoning_content=r),{choice:{index:0,message:g,logprobs:null,finish_reason:"tool_calls"},completionTokens:y(JSON.stringify(m))+a,reasoningTokens:a}}}let i=e.beta&&e.messages[e.messages.length-1]?.prefix===!0?e.messages[e.messages.length-1]:null,f=i?String(i.content??""):"",p=e.responseFormat==="json_object"?V(e.messages,e.model):`${f}${X(e.messages,e.model)}`,l="stop",u=-1;for(let d of e.stop??[]){if(!d)continue;let m=p.indexOf(d);m>=0&&(u<0||m<u)&&(u=m)}u>=0&&(p=p.slice(0,u)),e.maxTokens!==void 0&&y(p)>e.maxTokens&&(p=p.slice(0,e.maxTokens*4),l="length");let h={role:"assistant",content:p};return r&&(h.reasoning_content=r),{choice:{index:0,message:h,logprobs:e.logprobs?Et(p,r,e.topLogprobs):null,finish_reason:l},completionTokens:y(p)+a,reasoningTokens:a}}function Et(e,t,n){let o=i=>{let f=T(i),p=-Math.round(f%5e3/1e3*1e6)/1e6,l=[];for(let u=0;u<(n??0);u++)l.push({token:`${i}#${u}`,logprob:Math.round((p-u*.5)*1e6)/1e6,bytes:null});return{token:i,logprob:p,bytes:[...new TextEncoder().encode(i)],top_logprobs:l}},r=i=>i.split(/(?<=\s)/).slice(0,8).filter(Boolean),a=r(e).map(o);return{...a.length?{content:a}:{content:null},...t?{reasoning_content:r(t).map(o)}:{}}}function St(e){return T(JSON.stringify(e.messages)+e.model+e.reasoningEffort).toString(36)}function he(e,t,n,o){let r=R(e.messages),a=q(e.messages,o),i=null,f="";if(n){let d=n.next({model:e.model,messages:e.messages,tools:e.tools,thinking:e.thinkingEnabled?"enabled":"disabled"});if(d.kind==="handler"){let m=d.respond;if(m.error)return xt(m.error);i=ae(m)}else f=`
|
|
8
|
+
[twin-scenario miss \u2014 no handler matched. Author one in the world dir's handlers/deepseek.json (GET /twin explains; GET /twin/scenario lists handlers + misses). Features seen: ${JSON.stringify(d.miss.features)}]`}let p,l,u=0;if(i){let d=i.toolCalls.length?{role:"assistant",content:i.text,tool_calls:i.toolCalls}:{role:"assistant",content:i.text??""};i.reasoning!==null&&(d.reasoning_content=i.reasoning,u=y(i.reasoning)),p={index:0,message:d,logprobs:null,finish_reason:i.finishReason},l=y(JSON.stringify(i.toolCalls.length?i.toolCalls:i.text??""))+u}else{let d=yt(e);p=d.choice,l=d.completionTokens,u=d.reasoningTokens,f&&typeof p.message.content=="string"&&(p.message.content+=f)}let h=N(r,l,a,u);return{id:`chatcmpl-twin-${St(e)}`,object:"chat.completion",created:B(t),model:e.model,choices:[p],usage:h,system_fingerprint:M(`${e.model}|${e.reasoningEffort}`)}}function xt(e){if(e.type==="rate_limit_exceeded"){let t=Ge();return e.message?{...t,body:E(e.message,"rate_limit_exceeded")}:t}if(e.type==="insufficient_balance"){let t=de();return e.message?{...t,body:E(e.message)}:t}return e.type==="server_overloaded"?{status:503,body:E(e.message??"The server is overloaded due to high traffic","service_unavailable")}:{status:500,body:E(e.message??"Our server encounters an issue","server_error")}}var Je=e=>typeof e.status=="number"&&"body"in e;function Ce(e){if(!e)return[];let t=[];for(let n=0;n<e.length;n+=20)t.push(e.slice(n,n+20));return t}function We(e,t,n,o,r){let a=he(e,n,o,r);if(Je(a))return a;let i=a,f={id:i.id,object:"chat.completion.chunk",created:i.created,model:i.model,system_fingerprint:i.system_fingerprint},p=i.choices[0];t({data:{...f,choices:[{index:0,delta:{role:"assistant",content:""},logprobs:null,finish_reason:null}]}});for(let l of Ce(p.message.reasoning_content??""))t({data:{...f,choices:[{index:0,delta:{reasoning_content:l},logprobs:null,finish_reason:null}]}});if(p.message.tool_calls&&p.message.tool_calls.length)p.message.tool_calls.forEach((l,u)=>{t({data:{...f,choices:[{index:0,delta:{tool_calls:[{index:u,id:l.id,type:"function",function:{name:l.function.name,arguments:""}}]},logprobs:null,finish_reason:null}]}}),t({data:{...f,choices:[{index:0,delta:{tool_calls:[{index:u,function:{arguments:l.function.arguments}}]},logprobs:null,finish_reason:null}]}})});else for(let l of Ce(p.message.content??""))t({data:{...f,choices:[{index:0,delta:{content:l},logprobs:null,finish_reason:null}]}});return t({data:{...f,choices:[{index:0,delta:{},logprobs:p.logprobs,finish_reason:p.finish_reason}]}}),e.includeUsage&&t({data:{...f,choices:[],usage:i.usage}}),t({done:!0}),i}function kt(e){for(let r of Object.keys(e))if(!gt.has(r))return{error:c(`'${r}' is not a parameter of the DeepSeek FIM completions API`)};if(typeof e.model!="string"||!e.model)return{error:c("'model' is a required string")};if(!F.has(e.model))return{error:c(`'model' must be one of ${[...F].map(r=>`'${r}'`).join(", ")} for FIM completion`)};if(typeof e.prompt!="string"||!e.prompt)return{error:c("'prompt' is a required string")};if(e.suffix!==void 0&&e.suffix!==null&&typeof e.suffix!="string")return{error:c("'suffix' must be a string")};let t;if(e.logprobs!==void 0&&e.logprobs!==null){let r=e.logprobs;if(typeof r!="number"||!Number.isInteger(r)||r<0||r>20)return{error:c("'logprobs' must be an integer between 0 and 20")};t=r}let n;if(e.max_tokens!==void 0&&e.max_tokens!==null){let r=e.max_tokens;if(typeof r!="number"||!Number.isInteger(r)||r<1)return{error:c("'max_tokens' must be an integer >= 1")};n=r}let o;if(e.stop!==void 0&&e.stop!==null){let r=Ke(e.stop);if(r===null)return{error:c("'stop' must be a string or an array of strings")};if(r.length>K)return{error:c(`'stop' supports up to ${K} sequences`)};o=r}return e.echo!==void 0&&e.echo!==null&&typeof e.echo!="boolean"?{error:c("'echo' must be a boolean")}:e.stream===!0?{error:{status:422,body:E("the DeepSeek twin does not model streaming on /beta/completions yet (deepseek.completions.streaming); omit `stream` or use /chat/completions")}}:e.stream!==void 0&&e.stream!==null&&typeof e.stream!="boolean"?{error:c("'stream' must be a boolean")}:{args:{model:e.model,prompt:e.prompt,...typeof e.suffix=="string"?{suffix:e.suffix}:{},echo:e.echo===!0,...n!==void 0?{maxTokens:n}:{},...o!==void 0?{stop:o}:{},...t!==void 0?{logprobs:t}:{}}}}function wt(e,t,n){let o=z(e.model,e.prompt,e.suffix),r="stop",a=-1;for(let l of e.stop??[]){if(!l)continue;let u=o.indexOf(l);u>=0&&(a<0||u<a)&&(a=u)}a>=0&&(o=o.slice(0,a)),e.maxTokens!==void 0&&y(o)>e.maxTokens&&(o=o.slice(0,e.maxTokens*4),r="length");let i=e.echo?`${e.prompt}${o}`:o,f=y(e.prompt)+y(e.suffix??""),p=y(o);return{id:`cmpl-twin-${T(e.prompt+(e.suffix??"")).toString(36)}`,object:"text_completion",created:B(n),model:e.model,choices:[{index:0,text:i,finish_reason:r,logprobs:e.logprobs===void 0?null:{tokens:[],token_logprobs:[],text_offset:[],top_logprobs:[]}}],usage:N(f,p,t),system_fingerprint:M(`${e.model}|fim`)}}var He=new Set(["user_data"]),Tt=new Set(["image/gif","image/jpeg","image/jpg","image/png","image/webp"]),At=new Set(["gif","jpeg","jpg","png","webp"]),Me=64*1024*1024,Le=512,Fe=3600,Ue=2592e3,ue=1e3;function vt(e){let t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()}async function It(e,t){let n=typeof e.purpose=="string"?e.purpose:"";if(!n)return c("'purpose' is a required property");if(!He.has(n))return c(`'purpose' must be 'user_data' (got '${n}')`);let o=typeof e.filename=="string"&&e.filename?e.filename:"";if(!o)return c("'file' is a required property");if([...o].length>Le)return c(`'filename' must be at most ${Le} characters`);let r=typeof e.media_type=="string"?e.media_type.split(";",1)[0].trim().toLowerCase():"";if(!Tt.has(r)&&!At.has(vt(o)))return c("DeepSeek file uploads support JPEG, PNG, GIF, and WebP images");let a=typeof e.content=="string"?e.content:"",i=typeof e.bytes=="number"?e.bytes:a.length;if(i>Me)return c(`DeepSeek file uploads must not exceed ${Me} bytes`);let f=e["expires_after[anchor]"],p=e["expires_after[seconds]"],l;if(f!==void 0||p!==void 0){if(f!==void 0&&f!=="created_at")return c("'expires_after[anchor]' must be 'created_at'");let h=Number(p);if(!Number.isInteger(h)||h<Fe||h>Ue)return c(`'expires_after[seconds]' must be an integer between ${Fe} and ${Ue}`);l=B(t.occurredAt)+h}let u=ft(t.root);return await Be(pe,{operation:"file.create",subjectType:"file",subjectId:u,fields:{object:"file",bytes:i,created_at:B(t.occurredAt),filename:o,purpose:n,...l!==void 0?{expires_at:l}:{},_content:a},...t.occurredAt?{occurredAt:t.occurredAt}:{},actor:{kind:"agent"}},t.root),{status:200,body:me(G("file",u,t.root)??{})}}function me(e){return{id:e.id,object:"file",bytes:e.bytes,created_at:e.created_at,filename:e.filename,purpose:e.purpose,...e.expires_at!==void 0?{expires_at:e.expires_at}:{}}}function Dt(e,t){let n=e.get("purpose");if(n!==null&&!He.has(n))return c("'purpose' must be 'user_data'");let o=e.get("order");if(o!==null&&o!=="asc"&&o!=="desc")return c("'order' must be 'asc' or 'desc'");let r=e.get("limit"),a=ue;if(r!==null){let u=Number(r);if(!Number.isInteger(u)||u<1||u>ue)return c(`'limit' must be an integer between 1 and ${ue}`);a=u}let i=J("file",t).filter(u=>!u._deleted).map(me);i.sort((u,h)=>Number(u.created_at)-Number(h.created_at)||String(u.id).localeCompare(String(h.id))),o==="desc"&&i.reverse();let f=e.get("after");if(f!==null){let u=i.findIndex(h=>h.id===f);if(u===-1)return c(`'after' cursor "${f}" is not a known file id`);i=i.slice(u+1)}let p=i.length>a,l=i.slice(0,a);return{status:200,body:{object:"list",data:l,...l.length>0?{first_id:l[0].id,last_id:l[l.length-1].id}:{},has_more:p}}}async function W(e){let t=e.method.toUpperCase();if(e.headers!==void 0||e.apiKey!==void 0){let n=ct(e);if(n)return n}return lt(e,"x-twin-force-rate-limit")?Ge():$t(e,t)}async function $t(e,t){let[n,o]=e.path.split("?"),r=(n??"/").replace(/\/+$/,"")||"/",a=new URLSearchParams(o??""),i=d=>decodeURIComponent(d);if(e.readOnly&&t!=="GET")return{status:405,body:E("twin is read-only; omit readOnly to accept writes")};if(r===fe||r.startsWith(`${fe}/`))return j(`The DeepSeek twin does not model the Anthropic-compatible surface (${t} ${r}) yet.`);let f=r===$||r.startsWith(`${$}/`),l=(f?r.slice($.length)||"/":r).replace(/^\/+/,"").split("/").filter(Boolean),u=t==="GET"||t==="DELETE"?{params:{}}:ht(e.body);if("error"in u)return u.error;let h=u.params;if(l[0]==="models"&&l.length===1&&t==="GET")return{status:200,body:{object:"list",data:pt(e.root)}};if(l[0]==="user"&&l[1]==="balance"&&l.length===2&&t==="GET")return{status:200,body:le(e.root)};if(l[0]==="chat"&&l[1]==="completions"&&l.length===2&&t==="POST"){let d=_t(h,f);if("error"in d)return d.error;let m=d.args;if(!le(e.root).is_available)return de();if(m.stream&&!e.sseSink)return{status:422,body:E("'stream' was requested but this caller supplied no SSE sink; the twin refuses to answer a streaming request with a unary body")};let g=m.stream&&e.sseSink?We(m,e.sseSink,e.occurredAt,e.scenarioEngine,e.root):he(m,e.occurredAt,e.scenarioEngine,e.root);return Je(g)?g:(await ee(m.messages,{role:"assistant",content:g.choices[0].message.content??"",...g.choices[0].message.tool_calls?{tool_calls:g.choices[0].message.tool_calls}:{}},e.occurredAt,e.root),{status:200,body:g})}if(l[0]==="completions"&&l.length===1&&t==="POST"){if(!f)return j("FIM completion requires the beta base URL (append '/beta' to your base_url).");let d=kt(h);return"error"in d?d.error:le(e.root).is_available?{status:200,body:wt(d.args,0,e.occurredAt)}:de()}if(l[0]==="files"&&l.length===1&&t==="POST")return It(h,e);if(l[0]==="files"&&l.length===1&&t==="GET")return Dt(a,e.root);if(l[0]==="files"&&l.length===2&&t==="GET"){let d=G("file",i(l[1]),e.root);return d&&!d._deleted?{status:200,body:me(d)}:j(`No such File object: ${i(l[1])}`)}if(l[0]==="files"&&l.length===2&&t==="DELETE"){let d=i(l[1]),m=G("file",d,e.root);return!m||m._deleted?j(`No such File object: ${d}`):(await Be(pe,{operation:"file.delete",subjectType:"file",subjectId:d,fields:{_deleted:!0,object:"file"},...e.occurredAt?{occurredAt:e.occurredAt}:{},actor:{kind:"agent"}},e.root),{status:200,body:{id:d,object:"file",deleted:!0}})}return j(`Unknown request URL: ${t} ${r}.`)}import{serveHttp as tn}from"../../engine/v2/volter_world-core.mjs";import{twinManifest as Rt,worldNow as Xe}from"../../engine/v2/volter_world-core.mjs";function jt(e){if(!e)return!1;try{return JSON.parse(e)?.stream===!0}catch{return!1}}function Ot(e){return e.done?`data: [DONE]
|
|
9
|
+
|
|
10
|
+
`:`data: ${JSON.stringify(e.data)}
|
|
11
|
+
|
|
12
|
+
`}var Pt=new Set(["/chat/completions",`${$}/chat/completions`]);async function Nt(e){try{let t=await e.formData(),n={};for(let[r,a]of t.entries())if(typeof a=="string")if(r.endsWith("[]")){let i=r.slice(0,-2),f=n[i];n[i]=Array.isArray(f)?[...f,a]:[a]}else n[r]=a;let o=t.get("file");if(o instanceof File){let r=new Uint8Array(await o.arrayBuffer());n.file=o.name||"upload",n.filename=o.name||"upload",n.content=Buffer.from(r).toString("base64"),n.media_type=o.type||"",n.bytes=r.length}return JSON.stringify(n)}catch{return"{}"}}function Ye(e){let t=e.readOnly??!1,n=e.scenarioPath??process.env.TWIN_DEEPSEEK_SCENARIO,o=n?ie(se(n)):void 0;return async function(a){let i=new URL(a.url);if(a.method==="GET"&&i.pathname.replace(/\/+$/,"")==="/twin")return Response.json(Rt({vendor:"deepseek",twinOf:"DeepSeek Platform API (OpenAI-compatible; base_url has NO /v1 segment, and /beta unlocks prefix completion + strict tools)",stateSentence:"Seed image files through the ordinary API (POST /files, multipart, purpose=user_data) with any key; the context-cache ledger fills itself as you chat.",behaviorSentence:"Chat completions are scripted by MSW-shaped handlers in the world dir (handlers/deepseek.json): {on:{userTextIncludes|anyTextIncludes|modelEquals|hasTool|toolResultFor|lastMessageIsToolResult|thinkingEquals|nthCall}, respond:{text|reasoning|toolCalls, finishReason?} | {error:{type:rate_limit_exceeded|insufficient_balance|internal_server_error|server_overloaded}}, once?, phase?}. Unmatched requests answer a labeled stub naming this door.",exampleHandler:{on:{userTextIncludes:"summarize",hasTool:"search_docs"},respond:{text:"Scripted summary."},once:!0},engine:o}));if(a.method==="GET"&&i.pathname.replace(/\/+$/,"")==="/twin/scenario")return Response.json(o?o.status():{vendor:"deepseek",handlers:[],misses:0,recentMisses:[]});let f=i.pathname+(i.search||""),p=i.pathname.replace(/\/{2,}/g,"/").replace(/\/+$/,""),l=a.headers.get("content-type")??"",u={};for(let b of["authorization","x-twin-force-rate-limit"]){let S=a.headers.get(b);S!==null&&(u[b]=S)}let h="";if(a.method!=="GET"&&(h=l.includes("multipart/form-data")?await Nt(a):await a.text()),!t&&a.method.toUpperCase()==="POST"&&Pt.has(p)&&jt(h)){let b=[],{status:S,body:x,headers:I}=await W({...o?{scenarioEngine:o}:{},method:a.method,path:f,body:h,readOnly:t,occurredAt:Xe(),headers:u,...e.root!==void 0?{root:e.root}:{},sseSink:A=>b.push(A)});if(S>=400)return new Response(JSON.stringify(x),{status:S,headers:{"content-type":"application/json",...I??{}}});let P=new ReadableStream({start(A){let s=new TextEncoder;for(let _ of b)A.enqueue(s.encode(Ot(_)));A.close()}});return new Response(P,{headers:{"content-type":"text/event-stream; charset=utf-8","cache-control":"no-cache"}})}let d,m,g;try{let b=await W({...o?{scenarioEngine:o}:{},method:a.method,path:f,body:h,readOnly:t,occurredAt:Xe(),headers:u,...e.root!==void 0?{root:e.root}:{}});d=b.status,m=b.body,g=b.headers}catch(b){return new Response(JSON.stringify({error:{message:`twin handler error: ${b instanceof Error?b.message:String(b)}`,type:"internal_server_error"}}),{status:500,headers:{"content-type":"application/json"}})}return new Response(JSON.stringify(m),{status:d,headers:{"content-type":"application/json",...g??{}}})}}import{assertBudgetGuardIntact as hn,confirmAction as mn,pendingActions as gn,projectResources as bn,syncPull as _n}from"../../engine/v2/volter_world-core.mjs";import{declareRateBudget as Ct,rateBudgetPath as cn,rateBudgetWeight as ln,RateBudget as un}from"../../engine/v2/volter_world-core.mjs";import{RateBudgetError as Ze}from"../../engine/v2/volter_world-core.mjs";var Mt="deepseek",ze=6e4,Ve=60,Qe=300,H={inference:6,other:2},ge={windowMs:ze,ceiling:Ve,defaultWeight:H.other,maxRetryAfterSeconds:Qe,rules:[{match:"^POST (/beta)?/chat/completions$",weight:H.inference},{match:"^POST /beta/completions$",weight:H.inference}],reason:"DeepSeek publishes NO scalar request-rate limit at all (api-docs.deepseek.com/quick_start/rate_limit, read 2026-08-31). The only figures on that page are CONCURRENCY limits \u2014 deepseek-v4-pro 500, deepseek-v4-flash 2500, deepseek-v4-flash-vision-exp 2500 simultaneous connections per account, with a capacity-expansion request available for more \u2014 and concurrency bounds calls in flight, not calls per minute, so it cannot be turned into a window ceiling. Because no published figure justifies going higher, the ceiling is pinned at the kernel fallback in every dimension: 60 units / 60s at defaultWeight 2 = 30 calls/min, identical to DEFAULT_RATE_BUDGET. The declaration buys resolution DOWNWARD, never headroom: inference (POST /chat/completions, POST /beta/chat/completions, POST /beta/completions) costs 6, so at most 10 land in a window, because DeepSeek bills those endpoints by token (input cache-hit / cache-miss / output) rather than by request. That factor is a judgement call in the strict direction, not a vendor figure. The window bounds the 60s AVERAGE and does not pace; a `retry-after` read off a real 429 is the persisted cooldown backstop."};Ct(Mt,ge);export{Ye 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-discord
|
|
2
|
+
|
|
3
|
+
Contains @volter/twin-discord 3.0.0 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.
|