@escapeaihq/client-core 0.52.0 → 0.139.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/README.md +445 -153
- package/dist/adapters/capabilities.d.ts +20 -3
- package/dist/adapters/capabilities.d.ts.map +1 -1
- package/dist/adapters/directorAdapter.d.ts +5 -4
- package/dist/adapters/directorAdapter.d.ts.map +1 -1
- package/dist/adapters/directorAdapter.js +5 -4
- package/dist/adapters/directorAdapter.js.map +1 -1
- package/dist/adapters/experienceModelCatalog.d.ts +382 -0
- package/dist/adapters/experienceModelCatalog.d.ts.map +1 -0
- package/dist/adapters/experienceModelCatalog.js +401 -0
- package/dist/adapters/experienceModelCatalog.js.map +1 -0
- package/dist/adapters/extractionAdapter.d.ts +81 -0
- package/dist/adapters/extractionAdapter.d.ts.map +1 -0
- package/dist/adapters/extractionAdapter.js +98 -0
- package/dist/adapters/extractionAdapter.js.map +1 -0
- package/dist/adapters/imageAdapter.d.ts +5 -1
- package/dist/adapters/imageAdapter.d.ts.map +1 -1
- package/dist/adapters/imageAdapter.js +5 -1
- package/dist/adapters/imageAdapter.js.map +1 -1
- package/dist/adapters/index.d.ts +54 -16
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +62 -11
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/momentDirective.d.ts +66 -0
- package/dist/adapters/momentDirective.d.ts.map +1 -0
- package/dist/adapters/momentDirective.js +78 -0
- package/dist/adapters/momentDirective.js.map +1 -0
- package/dist/adapters/momentPolicy.d.ts +132 -0
- package/dist/adapters/momentPolicy.d.ts.map +1 -0
- package/dist/adapters/momentPolicy.js +165 -0
- package/dist/adapters/momentPolicy.js.map +1 -0
- package/dist/adapters/registry.d.ts +1 -1
- package/dist/adapters/registry.d.ts.map +1 -1
- package/dist/adapters/videoGenAdapter.d.ts +55 -0
- package/dist/adapters/videoGenAdapter.d.ts.map +1 -0
- package/dist/adapters/videoGenAdapter.js +78 -0
- package/dist/adapters/videoGenAdapter.js.map +1 -0
- package/dist/adapters/worldAdapter.d.ts +132 -11
- package/dist/adapters/worldAdapter.d.ts.map +1 -1
- package/dist/adapters/worldAdapter.js +127 -11
- package/dist/adapters/worldAdapter.js.map +1 -1
- package/dist/adapters/worldModelPreference.d.ts +173 -0
- package/dist/adapters/worldModelPreference.d.ts.map +1 -0
- package/dist/adapters/worldModelPreference.js +209 -0
- package/dist/adapters/worldModelPreference.js.map +1 -0
- package/dist/adapters/worldModelTradeoffs.d.ts +120 -0
- package/dist/adapters/worldModelTradeoffs.d.ts.map +1 -0
- package/dist/adapters/worldModelTradeoffs.js +154 -0
- package/dist/adapters/worldModelTradeoffs.js.map +1 -0
- package/dist/admin.d.ts +545 -0
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +230 -16
- package/dist/admin.js.map +1 -1
- package/dist/api.d.ts +10295 -2216
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4187 -1240
- package/dist/api.js.map +1 -1
- package/dist/arcBoardJoin.d.ts +38 -0
- package/dist/arcBoardJoin.d.ts.map +1 -0
- package/dist/arcBoardJoin.js +37 -0
- package/dist/arcBoardJoin.js.map +1 -0
- package/dist/arcPreview.d.ts +49 -0
- package/dist/arcPreview.d.ts.map +1 -0
- package/dist/arcPreview.js +65 -0
- package/dist/arcPreview.js.map +1 -0
- package/dist/audio.d.ts +259 -16
- package/dist/audio.d.ts.map +1 -1
- package/dist/audio.js +605 -114
- package/dist/audio.js.map +1 -1
- package/dist/audioDsp.d.ts +45 -0
- package/dist/audioDsp.d.ts.map +1 -0
- package/dist/audioDsp.js +108 -0
- package/dist/audioDsp.js.map +1 -0
- package/dist/audioProtocol.d.ts +160 -0
- package/dist/audioProtocol.d.ts.map +1 -1
- package/dist/audioProtocol.js +99 -0
- package/dist/audioProtocol.js.map +1 -1
- package/dist/beatTitles.d.ts +33 -0
- package/dist/beatTitles.d.ts.map +1 -0
- package/dist/beatTitles.js +39 -0
- package/dist/beatTitles.js.map +1 -0
- package/dist/castProjection.d.ts +204 -1
- package/dist/castProjection.d.ts.map +1 -1
- package/dist/castProjection.js +202 -0
- package/dist/castProjection.js.map +1 -1
- package/dist/characterGrounding.d.ts +369 -0
- package/dist/characterGrounding.d.ts.map +1 -0
- package/dist/characterGrounding.js +408 -0
- package/dist/characterGrounding.js.map +1 -0
- package/dist/conversation/binding.d.ts +13 -0
- package/dist/conversation/binding.d.ts.map +1 -1
- package/dist/conversation/binding.js.map +1 -1
- package/dist/conversation/chatSessionStore.d.ts +178 -0
- package/dist/conversation/chatSessionStore.d.ts.map +1 -0
- package/dist/conversation/chatSessionStore.js +196 -0
- package/dist/conversation/chatSessionStore.js.map +1 -0
- package/dist/conversation/controller.d.ts +44 -0
- package/dist/conversation/controller.d.ts.map +1 -1
- package/dist/conversation/controller.js +82 -3
- package/dist/conversation/controller.js.map +1 -1
- package/dist/conversation/index.d.ts +2 -0
- package/dist/conversation/index.d.ts.map +1 -1
- package/dist/conversation/index.js +2 -0
- package/dist/conversation/index.js.map +1 -1
- package/dist/conversation/participant.d.ts +16 -0
- package/dist/conversation/participant.d.ts.map +1 -1
- package/dist/conversation/readSequencer.d.ts +38 -0
- package/dist/conversation/readSequencer.d.ts.map +1 -0
- package/dist/conversation/readSequencer.js +42 -0
- package/dist/conversation/readSequencer.js.map +1 -0
- package/dist/conversation/roster.d.ts +5 -1
- package/dist/conversation/roster.d.ts.map +1 -1
- package/dist/conversation/roster.js.map +1 -1
- package/dist/conversation/rosterProjection.d.ts +74 -1
- package/dist/conversation/rosterProjection.d.ts.map +1 -1
- package/dist/conversation/rosterProjection.js +135 -1
- package/dist/conversation/rosterProjection.js.map +1 -1
- package/dist/conversation/runtime.d.ts +20 -3
- package/dist/conversation/runtime.d.ts.map +1 -1
- package/dist/conversation/runtime.js +66 -7
- package/dist/conversation/runtime.js.map +1 -1
- package/dist/conversation/types.d.ts +43 -4
- package/dist/conversation/types.d.ts.map +1 -1
- package/dist/conversation/voice.d.ts +290 -13
- package/dist/conversation/voice.d.ts.map +1 -1
- package/dist/conversation/voice.js +565 -42
- package/dist/conversation/voice.js.map +1 -1
- package/dist/creatorCuration.d.ts +134 -0
- package/dist/creatorCuration.d.ts.map +1 -0
- package/dist/creatorCuration.js +228 -0
- package/dist/creatorCuration.js.map +1 -0
- package/dist/creatorDashboard.d.ts +155 -0
- package/dist/creatorDashboard.d.ts.map +1 -0
- package/dist/creatorDashboard.js +237 -0
- package/dist/creatorDashboard.js.map +1 -0
- package/dist/creatorUniverse.d.ts +95 -0
- package/dist/creatorUniverse.d.ts.map +1 -0
- package/dist/creatorUniverse.js +136 -0
- package/dist/creatorUniverse.js.map +1 -0
- package/dist/curationWrite.d.ts +76 -0
- package/dist/curationWrite.d.ts.map +1 -0
- package/dist/curationWrite.js +106 -0
- package/dist/curationWrite.js.map +1 -0
- package/dist/designTokens.d.ts +64 -0
- package/dist/designTokens.d.ts.map +1 -0
- package/dist/designTokens.js +117 -0
- package/dist/designTokens.js.map +1 -0
- package/dist/dialogAttribution.d.ts +79 -0
- package/dist/dialogAttribution.d.ts.map +1 -0
- package/dist/dialogAttribution.js +144 -0
- package/dist/dialogAttribution.js.map +1 -0
- package/dist/dmRunWorldReadiness.d.ts +605 -0
- package/dist/dmRunWorldReadiness.d.ts.map +1 -0
- package/dist/dmRunWorldReadiness.js +775 -0
- package/dist/dmRunWorldReadiness.js.map +1 -0
- package/dist/domains/access.d.ts +32 -0
- package/dist/domains/access.d.ts.map +1 -0
- package/dist/domains/access.js +43 -0
- package/dist/domains/access.js.map +1 -0
- package/dist/domains/adventureDefinitions.d.ts +159 -0
- package/dist/domains/adventureDefinitions.d.ts.map +1 -0
- package/dist/domains/adventureDefinitions.js +168 -0
- package/dist/domains/adventureDefinitions.js.map +1 -0
- package/dist/domains/adventures.d.ts +329 -0
- package/dist/domains/adventures.d.ts.map +1 -0
- package/dist/domains/adventures.js +359 -0
- package/dist/domains/adventures.js.map +1 -0
- package/dist/domains/arcs.d.ts +146 -0
- package/dist/domains/arcs.d.ts.map +1 -0
- package/dist/domains/arcs.js +202 -0
- package/dist/domains/arcs.js.map +1 -0
- package/dist/domains/artifacts.d.ts +259 -0
- package/dist/domains/artifacts.d.ts.map +1 -0
- package/dist/domains/artifacts.js +125 -0
- package/dist/domains/artifacts.js.map +1 -0
- package/dist/domains/chat.d.ts +158 -0
- package/dist/domains/chat.d.ts.map +1 -0
- package/dist/domains/chat.js +224 -0
- package/dist/domains/chat.js.map +1 -0
- package/dist/domains/decisions.d.ts +31 -0
- package/dist/domains/decisions.d.ts.map +1 -0
- package/dist/domains/decisions.js +42 -0
- package/dist/domains/decisions.js.map +1 -0
- package/dist/domains/documents.d.ts +218 -0
- package/dist/domains/documents.d.ts.map +1 -0
- package/dist/domains/documents.js +252 -0
- package/dist/domains/documents.js.map +1 -0
- package/dist/domains/enhancements.d.ts +106 -0
- package/dist/domains/enhancements.d.ts.map +1 -0
- package/dist/domains/enhancements.js +160 -0
- package/dist/domains/enhancements.js.map +1 -0
- package/dist/domains/graph.d.ts +454 -0
- package/dist/domains/graph.d.ts.map +1 -0
- package/dist/domains/graph.js +648 -0
- package/dist/domains/graph.js.map +1 -0
- package/dist/domains/images.d.ts +220 -0
- package/dist/domains/images.d.ts.map +1 -0
- package/dist/domains/images.js +307 -0
- package/dist/domains/images.js.map +1 -0
- package/dist/domains/ingestion.d.ts +312 -0
- package/dist/domains/ingestion.d.ts.map +1 -0
- package/dist/domains/ingestion.js +495 -0
- package/dist/domains/ingestion.js.map +1 -0
- package/dist/domains/me.d.ts +21 -0
- package/dist/domains/me.d.ts.map +1 -0
- package/dist/domains/me.js +23 -0
- package/dist/domains/me.js.map +1 -0
- package/dist/domains/orgs.d.ts +47 -0
- package/dist/domains/orgs.d.ts.map +1 -0
- package/dist/domains/orgs.js +75 -0
- package/dist/domains/orgs.js.map +1 -0
- package/dist/domains/personas.d.ts +138 -0
- package/dist/domains/personas.d.ts.map +1 -0
- package/dist/domains/personas.js +322 -0
- package/dist/domains/personas.js.map +1 -0
- package/dist/domains/projects.d.ts +53 -0
- package/dist/domains/projects.d.ts.map +1 -0
- package/dist/domains/projects.js +94 -0
- package/dist/domains/projects.js.map +1 -0
- package/dist/domains/quests.d.ts +431 -0
- package/dist/domains/quests.d.ts.map +1 -0
- package/dist/domains/quests.js +61 -0
- package/dist/domains/quests.js.map +1 -0
- package/dist/domains/reactor.d.ts +98 -0
- package/dist/domains/reactor.d.ts.map +1 -0
- package/dist/domains/reactor.js +131 -0
- package/dist/domains/reactor.js.map +1 -0
- package/dist/domains/showcase.d.ts +28 -0
- package/dist/domains/showcase.d.ts.map +1 -0
- package/dist/domains/showcase.js +28 -0
- package/dist/domains/showcase.js.map +1 -0
- package/dist/domains/storyboards.d.ts +1253 -0
- package/dist/domains/storyboards.d.ts.map +1 -0
- package/dist/domains/storyboards.js +781 -0
- package/dist/domains/storyboards.js.map +1 -0
- package/dist/domains/studioSettings.d.ts +39 -0
- package/dist/domains/studioSettings.d.ts.map +1 -0
- package/dist/domains/studioSettings.js +80 -0
- package/dist/domains/studioSettings.js.map +1 -0
- package/dist/domains/universes.d.ts +191 -0
- package/dist/domains/universes.d.ts.map +1 -0
- package/dist/domains/universes.js +276 -0
- package/dist/domains/universes.js.map +1 -0
- package/dist/domains/userDefaults.d.ts +18 -0
- package/dist/domains/userDefaults.d.ts.map +1 -0
- package/dist/domains/userDefaults.js +27 -0
- package/dist/domains/userDefaults.js.map +1 -0
- package/dist/domains/visemeBundles.d.ts +262 -0
- package/dist/domains/visemeBundles.d.ts.map +1 -0
- package/dist/domains/visemeBundles.js +373 -0
- package/dist/domains/visemeBundles.js.map +1 -0
- package/dist/domains/workflows.d.ts +142 -0
- package/dist/domains/workflows.d.ts.map +1 -0
- package/dist/domains/workflows.js +245 -0
- package/dist/domains/workflows.js.map +1 -0
- package/dist/enhancementDiff.d.ts +56 -0
- package/dist/enhancementDiff.d.ts.map +1 -0
- package/dist/enhancementDiff.js +110 -0
- package/dist/enhancementDiff.js.map +1 -0
- package/dist/generated/contract.d.ts +372 -0
- package/dist/generated/contract.d.ts.map +1 -0
- package/dist/generated/contract.js +395 -0
- package/dist/generated/contract.js.map +1 -0
- package/dist/graphSchema.d.ts +36 -5
- package/dist/graphSchema.d.ts.map +1 -1
- package/dist/graphSchema.js +88 -2
- package/dist/graphSchema.js.map +1 -1
- package/dist/http.d.ts +70 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +263 -11
- package/dist/http.js.map +1 -1
- package/dist/identity.d.ts +81 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +65 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -1
- package/dist/messageContent.d.ts +174 -0
- package/dist/messageContent.d.ts.map +1 -0
- package/dist/messageContent.js +405 -0
- package/dist/messageContent.js.map +1 -0
- package/dist/mutationEpoch.d.ts +83 -0
- package/dist/mutationEpoch.d.ts.map +1 -0
- package/dist/mutationEpoch.js +109 -0
- package/dist/mutationEpoch.js.map +1 -0
- package/dist/obo.d.ts +144 -0
- package/dist/obo.d.ts.map +1 -0
- package/dist/obo.js +135 -0
- package/dist/obo.js.map +1 -0
- package/dist/opusTransport.d.ts +113 -0
- package/dist/opusTransport.d.ts.map +1 -0
- package/dist/opusTransport.js +170 -0
- package/dist/opusTransport.js.map +1 -0
- package/dist/pagination.d.ts +18 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +26 -0
- package/dist/pagination.js.map +1 -0
- package/dist/platformAssistant.d.ts +55 -1
- package/dist/platformAssistant.d.ts.map +1 -1
- package/dist/platformAssistant.js +39 -1
- package/dist/platformAssistant.js.map +1 -1
- package/dist/pollUtils.d.ts +19 -0
- package/dist/pollUtils.d.ts.map +1 -0
- package/dist/pollUtils.js +35 -0
- package/dist/pollUtils.js.map +1 -0
- package/dist/questLog.d.ts +232 -0
- package/dist/questLog.d.ts.map +1 -0
- package/dist/questLog.js +522 -0
- package/dist/questLog.js.map +1 -0
- package/dist/reactor/dmDirectiveToExperience.d.ts +300 -0
- package/dist/reactor/dmDirectiveToExperience.d.ts.map +1 -0
- package/dist/reactor/dmDirectiveToExperience.js +401 -0
- package/dist/reactor/dmDirectiveToExperience.js.map +1 -0
- package/dist/reactor/dmSceneControlPrompt.d.ts.map +1 -1
- package/dist/reactor/dmSceneControlPrompt.js +64 -2
- package/dist/reactor/dmSceneControlPrompt.js.map +1 -1
- package/dist/reactor/dmWorldEntry.d.ts +1278 -0
- package/dist/reactor/dmWorldEntry.d.ts.map +1 -0
- package/dist/reactor/dmWorldEntry.js +1396 -0
- package/dist/reactor/dmWorldEntry.js.map +1 -0
- package/dist/reactor/framePromptCompaction.d.ts +223 -0
- package/dist/reactor/framePromptCompaction.d.ts.map +1 -0
- package/dist/reactor/framePromptCompaction.js +393 -0
- package/dist/reactor/framePromptCompaction.js.map +1 -0
- package/dist/reactor/frameWorldBind.d.ts +86 -0
- package/dist/reactor/frameWorldBind.d.ts.map +1 -0
- package/dist/reactor/frameWorldBind.js +79 -0
- package/dist/reactor/frameWorldBind.js.map +1 -0
- package/dist/reactor/happyOysterSeed.d.ts +166 -0
- package/dist/reactor/happyOysterSeed.d.ts.map +1 -0
- package/dist/reactor/happyOysterSeed.js +233 -0
- package/dist/reactor/happyOysterSeed.js.map +1 -0
- package/dist/reactor/happyOysterWalk.d.ts +274 -0
- package/dist/reactor/happyOysterWalk.d.ts.map +1 -0
- package/dist/reactor/happyOysterWalk.js +407 -0
- package/dist/reactor/happyOysterWalk.js.map +1 -0
- package/dist/reactor/happyOysterWorld.d.ts +718 -0
- package/dist/reactor/happyOysterWorld.d.ts.map +1 -0
- package/dist/reactor/happyOysterWorld.js +826 -0
- package/dist/reactor/happyOysterWorld.js.map +1 -0
- package/dist/reactor/heliosCommandDispatcher.d.ts.map +1 -1
- package/dist/reactor/heliosCommandDispatcher.js +5 -2
- package/dist/reactor/heliosCommandDispatcher.js.map +1 -1
- package/dist/reactor/hiddenWorldLifecycle.d.ts +101 -0
- package/dist/reactor/hiddenWorldLifecycle.d.ts.map +1 -0
- package/dist/reactor/hiddenWorldLifecycle.js +119 -0
- package/dist/reactor/hiddenWorldLifecycle.js.map +1 -0
- package/dist/reactor/imageCanvas.d.ts +15 -0
- package/dist/reactor/imageCanvas.d.ts.map +1 -0
- package/dist/reactor/imageCanvas.js +33 -0
- package/dist/reactor/imageCanvas.js.map +1 -0
- package/dist/reactor/index.d.ts +19 -0
- package/dist/reactor/index.d.ts.map +1 -1
- package/dist/reactor/index.js +78 -0
- package/dist/reactor/index.js.map +1 -1
- package/dist/reactor/longLiveCommandDispatcher.d.ts +23 -8
- package/dist/reactor/longLiveCommandDispatcher.d.ts.map +1 -1
- package/dist/reactor/longLiveCommandDispatcher.js +16 -4
- package/dist/reactor/longLiveCommandDispatcher.js.map +1 -1
- package/dist/reactor/longLiveSceneEntry.d.ts +203 -0
- package/dist/reactor/longLiveSceneEntry.d.ts.map +1 -0
- package/dist/reactor/longLiveSceneEntry.js +280 -0
- package/dist/reactor/longLiveSceneEntry.js.map +1 -0
- package/dist/reactor/momentCut.d.ts +153 -0
- package/dist/reactor/momentCut.d.ts.map +1 -0
- package/dist/reactor/momentCut.js +142 -0
- package/dist/reactor/momentCut.js.map +1 -0
- package/dist/reactor/promptAddonRegistry.d.ts +39 -3
- package/dist/reactor/promptAddonRegistry.d.ts.map +1 -1
- package/dist/reactor/promptAddonRegistry.js +42 -3
- package/dist/reactor/promptAddonRegistry.js.map +1 -1
- package/dist/reactor/promptTemplatePreview.d.ts +97 -0
- package/dist/reactor/promptTemplatePreview.d.ts.map +1 -0
- package/dist/reactor/promptTemplatePreview.js +185 -0
- package/dist/reactor/promptTemplatePreview.js.map +1 -0
- package/dist/reactor/reactorAvailability.d.ts +80 -0
- package/dist/reactor/reactorAvailability.d.ts.map +1 -0
- package/dist/reactor/reactorAvailability.js +121 -0
- package/dist/reactor/reactorAvailability.js.map +1 -0
- package/dist/reactor/reactorSessionRefusal.d.ts +125 -0
- package/dist/reactor/reactorSessionRefusal.d.ts.map +1 -0
- package/dist/reactor/reactorSessionRefusal.js +197 -0
- package/dist/reactor/reactorSessionRefusal.js.map +1 -0
- package/dist/reactor/reactorTokenScope.d.ts +47 -0
- package/dist/reactor/reactorTokenScope.d.ts.map +1 -0
- package/dist/reactor/reactorTokenScope.js +64 -0
- package/dist/reactor/reactorTokenScope.js.map +1 -0
- package/dist/reactor/resolveDirectorBeats.d.ts +65 -0
- package/dist/reactor/resolveDirectorBeats.d.ts.map +1 -0
- package/dist/reactor/resolveDirectorBeats.js +86 -0
- package/dist/reactor/resolveDirectorBeats.js.map +1 -0
- package/dist/reactor/sanaLiveEdit.d.ts +117 -0
- package/dist/reactor/sanaLiveEdit.d.ts.map +1 -0
- package/dist/reactor/sanaLiveEdit.js +105 -0
- package/dist/reactor/sanaLiveEdit.js.map +1 -0
- package/dist/reactor/sceneEntry.d.ts +66 -9
- package/dist/reactor/sceneEntry.d.ts.map +1 -1
- package/dist/reactor/sceneEntry.js +59 -66
- package/dist/reactor/sceneEntry.js.map +1 -1
- package/dist/reactor/sceneSeedImage.d.ts +199 -0
- package/dist/reactor/sceneSeedImage.d.ts.map +1 -0
- package/dist/reactor/sceneSeedImage.js +239 -0
- package/dist/reactor/sceneSeedImage.js.map +1 -0
- package/dist/reactor/seedImageOrchestrator.d.ts +70 -3
- package/dist/reactor/seedImageOrchestrator.d.ts.map +1 -1
- package/dist/reactor/seedImageOrchestrator.js +92 -28
- package/dist/reactor/seedImageOrchestrator.js.map +1 -1
- package/dist/reactor/toolPromptAddon.d.ts.map +1 -1
- package/dist/reactor/toolPromptAddon.js +16 -2
- package/dist/reactor/toolPromptAddon.js.map +1 -1
- package/dist/reactor/worldMintLoop.d.ts +286 -0
- package/dist/reactor/worldMintLoop.d.ts.map +1 -0
- package/dist/reactor/worldMintLoop.js +381 -0
- package/dist/reactor/worldMintLoop.js.map +1 -0
- package/dist/reactor/worldSteerOutcome.d.ts +98 -0
- package/dist/reactor/worldSteerOutcome.d.ts.map +1 -0
- package/dist/reactor/worldSteerOutcome.js +81 -0
- package/dist/reactor/worldSteerOutcome.js.map +1 -0
- package/dist/retryAfter.d.ts +15 -0
- package/dist/retryAfter.d.ts.map +1 -0
- package/dist/retryAfter.js +75 -0
- package/dist/retryAfter.js.map +1 -0
- package/dist/seriesKey.d.ts +31 -0
- package/dist/seriesKey.d.ts.map +1 -0
- package/dist/seriesKey.js +33 -0
- package/dist/seriesKey.js.map +1 -0
- package/dist/sessionRefresh.d.ts +135 -0
- package/dist/sessionRefresh.d.ts.map +1 -0
- package/dist/sessionRefresh.js +215 -0
- package/dist/sessionRefresh.js.map +1 -0
- package/dist/sharedAudioContext.d.ts +39 -0
- package/dist/sharedAudioContext.d.ts.map +1 -0
- package/dist/sharedAudioContext.js +63 -0
- package/dist/sharedAudioContext.js.map +1 -0
- package/dist/singleFlight.d.ts +51 -0
- package/dist/singleFlight.d.ts.map +1 -0
- package/dist/singleFlight.js +87 -0
- package/dist/singleFlight.js.map +1 -0
- package/dist/storyGraph.d.ts +83 -0
- package/dist/storyGraph.d.ts.map +1 -1
- package/dist/storyGraph.js +169 -4
- package/dist/storyGraph.js.map +1 -1
- package/dist/storyboardMask.d.ts +343 -0
- package/dist/storyboardMask.d.ts.map +1 -0
- package/dist/storyboardMask.js +505 -0
- package/dist/storyboardMask.js.map +1 -0
- package/dist/storyboardTimeline.d.ts +93 -0
- package/dist/storyboardTimeline.d.ts.map +1 -0
- package/dist/storyboardTimeline.js +131 -0
- package/dist/storyboardTimeline.js.map +1 -0
- package/dist/studioAutomation.d.ts +104 -0
- package/dist/studioAutomation.d.ts.map +1 -0
- package/dist/studioAutomation.js +178 -0
- package/dist/studioAutomation.js.map +1 -0
- package/dist/tenantClaim.d.ts +86 -0
- package/dist/tenantClaim.d.ts.map +1 -0
- package/dist/tenantClaim.js +164 -0
- package/dist/tenantClaim.js.map +1 -0
- package/dist/timeFormat.d.ts +25 -0
- package/dist/timeFormat.d.ts.map +1 -1
- package/dist/timeFormat.js +56 -0
- package/dist/timeFormat.js.map +1 -1
- package/dist/toolSchemas.d.ts +58 -10
- package/dist/toolSchemas.d.ts.map +1 -1
- package/dist/toolSchemas.js +37 -9
- package/dist/toolSchemas.js.map +1 -1
- package/dist/transport.d.ts +120 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +282 -0
- package/dist/transport.js.map +1 -0
- package/dist/videoGenFacade.d.ts +63 -0
- package/dist/videoGenFacade.d.ts.map +1 -0
- package/dist/videoGenFacade.js +49 -0
- package/dist/videoGenFacade.js.map +1 -0
- package/dist/visemeScheduler.d.ts +24 -2
- package/dist/visemeScheduler.d.ts.map +1 -1
- package/dist/visemeScheduler.js +31 -2
- package/dist/visemeScheduler.js.map +1 -1
- package/dist/vision/VisionPublisher.d.ts +88 -0
- package/dist/vision/VisionPublisher.d.ts.map +1 -1
- package/dist/vision/VisionPublisher.js +196 -13
- package/dist/vision/VisionPublisher.js.map +1 -1
- package/dist/vision/VisionSourceController.d.ts +67 -1
- package/dist/vision/VisionSourceController.d.ts.map +1 -1
- package/dist/vision/VisionSourceController.js +147 -5
- package/dist/vision/VisionSourceController.js.map +1 -1
- package/dist/vision/index.d.ts +2 -1
- package/dist/vision/index.d.ts.map +1 -1
- package/dist/vision/index.js +2 -1
- package/dist/vision/index.js.map +1 -1
- package/dist/vision/sourceKinds.d.ts +18 -5
- package/dist/vision/sourceKinds.d.ts.map +1 -1
- package/dist/vision/sourceKinds.js +15 -2
- package/dist/vision/sourceKinds.js.map +1 -1
- package/dist/vision/types.d.ts +7 -4
- package/dist/vision/types.d.ts.map +1 -1
- package/dist/vision/visionErrors.d.ts +45 -0
- package/dist/vision/visionErrors.d.ts.map +1 -0
- package/dist/vision/visionErrors.js +66 -0
- package/dist/vision/visionErrors.js.map +1 -0
- package/dist/voiceCloneCaption.d.ts +33 -0
- package/dist/voiceCloneCaption.d.ts.map +1 -0
- package/dist/voiceCloneCaption.js +69 -0
- package/dist/voiceCloneCaption.js.map +1 -0
- package/dist/websocket.d.ts +273 -10
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +79 -0
- package/dist/websocket.js.map +1 -1
- package/dist/workflowAuthoring.d.ts +139 -0
- package/dist/workflowAuthoring.d.ts.map +1 -0
- package/dist/workflowAuthoring.js +557 -0
- package/dist/workflowAuthoring.js.map +1 -0
- package/package.json +15 -5
- package/src/__tests__/adapters-director.test.ts +9 -6
- package/src/__tests__/adapters-extraction.test.ts +175 -0
- package/src/__tests__/adapters-image.test.ts +66 -0
- package/src/__tests__/adapters-momentPolicy.test.ts +218 -0
- package/src/__tests__/adapters-platform.test.ts +110 -4
- package/src/__tests__/adapters-videogen.test.ts +53 -0
- package/src/__tests__/adapters-world.test.ts +117 -7
- package/src/__tests__/admin.enhancement-defaults.test.ts +115 -0
- package/src/__tests__/admin.test.ts +282 -0
- package/src/__tests__/adventures-world-state.test.ts +156 -0
- package/src/__tests__/adventures.test.ts +111 -1
- package/src/__tests__/api-pollers.test.ts +113 -23
- package/src/__tests__/api.adventure-definitions.test.ts +312 -0
- package/src/__tests__/api.anchor-beat.test.ts +75 -0
- package/src/__tests__/api.arc-approval.test.ts +171 -0
- package/src/__tests__/api.arc-beats-floor.test.ts +56 -0
- package/src/__tests__/api.arc-generation.test.ts +168 -0
- package/src/__tests__/api.arc-templates.test.ts +78 -0
- package/src/__tests__/api.assignVideoSeries.test.ts +81 -0
- package/src/__tests__/api.cast-frame-choices.test.ts +141 -0
- package/src/__tests__/api.cutscene-registry.test.ts +148 -0
- package/src/__tests__/api.enhancement-addition-actions.test.ts +137 -0
- package/src/__tests__/api.enrichVideo-serialization.test.ts +116 -0
- package/src/__tests__/api.extraction-base.test.ts +87 -0
- package/src/__tests__/api.generateVideo-cutscene.test.ts +148 -0
- package/src/__tests__/api.job-pipeline-stages.test.ts +128 -0
- package/src/__tests__/api.list-images-filters.test.ts +6 -3
- package/src/__tests__/api.quest-curation.test.ts +169 -0
- package/src/__tests__/api.reprocessVideo.test.ts +71 -0
- package/src/__tests__/api.scene-split-merge.test.ts +129 -0
- package/src/__tests__/api.session-quests.test.ts +184 -0
- package/src/__tests__/api.test.ts +122 -0
- package/src/__tests__/api.transferSeries.test.ts +114 -0
- package/src/__tests__/api.unknown-clusters.test.ts +225 -0
- package/src/__tests__/api.uploadVideo-options.test.ts +156 -0
- package/src/__tests__/arcPreview.test.ts +71 -0
- package/src/__tests__/arcStyleProfile.test.ts +204 -0
- package/src/__tests__/artifacts-delete.test.ts +109 -0
- package/src/__tests__/audio.test.ts +864 -5
- package/src/__tests__/audioDsp.test.ts +196 -0
- package/src/__tests__/audioUnavailable.test.ts +43 -0
- package/src/__tests__/cast.test.ts +10 -1
- package/src/__tests__/castCurationProjection.test.ts +84 -0
- package/src/__tests__/castFramePipelinePending.test.ts +171 -0
- package/src/__tests__/castProjection.test.ts +497 -5
- package/src/__tests__/characterGrounding.test.ts +357 -0
- package/src/__tests__/contract.test.ts +97 -0
- package/src/__tests__/conversation/chatSessionStore.test.ts +243 -0
- package/src/__tests__/conversation/controller.test.ts +211 -0
- package/src/__tests__/conversation/readSequencer.test.ts +52 -0
- package/src/__tests__/conversation/rosterProjection.test.ts +204 -3
- package/src/__tests__/conversation/runtime.test.ts +118 -1
- package/src/__tests__/conversation/voice.test.ts +741 -7
- package/src/__tests__/creatorCuration.test.ts +256 -0
- package/src/__tests__/creatorDashboard.test.ts +444 -0
- package/src/__tests__/creatorUniverse.test.ts +138 -0
- package/src/__tests__/curationWrite.test.ts +179 -0
- package/src/__tests__/decisions.test.ts +89 -0
- package/src/__tests__/designTokens.test.ts +72 -0
- package/src/__tests__/dialogAttribution.test.ts +187 -0
- package/src/__tests__/dmDirectiveToExperience.test.ts +198 -0
- package/src/__tests__/dmWorldEntry.test.ts +2102 -0
- package/src/__tests__/enhancementDiff.test.ts +132 -0
- package/src/__tests__/experienceModelCatalog.test.ts +292 -0
- package/src/__tests__/extractionStageState.test.ts +67 -0
- package/src/__tests__/getVideo.test.ts +95 -0
- package/src/__tests__/graphReadAfterWrite.test.ts +211 -0
- package/src/__tests__/graphSchema.test.ts +55 -4
- package/src/__tests__/happyOysterSeed.test.ts +208 -0
- package/src/__tests__/happyOysterWorld.test.ts +1241 -0
- package/src/__tests__/happyOysterWorldRefusal.test.ts +224 -0
- package/src/__tests__/hiddenWorldLifecycle.test.ts +203 -0
- package/src/__tests__/http.session-refresh.test.ts +424 -0
- package/src/__tests__/http.test.ts +316 -0
- package/src/__tests__/identity.test.ts +132 -0
- package/src/__tests__/loadBundleManifest.test.ts +192 -22
- package/src/__tests__/longLiveSceneEntry.test.ts +371 -0
- package/src/__tests__/me.test.ts +74 -0
- package/src/__tests__/messageContent.test.ts +395 -0
- package/src/__tests__/momentCut.test.ts +229 -0
- package/src/__tests__/mutationEpoch.test.ts +218 -0
- package/src/__tests__/obo.test.ts +159 -0
- package/src/__tests__/opusTransport.test.ts +182 -0
- package/src/__tests__/opusTransportLibopus.test.ts +125 -0
- package/src/__tests__/orgs.test.ts +229 -0
- package/src/__tests__/persona-generation.test.ts +208 -1
- package/src/__tests__/platformAssistant.test.ts +140 -0
- package/src/__tests__/projects.test.ts +338 -0
- package/src/__tests__/promptTemplatePreview.test.ts +160 -0
- package/src/__tests__/reactor/__fixtures__/realFramePromptText.ts +23 -0
- package/src/__tests__/reactor/api-reactor.test.ts +60 -21
- package/src/__tests__/reactor/framePromptCompaction.test.ts +300 -0
- package/src/__tests__/reactor/promptAddonRegistry.test.ts +79 -0
- package/src/__tests__/reactor/reactorTokenScope.test.ts +50 -0
- package/src/__tests__/reactor/resolveDirectorBeats.test.ts +156 -0
- package/src/__tests__/reactor/sceneEntry.test.ts +3 -0
- package/src/__tests__/reactor/sceneSeedImage.test.ts +361 -0
- package/src/__tests__/reactor/seedImageOrchestrator.test.ts +43 -5
- package/src/__tests__/reactor-happyOysterWalk.test.ts +294 -0
- package/src/__tests__/reactorAvailability.test.ts +217 -0
- package/src/__tests__/reactorSessionRefusal.test.ts +189 -0
- package/src/__tests__/regeneration.test.ts +9 -9
- package/src/__tests__/reprocessBlockedReason.test.ts +30 -0
- package/src/__tests__/retryAfter.test.ts +65 -0
- package/src/__tests__/roleClaim.test.ts +102 -0
- package/src/__tests__/sanaLiveEdit.test.ts +84 -0
- package/src/__tests__/seriesKey.test.ts +24 -0
- package/src/__tests__/settings-set9.test.ts +238 -0
- package/src/__tests__/singleFlight.test.ts +348 -0
- package/src/__tests__/storyGraph.test.ts +111 -1
- package/src/__tests__/storyboardFrameCutscene.test.ts +115 -0
- package/src/__tests__/storyboardMask.test.ts +527 -0
- package/src/__tests__/storyboardTimeline.test.ts +228 -0
- package/src/__tests__/storyboards.test.ts +639 -0
- package/src/__tests__/studioAutomation.test.ts +325 -0
- package/src/__tests__/toolSchemas.test.ts +11 -18
- package/src/__tests__/transport.test.ts +312 -0
- package/src/__tests__/videoGenFacade.test.ts +141 -0
- package/src/__tests__/videoGraph.test.ts +43 -1
- package/src/__tests__/visemeScheduler.test.ts +55 -1
- package/src/__tests__/visibility.test.ts +143 -0
- package/src/__tests__/voiceCloneCaption.test.ts +80 -0
- package/src/__tests__/voiceFallback.test.ts +55 -0
- package/src/__tests__/websocket-error-turn-ended.test.ts +49 -0
- package/src/__tests__/websocket-vision.test.ts +141 -0
- package/src/__tests__/websocket.test.ts +75 -1
- package/src/__tests__/workflowAuthoring.test.ts +187 -0
- package/src/__tests__/workflows.test.ts +640 -0
- package/src/__tests__/worldMintLoop.test.ts +448 -0
- package/src/__tests__/worldModelPreference.test.ts +302 -0
- package/src/__tests__/worldModelTradeoffs.test.ts +89 -0
- package/src/__tests__/worldSteerOutcome.test.ts +62 -0
- package/src/adapters/capabilities.ts +39 -3
- package/src/adapters/directorAdapter.ts +5 -4
- package/src/adapters/experienceModelCatalog.ts +538 -0
- package/src/adapters/extractionAdapter.ts +150 -0
- package/src/adapters/imageAdapter.ts +5 -1
- package/src/adapters/index.ts +104 -17
- package/src/adapters/momentDirective.ts +109 -0
- package/src/adapters/momentPolicy.ts +209 -0
- package/src/adapters/registry.ts +1 -1
- package/src/adapters/videoGenAdapter.ts +124 -0
- package/src/adapters/worldAdapter.ts +221 -16
- package/src/adapters/worldModelPreference.ts +247 -0
- package/src/adapters/worldModelTradeoffs.ts +247 -0
- package/src/admin.ts +842 -16
- package/src/api.ts +12687 -3446
- package/src/arcBoardJoin.ts +46 -0
- package/src/arcPreview.ts +103 -0
- package/src/audio.ts +691 -130
- package/src/audioDsp.ts +132 -0
- package/src/audioProtocol.ts +235 -0
- package/src/beatTitles.ts +51 -0
- package/src/castProjection.ts +311 -0
- package/src/characterGrounding.ts +491 -0
- package/src/conversation/binding.ts +13 -0
- package/src/conversation/chatSessionStore.ts +281 -0
- package/src/conversation/controller.ts +96 -3
- package/src/conversation/index.ts +2 -0
- package/src/conversation/participant.ts +16 -0
- package/src/conversation/readSequencer.ts +55 -0
- package/src/conversation/roster.ts +5 -1
- package/src/conversation/rosterProjection.ts +166 -2
- package/src/conversation/runtime.ts +66 -7
- package/src/conversation/types.ts +43 -4
- package/src/conversation/voice.ts +655 -51
- package/src/creatorCuration.ts +316 -0
- package/src/creatorDashboard.ts +344 -0
- package/src/creatorUniverse.ts +222 -0
- package/src/curationWrite.ts +108 -0
- package/src/designTokens.ts +157 -0
- package/src/dialogAttribution.ts +182 -0
- package/src/dmRunWorldReadiness.ts +1168 -0
- package/src/domains/access.ts +92 -0
- package/src/domains/adventureDefinitions.ts +313 -0
- package/src/domains/adventures.ts +557 -0
- package/src/domains/arcs.ts +350 -0
- package/src/domains/artifacts.ts +349 -0
- package/src/domains/chat.ts +338 -0
- package/src/domains/decisions.ts +62 -0
- package/src/domains/documents.ts +389 -0
- package/src/domains/enhancements.ts +259 -0
- package/src/domains/graph.ts +959 -0
- package/src/domains/images.ts +451 -0
- package/src/domains/ingestion.ts +695 -0
- package/src/domains/me.ts +27 -0
- package/src/domains/orgs.ts +168 -0
- package/src/domains/personas.ts +440 -0
- package/src/domains/projects.ts +177 -0
- package/src/domains/quests.ts +587 -0
- package/src/domains/reactor.ts +163 -0
- package/src/domains/showcase.ts +35 -0
- package/src/domains/storyboards.ts +1698 -0
- package/src/domains/studioSettings.ts +149 -0
- package/src/domains/universes.ts +433 -0
- package/src/domains/userDefaults.ts +37 -0
- package/src/domains/visemeBundles.ts +541 -0
- package/src/domains/workflows.ts +376 -0
- package/src/enhancementDiff.ts +171 -0
- package/src/generated/contract.ts +1016 -0
- package/src/graphSchema.ts +154 -6
- package/src/http.ts +295 -11
- package/src/identity.ts +123 -0
- package/src/index.ts +131 -0
- package/src/messageContent.ts +500 -0
- package/src/mutationEpoch.ts +107 -0
- package/src/obo.ts +201 -0
- package/src/opusTransport.ts +268 -0
- package/src/pagination.ts +29 -0
- package/src/platformAssistant.ts +97 -1
- package/src/pollUtils.ts +35 -0
- package/src/questLog.ts +704 -0
- package/src/reactor/dmDirectiveToExperience.ts +636 -0
- package/src/reactor/dmSceneControlPrompt.ts +69 -2
- package/src/reactor/dmWorldEntry.ts +2226 -0
- package/src/reactor/framePromptCompaction.ts +544 -0
- package/src/reactor/frameWorldBind.ts +133 -0
- package/src/reactor/happyOysterSeed.ts +329 -0
- package/src/reactor/happyOysterWalk.ts +541 -0
- package/src/reactor/happyOysterWorld.ts +1270 -0
- package/src/reactor/heliosCommandDispatcher.ts +5 -1
- package/src/reactor/hiddenWorldLifecycle.ts +182 -0
- package/src/reactor/imageCanvas.ts +38 -0
- package/src/reactor/index.ts +78 -0
- package/src/reactor/longLiveCommandDispatcher.ts +23 -8
- package/src/reactor/longLiveSceneEntry.ts +409 -0
- package/src/reactor/momentCut.ts +219 -0
- package/src/reactor/promptAddonRegistry.ts +81 -3
- package/src/reactor/promptTemplatePreview.ts +240 -0
- package/src/reactor/reactorAvailability.ts +155 -0
- package/src/reactor/reactorSessionRefusal.ts +260 -0
- package/src/reactor/reactorTokenScope.ts +69 -0
- package/src/reactor/resolveDirectorBeats.ts +140 -0
- package/src/reactor/sanaLiveEdit.ts +158 -0
- package/src/reactor/sceneEntry.ts +106 -88
- package/src/reactor/sceneSeedImage.ts +338 -0
- package/src/reactor/seedImageOrchestrator.ts +116 -34
- package/src/reactor/toolPromptAddon.ts +16 -2
- package/src/reactor/worldMintLoop.ts +545 -0
- package/src/reactor/worldSteerOutcome.ts +132 -0
- package/src/retryAfter.ts +71 -0
- package/src/seriesKey.ts +42 -0
- package/src/sessionRefresh.ts +237 -0
- package/src/sharedAudioContext.ts +67 -0
- package/src/singleFlight.ts +91 -0
- package/src/storyGraph.ts +247 -4
- package/src/storyboardMask.ts +756 -0
- package/src/storyboardTimeline.ts +220 -0
- package/src/studioAutomation.ts +208 -0
- package/src/tenantClaim.ts +170 -0
- package/src/timeFormat.ts +51 -0
- package/src/toolSchemas.ts +40 -10
- package/src/transport.ts +327 -0
- package/src/videoGenFacade.ts +90 -0
- package/src/visemeScheduler.ts +36 -3
- package/src/vision/VisionPublisher.ts +204 -14
- package/src/vision/VisionSourceController.ts +187 -6
- package/src/vision/__tests__/VisionPublisher.kvs.test.ts +50 -0
- package/src/vision/__tests__/VisionPublisher.test.ts +291 -0
- package/src/vision/__tests__/VisionSourceController.test.ts +376 -6
- package/src/vision/index.ts +5 -1
- package/src/vision/sourceKinds.ts +19 -5
- package/src/vision/types.ts +7 -4
- package/src/vision/visionErrors.ts +70 -0
- package/src/voiceCloneCaption.ts +77 -0
- package/src/websocket.ts +361 -12
- package/src/workflowAuthoring.ts +664 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* §Q `DM.18` — the compaction that makes a real frame launchable.
|
|
3
|
+
*
|
|
4
|
+
* The load-bearing assertions are CONTENT ones, not length ones. A test that
|
|
5
|
+
* only checks `length <= 2000` is satisfied by head-truncation, which is the
|
|
6
|
+
* exact thing this module exists to avoid: the forced truncation that exposed
|
|
7
|
+
* `DM.18` dropped the outdoor half of the beat and produced a plausible,
|
|
8
|
+
* interior-only, WRONG world. So every fit assertion here is paired with an
|
|
9
|
+
* assertion that the beat's cast, action and setting all survived.
|
|
10
|
+
*/
|
|
11
|
+
import {
|
|
12
|
+
FRAME_PROMPT_SECTION_LABELS,
|
|
13
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
14
|
+
compactFramePromptText,
|
|
15
|
+
parseCompiledFramePrompt,
|
|
16
|
+
} from '../../index';
|
|
17
|
+
import {
|
|
18
|
+
REAL_FRAME_PROMPT_LENGTH,
|
|
19
|
+
REAL_FRAME_PROMPT_TEXT,
|
|
20
|
+
} from './__fixtures__/realFramePromptText';
|
|
21
|
+
|
|
22
|
+
/** The section value, or `null` when the section is gone. */
|
|
23
|
+
function section(text: string, label: string): string | null {
|
|
24
|
+
const line = text.split('\n').find(l => l.startsWith(`${label}: `));
|
|
25
|
+
return line === undefined ? null : line.slice(label.length + 2);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe('the real 2363-char frame prompt (the DM.18 fixture)', () => {
|
|
29
|
+
it('is the string that blocked the launch — over the cap as served', () => {
|
|
30
|
+
expect(REAL_FRAME_PROMPT_TEXT).toHaveLength(REAL_FRAME_PROMPT_LENGTH);
|
|
31
|
+
expect(REAL_FRAME_PROMPT_LENGTH).toBeGreaterThan(
|
|
32
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const compaction = compactFramePromptText(
|
|
37
|
+
REAL_FRAME_PROMPT_TEXT,
|
|
38
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
it('fits the vendor cap', () => {
|
|
42
|
+
expect(compaction.text.length).toBeLessThanOrEqual(
|
|
43
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
44
|
+
);
|
|
45
|
+
expect(compaction.originalLength).toBe(REAL_FRAME_PROMPT_LENGTH);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('keeps the beat ENTIRE — including the outdoor half truncation ate', () => {
|
|
49
|
+
// Verbatim from the fixture's `Action:` line. The head-truncation that
|
|
50
|
+
// exposed DM.18 cut exactly here, which is why the world came back
|
|
51
|
+
// interior-only.
|
|
52
|
+
expect(compaction.text).toContain(
|
|
53
|
+
'They pick their way through the burning Battlefield, dodging collapsing archways and stray Soldiers',
|
|
54
|
+
);
|
|
55
|
+
expect(section(compaction.text, 'Action')).toBe(
|
|
56
|
+
section(REAL_FRAME_PROMPT_TEXT, 'Action'),
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('keeps the CAST — both names and their descriptors', () => {
|
|
61
|
+
expect(section(compaction.text, 'Characters')).toBe(
|
|
62
|
+
section(REAL_FRAME_PROMPT_TEXT, 'Characters'),
|
|
63
|
+
);
|
|
64
|
+
expect(compaction.text).toContain('Girl —');
|
|
65
|
+
expect(compaction.text).toContain('Soldiers —');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('keeps the ACTION beats a world has to render', () => {
|
|
69
|
+
for (const phrase of [
|
|
70
|
+
"Sova's Last Counsel",
|
|
71
|
+
'the Girl paces the ruined chamber while the Boy wraps his side wound',
|
|
72
|
+
'Sword inscription glowing *UNTOLD* on her blade',
|
|
73
|
+
"the star-map's secondary notation",
|
|
74
|
+
]) {
|
|
75
|
+
expect(compaction.text).toContain(phrase);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('keeps the SETTING', () => {
|
|
80
|
+
expect(compaction.text).toContain('Scene: Battlefield');
|
|
81
|
+
expect(compaction.text).toContain(
|
|
82
|
+
'A massive battle erupts, with explosions and destruction',
|
|
83
|
+
);
|
|
84
|
+
expect(compaction.text).toContain(
|
|
85
|
+
'The girl is seen running through the chaos',
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('sheds only ceremony and arc-level context, in ladder order', () => {
|
|
90
|
+
// MINIMAL shed: the ladder stops the instant the text fits, so the board's
|
|
91
|
+
// arc context is thinned by exactly one conflict rather than deleted.
|
|
92
|
+
expect(compaction.shed).toEqual([
|
|
93
|
+
'references',
|
|
94
|
+
'scene-themes',
|
|
95
|
+
'scene-stake',
|
|
96
|
+
]);
|
|
97
|
+
// The reference-slot line addresses image slots `createWorld` does not have.
|
|
98
|
+
expect(compaction.text).not.toContain('@Image1');
|
|
99
|
+
expect(compaction.text).not.toContain('References:');
|
|
100
|
+
// Themes are abstract nouns, board-wide, not depictable.
|
|
101
|
+
expect(compaction.text).not.toContain('Themes:');
|
|
102
|
+
// The stakes list is shed TAIL FIRST, so the primary conflict survives and
|
|
103
|
+
// the last one is the only story content that left.
|
|
104
|
+
expect(compaction.text).toContain(
|
|
105
|
+
'At stake: Siblings Hunted Across a Burning Galaxy',
|
|
106
|
+
);
|
|
107
|
+
expect(compaction.text).not.toContain("The King's Monopoly on Power");
|
|
108
|
+
expect(compaction.text).not.toContain('five Holy Blades');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('cuts only at clause boundaries — no new mid-word edge', () => {
|
|
112
|
+
// The fixture's own `location` ends mid-word ("destr") because the SERVER
|
|
113
|
+
// clipped it. The compacted Scene must carry that setting BYTE-IDENTICAL:
|
|
114
|
+
// this module adds no second such edge and removes nothing from it.
|
|
115
|
+
const setting = (text: string): string =>
|
|
116
|
+
(section(text, 'Scene') ?? '').split(' — At stake: ')[0];
|
|
117
|
+
expect(setting(compaction.text)).toBe(setting(REAL_FRAME_PROMPT_TEXT));
|
|
118
|
+
// The Action ends exactly where the server left it, not where a cap landed.
|
|
119
|
+
expect(compaction.text.endsWith('They find the old arc')).toBe(true);
|
|
120
|
+
expect(REAL_FRAME_PROMPT_TEXT.endsWith('— Battlefield')).toBe(true);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
describe('compactFramePromptText', () => {
|
|
125
|
+
it('returns a prompt that already fits BYTE-IDENTICAL', () => {
|
|
126
|
+
const fits = 'Scene: A drowned cathedral\nAction: The Girl kneels.';
|
|
127
|
+
const result = compactFramePromptText(fits, HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
128
|
+
expect(result.text).toBe(fits);
|
|
129
|
+
expect(result.shed).toEqual([]);
|
|
130
|
+
expect(result.originalLength).toBe(fits.length);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('sheds References before anything else', () => {
|
|
134
|
+
const kept = ['Scene: A burning hall', 'Action: ' + 'a'.repeat(1960)];
|
|
135
|
+
const text = [
|
|
136
|
+
...kept,
|
|
137
|
+
'References: @Image1: A burning hall; @Image2: The Girl',
|
|
138
|
+
].join('\n');
|
|
139
|
+
expect(text.length).toBeGreaterThan(HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
140
|
+
const result = compactFramePromptText(text, HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
141
|
+
expect(result.shed).toEqual(['references']);
|
|
142
|
+
expect(result.text).toBe(kept.join('\n'));
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('sheds a Negative section — createWorld has no negative channel', () => {
|
|
146
|
+
const text = [
|
|
147
|
+
'Action: ' + 'a'.repeat(1960),
|
|
148
|
+
'Negative: blurry, watermark, text',
|
|
149
|
+
].join('\n');
|
|
150
|
+
const result = compactFramePromptText(text, HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
151
|
+
expect(result.shed).toEqual(['negative']);
|
|
152
|
+
expect(result.text).toBe('Action: ' + 'a'.repeat(1960));
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('keeps every cast NAME when the descriptors have to go', () => {
|
|
156
|
+
const cast = 'Girl — ' + 'b'.repeat(300) + ', Boy — ' + 'c'.repeat(300);
|
|
157
|
+
const result = compactFramePromptText(
|
|
158
|
+
[`Characters: ${cast}`, 'Action: ' + 'a'.repeat(1800)].join('\n'),
|
|
159
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
160
|
+
);
|
|
161
|
+
expect(result.shed).toEqual(['cast-descriptors']);
|
|
162
|
+
expect(section(result.text, 'Characters')).toBe('Girl, Boy');
|
|
163
|
+
expect(result.text.length).toBeLessThanOrEqual(
|
|
164
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('keeps the roster intact when a descriptor CONTAINS COMMAS', () => {
|
|
169
|
+
// The real fixture's descriptors do ("…discovers a Holy Blade in a cave,
|
|
170
|
+
// becomes bound to it, and is hunted…"). Splitting on the entry separator
|
|
171
|
+
// would shred the roster into fragments and emit them as cast members.
|
|
172
|
+
const cast =
|
|
173
|
+
'Girl — the protagonist, bound to a blade, hunted across a galaxy' +
|
|
174
|
+
', Soldiers — forces of the King, relentless, everywhere';
|
|
175
|
+
const result = compactFramePromptText(
|
|
176
|
+
[`Characters: ${cast}`, 'Action: ' + 'a'.repeat(1900)].join('\n'),
|
|
177
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
178
|
+
);
|
|
179
|
+
expect(result.shed).toEqual(['cast-descriptors']);
|
|
180
|
+
expect(section(result.text, 'Characters')).toBe('Girl, Soldiers');
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('keeps a DESCRIPTORLESS member when given the structured cast', () => {
|
|
184
|
+
// `_describe` writes a bare name when the graph had no descriptor, and in
|
|
185
|
+
// the flattened line that name is indistinguishable from the previous
|
|
186
|
+
// entry's descriptor prose. The frame carries the cast structurally, so the
|
|
187
|
+
// rung reads it from there.
|
|
188
|
+
const cast = 'Yang — a stoic swordsman, The Colonel';
|
|
189
|
+
const result = compactFramePromptText(
|
|
190
|
+
[`Characters: ${cast}`, 'Action: ' + 'a'.repeat(1960)].join('\n'),
|
|
191
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
192
|
+
{ castInWords: ['Yang — a stoic swordsman', 'The Colonel'] },
|
|
193
|
+
);
|
|
194
|
+
expect(result.shed).toEqual(['cast-descriptors']);
|
|
195
|
+
expect(section(result.text, 'Characters')).toBe('Yang, The Colonel');
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('IGNORES a structured cast that has drifted from the compiled line', () => {
|
|
199
|
+
// `frame.prompt` is the CURRENT structure; `promptText` is the variant's
|
|
200
|
+
// compiled snapshot. A hint naming someone the compiled line never had must
|
|
201
|
+
// not inject a roster the frame did not ship with.
|
|
202
|
+
const result = compactFramePromptText(
|
|
203
|
+
[
|
|
204
|
+
'Characters: Yang — a stoic swordsman',
|
|
205
|
+
'Action: ' + 'a'.repeat(1970),
|
|
206
|
+
].join('\n'),
|
|
207
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
208
|
+
{ castInWords: ['Yang — a stoic swordsman', 'Someone Added Later'] },
|
|
209
|
+
);
|
|
210
|
+
expect(result.shed).toEqual(['cast-descriptors']);
|
|
211
|
+
expect(section(result.text, 'Characters')).toBe('Yang');
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it('keeps LEADING descriptorless members without any hint', () => {
|
|
215
|
+
// Nothing before the first " — " can be a descriptor, so this case is
|
|
216
|
+
// unambiguous from the flattened line alone.
|
|
217
|
+
const result = compactFramePromptText(
|
|
218
|
+
[
|
|
219
|
+
'Characters: The Colonel, Yang — a stoic swordsman, hard to read',
|
|
220
|
+
'Action: ' + 'a'.repeat(1950),
|
|
221
|
+
].join('\n'),
|
|
222
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
223
|
+
);
|
|
224
|
+
expect(result.shed).toEqual(['cast-descriptors']);
|
|
225
|
+
expect(section(result.text, 'Characters')).toBe('The Colonel, Yang');
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it('REFUSES the cast rung rather than mangle an unreadable roster', () => {
|
|
229
|
+
// A descriptor containing " — " makes the next name unlocatable. The rung
|
|
230
|
+
// is skipped and the ladder falls through to dropping the section whole.
|
|
231
|
+
const cast = 'Girl — a hero — of sorts' + ', Boy — brave';
|
|
232
|
+
const result = compactFramePromptText(
|
|
233
|
+
[`Characters: ${cast}`, 'Action: ' + 'a'.repeat(1980)].join('\n'),
|
|
234
|
+
HAPPY_OYSTER_PROMPT_MAX_CHARS,
|
|
235
|
+
);
|
|
236
|
+
expect(result.shed).toEqual(['characters']);
|
|
237
|
+
expect(section(result.text, 'Characters')).toBeNull();
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
it('REFUSES to cut the Action — an over-cap beat stays over the cap', () => {
|
|
241
|
+
const action = 'a'.repeat(HAPPY_OYSTER_PROMPT_MAX_CHARS + 1);
|
|
242
|
+
const text = [
|
|
243
|
+
'Scene: A burning hall — Themes: war',
|
|
244
|
+
'Characters: Girl — the protagonist',
|
|
245
|
+
`Action: ${action}`,
|
|
246
|
+
'References: @Image1: A burning hall',
|
|
247
|
+
].join('\n');
|
|
248
|
+
const result = compactFramePromptText(text, HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
249
|
+
// Everything sheddable is gone and the beat is untouched, so the caller's
|
|
250
|
+
// cap check still refuses the launch — loudly, instead of launching half a
|
|
251
|
+
// beat.
|
|
252
|
+
expect(result.text).toBe(`Action: ${action}`);
|
|
253
|
+
expect(result.text.length).toBeGreaterThan(HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
it('carries an unrecognised line through untouched and never sheds it', () => {
|
|
257
|
+
// A section added to `compiled_text` and not mirrored here degrades to
|
|
258
|
+
// "cannot be shed", never to "silently corrupted".
|
|
259
|
+
const text = ['Foley: ' + 'f'.repeat(2100), 'Action: The Girl runs.'].join(
|
|
260
|
+
'\n',
|
|
261
|
+
);
|
|
262
|
+
const result = compactFramePromptText(text, HAPPY_OYSTER_PROMPT_MAX_CHARS);
|
|
263
|
+
expect(result.shed).toEqual([]);
|
|
264
|
+
expect(result.text).toBe(text);
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
describe('parseCompiledFramePrompt', () => {
|
|
269
|
+
it('round-trips the real prompt: label set and values are unchanged', () => {
|
|
270
|
+
const parsed = parseCompiledFramePrompt(REAL_FRAME_PROMPT_TEXT);
|
|
271
|
+
expect(parsed.sections.map(s => s.label)).toEqual([
|
|
272
|
+
'Scene',
|
|
273
|
+
'Characters',
|
|
274
|
+
'Action',
|
|
275
|
+
'References',
|
|
276
|
+
]);
|
|
277
|
+
expect(parsed.scene).not.toBeNull();
|
|
278
|
+
expect(parsed.scene?.stakes).toHaveLength(5);
|
|
279
|
+
expect(parsed.scene?.themes).toBe(
|
|
280
|
+
"Sibling loyalty, survival, tyranny, war's cost, Tyranny and domination",
|
|
281
|
+
);
|
|
282
|
+
expect(parsed.scene?.artDirection).toBe('');
|
|
283
|
+
expect(parsed.scene?.setting).toBe(
|
|
284
|
+
'Battlefield — A massive battle erupts, with explosions and destr — Battlefield: A massive battle erupts, with explosions and destruction. The girl is seen running through the chaos, highlighting the scale of the conflict.',
|
|
285
|
+
);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
it('mirrors every label compiled_text emits', () => {
|
|
289
|
+
expect([...FRAME_PROMPT_SECTION_LABELS]).toEqual([
|
|
290
|
+
'Scene',
|
|
291
|
+
'Characters',
|
|
292
|
+
'Action',
|
|
293
|
+
'Camera',
|
|
294
|
+
'Style',
|
|
295
|
+
'Dialogue',
|
|
296
|
+
'References',
|
|
297
|
+
'Negative',
|
|
298
|
+
]);
|
|
299
|
+
});
|
|
300
|
+
});
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
* deletion of entries that the persona UI relies on.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { StudioAddon } from '../../api';
|
|
6
7
|
import { HELIOS_WORLD_STEERING_ADDON_ID } from '../../reactor/toolPromptAddonId';
|
|
8
|
+
import { getHeliosSteeringAddonText } from '../../reactor/toolPromptAddon';
|
|
7
9
|
import {
|
|
8
10
|
KNOWN_PROMPT_ADDONS,
|
|
11
|
+
getMergedPromptAddon,
|
|
9
12
|
getPromptAddonDescriptor,
|
|
13
|
+
mergePromptAddons,
|
|
10
14
|
} from '../../reactor/promptAddonRegistry';
|
|
11
15
|
|
|
12
16
|
describe('KNOWN_PROMPT_ADDONS', () => {
|
|
@@ -40,3 +44,78 @@ describe('getPromptAddonDescriptor', () => {
|
|
|
40
44
|
expect(getPromptAddonDescriptor('not-a-real-addon')).toBeUndefined();
|
|
41
45
|
});
|
|
42
46
|
});
|
|
47
|
+
|
|
48
|
+
const STUDIO_ROWS: StudioAddon[] = [
|
|
49
|
+
{
|
|
50
|
+
addon_id: 'emotion-markup',
|
|
51
|
+
name: 'Emotion Markup',
|
|
52
|
+
description: 'Emotion tags for facial animation.',
|
|
53
|
+
content: 'Express your emotional state with [happy] … tags.',
|
|
54
|
+
enabled_by_default: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
addon_id: 'output-style',
|
|
58
|
+
name: 'Output Style',
|
|
59
|
+
description: 'Markdown formatting conventions.',
|
|
60
|
+
content: 'Format responses using markdown.',
|
|
61
|
+
enabled_by_default: false,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
describe('mergePromptAddons (SET.8 — unified registry view)', () => {
|
|
66
|
+
it('lists code-defined entries first (locked source), then studio rows', () => {
|
|
67
|
+
const merged = mergePromptAddons(STUDIO_ROWS);
|
|
68
|
+
expect(merged.map(a => a.id)).toEqual([
|
|
69
|
+
HELIOS_WORLD_STEERING_ADDON_ID,
|
|
70
|
+
'emotion-markup',
|
|
71
|
+
'output-style',
|
|
72
|
+
]);
|
|
73
|
+
expect(merged[0].source).toBe('code');
|
|
74
|
+
expect(merged[1].source).toBe('studio');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('carries studio bodies + enabledByDefault, and the code body via getText', () => {
|
|
78
|
+
const merged = mergePromptAddons(STUDIO_ROWS);
|
|
79
|
+
const studio = merged.find(a => a.id === 'emotion-markup');
|
|
80
|
+
expect(studio?.content).toContain('[happy]');
|
|
81
|
+
expect(studio?.enabledByDefault).toBe(true);
|
|
82
|
+
const code = merged.find(a => a.id === HELIOS_WORLD_STEERING_ADDON_ID);
|
|
83
|
+
// Single-sourced from the canonical scene-control module — never copied.
|
|
84
|
+
expect(code?.content).toBe(getHeliosSteeringAddonText());
|
|
85
|
+
expect(code?.enabledByDefault).toBeUndefined();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('drops a studio row whose id collides with a code-defined addon', () => {
|
|
89
|
+
const merged = mergePromptAddons([
|
|
90
|
+
{
|
|
91
|
+
addon_id: HELIOS_WORLD_STEERING_ADDON_ID,
|
|
92
|
+
name: 'Shadowing attempt',
|
|
93
|
+
description: '',
|
|
94
|
+
content: 'must not shadow the code-defined body',
|
|
95
|
+
enabled_by_default: true,
|
|
96
|
+
},
|
|
97
|
+
]);
|
|
98
|
+
const entries = merged.filter(a => a.id === HELIOS_WORLD_STEERING_ADDON_ID);
|
|
99
|
+
expect(entries).toHaveLength(1);
|
|
100
|
+
expect(entries[0].source).toBe('code');
|
|
101
|
+
expect(entries[0].label).toBe('Scene control');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('with no studio rows equals the code-defined set', () => {
|
|
105
|
+
expect(mergePromptAddons([]).map(a => a.id)).toEqual(
|
|
106
|
+
KNOWN_PROMPT_ADDONS.map(a => a.id),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
describe('getMergedPromptAddon', () => {
|
|
112
|
+
it('resolves ids from both provenances and undefined for unknown ids', () => {
|
|
113
|
+
expect(
|
|
114
|
+
getMergedPromptAddon('output-style', STUDIO_ROWS)?.label,
|
|
115
|
+
).toBe('Output Style');
|
|
116
|
+
expect(
|
|
117
|
+
getMergedPromptAddon(HELIOS_WORLD_STEERING_ADDON_ID, STUDIO_ROWS)?.source,
|
|
118
|
+
).toBe('code');
|
|
119
|
+
expect(getMergedPromptAddon('nope', STUDIO_ROWS)).toBeUndefined();
|
|
120
|
+
});
|
|
121
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* §Q WORLD.32 — the models a browser Reactor token may be scoped to, and the
|
|
3
|
+
* admin switch set each is behind. The broker refuses anything else before it
|
|
4
|
+
* mints, so this list IS the browser's reach.
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
happyOysterReactorModelName,
|
|
8
|
+
heliosWorldAdapter,
|
|
9
|
+
longLiveWorldAdapter,
|
|
10
|
+
reactorTokenModels,
|
|
11
|
+
reactorTokenSurface,
|
|
12
|
+
SANA_STREAMING_MODEL_ID,
|
|
13
|
+
HAPPY_OYSTER_MODEL_ID,
|
|
14
|
+
} from '../../index';
|
|
15
|
+
|
|
16
|
+
describe('reactorTokenModels', () => {
|
|
17
|
+
it('is exactly the modelNames the surfaces open: the world registry, Sana, both HappyOyster modes', () => {
|
|
18
|
+
expect([...reactorTokenModels()].sort()).toEqual(
|
|
19
|
+
[
|
|
20
|
+
heliosWorldAdapter.id,
|
|
21
|
+
longLiveWorldAdapter.id,
|
|
22
|
+
SANA_STREAMING_MODEL_ID,
|
|
23
|
+
'reactor/happy-oyster-adventure',
|
|
24
|
+
'reactor/happy-oyster-director',
|
|
25
|
+
].sort(),
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('maps each HappyOyster mode to its mode-fixed Reactor model', () => {
|
|
30
|
+
expect(happyOysterReactorModelName('adventure')).toBe('reactor/happy-oyster-adventure');
|
|
31
|
+
expect(happyOysterReactorModelName('directing')).toBe('reactor/happy-oyster-director');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe('reactorTokenSurface', () => {
|
|
36
|
+
it('puts Sana behind BOTH switches and every other model behind the Reactor switch', () => {
|
|
37
|
+
expect(reactorTokenSurface(SANA_STREAMING_MODEL_ID)).toBe('sana-live-edit');
|
|
38
|
+
expect(reactorTokenSurface('helios')).toBe('reactor');
|
|
39
|
+
expect(reactorTokenSurface('longlive-v2')).toBe('reactor');
|
|
40
|
+
expect(reactorTokenSurface('reactor/happy-oyster-director')).toBe('reactor');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('refuses what no surface opens — including the HappyOyster CATALOG id', () => {
|
|
44
|
+
expect(reactorTokenSurface(HAPPY_OYSTER_MODEL_ID)).toBeNull();
|
|
45
|
+
expect(reactorTokenSurface('reactor/helios-pro')).toBeNull();
|
|
46
|
+
expect(reactorTokenSurface('')).toBeNull();
|
|
47
|
+
expect(reactorTokenSurface(undefined)).toBeNull();
|
|
48
|
+
expect(reactorTokenSurface(['helios'])).toBeNull();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for `resolveDirectorBeats` — the beats-centric source-selection policy
|
|
3
|
+
* that powers the Director's no-click auto-load. Covers:
|
|
4
|
+
* - story graph WITH scenes → story path (deriveStoryTimeline), no enrichment fetch,
|
|
5
|
+
* - story graph with 0 scenes (the Pegasus 1.5 auto-SME case: Acts but no
|
|
6
|
+
* Scenes) → falls back to the latest SUCCEEDED enrichment's `shots[]`,
|
|
7
|
+
* - latest-succeeded selection (status + result + recency ordering),
|
|
8
|
+
* - neither source → `source: 'none'`, empty beats,
|
|
9
|
+
* - options (maxChunks) forwarded to the mapper.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
resolveDirectorBeats,
|
|
14
|
+
DIRECTOR_BEAT_SOURCE,
|
|
15
|
+
type DirectorBeatsClient,
|
|
16
|
+
} from '../../reactor/resolveDirectorBeats';
|
|
17
|
+
import type {
|
|
18
|
+
EnrichmentRecord,
|
|
19
|
+
ListEnrichmentsResponse,
|
|
20
|
+
VideoGraphResponse,
|
|
21
|
+
} from '../../api';
|
|
22
|
+
|
|
23
|
+
/** A 2-scene collapsed story graph the lifted `deriveScenes` parses. */
|
|
24
|
+
function storyGraph(): VideoGraphResponse {
|
|
25
|
+
return {
|
|
26
|
+
traceId: 't-1',
|
|
27
|
+
videoId: 'v-1',
|
|
28
|
+
nodes: [
|
|
29
|
+
{ id: 'n-act1', label: 'Act', properties: { actId: 'a1', title: 'Act One', index: 1, t0: 0, t1: 120 } },
|
|
30
|
+
{ id: 'n-s1', label: 'Scene', properties: { sceneId: 's1', title: 'Opener', index: 1, t0: 0, t1: 60, summary: 'A quiet dawn.' } },
|
|
31
|
+
{ id: 'n-s2', label: 'Scene', properties: { sceneId: 's2', title: 'The Chase', index: 2, t0: 60, t1: 120, summary: 'A frantic pursuit.' } },
|
|
32
|
+
],
|
|
33
|
+
edges: [
|
|
34
|
+
{ id: 'e1', source: 'n-act1', target: 'n-s1', type: 'CONTAINS', properties: {} },
|
|
35
|
+
{ id: 'e2', source: 'n-act1', target: 'n-s2', type: 'CONTAINS', properties: {} },
|
|
36
|
+
],
|
|
37
|
+
} as unknown as VideoGraphResponse;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** A graph with Acts but NO Scene nodes — the Pegasus 1.5 auto-SME shape. */
|
|
41
|
+
function actsOnlyGraph(): VideoGraphResponse {
|
|
42
|
+
return {
|
|
43
|
+
traceId: 't-2',
|
|
44
|
+
videoId: 'v-2',
|
|
45
|
+
nodes: [
|
|
46
|
+
{ id: 'n-act1', label: 'Act', properties: { actId: 'a1', title: 'Act One', index: 1, t0: 0, t1: 120 } },
|
|
47
|
+
],
|
|
48
|
+
edges: [],
|
|
49
|
+
} as unknown as VideoGraphResponse;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function succeededEnrichment(
|
|
53
|
+
overrides: Partial<EnrichmentRecord> = {},
|
|
54
|
+
): EnrichmentRecord {
|
|
55
|
+
return {
|
|
56
|
+
enrichmentId: 'enr-1',
|
|
57
|
+
videoId: 'v-2',
|
|
58
|
+
jobId: 'job-1',
|
|
59
|
+
status: 'SUCCEEDED',
|
|
60
|
+
createdAt: '2026-01-01',
|
|
61
|
+
completedAt: '2026-01-01',
|
|
62
|
+
result: {
|
|
63
|
+
shots: [
|
|
64
|
+
{ shotIndex: 0, t0: 0, t1: 10, caption: 'Opening shot of the city.' },
|
|
65
|
+
{ shotIndex: 1, t0: 10, t1: 25, caption: 'Hero descends into the depths.' },
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
...overrides,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function makeClient(over: Partial<DirectorBeatsClient> = {}): {
|
|
73
|
+
client: DirectorBeatsClient;
|
|
74
|
+
getVideoGraph: jest.Mock;
|
|
75
|
+
getEnrichments: jest.Mock;
|
|
76
|
+
getEnrichment: jest.Mock;
|
|
77
|
+
} {
|
|
78
|
+
const getVideoGraph = jest.fn();
|
|
79
|
+
const getEnrichments = jest.fn();
|
|
80
|
+
const getEnrichment = jest.fn();
|
|
81
|
+
const client: DirectorBeatsClient = {
|
|
82
|
+
getVideoGraph: over.getVideoGraph ?? getVideoGraph,
|
|
83
|
+
getEnrichments: over.getEnrichments ?? getEnrichments,
|
|
84
|
+
getEnrichment: over.getEnrichment ?? getEnrichment,
|
|
85
|
+
};
|
|
86
|
+
return { client, getVideoGraph, getEnrichments, getEnrichment };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
describe('resolveDirectorBeats', () => {
|
|
90
|
+
it('uses the STORY graph when it has scenes (no enrichment fetch)', async () => {
|
|
91
|
+
const { client, getVideoGraph, getEnrichments } = makeClient();
|
|
92
|
+
getVideoGraph.mockResolvedValue(storyGraph());
|
|
93
|
+
|
|
94
|
+
const result = await resolveDirectorBeats(client, 'v-1', { maxChunks: 30 });
|
|
95
|
+
|
|
96
|
+
expect(result.source).toBe(DIRECTOR_BEAT_SOURCE.STORY);
|
|
97
|
+
expect(result.sceneCount).toBe(2);
|
|
98
|
+
expect(result.beats.length).toBe(2);
|
|
99
|
+
expect(result.enrichmentId).toBeNull();
|
|
100
|
+
// The story path short-circuits — the enrichment endpoints are never hit.
|
|
101
|
+
expect(getEnrichments).not.toHaveBeenCalled();
|
|
102
|
+
expect(getVideoGraph).toHaveBeenCalledWith('v-1', 'story');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('falls back to raw enrichment when the story graph has 0 scenes (Pegasus 1.5)', async () => {
|
|
106
|
+
const { client, getVideoGraph, getEnrichments, getEnrichment } = makeClient();
|
|
107
|
+
getVideoGraph.mockResolvedValue(actsOnlyGraph());
|
|
108
|
+
getEnrichments.mockResolvedValue({
|
|
109
|
+
traceId: 't',
|
|
110
|
+
results: [succeededEnrichment()],
|
|
111
|
+
} satisfies ListEnrichmentsResponse);
|
|
112
|
+
getEnrichment.mockResolvedValue(succeededEnrichment());
|
|
113
|
+
|
|
114
|
+
const result = await resolveDirectorBeats(client, 'v-2', { maxChunks: 48 });
|
|
115
|
+
|
|
116
|
+
expect(result.source).toBe(DIRECTOR_BEAT_SOURCE.ENRICHMENT);
|
|
117
|
+
expect(result.sceneCount).toBe(0);
|
|
118
|
+
expect(result.enrichmentId).toBe('enr-1');
|
|
119
|
+
expect(result.beats.length).toBe(2); // one beat per shot
|
|
120
|
+
expect(getEnrichment).toHaveBeenCalledWith('enr-1');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('picks the most recent SUCCEEDED enrichment with a result', async () => {
|
|
124
|
+
const { client, getVideoGraph, getEnrichments, getEnrichment } = makeClient();
|
|
125
|
+
getVideoGraph.mockResolvedValue(actsOnlyGraph());
|
|
126
|
+
getEnrichments.mockResolvedValue({
|
|
127
|
+
traceId: 't',
|
|
128
|
+
results: [
|
|
129
|
+
succeededEnrichment({ enrichmentId: 'old', completedAt: '2026-01-01' }),
|
|
130
|
+
succeededEnrichment({ enrichmentId: 'new', completedAt: '2026-06-30' }),
|
|
131
|
+
succeededEnrichment({ enrichmentId: 'failed', status: 'FAILED' }),
|
|
132
|
+
succeededEnrichment({ enrichmentId: 'no-result', result: undefined }),
|
|
133
|
+
],
|
|
134
|
+
});
|
|
135
|
+
getEnrichment.mockResolvedValue(
|
|
136
|
+
succeededEnrichment({ enrichmentId: 'new', completedAt: '2026-06-30' }),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
const result = await resolveDirectorBeats(client, 'v-2');
|
|
140
|
+
|
|
141
|
+
expect(result.enrichmentId).toBe('new');
|
|
142
|
+
expect(getEnrichment).toHaveBeenCalledWith('new');
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('returns source "none" when neither scenes nor a succeeded enrichment exist', async () => {
|
|
146
|
+
const { client, getVideoGraph, getEnrichments } = makeClient();
|
|
147
|
+
getVideoGraph.mockResolvedValue(actsOnlyGraph());
|
|
148
|
+
getEnrichments.mockResolvedValue({ traceId: 't', results: [] });
|
|
149
|
+
|
|
150
|
+
const result = await resolveDirectorBeats(client, 'v-2');
|
|
151
|
+
|
|
152
|
+
expect(result.source).toBe(DIRECTOR_BEAT_SOURCE.NONE);
|
|
153
|
+
expect(result.beats).toEqual([]);
|
|
154
|
+
expect(result.enrichmentId).toBeNull();
|
|
155
|
+
});
|
|
156
|
+
});
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
IMAGE_FIRST_DIRECTIVE,
|
|
29
29
|
prepareSceneEntry,
|
|
30
30
|
} from '../../reactor/sceneEntry';
|
|
31
|
+
import { SCENE_SEED_SOURCES } from '../../reactor/sceneSeedImage';
|
|
31
32
|
|
|
32
33
|
type AnyMock = jest.Mock;
|
|
33
34
|
|
|
@@ -378,6 +379,8 @@ describe('bootstrapSceneInReactor', () => {
|
|
|
378
379
|
upsampledPrompt: 'Helios paragraph.',
|
|
379
380
|
sourceTimestamp: 42,
|
|
380
381
|
imageId: 'img-scene-1',
|
|
382
|
+
seedSource: SCENE_SEED_SOURCES.FILM_EXTRACT,
|
|
383
|
+
seedImageUrl: null,
|
|
381
384
|
entityContext: { name: 'scene' },
|
|
382
385
|
personaContext: null,
|
|
383
386
|
};
|