| title | services.audit |
|---|---|
| description | Audit write bridge currently used by settings/runtime integrations. |
- Stability:
experimental - Canonical source:
packages/services/service-settings/src/settings-service.types.ts
services.audit is currently a lightweight sink abstraction used by runtime services (for example service-settings) to emit append-only audit entries.
services.audit.record(entry: {
namespace: string;
key: string;
scope: SpecifierScope;
userId?: string;
actor?: string;
action: 'set' | 'reset';
valueDigest: string;
encrypted: boolean;
requestId?: string;
}): Promise<void> | void- This API is intentionally write-only.
- For querying audit history, use
services.dataagainstsys_audit_log/sys_activityobjects.
Sink implementations should avoid throwing into user paths: the runtime caller (for example service-settings) awaits record() without a surrounding try/catch, so a throwing sink propagates its error and fails the caller's write.