profile: unified Profile model (prefs, contexts, consents) #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Expand the User schema and ship the unified Profile model from ADR-0014: preferences (quiet hours, tone, allowed tip kinds), contexts (work/home/vacation, manual toggle), consents (per-key, revocable), plus the registry plumbing the orchestrator needs to operate over N agents without hardcoding any of them.
Scope (per ADR-0014)
Schema (migration steps 1, 2, 8)
user_preferences (user_id, scope, key, value_json, source, updated_at),user_consents (user_id, consent_key, granted_at, revoked_at),user_contexts (user_id, name, active, schedule_json, created_at).users:tone,tip_kinds_json.users.consent_givenrows intouser_consentsasconsent_key=data:core; keep the column for one release, then drop.Manifest plumbing (migration step 3)
overdue-task,momentum,time-of-day,recent-patterns,focus-area) getsml/agents/<id>/manifest.pydeclaringid,version,pref_schema,context_schema,required_consents,output_contract,ttl_sec, andinferred_params(empty list for now; populated by #111-#116).ml/servingexposes the manifest set.Read-through API (migration step 4)
GET /api/profile→{ user, prefs (grouped by scope), contexts, consents, agents[] }PATCH /api/profile/prefs/:scope→ upsert intouser_preferenceswithsource=userPATCH /api/profile/consents→ grant/revokePATCH /api/profile/contexts→ activate/deactivate / createGET /api/agents/registry→ manifests (TS recommender proxies fromml/serving); admin UI auto-renders forms from eachpref_schemaOrchestrator cutover (migration step 5)
v4-orchestratorprompt template iterates whatever it is handed; no per-agent code paths.Out of scope
Done when
GET /api/profileandGET /api/agents/registryreturn the expected shape.pref_schema(one form per agent, not per-agent code).data:todoistconsent removes Todoist-derived agents from the next tip.Related