@cyberart-io/engine 0.0.10 → 0.0.11

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/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to `@cyberart-io/engine`. Each entry links the guide in `doc
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.0.11 — 2026-09-06
8
+
9
+ Production-scenario overlap precedence and transactional reload. Additive: existing exports keep their signatures.
10
+
11
+ ### Added
12
+
13
+ - **Transactional production-scenario reload** — `reload` preflights the sidecar envelope, optional `host.validateRestoreState`, projected input surface, and every present module sidecar before mutation. Apply is one transaction with rollback on failure; invalid sidecars localize at subsystem boundaries (`invalid-visual-sidecar`, `invalid-semantic-sidecar`, `invalid-binding-sidecar`, `invalid-sequence-sidecar`, `invalid-audio-sidecar`, `invalid-host-sidecar`). Legacy envelopes omitting sidecar keys remain compatible. [docs/production-scenario.md](docs/production-scenario.md) · [#60](https://github.com/cyberart-io/cyberart.io/pull/60)
14
+
15
+ - **Overlap precedence on production input surface** — `ProductionScenarioControl.priority` resolves intersecting regions deterministically in browser and headless. Equal or missing priority on an overlapping pair still fails closed at boundary `input` (`ambiguous-geometry`). Coordinate clicks record `observation.inputHitTest` (selected and rejected control ids). [docs/production-scenario.md](docs/production-scenario.md) · [#59](https://github.com/cyberart-io/cyberart.io/pull/59)
16
+
7
17
  ## 0.0.10 — 2026-09-06
8
18
 
9
19
  Production-scenario follow-ups after the 0.0.9 Animation Framework cut. Additive: existing exports keep their signatures.
@@ -4015,7 +4015,7 @@ declare const PRODUCTION_SCENARIO_SCHEMA_VERSION: 1;
4015
4015
  declare const PRODUCTION_SCENARIO_SNAPSHOT_SCHEMA_VERSION: 1;
4016
4016
  declare const PRODUCTION_SCENARIO_BOUNDARIES: readonly ["input", "reducer", "routing", "binding", "cue", "pixels", "caption", "audio", "save-replay"];
4017
4017
  type ProductionScenarioBoundary = (typeof PRODUCTION_SCENARIO_BOUNDARIES)[number];
4018
- declare const PRODUCTION_SCENARIO_ERROR_CODES: readonly ["invalid-scenario", "invalid-schema", "unknown-field", "missing-field", "callbacks-forbidden", "missing-participant", "missing-layer", "destroyed", "assertion-failed", "invalid-host-audio", "invalid-audio-sidecar", "unsupported-preference", "invalid-geometry", "ambiguous-geometry", "stale-geometry"];
4018
+ declare const PRODUCTION_SCENARIO_ERROR_CODES: readonly ["invalid-scenario", "invalid-schema", "unknown-field", "missing-field", "callbacks-forbidden", "missing-participant", "missing-layer", "destroyed", "assertion-failed", "invalid-host-audio", "invalid-audio-sidecar", "invalid-visual-sidecar", "invalid-semantic-sidecar", "invalid-binding-sidecar", "invalid-sequence-sidecar", "invalid-host-sidecar", "unsupported-preference", "invalid-geometry", "ambiguous-geometry", "stale-geometry"];
4019
4019
  type ProductionScenarioErrorCode = (typeof PRODUCTION_SCENARIO_ERROR_CODES)[number];
4020
4020
  declare const HOST_OWNED_AUDIO_EVENT_KINDS: readonly ["invoked", "completed", "failed", "skipped", "fallback"];
4021
4021
  type HostOwnedAudioEventKind = (typeof HOST_OWNED_AUDIO_EVENT_KINDS)[number];
@@ -4115,6 +4115,14 @@ type ProductionScenarioControl = {
4115
4115
  id: string;
4116
4116
  name?: string;
4117
4117
  role?: string;
4118
+ /** Higher priority wins normalized overlap hit-tests when regions intersect. */
4119
+ priority?: number;
4120
+ };
4121
+ type ProductionScenarioInputHitTest = {
4122
+ x: number;
4123
+ y: number;
4124
+ selectedControlId: string;
4125
+ rejectedControlIds: readonly string[];
4118
4126
  };
4119
4127
  type ProductionScenarioInputSurface = {
4120
4128
  controls: readonly ProductionScenarioControl[];
@@ -4131,6 +4139,16 @@ type ProductionScenarioHost = {
4131
4139
  * geometry and controls.
4132
4140
  */
4133
4141
  projectInputSurface?(state: JsonObject): ProductionScenarioInputSurface;
4142
+ /**
4143
+ * Optional pre-reload validator for host JSON from a saved sidecar. When
4144
+ * supplied, reload rejects invalid host state before any live mutation.
4145
+ */
4146
+ validateRestoreState?(state: JsonObject): {
4147
+ ok: true;
4148
+ } | {
4149
+ ok: false;
4150
+ detail: string;
4151
+ };
4134
4152
  };
4135
4153
  type HostOwnedAudioEvent = {
4136
4154
  kind: HostOwnedAudioEventKind;
@@ -4206,6 +4224,7 @@ type ProductionScenarioObservation = {
4206
4224
  reducedMotion?: boolean;
4207
4225
  reducedMotionPropagation?: ReducedMotionPropagation | null;
4208
4226
  activeControlIds: string[];
4227
+ inputHitTest?: ProductionScenarioInputHitTest;
4209
4228
  };
4210
4229
  type ProductionScenarioExpectation = {
4211
4230
  inputDispatched?: boolean;
@@ -4328,6 +4347,7 @@ type ProductionScenarioRunner = {
4328
4347
  reducedMotionPropagation: ReducedMotionPropagation | null;
4329
4348
  inputSurface: {
4330
4349
  controlIds: string[];
4350
+ controls: readonly ProductionScenarioControl[];
4331
4351
  geometry: GeometryDocument | null;
4332
4352
  };
4333
4353
  };
@@ -4360,4 +4380,4 @@ type WriteComposedFrameResult = ComposedFrame & {
4360
4380
  */
4361
4381
  declare function writeComposedFrame(compositor: Compositor, path?: string): Promise<WriteComposedFrameResult>;
4362
4382
 
4363
- export { AUDIO_CUE_SNAPSHOT_SCHEMA_VERSION, type AudioCueDiagnostic, type BoundReplaySession, CONTENT_REVISION_ACTIVATED_EVENT, CONTENT_REVISION_SNAPSHOT_SCHEMA_VERSION, type CausationTreeNode, type ContentRevisionActivator, type ContentRevisionBundle, type ContentRevisionInspect, type ContentRevisionSnapshot, type CreateHeadlessHarnessOptions, type CreateHeadlessMultiCartHarnessOptions, type CreateProductionScenarioRunnerOptions, type CreateReplayInspectorOptions, type CreateSelectionTraceOptions, DEFAULT_HEADLESS_HEIGHT, DEFAULT_HEADLESS_WIDTH, DEFAULT_MAX_SELECTION_RECORDS, DEFAULT_PRODUCTION_SCENARIO_VIEWPORTS, type FrameBenchmarkOptions, type FrameBenchmarkResult, type GlyphAtlas, HEADLESS_PNG_DATA_URL, HOST_OWNED_AUDIO_EVENT_KINDS, type HeadlessAudioAdapter, type HeadlessAudioAdapterSnapshot, type HeadlessCanvas2DSettings, type HeadlessFrameError, type HeadlessHarness, type HeadlessImageFixture, type HeadlessInspect, type HeadlessJobWorker, type HeadlessMultiCartHarness, HeadlessUnsupportedOperationError, type HostGrantSet, type HostOwnedAudioEvent, type HostOwnedAudioEventKind, type HostOwnedAudioObserver, type HostOwnedAudioSnapshot, type InspectorRecord, type InstallHeadlessCanvasOptions, type JobCoordinator, type JobCoordinatorSnapshot, type JobInspect, PRESENTATION_BINDING_APPLIED_EVENT, PRESENTATION_BINDING_SNAPSHOT_SCHEMA_VERSION, PRODUCTION_SCENARIO_BOUNDARIES, PRODUCTION_SCENARIO_SCHEMA_VERSION, PRODUCTION_SCENARIO_SNAPSHOT_SCHEMA_VERSION, type PortalInspect, type PortalLifecycle, type PortalLifecycleSnapshot, type PresentationBindingInspect, type PresentationBindingManifest, type PresentationBindingRuntime, type PresentationBindingSnapshot, type PresentationSequenceDefinition, type PresentationSequenceInspect, type PresentationSequencePlayer, type PresentationSequenceSnapshot, type ProductionScenarioControl, type ProductionScenarioDefinition, type ProductionScenarioEvidenceBundle, type ProductionScenarioExpectation, type ProductionScenarioHost, type ProductionScenarioInputSurface, type ProductionScenarioLocalization, type ProductionScenarioObservation, type ProductionScenarioRunner, REDUCED_MOTION_ACTIVE_SEQUENCE_POLICY, REDUCED_MOTION_PARTICIPANT_IDS, type ReducedMotionActiveSequencePolicy, type ReducedMotionParticipantId, type ReducedMotionParticipantReport, type ReducedMotionPropagation, type RemoteCartInspect, type RemoteCartSandbox, type ReplayCompareResult, type ReplayInspector, type ReplayInspectorExport, type ReplayInspectorReport, type ReplayParticipantSummary, type ReplayTapeAction, type ReplayTraceFilter, type RestoreAudioCueResult, SELECTION_DECISION_KINDS, SELECTION_REASON_CODES, SELECTION_TRACE_SCHEMA_VERSION, SELECTION_TRACE_SENSITIVE_KEYS, type SelectionAssetResolution, type SelectionBindingEvaluation, type SelectionContentIdentity, type SelectionDecisionInput, type SelectionDecisionKind, type SelectionDecisionRecord, type SelectionPresentationDecision, type SelectionReasonCode, type SelectionSequenceDecision, type SelectionSnapshotProvenance, type SelectionStagingOutcome, type SelectionStagingResult, type SelectionTrace, type SelectionTraceExport, type SelectionTraceFilter, type SelectionTraceReport, type SemanticLayerController, type SemanticPublishedRegion, type SemanticRegionInspect, UPDATE_GOLDEN_ENV, type VisualArtifactPaths, type VisualArtifacts, type VisualCompareOptions, type VisualCompareResult, type VisualLayerCapture, type VisualLayerController, type VisualLayerInspect, WORLD_PATCH_ACCEPTED_EVENT, WORLD_PATCH_SNAPSHOT_SCHEMA_VERSION, type WorldGraph, type WorldGraphInspect, type WorldGraphProjection, type WorldGraphSnapshot, type WorldPatchApplier, type WorldPatchInspect, type WorldPatchSnapshot, type WorldPersistenceAdapter, type WriteComposedFrameResult, assertPixelsEqual, assertPngDataUrlsEqual, attachHeadlessCanvas2D, attachSelectionTrace, benchmarkCartFrames, cabinetPortal, captureVisualLayers, compareImageData, compareReplayTraces, contentRevisionEventContracts, createContentRevisionActivator, createDefaultGlyphAtlas, createHeadlessAudioAdapter, createHeadlessHarness, createHeadlessJobWorker, createHeadlessMultiCartHarness, createHostGrantSet, createImageFixture, createJobCoordinator, createMemoryJobPersistence, createMemoryWorldPersistence, createPortalLifecycle, createPresentationBindingRuntime, createPresentationSequencePlayer, createProductionScenarioRunner, createRemoteCartSandbox, createRemoteContentAdapter, createReplayInspector, createSelectionTrace, createSemanticLayerController, createStaticContentAdapter, createVisualLayerController, createWorldGraph, createWorldPatchApplier, decodePng, definePresentationBindings, definePresentationSequence, defineProductionScenario, encodePng, encodePngDataUrl, evaluatePresentationBindings, fnv1aHex, formatFrameBenchmarkResult, getHeadlessSurface, imageDataFromPngDataUrl, installHeadlessCanvas, isHostOwnedAudioEventKind, isSelectionDecisionKind, isSelectionReasonCode, jobEventContracts, localizeProductionScenarioFailure, makeImageData, paintingPortal, parseAudioCueSnapshot, presentationBindingEventContracts, presentationSequenceEventContracts, productionScenarioEventContracts, recordSelectionDecision, replayExportedTrace, setDefaultGlyphAtlas, shouldUpdateGolden, worldGraphEventContracts, worldPatchEventContracts, writeComposedFrame, writeVisualArtifacts };
4383
+ export { AUDIO_CUE_SNAPSHOT_SCHEMA_VERSION, type AudioCueDiagnostic, type BoundReplaySession, CONTENT_REVISION_ACTIVATED_EVENT, CONTENT_REVISION_SNAPSHOT_SCHEMA_VERSION, type CausationTreeNode, type ContentRevisionActivator, type ContentRevisionBundle, type ContentRevisionInspect, type ContentRevisionSnapshot, type CreateHeadlessHarnessOptions, type CreateHeadlessMultiCartHarnessOptions, type CreateProductionScenarioRunnerOptions, type CreateReplayInspectorOptions, type CreateSelectionTraceOptions, DEFAULT_HEADLESS_HEIGHT, DEFAULT_HEADLESS_WIDTH, DEFAULT_MAX_SELECTION_RECORDS, DEFAULT_PRODUCTION_SCENARIO_VIEWPORTS, type FrameBenchmarkOptions, type FrameBenchmarkResult, type GlyphAtlas, HEADLESS_PNG_DATA_URL, HOST_OWNED_AUDIO_EVENT_KINDS, type HeadlessAudioAdapter, type HeadlessAudioAdapterSnapshot, type HeadlessCanvas2DSettings, type HeadlessFrameError, type HeadlessHarness, type HeadlessImageFixture, type HeadlessInspect, type HeadlessJobWorker, type HeadlessMultiCartHarness, HeadlessUnsupportedOperationError, type HostGrantSet, type HostOwnedAudioEvent, type HostOwnedAudioEventKind, type HostOwnedAudioObserver, type HostOwnedAudioSnapshot, type InspectorRecord, type InstallHeadlessCanvasOptions, type JobCoordinator, type JobCoordinatorSnapshot, type JobInspect, PRESENTATION_BINDING_APPLIED_EVENT, PRESENTATION_BINDING_SNAPSHOT_SCHEMA_VERSION, PRODUCTION_SCENARIO_BOUNDARIES, PRODUCTION_SCENARIO_SCHEMA_VERSION, PRODUCTION_SCENARIO_SNAPSHOT_SCHEMA_VERSION, type PortalInspect, type PortalLifecycle, type PortalLifecycleSnapshot, type PresentationBindingInspect, type PresentationBindingManifest, type PresentationBindingRuntime, type PresentationBindingSnapshot, type PresentationSequenceDefinition, type PresentationSequenceInspect, type PresentationSequencePlayer, type PresentationSequenceSnapshot, type ProductionScenarioControl, type ProductionScenarioDefinition, type ProductionScenarioEvidenceBundle, type ProductionScenarioExpectation, type ProductionScenarioHost, type ProductionScenarioInputHitTest, type ProductionScenarioInputSurface, type ProductionScenarioLocalization, type ProductionScenarioObservation, type ProductionScenarioRunner, REDUCED_MOTION_ACTIVE_SEQUENCE_POLICY, REDUCED_MOTION_PARTICIPANT_IDS, type ReducedMotionActiveSequencePolicy, type ReducedMotionParticipantId, type ReducedMotionParticipantReport, type ReducedMotionPropagation, type RemoteCartInspect, type RemoteCartSandbox, type ReplayCompareResult, type ReplayInspector, type ReplayInspectorExport, type ReplayInspectorReport, type ReplayParticipantSummary, type ReplayTapeAction, type ReplayTraceFilter, type RestoreAudioCueResult, SELECTION_DECISION_KINDS, SELECTION_REASON_CODES, SELECTION_TRACE_SCHEMA_VERSION, SELECTION_TRACE_SENSITIVE_KEYS, type SelectionAssetResolution, type SelectionBindingEvaluation, type SelectionContentIdentity, type SelectionDecisionInput, type SelectionDecisionKind, type SelectionDecisionRecord, type SelectionPresentationDecision, type SelectionReasonCode, type SelectionSequenceDecision, type SelectionSnapshotProvenance, type SelectionStagingOutcome, type SelectionStagingResult, type SelectionTrace, type SelectionTraceExport, type SelectionTraceFilter, type SelectionTraceReport, type SemanticLayerController, type SemanticPublishedRegion, type SemanticRegionInspect, UPDATE_GOLDEN_ENV, type VisualArtifactPaths, type VisualArtifacts, type VisualCompareOptions, type VisualCompareResult, type VisualLayerCapture, type VisualLayerController, type VisualLayerInspect, WORLD_PATCH_ACCEPTED_EVENT, WORLD_PATCH_SNAPSHOT_SCHEMA_VERSION, type WorldGraph, type WorldGraphInspect, type WorldGraphProjection, type WorldGraphSnapshot, type WorldPatchApplier, type WorldPatchInspect, type WorldPatchSnapshot, type WorldPersistenceAdapter, type WriteComposedFrameResult, assertPixelsEqual, assertPngDataUrlsEqual, attachHeadlessCanvas2D, attachSelectionTrace, benchmarkCartFrames, cabinetPortal, captureVisualLayers, compareImageData, compareReplayTraces, contentRevisionEventContracts, createContentRevisionActivator, createDefaultGlyphAtlas, createHeadlessAudioAdapter, createHeadlessHarness, createHeadlessJobWorker, createHeadlessMultiCartHarness, createHostGrantSet, createImageFixture, createJobCoordinator, createMemoryJobPersistence, createMemoryWorldPersistence, createPortalLifecycle, createPresentationBindingRuntime, createPresentationSequencePlayer, createProductionScenarioRunner, createRemoteCartSandbox, createRemoteContentAdapter, createReplayInspector, createSelectionTrace, createSemanticLayerController, createStaticContentAdapter, createVisualLayerController, createWorldGraph, createWorldPatchApplier, decodePng, definePresentationBindings, definePresentationSequence, defineProductionScenario, encodePng, encodePngDataUrl, evaluatePresentationBindings, fnv1aHex, formatFrameBenchmarkResult, getHeadlessSurface, imageDataFromPngDataUrl, installHeadlessCanvas, isHostOwnedAudioEventKind, isSelectionDecisionKind, isSelectionReasonCode, jobEventContracts, localizeProductionScenarioFailure, makeImageData, paintingPortal, parseAudioCueSnapshot, presentationBindingEventContracts, presentationSequenceEventContracts, productionScenarioEventContracts, recordSelectionDecision, replayExportedTrace, setDefaultGlyphAtlas, shouldUpdateGolden, worldGraphEventContracts, worldPatchEventContracts, writeComposedFrame, writeVisualArtifacts };