mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
docs(ai): mark Step 8 (mana-sync actor field) done; document sync_changes.actor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5922abbbd8
commit
5c53c6d02e
2 changed files with 13 additions and 2 deletions
|
|
@ -172,10 +172,14 @@ sync_changes (
|
|||
data JSONB,
|
||||
field_timestamps JSONB DEFAULT '{}',
|
||||
client_id TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT now()
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
schema_version INT NOT NULL DEFAULT 1,
|
||||
actor JSONB -- AI Workbench attribution: { kind: user|ai|system, ... }
|
||||
)
|
||||
```
|
||||
|
||||
**`actor` column (2026-04-14)**: Opaque JSON blob the webapp stamps on every change to distinguish user writes from autonomous AI writes and derived subsystem writes. Server does NOT parse the shape — just persists + re-emits. Pre-actor clients omit the field; the column is nullable. See `apps/mana/apps/web/src/lib/data/events/actor.ts` for the discriminated union + `COMPANION_BRAIN_ARCHITECTURE.md §20` for the full pipeline.
|
||||
|
||||
Indexes: `(user_id, app_id, created_at)`, `(table_name, record_id, created_at)`, `(user_id, app_id, table_name, created_at)`
|
||||
|
||||
## Configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue