@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,401 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* experienceModelCatalog — the SINGLE source of truth for the world +
|
|
3
|
+
* generation model catalog shown by the experience-surface model switcher on
|
|
4
|
+
* EVERY surface it appears. Resolves tech-debt #415 (registry single-source)
|
|
5
|
+
* and sets up #501/#503/#506.
|
|
6
|
+
*
|
|
7
|
+
* The `ExperienceModelSwitcher` is mounted on exactly THREE surfaces today
|
|
8
|
+
* (`web/app/interactive/page.tsx`, `web/app/interactive/director/page.tsx`,
|
|
9
|
+
* `web/app/watch/[videoId]/ExperienceChromeControls.tsx`); the world-explorer
|
|
10
|
+
* demo reads a single catalog ROW instead of rendering the switcher. There is
|
|
11
|
+
* no separate DM/play surface — `web/app/play` does not exist (§Q SB-W.5 audit,
|
|
12
|
+
* 2026-07-25; the earlier "DM-driven play surface" wording was aspirational).
|
|
13
|
+
*
|
|
14
|
+
* WHY THIS EXISTS (DRY — 2026-06-18, owner request): the model pickers used to
|
|
15
|
+
* be FORKED — `/interactive` had its own `WorldModelPicker` (a `<select>`
|
|
16
|
+
* filtered to seed-capable models, projecting `worldModelOptions()`), while
|
|
17
|
+
* watch/play had `WatchWorldModelSwitcher` (a button toggle, projecting
|
|
18
|
+
* `watchWorldModelOptions()` which APPENDED a Sana row the world registry never
|
|
19
|
+
* knew about). Both ultimately read the SAME `createWorldRegistry()`, but each
|
|
20
|
+
* re-derived its own capability mapping + appended its own off-registry rows,
|
|
21
|
+
* so they drifted (one knew Sana, one didn't; one had `supportsSeedImage`, the
|
|
22
|
+
* other `wired`/`note`). This module is the ONE projection both surfaces now
|
|
23
|
+
* read — there is no second registry and no per-surface fork.
|
|
24
|
+
*
|
|
25
|
+
* RECONCILIATION WITH THE EXISTING REGISTRY (no second registry): the world
|
|
26
|
+
* models (Helios, LongLive-2) come STRAIGHT from `createWorldRegistry()` — this
|
|
27
|
+
* module does NOT re-declare them. It ADDS the two catalog entries the world
|
|
28
|
+
* registry doesn't hold as adapters today (they live on different Reactor /
|
|
29
|
+
* ARK seams): Sana-Streaming (the live-edit seam) and SeeDance 2.0 (the
|
|
30
|
+
* video-gen seam). Their ids + display names are single-sourced from the
|
|
31
|
+
* constants below (the Sana live-edit orchestrator + descriptor now live in
|
|
32
|
+
* client-core's `reactor/sanaLiveEdit.ts` — relocated from `web/lib/sana` in
|
|
33
|
+
* slice 3c, tech-debt #501 — and read `SANA_STREAMING_MODEL_ID` from HERE so the
|
|
34
|
+
* row + the actual Sana provider can never drift; the video-gen id matches the
|
|
35
|
+
* backend `shared/video_model_registry.py` default).
|
|
36
|
+
*
|
|
37
|
+
* CAPABILITY FLAGS (the owner's named axes): each option carries explicit
|
|
38
|
+
* booleans derived in ONE place from the registry's authoritative `WorldCapability`
|
|
39
|
+
* axis (so the UI never re-derives them):
|
|
40
|
+
* - `seedCapable` ⟷ the world descriptor advertises `swap_seed` (image-seed
|
|
41
|
+
* bootstrap — BOTH Helios AND LongLive-2 now: each conditions on the
|
|
42
|
+
* frozen-playhead frame; tech-debt #506).
|
|
43
|
+
* - `textSeed` ⟷ a world-stream model with NO `swap_seed`. With LongLive
|
|
44
|
+
* now image-seedable, NO catalog model is `textSeed` today — the axis is
|
|
45
|
+
* retained for a future pure text-to-video world model.
|
|
46
|
+
* - `liveEdit` ⟷ the Sana live-edit seam (tech-debt #501/#503).
|
|
47
|
+
* - `videoGen` ⟷ the SeeDance 2.0 video-gen seam.
|
|
48
|
+
*
|
|
49
|
+
* THE `wired` GATE (honest selectability): `wired === true` means "a surface's
|
|
50
|
+
* in-pane bootstrap can DRIVE this model today, so the switcher lets the user
|
|
51
|
+
* pick it." The Helios image-seed path is always wired. The LongLive image-seed
|
|
52
|
+
* bootstrap + steering composer are BUILT (3b / #506) and the model is now
|
|
53
|
+
* ENABLED via the {@link LONGLIVE_IMAGE_SEED_WIRED} one-line flag (`true`) — the
|
|
54
|
+
* watch pane extracts the SAME frozen-playhead frame Helios uses and the
|
|
55
|
+
* LongLive bootstrap conditions on it (true image conditioning when the live
|
|
56
|
+
* session advertises an image command, else a vision-described grounded
|
|
57
|
+
* `set_shot`). The live-edit (Sana) adapter + bootstrap + switcher wiring are
|
|
58
|
+
* BUILT (3c / #501) but the flag is `false`: {@link SANA_LIVE_EDIT_WIRED} was
|
|
59
|
+
* RE-GATED 2026-07-14 (§Q VIS.1) once the live spike proved Sana edits a
|
|
60
|
+
* PUBLISHED camera track — see that constant's own doc. The video-gen (Nova
|
|
61
|
+
* Reel) seam stays gated (its selection routes through the GENERATED source).
|
|
62
|
+
* The registry is the SINGLE gate, so each slice just flips its flag (no other
|
|
63
|
+
* change is needed).
|
|
64
|
+
*
|
|
65
|
+
* PER-SURFACE GATING MATRIX (§Q SB-W.5 audit — read off the call sites
|
|
66
|
+
* 2026-07-25, not off an older comment; re-verify here when a call site moves):
|
|
67
|
+
*
|
|
68
|
+
* `/interactive` — `web/app/interactive/page.tsx`
|
|
69
|
+
* `{longLiveHostSupported: false, liveEditHostEnabled: false}`. Its
|
|
70
|
+
* `InteractiveController` speaks ONLY the Helios `set_image`/`set_prompt`
|
|
71
|
+
* grammar and mounts no live-edit pane, so Helios is the one selectable
|
|
72
|
+
* row; LongLive / Sana / HappyOyster / video-gen all render GATED.
|
|
73
|
+
*
|
|
74
|
+
* `/interactive/director` — `web/app/interactive/director/page.tsx`
|
|
75
|
+
* No options (host defaults), then a POST-PROJECTION promotion of
|
|
76
|
+
* `kind === 'world'` rows that are ALSO in the world registry. The Director
|
|
77
|
+
* owns a model-aware `createDirectorBridge`, so it can steer every
|
|
78
|
+
* REGISTRY world model (Helios + LongLive-2). The registry-membership
|
|
79
|
+
* scope is load-bearing: a blanket `kind === 'world'` promotion had already
|
|
80
|
+
* made off-registry HappyOyster selectable here with the global flag still
|
|
81
|
+
* false (fixed in SB-W.2). Live-edit / video-gen rows stay gated.
|
|
82
|
+
*
|
|
83
|
+
* `/watch/[videoId]` — `web/app/watch/[videoId]/WatchShell.tsx`
|
|
84
|
+
* `{liveEditHostEnabled: config.liveEdit?.enabled ?? false}`. The pane has
|
|
85
|
+
* the id-keyed LongLive router, so LongLive is hostable; Sana is offered
|
|
86
|
+
* only where its pane is actually mounted. ONE options object feeds BOTH
|
|
87
|
+
* `experienceModelCatalog` and `isExperienceModelWired` — see the note
|
|
88
|
+
* below.
|
|
89
|
+
*
|
|
90
|
+
* `/developer/demos/world-explorer` — `WorldExplorerPane.tsx`
|
|
91
|
+
* `{happyOysterHostSupported: true}`. It reads its single row rather than
|
|
92
|
+
* rendering the switcher. `storyboard-director` joins it when SB-W.4 builds
|
|
93
|
+
* that route.
|
|
94
|
+
*
|
|
95
|
+
* `/watch/[videoId]?session=…` (the DM PLAY EPISODE) — `DmExperienceLayout.tsx`
|
|
96
|
+
* `{happyOysterHostSupported: true}` (§Q DM.23). The episode's world pane
|
|
97
|
+
* mounts `HappyOysterProvider` through `HappyOysterWorldPane`, so it can
|
|
98
|
+
* drive the typed SDK. It renders NO switcher (W2.28 removed the operator
|
|
99
|
+
* source toggle) — it reads `isExperienceModelWired` before PINNING
|
|
100
|
+
* HappyOyster as the DM's `enter_world` model, which is the same gate under
|
|
101
|
+
* a different affordance. The VIEWER surface (`WatchShell`) keeps the row
|
|
102
|
+
* GATED: its manual "step into scene" seeds from the video playhead, and a
|
|
103
|
+
* DM HappyOyster world is seeded from a ratified storyboard FRAME, which
|
|
104
|
+
* that surface never resolves.
|
|
105
|
+
*
|
|
106
|
+
* TWO WAYS A CALL SITE CAN DEFEAT THIS GATE — both were live at some point:
|
|
107
|
+
* 1. **Promotion.** Overwriting `wired` after projection (the Director's
|
|
108
|
+
* `{...row, wired: true}`). Legitimate only when the promotion predicate
|
|
109
|
+
* matches what the surface can actually DRIVE — scope it to the transport
|
|
110
|
+
* (registry membership), never to `kind`.
|
|
111
|
+
* 2. **Divergence.** Passing options to `experienceModelCatalog` but NOT to
|
|
112
|
+
* the matching {@link isExperienceModelWired} host gate, so the switcher's
|
|
113
|
+
* disabled state and the bootstrap gate disagree. Derive ONE options
|
|
114
|
+
* object per surface and pass it to both.
|
|
115
|
+
*
|
|
116
|
+
* FRAMEWORK-AGNOSTIC: pure data + functions, NO React/Vue/DOM imports (same
|
|
117
|
+
* discipline as the rest of `adapters/`). The React switcher in `web/` renders
|
|
118
|
+
* these rows; it owns no capability logic.
|
|
119
|
+
*/
|
|
120
|
+
import { longLiveWorldAdapter } from './worldAdapter.js';
|
|
121
|
+
import { worldModelTradeoff } from './worldModelTradeoffs.js';
|
|
122
|
+
/**
|
|
123
|
+
* The Reactor `modelName` slug for the Sana-Streaming live-edit model. Sana is
|
|
124
|
+
* NOT a `createWorldRegistry()` adapter (it edits an existing clip on a
|
|
125
|
+
* different seam), so it has no world descriptor `id` / route — but it DOES have
|
|
126
|
+
* a single-source Reactor `modelName` the live-edit pane pins into its
|
|
127
|
+
* `<ReactorProvider>`. Defined HERE (client-core) and consumed by the Sana
|
|
128
|
+
* live-edit orchestrator (`reactor/sanaLiveEdit.ts`, relocated from
|
|
129
|
+
* `web/lib/sana` in slice 3c — tech-debt #501) so the catalog row + the actual
|
|
130
|
+
* Sana provider can never drift.
|
|
131
|
+
*/
|
|
132
|
+
export const SANA_STREAMING_MODEL_ID = 'sana-streaming';
|
|
133
|
+
/**
|
|
134
|
+
* The video-gen model id shown in the experience switcher. Matches the backend
|
|
135
|
+
* default in `shared/video_model_registry.py` (the `GET /api/v1/videos/models`
|
|
136
|
+
* catalogue). SeeDance 2.0 is an async text/image → MP4 generator (the
|
|
137
|
+
* GENERATED experience source), not a live world-stream — so it is a catalog
|
|
138
|
+
* entry here for completeness/selection, gated until the generated-source wire
|
|
139
|
+
* lands.
|
|
140
|
+
*
|
|
141
|
+
* REPLACED `NOVA_REEL_MODEL_ID` (`amazon.nova-reel-v1:1`) in §Q SB.17: AWS
|
|
142
|
+
* lists both Nova Reel ids as Legacy 2026-03-30 / EOL 2026-09-30, so the
|
|
143
|
+
* backend retired them and moved `is_default` onto `seedance-2-0`. The row's
|
|
144
|
+
* GATING is unchanged (`wired: false` — see the video-gen row below); only the
|
|
145
|
+
* model it names moved.
|
|
146
|
+
*/
|
|
147
|
+
export const VIDEO_GEN_MODEL_ID = 'seedance-2-0';
|
|
148
|
+
/**
|
|
149
|
+
* The Reactor HappyOyster world-model id (§Q SB-W.1, storyboard spec §6). Unlike
|
|
150
|
+
* Helios / LongLive-2 this is NOT a `createWorldRegistry()` adapter: HappyOyster
|
|
151
|
+
* is driven through its own dedicated typed SDK (`@reactor-models/happy-oyster`)
|
|
152
|
+
* with a world lifecycle of its own (`createWorld`/`attachWorld`/`startTravel`),
|
|
153
|
+
* not the generic `@reactor-team/js-sdk` command grammar `dispatchWorldCommand`
|
|
154
|
+
* speaks — so it is an off-registry catalog row, exactly like Sana. The
|
|
155
|
+
* descriptor + launch orchestrator live in `reactor/happyOysterWorld.ts` and
|
|
156
|
+
* read this id from HERE so the row and the adapter can never drift.
|
|
157
|
+
*
|
|
158
|
+
* One catalog id covers BOTH vendor experiences (`adventure` / `directing`):
|
|
159
|
+
* they are two mode-fixed Reactor models but ONE user-facing model, and the
|
|
160
|
+
* mode is a per-launch choice, not a switcher row.
|
|
161
|
+
*/
|
|
162
|
+
export const HAPPY_OYSTER_MODEL_ID = 'happy-oyster';
|
|
163
|
+
/**
|
|
164
|
+
* THE ONE-LINE GLOBAL FLAG for HappyOyster — **flipped `true` by §Q SB-W.2**,
|
|
165
|
+
* which landed the host that can drive the typed SDK facade
|
|
166
|
+
* (`/developer/demos/world-explorer`: blank + Library-image launches, seed
|
|
167
|
+
* crop, build progress, pause/resume) on top of SB-W.1's live-verified
|
|
168
|
+
* adapter.
|
|
169
|
+
*
|
|
170
|
+
* Global `true` does NOT mean every surface can host it: HappyOyster runs on
|
|
171
|
+
* its own SDK facade, and `/interactive`, `/interactive/director` and `/watch`
|
|
172
|
+
* all speak the generic Reactor command seam. Those surfaces stay gated
|
|
173
|
+
* through {@link ExperienceModelCatalogOptions.happyOysterHostSupported},
|
|
174
|
+
* which DEFAULTS TO FALSE — the opposite default to `longLiveHostSupported`,
|
|
175
|
+
* because a HappyOyster host is the exception, not the rule.
|
|
176
|
+
*/
|
|
177
|
+
export const HAPPY_OYSTER_WIRED = true;
|
|
178
|
+
/** The note shown on the HappyOyster row wherever it is gated — either the
|
|
179
|
+
* global {@link HAPPY_OYSTER_WIRED} is off or this surface does not host the
|
|
180
|
+
* HappyOyster SDK facade. Points at the surfaces that do (§Q DM.23 added the
|
|
181
|
+
* DM episode, which opens one from the beat's ratified storyboard frame). */
|
|
182
|
+
export const HAPPY_OYSTER_NOTE = 'gated here — HappyOyster runs on its own SDK; the DM opens one from the storyboard frame on the play episode, or use the World Explorer demo';
|
|
183
|
+
/**
|
|
184
|
+
* THE ONE-LINE FLAG (3b, tech-debt #506) that makes LongLive-2 selectable. The
|
|
185
|
+
* image-seed bootstrap (`prepareLongLiveSceneEntry` /
|
|
186
|
+
* `bootstrapLongLiveSceneInReactor`) and the LongLive steering composer are
|
|
187
|
+
* BUILT, unit-tested, and now ENABLED (`true`, owner request 2026-06-18): the
|
|
188
|
+
* watch world pane extracts the SAME frozen-playhead frame Helios uses and the
|
|
189
|
+
* LongLive bootstrap conditions on it — true image conditioning when the live
|
|
190
|
+
* LongLive Reactor session advertises an image command (Path A), else the
|
|
191
|
+
* frame's thumbnail is vision-described by the backend upsampler and the
|
|
192
|
+
* grounded text is sent as `set_shot` (Path B, the guaranteed fallback). So the
|
|
193
|
+
* owner's "seed LongLive with an image like Helios" UX is satisfied regardless
|
|
194
|
+
* of the live capability probe. The catalog is the single gate, so this flag
|
|
195
|
+
* makes the switcher row selectable + lets `isExperienceModelWired` admit the
|
|
196
|
+
* LongLive bootstrap on every surface at once.
|
|
197
|
+
*
|
|
198
|
+
* NOTE: the runtime capability probe (Path A vs Path B) + live LongLive
|
|
199
|
+
* GENERATION can only be confirmed against the staging Reactor (NOT a Vercel
|
|
200
|
+
* preview); the bootstrap's Path-B fallback is proven by unit tests so the
|
|
201
|
+
* model is safe to enable. Renamed from `LONGLIVE_TEXT_SEED_WIRED` (it is
|
|
202
|
+
* image-seeded now, not text-seeded).
|
|
203
|
+
*/
|
|
204
|
+
export const LONGLIVE_IMAGE_SEED_WIRED = true;
|
|
205
|
+
/**
|
|
206
|
+
* THE ONE-LINE FLAG (3c, tech-debt #501/#503) that makes Sana-Streaming
|
|
207
|
+
* selectable. The Sana live-edit adapter + Reactor bootstrap
|
|
208
|
+
* (`sanaLiveEditAdapter` / `bootstrapSanaLiveEdit`, now relocated into
|
|
209
|
+
* client-core's `reactor/sanaLiveEdit.ts`) and the watch/DM switcher wiring
|
|
210
|
+
* (selecting Sana drives `experience.editLive(...)` → the `SanaLiveEditPane`)
|
|
211
|
+
* are BUILT, unit-tested, and now ENABLED (`true`, owner request 2026-06-18) —
|
|
212
|
+
* the catalog is the single gate, so the switcher row becomes selectable and
|
|
213
|
+
* `isExperienceModelWired` lets the live-edit path run on every surface at once.
|
|
214
|
+
*
|
|
215
|
+
* **RE-GATED 2026-07-14 (§Q VIS.1 — the live check finally ran and FAILED).**
|
|
216
|
+
* `scripts/spikes/sana_live_edit_spike.py` replayed {@link bootstrapSanaLiveEdit}'s
|
|
217
|
+
* exact sequence against the live `sana-streaming` model: `set_prompt` →
|
|
218
|
+
* `prompt_accepted` and `start` → `generation_started`, but **ZERO frames in
|
|
219
|
+
* 60s**, while the same harness on `helios` streams 1044. The reason is in the
|
|
220
|
+
* model's own capabilities envelope (`Reactor.get_capabilities()`):
|
|
221
|
+
*
|
|
222
|
+
* sana-streaming → tracks: [ {camera, video, SENDONLY}, {main_video, video, recvonly} ]
|
|
223
|
+
* helios → tracks: [ {main_video, video, recvonly} ]
|
|
224
|
+
*
|
|
225
|
+
* Sana is a **live track-to-track** editor: the client must PUBLISH a `camera`
|
|
226
|
+
* video track and Sana re-renders it onto `main_video`. It has no file-mode
|
|
227
|
+
* source, so `set_mode`/`set_video` (a `uploadFile` FileRef) are commands the
|
|
228
|
+
* model simply ignores — the pane shows an empty stage forever. Rebuilding the
|
|
229
|
+
* bootstrap on the published-track seam (`publishTrack` of a clip-backed
|
|
230
|
+
* `MediaStream`) is §Q **VIS.4**; until it lands the row is GATED so the
|
|
231
|
+
* switcher tells the truth instead of silently producing nothing.
|
|
232
|
+
*
|
|
233
|
+
* NOTE: a surface ALSO independently gates the Sana pane behind its own
|
|
234
|
+
* environment flag (`config.liveEdit.enabled` / `NEXT_PUBLIC_LIVE_EDIT_ENABLED`,
|
|
235
|
+
* mirroring the backend `SEER_LIVE_EDIT_ENABLED`) so the pane only mints a
|
|
236
|
+
* Reactor token / extracts a clip where the matching backend is deployed. This
|
|
237
|
+
* catalog flag governs SELECTABILITY in the switcher (the "wired vs gated"
|
|
238
|
+
* status the user sees); the env flag governs whether the pane is mounted.
|
|
239
|
+
*/
|
|
240
|
+
export const SANA_LIVE_EDIT_WIRED = false;
|
|
241
|
+
/** The note shown on the LongLive option WHEN it is gated. The image-seed
|
|
242
|
+
* bootstrap + composer are BUILT (3b / tech-debt #506) and LongLive is now
|
|
243
|
+
* ENABLED ({@link LONGLIVE_IMAGE_SEED_WIRED} = `true`), so this note is unused
|
|
244
|
+
* today; retained so re-disabling the flag renders an honest gated note. */
|
|
245
|
+
export const TEXT_SEED_NOTE = 'ready — pending live verification';
|
|
246
|
+
/** The note shown on the Sana option, which is GATED again as of 2026-07-14
|
|
247
|
+
* ({@link SANA_LIVE_EDIT_WIRED} = `false`): the live spike proved Sana edits a
|
|
248
|
+
* PUBLISHED camera track, so the shipped file-mode bootstrap streams nothing.
|
|
249
|
+
* Rebuild = §Q VIS.4. */
|
|
250
|
+
export const LIVE_EDIT_NOTE = 'gated — needs a published camera track';
|
|
251
|
+
/** The note shown on the video-gen option (the async seam — selected via the
|
|
252
|
+
* GENERATED experience source). */
|
|
253
|
+
export const VIDEO_GEN_NOTE = 'video-gen seam';
|
|
254
|
+
/** The single WORLD capability meaning "accepts an image seed" (Helios). */
|
|
255
|
+
const CAP_SEED_IMAGE = 'swap_seed';
|
|
256
|
+
/** The base world-stream capability (Helios + LongLive both advertise it). */
|
|
257
|
+
const CAP_WORLD_STREAM = 'world_stream';
|
|
258
|
+
/**
|
|
259
|
+
* Project the unified experience-model catalog. The world rows (Helios,
|
|
260
|
+
* LongLive-2) come STRAIGHT from `createWorldRegistry()` (the single world
|
|
261
|
+
* registry — this does NOT re-declare them); the Sana live-edit and SeeDance
|
|
262
|
+
* video-gen rows are appended from the single-source constants above. The
|
|
263
|
+
* seed-capable Helios world model is `wired`; the image-seed LongLive row is
|
|
264
|
+
* wired iff {@link LONGLIVE_IMAGE_SEED_WIRED} is set (now `true`); the live-edit
|
|
265
|
+
* Sana row is wired iff {@link SANA_LIVE_EDIT_WIRED} is set (now `true`); the
|
|
266
|
+
* video-gen row is gated with an honest note.
|
|
267
|
+
*
|
|
268
|
+
* The catalog is the SINGLE gate every surface reads — flipping a row's flag
|
|
269
|
+
* (e.g. `LONGLIVE_IMAGE_SEED_WIRED`) makes it selectable everywhere at once.
|
|
270
|
+
*/
|
|
271
|
+
export function experienceModelCatalog(registry, options = {}) {
|
|
272
|
+
// Per-surface host capability (default permissive — the watch/DM hosts). A
|
|
273
|
+
// Helios-only host (`/interactive`) passes `longLiveHostSupported: false`; a
|
|
274
|
+
// host whose live-edit pane is env-gated off passes `liveEditHostEnabled:
|
|
275
|
+
// false`. ANDed with the global feature flags below.
|
|
276
|
+
const longLiveHostSupported = options.longLiveHostSupported ?? true;
|
|
277
|
+
const liveEditHostEnabled = options.liveEditHostEnabled ?? true;
|
|
278
|
+
// The world rows, projected from the registry's authoritative capability axis
|
|
279
|
+
// (one capability mapping — both the switcher and any host gate read this).
|
|
280
|
+
const worldRows = registry.list().map(descriptor => {
|
|
281
|
+
const seedCapable = registry.satisfies(descriptor.id, [CAP_SEED_IMAGE]);
|
|
282
|
+
// A world-stream model with no image seed is a pure text-to-video path. No
|
|
283
|
+
// catalog model is `textSeed` today (LongLive is now image-seedable); the
|
|
284
|
+
// axis is retained for a future text-only world model.
|
|
285
|
+
const textSeed = registry.satisfies(descriptor.id, [CAP_WORLD_STREAM]) && !seedCapable;
|
|
286
|
+
// A world model is bootstrappable iff it accepts an image seed (the
|
|
287
|
+
// image-seed flow — Helios and LongLive both condition on the frozen frame).
|
|
288
|
+
// LongLive's selectability is gated behind its ONE-LINE
|
|
289
|
+
// `LONGLIVE_IMAGE_SEED_WIRED` flag (now `true`) AND the per-surface
|
|
290
|
+
// `longLiveHostSupported` (a Helios-only host like `/interactive` can't drive
|
|
291
|
+
// LongLive's `set_shot` grammar — codex P2). Helios is always wired. A future
|
|
292
|
+
// text-seed-only model stays gated (no bootstrap).
|
|
293
|
+
const isLongLive = descriptor.id === longLiveWorldAdapter.id;
|
|
294
|
+
const wired = seedCapable &&
|
|
295
|
+
(isLongLive ? LONGLIVE_IMAGE_SEED_WIRED && longLiveHostSupported : true);
|
|
296
|
+
return {
|
|
297
|
+
id: descriptor.id,
|
|
298
|
+
displayName: descriptor.displayName,
|
|
299
|
+
kind: 'world',
|
|
300
|
+
seedCapable,
|
|
301
|
+
textSeed,
|
|
302
|
+
liveEdit: false,
|
|
303
|
+
videoGen: false,
|
|
304
|
+
wired,
|
|
305
|
+
// A gated row keeps its honest "ready — pending live verification" note; a
|
|
306
|
+
// wired row has no note. (Today every world row is wired.)
|
|
307
|
+
note: wired ? undefined : TEXT_SEED_NOTE,
|
|
308
|
+
// §Q WORLD.1 — the comparative profile, attached to EVERY world row
|
|
309
|
+
// (wired or gated) so a picker can say what choosing this model costs
|
|
310
|
+
// rather than listing interchangeable names. `?? undefined` because an
|
|
311
|
+
// unrecognised registry id has no vendor facts and must render nothing.
|
|
312
|
+
tradeoff: worldModelTradeoff(registry, descriptor.id) ?? undefined,
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
// The off-registry seams, appended from single-source constants. The Sana
|
|
316
|
+
// live-edit row is wired iff {@link SANA_LIVE_EDIT_WIRED} is set (its adapter +
|
|
317
|
+
// bootstrap + switcher wiring are BUILT in 3c but the row stays gated pending
|
|
318
|
+
// live staging verification — tech-debt #503); the video-gen row stays gated
|
|
319
|
+
// (its selection routes through the GENERATED source).
|
|
320
|
+
// Sana is wired iff the global flag is set AND this surface's live-edit pane is
|
|
321
|
+
// mounted (`liveEditHostEnabled` — the env gate). On an env where the pane is
|
|
322
|
+
// NOT mounted, selecting Sana would blank the stage (codex P2), so gate it.
|
|
323
|
+
const sanaWired = SANA_LIVE_EDIT_WIRED && liveEditHostEnabled;
|
|
324
|
+
const sanaRow = {
|
|
325
|
+
id: SANA_STREAMING_MODEL_ID,
|
|
326
|
+
displayName: 'Sana-Streaming',
|
|
327
|
+
kind: 'live-edit',
|
|
328
|
+
seedCapable: false,
|
|
329
|
+
textSeed: false,
|
|
330
|
+
liveEdit: true,
|
|
331
|
+
videoGen: false,
|
|
332
|
+
wired: sanaWired,
|
|
333
|
+
// The gated live-edit row keeps its "ready — pending live verification"
|
|
334
|
+
// note until the flag flips; a wired row has no note.
|
|
335
|
+
note: sanaWired ? undefined : LIVE_EDIT_NOTE,
|
|
336
|
+
};
|
|
337
|
+
// The HappyOyster world row (SB-W.1). Off-registry for the same reason Sana
|
|
338
|
+
// is — it runs on its own typed SDK, not the generic Reactor command seam —
|
|
339
|
+
// but its KIND is `world` (a step-into-video stream with an image seed), so
|
|
340
|
+
// no `ExperienceModelKind` member is added and no exhaustive consumer moves.
|
|
341
|
+
// SB-W.2 flipped the global flag; the row is selectable only where the
|
|
342
|
+
// surface actually mounts the HappyOyster provider (default: nowhere).
|
|
343
|
+
const happyOysterWired = HAPPY_OYSTER_WIRED && (options.happyOysterHostSupported ?? false);
|
|
344
|
+
const happyOysterRow = {
|
|
345
|
+
id: HAPPY_OYSTER_MODEL_ID,
|
|
346
|
+
displayName: 'HappyOyster',
|
|
347
|
+
kind: 'world',
|
|
348
|
+
// Accepts a first-frame seed image (≤2 MB, 1.5–2.0 landscape) or a public
|
|
349
|
+
// seed image URL — the same image-seed axis Helios/LongLive advertise.
|
|
350
|
+
// SEED-PATH CAVEAT (SB.16 vendor audit): the SDK's client-side size+aspect
|
|
351
|
+
// guard runs ONLY inside `uploadFirstFrameImage()`, so a
|
|
352
|
+
// `firstFrameImageUrl` seed gets NO client-side validation at all — it is
|
|
353
|
+
// rejected server-side only, AFTER a permanent, already-billed world
|
|
354
|
+
// exists. SB-W.2's `prepareHappyOysterSeed` guard rides the BYTES path; a
|
|
355
|
+
// future launch-from-a-presigned-URL path does NOT inherit it and must run
|
|
356
|
+
// the 1.5–2.0 band check itself.
|
|
357
|
+
seedCapable: true,
|
|
358
|
+
textSeed: false,
|
|
359
|
+
liveEdit: false,
|
|
360
|
+
videoGen: false,
|
|
361
|
+
wired: happyOysterWired,
|
|
362
|
+
note: happyOysterWired ? undefined : HAPPY_OYSTER_NOTE,
|
|
363
|
+
// §Q WORLD.1 — HappyOyster is off-registry, so `worldModelTradeoff` reads
|
|
364
|
+
// its standalone descriptor. This row is the reason the axis exists: it is
|
|
365
|
+
// the one model whose worlds are permanent and whose seed is
|
|
366
|
+
// creation-only, which is what makes DM.12's "regenerate at scene changes"
|
|
367
|
+
// cost differently here than on Helios.
|
|
368
|
+
tradeoff: worldModelTradeoff(registry, HAPPY_OYSTER_MODEL_ID) ?? undefined,
|
|
369
|
+
};
|
|
370
|
+
const videoGenRow = {
|
|
371
|
+
id: VIDEO_GEN_MODEL_ID,
|
|
372
|
+
displayName: 'SeeDance 2.0',
|
|
373
|
+
kind: 'video-gen',
|
|
374
|
+
seedCapable: false,
|
|
375
|
+
textSeed: false,
|
|
376
|
+
liveEdit: false,
|
|
377
|
+
videoGen: true,
|
|
378
|
+
wired: false,
|
|
379
|
+
note: VIDEO_GEN_NOTE,
|
|
380
|
+
};
|
|
381
|
+
const all = [
|
|
382
|
+
...worldRows,
|
|
383
|
+
happyOysterRow,
|
|
384
|
+
sanaRow,
|
|
385
|
+
videoGenRow,
|
|
386
|
+
];
|
|
387
|
+
const kinds = options.kinds;
|
|
388
|
+
return kinds === undefined ? all : all.filter(row => kinds.includes(row.kind));
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Whether a surface's in-pane bootstrap can DRIVE `modelId` today (the host's
|
|
392
|
+
* gate before pinning a picked model). Reads the SAME catalog the switcher
|
|
393
|
+
* renders, so the UI's gated state and the host's gate can never disagree.
|
|
394
|
+
* Unknown ids are not bootstrappable (defensive). The default Helios path is
|
|
395
|
+
* never broken: a gated model can never reach a pane that can't drive it.
|
|
396
|
+
*/
|
|
397
|
+
export function isExperienceModelWired(registry, modelId, options = {}) {
|
|
398
|
+
return (experienceModelCatalog(registry, options).find(o => o.id === modelId)
|
|
399
|
+
?.wired ?? false);
|
|
400
|
+
}
|
|
401
|
+
//# sourceMappingURL=experienceModelCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experienceModelCatalog.js","sourceRoot":"","sources":["../../src/adapters/experienceModelCatalog.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { AdapterRegistry, type ModelAdapterDescriptor } from './registry';
|
|
2
|
+
import type { ApiClient, ExtractionModelInfo } from '../api';
|
|
3
|
+
/**
|
|
4
|
+
* Extraction-domain adapter descriptor — a {@link ModelAdapterDescriptor}
|
|
5
|
+
* carrying the VLM-extraction-only fields the admin showroom surfaces
|
|
6
|
+
* (`invokeFamily` / `templateId` / `dormant` / `darkStatus` / default /
|
|
7
|
+
* fallback). Verbatim copy-target of `imageAdapter.ts::ImageAdapterDescriptor`
|
|
8
|
+
* (default/fallback resolution already solved) — extended, not reimplemented.
|
|
9
|
+
*
|
|
10
|
+
* `darkStatus` stays an OPEN `string` (badge only) so the backend can add a 6th
|
|
11
|
+
* value without a client-core release. `id` / `displayName` / `provider` /
|
|
12
|
+
* `capabilities` are inherited unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExtractionAdapterDescriptor extends ModelAdapterDescriptor {
|
|
15
|
+
invokeFamily: string;
|
|
16
|
+
templateId: string;
|
|
17
|
+
dormant: boolean;
|
|
18
|
+
/** Open badge union (e.g. 'active' | 'cdk_gated' | … | 'dormant_route'). */
|
|
19
|
+
darkStatus: string;
|
|
20
|
+
/**
|
|
21
|
+
* The server-computed LIVE reachability gate — "would enrichment actually run
|
|
22
|
+
* this model right now" (`shared/model_router.extraction_model_reachable`).
|
|
23
|
+
* This is the AUTHORITATIVE "usable now" signal the showroom surfaces
|
|
24
|
+
* prominently, distinct from the STATIC `darkStatus` build-stage badge (which
|
|
25
|
+
* does not react to the deployed env). On staging, Pegasus 1.5 reads
|
|
26
|
+
* `reachable: true` even while its static `darkStatus` is still `cdk_gated`.
|
|
27
|
+
*/
|
|
28
|
+
reachable: boolean;
|
|
29
|
+
isDefault?: boolean;
|
|
30
|
+
isFallback?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Map one {@link ExtractionModelInfo} from `GET /api/v1/admin/extraction/models`
|
|
34
|
+
* to an {@link ExtractionAdapterDescriptor}. PURE — no I/O, no mutation of `info`.
|
|
35
|
+
*
|
|
36
|
+
* `capabilities` is copied VERBATIM (a fresh array, same members/order) — the
|
|
37
|
+
* backend extraction registry (`shared/model_config.py`) is the single source of
|
|
38
|
+
* truth for what a model advertises; this layer never re-derives them. The wire
|
|
39
|
+
* type is `string[]`; the cast to `Capability[]` carries the raw tokens onto the
|
|
40
|
+
* registry's `Capability[]` axis WITHOUT widening the shared `Capability` union
|
|
41
|
+
* (§3c) — identical to `imageModelInfoToDescriptor`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function extractionModelInfoToDescriptor(info: ExtractionModelInfo): ExtractionAdapterDescriptor;
|
|
44
|
+
/**
|
|
45
|
+
* Build an extraction {@link AdapterRegistry} from an already-fetched model
|
|
46
|
+
* list + the response-level `activeModelId`. PURE (no I/O) so the absent-method
|
|
47
|
+
* / 403 empty-registry case (`createPlatformRegistries`) reuses it with `[]` —
|
|
48
|
+
* no second catalogue path.
|
|
49
|
+
*
|
|
50
|
+
* Default resolution differs from `imageAdapter.ts` BY DESIGN: the F1 backend
|
|
51
|
+
* `ExtractionModelInfo` does NOT emit per-model `isDefault`/`isFallback` — it
|
|
52
|
+
* carries the active default at the RESPONSE level (`activeModelId`). So
|
|
53
|
+
* `ROUTE_DEFAULT` is seeded, in priority order, from:
|
|
54
|
+
* 1. `activeModelId` (when present AND in `models`) — the server's truth;
|
|
55
|
+
* 2. an `isDefault`-flagged model (forward-compat if a future backend stamps it);
|
|
56
|
+
* 3. the first model by id (deterministic tiebreak).
|
|
57
|
+
* `ROUTE_FALLBACK` resolves to an `isFallback`-flagged model, or the default
|
|
58
|
+
* when none is flagged. With no models there is no default — a `''` sentinel
|
|
59
|
+
* (never registered) seeds both routes so the R1a constructor guard still passes
|
|
60
|
+
* and `resolveRoute` degrades to `undefined` rather than throwing. This is a
|
|
61
|
+
* FACADE — it makes NO model-selection decision; selection stays server-side in
|
|
62
|
+
* `shared/model_router.py` (`reachable` is the only gate, §5).
|
|
63
|
+
*
|
|
64
|
+
* NOTE (tech-debt #526): the route-array + registry-construction boilerplate is
|
|
65
|
+
* structurally parallel to `imageAdapter.ts` (the spec-mandated copy-target,
|
|
66
|
+
* §3d/§10). The default-resolution DIVERGES by design (activeModelId vs the
|
|
67
|
+
* image per-model flags); extracting a shared `buildAdapterRegistryFromModels`
|
|
68
|
+
* helper is deferred to a standalone refactor (it would churn the consumed
|
|
69
|
+
* `imageAdapter.ts`) — see `specs/technical-debt.md` #526.
|
|
70
|
+
*/
|
|
71
|
+
export declare function buildExtractionAdapterRegistry(models: ExtractionModelInfo[], activeModelId?: string | null): AdapterRegistry<ExtractionAdapterDescriptor>;
|
|
72
|
+
/**
|
|
73
|
+
* Build an extraction {@link AdapterRegistry} from the live admin catalogue
|
|
74
|
+
* (`GET /api/v1/admin/extraction/models`). Thin async wrapper over
|
|
75
|
+
* {@link buildExtractionAdapterRegistry} — calls `listExtractionModels()` once
|
|
76
|
+
* then delegates the (pure) registry construction (DRY: one builder for the
|
|
77
|
+
* live + empty paths). Admin-scoped; a non-admin 403 is handled one layer up in
|
|
78
|
+
* `createPlatformRegistries` (degrades to the empty registry).
|
|
79
|
+
*/
|
|
80
|
+
export declare function loadExtractionAdapterRegistry(client: Pick<ApiClient, 'listExtractionModels'>): Promise<AdapterRegistry<ExtractionAdapterDescriptor>>;
|
|
81
|
+
//# sourceMappingURL=extractionAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractionAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/extractionAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIf,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,mBAAmB,GACxB,2BAA2B,CAgB7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,mBAAmB,EAAE,EAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAC5B,eAAe,CAAC,2BAA2B,CAAC,CAiC9C;AAED;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,sBAAsB,CAAC,GAC9C,OAAO,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAGvD"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { AdapterRegistry, ROUTE_DEFAULT, ROUTE_FALLBACK, } from './registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Map one {@link ExtractionModelInfo} from `GET /api/v1/admin/extraction/models`
|
|
4
|
+
* to an {@link ExtractionAdapterDescriptor}. PURE — no I/O, no mutation of `info`.
|
|
5
|
+
*
|
|
6
|
+
* `capabilities` is copied VERBATIM (a fresh array, same members/order) — the
|
|
7
|
+
* backend extraction registry (`shared/model_config.py`) is the single source of
|
|
8
|
+
* truth for what a model advertises; this layer never re-derives them. The wire
|
|
9
|
+
* type is `string[]`; the cast to `Capability[]` carries the raw tokens onto the
|
|
10
|
+
* registry's `Capability[]` axis WITHOUT widening the shared `Capability` union
|
|
11
|
+
* (§3c) — identical to `imageModelInfoToDescriptor`.
|
|
12
|
+
*/
|
|
13
|
+
export function extractionModelInfoToDescriptor(info) {
|
|
14
|
+
return {
|
|
15
|
+
id: info.id,
|
|
16
|
+
displayName: info.displayName,
|
|
17
|
+
provider: info.provider,
|
|
18
|
+
// VERBATIM copy — defensive clone so the descriptor can't alias the
|
|
19
|
+
// response array, but NO re-derivation of which caps are present.
|
|
20
|
+
capabilities: [...info.capabilities],
|
|
21
|
+
invokeFamily: info.invokeFamily,
|
|
22
|
+
templateId: info.templateId,
|
|
23
|
+
dormant: info.dormant,
|
|
24
|
+
darkStatus: info.darkStatus,
|
|
25
|
+
reachable: info.reachable,
|
|
26
|
+
isDefault: info.isDefault,
|
|
27
|
+
isFallback: info.isFallback,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build an extraction {@link AdapterRegistry} from an already-fetched model
|
|
32
|
+
* list + the response-level `activeModelId`. PURE (no I/O) so the absent-method
|
|
33
|
+
* / 403 empty-registry case (`createPlatformRegistries`) reuses it with `[]` —
|
|
34
|
+
* no second catalogue path.
|
|
35
|
+
*
|
|
36
|
+
* Default resolution differs from `imageAdapter.ts` BY DESIGN: the F1 backend
|
|
37
|
+
* `ExtractionModelInfo` does NOT emit per-model `isDefault`/`isFallback` — it
|
|
38
|
+
* carries the active default at the RESPONSE level (`activeModelId`). So
|
|
39
|
+
* `ROUTE_DEFAULT` is seeded, in priority order, from:
|
|
40
|
+
* 1. `activeModelId` (when present AND in `models`) — the server's truth;
|
|
41
|
+
* 2. an `isDefault`-flagged model (forward-compat if a future backend stamps it);
|
|
42
|
+
* 3. the first model by id (deterministic tiebreak).
|
|
43
|
+
* `ROUTE_FALLBACK` resolves to an `isFallback`-flagged model, or the default
|
|
44
|
+
* when none is flagged. With no models there is no default — a `''` sentinel
|
|
45
|
+
* (never registered) seeds both routes so the R1a constructor guard still passes
|
|
46
|
+
* and `resolveRoute` degrades to `undefined` rather than throwing. This is a
|
|
47
|
+
* FACADE — it makes NO model-selection decision; selection stays server-side in
|
|
48
|
+
* `shared/model_router.py` (`reachable` is the only gate, §5).
|
|
49
|
+
*
|
|
50
|
+
* NOTE (tech-debt #526): the route-array + registry-construction boilerplate is
|
|
51
|
+
* structurally parallel to `imageAdapter.ts` (the spec-mandated copy-target,
|
|
52
|
+
* §3d/§10). The default-resolution DIVERGES by design (activeModelId vs the
|
|
53
|
+
* image per-model flags); extracting a shared `buildAdapterRegistryFromModels`
|
|
54
|
+
* helper is deferred to a standalone refactor (it would churn the consumed
|
|
55
|
+
* `imageAdapter.ts`) — see `specs/technical-debt.md` #526.
|
|
56
|
+
*/
|
|
57
|
+
export function buildExtractionAdapterRegistry(models, activeModelId) {
|
|
58
|
+
// Default = the server's activeModelId (when it names a model we have); else a
|
|
59
|
+
// forward-compat isDefault flag; else first by id (deterministic).
|
|
60
|
+
let defaultId = (activeModelId && models.some((m) => m.id === activeModelId) ? activeModelId : '') ||
|
|
61
|
+
(models.find((m) => m.isDefault)?.id ?? '');
|
|
62
|
+
if (!defaultId && models.length > 0) {
|
|
63
|
+
defaultId = [...models].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0))[0].id;
|
|
64
|
+
}
|
|
65
|
+
// Fallback = the isFallback-flagged model; mirror the default when none flagged.
|
|
66
|
+
const fallbackId = models.find((m) => m.isFallback)?.id ?? defaultId;
|
|
67
|
+
// ROUTE_FALLBACK must always be present by name or the R1a constructor throws.
|
|
68
|
+
const routes = [
|
|
69
|
+
{ name: ROUTE_DEFAULT, adapterId: defaultId, reason: 'extraction registry default model' },
|
|
70
|
+
{
|
|
71
|
+
name: ROUTE_FALLBACK,
|
|
72
|
+
adapterId: fallbackId,
|
|
73
|
+
reason: 'extraction registry fallback model (mirrors default if none flagged)',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
const registry = new AdapterRegistry({
|
|
77
|
+
domain: 'extraction',
|
|
78
|
+
routes,
|
|
79
|
+
fallbackRouteName: ROUTE_FALLBACK,
|
|
80
|
+
});
|
|
81
|
+
for (const info of models) {
|
|
82
|
+
registry.register(extractionModelInfoToDescriptor(info));
|
|
83
|
+
}
|
|
84
|
+
return registry;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Build an extraction {@link AdapterRegistry} from the live admin catalogue
|
|
88
|
+
* (`GET /api/v1/admin/extraction/models`). Thin async wrapper over
|
|
89
|
+
* {@link buildExtractionAdapterRegistry} — calls `listExtractionModels()` once
|
|
90
|
+
* then delegates the (pure) registry construction (DRY: one builder for the
|
|
91
|
+
* live + empty paths). Admin-scoped; a non-admin 403 is handled one layer up in
|
|
92
|
+
* `createPlatformRegistries` (degrades to the empty registry).
|
|
93
|
+
*/
|
|
94
|
+
export async function loadExtractionAdapterRegistry(client) {
|
|
95
|
+
const resp = await client.listExtractionModels();
|
|
96
|
+
return buildExtractionAdapterRegistry(resp.models, resp.activeModelId);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=extractionAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractionAdapter.js","sourceRoot":"","sources":["../../src/adapters/extractionAdapter.ts"],"names":[],"mappings":"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"}
|
|
@@ -18,7 +18,11 @@ export interface ImageAdapterDescriptor extends ModelAdapterDescriptor {
|
|
|
18
18
|
* backend image registry (`shared/image_model_registry.py`) is the single
|
|
19
19
|
* source of truth for what an image model can do; this layer never re-derives
|
|
20
20
|
* them from id/provider. The wire type is `string[]`; the backend emits only
|
|
21
|
-
* image caps
|
|
21
|
+
* image caps — and `ImageCapability` tracks `shared/image_model_registry.py`'s
|
|
22
|
+
* CAPABILITY_* set (SB.2 added `multi_reference` / `mask_inpaint` /
|
|
23
|
+
* `semantic_edit` on both sides) — so the cast to `Capability[]` is safe. If a
|
|
24
|
+
* future backend capability is NOT mirrored into `ImageCapability`, this cast
|
|
25
|
+
* starts lying: widen the union in the same change.
|
|
22
26
|
*/
|
|
23
27
|
export declare function imageModelInfoToDescriptor(info: ImageModelInfo): ImageAdapterDescriptor;
|
|
24
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/imageAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIf,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED
|
|
1
|
+
{"version":3,"file":"imageAdapter.d.ts","sourceRoot":"","sources":["../../src/adapters/imageAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIf,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,cAAc,GAAG,sBAAsB,CAWvF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,GACzC,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC,CAkClD"}
|
|
@@ -7,7 +7,11 @@ import { AdapterRegistry, ROUTE_DEFAULT, ROUTE_FALLBACK, } from './registry.js';
|
|
|
7
7
|
* backend image registry (`shared/image_model_registry.py`) is the single
|
|
8
8
|
* source of truth for what an image model can do; this layer never re-derives
|
|
9
9
|
* them from id/provider. The wire type is `string[]`; the backend emits only
|
|
10
|
-
* image caps
|
|
10
|
+
* image caps — and `ImageCapability` tracks `shared/image_model_registry.py`'s
|
|
11
|
+
* CAPABILITY_* set (SB.2 added `multi_reference` / `mask_inpaint` /
|
|
12
|
+
* `semantic_edit` on both sides) — so the cast to `Capability[]` is safe. If a
|
|
13
|
+
* future backend capability is NOT mirrored into `ImageCapability`, this cast
|
|
14
|
+
* starts lying: widen the union in the same change.
|
|
11
15
|
*/
|
|
12
16
|
export function imageModelInfoToDescriptor(info) {
|
|
13
17
|
return {
|