feat(backend): boxSettings table + box password actions

This commit is contained in:
Gabriel Brown
2026-07-13 09:56:08 -04:00
parent 37a82098c2
commit a956d63e16
5 changed files with 198 additions and 0 deletions
+12
View File
@@ -376,6 +376,18 @@ const applicationTables = {
setupCommand: v.optional(v.string()),
updatedAt: v.number(),
}).index('by_owner', ['ownerId']),
// Per-user box account settings (the Linux user inside spoon-box-<username>).
boxSettings: defineTable({
ownerId: v.id('users'),
// Resolved Spoon home username at the time the row was written — the
// worker looks the password up by this at box creation (usernames are not
// indexed anywhere else).
username: v.string(),
boxPasswordEncrypted: v.optional(v.string()),
updatedAt: v.number(),
})
.index('by_owner', ['ownerId'])
.index('by_username', ['username']),
aiProviderProfiles: defineTable({
ownerId: v.id('users'),
name: v.string(),