Commit d968da9
feat(sdk): ttl for session-triggered runs; expire undequeued dashboard-agent turns (#4800)
Supersedes #4799 (closed by mistake). Chat-server sessions can now set a
ttl on the runs they trigger, and the dashboard agent uses it: turn runs
that no worker dequeues expire after 2 minutes instead of lingering
PENDING (where they could later be picked up with an expired user-actor
token).
- @trigger.dev/core: optional `ttl` on `SessionTriggerConfig` (same
typing as task trigger options).
- @trigger.dev/sdk: both session trigger-config consumers forward it;
absent = unchanged behavior.
- webapp: `sessionRunManager` passes it through; only the
dashboard-agent path sets it (2m). Expiry is safe for live turns — ttl
only affects PENDING, unlocked runs.
---------
Co-authored-by: Daniel Sutton <45313566+d-cs@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Co-authored-by: Yann SEGET <yann.seget@actemium.ch>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Saadi Myftija <saadi@myftija.com>
Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Oskar Otwinowski <oskar.otwinowski@gmail.com>
Co-authored-by: DKP <8297864+D-K-P@users.noreply.github.com>
Co-authored-by: wei-wei <weiweiwuster714@gmail.com>
Co-authored-by: Devin AI <devin-ai-integration[bot]@users.noreply.github.com>1 parent 235cfc3 commit d968da9
241 files changed
Lines changed: 29239 additions & 2138 deletions
File tree
- .changeset
- .github/workflows
- .server-changes
- apps/webapp
- app
- components
- admin
- integrations
- runs/v3
- hooks
- models
- presenters/v3
- routes
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.agents.$agentParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.$fingerprint
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs._index
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.integrations
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.tasks.scheduled.$taskParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.tasks.standard.$taskParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.webhooks.$webhookParam
- runEngine/concerns
- services
- clickhouse
- realtime
- routeBuilders
- runsRepository
- v3
- runOpsMigration
- services
- billingLimit
- bulk
- vercel
- test
- v3/runOpsMigration
- docker/scripts
- docs/self-hosting/env
- hosting/docker
- clickhouse
- webapp
- internal-packages
- clickhouse/src
- client
- database/prisma
- migrations
- 20260722155558_add_worker_deployment_build_env_vars
- 20260825120000_add_worker_deployment_cli_version
- redis/src
- run-engine
- src
- engine
- bench
- systems
- tests
- helpers
- waitpointCoordinator
- run-store/src
- testFixtures
- testcontainers/src
- packages
- cli-v3/src
- commands
- deploy
- core/src/v3
- isomorphic
- schemas
- trigger-sdk
- src/v3
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments