sandbox-agent/foundry/packages/backend
Nathan Flurry 99c5b3eb5d Fix Foundry auth: migrate to Better Auth adapter, fix access token retrieval
- Remove @ts-nocheck from better-auth.ts, auth-user/index.ts, app-shell.ts
  and fix all type errors
- Fix getAccessTokenForSession: read GitHub token directly from account
  record instead of calling Better Auth's internal /get-access-token
  endpoint which returns 403 on server-side calls
- Re-implement workspaceAuth helper functions (workspaceAuthColumn,
  normalizeAuthValue, workspaceAuthClause, workspaceAuthWhere) that were
  accidentally deleted
- Remove all retry logic (withRetries, isRetryableAppActorError)
- Implement CORS origin allowlist from configured environment
- Document cachedAppWorkspace singleton pattern
- Add inline org sync fallback in buildAppSnapshot for post-OAuth flow
- Add no-retry rule to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:27:56 -07:00
..
src Fix Foundry auth: migrate to Better Auth adapter, fix access token retrieval 2026-03-13 14:27:56 -07:00
test Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00
CLAUDE.md Refactor Foundry GitHub state and sandbox runtime (#247) 2026-03-13 02:45:07 -07:00
package.json Fix Foundry auth: migrate to Better Auth adapter, fix access token retrieval 2026-03-13 14:27:56 -07:00
tsconfig.json Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00
vitest.config.ts Rename Foundry handoffs to tasks (#239) 2026-03-11 13:23:54 -07:00