Skip to content

Commit 613562f

Browse files
thdxrkitlangtonclaude
authored
core: make account login upgrades safe while adding multi-account workspace auth (#15487)
Co-authored-by: Kit Langton <kit.langton@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9c4325b commit 613562f

File tree

41 files changed

+4791
-916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4791
-916
lines changed

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,7 @@ const table = sqliteTable("session", {
122122
- Avoid mocks as much as possible
123123
- Test actual implementation, do not duplicate logic into tests
124124
- Tests cannot run from repo root (guard: `do-not-run-tests-from-root`); run from package dirs like `packages/opencode`.
125+
126+
## Type Checking
127+
128+
- Always run `bun typecheck` from package directories (e.g., `packages/opencode`), never `tsc` directly.

bun.lock

Lines changed: 632 additions & 757 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"dompurify": "3.3.1",
4444
"drizzle-kit": "1.0.0-beta.16-ea816b6",
4545
"drizzle-orm": "1.0.0-beta.16-ea816b6",
46+
"effect": "4.0.0-beta.29",
4647
"ai": "5.0.124",
4748
"hono": "4.10.7",
4849
"hono-openapi": "1.1.2",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CREATE TABLE `account` (
2+
`id` text PRIMARY KEY,
3+
`email` text NOT NULL,
4+
`url` text NOT NULL,
5+
`access_token` text NOT NULL,
6+
`refresh_token` text NOT NULL,
7+
`token_expiry` integer,
8+
`selected_org_id` text,
9+
`time_created` integer NOT NULL,
10+
`time_updated` integer NOT NULL
11+
);
12+
--> statement-breakpoint
13+
CREATE TABLE `account_state` (
14+
`id` integer PRIMARY KEY NOT NULL,
15+
`active_account_id` text,
16+
FOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null
17+
);

0 commit comments

Comments
 (0)