@escapeaihq/client-core 0.42.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/websocket.ts CHANGED
@@ -186,6 +186,30 @@ export type ChatWsEvent =
186
186
  timestamp?: number;
187
187
  personaId: string;
188
188
  previousPersonaId?: string;
189
+ }
190
+ | {
191
+ /**
192
+ * Dashboard Spec A (§10A.5) — a DM-issued scene-control directive. Emitted
193
+ * by `ChatDispatcher.emit_dm_directive` (`shared/chat_dispatcher.py`,
194
+ * `ChatEventType.DM_DIRECTIVE` → wire `"dm_directive"`) at `MESSAGE_STOP`
195
+ * when the DM's completed turn carries a line-anchored `[SCENE:...]` tag;
196
+ * the tag is stripped from the streamed narration before this fires. Added
197
+ * as a union variant so exhaustive `switch` consumers get a typed arm
198
+ * (without it the `ConversationRuntime.applyFrame` default branch would
199
+ * stay the only path for this type). Shape mirrors {@link DmDirectiveEvent}
200
+ * in `api.ts` (the `directive` literals are inlined here to avoid a
201
+ * websocket↔api import cycle — `api.ts` already imports `Citation` from
202
+ * here). No existing consumer is wired (A-DM0 ships dark); the
203
+ * `applyFrame` default-drop stays safe for unhandled variants.
204
+ */
205
+ type: 'dm_directive';
206
+ timestamp?: number;
207
+ directive:
208
+ | 'enter_world'
209
+ | 'exit_world'
210
+ | 'seek_video'
211
+ | 'set_experience_source';
212
+ params: Record<string, unknown>;
189
213
  };
190
214
 
191
215
  /**