@escapeaihq/client-core 0.42.0 → 0.49.1
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/README.md +5 -5
- package/dist/adapters/worldAdapter.js +1 -1
- package/dist/admin.d.ts +123 -0
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +74 -0
- package/dist/admin.js.map +1 -1
- package/dist/api.d.ts +328 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +198 -3
- package/dist/api.js.map +1 -1
- package/dist/conversation/binding.d.ts +18 -3
- package/dist/conversation/binding.d.ts.map +1 -1
- package/dist/conversation/binding.js +8 -2
- package/dist/conversation/binding.js.map +1 -1
- package/dist/conversation/controller.d.ts.map +1 -1
- package/dist/conversation/controller.js +8 -0
- package/dist/conversation/controller.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/websocket.d.ts +19 -0
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/api.test.ts +83 -0
- package/src/__tests__/conversation/binding.test.ts +62 -0
- package/src/__tests__/conversation/controller.test.ts +35 -0
- package/src/__tests__/monitoring.test.ts +162 -0
- package/src/__tests__/persona-generation.test.ts +352 -0
- package/src/__tests__/websocket.test.ts +50 -0
- package/src/admin.ts +207 -0
- package/src/api.ts +507 -2
- package/src/conversation/binding.ts +22 -3
- package/src/conversation/controller.ts +8 -0
- package/src/index.ts +10 -4
- package/src/websocket.ts +24 -0
package/src/index.ts
CHANGED
|
@@ -28,15 +28,21 @@ export * from './websocket';
|
|
|
28
28
|
export * from './api';
|
|
29
29
|
export * from './castProjection';
|
|
30
30
|
export * from './admin';
|
|
31
|
-
export
|
|
31
|
+
// Directory modules MUST re-export their barrel as `./<dir>/index` (not the bare
|
|
32
|
+
// `./<dir>`). Under strict-ESM resolvers (Nuxt/Rollup in the ../Web-App sibling),
|
|
33
|
+
// the published `dist/<dir>` has no `package.json` "main", so `from './<dir>.js'`
|
|
34
|
+
// (what a bare specifier compiles to) fails to resolve. The explicit `/index`
|
|
35
|
+
// makes tsc emit `./<dir>/index.js`, which resolves directly to the real file.
|
|
36
|
+
// See specs/technical-debt.md (client-core ESM barrel directory re-export bug).
|
|
37
|
+
export * from './reactor/index';
|
|
32
38
|
export * from './timeFormat';
|
|
33
39
|
export * from './toolSchemas';
|
|
34
|
-
export * from './vision';
|
|
40
|
+
export * from './vision/index';
|
|
35
41
|
export * from './graphSchema';
|
|
36
42
|
// R8.1 — pure story-graph projections (deriveScenes/deriveCast + SceneView/
|
|
37
43
|
// CharacterView). Grepped src/ for these names first per the collision warning
|
|
38
44
|
// above: no existing export owns them. The web studio module re-exports these.
|
|
39
45
|
export * from './storyGraph';
|
|
40
|
-
export * from './adapters';
|
|
41
|
-
export * from './conversation';
|
|
46
|
+
export * from './adapters/index';
|
|
47
|
+
export * from './conversation/index';
|
|
42
48
|
export * from './platformAssistant';
|
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
|
/**
|