refactor(server): move the install audit trail from core to the server (P1.2, UF-040)
Core keeps only shared infrastructure, so InstallAuditStore leaves it and lives in packages/server/src/local/install-audit.ts. The trail itself stays: the Audit and Activity tabs, the extend and export routes, and the threat model entry keep working on the same waggle.db table. - @waggle/shared gets RecordAuditInput and the narrow InstallAuditRecorder (record only), which the agent's skill tools now depend on. - The server creates the audit table before the one-time legacy copy, which no longer constructs it in core. - UF-040: GET /api/debug/logs called prepare() on the store's private db wrapper, which has none, so the support bundle never carried recent installs. It now reads them through getRecentSummary().
This commit is contained in:
@@ -70,10 +70,10 @@ regex that gates connector write actions (`_create_/_update_/_delete_/_send_/…
|
||||
Read-only/informational calls flow freely; destructive ops do not inherit autonomy.
|
||||
|
||||
### 4. Capability install audit trail — `install-audit.ts`
|
||||
`packages/core/src/install-audit.ts`. Every install-relevant action (proposed, approved,
|
||||
installed, rejected, failed, uninstalled) is persisted to the `.mind` DB with risk,
|
||||
`packages/server/src/local/install-audit.ts`. Every install-relevant action (proposed,
|
||||
approved, installed, rejected, failed, uninstalled) is persisted to `waggle.db` with risk,
|
||||
approval class, initiator, and trust source — a verifiable history of what was installed,
|
||||
when, why, and by whom. Backs the EU-AI-Act capability-provenance story.
|
||||
when, why, and by whom.
|
||||
|
||||
### 5. Local secret storage — `vault.ts`
|
||||
`packages/core/src/vault.ts`. Secrets are encrypted with AES-256-GCM under a
|
||||
|
||||
Reference in New Issue
Block a user