Commit 6ad6bf6
fix(runtime): accept integer ai_access (Turso) in the AI-seat synthesis (#2336)
sys_user.ai_access reads back as integer 1 on Turso/libSQL (sqlite booleans),
but the seat synthesis checked `=== true` (boolean) — so `1 !== true` and a
SEATED user got no `ai_seat` -> /ai/agents=[] under enforce. The memory driver
returns a JS boolean, which masked it in local testing. Caught on a real
Turso-backed staging env (the env creator was seated yet denied).
Accept `true | 1 | '1'` in both synthesis points: resolveExecutionContext (the
gate) and plugin-hono-server data-route resolveCtx.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent e24ee8b commit 6ad6bf6
2 files changed
Lines changed: 8 additions & 2 deletions
File tree
- packages
- plugins/plugin-hono-server/src
- runtime/src/security
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
418 | 422 | | |
419 | 423 | | |
420 | 424 | | |
| |||
0 commit comments