@cueframe/kernel 0.2.58 → 0.2.59-rc.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/dist/_members/account-model/testing/conversationStoreContract.d.ts +3 -4
- package/dist/_members/account-model/testing/restorePointStoreContract.d.ts +3 -4
- package/dist/_members/account-model/validators/index.d.ts +0 -1
- package/dist/_members/animate/index.d.ts +0 -2
- package/dist/_members/authoring/index.d.ts +1 -1
- package/dist/_members/authoring/prompts/index.d.ts +0 -1
- package/dist/_members/authoring/resources.d.ts +2 -11
- package/dist/_members/cloud-import/CloudImportService.d.ts +0 -1
- package/dist/_members/cloud-import/index.d.ts +0 -2
- package/dist/_members/component-runtime/allowedImports.d.ts +6 -0
- package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserIdentity.d.ts +2 -12
- package/dist/_members/component-runtime/browserIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts +8 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/contracts.d.ts +2 -1
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
- package/dist/_members/component-runtime/identity.d.ts +2 -3
- package/dist/_members/component-runtime/identity.d.ts.map +1 -1
- package/dist/_members/component-runtime/importPolicy.d.ts +5 -0
- package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/checks.d.ts +71 -0
- package/dist/_members/component-runtime/template/checks.d.ts.map +1 -0
- package/dist/_members/component-runtime/template/extract.d.ts +4 -0
- package/dist/_members/component-runtime/template/extract.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/index.d.ts +1 -0
- package/dist/_members/component-runtime/template/index.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/schema.d.ts +14 -13
- package/dist/_members/component-runtime/template/schema.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts +3 -4
- package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts.map +1 -1
- package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts +15 -0
- package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts.map +1 -0
- package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -1
- package/dist/_members/compose/index.d.ts +1 -1
- package/dist/_members/compose/primitiveRegistry.d.ts +0 -2
- package/dist/_members/composition/audio/audioMix.d.ts +0 -1
- package/dist/_members/composition/audio/mixStaging.d.ts +0 -5
- package/dist/_members/composition/fixtures/index.d.ts +0 -1
- package/dist/_members/composition/graphics-plan/index.d.ts +0 -2
- package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
- package/dist/_members/composition/invariants/etag.d.ts +0 -1
- package/dist/_members/composition/invariants/index.d.ts +0 -1
- package/dist/_members/composition/ops/compositionOps.d.ts +0 -1
- package/dist/_members/composition/ops/compositionOps.shared.d.ts +6 -0
- package/dist/_members/composition/ops/index.d.ts +2 -1
- package/dist/_members/composition/primitive-catalog/index.d.ts +0 -2
- package/dist/_members/composition/projection/behind-readiness.d.ts +0 -6
- package/dist/_members/composition/timeline/link.d.ts +0 -4
- package/dist/_members/composition/timeline/plan.d.ts +0 -1
- package/dist/_members/composition/validators/brandKit.d.ts +4 -4
- package/dist/_members/composition/validators/brandKitBody.d.ts +8 -8
- package/dist/_members/composition/validators/cardHtml.d.ts +11 -0
- package/dist/_members/composition/validators/composition.d.ts +2 -5
- package/dist/_members/composition/validators/css-tree-subpaths.d.ts +16 -0
- package/dist/_members/composition/validators/index.d.ts +0 -3
- package/dist/_members/composition/validators/session.d.ts +3 -3
- package/dist/_members/composition/validators/webhook.d.ts +4 -4
- package/dist/_members/composition-ops/alphaLayers.d.ts +0 -5
- package/dist/_members/composition-ops/index.d.ts +2 -2
- package/dist/_members/composition-ops/opRecorder.d.ts +23 -3
- package/dist/_members/core/render/exportSettings.d.ts +4 -2
- package/dist/_members/core/render/index.d.ts +1 -1
- package/dist/_members/core/render/vcam/requiredRegion.d.ts +0 -1
- package/dist/_members/director/ai-sdk/index.d.ts +0 -1
- package/dist/_members/director/ai-sdk/messages.d.ts +0 -1
- package/dist/_members/director/domain/chat.d.ts +0 -78
- package/dist/_members/director/domain/index.d.ts +0 -1
- package/dist/_members/errors/registry.d.ts +6 -0
- package/dist/_members/foundation/canonical/index.d.ts +14 -0
- package/dist/_members/foundation/index.d.ts +1 -1
- package/dist/_members/foundation/primitives/index.d.ts +0 -2
- package/dist/_members/foundation/testing/index.d.ts +1 -0
- package/dist/_members/foundation/testing/knownRed.d.ts +13 -0
- package/dist/_members/mcp/adapter.d.ts +21 -0
- package/dist/_members/mcp/compositionOps.d.ts +10 -0
- package/dist/_members/mcp/server.d.ts +0 -5
- package/dist/_members/mcp/wait.d.ts +3 -1
- package/dist/_members/media-model/generation.d.ts +0 -25
- package/dist/_members/nle-export/xml-utils.d.ts +0 -8
- package/dist/_members/plane/conformance.d.ts +20 -0
- package/dist/_members/primitives/index.d.ts +1 -11
- package/dist/_members/primitives/lib/index.d.ts +1 -1
- package/dist/_members/primitives/lib/tokens.d.ts +0 -16
- package/dist/_members/render-harness/cardAssetAdmission.d.ts +1 -0
- package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/mediaServer.d.ts +6 -1
- package/dist/_members/render-harness/mediaServer.d.ts.map +1 -1
- package/dist/account-model/testing.js +15 -5
- package/dist/account-model/validators.js +5 -7
- package/dist/account-model.js +5 -7
- package/dist/animate/preparation-facts.js +1 -1
- package/dist/animate.js +2 -6
- package/dist/authoring/composer.js +1 -1
- package/dist/authoring/context.js +8 -7
- package/dist/authoring/models/defaults.d.ts +1 -0
- package/dist/authoring/models/defaults.js +7 -0
- package/dist/authoring/models.js +5 -3
- package/dist/authoring/motion.d.ts +1 -0
- package/dist/authoring/motion.js +25 -0
- package/dist/authoring/prompts.js +4 -14
- package/dist/authoring/providers.js +1 -1
- package/dist/authoring/resource-routing.js +2 -2
- package/dist/authoring/resources.js +4 -22
- package/dist/authoring/scene.js +3 -2
- package/dist/authoring.js +662 -219
- package/dist/brand-derivation/constants.js +1 -1
- package/dist/brand-derivation.js +1 -1
- package/dist/{chunk-LBJ5LI5V.js → chunk-2K2GBFLU.js} +17 -8
- package/dist/{chunk-RAXHCRVV.js → chunk-2PAP5LO5.js} +1 -1
- package/dist/{chunk-MNO6AO2J.js → chunk-3HLDIIWA.js} +1 -1
- package/dist/{chunk-PTVTWQ4T.js → chunk-3JEUNKDK.js} +2 -2
- package/dist/chunk-3VWJ3H4X.js +68 -0
- package/dist/{chunk-S5H6GH6M.js → chunk-3Z7CN54H.js} +1 -1
- package/dist/{chunk-FVDFPJHT.js → chunk-46WBCUPE.js} +1 -1
- package/dist/chunk-4VBLQIM5.js +30 -0
- package/dist/{chunk-N2OZDD44.js → chunk-6HA55CRU.js} +4 -5
- package/dist/{chunk-WL2MLKWU.js → chunk-6HPEMDQW.js} +1 -1
- package/dist/{chunk-PWWZTY3G.js → chunk-6KZCXAYL.js} +5 -2
- package/dist/{chunk-IEXAKOEX.js → chunk-6QGARSV6.js} +2 -15
- package/dist/{chunk-3YVIAWET.js → chunk-7II5OM7R.js} +13 -1
- package/dist/{chunk-UFD4EZHM.js → chunk-AFUITAH6.js} +4 -5
- package/dist/{chunk-HGCYZMII.js → chunk-AK6QPX7A.js} +9 -9
- package/dist/{chunk-EC6VFQE6.js → chunk-BZVOCVQV.js} +1 -0
- package/dist/{chunk-RBWS5XHE.js → chunk-CAF7BRNE.js} +2 -2
- package/dist/{chunk-TR53N6HB.js → chunk-CEO47DIE.js} +6 -3
- package/dist/chunk-CIOUDOGN.js +12 -0
- package/dist/{chunk-GQ6XGAFB.js → chunk-DCKADD5B.js} +1 -1
- package/dist/{chunk-4NIJWK45.js → chunk-EISHFHU5.js} +0 -8
- package/dist/chunk-EQH37KNZ.js +224 -0
- package/dist/{chunk-EXY4JJPH.js → chunk-F6PLDBAK.js} +2 -11
- package/dist/{chunk-DAARYRNT.js → chunk-FKSXKS35.js} +6 -6
- package/dist/{chunk-KBDUEU4W.js → chunk-FZB7UX44.js} +1 -1
- package/dist/chunk-H2ZZXISB.js +24 -0
- package/dist/{chunk-WSMCZRJ2.js → chunk-I2HNC4PQ.js} +1 -1
- package/dist/{chunk-NVXSKKRN.js → chunk-IUJABAG2.js} +14 -10
- package/dist/{chunk-7NIOFHMH.js → chunk-IVFMOHAC.js} +1 -9
- package/dist/{chunk-UKDBU7HM.js → chunk-JNBNDHEF.js} +3 -3
- package/dist/{chunk-JWMWVP64.js → chunk-KC4LNZL5.js} +4 -9
- package/dist/{chunk-GCQ7Z7S7.js → chunk-KKATUGRU.js} +3 -9
- package/dist/{chunk-Q5P5UFOP.js → chunk-KLQ53NX3.js} +13 -1
- package/dist/{chunk-UMXES6ED.js → chunk-LVMWPFV4.js} +1 -1
- package/dist/{chunk-TKFLSGAS.js → chunk-MMJYII7Y.js} +5 -5
- package/dist/{chunk-REST55RC.js → chunk-NECN7TT4.js} +5 -4
- package/dist/{chunk-4ZE564YF.js → chunk-NM7NWXGF.js} +0 -146
- package/dist/{chunk-5T655LYZ.js → chunk-NY6EI5YW.js} +4 -4
- package/dist/{chunk-UXRSEMJJ.js → chunk-ONSGT6UJ.js} +66 -35
- package/dist/{chunk-VZ7TYX6Z.js → chunk-P3EFZDM5.js} +0 -17
- package/dist/{chunk-BEFSJMFF.js → chunk-P6RVYHLT.js} +9 -9
- package/dist/{chunk-TBHSOEYK.js → chunk-PLWDYWK6.js} +4 -34
- package/dist/{chunk-KYRDKK2D.js → chunk-Q6CJ6HCU.js} +1 -6
- package/dist/{chunk-FWSJLHSV.js → chunk-R642352J.js} +1 -1
- package/dist/{chunk-XELS2BGA.js → chunk-R6HTIP3N.js} +1 -3
- package/dist/{chunk-RL5SO653.js → chunk-RQRPSSRT.js} +1 -1
- package/dist/chunk-RR7UBEBV.js +172 -0
- package/dist/{chunk-FHMTAZD4.js → chunk-RWJHZCOR.js} +1 -71
- package/dist/{chunk-73DQTUWY.js → chunk-TIAJMEQ4.js} +2 -22
- package/dist/{chunk-2ESYSVXG.js → chunk-U67V476Y.js} +2 -15
- package/dist/{chunk-3VLDQE26.js → chunk-U7KSOA2L.js} +4 -21
- package/dist/{chunk-VLJOIUHL.js → chunk-UGEUB763.js} +6 -6
- package/dist/{chunk-K66NLMGX.js → chunk-UGWJC4GA.js} +62 -18
- package/dist/chunk-VBYINB74.js +136 -0
- package/dist/{chunk-W2245F6G.js → chunk-WTQRLFR2.js} +1 -1
- package/dist/{chunk-JN3GF36B.js → chunk-X2RTLS6K.js} +2 -23
- package/dist/chunk-XHMKPTHV.js +20 -0
- package/dist/{chunk-2L33CKIY.js → chunk-XOT2VWCO.js} +18 -31
- package/dist/{chunk-AK5QBHOB.js → chunk-XQGQ5EFS.js} +10 -1
- package/dist/chunk-XR76OZKC.js +21 -0
- package/dist/chunk-ZCEYEIRB.js +179 -0
- package/dist/{chunk-IMIUHG2E.js → chunk-ZPJQ3TQL.js} +1 -3
- package/dist/cloud-import.js +1 -16
- package/dist/component-runtime/browserOptions.js +4 -3
- package/dist/component-runtime/contracts.js +2 -2
- package/dist/component-runtime/identity/browser.js +2 -17
- package/dist/component-runtime/identity.js +5 -7
- package/dist/component-runtime/importPolicy.js +3 -3
- package/dist/component-runtime/mediaResolution.js +1 -1
- package/dist/component-runtime/render.js +8 -7
- package/dist/component-runtime/sourceAdmission.js +3 -3
- package/dist/component-runtime/template/testing.js +15 -12
- package/dist/component-runtime/template.js +165 -13
- package/dist/component-runtime.js +27 -28
- package/dist/compose.js +30 -47
- package/dist/composition/audio.js +4 -8
- package/dist/composition/brand-kit.js +1 -1
- package/dist/composition/brief.js +1 -1
- package/dist/composition/card-html.d.ts +1 -0
- package/dist/composition/card-html.js +15 -0
- package/dist/composition/depth.js +1 -1
- package/dist/composition/floors.js +2 -2
- package/dist/composition/fonts.js +1 -1
- package/dist/composition/graphics-plan.js +4 -44
- package/dist/composition/invariants.js +5 -12
- package/dist/composition/ops.js +7 -6
- package/dist/composition/primitive-catalog.js +2 -6
- package/dist/composition/projection.js +3 -5
- package/dist/composition/reframe/coverage.js +1 -1
- package/dist/composition/reframe/kenBurns.js +1 -1
- package/dist/composition/reframe/shotScale.js +1 -1
- package/dist/composition/reframe/trajectory.js +1 -1
- package/dist/composition/reframe.js +1 -1
- package/dist/composition/scene/budget-policy.js +1 -1
- package/dist/composition/scene.js +1 -1
- package/dist/composition/timeline.js +4 -8
- package/dist/composition/validators/brand-kit-body.js +5 -4
- package/dist/composition/validators/graphic-kinds.js +1 -1
- package/dist/composition/validators.js +8 -65
- package/dist/composition-ops.js +17 -16
- package/dist/composition.js +13 -79
- package/dist/context-7SWSVJ6Z.js +17 -0
- package/dist/core/render.js +13 -9
- package/dist/core/select.js +3 -3
- package/dist/core.js +9 -9
- package/dist/director/ai-sdk.js +7 -11
- package/dist/director/domain.js +9 -17
- package/dist/director.js +9 -21
- package/dist/{dist-LAJ2363K.js → dist-6FO67KVA.js} +1 -1
- package/dist/errors.js +2 -2
- package/dist/foundation/canonical.d.ts +1 -0
- package/dist/foundation/canonical.js +7 -0
- package/dist/foundation/primitives.js +4 -6
- package/dist/foundation/testing.d.ts +1 -0
- package/dist/foundation/testing.js +7 -0
- package/dist/foundation.js +7 -9
- package/dist/{magic-string.es-SDTMJBWP.js → magic-string.es-KVSW34UD.js} +1 -1
- package/dist/mcp/adapter.js +11 -19
- package/dist/mcp/composition-ops.d.ts +1 -0
- package/dist/mcp/composition-ops.js +11 -0
- package/dist/mcp/core.js +2 -2
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/executor.js +1 -1
- package/dist/mcp/scene-shot.js +3 -3
- package/dist/mcp/server.js +6 -7
- package/dist/mcp/wire-schema.js +13 -2
- package/dist/mcp.js +11 -10
- package/dist/media-model/generation.js +6 -8
- package/dist/media-model/media-kind.js +1 -1
- package/dist/media-model/testing.js +2 -2
- package/dist/media-model/transcriptSearch.js +1 -1
- package/dist/media-model.js +6 -8
- package/dist/nle-export/xml.js +1 -1
- package/dist/nle-export.js +2 -2
- package/dist/perception.js +1 -1
- package/dist/plane/conformance.js +8 -4
- package/dist/plane/contract.js +1 -1
- package/dist/plane.js +8 -4
- package/dist/primitives/backgrounds.js +3 -3
- package/dist/primitives/captions.js +2 -2
- package/dist/primitives/effects.js +5 -5
- package/dist/primitives/hero-text.js +4 -4
- package/dist/primitives/layouts.js +4 -4
- package/dist/primitives/lib/easings.js +1 -1
- package/dist/primitives/lib/frameScale.js +1 -1
- package/dist/primitives/lib/index.js +7 -13
- package/dist/primitives/lib/palette.js +2 -2
- package/dist/primitives/lib/preview.js +1 -1
- package/dist/primitives/lib/schema.js +1 -1
- package/dist/primitives/lib/seeded-random.js +1 -1
- package/dist/primitives/lib/text/contrast.js +3 -3
- package/dist/primitives/lib/text/fill.js +1 -1
- package/dist/primitives/lib/text/fitText.js +1 -1
- package/dist/primitives/lib/text/marker.js +1 -1
- package/dist/primitives/lib/text/motion.js +1 -1
- package/dist/primitives/lib/text/recolor.js +1 -1
- package/dist/primitives/lib/text/stage.js +1 -1
- package/dist/primitives/lib/text/typeface.js +1 -1
- package/dist/primitives/lib/tokens.js +4 -11
- package/dist/primitives/lib.js +7 -13
- package/dist/primitives/scenes.js +5 -5
- package/dist/primitives/subject-foreground.js +1 -1
- package/dist/primitives/text.js +4 -4
- package/dist/primitives/transitions.js +3 -3
- package/dist/primitives/ui-blocks.js +6 -6
- package/dist/primitives/workspace.js +1 -1
- package/dist/primitives.js +26 -40
- package/dist/render-harness/cardAssetAdmission.js +4 -4
- package/dist/render-harness/cardFonts.js +3 -3
- package/dist/render-harness/renderInputAssets.js +4 -4
- package/dist/render-harness.js +104 -86
- package/dist/{src-ZP6727AA.js → src-XI5MULKD.js} +17 -16
- package/package.json +38 -60
- package/dist/_members/account-model/validators/workingComposition.d.ts +0 -11
- package/dist/_members/animate/animations/index.d.ts +0 -9
- package/dist/_members/animate/easing/index.d.ts +0 -3
- package/dist/_members/animate/mobjects/index.d.ts +0 -4
- package/dist/_members/animate/scene/internal.d.ts +0 -29
- package/dist/_members/authoring/prompts/graphics.d.ts +0 -9
- package/dist/_members/cloud-import/cloudConfig.d.ts +0 -2
- package/dist/_members/composition/autozoom/index.d.ts +0 -25
- package/dist/_members/composition/graphics-plan/instantiateMotif.d.ts +0 -34
- package/dist/_members/composition/invariants/time.d.ts +0 -14
- package/dist/_members/composition/types/index.d.ts +0 -8
- package/dist/_members/composition/validators/font.d.ts +0 -58
- package/dist/_members/composition/validators/registry.d.ts +0 -79
- package/dist/_members/composition/validators/render.d.ts +0 -2068
- package/dist/_members/director/ai-sdk/chunks.d.ts +0 -14
- package/dist/_members/director/domain/ports.d.ts +0 -32
- package/dist/_members/director/testing/contract.d.ts +0 -52
- package/dist/_members/director/testing/index.d.ts +0 -1
- package/dist/_members/foundation/codes/index.d.ts +0 -10
- package/dist/_members/nle-export/server/index.d.ts +0 -1
- package/dist/_members/nle-export/server/pack-zip.d.ts +0 -6
- package/dist/_members/render-harness/assetRefs.d.ts +0 -26
- package/dist/_members/render-harness/assetRefs.d.ts.map +0 -1
- package/dist/_members/render-harness/remotion-runtime.d.ts +0 -87
- package/dist/authoring/build-tools.d.ts +0 -1
- package/dist/authoring/build-tools.js +0 -28
- package/dist/authoring/capabilities.d.ts +0 -1
- package/dist/authoring/capabilities.js +0 -11
- package/dist/authoring/pipelineTrace.d.ts +0 -1
- package/dist/authoring/pipelineTrace.js +0 -7
- package/dist/authoring/tools.d.ts +0 -1
- package/dist/authoring/tools.js +0 -31
- package/dist/chunk-6UZYUWBX.js +0 -197
- package/dist/chunk-7EDLPIUN.js +0 -384
- package/dist/chunk-GF52TW4I.js +0 -51
- package/dist/chunk-IG3YAOUZ.js +0 -418
- package/dist/chunk-JOURGVOR.js +0 -27
- package/dist/chunk-MFMR3LHO.js +0 -116
- package/dist/chunk-OSMXQV5V.js +0 -18
- package/dist/chunk-QDBVYZSF.js +0 -128
- package/dist/chunk-U3JPILZS.js +0 -15
- package/dist/chunk-Y4HPN4BC.js +0 -364
- package/dist/composition/autozoom.d.ts +0 -1
- package/dist/composition/autozoom.js +0 -76
- package/dist/composition/fixtures.d.ts +0 -1
- package/dist/composition/fixtures.js +0 -154
- package/dist/composition/types.d.ts +0 -1
- package/dist/composition/types.js +0 -0
- package/dist/context-4WSFPRLX.js +0 -16
- package/dist/director/testing.d.ts +0 -1
- package/dist/director/testing.js +0 -22
- package/dist/foundation/codes.d.ts +0 -1
- package/dist/foundation/codes.js +0 -7
- package/dist/nle-export/server.d.ts +0 -1
- package/dist/nle-export/server.js +0 -25856
- /package/dist/{chunk-FTVZF4GO.js → chunk-S432RE6G.js} +0 -0
package/dist/chunk-U3JPILZS.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// ../data-models/foundation/src/codes/index.ts
|
|
2
|
-
var InvariantError = class extends Error {
|
|
3
|
-
code;
|
|
4
|
-
details;
|
|
5
|
-
constructor(violation) {
|
|
6
|
-
super(`${violation.code}: ${violation.message}`);
|
|
7
|
-
this.code = violation.code;
|
|
8
|
-
this.details = violation.details;
|
|
9
|
-
this.name = "InvariantError";
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
InvariantError
|
|
15
|
-
};
|
package/dist/chunk-Y4HPN4BC.js
DELETED
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
// ../authoring/src/prompts/evaluatorPrompt.ts
|
|
2
|
-
var EVALUATOR_PROMPT = `You are a skeptical QA reviewer. Your job is to find problems, not praise work.
|
|
3
|
-
|
|
4
|
-
SCORING RULES:
|
|
5
|
-
- If something looks "fine" but not "good", that's a 5, not a 7.
|
|
6
|
-
- Never say "overall looks good" then list issues. Issues mean score deductions.
|
|
7
|
-
- If a verification criterion is not met, the phase FAILS regardless of other scores.
|
|
8
|
-
- Compare against the original task: anything skipped is a deduction.
|
|
9
|
-
- Score each dimension independently on a 0-10 scale.
|
|
10
|
-
|
|
11
|
-
CALIBRATION:
|
|
12
|
-
|
|
13
|
-
## Timeline Edit: design_quality
|
|
14
|
-
SCORE 3/10 \u2014 FAIL:
|
|
15
|
-
"Centered white text on dark background. No animation. No accent elements."
|
|
16
|
-
|
|
17
|
-
SCORE 8/10 \u2014 PASS:
|
|
18
|
-
"Staggered entrance with spring physics, accent bar + text with letter-spacing animation, exit choreography in final 15 frames. Multiple animated layers."
|
|
19
|
-
|
|
20
|
-
THE DIFFERENCE: Layered composition with choreographed timing vs. single static element.
|
|
21
|
-
|
|
22
|
-
## Timeline Edit: craft
|
|
23
|
-
SCORE 3/10 \u2014 FAIL:
|
|
24
|
-
"Linear fade in, linear fade out. No spring physics. No stagger. Static positioning."
|
|
25
|
-
|
|
26
|
-
SCORE 8/10 \u2014 PASS:
|
|
27
|
-
"Spring entrance (damping: 12, stiffness: 180), 8-frame stagger between elements, translateY exit with opacity fade, accent bar slides independently."
|
|
28
|
-
|
|
29
|
-
THE DIFFERENCE: Physics-based motion with choreography vs. basic CSS transitions.
|
|
30
|
-
|
|
31
|
-
## Artifact: quality
|
|
32
|
-
SCORE 3/10 \u2014 FAIL:
|
|
33
|
-
"Generic summary that could be about any podcast. No specific quotes or moments referenced."
|
|
34
|
-
|
|
35
|
-
SCORE 8/10 \u2014 PASS:
|
|
36
|
-
"Opens with a specific compelling quote from the episode. References 3 key moments by timestamp. Matches the host's voice and vocabulary."
|
|
37
|
-
|
|
38
|
-
THE DIFFERENCE: Specific, contextualized content vs. generic filler.
|
|
39
|
-
|
|
40
|
-
OUTPUT FORMAT:
|
|
41
|
-
Respond with ONLY a JSON object (no markdown, no explanation):
|
|
42
|
-
{
|
|
43
|
-
"scores": { "dimension_name": 0-10, ... },
|
|
44
|
-
"critique": "specific issues found",
|
|
45
|
-
"evidence": ["what you observed"]
|
|
46
|
-
}`;
|
|
47
|
-
|
|
48
|
-
// ../authoring/src/prompts/plannerPrompt.ts
|
|
49
|
-
function formatPlanSteps(steps) {
|
|
50
|
-
const arr = steps ?? [];
|
|
51
|
-
return "PLAN:\n" + arr.map(
|
|
52
|
-
(s) => `- ${s.time}s: ${s.name} | ${s.overlayType} | ${s.duration}s | text: "${s.text}" | ${s.visual}`
|
|
53
|
-
).join("\n");
|
|
54
|
-
}
|
|
55
|
-
function buildExecutionTask(plan, originalTask) {
|
|
56
|
-
return `## Pre-approved Plan
|
|
57
|
-
|
|
58
|
-
Execute this plan exactly. Land one element at a time, in order.
|
|
59
|
-
Do NOT re-plan or reconsider \u2014 the plan is locked in.
|
|
60
|
-
|
|
61
|
-
<plan>
|
|
62
|
-
${plan}
|
|
63
|
-
</plan>
|
|
64
|
-
|
|
65
|
-
Original request: ${originalTask}
|
|
66
|
-
|
|
67
|
-
Instructions:
|
|
68
|
-
1. For each line in the plan, apply it with \`apply_composition\`:
|
|
69
|
-
- A graphic is a \`clip.add\` op \u2014 a \`{ kind: 'card', html, tokens }\` source for
|
|
70
|
-
copy you write, a \`{ kind: 'overlay', primitiveId, params }\` source for a
|
|
71
|
-
catalog primitive, or a \`{ kind: 'component', componentId }\` source for a
|
|
72
|
-
component you authored. Use the plan's timing verbatim.
|
|
73
|
-
- A change to something already on the timeline is a \`clip.update\` op
|
|
74
|
-
carrying ONLY the fields that move.
|
|
75
|
-
2. Batch the ops for one element into a single call, then \`preview_frame\` at the
|
|
76
|
-
moments you touched to verify. Fix what the pixels show, then move to the next.
|
|
77
|
-
3. Do NOT skip or add items outside the plan.
|
|
78
|
-
`;
|
|
79
|
-
}
|
|
80
|
-
function buildPlannerUserMessage(params) {
|
|
81
|
-
const parts = [
|
|
82
|
-
PLANNING_INSTRUCTIONS,
|
|
83
|
-
"\n## User Request\n\n" + params.task
|
|
84
|
-
];
|
|
85
|
-
const history = params.messages.slice(0, -1).filter((m) => m.content.length > 0);
|
|
86
|
-
if (history.length > 0) {
|
|
87
|
-
parts.push(
|
|
88
|
-
"\n## Conversation History\n\n" + history.map((m) => `<${m.role}>
|
|
89
|
-
${m.content}
|
|
90
|
-
</${m.role}>`).join("\n")
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
return parts.join("\n");
|
|
94
|
-
}
|
|
95
|
-
var PLANNING_INSTRUCTIONS = `Analyze the project state and transcript to decide if this request needs a multi-overlay plan or can be executed directly.
|
|
96
|
-
|
|
97
|
-
## Workflow
|
|
98
|
-
|
|
99
|
-
1. Call get_context to understand the current project state and transcript \u2014 it
|
|
100
|
-
returns the lead transcript's word timings, so most plans need nothing else.
|
|
101
|
-
2. Call get_media_context for a SPECIFIC media item when you need its own word
|
|
102
|
-
timings or its detected faces; analyze_transcript when you want the editorial
|
|
103
|
-
read (summary / chapters / highlights) rather than the words.
|
|
104
|
-
3. Call submit_plan with your decision.
|
|
105
|
-
|
|
106
|
-
## Decision Criteria
|
|
107
|
-
|
|
108
|
-
Call submit_plan with type "direct" if:
|
|
109
|
-
- The request is a single action (remove, delete, change, update one thing)
|
|
110
|
-
- No transcript analysis is needed
|
|
111
|
-
|
|
112
|
-
Call submit_plan with type "plan" if:
|
|
113
|
-
- Multiple overlays or scenes are needed
|
|
114
|
-
- The request involves analyzing the transcript for key moments
|
|
115
|
-
|
|
116
|
-
## Overlay Types (for plan steps)
|
|
117
|
-
- full-screen: Bold text/graphic covering most of the frame (3-5s)
|
|
118
|
-
- lower-third: Subtitle-style bar in the lower third (3-6s)
|
|
119
|
-
- intro: Title card with ripple insert (3-5s)
|
|
120
|
-
- outro: End card with ripple insert (3-5s)
|
|
121
|
-
- scene: Full-screen designed moment (5-30s) \u2014 a card or component that owns the
|
|
122
|
-
frame: a stat, a comparison, a sequence, a diagram built from catalog pieces
|
|
123
|
-
|
|
124
|
-
## Plan Guidelines (when type is "plan")
|
|
125
|
-
- Pick 3-7 key moments, spaced at least 10s apart
|
|
126
|
-
- Text MUST come from the actual transcript \u2014 do not invent quotes
|
|
127
|
-
- Prefer moments where the speaker introduces a concept or transitions topics
|
|
128
|
-
- At most 1 intro and 1 outro`;
|
|
129
|
-
|
|
130
|
-
// ../authoring/src/prompts/graphics.ts
|
|
131
|
-
var CODE_GEN_FEW_SHOT_EXAMPLES = `
|
|
132
|
-
## Reference Examples (study these patterns, then write your component)
|
|
133
|
-
|
|
134
|
-
### Example 1: Sequential timing \u2014 staggered interpolate calls with offset frame ranges
|
|
135
|
-
\`\`\`jsx
|
|
136
|
-
export default function CinematicTitle({ durationInFrames, params }) {
|
|
137
|
-
const frame = useCurrentFrame();
|
|
138
|
-
const { fps, height } = useVideoConfig();
|
|
139
|
-
const text = params.text ?? 'CINEMATIC';
|
|
140
|
-
const subtext = params.subtext ?? '';
|
|
141
|
-
const accentColor = params.accentColor ?? '#D4AF37';
|
|
142
|
-
const barHeight = height * 0.13;
|
|
143
|
-
const barSlide = interpolate(frame, [0, 20], [barHeight, 0], {
|
|
144
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
145
|
-
});
|
|
146
|
-
const textFade = interpolate(frame, [18, 40], [0, 1], {
|
|
147
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
148
|
-
});
|
|
149
|
-
const textSpacing = interpolate(frame, [18, 45], [20, 6], {
|
|
150
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
151
|
-
});
|
|
152
|
-
const subtextFade = interpolate(frame, [35, 55], [0, 1], {
|
|
153
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
154
|
-
});
|
|
155
|
-
const exitOpacity = interpolate(frame, [durationInFrames - 20, durationInFrames], [1, 0], {
|
|
156
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
157
|
-
});
|
|
158
|
-
const barStyle = { position: 'absolute', left: 0, right: 0, height: barHeight, backgroundColor: '#000000', zIndex: 2 };
|
|
159
|
-
return (
|
|
160
|
-
<AbsoluteFill style={{ backgroundColor: 'transparent', opacity: exitOpacity }}>
|
|
161
|
-
<div style={{ ...barStyle, top: 0, transform: \`translateY(-\${barSlide}px)\` }} />
|
|
162
|
-
<div style={{ ...barStyle, bottom: 0, transform: \`translateY(\${barSlide}px)\` }} />
|
|
163
|
-
<AbsoluteFill style={{ justifyContent: 'center', alignItems: 'center', zIndex: 1 }}>
|
|
164
|
-
<div style={{ textAlign: 'center', opacity: textFade }}>
|
|
165
|
-
<div style={{ fontSize: 72, fontWeight: 700, fontFamily: params.fontFamily || 'sans-serif',
|
|
166
|
-
color: params.textColor || '#FFFFFF', letterSpacing: textSpacing, textTransform: 'uppercase' }}>
|
|
167
|
-
{text}
|
|
168
|
-
</div>
|
|
169
|
-
{subtext ? (
|
|
170
|
-
<div style={{ marginTop: 16, fontSize: 18, fontWeight: 300, fontFamily: params.fontFamily || 'sans-serif',
|
|
171
|
-
color: accentColor, letterSpacing: 3, textTransform: 'uppercase', opacity: subtextFade }}>
|
|
172
|
-
{subtext}
|
|
173
|
-
</div>
|
|
174
|
-
) : null}
|
|
175
|
-
</div>
|
|
176
|
-
</AbsoluteFill>
|
|
177
|
-
</AbsoluteFill>
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
\`\`\`
|
|
181
|
-
|
|
182
|
-
### Example 2: 4-point opacity curve + responsive Math.min timing + RENDERS WITHIN params.region
|
|
183
|
-
\`\`\`jsx
|
|
184
|
-
export default function LowerThird({ durationInFrames, params }) {
|
|
185
|
-
const frame = useCurrentFrame();
|
|
186
|
-
const accent = params.accentColor ?? '#DB6452';
|
|
187
|
-
const pos = params.position ?? 'left';
|
|
188
|
-
const R = params.region ?? { x: 0, y: 0, w: 1, h: 1 };
|
|
189
|
-
const fadeIn = Math.min(15, Math.floor(durationInFrames / 3));
|
|
190
|
-
const fadeOut = Math.min(10, Math.floor(durationInFrames / 3));
|
|
191
|
-
const slideIn = interpolate(frame, [0, fadeIn], [-100, 0], { extrapolateRight: 'clamp' });
|
|
192
|
-
const opacity = interpolate(frame,
|
|
193
|
-
[0, fadeIn, Math.max(fadeIn, durationInFrames - fadeOut), durationInFrames],
|
|
194
|
-
[0, 1, 1, 0],
|
|
195
|
-
{ extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
196
|
-
return (
|
|
197
|
-
<div style={{ position: 'absolute',
|
|
198
|
-
left: \`\${R.x*100}%\`, top: \`\${R.y*100}%\`, width: \`\${R.w*100}%\`, height: \`\${R.h*100}%\`,
|
|
199
|
-
display: 'flex', flexDirection: 'column', justifyContent: 'flex-end',
|
|
200
|
-
alignItems: pos === 'right' ? 'flex-end' : 'flex-start',
|
|
201
|
-
transform: \`translateX(\${pos === 'right' ? -slideIn : slideIn}%)\`, opacity, gap: 4 }}>
|
|
202
|
-
<div style={{ background: accent, padding: '8px 20px', borderRadius: 4,
|
|
203
|
-
fontSize: 28, fontWeight: 700, color: params.textColor || '#fff',
|
|
204
|
-
fontFamily: params.fontFamily || 'system-ui, sans-serif' }}>
|
|
205
|
-
{params.text}
|
|
206
|
-
</div>
|
|
207
|
-
{params.subtext && (
|
|
208
|
-
<div style={{ background: 'rgba(0, 0, 0, 0.7)', padding: '6px 20px', borderRadius: 4,
|
|
209
|
-
fontSize: 20, fontWeight: 400, color: 'rgba(255, 255, 255, 0.9)',
|
|
210
|
-
fontFamily: params.fontFamily || 'system-ui, sans-serif' }}>
|
|
211
|
-
{params.subtext}
|
|
212
|
-
</div>
|
|
213
|
-
)}
|
|
214
|
-
</div>
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
\`\`\`
|
|
218
|
-
|
|
219
|
-
### Example 3: spring() entrance + per-character Math.sin wave + composite transforms
|
|
220
|
-
\`\`\`jsx
|
|
221
|
-
export default function WaveText({ durationInFrames, params }) {
|
|
222
|
-
const frame = useCurrentFrame();
|
|
223
|
-
const { fps } = useVideoConfig();
|
|
224
|
-
const text = params.text ?? 'WAVE';
|
|
225
|
-
const subtext = params.subtext ?? '';
|
|
226
|
-
const accent = params.accentColor ?? '#F59E0B';
|
|
227
|
-
const enterProgress = spring({ frame, fps, config: { damping: 14, stiffness: 120 } });
|
|
228
|
-
const enterOpacity = interpolate(enterProgress, [0, 1], [0, 1]);
|
|
229
|
-
const exitOpacity = interpolate(frame, [durationInFrames - 15, durationInFrames], [1, 0], {
|
|
230
|
-
extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
|
|
231
|
-
});
|
|
232
|
-
const chars = text.split('');
|
|
233
|
-
const subtextProgress = spring({ frame: Math.max(0, frame - 12), fps, config: { damping: 16, stiffness: 100 } });
|
|
234
|
-
return (
|
|
235
|
-
<AbsoluteFill style={{ justifyContent: 'center', alignItems: 'center', opacity: exitOpacity }}>
|
|
236
|
-
<div style={{ display: 'flex', flexDirection: 'row', opacity: enterOpacity }}>
|
|
237
|
-
{chars.map((char, i) => {
|
|
238
|
-
const wave = Math.sin(frame * 0.12 - i * 0.6) * 18;
|
|
239
|
-
const rotation = Math.sin(frame * 0.1 - i * 0.5) * 8;
|
|
240
|
-
return (
|
|
241
|
-
<div key={i} style={{ fontSize: 80, fontWeight: 900,
|
|
242
|
-
fontFamily: params.fontFamily || 'sans-serif', color: params.textColor || '#FFFFFF',
|
|
243
|
-
transform: \`translateY(\${wave}px) rotate(\${rotation}deg)\`,
|
|
244
|
-
textShadow: \`0 4px 15px \${accent}88, 0 0 30px \${accent}44\`,
|
|
245
|
-
marginLeft: i > 0 ? 2 : 0 }}>
|
|
246
|
-
{char === ' ' ? '\\u00A0' : char}
|
|
247
|
-
</div>
|
|
248
|
-
);
|
|
249
|
-
})}
|
|
250
|
-
</div>
|
|
251
|
-
{subtext ? (
|
|
252
|
-
<div style={{ marginTop: 16, opacity: interpolate(subtextProgress, [0, 1], [0, 0.8]),
|
|
253
|
-
fontSize: 24, fontWeight: 400, fontFamily: params.fontFamily || 'sans-serif',
|
|
254
|
-
color: accent, letterSpacing: 4, textTransform: 'uppercase' }}>
|
|
255
|
-
{subtext}
|
|
256
|
-
</div>
|
|
257
|
-
) : null}
|
|
258
|
-
</AbsoluteFill>
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
\`\`\`
|
|
262
|
-
`;
|
|
263
|
-
var COMPONENT_CONTRACT = `\`export default function Name({ durationInFrames, params }) { ... }\`
|
|
264
|
-
- params: { text, subtext?, position?, accentColor?, textColor?, fontFamily?, fontSize?, backgroundColor?, region? }
|
|
265
|
-
- Only \`useCurrentFrame()\` and \`useVideoConfig()\` hooks. No useEffect/useState/useMemo/useCallback/useRef.
|
|
266
|
-
- Inline styles only. No imports, no CSS, no document access. Max 5000 chars.
|
|
267
|
-
- All animation driven by frame number.
|
|
268
|
-
|
|
269
|
-
REGION (placement) \u2014 the composition floor reserves a SAFE band for your overlay,
|
|
270
|
-
\`params.region = { x, y, w, h }\` in output fractions (0\u20131), already CLEAR of the
|
|
271
|
-
captions and the platform UI. Your component MUST render its visible content
|
|
272
|
-
within this band. Wrap your root in a positioned container sized to the region:
|
|
273
|
-
\`\`\`jsx
|
|
274
|
-
const R = params.region ?? { x: 0, y: 0, w: 1, h: 1 };
|
|
275
|
-
return (
|
|
276
|
-
<div style={{ position: 'absolute', left: \`\${R.x*100}%\`, top: \`\${R.y*100}%\`,
|
|
277
|
-
width: \`\${R.w*100}%\`, height: \`\${R.h*100}%\`,
|
|
278
|
-
display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
279
|
-
</div>
|
|
280
|
-
);
|
|
281
|
-
\`\`\`
|
|
282
|
-
- Do NOT use \`<AbsoluteFill>\` for graphic content, and do NOT hard-code top/bottom
|
|
283
|
-
offsets (e.g. \`bottom: height*0.25\`) or use \`useVideoConfig()\` width/height for
|
|
284
|
-
LAYOUT \u2014 only for animation math. Those bypass the floor and collide with the
|
|
285
|
-
captions (the off-brand failure). Position everything relative to params.region.
|
|
286
|
-
- The speaker may appear inside the region \u2014 favour its edges for solid graphics,
|
|
287
|
-
keep the centre light (transparency/glow), so you complement the subject.
|
|
288
|
-
- EXCEPTION: full-frame atmospheric effects (vignette, film grain, color wash,
|
|
289
|
-
light leak, blur) carry NO legible content the captions can collide with \u2014 cover
|
|
290
|
-
the whole frame with \`<AbsoluteFill>\` and ignore params.region. The region rule
|
|
291
|
-
above is ONLY for positioned graphics/text.`;
|
|
292
|
-
var TOOLKIT_REFERENCE = `- \`interpolate(frame, inputRange, outputRange, { easing })\` \u2014 animate values
|
|
293
|
-
- \`spring({ frame, fps, config: { damping, stiffness, mass } })\` \u2014 physics motion
|
|
294
|
-
- \`Easing.bezier(...)\`, \`Easing.in/out/inOut(Easing.ease)\`
|
|
295
|
-
- Shapes: \`<Circle>\`, \`<Rect>\`, \`<Star>\`, \`<Triangle>\`, \`<Polygon>\`, \`<Heart>\`, \`<Pie>\`, \`<Ellipse>\`
|
|
296
|
-
- SVG: \`evolvePath(progress, path)\`, \`interpolatePath(progress, pathA, pathB)\`
|
|
297
|
-
- Noise: \`noise2D(seed, x, y)\`, \`noise3D\`, \`noise4D\` \u2014 organic motion
|
|
298
|
-
- Effects: \`<Trail>\`, \`<CameraMotionBlur>\`
|
|
299
|
-
- Layout: \`<AbsoluteFill>\`, \`<Sequence>\`, \`<Img>\`
|
|
300
|
-
- Multi-cell layout that reflows: \`<FlexLayout tracks={[\u2026]} tracksEnd={[\u2026]} fits={[\u2026]} width={R.w*width} height={R.h*height}>\` from \`@cueframe/animate\` \u2014 tracks are weights (\`{ weight: 0, basis: px }\` is content-sized and pushes its neighbours), children fill the cells depth-first, weights ease across the clip and every cell re-solves per frame; \`fits\` per cell: stretch | contain | cover | position | scale | matte. \`solveFlex\` / \`fitBox\` / \`flexBoxToThree\` for custom or 3D placement (one \`<ThreeCanvas orthographic>\` pinned 1:1 to pixels). Never CSS-scale it \u2014 size the container.
|
|
301
|
-
- Fonts: FONTS.inter, .montserrat, .poppins, .roboto, .oswald, .playfairDisplay, .bebasNeue, .spaceMono, .instrumentSerif, .nationalPark`;
|
|
302
|
-
var DESIGN_QUALITY_RULES = `Good motion graphics have:
|
|
303
|
-
- **Layered composition**: Multiple animated elements (text + accent line + shape + bg glow) with staggered timing, not just a single text fade
|
|
304
|
-
- **Spring physics**: Use \`spring()\` for organic, bouncy entrances instead of linear interpolate for everything
|
|
305
|
-
- **Visual hierarchy**: Title large/bold, subtext smaller/lighter, decorative elements subtle
|
|
306
|
-
- **Entrance choreography**: Elements arrive in sequence (line extends \u2192 title springs in \u2192 subtext slides up), not all at once
|
|
307
|
-
- **Exit animation**: Fade out with easing in final 15 frames
|
|
308
|
-
- **Atmosphere**: Subtle glows, gradients, or accent color bleed (e.g. \`\${accent}22\` for 13% opacity tint)
|
|
309
|
-
- Use accent color for decorative elements, NOT for main text (use params.textColor)
|
|
310
|
-
- For full-screen scenes, use params.backgroundColor \u2014 NEVER hardcode dark colors like #0a0a0a or #0f0f23
|
|
311
|
-
- ALWAYS read colors from params: \`params.backgroundColor\`, \`params.textColor\`, \`params.accentColor\`
|
|
312
|
-
|
|
313
|
-
Bad motion graphics:
|
|
314
|
-
- Single element with just opacity fade (no movement, no layers)
|
|
315
|
-
- Generic centered text with no decorative elements
|
|
316
|
-
- Everything appearing simultaneously
|
|
317
|
-
- No exit animation
|
|
318
|
-
- Hardcoded colors instead of using params.accentColor
|
|
319
|
-
- Hard-coded screen positions (bottom: N / full-frame AbsoluteFill) instead of
|
|
320
|
-
rendering within params.region \u2014 these collide with the captions and ship off-brand`;
|
|
321
|
-
async function initCodeGenPrompts(fetchPrompt) {
|
|
322
|
-
if (!fetchPrompt) return;
|
|
323
|
-
const prompt = await fetchPrompt("apps/studio/code-gen");
|
|
324
|
-
if (!prompt) return;
|
|
325
|
-
const sections = parsePromptSections(prompt.content);
|
|
326
|
-
if (sections["Few-Shot Examples"]) CODE_GEN_FEW_SHOT_EXAMPLES = sections["Few-Shot Examples"];
|
|
327
|
-
if (sections["Component Contract"]) COMPONENT_CONTRACT = sections["Component Contract"];
|
|
328
|
-
if (sections["Toolkit Reference"]) TOOLKIT_REFERENCE = sections["Toolkit Reference"];
|
|
329
|
-
if (sections["Design Quality Rules"]) DESIGN_QUALITY_RULES = sections["Design Quality Rules"];
|
|
330
|
-
console.info("[codeGenPrompts] Code-gen prompts overridden from remote prompt", { version: prompt.version });
|
|
331
|
-
}
|
|
332
|
-
function parsePromptSections(content) {
|
|
333
|
-
const sections = {};
|
|
334
|
-
let currentHeader = "";
|
|
335
|
-
const lines = [];
|
|
336
|
-
for (const line of content.split("\n")) {
|
|
337
|
-
if (line.startsWith("## ")) {
|
|
338
|
-
if (currentHeader && lines.length > 0) {
|
|
339
|
-
sections[currentHeader] = lines.join("\n").trim();
|
|
340
|
-
}
|
|
341
|
-
currentHeader = line.slice(3).trim();
|
|
342
|
-
lines.length = 0;
|
|
343
|
-
} else {
|
|
344
|
-
lines.push(line);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (currentHeader && lines.length > 0) {
|
|
348
|
-
sections[currentHeader] = lines.join("\n").trim();
|
|
349
|
-
}
|
|
350
|
-
return sections;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
export {
|
|
354
|
-
EVALUATOR_PROMPT,
|
|
355
|
-
formatPlanSteps,
|
|
356
|
-
buildExecutionTask,
|
|
357
|
-
buildPlannerUserMessage,
|
|
358
|
-
PLANNING_INSTRUCTIONS,
|
|
359
|
-
CODE_GEN_FEW_SHOT_EXAMPLES,
|
|
360
|
-
COMPONENT_CONTRACT,
|
|
361
|
-
TOOLKIT_REFERENCE,
|
|
362
|
-
DESIGN_QUALITY_RULES,
|
|
363
|
-
initCodeGenPrompts
|
|
364
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/composition/autozoom/index.js";
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import "../chunk-2ESYSVXG.js";
|
|
2
|
-
|
|
3
|
-
// ../composition/src/autozoom/index.ts
|
|
4
|
-
var STYLE = {
|
|
5
|
-
subtle: { zoom: 0.8, prePad: 0.5, postPad: 1.2, minZoom: 1.2, mergeGap: 1 },
|
|
6
|
-
standard: { zoom: 0.67, prePad: 0.4, postPad: 1, minZoom: 1, mergeGap: 0.8 },
|
|
7
|
-
punchy: { zoom: 0.55, prePad: 0.3, postPad: 0.8, minZoom: 0.8, mergeGap: 0.6 }
|
|
8
|
-
};
|
|
9
|
-
var median = (xs) => {
|
|
10
|
-
const s = [...xs].sort((a, b) => a - b);
|
|
11
|
-
const m = Math.floor(s.length / 2);
|
|
12
|
-
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
|
|
13
|
-
};
|
|
14
|
-
var neutral = (startSec, endSec) => ({
|
|
15
|
-
startSec,
|
|
16
|
-
endSec,
|
|
17
|
-
intent: "auto-zoom:neutral",
|
|
18
|
-
focus: { mode: "frame-center" },
|
|
19
|
-
zoom: 1
|
|
20
|
-
});
|
|
21
|
-
function tile(anchors, durationSec, t) {
|
|
22
|
-
if (durationSec <= 0 || anchors.length === 0) return [];
|
|
23
|
-
const sorted = [...anchors].sort((a, b) => a.t - b.t);
|
|
24
|
-
const groups = [];
|
|
25
|
-
let cur = [sorted[0]];
|
|
26
|
-
for (let i = 1; i < sorted.length; i++) {
|
|
27
|
-
if (sorted[i].t - sorted[i - 1].t <= t.mergeGap) cur.push(sorted[i]);
|
|
28
|
-
else {
|
|
29
|
-
groups.push(cur);
|
|
30
|
-
cur = [sorted[i]];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
groups.push(cur);
|
|
34
|
-
const windows = groups.map((g) => ({
|
|
35
|
-
start: Math.max(0, g[0].t - t.prePad),
|
|
36
|
-
end: Math.min(durationSec, g[g.length - 1].t + t.postPad),
|
|
37
|
-
x: median(g.map((e) => e.x)),
|
|
38
|
-
y: median(g.map((e) => e.y))
|
|
39
|
-
})).filter((w) => w.end - w.start >= t.minZoom);
|
|
40
|
-
if (windows.length === 0) return [];
|
|
41
|
-
const merged = [windows[0]];
|
|
42
|
-
for (let i = 1; i < windows.length; i++) {
|
|
43
|
-
const prev = merged[merged.length - 1];
|
|
44
|
-
if (windows[i].start <= prev.end) prev.end = Math.max(prev.end, windows[i].end);
|
|
45
|
-
else merged.push(windows[i]);
|
|
46
|
-
}
|
|
47
|
-
const out = [];
|
|
48
|
-
let cursor = 0;
|
|
49
|
-
for (const w of merged) {
|
|
50
|
-
if (w.start > cursor) out.push(neutral(cursor, w.start));
|
|
51
|
-
out.push({
|
|
52
|
-
startSec: w.start,
|
|
53
|
-
endSec: w.end,
|
|
54
|
-
intent: "auto-zoom:punch-in",
|
|
55
|
-
focus: { mode: "point", x: w.x, y: w.y },
|
|
56
|
-
zoom: t.zoom
|
|
57
|
-
});
|
|
58
|
-
cursor = w.end;
|
|
59
|
-
}
|
|
60
|
-
if (cursor < durationSec) out.push(neutral(cursor, durationSec));
|
|
61
|
-
return out;
|
|
62
|
-
}
|
|
63
|
-
function autoZoom(points, durationSec, style = "standard") {
|
|
64
|
-
return tile(points, durationSec, STYLE[style]);
|
|
65
|
-
}
|
|
66
|
-
function autoZoomFromActivity(activity, durationSec, style = "standard", thresholds = {}) {
|
|
67
|
-
const minC = thresholds.minConcentration ?? 0.6;
|
|
68
|
-
const maxCh = thresholds.maxChangePct ?? 0.12;
|
|
69
|
-
const anchors = activity.filter((s) => s.concentration >= minC && s.changePct <= maxCh);
|
|
70
|
-
return tile(anchors, durationSec, STYLE[style]);
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
STYLE,
|
|
74
|
-
autoZoom,
|
|
75
|
-
autoZoomFromActivity
|
|
76
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/composition/fixtures/index.js";
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import "../chunk-2ESYSVXG.js";
|
|
2
|
-
|
|
3
|
-
// ../composition/src/fixtures/index.ts
|
|
4
|
-
var minimalComposition = {
|
|
5
|
-
v: 1,
|
|
6
|
-
format: { aspectRatio: "9:16", fps: 30, resolution: "fhd" },
|
|
7
|
-
tracks: [
|
|
8
|
-
{
|
|
9
|
-
id: "V1",
|
|
10
|
-
kind: "video",
|
|
11
|
-
contents: [
|
|
12
|
-
{
|
|
13
|
-
id: "clip-1",
|
|
14
|
-
startTime: 0,
|
|
15
|
-
duration: 10,
|
|
16
|
-
source: {
|
|
17
|
-
kind: "media",
|
|
18
|
-
mediaId: "kx0000000000000000000000"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
};
|
|
25
|
-
var overlappingClips = {
|
|
26
|
-
v: 1,
|
|
27
|
-
format: { aspectRatio: "16:9", fps: 30 },
|
|
28
|
-
tracks: [
|
|
29
|
-
{
|
|
30
|
-
id: "V1",
|
|
31
|
-
kind: "video",
|
|
32
|
-
contents: [
|
|
33
|
-
{
|
|
34
|
-
id: "clip-1",
|
|
35
|
-
startTime: 0,
|
|
36
|
-
duration: 10,
|
|
37
|
-
source: {
|
|
38
|
-
kind: "media",
|
|
39
|
-
mediaId: "kx0000000000000000000000"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "clip-2",
|
|
44
|
-
startTime: 5,
|
|
45
|
-
duration: 10,
|
|
46
|
-
source: {
|
|
47
|
-
kind: "media",
|
|
48
|
-
mediaId: "kx1111111111111111111111"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
};
|
|
55
|
-
var transitionWithoutPredecessor = {
|
|
56
|
-
v: 1,
|
|
57
|
-
format: { aspectRatio: "9:16", fps: 30 },
|
|
58
|
-
tracks: [
|
|
59
|
-
{
|
|
60
|
-
id: "V1",
|
|
61
|
-
kind: "video",
|
|
62
|
-
contents: [
|
|
63
|
-
{
|
|
64
|
-
id: "clip-1",
|
|
65
|
-
startTime: 0,
|
|
66
|
-
duration: 10,
|
|
67
|
-
source: {
|
|
68
|
-
kind: "media",
|
|
69
|
-
mediaId: "kx0000000000000000000000"
|
|
70
|
-
},
|
|
71
|
-
transitionIn: { type: "fade", duration: 1 }
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
};
|
|
77
|
-
var overlappingSceneMarkers = {
|
|
78
|
-
v: 1,
|
|
79
|
-
format: { aspectRatio: "9:16", fps: 30 },
|
|
80
|
-
tracks: [
|
|
81
|
-
{
|
|
82
|
-
id: "V1",
|
|
83
|
-
kind: "video",
|
|
84
|
-
contents: [
|
|
85
|
-
{
|
|
86
|
-
id: "clip-1",
|
|
87
|
-
startTime: 0,
|
|
88
|
-
duration: 30,
|
|
89
|
-
source: {
|
|
90
|
-
kind: "media",
|
|
91
|
-
mediaId: "kx0000000000000000000000"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
markers: [
|
|
98
|
-
{ id: "s1", kind: "scene", startTime: 0, endTime: 15, name: "intro" },
|
|
99
|
-
{ id: "s2", kind: "scene", startTime: 10, endTime: 25, name: "middle" }
|
|
100
|
-
]
|
|
101
|
-
};
|
|
102
|
-
var idCollision = {
|
|
103
|
-
v: 1,
|
|
104
|
-
format: { aspectRatio: "9:16", fps: 30 },
|
|
105
|
-
tracks: [
|
|
106
|
-
{
|
|
107
|
-
id: "V1",
|
|
108
|
-
kind: "video",
|
|
109
|
-
contents: [
|
|
110
|
-
{
|
|
111
|
-
id: "shared-id",
|
|
112
|
-
startTime: 0,
|
|
113
|
-
duration: 5,
|
|
114
|
-
source: {
|
|
115
|
-
kind: "media",
|
|
116
|
-
mediaId: "kx0000000000000000000000"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
markers: [{ id: "shared-id", kind: "note", startTime: 2 }]
|
|
123
|
-
};
|
|
124
|
-
var clipWithExcludedRanges = {
|
|
125
|
-
v: 1,
|
|
126
|
-
format: { aspectRatio: "9:16", fps: 30 },
|
|
127
|
-
tracks: [
|
|
128
|
-
{
|
|
129
|
-
id: "V1",
|
|
130
|
-
kind: "video",
|
|
131
|
-
contents: [
|
|
132
|
-
{
|
|
133
|
-
id: "clip-1",
|
|
134
|
-
startTime: 0,
|
|
135
|
-
duration: 4,
|
|
136
|
-
source: {
|
|
137
|
-
kind: "media",
|
|
138
|
-
mediaId: "kx0000000000000000000000",
|
|
139
|
-
trim: { start: 0, end: 5 },
|
|
140
|
-
excludedRanges: [{ start: 1, end: 2, reason: "filler" }]
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
]
|
|
146
|
-
};
|
|
147
|
-
export {
|
|
148
|
-
clipWithExcludedRanges,
|
|
149
|
-
idCollision,
|
|
150
|
-
minimalComposition,
|
|
151
|
-
overlappingClips,
|
|
152
|
-
overlappingSceneMarkers,
|
|
153
|
-
transitionWithoutPredecessor
|
|
154
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/composition/types/index.js";
|
|
File without changes
|
package/dist/context-4WSFPRLX.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildDirectorContext
|
|
3
|
-
} from "./chunk-UMXES6ED.js";
|
|
4
|
-
import "./chunk-LBJ5LI5V.js";
|
|
5
|
-
import "./chunk-IG3YAOUZ.js";
|
|
6
|
-
import "./chunk-PWWZTY3G.js";
|
|
7
|
-
import "./chunk-UFD4EZHM.js";
|
|
8
|
-
import "./chunk-WPZKOVYF.js";
|
|
9
|
-
import "./chunk-B7J5UUUV.js";
|
|
10
|
-
import "./chunk-KYRDKK2D.js";
|
|
11
|
-
import "./chunk-WREYUH2E.js";
|
|
12
|
-
import "./chunk-OOL7ZUG7.js";
|
|
13
|
-
import "./chunk-2ESYSVXG.js";
|
|
14
|
-
export {
|
|
15
|
-
buildDirectorContext
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/director/testing/index.js";
|
package/dist/director/testing.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "../chunk-2ESYSVXG.js";
|
|
2
|
-
|
|
3
|
-
// ../director/src/testing/contract.ts
|
|
4
|
-
var HOME = { location: "home", project: null, selectedMediaIds: [], fastMode: false };
|
|
5
|
-
async function collectRuntime(runtime, prompt = "hello") {
|
|
6
|
-
const events = [];
|
|
7
|
-
for await (const event of runtime.run({
|
|
8
|
-
conversationId: "contract-conversation",
|
|
9
|
-
context: HOME,
|
|
10
|
-
messages: [{ role: "user", content: prompt }]
|
|
11
|
-
})) events.push(event);
|
|
12
|
-
return events;
|
|
13
|
-
}
|
|
14
|
-
async function assertDirectorRuntimeContract(runtime) {
|
|
15
|
-
const events = await collectRuntime(runtime);
|
|
16
|
-
if (events.length === 0) throw new Error("DirectorRuntime emitted no events");
|
|
17
|
-
if (events.at(-1)?.type !== "finish") throw new Error("DirectorRuntime did not finish explicitly");
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
assertDirectorRuntimeContract,
|
|
21
|
-
collectRuntime
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/foundation/codes/index.js";
|
package/dist/foundation/codes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../_members/nle-export/server/index.js";
|