@cueframe/kernel 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/dist/_members/account-model/testing/conversationStoreContract.d.ts +1 -1
- package/dist/_members/authoring/providers/resourceApi.d.ts +1 -1
- package/dist/_members/authoring/transpileComponent.d.ts +1 -1
- package/dist/_members/cloud-import/CloudImportService.d.ts +35 -0
- package/dist/_members/cloud-import/ImportProvider.d.ts +73 -0
- package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +27 -0
- package/dist/_members/cloud-import/cloudConfig.d.ts +23 -0
- package/dist/_members/cloud-import/index.d.ts +9 -0
- package/dist/_members/cloud-import/multipartUpload.d.ts +12 -0
- package/dist/_members/composition/ops/compositionOps.d.ts +2 -1
- package/dist/_members/composition/ops/types.d.ts +1 -1
- package/dist/_members/composition/projection/behind-readiness.d.ts +127 -0
- package/dist/_members/composition/projection/index.d.ts +2 -0
- package/dist/_members/composition/projection/reframe-readiness.d.ts +156 -0
- package/dist/_members/composition/timeline/placement.d.ts +1 -1
- package/dist/_members/composition/validators/composition.d.ts +43 -26
- package/dist/_members/composition/validators/render.d.ts +32 -0
- package/dist/_members/composition-ops/index.d.ts +1 -1
- package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
- package/dist/_members/convex-api/api.d.ts +5 -0
- package/dist/_members/convex-api/dataModel.d.ts +6 -0
- package/dist/_members/core/render/compositionRender.d.ts +17 -1
- package/dist/_members/core/render/exportSettings.d.ts +1 -1
- package/dist/_members/core/render/types.d.ts +31 -0
- package/dist/_members/mcp/curation.d.ts +1 -1
- package/dist/_members/plane/conformance.d.ts +1 -1
- package/dist/_members/render-harness/localRender.d.ts +1 -1
- package/dist/animate.js +828 -79187
- package/dist/authoring/build-tools.js +8 -11
- package/dist/authoring/context.js +5 -5
- package/dist/authoring/models.js +1 -2
- package/dist/authoring/prompts.js +1 -1
- package/dist/authoring/tools.js +7 -7
- package/dist/authoring/transpileComponent.js +3 -2220
- package/dist/authoring.js +30 -30
- package/dist/brand-derivation.js +1 -1
- package/dist/chunk-6IU2UQI5.js +107 -0
- package/dist/{chunk-5I7VDCAC.js → chunk-7FO3ZJ43.js} +4 -1
- package/dist/{chunk-N67PDTKQ.js → chunk-ABL557OT.js} +1 -1
- package/dist/{chunk-MC5DLSEV.js → chunk-AP6ZIVAV.js} +15 -15
- package/dist/{chunk-QLAQHR3L.js → chunk-AQBREB5O.js} +1 -1
- package/dist/{chunk-DSNG6WLU.js → chunk-AYVJXDLB.js} +1 -4
- package/dist/{chunk-6CMVBTTP.js → chunk-DK2ODBNT.js} +19 -9
- package/dist/chunk-DSMLHYJ4.js +82 -0
- package/dist/{chunk-BRKJKB33.js → chunk-FYZVH3MC.js} +1 -1
- package/dist/{chunk-MVEE6HEC.js → chunk-GA23TRNR.js} +5 -7
- package/dist/chunk-HCCBDJLW.js +68 -0
- package/dist/{chunk-JRQVPFLF.js → chunk-HY3RIEZW.js} +1 -1
- package/dist/{chunk-OIRUO5P7.js → chunk-JJ6XD7NG.js} +152 -2
- package/dist/{_members/primitives/chunk-IDAL6G3Y.js → chunk-JQMPHKLU.js} +19 -27
- package/dist/{chunk-G3PBH53P.js → chunk-MBCXCJOE.js} +1 -1
- package/dist/{chunk-UEI3NLNK.js → chunk-MHOQTPOB.js} +1 -4
- package/dist/{chunk-37NJ27UU.js → chunk-OCFDUCF4.js} +3 -0
- package/dist/{chunk-WZTTZHNR.js → chunk-OLFOPQCA.js} +12 -9
- package/dist/{chunk-P43IE4WB.js → chunk-P727GZVO.js} +2 -4
- package/dist/{chunk-52AHXNKM.js → chunk-PDYO3DOJ.js} +5 -5
- package/dist/{chunk-S3P5BFFL.js → chunk-PMY24FUD.js} +2 -4
- package/dist/{chunk-ATAF24QG.js → chunk-PODIYN2K.js} +10 -3
- package/dist/chunk-RF7U3SCL.js +606 -0
- package/dist/{chunk-JD77Y2WM.js → chunk-SW336CJP.js} +1 -4
- package/dist/{chunk-TULRCY6U.js → chunk-TOJEXFXL.js} +1 -1
- package/dist/{chunk-ELLSET2N.js → chunk-UHGSZZDI.js} +3 -6
- package/dist/{chunk-M3I5LMAB.js → chunk-UY4SWJVE.js} +1 -1
- package/dist/{chunk-6QJ3V3VS.js → chunk-YX2GSJK7.js} +1 -1
- package/dist/chunk-ZT7MHRQU.js +104 -0
- package/dist/{chunk-NV4I6GJV.js → chunk-ZWMV6DD2.js} +27 -4
- package/dist/cloud-import/multipart.d.ts +1 -0
- package/dist/cloud-import/multipart.js +8 -0
- package/dist/cloud-import.d.ts +1 -0
- package/dist/cloud-import.js +234 -0
- package/dist/compose/renderer.js +19 -22
- package/dist/compose.js +19 -22
- package/dist/composition/graphics-plan.js +3 -3
- package/dist/composition/ops.js +4 -4
- package/dist/composition/primitive-catalog.js +1 -1
- package/dist/composition/projection.js +21 -5
- package/dist/composition/validators.js +6 -4
- package/dist/composition-ops.js +15 -13
- package/dist/composition.js +26 -8
- package/dist/{context-CEAKQ5T7.js → context-YWUZDG5X.js} +5 -5
- package/dist/convex-api/dataModel.d.ts +1 -0
- package/dist/convex-api/dataModel.js +0 -0
- package/dist/convex-api.d.ts +1 -0
- package/dist/convex-api.js +8 -0
- package/dist/core/render.js +3 -3
- package/dist/core/select.js +2 -2
- package/dist/core.js +3 -3
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +2 -5
- package/dist/mcp/server.js +1 -2
- package/dist/mcp.js +2 -95
- package/dist/media-model/media-kind.js +9 -98
- package/dist/media-model/testing.js +1071 -718
- package/dist/nle-export/server.js +328 -130
- package/dist/nle-export/xml.js +5 -22799
- package/dist/nle-export.js +20 -22
- package/dist/primitives/backgrounds.js +2 -3
- package/dist/primitives/captions.js +4 -243
- package/dist/primitives/effects.js +2 -3
- package/dist/primitives/hero-text.js +2 -3
- package/dist/primitives/layouts.js +2 -3
- package/dist/primitives/lib/index.js +8 -10
- package/dist/primitives/lib/preview.js +1 -2
- package/dist/primitives/lib/schema.js +1 -2
- package/dist/primitives/lib/text/fitText.js +1 -2
- package/dist/primitives/lib.js +8 -10
- package/dist/primitives/scenes.js +1 -2
- package/dist/primitives/text.js +2 -3
- package/dist/primitives/ui-blocks.js +4 -5
- package/dist/primitives.js +19 -21
- package/package.json +125 -16
- package/dist/TextureLoader-UQOFUSAP.js +0 -422
- package/dist/VideoTexture-AQWSPIJG.js +0 -62
- package/dist/_members/account-model/index.js +0 -4
- package/dist/_members/account-model/testing/conversationStoreContract.js +0 -168
- package/dist/_members/account-model/testing/index.js +0 -7
- package/dist/_members/account-model/testing/restorePointStoreContract.js +0 -69
- package/dist/_members/account-model/types/index.js +0 -1
- package/dist/_members/account-model/validators/contextFile.js +0 -18
- package/dist/_members/account-model/validators/conversation.js +0 -95
- package/dist/_members/account-model/validators/dashboardInsight.js +0 -16
- package/dist/_members/account-model/validators/index.js +0 -7
- package/dist/_members/account-model/validators/sessionToken.js +0 -49
- package/dist/_members/account-model/validators/uploadToken.js +0 -16
- package/dist/_members/account-model/validators/userSettings.js +0 -12
- package/dist/_members/account-model/validators/workingComposition.js +0 -20
- package/dist/_members/brand-derivation/constants.js +0 -20
- package/dist/_members/brand-derivation/contrastSafe.js +0 -114
- package/dist/_members/brand-derivation/index.js +0 -1
- package/dist/_members/composition/audio/audioMix.js +0 -61
- package/dist/_members/composition/audio/index.js +0 -5
- package/dist/_members/composition/audio/mixStaging.js +0 -195
- package/dist/_members/composition/audio/musicPack.generated.js +0 -136
- package/dist/_members/composition/audio/musicPack.js +0 -36
- package/dist/_members/composition/audio/pack.generated.js +0 -603
- package/dist/_members/composition/audio/pack.js +0 -48
- package/dist/_members/composition/audio/palette.js +0 -134
- package/dist/_members/composition/autozoom/index.js +0 -83
- package/dist/_members/composition/brand-kit.js +0 -45
- package/dist/_members/composition/brief/contract.js +0 -209
- package/dist/_members/composition/color-grade.js +0 -80
- package/dist/_members/composition/depth.js +0 -8
- package/dist/_members/composition/fixtures/index.js +0 -143
- package/dist/_members/composition/fixtures/vaayaErrored.d.ts +0 -25
- package/dist/_members/composition/fixtures/vaayaErrored.js +0 -203
- package/dist/_members/composition/fonts.js +0 -162
- package/dist/_members/composition/graphics-plan/compile.js +0 -221
- package/dist/_members/composition/graphics-plan/index.js +0 -10
- package/dist/_members/composition/graphics-plan/instantiateMotif.js +0 -44
- package/dist/_members/composition/graphics-plan/motion.js +0 -66
- package/dist/_members/composition/graphics-plan/schemas.js +0 -261
- package/dist/_members/composition/graphics-plan/solve.js +0 -145
- package/dist/_members/composition/index.js +0 -5
- package/dist/_members/composition/invariants/clipPlacement.js +0 -69
- package/dist/_members/composition/invariants/composition.js +0 -28
- package/dist/_members/composition/invariants/errors.js +0 -10
- package/dist/_members/composition/invariants/etag.js +0 -38
- package/dist/_members/composition/invariants/ids.js +0 -33
- package/dist/_members/composition/invariants/index.js +0 -9
- package/dist/_members/composition/invariants/keyframes.js +0 -45
- package/dist/_members/composition/invariants/markers.js +0 -29
- package/dist/_members/composition/invariants/time.js +0 -20
- package/dist/_members/composition/invariants/tracks.js +0 -304
- package/dist/_members/composition/ops/compositionOps.js +0 -1056
- package/dist/_members/composition/ops/headlessStore.js +0 -94
- package/dist/_members/composition/ops/index.js +0 -4
- package/dist/_members/composition/ops/selectors.js +0 -118
- package/dist/_members/composition/ops/timeline-word.js +0 -1
- package/dist/_members/composition/ops/transcript.js +0 -77
- package/dist/_members/composition/ops/types.js +0 -16
- package/dist/_members/composition/primitive-catalog/catalogQuery.js +0 -150
- package/dist/_members/composition/primitive-catalog/disabled.js +0 -32
- package/dist/_members/composition/primitive-catalog/generated/meta.js +0 -15161
- package/dist/_members/composition/primitive-catalog/index.js +0 -46
- package/dist/_members/composition/primitive-catalog/paramValidation.js +0 -231
- package/dist/_members/composition/primitive-catalog/projection.js +0 -164
- package/dist/_members/composition/primitive-catalog/types.js +0 -14
- package/dist/_members/composition/projection/behind-placement.js +0 -62
- package/dist/_members/composition/projection/brandKit.js +0 -482
- package/dist/_members/composition/projection/cardTokens.js +0 -209
- package/dist/_members/composition/projection/composition-floor.js +0 -582
- package/dist/_members/composition/projection/cropProjection.js +0 -257
- package/dist/_members/composition/projection/index.js +0 -7
- package/dist/_members/composition/projection/occlusion-budget.js +0 -104
- package/dist/_members/composition/projection/safe-zones.js +0 -99
- package/dist/_members/composition/reframe/aspectLoss.js +0 -115
- package/dist/_members/composition/reframe/coverage.js +0 -62
- package/dist/_members/composition/reframe/derive.js +0 -73
- package/dist/_members/composition/reframe/index.js +0 -109
- package/dist/_members/composition/reframe/kenBurns.js +0 -64
- package/dist/_members/composition/reframe/shotScale.js +0 -176
- package/dist/_members/composition/reframe/trajectory.js +0 -124
- package/dist/_members/composition/timeline/compound.js +0 -134
- package/dist/_members/composition/timeline/index.js +0 -9
- package/dist/_members/composition/timeline/intent.js +0 -228
- package/dist/_members/composition/timeline/keyframes.js +0 -121
- package/dist/_members/composition/timeline/link.js +0 -59
- package/dist/_members/composition/timeline/occupancy.js +0 -36
- package/dist/_members/composition/timeline/placement.js +0 -74
- package/dist/_members/composition/timeline/plan.js +0 -31
- package/dist/_members/composition/timeline/resolve.js +0 -170
- package/dist/_members/composition/timeline/trims.js +0 -278
- package/dist/_members/composition/types/index.js +0 -1
- package/dist/_members/composition/validators/brandKit.js +0 -295
- package/dist/_members/composition/validators/composePlan.js +0 -113
- package/dist/_members/composition/validators/composition.js +0 -703
- package/dist/_members/composition/validators/font.js +0 -34
- package/dist/_members/composition/validators/graphicKinds.js +0 -30
- package/dist/_members/composition/validators/index.js +0 -9
- package/dist/_members/composition/validators/project.js +0 -29
- package/dist/_members/composition/validators/registry.js +0 -41
- package/dist/_members/composition/validators/render.js +0 -139
- package/dist/_members/composition/validators/session.js +0 -37
- package/dist/_members/composition/validators/webhook.js +0 -72
- package/dist/_members/composition-ops/alphaLayers.js +0 -141
- package/dist/_members/composition-ops/index.js +0 -637
- package/dist/_members/composition-ops/materializeGrid.js +0 -99
- package/dist/_members/composition-ops/opRecorder.js +0 -196
- package/dist/_members/composition-ops/recordingStore.js +0 -14
- package/dist/_members/composition-ops/replaceRegion.js +0 -102
- package/dist/_members/composition-ops/testFixtures.js +0 -19
- package/dist/_members/core/index.js +0 -5
- package/dist/_members/core/render/bookends.js +0 -53
- package/dist/_members/core/render/captions.js +0 -127
- package/dist/_members/core/render/compositionRender.js +0 -1249
- package/dist/_members/core/render/deriveTrajectory.js +0 -889
- package/dist/_members/core/render/emphasis.js +0 -16
- package/dist/_members/core/render/eval/cropBox.js +0 -139
- package/dist/_members/core/render/eval/inclusion.js +0 -96
- package/dist/_members/core/render/eval/index.js +0 -146
- package/dist/_members/core/render/eval/metrics.js +0 -94
- package/dist/_members/core/render/exportSettings.js +0 -65
- package/dist/_members/core/render/index.js +0 -20
- package/dist/_members/core/render/mapFaceToPerson.js +0 -73
- package/dist/_members/core/render/types.js +0 -8
- package/dist/_members/core/render/vcam/cameraPath.js +0 -248
- package/dist/_members/core/render/vcam/constants.js +0 -115
- package/dist/_members/core/render/vcam/errorCodes.js +0 -39
- package/dist/_members/core/render/vcam/framing.js +0 -136
- package/dist/_members/core/render/vcam/requiredRegion.js +0 -137
- package/dist/_members/core/render/vcam/shots.js +0 -53
- package/dist/_members/core/render/vcam/subjectSet.js +0 -388
- package/dist/_members/core/select/errorCodes.js +0 -38
- package/dist/_members/core/select/index.js +0 -26
- package/dist/_members/core/select/model.js +0 -18
- package/dist/_members/core/select/select.js +0 -244
- package/dist/_members/core/select/stabilize.js +0 -242
- package/dist/_members/core/types.js +0 -7
- package/dist/_members/errors/index.js +0 -1
- package/dist/_members/errors/registry.js +0 -560
- package/dist/_members/foundation/codes/index.js +0 -31
- package/dist/_members/foundation/index.js +0 -2
- package/dist/_members/foundation/primitives/index.js +0 -5
- package/dist/_members/mcp/adapter.js +0 -771
- package/dist/_members/mcp/burnedNames.js +0 -73
- package/dist/_members/mcp/core.js +0 -390
- package/dist/_members/mcp/curation.js +0 -792
- package/dist/_members/mcp/executor.js +0 -142
- package/dist/_members/mcp/format.js +0 -9
- package/dist/_members/mcp/generated/catalogPreviews.js +0 -95
- package/dist/_members/mcp/generated/harness.js +0 -81
- package/dist/_members/mcp/generated/operations.js +0 -131
- package/dist/_members/mcp/index.js +0 -50
- package/dist/_members/mcp/internalLoopTools.js +0 -109
- package/dist/_members/mcp/prompts.js +0 -45
- package/dist/_members/mcp/resources.js +0 -166
- package/dist/_members/mcp/server.js +0 -340
- package/dist/_members/mcp/wait.js +0 -378
- package/dist/_members/mcp/x402Meta.js +0 -66
- package/dist/_members/media-model/api.js +0 -175
- package/dist/_members/media-model/index.js +0 -1
- package/dist/_members/media-model/media-kind.js +0 -116
- package/dist/_members/media-model/testing/index.js +0 -1
- package/dist/_members/media-model/testing/mediaStoreContract.js +0 -82
- package/dist/_members/media-model/transcriptSearch.js +0 -70
- package/dist/_members/media-model/transcriptSearchCases.json +0 -79
- package/dist/_members/nle-export/compact-timeline.js +0 -73
- package/dist/_members/nle-export/compact-timeline.js.map +0 -1
- package/dist/_members/nle-export/composition-to-input.js +0 -147
- package/dist/_members/nle-export/composition-to-input.js.map +0 -1
- package/dist/_members/nle-export/fcpxml.js +0 -159
- package/dist/_members/nle-export/fcpxml.js.map +0 -1
- package/dist/_members/nle-export/index.js +0 -12
- package/dist/_members/nle-export/index.js.map +0 -1
- package/dist/_members/nle-export/premiere.js +0 -161
- package/dist/_members/nle-export/premiere.js.map +0 -1
- package/dist/_members/nle-export/server/index.js +0 -2
- package/dist/_members/nle-export/server/index.js.map +0 -1
- package/dist/_members/nle-export/server/pack-zip.js +0 -38
- package/dist/_members/nle-export/server/pack-zip.js.map +0 -1
- package/dist/_members/nle-export/srt.js +0 -50
- package/dist/_members/nle-export/srt.js.map +0 -1
- package/dist/_members/nle-export/types.js +0 -9
- package/dist/_members/nle-export/types.js.map +0 -1
- package/dist/_members/nle-export/xml/index.js +0 -11
- package/dist/_members/nle-export/xml/index.js.map +0 -1
- package/dist/_members/nle-export/xml-utils.js +0 -48
- package/dist/_members/nle-export/xml-utils.js.map +0 -1
- package/dist/_members/perception/activeSpeaker.js +0 -103
- package/dist/_members/perception/audioQuality.js +0 -76
- package/dist/_members/perception/energyBeat.js +0 -99
- package/dist/_members/perception/identityMatch.js +0 -91
- package/dist/_members/perception/index.js +0 -48
- package/dist/_members/perception/visualQuality.js +0 -95
- package/dist/_members/plane/conformance.js +0 -90
- package/dist/_members/plane/contract.js +0 -49
- package/dist/_members/plane/index.js +0 -16
- package/dist/_members/primitives/backgrounds/index.js +0 -32
- package/dist/_members/primitives/backgrounds/index.js.map +0 -1
- package/dist/_members/primitives/captions/index.js +0 -398
- package/dist/_members/primitives/captions/index.js.map +0 -1
- package/dist/_members/primitives/chunk-2LVE4UIT.js +0 -139
- package/dist/_members/primitives/chunk-2LVE4UIT.js.map +0 -1
- package/dist/_members/primitives/chunk-3IQUH6KK.js +0 -20
- package/dist/_members/primitives/chunk-3IQUH6KK.js.map +0 -1
- package/dist/_members/primitives/chunk-3OMURV6Q.js +0 -112
- package/dist/_members/primitives/chunk-3OMURV6Q.js.map +0 -1
- package/dist/_members/primitives/chunk-4IS6TMEG.js +0 -21
- package/dist/_members/primitives/chunk-4IS6TMEG.js.map +0 -1
- package/dist/_members/primitives/chunk-5MWGAEGQ.js +0 -1644
- package/dist/_members/primitives/chunk-5MWGAEGQ.js.map +0 -1
- package/dist/_members/primitives/chunk-7RRPFPQK.js +0 -15
- package/dist/_members/primitives/chunk-7RRPFPQK.js.map +0 -1
- package/dist/_members/primitives/chunk-DH5TRZK2.js +0 -125
- package/dist/_members/primitives/chunk-DH5TRZK2.js.map +0 -1
- package/dist/_members/primitives/chunk-E3KNUSFG.js +0 -2337
- package/dist/_members/primitives/chunk-E3KNUSFG.js.map +0 -1
- package/dist/_members/primitives/chunk-G2B3G4HK.js +0 -47
- package/dist/_members/primitives/chunk-G2B3G4HK.js.map +0 -1
- package/dist/_members/primitives/chunk-HFPFGZXT.js +0 -1494
- package/dist/_members/primitives/chunk-HFPFGZXT.js.map +0 -1
- package/dist/_members/primitives/chunk-HIWVFZVH.js +0 -19
- package/dist/_members/primitives/chunk-HIWVFZVH.js.map +0 -1
- package/dist/_members/primitives/chunk-IDAL6G3Y.js.map +0 -1
- package/dist/_members/primitives/chunk-KNC6JP5F.js +0 -34
- package/dist/_members/primitives/chunk-KNC6JP5F.js.map +0 -1
- package/dist/_members/primitives/chunk-KYRDVZST.js +0 -459
- package/dist/_members/primitives/chunk-KYRDVZST.js.map +0 -1
- package/dist/_members/primitives/chunk-LWLHS2NS.js +0 -3410
- package/dist/_members/primitives/chunk-LWLHS2NS.js.map +0 -1
- package/dist/_members/primitives/chunk-QAQ3P7DR.js +0 -8855
- package/dist/_members/primitives/chunk-QAQ3P7DR.js.map +0 -1
- package/dist/_members/primitives/chunk-ROV2ODWC.js +0 -81
- package/dist/_members/primitives/chunk-ROV2ODWC.js.map +0 -1
- package/dist/_members/primitives/chunk-TCRC2FH3.js +0 -183
- package/dist/_members/primitives/chunk-TCRC2FH3.js.map +0 -1
- package/dist/_members/primitives/chunk-US4YEDAA.js +0 -96
- package/dist/_members/primitives/chunk-US4YEDAA.js.map +0 -1
- package/dist/_members/primitives/chunk-UVKRO5ER.js +0 -13
- package/dist/_members/primitives/chunk-UVKRO5ER.js.map +0 -1
- package/dist/_members/primitives/chunk-W4EIIF2I.js +0 -10
- package/dist/_members/primitives/chunk-W4EIIF2I.js.map +0 -1
- package/dist/_members/primitives/chunk-WPGKIPCO.js +0 -3563
- package/dist/_members/primitives/chunk-WPGKIPCO.js.map +0 -1
- package/dist/_members/primitives/chunk-WZFLEGMD.js +0 -1435
- package/dist/_members/primitives/chunk-WZFLEGMD.js.map +0 -1
- package/dist/_members/primitives/chunk-XHU3WBEI.js +0 -33
- package/dist/_members/primitives/chunk-XHU3WBEI.js.map +0 -1
- package/dist/_members/primitives/chunk-YN7WTZZ7.js +0 -46
- package/dist/_members/primitives/chunk-YN7WTZZ7.js.map +0 -1
- package/dist/_members/primitives/effects/index.js +0 -30
- package/dist/_members/primitives/effects/index.js.map +0 -1
- package/dist/_members/primitives/hero-text/index.js +0 -14
- package/dist/_members/primitives/hero-text/index.js.map +0 -1
- package/dist/_members/primitives/index.js +0 -64
- package/dist/_members/primitives/index.js.map +0 -1
- package/dist/_members/primitives/layouts/index.js +0 -24
- package/dist/_members/primitives/layouts/index.js.map +0 -1
- package/dist/_members/primitives/lib/easings.js +0 -26
- package/dist/_members/primitives/lib/easings.js.map +0 -1
- package/dist/_members/primitives/lib/index.js +0 -74
- package/dist/_members/primitives/lib/index.js.map +0 -1
- package/dist/_members/primitives/lib/palette.js +0 -72
- package/dist/_members/primitives/lib/palette.js.map +0 -1
- package/dist/_members/primitives/lib/preview.js +0 -8
- package/dist/_members/primitives/lib/preview.js.map +0 -1
- package/dist/_members/primitives/lib/schema.js +0 -12
- package/dist/_members/primitives/lib/schema.js.map +0 -1
- package/dist/_members/primitives/lib/seeded-random.js +0 -14
- package/dist/_members/primitives/lib/seeded-random.js.map +0 -1
- package/dist/_members/primitives/lib/text/contrast.js +0 -12
- package/dist/_members/primitives/lib/text/contrast.js.map +0 -1
- package/dist/_members/primitives/lib/text/fill.js +0 -8
- package/dist/_members/primitives/lib/text/fill.js.map +0 -1
- package/dist/_members/primitives/lib/text/fitText.js +0 -10
- package/dist/_members/primitives/lib/text/fitText.js.map +0 -1
- package/dist/_members/primitives/lib/text/marker.js +0 -8
- package/dist/_members/primitives/lib/text/marker.js.map +0 -1
- package/dist/_members/primitives/lib/text/motion.js +0 -16
- package/dist/_members/primitives/lib/text/motion.js.map +0 -1
- package/dist/_members/primitives/lib/text/recolor.js +0 -8
- package/dist/_members/primitives/lib/text/recolor.js.map +0 -1
- package/dist/_members/primitives/lib/text/spec.js +0 -1
- package/dist/_members/primitives/lib/text/spec.js.map +0 -1
- package/dist/_members/primitives/lib/text/stage.js +0 -8
- package/dist/_members/primitives/lib/text/stage.js.map +0 -1
- package/dist/_members/primitives/lib/text/typeface.js +0 -8
- package/dist/_members/primitives/lib/text/typeface.js.map +0 -1
- package/dist/_members/primitives/lib/tokens.js +0 -24
- package/dist/_members/primitives/lib/tokens.js.map +0 -1
- package/dist/_members/primitives/lib/types.js +0 -1
- package/dist/_members/primitives/lib/types.js.map +0 -1
- package/dist/_members/primitives/params-required.json +0 -153
- package/dist/_members/primitives/scenes/index.js +0 -25
- package/dist/_members/primitives/scenes/index.js.map +0 -1
- package/dist/_members/primitives/subject-foreground/index.js +0 -30
- package/dist/_members/primitives/subject-foreground/index.js.map +0 -1
- package/dist/_members/primitives/text/index.js +0 -57
- package/dist/_members/primitives/text/index.js.map +0 -1
- package/dist/_members/primitives/transitions/index.js +0 -67
- package/dist/_members/primitives/transitions/index.js.map +0 -1
- package/dist/_members/primitives/ui-blocks/index.js +0 -76
- package/dist/_members/primitives/ui-blocks/index.js.map +0 -1
- package/dist/_members/primitives/version-map.json +0 -105
- package/dist/_members/primitives/workspace.js +0 -60
- package/dist/_members/primitives/workspace.js.map +0 -1
- package/dist/chunk-7GISRVON.js +0 -14176
- package/dist/chunk-DIBOJJMU.js +0 -16838
- package/dist/chunk-EAUSEGB7.js +0 -420
- package/dist/chunk-FUWJOVVK.js +0 -3633
- package/dist/chunk-G75E7YA4.js +0 -11883
- package/dist/chunk-JCZQT7K3.js +0 -3266
- package/dist/chunk-KF5ETMKB.js +0 -544
- package/dist/chunk-NDKERSXY.js +0 -1296
- package/dist/chunk-V43Y7IE4.js +0 -3621
- package/dist/chunk-VIVQHIGZ.js +0 -4319
- package/dist/chunk-YA3OR2KK.js +0 -249
- package/dist/hls-HD4C5G6W.js +0 -33000
- package/dist/token-RGFIT24D.js +0 -69
- package/dist/token-util-GPLSGYVO.js +0 -5
- package/dist/vision_bundle-5Y376MAR.js +0 -4084
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE CONVERSATION STORE CONTRACT — one executable statement, every store.
|
|
3
|
-
*
|
|
4
|
-
* A Director thread is persisted by TWO independent implementations: the
|
|
5
|
-
* desktop's sqlite (`cueframe/src-tauri/src/database/conversations.rs`) and the
|
|
6
|
-
* org's Convex documents (`services/convex/conversations.ts`), reached through
|
|
7
|
-
* an adapter each (`platform/tauri.ts`, `packages/web/adapter.ts`). A third
|
|
8
|
-
* "implementation" exists in the test double the app's own tests run against.
|
|
9
|
-
*
|
|
10
|
-
* THEY AGREED BY REVIEW DISCIPLINE, AND THAT FAILED. Three separate files
|
|
11
|
-
* carried prose saying both stores held the same rules. Two of those rules were
|
|
12
|
-
* true in one store only — the refusal to re-point a thread (Convex threw,
|
|
13
|
-
* sqlite silently accepted) and the immutability of a thread's creation time
|
|
14
|
-
* (Convex's `_creationTime`; sqlite's `INSERT OR REPLACE` rewrote it every
|
|
15
|
-
* turn). A third divergence was the live bug this whole effort started from:
|
|
16
|
-
* sqlite upserted on the app's id while Convex inserted a new document per
|
|
17
|
-
* turn, so one web conversation became N rows. Every one of those was invisible
|
|
18
|
-
* because each store was tested only against itself.
|
|
19
|
-
*
|
|
20
|
-
* This file is the fix: the facts as ASSERTIONS, parameterised over the store.
|
|
21
|
-
* A lane that wants to claim the contract runs it. There is no per-lane copy to
|
|
22
|
-
* drift, and a fact added here fails everywhere it is not yet true.
|
|
23
|
-
*
|
|
24
|
-
* WHY A PARAMETERISED SUITE AND NOT A DATA TABLE like `packages/plane`'s
|
|
25
|
-
* conformance rows: the plane's cases are STATELESS — the fixture travels in
|
|
26
|
-
* the request body, so a row is genuinely lane-agnostic data. Conversation
|
|
27
|
-
* storage is stateful CRUD over four verbs, where a fact reads "save this
|
|
28
|
-
* thrice, then list, then count". Encoding that as data needs an op-script
|
|
29
|
-
* schema plus an interpreter per lane; encoding it as a function needs neither.
|
|
30
|
-
*
|
|
31
|
-
* THESE ARE THE TWO MECHANISMS, and there are only two. `packages/plane/src/
|
|
32
|
-
* conformance.ts` holds stateless OPERATIONS both lanes serve; this shape holds
|
|
33
|
-
* stateful STORES behind one interface. CLAUDE.md carries the decision table —
|
|
34
|
-
* read it before inventing a third.
|
|
35
|
-
*
|
|
36
|
-
* WHY THE RUST LANE IS NOT DRIVEN FROM HERE: it lives behind `cargo test`, and
|
|
37
|
-
* reaching it from TypeScript means either a WebDriver stack (`tauri-driver`
|
|
38
|
-
* does not support macOS, the dev platform) or a codegen bridge — machinery
|
|
39
|
-
* several times the size of the 250 lines it would test. Instead the same facts
|
|
40
|
-
* are written as `#[tokio::test]`s in `database/mod.rs` UNDER THE SAME NAMES.
|
|
41
|
-
* Matching names are the seam: a fact that gains a test on one side and not the
|
|
42
|
-
* other is one grep away.
|
|
43
|
-
*/
|
|
44
|
-
const A = { id: "prj_a", home: "cloud" };
|
|
45
|
-
const B = { id: "prj_b", home: "cloud" };
|
|
46
|
-
function thread(id, project, over = {}) {
|
|
47
|
-
return {
|
|
48
|
-
id,
|
|
49
|
-
title: `thread ${id}`,
|
|
50
|
-
project,
|
|
51
|
-
createdAt: 1,
|
|
52
|
-
updatedAt: 1,
|
|
53
|
-
messages: "[]",
|
|
54
|
-
...over,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export function describeConversationStoreContract(name, harness) {
|
|
58
|
-
const { describe, it, expect, makeStore } = harness;
|
|
59
|
-
const red = new Set(harness.knownRed ?? []);
|
|
60
|
-
const fact = (factName, fn) => (red.has(factName) ? it.fails : it)(factName, fn);
|
|
61
|
-
describe(`conversation store contract — ${name}`, () => {
|
|
62
|
-
fact("a_thread_is_one_row_however_many_turns", async () => {
|
|
63
|
-
const store = await makeStore();
|
|
64
|
-
for (let turn = 1; turn <= 3; turn++) {
|
|
65
|
-
await store.save(thread("conv_a", A, { updatedAt: 1000 + turn, messages: `[${turn}]` }));
|
|
66
|
-
}
|
|
67
|
-
// The id the app minted before any store saw the thread IS the identity.
|
|
68
|
-
// A store that keys writes on something else inserts per turn, and one
|
|
69
|
-
// conversation becomes N near-identical rows.
|
|
70
|
-
expect(await store.list(A)).toHaveLength(1);
|
|
71
|
-
const full = await store.get("conv_a", A);
|
|
72
|
-
expect(full?.messages).toBe("[3]");
|
|
73
|
-
expect(full?.updatedAt).toBe(1003);
|
|
74
|
-
});
|
|
75
|
-
fact("a_thread_is_addressed_by_the_project_pair", async () => {
|
|
76
|
-
const store = await makeStore();
|
|
77
|
-
await store.save(thread("conv_a", A));
|
|
78
|
-
await store.save(thread("conv_b", B));
|
|
79
|
-
expect((await store.list(A)).map((c) => c.id)).toEqual(["conv_a"]);
|
|
80
|
-
// UNREACHABLE, not merely unlisted: a thread fetchable by id under another
|
|
81
|
-
// project is a thread loadable into the wrong project's model context.
|
|
82
|
-
expect(await store.get("conv_a", B)).toBeNull();
|
|
83
|
-
expect((await store.get("conv_a", A))?.id).toBe("conv_a");
|
|
84
|
-
});
|
|
85
|
-
fact("one_id_in_two_homes_is_two_projects", async () => {
|
|
86
|
-
const store = await makeStore();
|
|
87
|
-
const asCloud = { id: "prj_shared", home: "cloud" };
|
|
88
|
-
const asLocal = { id: "prj_shared", home: "local" };
|
|
89
|
-
await store.save(thread("conv_cloud", asCloud));
|
|
90
|
-
// The pair is the key. Narrowing on the id alone would make the read's
|
|
91
|
-
// scope weaker than the address it claims to serve.
|
|
92
|
-
expect((await store.list(asCloud)).map((c) => c.id)).toEqual(["conv_cloud"]);
|
|
93
|
-
expect(await store.list(asLocal)).toEqual([]);
|
|
94
|
-
expect(await store.get("conv_cloud", asLocal)).toBeNull();
|
|
95
|
-
});
|
|
96
|
-
fact("the_workspace_is_a_scope_of_its_own", async () => {
|
|
97
|
-
const store = await makeStore();
|
|
98
|
-
await store.save(thread("conv_workspace", null));
|
|
99
|
-
await store.save(thread("conv_a", A));
|
|
100
|
-
// `null` is a MEANING — a thread started with no project open. It belongs
|
|
101
|
-
// to the workspace and survives every project switch precisely because it
|
|
102
|
-
// names no project.
|
|
103
|
-
expect((await store.list(null)).map((c) => c.id)).toEqual(["conv_workspace"]);
|
|
104
|
-
expect((await store.list(A)).map((c) => c.id)).toEqual(["conv_a"]);
|
|
105
|
-
expect(await store.get("conv_workspace", A)).toBeNull();
|
|
106
|
-
expect((await store.get("conv_workspace", null))?.id).toBe("conv_workspace");
|
|
107
|
-
});
|
|
108
|
-
fact("the_list_answers_without_the_turns", async () => {
|
|
109
|
-
const store = await makeStore();
|
|
110
|
-
await store.save(thread("conv_a", A, { messages: '["a very long transcript"]' }));
|
|
111
|
-
// A history rail draws titles. Shipping every thread's whole chat log to
|
|
112
|
-
// draw them is the read that runs on every project switch, and it grows
|
|
113
|
-
// without bound against a response-size limit.
|
|
114
|
-
const [entry] = await store.list(A);
|
|
115
|
-
// `as unknown as` — the meta type has no index signature, so a direct
|
|
116
|
-
// cast is the one TS refuses. Reading an ABSENT key is the point here.
|
|
117
|
-
expect(entry.messages).toEqual(undefined);
|
|
118
|
-
// …and the by-id read, which is what a restore needs, still carries them.
|
|
119
|
-
expect((await store.get("conv_a", A))?.messages).toBe('["a very long transcript"]');
|
|
120
|
-
});
|
|
121
|
-
fact("the_list_is_ordered_by_when_a_thread_was_last_used", async () => {
|
|
122
|
-
const store = await makeStore();
|
|
123
|
-
await store.save(thread("conv_old", A, { updatedAt: 1 }));
|
|
124
|
-
await store.save(thread("conv_new", A, { updatedAt: 2 }));
|
|
125
|
-
// The older thread gets a turn now. Creation order says it is last; what a
|
|
126
|
-
// history list is FOR says it is first.
|
|
127
|
-
await store.save(thread("conv_old", A, { updatedAt: 99 }));
|
|
128
|
-
expect((await store.list(A)).map((c) => c.id)).toEqual(["conv_old", "conv_new"]);
|
|
129
|
-
});
|
|
130
|
-
fact("a_threads_creation_time_is_the_stores_to_keep", async () => {
|
|
131
|
-
const store = await makeStore();
|
|
132
|
-
await store.save(thread("conv_a", A, { createdAt: 500, updatedAt: 500 }));
|
|
133
|
-
// A later save carrying a different createdAt must not move it: the caller
|
|
134
|
-
// re-derives that value from a list it may not have, so the store is the
|
|
135
|
-
// one thing in a position to know a thread's age.
|
|
136
|
-
await store.save(thread("conv_a", A, { createdAt: 9999, updatedAt: 2000 }));
|
|
137
|
-
const [entry] = await store.list(A);
|
|
138
|
-
expect(entry.createdAt).toBe(500);
|
|
139
|
-
expect(entry.updatedAt).toBe(2000);
|
|
140
|
-
});
|
|
141
|
-
fact("a_save_refuses_to_re_point_a_thread_at_another_project", async () => {
|
|
142
|
-
const store = await makeStore();
|
|
143
|
-
await store.save(thread("conv_a", A));
|
|
144
|
-
// A thread's project is decided at creation and never swaps. Quietly
|
|
145
|
-
// moving a history between projects is the contamination the addressing
|
|
146
|
-
// exists to prevent, spelled as a write instead of a read. (The one
|
|
147
|
-
// SANCTIONED re-point — moving a project to the cloud — has its own verb.)
|
|
148
|
-
await expect(store.save(thread("conv_a", B))).rejects.toThrow(/different project/);
|
|
149
|
-
expect(await store.get("conv_a", B)).toBeNull();
|
|
150
|
-
expect((await store.get("conv_a", A))?.id).toBe("conv_a");
|
|
151
|
-
});
|
|
152
|
-
fact("delete_takes_the_id_the_app_holds", async () => {
|
|
153
|
-
const store = await makeStore();
|
|
154
|
-
await store.save(thread("conv_a", A));
|
|
155
|
-
await store.remove("conv_a");
|
|
156
|
-
expect(await store.list(A)).toEqual([]);
|
|
157
|
-
});
|
|
158
|
-
fact("deleting_an_absent_thread_is_already_done", async () => {
|
|
159
|
-
const store = await makeStore();
|
|
160
|
-
// A delete of something that is not there is a delete that already
|
|
161
|
-
// happened; the caller has no other action to take, and its own `.catch`
|
|
162
|
-
// would swallow the error anyway — which is how "Delete removed nothing"
|
|
163
|
-
// went unnoticed for as long as it did.
|
|
164
|
-
await store.remove("conv_never");
|
|
165
|
-
expect(await store.list(A)).toEqual([]);
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test-only exports. Deliberately NOT re-exported from the package root — this
|
|
3
|
-
* subpath injects a test runner's primitives and must never be reachable from
|
|
4
|
-
* production code by importing `@cueframe/account-model`.
|
|
5
|
-
*/
|
|
6
|
-
export { describeConversationStoreContract, } from "./conversationStoreContract.js";
|
|
7
|
-
export { describeRestorePointStoreContract, } from "./restorePointStoreContract.js";
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THE RESTORE POINT STORE CONTRACT — one executable statement, every lane.
|
|
3
|
-
*
|
|
4
|
-
* Restore points are stored twice: the desktop keeps an index in sqlite with the
|
|
5
|
-
* snapshot in a JSONL beside it, the org's store keeps a pointer at a
|
|
6
|
-
* `compositionVersions` row it already has. Two implementations of one
|
|
7
|
-
* interface, which is the arrangement that produced every bug this codebase
|
|
8
|
-
* spent a day fixing in `conversations`.
|
|
9
|
-
*
|
|
10
|
-
* IT ALREADY WENT WRONG ONCE, EXACTLY AS PREDICTED. Both lanes had a
|
|
11
|
-
* `deleteRestorePointsForConversation`, both were written and tested in
|
|
12
|
-
* isolation, and NEITHER WAS CALLED — so deleting a conversation orphaned its
|
|
13
|
-
* points on disk and, on the cloud, left composition versions pinned where the
|
|
14
|
-
* thinning sweep could never reclaim them. Nothing noticed, because nothing
|
|
15
|
-
* asserted the behaviour across the seam.
|
|
16
|
-
*
|
|
17
|
-
* ONLY THE GENUINELY SHARED FACTS ARE HERE. Recording is desktop-only (the web
|
|
18
|
-
* records inside the server turn), so it is not in this contract — a fact that
|
|
19
|
-
* one lane satisfies by doing nothing is not a shared fact, it is a no-op
|
|
20
|
-
* wearing a method's name.
|
|
21
|
-
*/
|
|
22
|
-
export function describeRestorePointStoreContract(name, harness) {
|
|
23
|
-
const { describe, it, expect, makeStore } = harness;
|
|
24
|
-
const red = new Set(harness.knownRed ?? []);
|
|
25
|
-
const fact = (factName, fn) => (red.has(factName) ? it.fails : it)(factName, fn);
|
|
26
|
-
describe(`restore point store contract — ${name}`, () => {
|
|
27
|
-
fact("lists a conversation's points, newest first", async () => {
|
|
28
|
-
const store = await makeStore();
|
|
29
|
-
await store.seed("conv_a", { id: "rp_old", label: "trim the intro", createdAt: 100 });
|
|
30
|
-
await store.seed("conv_a", { id: "rp_new", label: "add a title card", createdAt: 200 });
|
|
31
|
-
// Newest first, because the recent end is what a user reaches back to.
|
|
32
|
-
expect((await store.list("conv_a")).map((r) => r.id)).toEqual(["rp_new", "rp_old"]);
|
|
33
|
-
});
|
|
34
|
-
fact("answers only the asked conversation's points", async () => {
|
|
35
|
-
const store = await makeStore();
|
|
36
|
-
await store.seed("conv_a", { id: "rp_a", label: "a", createdAt: 1 });
|
|
37
|
-
await store.seed("conv_b", { id: "rp_b", label: "b", createdAt: 1 });
|
|
38
|
-
// A restore point names composition state, so one answered under the
|
|
39
|
-
// wrong conversation could put a different video's timeline on screen.
|
|
40
|
-
expect((await store.list("conv_a")).map((r) => r.id)).toEqual(["rp_a"]);
|
|
41
|
-
expect((await store.list("conv_b")).map((r) => r.id)).toEqual(["rp_b"]);
|
|
42
|
-
});
|
|
43
|
-
fact("carries the ask as the label — the list is legible", async () => {
|
|
44
|
-
const store = await makeStore();
|
|
45
|
-
await store.seed("conv_a", { id: "rp_1", label: "trim the intro", createdAt: 1 });
|
|
46
|
-
// "Restore to the state after 'trim the intro'" is something a person can
|
|
47
|
-
// pick out of a list. A row id never was.
|
|
48
|
-
expect((await store.list("conv_a"))[0].label).toBe("trim the intro");
|
|
49
|
-
});
|
|
50
|
-
fact("deleting a conversation takes its points with it", async () => {
|
|
51
|
-
const store = await makeStore();
|
|
52
|
-
await store.seed("conv_a", { id: "rp_1", label: "a", createdAt: 1 });
|
|
53
|
-
await store.seed("conv_b", { id: "rp_2", label: "b", createdAt: 1 });
|
|
54
|
-
await store.deleteForConversation("conv_a");
|
|
55
|
-
// THE FACT THAT WAS TRUE IN NEITHER LANE. Both had the method; neither
|
|
56
|
-
// had a caller. A point is a bookmark INTO a conversation and cannot
|
|
57
|
-
// outlive it — on the desktop it also holds a snapshot file, and on the
|
|
58
|
-
// cloud a PIN that stops the version ever being reclaimed.
|
|
59
|
-
expect(await store.list("conv_a")).toEqual([]);
|
|
60
|
-
expect(await store.list("conv_b"), "and only that conversation's").toHaveLength(1);
|
|
61
|
-
});
|
|
62
|
-
fact("deleting a conversation with no points is not an error", async () => {
|
|
63
|
-
const store = await makeStore();
|
|
64
|
-
// The common case for a conversation that only ever asked questions.
|
|
65
|
-
await store.deleteForConversation("conv_never");
|
|
66
|
-
expect(await store.list("conv_never")).toEqual([]);
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, ISODateTime, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* A user-curated context document the agent surfaces to the LLM (brand
|
|
5
|
-
* voice notes, audience specs, recurring constraints). `generatedFrom`
|
|
6
|
-
* lists the source IDs (mediaItems, conversations, etc.) that produced
|
|
7
|
-
* the current `content`; bumping `version` indicates a regeneration.
|
|
8
|
-
*/
|
|
9
|
-
export const ContextFile = z.object({
|
|
10
|
-
id: EntityId("contextFiles"),
|
|
11
|
-
orgId: NonEmptyString,
|
|
12
|
-
userId: NonEmptyString,
|
|
13
|
-
filename: NonEmptyString,
|
|
14
|
-
content: z.string(),
|
|
15
|
-
generatedFrom: z.array(NonEmptyString),
|
|
16
|
-
version: z.number().int().nonnegative(),
|
|
17
|
-
updatedAt: ISODateTime,
|
|
18
|
-
});
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, ISODateTime, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* A user's chat thread with the AI surface (Director, clips agent, etc.).
|
|
5
|
-
* `messages` is a JSON-encoded UI message log; the storage column is a
|
|
6
|
-
* single string blob to avoid Convex's per-row JSON shape constraints
|
|
7
|
-
* across long histories.
|
|
8
|
-
*
|
|
9
|
-
* THE `scope` FIELD IS GONE (2026-08-17). It recorded the PAGE the thread was
|
|
10
|
-
* last saved from, and it was a constant: the app writes
|
|
11
|
-
* `resolvePageScope(pathname).location`, and that resolver returns the editor
|
|
12
|
-
* scope on EVERY path — so every row ever written said `"editor"`, including
|
|
13
|
-
* workspace threads, and the enum declared here never contained that value.
|
|
14
|
-
* Nothing read it back (the one scope badge in the UI reads the LIVE
|
|
15
|
-
* `PageScope`, not the stored field). A constant nobody reads is not a column
|
|
16
|
-
* to correct, so it was deleted rather than fixed.
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* The project a thread is ABOUT, and the home that owns it.
|
|
20
|
-
*
|
|
21
|
-
* `home` is carried rather than inferred: a local project's id is an absolute
|
|
22
|
-
* `.cueframe` path and a cloud project's is an org project id, and reading
|
|
23
|
-
* which from the shape of the string is the sniff the app's residency model
|
|
24
|
-
* exists to delete. Every conversation stored in the org is a cloud project's
|
|
25
|
-
* (or the workspace's), but the reference states that rather than leaving the
|
|
26
|
-
* reader to know it.
|
|
27
|
-
*/
|
|
28
|
-
export const ConversationProject = z.object({
|
|
29
|
-
id: NonEmptyString,
|
|
30
|
-
home: z.enum(["local", "cloud"]),
|
|
31
|
-
});
|
|
32
|
-
export const Conversation = z.object({
|
|
33
|
-
id: EntityId("conversations"),
|
|
34
|
-
/**
|
|
35
|
-
* THE THREAD'S IDENTITY, and the app is the one that mints it.
|
|
36
|
-
*
|
|
37
|
-
* A conversation exists in the client before any store has seen it: the
|
|
38
|
-
* Director opens a chat, the user types, and only when the turn ends does a
|
|
39
|
-
* row get written. So the id that names a thread has to be one the client
|
|
40
|
-
* chose (`conv_<nanoid>`), not one a store assigns — otherwise the first
|
|
41
|
-
* save is an INSERT under a name the client cannot predict, the client keeps
|
|
42
|
-
* using its own name, and every subsequent save inserts again. That is
|
|
43
|
-
* exactly what web did until 2026-08-17: an N-turn conversation became N
|
|
44
|
-
* rows, and Delete silently deleted nothing because the id the user's
|
|
45
|
-
* sidebar held had never named a document.
|
|
46
|
-
*
|
|
47
|
-
* The desktop always had this right — sqlite is an `INSERT OR REPLACE` keyed
|
|
48
|
-
* on the client id. This field makes the org's store agree, via a unique
|
|
49
|
-
* lookup on `by_userId_clientId`: writes are an upsert on the id the app
|
|
50
|
-
* chose, and Convex's `_id` goes back to being an internal detail nobody
|
|
51
|
-
* outside this table ever sees or stores.
|
|
52
|
-
*/
|
|
53
|
-
clientId: NonEmptyString,
|
|
54
|
-
userId: NonEmptyString,
|
|
55
|
-
title: NonEmptyString,
|
|
56
|
-
/**
|
|
57
|
-
* The project whose media, timeline and history this thread's turns are
|
|
58
|
-
* about. ABSENT is a meaning — a workspace thread, started on a surface with
|
|
59
|
-
* no project open — not a missing value: such a thread belongs to the user's
|
|
60
|
-
* workspace and survives every project switch precisely because it names no
|
|
61
|
-
* project. It is `optional` rather than nullable because rows written before
|
|
62
|
-
* the field existed have no project recorded, and nothing may invent one for
|
|
63
|
-
* them.
|
|
64
|
-
*/
|
|
65
|
-
project: ConversationProject.optional(),
|
|
66
|
-
/**
|
|
67
|
-
* When the thread was STARTED — supplied by the app, kept by the store.
|
|
68
|
-
*
|
|
69
|
-
* Stored rather than read off Convex's `_creationTime`, which is when the
|
|
70
|
-
* DOCUMENT was inserted and not when the conversation began. Those are the
|
|
71
|
-
* same moment for a thread born in the cloud and very different for one that
|
|
72
|
-
* arrives there later: moving a project to the cloud re-homes its threads
|
|
73
|
-
* (`adoptIntoProject`), and a months-old conversation would have shown up
|
|
74
|
-
* dated today. The desktop has always stored the app's value; this is the
|
|
75
|
-
* org's store agreeing, and it is what lets the same thread report the same
|
|
76
|
-
* age on both sides of a move.
|
|
77
|
-
*
|
|
78
|
-
* Immutable after the first write on both stores — a thread's age is a fact
|
|
79
|
-
* about the thread, not about its most recent turn.
|
|
80
|
-
*/
|
|
81
|
-
createdAt: ISODateTime,
|
|
82
|
-
/**
|
|
83
|
-
* When the thread last had a turn — the key the history list sorts on.
|
|
84
|
-
*
|
|
85
|
-
* Stored rather than derived because the two things a store can offer for
|
|
86
|
-
* free are both wrong: Convex's `_creationTime` is when the thread STARTED
|
|
87
|
-
* (so a months-old thread the user just added a turn to sorts to the bottom,
|
|
88
|
-
* which is the opposite of what a history list is for), and a patch does not
|
|
89
|
-
* move it. The desktop has ordered by `updated_at DESC` since migration 015;
|
|
90
|
-
* this is the org's store agreeing.
|
|
91
|
-
*/
|
|
92
|
-
updatedAt: ISODateTime,
|
|
93
|
-
/** JSON-encoded array of UI messages (role + content). */
|
|
94
|
-
messages: z.string(),
|
|
95
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, ISODateTime, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* Cached LLM-generated dashboard summary keyed off a `sourceHash` of the
|
|
5
|
-
* inputs that produced it. Surfaces a one-line hero insight plus a small
|
|
6
|
-
* batch of follow-up content suggestions on the home view.
|
|
7
|
-
*/
|
|
8
|
-
export const DashboardInsight = z.object({
|
|
9
|
-
id: EntityId("dashboardInsights"),
|
|
10
|
-
orgId: NonEmptyString,
|
|
11
|
-
/** Hash of the input set that produced this snapshot (cache key). */
|
|
12
|
-
sourceHash: NonEmptyString,
|
|
13
|
-
heroInsight: NonEmptyString,
|
|
14
|
-
contentSuggestions: z.array(NonEmptyString),
|
|
15
|
-
generatedAt: ISODateTime,
|
|
16
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, ISODateTime, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* Short-lived, session-scoped, read-only bearer token used by a warm render
|
|
5
|
-
* session container (Modal Sandbox) to subscribe to its working composition in Convex
|
|
6
|
-
* without bundling org credentials into the container. Validated as a query
|
|
7
|
-
* argument (the UploadToken precedent), not via Convex-native auth/JWT.
|
|
8
|
-
*/
|
|
9
|
-
export const SessionTokenScope = z.enum(["session-read"]);
|
|
10
|
-
export const SessionToken = z.object({
|
|
11
|
-
id: EntityId("sessionTokens"),
|
|
12
|
-
token: NonEmptyString,
|
|
13
|
-
sessionId: NonEmptyString,
|
|
14
|
-
projectId: EntityId("projects"),
|
|
15
|
-
orgId: NonEmptyString,
|
|
16
|
-
scope: SessionTokenScope,
|
|
17
|
-
expiresAt: ISODateTime,
|
|
18
|
-
// ── Session-state (the token row IS the session row; cleanup-dominant) ──
|
|
19
|
-
/** The warm sandbox this session is bound to, set once it's created. The
|
|
20
|
-
* session reconnects by this id (provider.get) per render — the platform-native
|
|
21
|
-
* persistent-resource pattern. */
|
|
22
|
-
sandboxId: NonEmptyString.optional(),
|
|
23
|
-
/** Epoch-ms when the warm box became ready (stamped alongside `sandboxId`). The
|
|
24
|
-
* billable-uptime clock start — `closeSession` bills `compose_session_minutes`
|
|
25
|
-
* from here. Absent = the box never booted, so nothing to bill. Stored as a raw
|
|
26
|
-
* number (epoch-ms) like `expiresAt`, for cheap arithmetic. */
|
|
27
|
-
readyAt: z.number().optional(),
|
|
28
|
-
/** The `_scheduled_functions` id of the pending durable auto-close
|
|
29
|
-
* (`ctx.scheduler.runAfter`). Cancelled + rescheduled on activity (keep-alive),
|
|
30
|
-
* fired on idle to reap the sandbox — crash-proof cleanup, not durability. */
|
|
31
|
-
scheduledCloseId: NonEmptyString.optional(),
|
|
32
|
-
/** The session-scoped SCRATCH composition (a derived sibling of the project's
|
|
33
|
-
* active composition). Author-ops during the session mutate THIS row, never
|
|
34
|
-
* active; `promoteScratch` commits it and `closeSession` discards it. Absent
|
|
35
|
-
* until the session derives one (or the project had no active to derive from). */
|
|
36
|
-
scratchCompositionId: EntityId("compositions").optional(),
|
|
37
|
-
/** SERVER-owned evidence box (the sessionless score/preview ops). Managed
|
|
38
|
-
* sessions bill per-op only (uptime metering skips them — flat per-op is the
|
|
39
|
-
* public contract), run a SHORT idle TTL, never mint a scratch composition,
|
|
40
|
-
* and are the only rows the managed resolver may reuse or evict. */
|
|
41
|
-
managed: z.boolean().optional(),
|
|
42
|
-
/** Async-evidence lease: the jobId currently staging/judging on this box. A
|
|
43
|
-
* second evidence op on the same box while the lease is live gets 409
|
|
44
|
-
* box_busy instead of silently bumping the working-composition version out
|
|
45
|
-
* from under the in-flight judge. Cleared at the job terminal; expiry is the
|
|
46
|
-
* crash backstop. */
|
|
47
|
-
leaseJobId: NonEmptyString.optional(),
|
|
48
|
-
leaseExpiresAt: z.number().optional(),
|
|
49
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, ISODateTime, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* Short-lived bearer token used by Tus / Uppy Companion to upload files
|
|
5
|
-
* directly to R2 without bundling org credentials into the browser.
|
|
6
|
-
*/
|
|
7
|
-
export const UploadTokenScope = z.enum(["tus", "companion"]);
|
|
8
|
-
export const UploadToken = z.object({
|
|
9
|
-
id: EntityId("uploadTokens"),
|
|
10
|
-
token: NonEmptyString,
|
|
11
|
-
userId: NonEmptyString,
|
|
12
|
-
projectId: EntityId("projects").optional(),
|
|
13
|
-
orgId: NonEmptyString.optional(),
|
|
14
|
-
scope: UploadTokenScope.optional(),
|
|
15
|
-
expiresAt: ISODateTime,
|
|
16
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* Per-user preferences. Sparse by design — every field is optional, so
|
|
5
|
-
* downstream readers should use defaults rather than asserting presence.
|
|
6
|
-
*/
|
|
7
|
-
export const UserSettings = z.object({
|
|
8
|
-
id: EntityId("userSettings"),
|
|
9
|
-
userId: NonEmptyString,
|
|
10
|
-
enableUnderstanding: z.boolean().optional(),
|
|
11
|
-
activeBrandKitId: EntityId("brandKits").optional(),
|
|
12
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { EntityId, NonEmptyString } from "@cueframe/foundation/primitives";
|
|
3
|
-
/**
|
|
4
|
-
* The single in-progress composition source for a warm render session. Both the
|
|
5
|
-
* Director compose loop (per attempt) and a client debug session write here; the
|
|
6
|
-
* in-container daemon subscribes to it via `getWorkingComposition`. The project
|
|
7
|
-
* `compositions` row and per-candidate `compositionRuns` rows remain the
|
|
8
|
-
* settle-time SSOT + history — this is the live, reactive surface only.
|
|
9
|
-
*/
|
|
10
|
-
export const WorkingComposition = z.object({
|
|
11
|
-
id: EntityId("workingCompositions"),
|
|
12
|
-
sessionId: NonEmptyString,
|
|
13
|
-
projectId: EntityId("projects"),
|
|
14
|
-
orgId: NonEmptyString,
|
|
15
|
-
// Wire composition stored loose (mirrors compositionRuns.composition v.any()).
|
|
16
|
-
composition: z.unknown(),
|
|
17
|
-
// Monotonic per-session edit counter — the read-your-writes handshake key.
|
|
18
|
-
version: z.number(),
|
|
19
|
-
updatedAt: z.number(),
|
|
20
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Derivation constants — pure data, ZERO side effects, ZERO heavy imports.
|
|
3
|
-
*
|
|
4
|
-
* This module deliberately imports NOTHING (no apca-w3, no culori). Render-side
|
|
5
|
-
* consumers (e.g. @cueframe/primitives) need only the ramp poles / floors and
|
|
6
|
-
* must not drag the contrast MATH (apca-w3 + culori) into their bundle just for
|
|
7
|
-
* two string constants. `contrastSafe.ts` re-exports these so the package root
|
|
8
|
-
* stays the single source of truth; leaf consumers import from
|
|
9
|
-
* `@cueframe/brand-derivation/constants`.
|
|
10
|
-
*/
|
|
11
|
-
/** Version of the derivation RULES. Bump when the math changes; downstream stamps
|
|
12
|
-
* this so re-derivation is explicit, never a silent fleet-wide shift.
|
|
13
|
-
* v2: Tier-2 derivation expansion — adds surface/card/gridLine/accentMuted fills
|
|
14
|
-
* and textOnAccent/textOnSurface paired foregrounds. Re-derives the fleet. */
|
|
15
|
-
export const DERIVATION_VERSION = 2;
|
|
16
|
-
/** Forward-only APCA floors. The clamp only ever INCREASES legibility. */
|
|
17
|
-
export const FLOORS = { body: 75, nonBody: 60, headline: 45 };
|
|
18
|
-
/** The two neutral poles. `onDark` (white) is the safe default text color when the
|
|
19
|
-
* background is unknown; `onLight` (near-black) is the safe plate / dark pole. */
|
|
20
|
-
export const NEUTRAL_RAMP = { onDark: "#FFFFFF", onLight: "#0A0A0A" };
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { APCAcontrast, sRGBtoY } from "apca-w3";
|
|
2
|
-
import { converter } from "culori";
|
|
3
|
-
// DERIVATION_VERSION / FLOORS / NEUTRAL_RAMP live in the side-effect-free
|
|
4
|
-
// `./constants` module (no apca-w3/culori) so render-side consumers can import
|
|
5
|
-
// the poles without dragging the contrast math into their bundle. Re-exported
|
|
6
|
-
// here so the package root stays the single source of truth.
|
|
7
|
-
export { DERIVATION_VERSION, FLOORS, NEUTRAL_RAMP } from "./constants";
|
|
8
|
-
import { FLOORS, NEUTRAL_RAMP } from "./constants";
|
|
9
|
-
// Leaf-package color parsing via culori — this package must NOT import composition-model.
|
|
10
|
-
const toRgb = converter("rgb");
|
|
11
|
-
function hexToRgb(hex) {
|
|
12
|
-
const c = toRgb(hex);
|
|
13
|
-
if (!c)
|
|
14
|
-
return [0, 0, 0]; // unparseable → black; the clamp still guarantees a floor
|
|
15
|
-
return [Math.round(c.r * 255), Math.round(c.g * 255), Math.round(c.b * 255)];
|
|
16
|
-
}
|
|
17
|
-
/** Linear-RGB mix of two hex colors: ratio 0 → `a`, ratio 1 → `b`. Parses `#RGB` / `#RRGGBB`;
|
|
18
|
-
* returns `#rrggbb` lowercase. Mirrors composition-model's `colorMix` (we can't import it — leaf
|
|
19
|
-
* package boundary). On an unparseable input the clamp downstream still guarantees a floor. */
|
|
20
|
-
function colorMix(a, b, ratio) {
|
|
21
|
-
const [ar, ag, ab] = hexToRgb(a);
|
|
22
|
-
const [br, bg, bb] = hexToRgb(b);
|
|
23
|
-
const t = Math.max(0, Math.min(1, ratio));
|
|
24
|
-
const inv = 1 - t;
|
|
25
|
-
const r = Math.round(ar * inv + br * t);
|
|
26
|
-
const g = Math.round(ag * inv + bg * t);
|
|
27
|
-
const bl = Math.round(ab * inv + bb * t);
|
|
28
|
-
return "#" + [r, g, bl].map((v) => v.toString(16).padStart(2, "0")).join("");
|
|
29
|
-
}
|
|
30
|
-
/** Lc magnitude between two hex colors (APCA is signed by polarity; the floor wants the magnitude).
|
|
31
|
-
* APCAcontrast is typed `number | string` (a string sentinel for out-of-range luminance, which
|
|
32
|
-
* sRGBtoY's 0..1 output never produces); coerce to a number at this single boundary. */
|
|
33
|
-
function lc(fg, bg) {
|
|
34
|
-
return Math.abs(Number(APCAcontrast(sRGBtoY(hexToRgb(fg)), sRGBtoY(hexToRgb(bg)))));
|
|
35
|
-
}
|
|
36
|
-
/** sRGB relative luminance Y∈[0,1] of a hex color, via apca-w3's `sRGBtoY`.
|
|
37
|
-
* Exported so composition-side legibility (which compares text against a
|
|
38
|
-
* SAMPLED backdrop luminance, not a second hex) can put text + backdrop on the
|
|
39
|
-
* same Y scale without re-deriving the transfer curve. */
|
|
40
|
-
export function relativeLuminance(hex) {
|
|
41
|
-
return sRGBtoY(hexToRgb(hex));
|
|
42
|
-
}
|
|
43
|
-
/** APCA Lc magnitude between two relative-luminance values (text fg over bg).
|
|
44
|
-
* This is the primitive the composition FLOOR's worst-tile legibility check
|
|
45
|
-
* consumes: it samples per-tile backdrop luminance from the rendered frame and
|
|
46
|
-
* asks "does the caption text clear the floor over the WORST tile?". Polarity-
|
|
47
|
-
* signed APCA is reduced to a magnitude (the floor wants legibility, not which
|
|
48
|
-
* way the polarity runs). Keep the APCA math in THIS package — the floor must
|
|
49
|
-
* not re-implement it (single source of truth, no proxy). */
|
|
50
|
-
export function apcaLcFromLuminance(fgY, bgY) {
|
|
51
|
-
return Math.abs(Number(APCAcontrast(fgY, bgY)));
|
|
52
|
-
}
|
|
53
|
-
/** APCA Lc magnitude between two hex colors (fg over bg). Hex-input sibling of
|
|
54
|
-
* `apcaLcFromLuminance`; the brand cascade and tests use it directly. */
|
|
55
|
-
export function apcaLc(fg, bg) {
|
|
56
|
-
return lc(fg, bg);
|
|
57
|
-
}
|
|
58
|
-
/** Return `fg` if it clears `floor` over `bg`; else the most legible of {fg, ramp poles} over `bg`
|
|
59
|
-
* (never lower contrast than the input — forward-only by construction). Exported so the brand
|
|
60
|
-
* cascade (composition-model) can re-clamp its own derived de-emphasis tokens (e.g. the muted
|
|
61
|
-
* text mix) back up to a floor without re-implementing the APCA math at the package boundary. */
|
|
62
|
-
export function clampToFloor(fg, bg, floor) {
|
|
63
|
-
if (lc(fg, bg) >= floor)
|
|
64
|
-
return fg;
|
|
65
|
-
const candidates = [fg, NEUTRAL_RAMP.onDark, NEUTRAL_RAMP.onLight];
|
|
66
|
-
return candidates.reduce((best, c) => (lc(c, bg) > lc(best, bg) ? c : best));
|
|
67
|
-
}
|
|
68
|
-
/** Caption legibility is UNCONDITIONAL. If the brand background can host caption text at the body
|
|
69
|
-
* floor, keep it as the scrim. Otherwise fall to a neutral plate (near-black scrim + white fg),
|
|
70
|
-
* where the pole-over-pole APCA (~106) clears the floor for ANY brand. */
|
|
71
|
-
function deriveCaption(seedText, background) {
|
|
72
|
-
const onBrand = clampToFloor(seedText, background, FLOORS.body);
|
|
73
|
-
if (lc(onBrand, background) >= FLOORS.body) {
|
|
74
|
-
return { captionScrim: background, captionFg: onBrand };
|
|
75
|
-
}
|
|
76
|
-
return { captionScrim: NEUTRAL_RAMP.onLight, captionFg: NEUTRAL_RAMP.onDark }; // near-black plate, white fg
|
|
77
|
-
}
|
|
78
|
-
/** Derive a contrast-safe palette from a brand seed.
|
|
79
|
-
* Captions are an UNCONDITIONAL floor: a plate-backed neutral fallback guarantees
|
|
80
|
-
* `Lc(captionFg, captionScrim) >= FLOORS.body` for any brand background.
|
|
81
|
-
* `text` / `textMuted` directly on a hostile brand background are best-achievable / forward-only
|
|
82
|
-
* (the monotone clamp never lowers a brand's own contrast); a tuned solid-background plate for
|
|
83
|
-
* body text on hostile backgrounds is Phase 1. */
|
|
84
|
-
export function deriveContrastSafe(seed) {
|
|
85
|
-
const background = seed.background;
|
|
86
|
-
const text = clampToFloor(seed.text, background, FLOORS.body);
|
|
87
|
-
const accent = seed.accent;
|
|
88
|
-
const { captionScrim, captionFg } = deriveCaption(seed.text, background);
|
|
89
|
-
// Tier-2 fills: nudge the background toward text for raised surfaces / hairline rhythm.
|
|
90
|
-
const surface = colorMix(background, text, 0.06); // bg nudged toward text (raised panel)
|
|
91
|
-
const card = colorMix(background, text, 0.1); // one tonal step above surface
|
|
92
|
-
const gridLine = colorMix(background, text, 0.08); // hairline rhythm guide
|
|
93
|
-
const accentMuted = colorMix(accent, background, 0.35); // accent faded for secondary states
|
|
94
|
-
// textOnAccent is BEST-ACHIEVABLE, not floor-guaranteed: a saturated accent caps APCA below the
|
|
95
|
-
// body floor (e.g. white over #ff4438 ≈ 65.66), so the clamp returns the most legible pole it can
|
|
96
|
-
// reach, not necessarily one clearing FLOORS.body. The design NEVER puts body text on raw accent —
|
|
97
|
-
// body legibility lives on accentMuted / surface / background, where the floor IS guaranteed.
|
|
98
|
-
const textOnAccent = clampToFloor(text, accent, FLOORS.body);
|
|
99
|
-
const textOnSurface = clampToFloor(text, surface, FLOORS.body);
|
|
100
|
-
return {
|
|
101
|
-
background,
|
|
102
|
-
text,
|
|
103
|
-
textMuted: clampToFloor(seed.text, background, FLOORS.nonBody),
|
|
104
|
-
accent,
|
|
105
|
-
captionScrim,
|
|
106
|
-
captionFg,
|
|
107
|
-
surface,
|
|
108
|
-
card,
|
|
109
|
-
gridLine,
|
|
110
|
-
accentMuted,
|
|
111
|
-
textOnAccent,
|
|
112
|
-
textOnSurface,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./contrastSafe";
|