Repository navigation
Commit 5a1c142
feat(sdk): prefer short-lived run tokens with credential compatibility
Prefer short-lived run tokens for supported SDK operations inside tasks,
while preserving explicit credential precedence and environment-key
compatibility where needed.
- Resolve implicit credentials per request, HTTP retry, page and
streaming connection. Missing, malformed, expired or older narrow-scope
run tokens select compatibility credentials before the request.
Authentication failures never retry with a more privileged key.
- Use run tokens for environment/default queries. Project and
organization queries select compatibility credentials before sending the
request.
- Keep same-branch PREVIEW and DEVELOPMENT requests on run tokens.
Requests targeting another branch select compatibility credentials.
DEVELOPMENT's `default` sentinel targets the root dev environment.
STAGING and PRODUCTION ignore branch targeting for credential selection,
matching server authentication.
- Mint scoped public tokens server-side when using run tokens. Server
minting keeps its 30-day maximum, and longer requests fail rather than
falling back to root-key signing. Root-key local signing, including
scope-less tokens, is unchanged and can still sign longer lifetimes.
- AgentChat resolves implicit credentials for every connection,
including network reconnects and EOF resubscriptions, and for input
appends. Explicit credentials remain explicit.
- Send bounded SDK credential-selection metadata through request headers
only for implicit in-task selection. The server records internal
authentication telemetry; the SDK does not emit rollout counters through
customer OpenTelemetry providers. Explicit credentials and calls outside
tasks do not emit selection headers.
Mono-RevId: cb4c2727cf43e082dc58929b5e4fa10e1d565b751 parent 67e834a commit 5a1c142
20 files changed
Lines changed: 2103 additions & 317 deletions
File tree
- .changeset
- packages
- core/src/v3
- apiClientManager
- apiClient
- realtimeStreams
- trigger-sdk/src/v3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
254 | 260 | | |
255 | 261 | | |
256 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
257 | 277 | | |
258 | | - | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
0 commit comments