fix(ai-sandbox-railway): a project token is enough; require railway 3.17 #2278
Merged
codyde(GitHub profile, opens in a new tab)merged 4 commits into
main fromrefs/pull/2278/head·merged by AlemTuzlak View on GitHubShowing 15 changed files with 9 additions and 5 deletions (loading 11).
x
@@ -0,0 +1,5 @@
+---
+'@tanstack/ai-sandbox-railway': patch
+---
+
+Require `railway` 3.17 or newer, which looks up the environment from a project token. With `RAILWAY_TOKEN` set to a project token, `environmentId` and `RAILWAY_ENVIRONMENT_ID` are no longer needed. An account or workspace token (`RAILWAY_API_TOKEN`) still needs one of them.
@@ -322,7 +322,6 @@
- environmentId: process.env.RAILWAY_ENVIRONMENT_ID,
@@ -333,7 +332,7 @@
-- **Auth:** the SDK reads `RAILWAY_TOKEN` (a project token) or `RAILWAY_API_TOKEN` (an account or workspace token). An explicit `token` uses bearer auth by default. Pass `authType: 'project-token'` for a project token. The scope is the environment (`environmentId` or `RAILWAY_ENVIRONMENT_ID`), fixed for each provider.
+- **Auth:** the SDK reads `RAILWAY_TOKEN` (a project token) or `RAILWAY_API_TOKEN` (an account or workspace token). An explicit `token` uses bearer auth by default. Pass `authType: 'project-token'` for a project token. The scope is the environment, fixed for each provider. A project token is scoped to one environment, which the SDK looks up, so `RAILWAY_TOKEN` alone is enough. An account or workspace token needs `environmentId` or `RAILWAY_ENVIRONMENT_ID`.
@@ -412,7 +411,7 @@
| E2B | `true` | **Measured.** The SDK kill is a SIGKILL to the shell pid, and a background `( ... ) & wait` child survived it. So every command runs as a `setsid` group leader, and `kill()` runs `kill -KILL -- -<pid>` inside the sandbox. The shared journal conformance kill case passes against a real sandbox. Needs `E2B_API_KEY`. |