zilmate 1.8.0 → 1.8.5
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 +262 -27
- 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/update.d.ts.map +1 -1
- package/dist/cli/update.js +27 -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/daytona-browser.tool.js +1 -1
- package/dist/tools/daytona-browser.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 +8 -4
- package/scripts/postinstall.mjs +19 -4
- package/scripts/release-github.mjs +11 -11
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
The Upstash CLI (`upstash`) manages Upstash services via the Upstash Developer API. All commands are non-interactive and emit JSON on stdout. Errors go to stderr as `{ "error": "..." }` with exit code `1`.
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i -g @upstash/cli
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Authentication
|
|
10
|
+
|
|
11
|
+
Recommended: run `upstash login` once per machine. Prompts for email and a Developer API key (create one at https://console.upstash.com/account/api), verifies them, and saves to `~/.config/upstash/config.json`.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
upstash login
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Alternatives — env vars (also auto-loaded from a `.env` in cwd), or `--email` / `--api-key` inline, or `--env-path <path>` to point at a specific `.env`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
export UPSTASH_EMAIL=you@example.com
|
|
21
|
+
export UPSTASH_API_KEY=your_api_key
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Precedence: flags > env vars > `.env` > saved config. Prefer a **read-only** API key for agents when possible — mutations fail at the API, the same way they would in the console.
|
|
25
|
+
|
|
26
|
+
## Resource ID flags
|
|
27
|
+
|
|
28
|
+
| Flag | Products |
|
|
29
|
+
|------|----------|
|
|
30
|
+
| `--db-id <id>` | Redis |
|
|
31
|
+
| `--index-id <id>` | Vector, Search |
|
|
32
|
+
| `--qstash-id <id>` | QStash |
|
|
33
|
+
| `--team-id <id>` | Team |
|
|
34
|
+
|
|
35
|
+
## Redis
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
upstash redis list
|
|
39
|
+
upstash redis get --db-id <id> [--hide-credentials]
|
|
40
|
+
upstash redis create --name <name> --region <region> [--read-regions <r1> <r2>]
|
|
41
|
+
upstash redis delete --db-id <id> [--dry-run]
|
|
42
|
+
upstash redis rename --db-id <id> --name <new-name>
|
|
43
|
+
upstash redis reset-password --db-id <id>
|
|
44
|
+
upstash redis stats --db-id <id>
|
|
45
|
+
|
|
46
|
+
upstash redis enable-tls --db-id <id>
|
|
47
|
+
upstash redis {enable,disable}-eviction --db-id <id>
|
|
48
|
+
upstash redis {enable,disable}-autoupgrade --db-id <id>
|
|
49
|
+
upstash redis change-plan --db-id <id> --plan <free|payg|pro|paid>
|
|
50
|
+
upstash redis update-budget --db-id <id> --budget <cents>
|
|
51
|
+
upstash redis update-regions --db-id <id> --read-regions <r1> <r2>
|
|
52
|
+
upstash redis move-to-team --db-id <id> --team-id <id>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Regions — AWS: `us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`, `ca-central-1`, `eu-central-1`, `eu-west-1`, `eu-west-2`, `sa-east-1`, `ap-south-1`, `ap-northeast-1`, `ap-southeast-1`, `ap-southeast-2`, `af-south-1`. GCP: `us-central1`, `us-east4`, `europe-west1`, `asia-northeast1`.
|
|
56
|
+
|
|
57
|
+
### Redis backups
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
upstash redis backup list --db-id <id>
|
|
61
|
+
upstash redis backup create --db-id <id> --name <name>
|
|
62
|
+
upstash redis backup delete --db-id <id> --backup-id <id> [--dry-run]
|
|
63
|
+
upstash redis backup restore --db-id <id> --backup-id <id>
|
|
64
|
+
upstash redis backup {enable,disable}-daily --db-id <id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Redis exec (REST, not the Developer API key)
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
upstash redis exec --db-url <url> --db-token <token> SET key value
|
|
71
|
+
upstash redis exec --db-url <url> --db-token <token> --json '["SET","key","value"]'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`--db-url` / `--db-token` fall back to `UPSTASH_REDIS_REST_URL` / `UPSTASH_REDIS_REST_TOKEN`. Get both from `endpoint` and `rest_token` in `upstash redis get --db-id <id>`.
|
|
75
|
+
|
|
76
|
+
## Team
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
upstash team list
|
|
80
|
+
upstash team create --name <name> [--copy-cc]
|
|
81
|
+
upstash team delete --team-id <id> [--dry-run]
|
|
82
|
+
upstash team members --team-id <id>
|
|
83
|
+
upstash team add-member --team-id <id> --member-email <email> --role <admin|dev|finance>
|
|
84
|
+
upstash team remove-member --team-id <id> --member-email <email> [--dry-run]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Vector
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
upstash vector list
|
|
91
|
+
upstash vector get --index-id <id>
|
|
92
|
+
upstash vector create --name <name> --region <region> --similarity-function <fn> --dimension-count <n> [--type payg] [--index-type <type>] [--embedding-model <m>] [--sparse-embedding-model <m>]
|
|
93
|
+
upstash vector delete --index-id <id> [--dry-run]
|
|
94
|
+
upstash vector rename --index-id <id> --name <new-name>
|
|
95
|
+
upstash vector reset-password --index-id <id>
|
|
96
|
+
upstash vector set-plan --index-id <id> --plan <free|payg|fixed>
|
|
97
|
+
upstash vector transfer --index-id <id> --target-account <id>
|
|
98
|
+
upstash vector stats # aggregate across all indexes
|
|
99
|
+
upstash vector index-stats --index-id <id> [--period <1h|3h|12h|1d|3d|7d|30d>]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Regions: `eu-west-1`, `us-east-1`, `us-central1`. Similarity: `COSINE`, `EUCLIDEAN`, `DOT_PRODUCT`. Index types: `DENSE`, `SPARSE`, `HYBRID`. Dense models: `BGE_SMALL_EN_V1_5`, `BGE_BASE_EN_V1_5`, `BGE_LARGE_EN_V1_5`, `BGE_M3`. Sparse models: `BM25`, `BGE_M3`. For `HYBRID` with managed embeddings, set `--dimension-count 0`.
|
|
103
|
+
|
|
104
|
+
## Search
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
upstash search list
|
|
108
|
+
upstash search get --index-id <id>
|
|
109
|
+
upstash search create --name <name> --region <region> --type <free|payg|fixed>
|
|
110
|
+
upstash search delete --index-id <id> [--dry-run]
|
|
111
|
+
upstash search rename --index-id <id> --name <new-name>
|
|
112
|
+
upstash search reset-password --index-id <id>
|
|
113
|
+
upstash search transfer --index-id <id> --target-account <id>
|
|
114
|
+
upstash search stats
|
|
115
|
+
upstash search index-stats --index-id <id> [--period <1h|3h|12h|1d|3d|7d|30d>]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Regions: `eu-west-1`, `us-central1`.
|
|
119
|
+
|
|
120
|
+
## QStash
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
upstash qstash list # run first; maps region → id
|
|
124
|
+
upstash qstash get --qstash-id <id>
|
|
125
|
+
upstash qstash rotate-token --qstash-id <id>
|
|
126
|
+
upstash qstash set-plan --qstash-id <id> --plan <paid|qstash_fixed_1m|qstash_fixed_10m|qstash_fixed_100m>
|
|
127
|
+
upstash qstash stats --qstash-id <id> [--period <1h|3h|12h|1d|3d|7d|30d>]
|
|
128
|
+
upstash qstash ipv4 # CIDR blocks for allowlisting
|
|
129
|
+
upstash qstash move-to-team --qstash-id <id> --target-team-id <id>
|
|
130
|
+
upstash qstash update-budget --qstash-id <id> --budget <dollars> # 0 = no limit
|
|
131
|
+
upstash qstash {enable,disable}-prodpack --qstash-id <id>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Conventions
|
|
135
|
+
|
|
136
|
+
- Pipe any output to `jq` for field extraction, e.g. `upstash redis list | jq '.[].database_id'`.
|
|
137
|
+
- Use `--dry-run` first on any `delete` or `remove-member`.
|
|
138
|
+
- Use `--hide-credentials` on `redis get` when the password isn't needed.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Callbacks
|
|
2
|
+
|
|
3
|
+
Callbacks let you receive delivery results without waiting for the HTTP request to complete. QStash calls your callback URL with the response after delivering the message.
|
|
4
|
+
|
|
5
|
+
## Why Use Callbacks?
|
|
6
|
+
|
|
7
|
+
Serverless functions have execution time limits. Callbacks allow you to:
|
|
8
|
+
|
|
9
|
+
- Publish long-running tasks without blocking
|
|
10
|
+
- Receive delivery confirmation asynchronously
|
|
11
|
+
- Handle failures separately with failure callbacks
|
|
12
|
+
|
|
13
|
+
You can use callbacks individually or together:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
await client.publishJSON({
|
|
17
|
+
url: "https://api.example.com/webhook",
|
|
18
|
+
body: { order: "12345" },
|
|
19
|
+
callback: "https://api.example.com/callback",
|
|
20
|
+
failureCallback: "https://api.example.com/failure",
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## callback
|
|
25
|
+
|
|
26
|
+
Called after each delivery attempt (success or failure):
|
|
27
|
+
|
|
28
|
+
The callback is invoked after every retry attempt until the destination returns a 2XX status or retries are exhausted. Check `retried === maxRetries` in the callback body to detect final failure.
|
|
29
|
+
|
|
30
|
+
## failureCallback
|
|
31
|
+
|
|
32
|
+
Called only when all retries are exhausted:
|
|
33
|
+
|
|
34
|
+
Use this as a serverless alternative to polling the DLQ. See [DLQ](dlq.md) for more options.
|
|
35
|
+
|
|
36
|
+
## Callback Payload
|
|
37
|
+
|
|
38
|
+
### Success Callback Body
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"status": 200,
|
|
43
|
+
"header": { "content-type": ["application/json"] },
|
|
44
|
+
"body": "YmFzZTY0IGVuY29kZWQgcm9keQ==",
|
|
45
|
+
"retried": 2,
|
|
46
|
+
"maxRetries": 3,
|
|
47
|
+
"sourceMessageId": "msg_xxx",
|
|
48
|
+
"topicName": "myTopic",
|
|
49
|
+
"endpointName": "myEndpoint",
|
|
50
|
+
"url": "https://api.example.com/webhook",
|
|
51
|
+
"method": "POST",
|
|
52
|
+
"sourceHeader": { "content-type": "application/json" },
|
|
53
|
+
"sourceBody": "YmFzZTY0IGVuY29kZWQgcm9keQ==",
|
|
54
|
+
"notBefore": 1701198458025,
|
|
55
|
+
"createdAt": 1701198447054,
|
|
56
|
+
"scheduleId": "scd_xxx",
|
|
57
|
+
"callerIP": "178.247.74.179"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Failure Callback Body
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"status": 500,
|
|
66
|
+
"header": { "content-type": ["text/plain"] },
|
|
67
|
+
"body": "RXJyb3IgbWVzc2FnZQ==",
|
|
68
|
+
"retried": 3,
|
|
69
|
+
"maxRetries": 3,
|
|
70
|
+
"dlqId": "1725323658779-0",
|
|
71
|
+
"sourceMessageId": "msg_xxx",
|
|
72
|
+
"topicName": "myTopic",
|
|
73
|
+
"endpointName": "myEndpoint",
|
|
74
|
+
"url": "https://api.example.com/webhook",
|
|
75
|
+
"method": "POST",
|
|
76
|
+
"sourceHeader": { "content-type": "application/json" },
|
|
77
|
+
"sourceBody": "YmFzZTY0IGVuY29kZWQgcm9keQ==",
|
|
78
|
+
"notBefore": 1701198458025,
|
|
79
|
+
"createdAt": 1701198447054,
|
|
80
|
+
"scheduleId": "scd_xxx",
|
|
81
|
+
"callerIP": "178.247.74.179"
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Field Descriptions
|
|
86
|
+
|
|
87
|
+
- `status` - HTTP status code from destination
|
|
88
|
+
- `header` - Response headers from destination
|
|
89
|
+
- `body` - Base64-encoded response body (may be truncated per plan limits)
|
|
90
|
+
- `retried` - Number of retry attempts made
|
|
91
|
+
- `maxRetries` - Maximum retry limit
|
|
92
|
+
- `dlqId` - Dead Letter Queue ID (failure callbacks only)
|
|
93
|
+
- `sourceMessageId` - Original message ID
|
|
94
|
+
- `topicName` - URL group name (if applicable)
|
|
95
|
+
- `endpointName` - Endpoint name within URL group (if applicable)
|
|
96
|
+
- `url` - Destination URL
|
|
97
|
+
- `method` - HTTP method used
|
|
98
|
+
- `sourceHeader` - Original message headers
|
|
99
|
+
- `sourceBody` - Base64-encoded original message body
|
|
100
|
+
- `notBefore` - Scheduled delivery time (Unix ms)
|
|
101
|
+
- `createdAt` - Message creation time (Unix ms)
|
|
102
|
+
- `scheduleId` - Schedule ID (if from schedule)
|
|
103
|
+
- `callerIP` - IP address that published the message
|
|
104
|
+
|
|
105
|
+
## Callback Configuration
|
|
106
|
+
|
|
107
|
+
Callbacks are themselves QStash messages and can be configured with the same options. Use the `Upstash-Callback-*` or `Upstash-Failure-Callback-*` header prefix:
|
|
108
|
+
|
|
109
|
+
**Not available via SDK parameters** - requires custom headers:
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
await client.publish({
|
|
113
|
+
url: "https://api.example.com/webhook",
|
|
114
|
+
body: "data",
|
|
115
|
+
callback: "https://api.example.com/callback",
|
|
116
|
+
headers: {
|
|
117
|
+
// Configure callback behavior
|
|
118
|
+
"Upstash-Callback-Retries": "3",
|
|
119
|
+
"Upstash-Callback-Timeout": "30",
|
|
120
|
+
"Upstash-Callback-Method": "PUT",
|
|
121
|
+
"Upstash-Callback-Delay": "60",
|
|
122
|
+
|
|
123
|
+
// Forward custom headers to callback
|
|
124
|
+
"Upstash-Callback-Forward-Authorization": "Bearer token",
|
|
125
|
+
"Upstash-Callback-Forward-X-Custom": "value",
|
|
126
|
+
|
|
127
|
+
// Configure failure callback
|
|
128
|
+
"Upstash-Failure-Callback-Retries": "5",
|
|
129
|
+
"Upstash-Failure-Callback-Forward-Authorization": "Bearer token",
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Available configuration headers:
|
|
135
|
+
|
|
136
|
+
- `Upstash-Callback-Retries` / `Upstash-Failure-Callback-Retries`
|
|
137
|
+
- `Upstash-Callback-Timeout` / `Upstash-Failure-Callback-Timeout`
|
|
138
|
+
- `Upstash-Callback-Delay` / `Upstash-Failure-Callback-Delay`
|
|
139
|
+
- `Upstash-Callback-Method` / `Upstash-Failure-Callback-Method`
|
|
140
|
+
- `Upstash-Callback-Forward-*` / `Upstash-Failure-Callback-Forward-*`
|
|
141
|
+
|
|
142
|
+
## Notes
|
|
143
|
+
|
|
144
|
+
- Callbacks are charged as regular messages
|
|
145
|
+
- Callbacks retry until the callback URL returns 2XX or retries are exhausted
|
|
146
|
+
- Response body may be truncated if it exceeds your plan's message size limit
|
|
147
|
+
- Both URLs must be publicly accessible
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Message Deduplication
|
|
2
|
+
|
|
3
|
+
Prevent duplicate message delivery within a 90-day window using deduplication IDs.
|
|
4
|
+
|
|
5
|
+
## Why Deduplication?
|
|
6
|
+
|
|
7
|
+
Duplicate messages can occur when:
|
|
8
|
+
|
|
9
|
+
- User retries a failed request
|
|
10
|
+
- Network issues cause message resubmission
|
|
11
|
+
- Application logic triggers multiple publishes for the same event
|
|
12
|
+
|
|
13
|
+
Deduplication ensures QStash accepts but doesn't enqueue duplicate messages.
|
|
14
|
+
|
|
15
|
+
## Deduplication Methods
|
|
16
|
+
|
|
17
|
+
### deduplicationId
|
|
18
|
+
|
|
19
|
+
Provide a custom identifier to detect duplicates:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { Client } from "@upstash/qstash";
|
|
23
|
+
|
|
24
|
+
const client = new Client({ token: process.env.QSTASH_TOKEN! });
|
|
25
|
+
|
|
26
|
+
await client.publishJSON({
|
|
27
|
+
url: "https://api.example.com/webhook",
|
|
28
|
+
deduplicationId: `order-${orderId}-payment`,
|
|
29
|
+
body: { orderId, status: "paid" },
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If a message with the same `deduplicationId` was published in the last 90 days, the new message is accepted but not enqueued.
|
|
34
|
+
|
|
35
|
+
**Use cases:**
|
|
36
|
+
|
|
37
|
+
- Order processing: `order-${orderId}`
|
|
38
|
+
- User events: `user-${userId}-signup`
|
|
39
|
+
- Payment transactions: `payment-${transactionId}`
|
|
40
|
+
|
|
41
|
+
### contentBasedDeduplication
|
|
42
|
+
|
|
43
|
+
Automatically generate a deduplication ID from message content:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
await client.publishJSON({
|
|
47
|
+
url: "https://api.example.com/webhook",
|
|
48
|
+
contentBasedDeduplication: true,
|
|
49
|
+
body: { userId: "123", event: "signup" },
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The hash includes:
|
|
54
|
+
|
|
55
|
+
- All headers (except authorization)
|
|
56
|
+
- Request body
|
|
57
|
+
- Destination URL
|
|
58
|
+
|
|
59
|
+
## Deduplication Window
|
|
60
|
+
|
|
61
|
+
Deduplication IDs are stored for **90 days**. After this period, a message with the same ID can be delivered again.
|
|
62
|
+
|
|
63
|
+
## Response Handling
|
|
64
|
+
|
|
65
|
+
When a duplicate is detected, the response includes the original message ID:
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
const result = await client.publishJSON({
|
|
69
|
+
url: "https://api.example.com/webhook",
|
|
70
|
+
deduplicationId: "order-123",
|
|
71
|
+
body: { order: "data" },
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (result.deduplicated) {
|
|
75
|
+
console.log("Duplicate detected");
|
|
76
|
+
console.log("Original message ID:", result.messageId);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Best Practices
|
|
81
|
+
|
|
82
|
+
- Use descriptive, deterministic deduplication IDs
|
|
83
|
+
- Include relevant context in custom IDs: `${entity}-${id}-${action}`
|
|
84
|
+
- Don't rely on deduplication for critical data consistency
|
|
85
|
+
- Monitor deduplicated messages in logs to detect issues
|
|
86
|
+
- Document your deduplication strategy for team reference
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Dead Letter Queue (DLQ)
|
|
2
|
+
|
|
3
|
+
Messages that fail after all retries are moved to the Dead Letter Queue for manual inspection and recovery.
|
|
4
|
+
|
|
5
|
+
## What is the DLQ?
|
|
6
|
+
|
|
7
|
+
When a message fails delivery after exhausting all retries, QStash moves it to the DLQ instead of discarding it. This lets you:
|
|
8
|
+
|
|
9
|
+
- Investigate failure reasons
|
|
10
|
+
- Manually retry after fixing issues
|
|
11
|
+
- Delete permanently failed messages
|
|
12
|
+
- Track patterns in failures
|
|
13
|
+
|
|
14
|
+
Common failure reasons:
|
|
15
|
+
|
|
16
|
+
- Destination endpoint errors (5XX responses)
|
|
17
|
+
- Timeouts
|
|
18
|
+
- Network issues
|
|
19
|
+
- Invalid responses from destination
|
|
20
|
+
|
|
21
|
+
## Listing DLQ Messages
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { Client } from "@upstash/qstash";
|
|
25
|
+
|
|
26
|
+
const client = new Client({ token: process.env.QSTASH_TOKEN! });
|
|
27
|
+
|
|
28
|
+
const result = await client.dlq.listMessages();
|
|
29
|
+
|
|
30
|
+
console.log(`Found ${result.messages.length} failed messages`);
|
|
31
|
+
|
|
32
|
+
result.messages.forEach((msg) => {
|
|
33
|
+
console.log(`Message ${msg.messageId} to ${msg.url}`);
|
|
34
|
+
console.log(`Status: ${msg.responseStatus}`);
|
|
35
|
+
console.log(`DLQ ID: ${msg.dlqId}`);
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Pagination
|
|
40
|
+
|
|
41
|
+
Use cursor-based pagination for large DLQ:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
let cursor: string | undefined;
|
|
45
|
+
const allMessages = [];
|
|
46
|
+
|
|
47
|
+
do {
|
|
48
|
+
const result = await client.dlq.listMessages({
|
|
49
|
+
cursor,
|
|
50
|
+
count: 50, // Return up to 50 messages
|
|
51
|
+
});
|
|
52
|
+
allMessages.push(...result.messages);
|
|
53
|
+
cursor = result.cursor;
|
|
54
|
+
} while (cursor);
|
|
55
|
+
|
|
56
|
+
console.log(`Total failed messages: ${allMessages.length}`);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Filtering DLQ Messages
|
|
60
|
+
|
|
61
|
+
Filter by various criteria:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const result = await client.dlq.listMessages({
|
|
65
|
+
filter: {
|
|
66
|
+
messageId: "msg_123...",
|
|
67
|
+
url: "https://api.example.com/webhook",
|
|
68
|
+
urlGroup: "payment-webhooks",
|
|
69
|
+
queueName: "order-processing",
|
|
70
|
+
scheduleId: "scd_123...",
|
|
71
|
+
label: "payment-processing",
|
|
72
|
+
responseStatus: 500,
|
|
73
|
+
fromDate: oneDayAgo,
|
|
74
|
+
toDate: Date.now(),
|
|
75
|
+
callerIp: "192.168.1.1",
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Message Details
|
|
81
|
+
|
|
82
|
+
Each DLQ message includes:
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
type DlqMessage = {
|
|
86
|
+
dlqId: string; // Unique DLQ identifier
|
|
87
|
+
messageId: string; // Original message ID
|
|
88
|
+
url: string; // Destination URL
|
|
89
|
+
method?: string; // HTTP method
|
|
90
|
+
header?: Record<string, string[]>; // Request headers
|
|
91
|
+
body?: string; // Request body
|
|
92
|
+
urlGroup?: string; // URL group name
|
|
93
|
+
queueName?: string; // Queue name
|
|
94
|
+
scheduleId?: string; // Schedule ID
|
|
95
|
+
createdAt: number; // Creation timestamp (ms)
|
|
96
|
+
notBefore?: number; // Scheduled delivery time (ms)
|
|
97
|
+
label?: string; // Message label
|
|
98
|
+
|
|
99
|
+
// Failure details
|
|
100
|
+
responseStatus?: number; // HTTP status from destination
|
|
101
|
+
responseHeader?: Record<string, string[]>; // Response headers
|
|
102
|
+
responseBody?: string; // Response body (UTF-8)
|
|
103
|
+
responseBodyBase64?: string; // Response body (base64 if non-UTF-8)
|
|
104
|
+
};
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Deleting Messages
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
await client.dlq.delete("1725323658779-0");
|
|
111
|
+
await client.dlq.deleteMany({
|
|
112
|
+
dlqIds: ["1725323658779-0", "1725323658780-1", "1725323658781-2"],
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Understanding Failures
|
|
117
|
+
|
|
118
|
+
Inspect failure details:
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
const result = await client.dlq.listMessages();
|
|
122
|
+
|
|
123
|
+
for (const msg of result.messages) {
|
|
124
|
+
console.log(`\nMessage ${msg.messageId}:`);
|
|
125
|
+
console.log(`URL: ${msg.url}`);
|
|
126
|
+
console.log(`Status: ${msg.responseStatus}`);
|
|
127
|
+
|
|
128
|
+
if (msg.responseBody) {
|
|
129
|
+
console.log(`Response: ${msg.responseBody}`);
|
|
130
|
+
} else if (msg.responseBodyBase64) {
|
|
131
|
+
const decoded = Buffer.from(msg.responseBodyBase64, "base64").toString();
|
|
132
|
+
console.log(`Response: ${decoded}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (msg.responseHeader) {
|
|
136
|
+
console.log(`Headers:`, msg.responseHeader);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Using Failure Callbacks
|
|
142
|
+
|
|
143
|
+
Instead of polling the DLQ, use failure callbacks for real-time notifications:
|
|
144
|
+
|
|
145
|
+
See [Callbacks](callbacks.md) for more details.
|
|
146
|
+
|
|
147
|
+
## DLQ Retention
|
|
148
|
+
|
|
149
|
+
Messages remain in the DLQ based on your plan:
|
|
150
|
+
|
|
151
|
+
- **Free**: 7 days
|
|
152
|
+
- **Paid**: Check your plan on [QStash Pricing](https://upstash.com/pricing/qstash)
|
|
153
|
+
|
|
154
|
+
Messages are automatically deleted when retention expires.
|
|
155
|
+
|
|
156
|
+
## Best Practices
|
|
157
|
+
|
|
158
|
+
- Set up failure callbacks for critical messages
|
|
159
|
+
- Regularly monitor DLQ for patterns
|
|
160
|
+
- Delete non-retriable messages to keep DLQ clean
|
|
161
|
+
- Use labels to categorize and filter failures
|
|
162
|
+
- Alert on DLQ message count thresholds
|
|
163
|
+
- Document common failure scenarios and resolutions
|
|
164
|
+
- Consider automated retries for known transient issues
|