feat(db): add oauth_clients table for dynamic client registration
CI / build-and-test (push) Has been cancelled

* Introduced oauth_clients table with fields for client_id, client_name, redirect_uris, and created_at.
* Updated agent_persona_parts, agent_persona_skills, agent_persona_guardrails, agent_persona_traits, and arc_stage_parts tables to use unique constraints instead of primary keys for composite indexes.
This commit is contained in:
Hein
2026-05-07 13:30:30 +02:00
parent fb9606ef2b
commit a993859c62
21 changed files with 1223 additions and 5408 deletions
+9 -5
View File
@@ -27,33 +27,35 @@ Table agent_parts {
}
Table agent_persona_parts {
id bigserial [pk]
persona_id bigint [not null, ref: > agent_personas.id]
part_id bigint [not null, ref: > agent_parts.id]
part_order int [not null, default: 0]
priority int [not null, default: 0]
indexes {
(persona_id, part_id) [pk]
(persona_id, part_id) [uk]
persona_id
}
}
Table agent_persona_skills {
id bigserial [pk]
persona_id bigint [not null, ref: > agent_personas.id]
skill_id bigint [not null, ref: > agent_skills.id]
indexes {
(persona_id, skill_id) [pk]
(persona_id, skill_id) [uk]
persona_id
}
}
Table agent_persona_guardrails {
id bigserial [pk]
persona_id bigint [not null, ref: > agent_personas.id]
guardrail_id bigint [not null, ref: > agent_guardrails.id]
indexes {
(persona_id, guardrail_id) [pk]
persona_id
}
}
@@ -71,11 +73,11 @@ Table agent_traits {
}
Table agent_persona_traits {
id bigserial [pk]
persona_id bigint [not null, ref: > agent_personas.id]
trait_id bigint [not null, ref: > agent_traits.id]
indexes {
(persona_id, trait_id) [pk]
persona_id
}
}
@@ -100,15 +102,17 @@ Table arc_stages {
}
Table arc_stage_parts {
id bigserial [pk]
stage_id bigint [not null, ref: > arc_stages.id]
part_id bigint [not null, ref: > agent_parts.id]
indexes {
(stage_id, part_id) [pk]
(stage_id, part_id)
}
}
Table persona_arc {
id bigserial [pk]
persona_id bigint [pk, ref: > agent_personas.id]
arc_id bigint [not null, ref: > character_arcs.id]
current_stage_id bigint [not null, ref: > arc_stages.id]
+8
View File
@@ -0,0 +1,8 @@
// OAuth 2.0 Dynamic Client Registration (RFC 7591)
Table oauth_clients {
id bigserial [pk]
client_id text [unique, not null]
client_name text [not null, default: '']
redirect_uris "text[]" [not null, default: `'{}'`]
created_at timestamptz [not null, default: `now()`]
}