@hraness/slopcamera 3.2.8 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -9
- package/apps/desktop/application/context.ts +6 -0
- package/apps/desktop/application/default-registry.ts +26 -0
- package/apps/desktop/application/operation.ts +14 -1
- package/apps/desktop/application/operations/index.ts +4 -0
- package/apps/desktop/application/operations/spatial-behavior.ts +151 -0
- package/apps/desktop/application/operations/spatial-direction.ts +222 -0
- package/apps/desktop/application/operations/spatial-rendered-audit.ts +174 -0
- package/apps/desktop/application/operations/spatial-review.ts +194 -0
- package/apps/desktop/application/operations/spatial-scene.ts +25 -1
- package/apps/desktop/application/registry.ts +2 -2
- package/apps/desktop/application/spatial-asset-admission.ts +201 -0
- package/apps/desktop/application/spatial-assets.ts +160 -31
- package/apps/desktop/application/spatial-render.ts +217 -20
- package/apps/desktop/application/spatial-rendered-audit.ts +273 -0
- package/apps/desktop/application/spatial-review.ts +361 -0
- package/apps/desktop/application/spatial-spz.ts +48 -3
- package/apps/desktop/application/spatial-world-import.ts +26 -5
- package/apps/desktop/application/spatial-world-metadata.ts +105 -0
- package/apps/desktop/cli/args.ts +514 -11
- package/apps/desktop/cli/capability-manifest.ts +374 -0
- package/apps/desktop/cli/cinema-renderer.ts +608 -0
- package/apps/desktop/cli/command-host-resources.ts +29 -1
- package/apps/desktop/cli/commands.ts +1188 -4
- package/apps/desktop/cli/gateway-review-provider.ts +334 -0
- package/apps/desktop/cli/help.ts +172 -6
- package/apps/desktop/cli/main.ts +3 -3
- package/apps/desktop/cli/portable-surface.ts +6 -1
- package/apps/desktop/cli/spatial-asset-service.ts +124 -0
- package/apps/desktop/cli/spatial-design-service.ts +237 -0
- package/apps/desktop/cli/spatial-generate-service.ts +370 -0
- package/apps/desktop/cli/spatial-scene-service.ts +271 -4
- package/apps/desktop/cli/workflow-code.ts +1 -1
- package/apps/desktop/code/semantic-builder.ts +24 -0
- package/apps/desktop/contracts/cinema.ts +736 -0
- package/apps/desktop/contracts/index.ts +1 -0
- package/apps/desktop/contracts/spatial-asset.ts +16 -0
- package/apps/desktop/contracts/spatial-world.ts +26 -3
- package/apps/desktop/core/cinema-plan.ts +1320 -0
- package/apps/desktop/core/index.ts +1 -0
- package/apps/desktop/core/storage.ts +75 -0
- package/apps/desktop/dist/cli/main.js +725 -273
- package/apps/desktop/html-overlay/spatial.ts +619 -57
- package/apps/desktop/workflows/cinematic-world.ts +127 -0
- package/apps/desktop/workflows/index.ts +6 -0
- package/dist/cli.js +25 -429
- package/dist/code/advanced.js +1 -269
- package/dist/code/index.js +16 -2239
- package/dist/generate.js +1 -23
- package/dist/host-resources.js +1 -25
- package/dist/index-0bbesn4m.js +35 -0
- package/dist/index-296qhpf2.js +3 -0
- package/dist/index-3cxf2c58.js +3 -0
- package/dist/index-77fjfg9f.js +3 -0
- package/dist/index-80a36bc0.js +3 -0
- package/dist/index-a3vvs3rf.js +3 -0
- package/dist/index-b3geqczn.js +5 -0
- package/dist/index-grk47tgs.js +3 -0
- package/dist/index-gs48afpt.js +7 -0
- package/dist/index-qry58nj2.js +10 -0
- package/dist/index-zhg36tf9.js +3 -0
- package/dist/index.js +1 -226
- package/dist/operations.js +1 -28
- package/dist/skill-install-gx7afxsd.js +2 -0
- package/dist/vectorize/worker.js +1 -141
- package/dist/workflow.js +1 -15
- package/docs/README.md +5 -1
- package/docs/studio.md +12 -0
- package/package.json +7 -5
- package/skills/slopcamera/SKILL.md +7 -1
- package/skills/slopcamera/references/directed-scenes.md +48 -2
- package/skills/slopcamera/references/gateway-media.md +15 -1
- package/skills/slopcamera/references/image-galleries.md +166 -0
- package/skills/slopcamera/references/install.md +1 -1
- package/skills/slopcamera/references/music-video.md +4 -0
- package/skills/slopcamera/references/native-studio.md +19 -0
- package/skills/slopcamera/references/parametric-design.md +14 -0
- package/skills/slopcamera/references/scene-building.md +172 -0
- package/skills/slopcamera/references/social-collage-banners.md +204 -0
- package/skills/slopcamera/references/workflows-sdk.md +3 -3
- package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
- package/src/capability-manifest.ts +361 -0
- package/src/cli.ts +222 -4
- package/src/code/canonical-json.ts +9 -0
- package/src/generate.ts +2 -2
- package/src/icon.ts +1111 -0
- package/src/image-gallery.ts +1049 -0
- package/src/index.ts +11 -0
- package/src/mcp/boundary.ts +11 -11
- package/src/mcp/index.ts +3 -0
- package/src/mcp/server.ts +2 -1
- package/src/mcp/tools.ts +1649 -132
- package/src/mcp/types.ts +19 -0
- package/src/operations.ts +412 -0
- package/src/portable-capability-manifest.ts +67 -0
- package/src/scene-gallery.ts +184 -0
- package/src/spatial-scene/asset-admission.ts +183 -0
- package/src/spatial-scene/audit-rendered.ts +692 -0
- package/src/spatial-scene/audit.ts +617 -0
- package/src/spatial-scene/behavior-audit.ts +252 -0
- package/src/spatial-scene/behavior-bake.ts +232 -0
- package/src/spatial-scene/behavior-fns.ts +585 -0
- package/src/spatial-scene/behavior-gallery.ts +108 -0
- package/src/spatial-scene/behavior-stdlib.ts +323 -0
- package/src/spatial-scene/behavior-trace.ts +325 -0
- package/src/spatial-scene/behavior.ts +617 -0
- package/src/spatial-scene/build.ts +632 -0
- package/src/spatial-scene/camera-rig.ts +125 -0
- package/src/spatial-scene/camera-track.ts +4 -2
- package/src/spatial-scene/character.ts +124 -0
- package/src/spatial-scene/contracts.ts +75 -7
- package/src/spatial-scene/design-templates.ts +351 -0
- package/src/spatial-scene/design.ts +327 -0
- package/src/spatial-scene/direction-compile.ts +584 -0
- package/src/spatial-scene/direction.ts +122 -0
- package/src/spatial-scene/effects.ts +149 -0
- package/src/spatial-scene/evaluate.ts +109 -29
- package/src/spatial-scene/gallery.ts +277 -0
- package/src/spatial-scene/generate.ts +239 -0
- package/src/spatial-scene/geometry-native.ts +165 -0
- package/src/spatial-scene/geometry.ts +1216 -0
- package/src/spatial-scene/gltf.ts +600 -77
- package/src/spatial-scene/identity.ts +55 -2
- package/src/spatial-scene/index.ts +36 -0
- package/src/spatial-scene/inspect.ts +35 -6
- package/src/spatial-scene/material-lighting.ts +609 -0
- package/src/spatial-scene/math.ts +21 -4
- package/src/spatial-scene/motion-evidence.ts +88 -0
- package/src/spatial-scene/parametric.ts +765 -0
- package/src/spatial-scene/particle-preparation.ts +183 -0
- package/src/spatial-scene/particle.ts +195 -0
- package/src/spatial-scene/patch.ts +109 -15
- package/src/spatial-scene/performance.ts +1613 -0
- package/src/spatial-scene/probe.ts +137 -0
- package/src/spatial-scene/recipe-pack.ts +86 -0
- package/src/spatial-scene/render-effects.ts +240 -0
- package/src/spatial-scene/review.ts +639 -0
- package/src/spatial-scene/simulation-bake.ts +206 -0
- package/src/spatial-scene/simulation.ts +187 -0
- package/src/spatial-scene/solve.ts +366 -0
- package/src/spatial-scene/temporal-audit.ts +354 -0
- package/src/version.ts +1 -1
- package/dist/index-42zsesc1.js +0 -2257
- package/dist/index-7131pg1c.js +0 -1820
- package/dist/index-7308egqr.js +0 -48
- package/dist/index-8txs6fkn.js +0 -712
- package/dist/index-fava6pge.js +0 -192
- package/dist/index-h1k0fnjq.js +0 -2363
- package/dist/index-r7gdhmsp.js +0 -424
- package/dist/index-sh6xbav6.js +0 -1219
- package/dist/index-z1w83f81.js +0 -4
- package/dist/index-zfnddgay.js +0 -2029
- package/dist/skill-install-dh0ntqba.js +0 -10
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
FaceAnalysisV1Schema,
|
|
19
19
|
MusicAnalysisV1Schema,
|
|
20
20
|
ProjectInactivityAnalysisV1Schema,
|
|
21
|
+
ProjectCinemaPlanV1Schema,
|
|
21
22
|
ProjectEditPlanV1Schema,
|
|
22
23
|
RecordingManifestV1Schema,
|
|
23
24
|
RepositoryRelativePathSchema,
|
|
@@ -30,6 +31,7 @@ import {
|
|
|
30
31
|
type FaceAnalysisV1,
|
|
31
32
|
type MusicAnalysisV1,
|
|
32
33
|
type ProjectInactivityAnalysisV1,
|
|
34
|
+
type ProjectCinemaPlanV1,
|
|
33
35
|
type ProjectEditPlanV1,
|
|
34
36
|
type RecordingManifestV1,
|
|
35
37
|
type SceneAnalysisV1,
|
|
@@ -41,6 +43,7 @@ import { canonicalJson, sha256Hex } from "./canonical-json";
|
|
|
41
43
|
export const RECORDING_MANIFEST_PATH = "manifest.json";
|
|
42
44
|
export const VIDEO_PROJECT_PATH = "project.json";
|
|
43
45
|
export const CURRENT_PROJECT_EDIT_PLAN_PATH = "edits/current.json";
|
|
46
|
+
export const CURRENT_PROJECT_CINEMA_PLAN_PATH = "cinema/current.json";
|
|
44
47
|
const MAXIMUM_STRUCTURED_FILE_BYTES = 256 * 1024 * 1024;
|
|
45
48
|
const IMMUTABLE_COPY_TEMP_PREFIX = ".slopcamera-copy-";
|
|
46
49
|
|
|
@@ -89,6 +92,7 @@ export interface BundleFileIntegrity {
|
|
|
89
92
|
export type SlopcameraPersistenceDocument =
|
|
90
93
|
| AnalysisArtifact
|
|
91
94
|
| EditPlanV1
|
|
95
|
+
| ProjectCinemaPlanV1
|
|
92
96
|
| ProjectEditPlanV1
|
|
93
97
|
| RecordingManifestV1
|
|
94
98
|
| VideoProjectV1;
|
|
@@ -264,6 +268,77 @@ export async function saveProjectEditRevision(
|
|
|
264
268
|
return path;
|
|
265
269
|
}
|
|
266
270
|
|
|
271
|
+
export function projectCinemaRevisionPath(artifactSha256: string): string {
|
|
272
|
+
const sha256 = Sha256Schema.parse(artifactSha256);
|
|
273
|
+
return RepositoryRelativePathSchema.parse(`cinema/revisions/${sha256}.json`);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function projectCinemaRenderPlanPath(planSha256: string): string {
|
|
277
|
+
const sha256 = Sha256Schema.parse(planSha256);
|
|
278
|
+
return RepositoryRelativePathSchema.parse(`cinema/plans/${sha256}.json`);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Load the live cinema sidecar, or null when the project has none. Its absence
|
|
283
|
+
* is meaningful: project render planning must stay byte-identical without it.
|
|
284
|
+
*/
|
|
285
|
+
export async function loadProjectCinemaPlan(
|
|
286
|
+
fileSystem: BundleFileSystem,
|
|
287
|
+
path = CURRENT_PROJECT_CINEMA_PLAN_PATH,
|
|
288
|
+
): Promise<ProjectCinemaPlanV1 | null> {
|
|
289
|
+
RepositoryRelativePathSchema.parse(path);
|
|
290
|
+
let text: string;
|
|
291
|
+
try {
|
|
292
|
+
text = await fileSystem.readText(path);
|
|
293
|
+
} catch (error) {
|
|
294
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
|
|
295
|
+
throw error;
|
|
296
|
+
}
|
|
297
|
+
const input: unknown = JSON.parse(text);
|
|
298
|
+
return ProjectCinemaPlanV1Schema.parse(input);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export async function saveProjectCinemaPlan(
|
|
302
|
+
fileSystem: BundleFileSystem,
|
|
303
|
+
plan: ProjectCinemaPlanV1,
|
|
304
|
+
path = CURRENT_PROJECT_CINEMA_PLAN_PATH,
|
|
305
|
+
): Promise<void> {
|
|
306
|
+
RepositoryRelativePathSchema.parse(path);
|
|
307
|
+
const parsed = ProjectCinemaPlanV1Schema.parse(canonicalSlopcameraPersistenceDocument(
|
|
308
|
+
ProjectCinemaPlanV1Schema.parse(plan),
|
|
309
|
+
));
|
|
310
|
+
await fileSystem.writeTextAtomic(path, `${canonicalJson(parsed)}\n`);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** Publish one content-addressed cinema sidecar revision without replacement. */
|
|
314
|
+
export async function saveProjectCinemaRevision(
|
|
315
|
+
fileSystem: BundleFileSystem,
|
|
316
|
+
contents: string,
|
|
317
|
+
expectedArtifactSha256: string,
|
|
318
|
+
): Promise<string> {
|
|
319
|
+
const sha256 = Sha256Schema.parse(expectedArtifactSha256);
|
|
320
|
+
const actualSha256 = sha256Hex(contents);
|
|
321
|
+
if (actualSha256 !== sha256) {
|
|
322
|
+
throw new Error(
|
|
323
|
+
`Project cinema revision artifact hash mismatch: expected ${sha256}, received ${actualSha256}.`,
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
if (fileSystem.writeTextNoReplace === undefined) {
|
|
327
|
+
throw new Error("Bundle file system does not support immutable no-replace publication.");
|
|
328
|
+
}
|
|
329
|
+
const path = projectCinemaRevisionPath(sha256);
|
|
330
|
+
const disposition = await fileSystem.writeTextNoReplace(path, contents);
|
|
331
|
+
const installed = await fileSystem.readText(path);
|
|
332
|
+
if (installed !== contents) {
|
|
333
|
+
throw new Error(
|
|
334
|
+
disposition === "exists"
|
|
335
|
+
? `Project cinema revision path already contains different bytes: ${path}`
|
|
336
|
+
: `Published project cinema revision failed read-back verification: ${path}`,
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
return path;
|
|
340
|
+
}
|
|
341
|
+
|
|
267
342
|
export type AnalysisArtifact =
|
|
268
343
|
| AudioAlignmentAnalysisV1
|
|
269
344
|
| FaceAnalysisV1
|