← Index · Sources: packages/sdk/src/events.ts, packages/sdk/src/events.experimental.ts
interface EventEnvelope {
seq: number;
kind: string;
affected_ids: string[];
etag: string | null;
ts: string; // ISO-8601
payload?: Record<string, unknown>;
}Imported from @dreamgraph/sdk:
snapshot.changedcache.invalidated
Stable kinds MUST remain backwards-compatible within a major SDK version.
Subscriptions require events:read.
Imported from @dreamgraph/sdk/events/experimental. Subscription requires
events:read:experimental AND instance.json:experimental_plugins: true.
dream.cycle.completedtension.createdtension.resolvedcandidate.addedcandidate.promotedcandidate.rejectedaudit.appendedschedule.executedschedule.timed_outschedule.pausednightmare.cycle.completedarchetype.importedarchetype.exportednarrative.chapter.appended
interface SchedulePayload {
schedule_id: string;
schedule_name: string;
action: string;
execution_id: string;
success: boolean;
duration_ms: number;
status: string;
error: string | null;
}interface ScheduleTimeoutPayload {
schedule_id: string;
schedule_name: string;
action: string;
error: string;
}interface SchedulePausedPayload {
schedule_id: string;
schedule_name: string;
action: string;
reason: "error_streak";
error_count: number;
}interface NightmarePayload {
cycle_number: number;
strategy: string;
threats_found: number;
attack_surfaces: number;
summary: { critical: number; high: number; medium: number; low: number };
duration_ms: number;
}interface ArchetypeExportedPayload {
archetypes_exported: number;
file_path: string;
instance_id: string;
timestamp: string;
}interface ArchetypeImportedPayload {
archetypes_imported: number;
archetypes_skipped: number;
tensions_created: number;
source_instance: string;
timestamp: string;
}interface NarrativeChapterPayload {
chapter_number: number;
title: string;
cycle_range: [number, number];
generated_at: string;
}Plugins MAY emit any kind not in the host taxonomy. The SDK does not enforce
naming, but the convention <plugin-id>.<event_name> matches the pattern used
for tools, resources, and UI ids.
The SSE stream (/explorer/api/events) keeps a 500-event ring buffer.
The persistent record is <instance>/data/event_log.json with rotation. The
plugin contract is at-most-once: do not rely on receiving every event.