feat(backend): add claude runtime, anthropic OAuth auth kind, and profile→runtime derivation

This commit is contained in:
Gabriel Brown
2026-07-11 10:42:48 -04:00
parent 76886621b5
commit 70396feccc
5 changed files with 81 additions and 4 deletions
+15 -4
View File
@@ -389,6 +389,7 @@ const applicationTables = {
authType: v.union(
v.literal('api_key'),
v.literal('opencode_auth_json'),
v.literal('anthropic_oauth_json'),
v.literal('none'),
),
encryptedSecret: v.optional(v.string()),
@@ -468,9 +469,14 @@ const applicationTables = {
spoonId: v.id('spoons'),
ownerId: v.id('users'),
enabled: v.boolean(),
// Legacy records may contain openai_direct. New writes use opencode only.
// Legacy records may contain openai_direct (deprecated, never written).
runtime: v.optional(
v.union(v.literal('opencode'), v.literal('openai_direct')),
v.union(
v.literal('openai_direct'),
v.literal('opencode'),
v.literal('codex'),
v.literal('claude'),
),
),
defaultBaseBranch: v.optional(v.string()),
branchPrefix: v.string(),
@@ -532,9 +538,14 @@ const applicationTables = {
v.literal('timed_out'),
),
prompt: v.string(),
// Legacy jobs may contain openai_direct. New jobs use opencode only.
// Legacy jobs may contain openai_direct (deprecated, never written).
runtime: v.optional(
v.union(v.literal('openai_direct'), v.literal('opencode')),
v.union(
v.literal('openai_direct'),
v.literal('opencode'),
v.literal('codex'),
v.literal('claude'),
),
),
workspaceStatus: v.optional(
v.union(