zilmate 1.8.1 → 1.9.1
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/.agents/skills/copywriting/SKILL.md +252 -0
- package/.agents/skills/copywriting/evals/evals.json +111 -0
- package/.agents/skills/copywriting/references/copy-frameworks.md +344 -0
- package/.agents/skills/copywriting/references/natural-transitions.md +272 -0
- package/.agents/skills/firecrawl-deep-research/SKILL.md +108 -0
- package/.agents/skills/shadcn/SKILL.md +267 -0
- package/.agents/skills/shadcn/agents/openai.yml +5 -0
- package/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
- package/.agents/skills/shadcn/assets/shadcn.png +0 -0
- package/.agents/skills/shadcn/cli.md +290 -0
- package/.agents/skills/shadcn/customization.md +209 -0
- package/.agents/skills/shadcn/evals/evals.json +47 -0
- package/.agents/skills/shadcn/mcp.md +105 -0
- package/.agents/skills/shadcn/registry.md +277 -0
- package/.agents/skills/shadcn/rules/base-vs-radix.md +306 -0
- package/.agents/skills/shadcn/rules/composition.md +195 -0
- package/.agents/skills/shadcn/rules/forms.md +192 -0
- package/.agents/skills/shadcn/rules/icons.md +101 -0
- package/.agents/skills/shadcn/rules/styling.md +162 -0
- package/.agents/skills/tavily-research/SKILL.md +100 -0
- package/.agents/skills/upstash/SKILL.md +48 -0
- package/.agents/skills/upstash/upstash-box-js/overview.md +243 -0
- package/.agents/skills/upstash/upstash-box-py/overview.md +275 -0
- package/.agents/skills/upstash/upstash-cli/overview.md +138 -0
- package/.agents/skills/upstash/upstash-qstash-js/advanced/callbacks.md +147 -0
- package/.agents/skills/upstash/upstash-qstash-js/advanced/deduplication.md +86 -0
- package/.agents/skills/upstash/upstash-qstash-js/advanced/dlq.md +164 -0
- package/.agents/skills/upstash/upstash-qstash-js/advanced/multi-region/summary.md +388 -0
- package/.agents/skills/upstash/upstash-qstash-js/advanced/multi-region/verify-multi-region-setup.ts +388 -0
- package/.agents/skills/upstash/upstash-qstash-js/fundamentals/local-development.md +106 -0
- package/.agents/skills/upstash/upstash-qstash-js/fundamentals/publishing-messages.md +144 -0
- package/.agents/skills/upstash/upstash-qstash-js/fundamentals/queues-and-flow-control.md +148 -0
- package/.agents/skills/upstash/upstash-qstash-js/fundamentals/schedules.md +177 -0
- package/.agents/skills/upstash/upstash-qstash-js/fundamentals/url-groups.md +127 -0
- package/.agents/skills/upstash/upstash-qstash-js/overview.md +81 -0
- package/.agents/skills/upstash/upstash-qstash-js/verification/platform-specific/nextjs.md +171 -0
- package/.agents/skills/upstash/upstash-qstash-js/verification/receiver.md +213 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/algorithms.md +84 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/features.md +117 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/methods-getting-started.md +77 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/overview.md +26 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/pricing-cost.md +146 -0
- package/.agents/skills/upstash/upstash-ratelimit-js/traffic-protection.md +77 -0
- package/.agents/skills/upstash/upstash-redis-js/advanced-features/auto-pipeline.md +49 -0
- package/.agents/skills/upstash/upstash-redis-js/advanced-features/pipeline-and-transactions.md +42 -0
- package/.agents/skills/upstash/upstash-redis-js/advanced-features/scripting.md +124 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/hashes.md +71 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/json.md +133 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/lists.md +72 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/sets.md +90 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/sorted-sets.md +126 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/streams.md +196 -0
- package/.agents/skills/upstash/upstash-redis-js/data-structures/strings.md +73 -0
- package/.agents/skills/upstash/upstash-redis-js/migrations/from-ioredis.md +163 -0
- package/.agents/skills/upstash/upstash-redis-js/migrations/from-redis-node.md +205 -0
- package/.agents/skills/upstash/upstash-redis-js/overview.md +183 -0
- package/.agents/skills/upstash/upstash-redis-js/patterns/caching.md +58 -0
- package/.agents/skills/upstash/upstash-redis-js/patterns/distributed-locks.md +130 -0
- package/.agents/skills/upstash/upstash-redis-js/patterns/leaderboard.md +134 -0
- package/.agents/skills/upstash/upstash-redis-js/patterns/rate-limiting.md +187 -0
- package/.agents/skills/upstash/upstash-redis-js/patterns/session-management.md +217 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/batching-operations.md +76 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/data-serialization.md +134 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/error-handling.md +118 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/pipeline-optimization.md +105 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/redis-replicas.md +14 -0
- package/.agents/skills/upstash/upstash-redis-js/performance/ttl-expiration.md +32 -0
- package/.agents/skills/upstash/upstash-redis-js/search/adapters.md +99 -0
- package/.agents/skills/upstash/upstash-redis-js/search/commands/aggregating.md +234 -0
- package/.agents/skills/upstash/upstash-redis-js/search/commands/aliases.md +76 -0
- package/.agents/skills/upstash/upstash-redis-js/search/commands/index-management.md +124 -0
- package/.agents/skills/upstash/upstash-redis-js/search/commands/querying.md +315 -0
- package/.agents/skills/upstash/upstash-redis-js/search/overview.md +155 -0
- package/.agents/skills/upstash/upstash-redis-start/overview.md +71 -0
- package/.agents/skills/upstash/upstash-search-js/overview.md +48 -0
- package/.agents/skills/upstash/upstash-search-js/quick-start.md +158 -0
- package/.agents/skills/upstash/upstash-search-js/sdk-overview.md +158 -0
- package/.agents/skills/upstash/upstash-vector-js/features/filtering-and-metadata.md +82 -0
- package/.agents/skills/upstash/upstash-vector-js/features/index-structure.md +193 -0
- package/.agents/skills/upstash/upstash-vector-js/features/namespaces.md +32 -0
- package/.agents/skills/upstash/upstash-vector-js/overview.md +44 -0
- package/.agents/skills/upstash/upstash-vector-js/sdk-methods.md +210 -0
- package/.agents/skills/upstash/upstash-workflow-js/agents.md +248 -0
- package/.agents/skills/upstash/upstash-workflow-js/basics/client.md +180 -0
- package/.agents/skills/upstash/upstash-workflow-js/basics/context.md +230 -0
- package/.agents/skills/upstash/upstash-workflow-js/basics/serve.md +70 -0
- package/.agents/skills/upstash/upstash-workflow-js/features/flow-control.md +145 -0
- package/.agents/skills/upstash/upstash-workflow-js/features/invoke.md +97 -0
- package/.agents/skills/upstash/upstash-workflow-js/features/retries-failures-reliability.md +239 -0
- package/.agents/skills/upstash/upstash-workflow-js/features/wait-for-event.md +97 -0
- package/.agents/skills/upstash/upstash-workflow-js/features/webhooks.md +79 -0
- package/.agents/skills/upstash/upstash-workflow-js/how-to/local-dev.md +177 -0
- package/.agents/skills/upstash/upstash-workflow-js/how-to/middleware.md +166 -0
- package/.agents/skills/upstash/upstash-workflow-js/how-to/migrations.md +201 -0
- package/.agents/skills/upstash/upstash-workflow-js/how-to/realtime.md +186 -0
- package/.agents/skills/upstash/upstash-workflow-js/overview.md +55 -0
- package/.agents/skills/upstash/upstash-workflow-js/rest-api.md +156 -0
- package/.agents/skills/upstash/upstash-workflow-js/troubleshooting.md +201 -0
- package/.agents/skills/upstash-box-js/SKILL.md +248 -0
- package/.agents/skills/upstash-box-py/SKILL.md +280 -0
- package/.agents/skills/upstash-cli/SKILL.md +143 -0
- package/.agents/skills/upstash-qstash-js/SKILL.md +86 -0
- package/.agents/skills/upstash-qstash-js/advanced/callbacks.md +147 -0
- package/.agents/skills/upstash-qstash-js/advanced/deduplication.md +86 -0
- package/.agents/skills/upstash-qstash-js/advanced/dlq.md +164 -0
- package/.agents/skills/upstash-qstash-js/advanced/multi-region/summary.md +388 -0
- package/.agents/skills/upstash-qstash-js/advanced/multi-region/verify-multi-region-setup.ts +388 -0
- package/.agents/skills/upstash-qstash-js/fundamentals/local-development.md +106 -0
- package/.agents/skills/upstash-qstash-js/fundamentals/publishing-messages.md +144 -0
- package/.agents/skills/upstash-qstash-js/fundamentals/queues-and-flow-control.md +148 -0
- package/.agents/skills/upstash-qstash-js/fundamentals/schedules.md +177 -0
- package/.agents/skills/upstash-qstash-js/fundamentals/url-groups.md +127 -0
- package/.agents/skills/upstash-qstash-js/verification/platform-specific/nextjs.md +171 -0
- package/.agents/skills/upstash-qstash-js/verification/receiver.md +213 -0
- package/.agents/skills/upstash-ratelimit-js/SKILL.md +31 -0
- package/.agents/skills/upstash-ratelimit-js/algorithms.md +84 -0
- package/.agents/skills/upstash-ratelimit-js/features.md +117 -0
- package/.agents/skills/upstash-ratelimit-js/methods-getting-started.md +77 -0
- package/.agents/skills/upstash-ratelimit-js/pricing-cost.md +146 -0
- package/.agents/skills/upstash-ratelimit-js/traffic-protection.md +77 -0
- package/.agents/skills/upstash-redis-js/SKILL.md +188 -0
- package/.agents/skills/upstash-redis-js/advanced-features/auto-pipeline.md +49 -0
- package/.agents/skills/upstash-redis-js/advanced-features/pipeline-and-transactions.md +42 -0
- package/.agents/skills/upstash-redis-js/advanced-features/scripting.md +124 -0
- package/.agents/skills/upstash-redis-js/data-structures/hashes.md +71 -0
- package/.agents/skills/upstash-redis-js/data-structures/json.md +133 -0
- package/.agents/skills/upstash-redis-js/data-structures/lists.md +72 -0
- package/.agents/skills/upstash-redis-js/data-structures/sets.md +90 -0
- package/.agents/skills/upstash-redis-js/data-structures/sorted-sets.md +126 -0
- package/.agents/skills/upstash-redis-js/data-structures/streams.md +196 -0
- package/.agents/skills/upstash-redis-js/data-structures/strings.md +73 -0
- package/.agents/skills/upstash-redis-js/migrations/from-ioredis.md +163 -0
- package/.agents/skills/upstash-redis-js/migrations/from-redis-node.md +205 -0
- package/.agents/skills/upstash-redis-js/patterns/caching.md +58 -0
- package/.agents/skills/upstash-redis-js/patterns/distributed-locks.md +130 -0
- package/.agents/skills/upstash-redis-js/patterns/leaderboard.md +134 -0
- package/.agents/skills/upstash-redis-js/patterns/rate-limiting.md +187 -0
- package/.agents/skills/upstash-redis-js/patterns/session-management.md +217 -0
- package/.agents/skills/upstash-redis-js/performance/batching-operations.md +76 -0
- package/.agents/skills/upstash-redis-js/performance/data-serialization.md +134 -0
- package/.agents/skills/upstash-redis-js/performance/error-handling.md +118 -0
- package/.agents/skills/upstash-redis-js/performance/pipeline-optimization.md +105 -0
- package/.agents/skills/upstash-redis-js/performance/redis-replicas.md +14 -0
- package/.agents/skills/upstash-redis-js/performance/ttl-expiration.md +32 -0
- package/.agents/skills/upstash-redis-js/search/adapters.md +99 -0
- package/.agents/skills/upstash-redis-js/search/commands/aggregating.md +234 -0
- package/.agents/skills/upstash-redis-js/search/commands/aliases.md +76 -0
- package/.agents/skills/upstash-redis-js/search/commands/index-management.md +124 -0
- package/.agents/skills/upstash-redis-js/search/commands/querying.md +315 -0
- package/.agents/skills/upstash-redis-js/search/overview.md +155 -0
- package/.agents/skills/upstash-redis-start/SKILL.md +76 -0
- package/.agents/skills/upstash-search-js/SKILL.md +53 -0
- package/.agents/skills/upstash-search-js/quick-start.md +158 -0
- package/.agents/skills/upstash-search-js/sdk-overview.md +158 -0
- package/.agents/skills/upstash-vector-js/SKILL.md +49 -0
- package/.agents/skills/upstash-vector-js/features/filtering-and-metadata.md +82 -0
- package/.agents/skills/upstash-vector-js/features/index-structure.md +193 -0
- package/.agents/skills/upstash-vector-js/features/namespaces.md +32 -0
- package/.agents/skills/upstash-vector-js/sdk-methods.md +210 -0
- package/.agents/skills/upstash-workflow-js/SKILL.md +60 -0
- package/.agents/skills/upstash-workflow-js/agents.md +248 -0
- package/.agents/skills/upstash-workflow-js/basics/client.md +180 -0
- package/.agents/skills/upstash-workflow-js/basics/context.md +230 -0
- package/.agents/skills/upstash-workflow-js/basics/serve.md +70 -0
- package/.agents/skills/upstash-workflow-js/features/flow-control.md +145 -0
- package/.agents/skills/upstash-workflow-js/features/invoke.md +97 -0
- package/.agents/skills/upstash-workflow-js/features/retries-failures-reliability.md +239 -0
- package/.agents/skills/upstash-workflow-js/features/wait-for-event.md +97 -0
- package/.agents/skills/upstash-workflow-js/features/webhooks.md +79 -0
- package/.agents/skills/upstash-workflow-js/how-to/local-dev.md +177 -0
- package/.agents/skills/upstash-workflow-js/how-to/middleware.md +166 -0
- package/.agents/skills/upstash-workflow-js/how-to/migrations.md +201 -0
- package/.agents/skills/upstash-workflow-js/how-to/realtime.md +186 -0
- package/.agents/skills/upstash-workflow-js/rest-api.md +156 -0
- package/.agents/skills/upstash-workflow-js/troubleshooting.md +201 -0
- package/dist/agents/coding.agent.d.ts +185 -42
- package/dist/agents/coding.agent.d.ts.map +1 -1
- package/dist/agents/coding.agent.js +42 -5
- package/dist/agents/coding.agent.js.map +1 -1
- package/dist/agents/manager.d.ts +216 -41
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +103 -140
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/security.agent.d.ts +3 -3
- package/dist/agents/swarm/development/lead.d.ts +3 -0
- package/dist/agents/swarm/development/lead.d.ts.map +1 -0
- package/dist/agents/swarm/development/lead.js +24 -0
- package/dist/agents/swarm/development/lead.js.map +1 -0
- package/dist/agents/swarm/main.d.ts +69 -0
- package/dist/agents/swarm/main.d.ts.map +1 -1
- package/dist/agents/swarm/main.js +65 -11
- package/dist/agents/swarm/main.js.map +1 -1
- package/dist/agents/swarm/registry.d.ts +2 -1
- package/dist/agents/swarm/registry.d.ts.map +1 -1
- package/dist/agents/swarm/registry.js +225 -95
- package/dist/agents/swarm/registry.js.map +1 -1
- package/dist/cli/composer.d.ts.map +1 -1
- package/dist/cli/composer.js +85 -30
- package/dist/cli/composer.js.map +1 -1
- package/dist/cli/confirm.d.ts +2 -2
- package/dist/cli/confirm.d.ts.map +1 -1
- package/dist/cli/confirm.js +373 -4
- package/dist/cli/confirm.js.map +1 -1
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +47 -2
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/format.d.ts +4 -0
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +352 -65
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +80 -2
- package/dist/cli/interactive.js.map +1 -1
- package/dist/cli/menu.d.ts.map +1 -1
- package/dist/cli/menu.js +93 -83
- package/dist/cli/menu.js.map +1 -1
- package/dist/cli/render.d.ts.map +1 -1
- package/dist/cli/render.js +2 -1
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +292 -28
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/swarm.d.ts.map +1 -1
- package/dist/cli/swarm.js +13 -10
- package/dist/cli/swarm.js.map +1 -1
- package/dist/cli/theme.d.ts +7 -1
- package/dist/cli/theme.d.ts.map +1 -1
- package/dist/cli/theme.js +4 -16
- package/dist/cli/theme.js.map +1 -1
- package/dist/cli/tunnel.d.ts +2 -0
- package/dist/cli/tunnel.d.ts.map +1 -1
- package/dist/cli/tunnel.js +63 -7
- package/dist/cli/tunnel.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +12 -4
- package/dist/cli/update.js.map +1 -1
- package/dist/config/env.d.ts +3 -1
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +22 -2
- package/dist/config/env.js.map +1 -1
- package/dist/config/models.d.ts +1 -0
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +17 -1
- package/dist/config/models.js.map +1 -1
- package/dist/documents/pdf.d.ts.map +1 -1
- package/dist/documents/pdf.js +282 -22
- package/dist/documents/pdf.js.map +1 -1
- package/dist/documents/slides.d.ts.map +1 -1
- package/dist/documents/slides.js +160 -30
- package/dist/documents/slides.js.map +1 -1
- package/dist/index.js +73 -18
- package/dist/index.js.map +1 -1
- package/dist/memory/history.js +1 -1
- package/dist/observability/doctor.d.ts.map +1 -1
- package/dist/observability/doctor.js +3 -0
- package/dist/observability/doctor.js.map +1 -1
- package/dist/runtime/progress.d.ts +5 -1
- package/dist/runtime/progress.d.ts.map +1 -1
- package/dist/runtime/progress.js.map +1 -1
- package/dist/runtime/swarm.d.ts +1 -1
- package/dist/runtime/swarm.d.ts.map +1 -1
- package/dist/runtime/swarm.js +19 -3
- package/dist/runtime/swarm.js.map +1 -1
- package/dist/runtime/tool-utils.d.ts +2 -0
- package/dist/runtime/tool-utils.d.ts.map +1 -1
- package/dist/runtime/tool-utils.js +91 -0
- package/dist/runtime/tool-utils.js.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +16 -0
- package/dist/skills/loader.js.map +1 -1
- package/dist/test-call.d.ts +2 -0
- package/dist/test-call.d.ts.map +1 -0
- package/dist/test-call.js +29 -0
- package/dist/test-call.js.map +1 -0
- package/dist/test-manager-call.d.ts +2 -0
- package/dist/test-manager-call.d.ts.map +1 -0
- package/dist/test-manager-call.js +138 -0
- package/dist/test-manager-call.js.map +1 -0
- package/dist/test-manager-filtered.d.ts +2 -0
- package/dist/test-manager-filtered.d.ts.map +1 -0
- package/dist/test-manager-filtered.js +130 -0
- package/dist/test-manager-filtered.js.map +1 -0
- package/dist/test-mcp-call.d.ts +2 -0
- package/dist/test-mcp-call.d.ts.map +1 -0
- package/dist/test-mcp-call.js +103 -0
- package/dist/test-mcp-call.js.map +1 -0
- package/dist/tools/composio.tool.d.ts +1 -1
- package/dist/tools/composio.tool.d.ts.map +1 -1
- package/dist/tools/composio.tool.js +7 -16
- package/dist/tools/composio.tool.js.map +1 -1
- package/dist/tools/executive.tool.d.ts +40 -0
- package/dist/tools/executive.tool.d.ts.map +1 -0
- package/dist/tools/executive.tool.js +74 -0
- package/dist/tools/executive.tool.js.map +1 -0
- package/dist/tools/filesystem.tool.d.ts +183 -40
- package/dist/tools/filesystem.tool.d.ts.map +1 -1
- package/dist/tools/filesystem.tool.js +564 -111
- package/dist/tools/filesystem.tool.js.map +1 -1
- package/dist/tools/mcp.tool.d.ts +56 -0
- package/dist/tools/mcp.tool.d.ts.map +1 -0
- package/dist/tools/mcp.tool.js +285 -0
- package/dist/tools/mcp.tool.js.map +1 -0
- package/dist/tools/osint.tool.d.ts +4 -4
- package/dist/tools/pentest.tool.d.ts +2 -2
- package/dist/tools/setup-assistant.tool.d.ts +1 -1
- package/dist/tools/setup-assistant.tool.js +1 -1
- package/dist/tools/setup-assistant.tool.js.map +1 -1
- package/dist/workspace/paths.d.ts +1 -0
- package/dist/workspace/paths.d.ts.map +1 -1
- package/dist/workspace/paths.js +3 -4
- package/dist/workspace/paths.js.map +1 -1
- package/package.json +6 -3
- package/scripts/postinstall.mjs +19 -4
- package/scripts/release-github.mjs +13 -11
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
# Multi-Region Setup
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
QStash supports multi-region deployments across EU (EU_CENTRAL_1) and US (US_EAST_1) regions.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
Multi-region support requires minimum SDK versions:
|
|
10
|
+
|
|
11
|
+
- `@upstash/qstash` >= 2.9.0
|
|
12
|
+
- `@upstash/workflow` >= 1.1.0 (if using workflows)
|
|
13
|
+
|
|
14
|
+
Update your dependencies:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @upstash/qstash@latest
|
|
18
|
+
# or if using workflows
|
|
19
|
+
npm install @upstash/qstash@latest @upstash/workflow@latest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## When to Use Multi-Region
|
|
23
|
+
|
|
24
|
+
Consider multi-region QStash when:
|
|
25
|
+
|
|
26
|
+
- You're migrating from one region to another
|
|
27
|
+
|
|
28
|
+
## Understanding Multi-Region Mode
|
|
29
|
+
|
|
30
|
+
Multi-region mode is activated by setting the `QSTASH_REGION` environment variable to your primary region (`EU_CENTRAL_1` or `US_EAST_1`). When active:
|
|
31
|
+
|
|
32
|
+
- **Outgoing messages** use region-specific credentials
|
|
33
|
+
- **Incoming messages** are verified using region-specific signing keys
|
|
34
|
+
- The SDK automatically handles region detection
|
|
35
|
+
|
|
36
|
+
## Environment Variable Setup
|
|
37
|
+
|
|
38
|
+
### Single-Region Setup (Default)
|
|
39
|
+
|
|
40
|
+
For single-region deployments (EU only):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Outgoing messages
|
|
44
|
+
QSTASH_TOKEN="your_token"
|
|
45
|
+
|
|
46
|
+
# Incoming message verification (optional)
|
|
47
|
+
QSTASH_CURRENT_SIGNING_KEY="your_current_key"
|
|
48
|
+
QSTASH_NEXT_SIGNING_KEY="your_next_key"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Optionally specify a custom URL:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
QSTASH_URL="https://qstash.upstash.io" # EU region (default)
|
|
55
|
+
QSTASH_TOKEN="your_token"
|
|
56
|
+
QSTASH_CURRENT_SIGNING_KEY="your_current_key"
|
|
57
|
+
QSTASH_NEXT_SIGNING_KEY="your_next_key"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Multi-Region Setup
|
|
61
|
+
|
|
62
|
+
For multi-region deployments with US as primary:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Enable multi-region mode with US as primary
|
|
66
|
+
QSTASH_REGION="US_EAST_1"
|
|
67
|
+
|
|
68
|
+
# Outgoing messages - US region (primary)
|
|
69
|
+
US_EAST_1_QSTASH_URL="https://qstash-us-east-1.upstash.io"
|
|
70
|
+
US_EAST_1_QSTASH_TOKEN="your_us_token"
|
|
71
|
+
|
|
72
|
+
# Outgoing messages - EU region (only needed for Upstash Workflow)
|
|
73
|
+
EU_CENTRAL_1_QSTASH_URL="https://qstash.upstash.io"
|
|
74
|
+
EU_CENTRAL_1_QSTASH_TOKEN="your_eu_token"
|
|
75
|
+
|
|
76
|
+
# (Optional) Incoming message verification - US region
|
|
77
|
+
US_EAST_1_QSTASH_CURRENT_SIGNING_KEY="your_us_current_key"
|
|
78
|
+
US_EAST_1_QSTASH_NEXT_SIGNING_KEY="your_us_next_key"
|
|
79
|
+
|
|
80
|
+
# (Optional) Incoming message verification - EU region
|
|
81
|
+
EU_CENTRAL_1_QSTASH_CURRENT_SIGNING_KEY="your_eu_current_key"
|
|
82
|
+
EU_CENTRAL_1_QSTASH_NEXT_SIGNING_KEY="your_eu_next_key"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For multi-region with EU as primary, set `QSTASH_REGION="EU_CENTRAL_1"`.
|
|
86
|
+
|
|
87
|
+
### Getting Region-Specific Credentials
|
|
88
|
+
|
|
89
|
+
Sign in to the [Upstash Console](https://console.upstash.com/qstash) to find:
|
|
90
|
+
|
|
91
|
+
- **US Region**: `https://qstash-us-east-1.upstash.io`
|
|
92
|
+
- **EU Region**: `https://qstash.upstash.io`
|
|
93
|
+
|
|
94
|
+
Each region has its own:
|
|
95
|
+
|
|
96
|
+
- API token for outgoing requests
|
|
97
|
+
- Signing keys for incoming request verification
|
|
98
|
+
|
|
99
|
+
You can get all envrionment variables required for multi region setup using the `Migrate` button in the region list page.
|
|
100
|
+
|
|
101
|
+
## How Outgoing Messages Work
|
|
102
|
+
|
|
103
|
+
### Single-Region Mode
|
|
104
|
+
|
|
105
|
+
When `QSTASH_REGION` is not set:
|
|
106
|
+
|
|
107
|
+
1. SDK reads `QSTASH_URL` and `QSTASH_TOKEN`
|
|
108
|
+
2. If `QSTASH_URL` is not set, defaults to EU region
|
|
109
|
+
3. All messages are published through this region
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import { Client } from "@upstash/qstash";
|
|
113
|
+
|
|
114
|
+
// Uses QSTASH_TOKEN and QSTASH_URL (or EU default)
|
|
115
|
+
const client = new Client({
|
|
116
|
+
token: process.env.QSTASH_TOKEN!,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
await client.publishJSON({
|
|
120
|
+
url: "https://my-api.com/webhook",
|
|
121
|
+
body: { message: "hello" },
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Multi-Region Mode
|
|
126
|
+
|
|
127
|
+
When `QSTASH_REGION` is set to a valid region:
|
|
128
|
+
|
|
129
|
+
1. SDK reads region-specific credentials (e.g., `US_EAST_1_QSTASH_URL`)
|
|
130
|
+
2. All messages are published through the specified primary region
|
|
131
|
+
3. If region-specific credentials are missing, falls back to default credentials with a warning
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { Client } from "@upstash/qstash";
|
|
135
|
+
|
|
136
|
+
// Automatically uses US_EAST_1_QSTASH_TOKEN and US_EAST_1_QSTASH_URL
|
|
137
|
+
// based on QSTASH_REGION="US_EAST_1"
|
|
138
|
+
const client = new Client();
|
|
139
|
+
|
|
140
|
+
await client.publishJSON({
|
|
141
|
+
url: "https://my-api.com/webhook",
|
|
142
|
+
body: { message: "hello" },
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Credential Resolution Priority
|
|
147
|
+
|
|
148
|
+
The SDK resolves credentials in this order:
|
|
149
|
+
|
|
150
|
+
1. **Config overrides**: Explicitly passed `token` and `baseUrl`
|
|
151
|
+
2. **Region-specific**: Based on `QSTASH_REGION` (e.g., `US_EAST_1_QSTASH_TOKEN`)
|
|
152
|
+
3. **Default credentials**: `QSTASH_TOKEN` and `QSTASH_URL`
|
|
153
|
+
4. **Default URL**: `https://qstash.upstash.io` (EU) with token from environment
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
// Override with explicit credentials
|
|
157
|
+
const client = new Client({
|
|
158
|
+
token: "custom_token",
|
|
159
|
+
baseUrl: "https://qstash-us-east-1.upstash.io",
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## How Incoming Messages Work
|
|
164
|
+
|
|
165
|
+
### Understanding the Region Header
|
|
166
|
+
|
|
167
|
+
QStash includes an `upstash-region` header with every request indicating the source region:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
upstash-region: US-EAST-1
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The SDK uses this header to determine which signing keys to use for verification.
|
|
174
|
+
|
|
175
|
+
### Single-Region Verification
|
|
176
|
+
|
|
177
|
+
In single-region mode, the SDK uses default signing keys:
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
import { Receiver } from "@upstash/qstash";
|
|
181
|
+
|
|
182
|
+
const receiver = new Receiver({
|
|
183
|
+
currentSigningKey: process.env.QSTASH_CURRENT_SIGNING_KEY!,
|
|
184
|
+
nextSigningKey: process.env.QSTASH_NEXT_SIGNING_KEY!,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
await receiver.verify({
|
|
188
|
+
signature: request.headers.get("upstash-signature")!,
|
|
189
|
+
body: await request.text(),
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Multi-Region Verification
|
|
194
|
+
|
|
195
|
+
In multi-region mode, the SDK:
|
|
196
|
+
|
|
197
|
+
1. Checks the `upstash-region` header from the request
|
|
198
|
+
2. Normalizes it (converts `US-EAST-1` → `US_EAST_1`)
|
|
199
|
+
3. Looks for region-specific signing keys (e.g., `US_EAST_1_QSTASH_CURRENT_SIGNING_KEY`)
|
|
200
|
+
4. Falls back to default keys if region-specific keys are missing
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
import { Receiver } from "@upstash/qstash";
|
|
204
|
+
|
|
205
|
+
// Auto-detects region from QSTASH_REGION environment
|
|
206
|
+
const receiver = new Receiver();
|
|
207
|
+
|
|
208
|
+
await receiver.verify({
|
|
209
|
+
signature: request.headers.get("upstash-signature")!,
|
|
210
|
+
body: await request.text(),
|
|
211
|
+
upstashRegion: request.headers.get("upstash-region") ?? undefined,
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Signing Key Resolution Priority
|
|
216
|
+
|
|
217
|
+
The SDK resolves signing keys in this order:
|
|
218
|
+
|
|
219
|
+
1. **Config overrides**: Explicitly passed signing keys
|
|
220
|
+
2. **Region-specific**: Based on `upstash-region` header (e.g., `US_EAST_1_QSTASH_CURRENT_SIGNING_KEY`)
|
|
221
|
+
3. **Default keys**: `QSTASH_CURRENT_SIGNING_KEY` and `QSTASH_NEXT_SIGNING_KEY`
|
|
222
|
+
|
|
223
|
+
### Platform-Specific Verification
|
|
224
|
+
|
|
225
|
+
On most platforms, verifiers automatically handle multi-region verification.
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
// Next.js App Router
|
|
229
|
+
import { verifySignatureAppRouter } from "@upstash/qstash/nextjs";
|
|
230
|
+
|
|
231
|
+
export const POST = verifySignatureAppRouter(async (req) => {
|
|
232
|
+
// Automatically handles multi-region verification
|
|
233
|
+
const body = await req.json();
|
|
234
|
+
return Response.json({ success: true });
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
In cloudflare workers, it's not possible right now but it will be supported in the future.
|
|
239
|
+
|
|
240
|
+
## Migration from Single to Multi-Region
|
|
241
|
+
|
|
242
|
+
### Step-by-Step Migration
|
|
243
|
+
|
|
244
|
+
#### Step 1: Add Multi-Region Credentials
|
|
245
|
+
|
|
246
|
+
Keep your existing credentials and add region-specific ones:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Existing (keep these)
|
|
250
|
+
QSTASH_TOKEN="your_eu_token"
|
|
251
|
+
QSTASH_CURRENT_SIGNING_KEY="your_eu_current_key"
|
|
252
|
+
QSTASH_NEXT_SIGNING_KEY="your_eu_next_key"
|
|
253
|
+
|
|
254
|
+
# New multi-region credentials
|
|
255
|
+
QSTASH_REGION="US_EAST_1" # Set your primary region
|
|
256
|
+
|
|
257
|
+
US_EAST_1_QSTASH_URL="https://qstash-us-east-1.upstash.io"
|
|
258
|
+
US_EAST_1_QSTASH_TOKEN="your_us_token"
|
|
259
|
+
US_EAST_1_QSTASH_CURRENT_SIGNING_KEY="your_us_current_key"
|
|
260
|
+
US_EAST_1_QSTASH_NEXT_SIGNING_KEY="your_us_next_key"
|
|
261
|
+
|
|
262
|
+
EU_CENTRAL_1_QSTASH_URL="https://qstash.upstash.io"
|
|
263
|
+
EU_CENTRAL_1_QSTASH_TOKEN="your_eu_token" # Can reuse existing
|
|
264
|
+
EU_CENTRAL_1_QSTASH_CURRENT_SIGNING_KEY="your_eu_current_key"
|
|
265
|
+
EU_CENTRAL_1_QSTASH_NEXT_SIGNING_KEY="your_eu_next_key"
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Step 2: Update Verification Code
|
|
269
|
+
|
|
270
|
+
Add region header to verification calls:
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
// Before (single-region)
|
|
274
|
+
await receiver.verify({
|
|
275
|
+
signature: request.headers.get("upstash-signature")!,
|
|
276
|
+
body: await request.text(),
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// After (multi-region ready)
|
|
280
|
+
await receiver.verify({
|
|
281
|
+
signature: request.headers.get("upstash-signature")!,
|
|
282
|
+
body: await request.text(),
|
|
283
|
+
upstashRegion: request.headers.get("upstash-region") ?? undefined,
|
|
284
|
+
});
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Step 3: Verify Setup
|
|
288
|
+
|
|
289
|
+
Use the verification script to confirm your env variable setup:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
npx tsx skills/advanced/multi-region/verify-multi-region-setup.ts
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Troubleshooting
|
|
296
|
+
|
|
297
|
+
### Common Issues
|
|
298
|
+
|
|
299
|
+
#### "No signing keys available for verification"
|
|
300
|
+
|
|
301
|
+
**Cause**: Neither default nor region-specific signing keys are found.
|
|
302
|
+
|
|
303
|
+
**Solution**: Verify environment variables are set:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Single-region
|
|
307
|
+
echo $QSTASH_CURRENT_SIGNING_KEY
|
|
308
|
+
echo $QSTASH_NEXT_SIGNING_KEY
|
|
309
|
+
|
|
310
|
+
# Multi-region
|
|
311
|
+
echo $QSTASH_REGION
|
|
312
|
+
echo $US_EAST_1_QSTASH_CURRENT_SIGNING_KEY
|
|
313
|
+
echo $US_EAST_1_QSTASH_NEXT_SIGNING_KEY
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Best Practices
|
|
317
|
+
|
|
318
|
+
### Always Pass Region Header
|
|
319
|
+
|
|
320
|
+
When verifying in multi-region mode, always pass the `upstash-region` header:
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
// ✅ Good - region-aware verification
|
|
324
|
+
await receiver.verify({
|
|
325
|
+
signature: request.headers.get("upstash-signature")!,
|
|
326
|
+
body: await request.text(),
|
|
327
|
+
upstashRegion: request.headers.get("upstash-region") ?? undefined,
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// ⚠️ Works but may use wrong keys in multi-region
|
|
331
|
+
await receiver.verify({
|
|
332
|
+
signature: request.headers.get("upstash-signature")!,
|
|
333
|
+
body: await request.text(),
|
|
334
|
+
// Missing upstashRegion - will use default keys
|
|
335
|
+
});
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Test Both Regions
|
|
339
|
+
|
|
340
|
+
When setting up multi-region, test messages from both regions:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# Trigger messages from US region
|
|
344
|
+
curl -X POST https://qstash-us-east-1.upstash.io/v2/publish/... \
|
|
345
|
+
-H "Authorization: Bearer $US_EAST_1_QSTASH_TOKEN"
|
|
346
|
+
|
|
347
|
+
# Trigger messages from EU region
|
|
348
|
+
curl -X POST https://qstash.upstash.io/v2/publish/... \
|
|
349
|
+
-H "Authorization: Bearer $EU_CENTRAL_1_QSTASH_TOKEN"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Gradual Migration
|
|
353
|
+
|
|
354
|
+
Migrate gradually to minimize risk:
|
|
355
|
+
|
|
356
|
+
1. Add multi-region credentials alongside existing ones
|
|
357
|
+
2. Update verification code to handle region header
|
|
358
|
+
3. Test in staging environment
|
|
359
|
+
4. Activate multi-region mode in production
|
|
360
|
+
5. Monitor for warnings and errors
|
|
361
|
+
|
|
362
|
+
## Verification Script
|
|
363
|
+
|
|
364
|
+
Use the provided script to verify your environment setup:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
# Option 1: Using bun (automatically loads .env)
|
|
368
|
+
bun run skills/advanced/multi-region/verify-multi-region-setup.ts
|
|
369
|
+
|
|
370
|
+
# Option 2: Using tsx with dotenv
|
|
371
|
+
npm install dotenv
|
|
372
|
+
npx tsx -r dotenv/config skills/advanced/multi-region/verify-multi-region-setup.ts
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
The script checks:
|
|
376
|
+
|
|
377
|
+
- Whether setup is single-region or multi-region
|
|
378
|
+
- Which region will be used for outgoing messages
|
|
379
|
+
- Whether all required environment variables are present
|
|
380
|
+
- If there are any configuration issues
|
|
381
|
+
|
|
382
|
+
See [multi-region/verify-multi-region-setup.ts](multi-region/verify-multi-region-setup.ts) for implementation details.
|
|
383
|
+
|
|
384
|
+
## Related Documentation
|
|
385
|
+
|
|
386
|
+
- [Receiver Verification](../verification/receiver.md) - Basic signature verification
|
|
387
|
+
- [Client Setup](../fundamentals/client-setup.md) - Client initialization
|
|
388
|
+
- [Platform-Specific Verification](../verification/platform-specific/) - Framework-specific guides
|