@hraness/slopcamera 3.2.8 → 3.3.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.
Files changed (150) hide show
  1. package/README.md +29 -9
  2. package/apps/desktop/application/context.ts +6 -0
  3. package/apps/desktop/application/default-registry.ts +26 -0
  4. package/apps/desktop/application/operation.ts +14 -1
  5. package/apps/desktop/application/operations/index.ts +4 -0
  6. package/apps/desktop/application/operations/spatial-behavior.ts +151 -0
  7. package/apps/desktop/application/operations/spatial-direction.ts +222 -0
  8. package/apps/desktop/application/operations/spatial-rendered-audit.ts +174 -0
  9. package/apps/desktop/application/operations/spatial-review.ts +194 -0
  10. package/apps/desktop/application/operations/spatial-scene.ts +25 -1
  11. package/apps/desktop/application/registry.ts +2 -2
  12. package/apps/desktop/application/spatial-asset-admission.ts +201 -0
  13. package/apps/desktop/application/spatial-assets.ts +160 -31
  14. package/apps/desktop/application/spatial-render.ts +217 -20
  15. package/apps/desktop/application/spatial-rendered-audit.ts +273 -0
  16. package/apps/desktop/application/spatial-review.ts +361 -0
  17. package/apps/desktop/application/spatial-spz.ts +48 -3
  18. package/apps/desktop/application/spatial-world-import.ts +26 -5
  19. package/apps/desktop/application/spatial-world-metadata.ts +105 -0
  20. package/apps/desktop/cli/args.ts +514 -11
  21. package/apps/desktop/cli/capability-manifest.ts +374 -0
  22. package/apps/desktop/cli/cinema-renderer.ts +608 -0
  23. package/apps/desktop/cli/command-host-resources.ts +29 -1
  24. package/apps/desktop/cli/commands.ts +1188 -4
  25. package/apps/desktop/cli/gateway-review-provider.ts +334 -0
  26. package/apps/desktop/cli/help.ts +172 -6
  27. package/apps/desktop/cli/main.ts +3 -3
  28. package/apps/desktop/cli/portable-surface.ts +6 -1
  29. package/apps/desktop/cli/spatial-asset-service.ts +124 -0
  30. package/apps/desktop/cli/spatial-design-service.ts +237 -0
  31. package/apps/desktop/cli/spatial-generate-service.ts +370 -0
  32. package/apps/desktop/cli/spatial-scene-service.ts +268 -4
  33. package/apps/desktop/cli/workflow-code.ts +1 -1
  34. package/apps/desktop/code/semantic-builder.ts +24 -0
  35. package/apps/desktop/contracts/cinema.ts +736 -0
  36. package/apps/desktop/contracts/index.ts +1 -0
  37. package/apps/desktop/contracts/spatial-asset.ts +16 -0
  38. package/apps/desktop/contracts/spatial-world.ts +26 -3
  39. package/apps/desktop/core/cinema-plan.ts +1320 -0
  40. package/apps/desktop/core/index.ts +1 -0
  41. package/apps/desktop/core/storage.ts +75 -0
  42. package/apps/desktop/dist/cli/main.js +725 -273
  43. package/apps/desktop/html-overlay/spatial.ts +619 -57
  44. package/apps/desktop/workflows/cinematic-world.ts +127 -0
  45. package/apps/desktop/workflows/index.ts +6 -0
  46. package/dist/cli.js +25 -429
  47. package/dist/code/advanced.js +1 -269
  48. package/dist/code/index.js +16 -2239
  49. package/dist/generate.js +1 -23
  50. package/dist/host-resources.js +1 -25
  51. package/dist/index-0bbesn4m.js +35 -0
  52. package/dist/index-296qhpf2.js +3 -0
  53. package/dist/index-3cxf2c58.js +3 -0
  54. package/dist/index-77fjfg9f.js +3 -0
  55. package/dist/index-80a36bc0.js +3 -0
  56. package/dist/index-a3vvs3rf.js +3 -0
  57. package/dist/index-b3geqczn.js +5 -0
  58. package/dist/index-cgpkyjqa.js +3 -0
  59. package/dist/index-f0ptv8dm.js +7 -0
  60. package/dist/index-grk47tgs.js +3 -0
  61. package/dist/index-qry58nj2.js +10 -0
  62. package/dist/index.js +1 -226
  63. package/dist/operations.js +1 -28
  64. package/dist/skill-install-gx7afxsd.js +2 -0
  65. package/dist/vectorize/worker.js +1 -141
  66. package/dist/workflow.js +1 -15
  67. package/docs/README.md +5 -1
  68. package/package.json +7 -5
  69. package/skills/slopcamera/SKILL.md +6 -1
  70. package/skills/slopcamera/references/directed-scenes.md +22 -2
  71. package/skills/slopcamera/references/gateway-media.md +15 -1
  72. package/skills/slopcamera/references/image-galleries.md +166 -0
  73. package/skills/slopcamera/references/install.md +1 -1
  74. package/skills/slopcamera/references/parametric-design.md +14 -0
  75. package/skills/slopcamera/references/scene-building.md +32 -0
  76. package/skills/slopcamera/references/social-collage-banners.md +204 -0
  77. package/skills/slopcamera/references/workflows-sdk.md +3 -3
  78. package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
  79. package/src/capability-manifest.ts +361 -0
  80. package/src/cli.ts +222 -4
  81. package/src/code/canonical-json.ts +9 -0
  82. package/src/generate.ts +2 -2
  83. package/src/icon.ts +1111 -0
  84. package/src/image-gallery.ts +1049 -0
  85. package/src/index.ts +11 -0
  86. package/src/mcp/boundary.ts +11 -11
  87. package/src/mcp/index.ts +3 -0
  88. package/src/mcp/server.ts +2 -1
  89. package/src/mcp/tools.ts +1642 -130
  90. package/src/mcp/types.ts +19 -0
  91. package/src/operations.ts +412 -0
  92. package/src/portable-capability-manifest.ts +67 -0
  93. package/src/scene-gallery.ts +184 -0
  94. package/src/spatial-scene/asset-admission.ts +183 -0
  95. package/src/spatial-scene/audit-rendered.ts +692 -0
  96. package/src/spatial-scene/audit.ts +617 -0
  97. package/src/spatial-scene/behavior-audit.ts +252 -0
  98. package/src/spatial-scene/behavior-bake.ts +233 -0
  99. package/src/spatial-scene/behavior-fns.ts +585 -0
  100. package/src/spatial-scene/behavior-gallery.ts +109 -0
  101. package/src/spatial-scene/behavior-stdlib.ts +323 -0
  102. package/src/spatial-scene/behavior-trace.ts +325 -0
  103. package/src/spatial-scene/behavior.ts +618 -0
  104. package/src/spatial-scene/build.ts +632 -0
  105. package/src/spatial-scene/camera-rig.ts +125 -0
  106. package/src/spatial-scene/camera-track.ts +4 -2
  107. package/src/spatial-scene/character.ts +124 -0
  108. package/src/spatial-scene/contracts.ts +75 -7
  109. package/src/spatial-scene/design-templates.ts +351 -0
  110. package/src/spatial-scene/design.ts +327 -0
  111. package/src/spatial-scene/direction-compile.ts +584 -0
  112. package/src/spatial-scene/direction.ts +122 -0
  113. package/src/spatial-scene/effects.ts +149 -0
  114. package/src/spatial-scene/evaluate.ts +109 -29
  115. package/src/spatial-scene/gallery.ts +277 -0
  116. package/src/spatial-scene/generate.ts +239 -0
  117. package/src/spatial-scene/geometry-native.ts +165 -0
  118. package/src/spatial-scene/geometry.ts +1216 -0
  119. package/src/spatial-scene/gltf.ts +600 -77
  120. package/src/spatial-scene/identity.ts +55 -2
  121. package/src/spatial-scene/index.ts +36 -0
  122. package/src/spatial-scene/inspect.ts +35 -6
  123. package/src/spatial-scene/material-lighting.ts +609 -0
  124. package/src/spatial-scene/math.ts +21 -4
  125. package/src/spatial-scene/motion-evidence.ts +88 -0
  126. package/src/spatial-scene/parametric.ts +765 -0
  127. package/src/spatial-scene/particle-preparation.ts +183 -0
  128. package/src/spatial-scene/particle.ts +195 -0
  129. package/src/spatial-scene/patch.ts +109 -15
  130. package/src/spatial-scene/performance.ts +1613 -0
  131. package/src/spatial-scene/probe.ts +137 -0
  132. package/src/spatial-scene/recipe-pack.ts +86 -0
  133. package/src/spatial-scene/render-effects.ts +240 -0
  134. package/src/spatial-scene/review.ts +639 -0
  135. package/src/spatial-scene/simulation-bake.ts +206 -0
  136. package/src/spatial-scene/simulation.ts +187 -0
  137. package/src/spatial-scene/solve.ts +366 -0
  138. package/src/spatial-scene/temporal-audit.ts +354 -0
  139. package/src/version.ts +1 -1
  140. package/dist/index-42zsesc1.js +0 -2257
  141. package/dist/index-7131pg1c.js +0 -1820
  142. package/dist/index-7308egqr.js +0 -48
  143. package/dist/index-8txs6fkn.js +0 -712
  144. package/dist/index-fava6pge.js +0 -192
  145. package/dist/index-h1k0fnjq.js +0 -2363
  146. package/dist/index-r7gdhmsp.js +0 -424
  147. package/dist/index-sh6xbav6.js +0 -1219
  148. package/dist/index-z1w83f81.js +0 -4
  149. package/dist/index-zfnddgay.js +0 -2029
  150. package/dist/skill-install-dh0ntqba.js +0 -10
@@ -2,6 +2,7 @@ export * from "./auto-zoom";
2
2
  export * from "./audio-alignment";
3
3
  export * from "./alignment-apply";
4
4
  export * from "./canonical-json";
5
+ export * from "./cinema-plan";
5
6
  export * from "./emoji";
6
7
  export * from "./events";
7
8
  export * from "./face-framing";
@@ -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