@cueframe/kernel 0.2.4 → 0.2.5
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/component-runtime/bake.d.ts +14 -0
- package/dist/_members/component-runtime/bake.d.ts.map +1 -1
- package/dist/_members/mcp/generated/inputSchemas.d.ts +1 -0
- package/dist/_members/mcp/inputSchemas.d.ts +6 -0
- package/dist/_members/mcp/server.d.ts +4 -1
- package/dist/_members/render-harness/prepareSceneBake.d.ts +5 -0
- package/dist/_members/render-harness/prepareSceneBake.d.ts.map +1 -0
- package/dist/chunk-KQDZAHLP.js +3637 -0
- package/dist/{chunk-UN6NY2E6.js → chunk-SC55VDLC.js} +1 -1
- package/dist/{chunk-UY77TMKD.js → chunk-VCSSJLOU.js} +24 -4
- package/dist/component-runtime.js +1 -1
- package/dist/mcp/adapter.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/server.js +2 -2
- package/dist/mcp.js +2 -2
- package/dist/render-harness.js +1 -1
- package/package.json +9 -9
- package/dist/chunk-EBIBLL7E.js +0 -3619
|
@@ -310,7 +310,7 @@ Call wait_job(kind="compose", id="${j.composeJobId}", projectId="${a.projectId}"
|
|
|
310
310
|
name: "apply_composition",
|
|
311
311
|
operationId: "applyComposition",
|
|
312
312
|
pathArgs: { projectId: "id" },
|
|
313
|
-
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema,
|
|
313
|
+
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema, the canonical V2 world-objects recipe with nested groups, slabs, pages, phones, laptops, world/screen text, admitted surfaces, camera motion, lighting, and the current resource limits.',
|
|
314
314
|
okFormat: (j, a) => {
|
|
315
315
|
const warns = formatWarnings(j);
|
|
316
316
|
if (j && typeof j.valid === "boolean") {
|
|
@@ -271,16 +271,32 @@ function assertAssetBindingsMatch(request) {
|
|
|
271
271
|
async function bakeComponentAlphaV2(options) {
|
|
272
272
|
assertSceneShotCapabilitySupported(options.job?.source?.manifest, { componentId: options.job?.source?.componentId });
|
|
273
273
|
const job = ComponentBakeJobV2.parse(options.job);
|
|
274
|
-
assertSceneShotParamsAdmitted(job.source.manifest, job.params, { componentId: job.source.componentId });
|
|
274
|
+
const scene = assertSceneShotParamsAdmitted(job.source.manifest, job.params, { componentId: job.source.componentId });
|
|
275
|
+
if (scene && !options.prepareScene) throw new ComponentRuntimeError(
|
|
276
|
+
"component_scene_invalid",
|
|
277
|
+
"scene_prepared_plan_required: The scene bake host must supply canonical scene preparation before capture."
|
|
278
|
+
);
|
|
275
279
|
const assetServer = await startComponentAssetServer({ assets: job.assets, files: job.assetFiles });
|
|
280
|
+
let sceneLease;
|
|
276
281
|
try {
|
|
277
282
|
const { assetFiles: _assetFiles, ...unsealedRequest } = job;
|
|
278
|
-
|
|
283
|
+
let request = ComponentBakeRequestV2.parse({
|
|
279
284
|
...unsealedRequest,
|
|
280
285
|
assets: assetServer.bindings
|
|
281
286
|
});
|
|
282
287
|
assertAssetBindingsMatch(request);
|
|
283
288
|
const materialized = materializeComponentSource(options.workspaceRoot, request.source);
|
|
289
|
+
const allowedAssetOrigins = /* @__PURE__ */ new Set([assetServer.origin]);
|
|
290
|
+
if (scene) {
|
|
291
|
+
sceneLease = await options.prepareScene({
|
|
292
|
+
request,
|
|
293
|
+
materialized,
|
|
294
|
+
runtimeAssets: assetServer.runtimeAssets,
|
|
295
|
+
allowedAssetOrigins
|
|
296
|
+
});
|
|
297
|
+
request = ComponentBakeRequestV2.parse({ ...request, params: sceneLease.params });
|
|
298
|
+
assertSceneShotParamsAdmitted(request.source.manifest, request.params, { componentId: request.source.componentId });
|
|
299
|
+
}
|
|
284
300
|
const bundleId = componentBundleId({
|
|
285
301
|
sourceVersionId: materialized.sourceVersionId,
|
|
286
302
|
runtimeDigest: request.runtimeDigest,
|
|
@@ -307,7 +323,7 @@ async function bakeComponentAlphaV2(options) {
|
|
|
307
323
|
id: request.source.componentId,
|
|
308
324
|
params: request.params,
|
|
309
325
|
assets: assetServer.runtimeAssets,
|
|
310
|
-
allowedAssetOrigins
|
|
326
|
+
allowedAssetOrigins,
|
|
311
327
|
seed: request.seed,
|
|
312
328
|
graphics: request.source.manifest.graphics,
|
|
313
329
|
codec: request.codec,
|
|
@@ -360,7 +376,11 @@ async function bakeComponentAlphaV2(options) {
|
|
|
360
376
|
assertRendererReceiptMatches(renderRequest, receipt);
|
|
361
377
|
return receipt;
|
|
362
378
|
} finally {
|
|
363
|
-
|
|
379
|
+
try {
|
|
380
|
+
await sceneLease?.cleanup();
|
|
381
|
+
} finally {
|
|
382
|
+
await assetServer.close();
|
|
383
|
+
}
|
|
364
384
|
}
|
|
365
385
|
}
|
|
366
386
|
function sourceIdentityForBake(request) {
|
package/dist/mcp/adapter.js
CHANGED
package/dist/mcp/curation.js
CHANGED
package/dist/mcp/server.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
registerRawTools,
|
|
8
8
|
registerSkillPrompts,
|
|
9
9
|
titleCase
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-KQDZAHLP.js";
|
|
11
11
|
import "../chunk-E7GIZEPS.js";
|
|
12
12
|
import "../chunk-6BVVCRRD.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-SC55VDLC.js";
|
|
14
14
|
import "../chunk-2ESYSVXG.js";
|
|
15
15
|
export {
|
|
16
16
|
RAW_EXCLUDED_OPERATION_IDS,
|
package/dist/mcp.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
buildServer,
|
|
8
8
|
registerCuratedTools,
|
|
9
9
|
registerRawTools
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KQDZAHLP.js";
|
|
11
11
|
import "./chunk-E7GIZEPS.js";
|
|
12
12
|
import "./chunk-6BVVCRRD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-SC55VDLC.js";
|
|
14
14
|
import "./chunk-2ESYSVXG.js";
|
|
15
15
|
export {
|
|
16
16
|
API_URLS,
|
package/dist/render-harness.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueframe/kernel",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Publish-only aggregate of CueFrame's isomorphic kernel packages — composition, primitives, authoring, MCP, and friends shipped as one npm artifact. Members remain separate workspace packages; this only changes what ships.",
|
|
6
6
|
"files": [
|
|
@@ -19,24 +19,24 @@
|
|
|
19
19
|
"typescript": "^5.9.3",
|
|
20
20
|
"@cueframe/account-model": "0.1.0",
|
|
21
21
|
"@cueframe/animate": "0.1.0",
|
|
22
|
+
"@cueframe/composition": "0.1.0",
|
|
22
23
|
"@cueframe/cloud-import": "0.1.0",
|
|
24
|
+
"@cueframe/compose": "0.1.0",
|
|
23
25
|
"@cueframe/authoring": "0.1.0",
|
|
24
26
|
"@cueframe/brand-derivation": "0.1.0",
|
|
25
|
-
"@cueframe/compose": "0.1.0",
|
|
26
|
-
"@cueframe/composition-ops": "0.1.0",
|
|
27
|
-
"@cueframe/composition": "0.1.0",
|
|
28
27
|
"@cueframe/component-runtime": "0.1.0",
|
|
29
28
|
"@cueframe/core": "0.1.0",
|
|
30
|
-
"@cueframe/
|
|
29
|
+
"@cueframe/composition-ops": "0.1.0",
|
|
31
30
|
"@cueframe/errors": "0.1.0",
|
|
32
31
|
"@cueframe/foundation": "0.1.0",
|
|
32
|
+
"@cueframe/director": "0.1.0",
|
|
33
33
|
"@cueframe/mcp": "0.1.0",
|
|
34
|
-
"@cueframe/media-model": "0.1.0",
|
|
35
34
|
"@cueframe/nle-export": "0.1.0",
|
|
36
|
-
"@cueframe/
|
|
37
|
-
"@cueframe/
|
|
35
|
+
"@cueframe/perception": "0.1.0",
|
|
36
|
+
"@cueframe/media-model": "0.1.0",
|
|
38
37
|
"@cueframe/plane": "0.1.0",
|
|
39
|
-
"@cueframe/
|
|
38
|
+
"@cueframe/render-harness": "0.1.0",
|
|
39
|
+
"@cueframe/primitives": "0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"gsap": "3.13.0",
|