@hraness/slopcamera 3.2.7 → 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 (188) hide show
  1. package/NOTICE.md +1 -7
  2. package/PRIVACY.md +16 -7
  3. package/README.md +65 -20
  4. package/apps/desktop/README.md +14 -130
  5. package/apps/desktop/application/context.ts +6 -9
  6. package/apps/desktop/application/default-registry.ts +26 -10
  7. package/apps/desktop/application/operation.ts +14 -5
  8. package/apps/desktop/application/operations/index.ts +4 -1
  9. package/apps/desktop/application/operations/spatial-behavior.ts +151 -0
  10. package/apps/desktop/application/operations/spatial-direction.ts +222 -0
  11. package/apps/desktop/application/operations/spatial-rendered-audit.ts +174 -0
  12. package/apps/desktop/application/operations/spatial-review.ts +194 -0
  13. package/apps/desktop/application/operations/spatial-scene.ts +25 -1
  14. package/apps/desktop/application/registry.ts +2 -2
  15. package/apps/desktop/application/spatial-asset-admission.ts +201 -0
  16. package/apps/desktop/application/spatial-assets.ts +160 -31
  17. package/apps/desktop/application/spatial-render.ts +217 -20
  18. package/apps/desktop/application/spatial-rendered-audit.ts +273 -0
  19. package/apps/desktop/application/spatial-review.ts +361 -0
  20. package/apps/desktop/application/spatial-spz.ts +48 -3
  21. package/apps/desktop/application/spatial-world-import.ts +26 -5
  22. package/apps/desktop/application/spatial-world-metadata.ts +105 -0
  23. package/apps/desktop/cli/args.ts +528 -97
  24. package/apps/desktop/cli/capability-manifest.ts +374 -0
  25. package/apps/desktop/cli/cinema-renderer.ts +608 -0
  26. package/apps/desktop/cli/command-host-resources.ts +31 -2
  27. package/apps/desktop/cli/commands.ts +1215 -70
  28. package/apps/desktop/cli/gateway-review-provider.ts +334 -0
  29. package/apps/desktop/cli/help.ts +183 -23
  30. package/apps/desktop/cli/html-scene.ts +139 -28
  31. package/apps/desktop/cli/io.ts +2 -1
  32. package/apps/desktop/cli/main.ts +26 -50
  33. package/apps/desktop/cli/menubar.ts +244 -0
  34. package/apps/desktop/cli/music-analysis-service.ts +61 -0
  35. package/apps/desktop/cli/portable-surface.ts +18 -5
  36. package/apps/desktop/cli/spatial-asset-service.ts +124 -0
  37. package/apps/desktop/cli/spatial-design-service.ts +237 -0
  38. package/apps/desktop/cli/spatial-generate-service.ts +370 -0
  39. package/apps/desktop/cli/spatial-scene-service.ts +268 -4
  40. package/apps/desktop/cli/workflow-code.ts +1 -1
  41. package/apps/desktop/code/application-node-planner.ts +0 -47
  42. package/apps/desktop/code/host-source-layout.ts +46 -0
  43. package/apps/desktop/code/public.ts +0 -1
  44. package/apps/desktop/code/runtime-identity.ts +50 -8
  45. package/apps/desktop/code/semantic-builder.ts +24 -43
  46. package/apps/desktop/code/source-bundle.ts +23 -6
  47. package/apps/desktop/code/source-typecheck.ts +131 -43
  48. package/apps/desktop/code/worker-client.ts +14 -2
  49. package/apps/desktop/contracts/cinema.ts +736 -0
  50. package/apps/desktop/contracts/index.ts +1 -0
  51. package/apps/desktop/contracts/spatial-asset.ts +16 -0
  52. package/apps/desktop/contracts/spatial-world.ts +26 -3
  53. package/apps/desktop/core/cinema-plan.ts +1320 -0
  54. package/apps/desktop/core/index.ts +1 -0
  55. package/apps/desktop/core/music-analysis.ts +124 -1
  56. package/apps/desktop/core/storage.ts +75 -0
  57. package/apps/desktop/dist/cli/main.js +737 -291
  58. package/apps/desktop/html-overlay/audio-reactivity.ts +127 -0
  59. package/apps/desktop/html-overlay/index.ts +9 -0
  60. package/apps/desktop/html-overlay/runtime.ts +2 -0
  61. package/apps/desktop/html-overlay/scene.ts +29 -0
  62. package/apps/desktop/html-overlay/spatial.ts +619 -57
  63. package/apps/desktop/workflows/cinematic-world.ts +127 -0
  64. package/apps/desktop/workflows/index.ts +6 -0
  65. package/dist/cli.js +32 -434
  66. package/dist/code/advanced.js +1 -269
  67. package/dist/code/index.js +16 -2239
  68. package/dist/generate.js +1 -23
  69. package/dist/host-resources.js +1 -25
  70. package/dist/index-0bbesn4m.js +35 -0
  71. package/dist/index-296qhpf2.js +3 -0
  72. package/dist/index-3cxf2c58.js +3 -0
  73. package/dist/index-77fjfg9f.js +3 -0
  74. package/dist/index-80a36bc0.js +3 -0
  75. package/dist/index-a3vvs3rf.js +3 -0
  76. package/dist/index-b3geqczn.js +5 -0
  77. package/dist/index-cgpkyjqa.js +3 -0
  78. package/dist/index-f0ptv8dm.js +7 -0
  79. package/dist/index-grk47tgs.js +3 -0
  80. package/dist/index-qry58nj2.js +10 -0
  81. package/dist/index.js +1 -240
  82. package/dist/operations.js +1 -28
  83. package/dist/skill-install-gx7afxsd.js +2 -0
  84. package/dist/vectorize/worker.js +1 -141
  85. package/dist/workflow.js +1 -15
  86. package/docs/README.md +5 -1
  87. package/docs/studio.md +1 -1
  88. package/package.json +11 -24
  89. package/skills/slopcamera/SKILL.md +14 -1
  90. package/skills/slopcamera/references/diagrams.md +5 -14
  91. package/skills/slopcamera/references/directed-scenes.md +22 -2
  92. package/skills/slopcamera/references/gateway-media.md +15 -1
  93. package/skills/slopcamera/references/image-galleries.md +166 -0
  94. package/skills/slopcamera/references/install.md +2 -2
  95. package/skills/slopcamera/references/music-video.md +23 -3
  96. package/skills/slopcamera/references/parametric-design.md +14 -0
  97. package/skills/slopcamera/references/reference-led-3d.md +1 -1
  98. package/skills/slopcamera/references/scene-building.md +32 -0
  99. package/skills/slopcamera/references/social-collage-banners.md +204 -0
  100. package/skills/slopcamera/references/support.md +25 -0
  101. package/skills/slopcamera/references/web-media-excerpts.md +120 -0
  102. package/skills/slopcamera/references/workflows-sdk.md +3 -3
  103. package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
  104. package/src/capability-manifest.ts +361 -0
  105. package/src/cli.ts +250 -102
  106. package/src/code/canonical-json.ts +9 -0
  107. package/src/generate.ts +2 -2
  108. package/src/icon.ts +1111 -0
  109. package/src/image-gallery.ts +1049 -0
  110. package/src/index.ts +11 -23
  111. package/src/mcp/boundary.ts +11 -11
  112. package/src/mcp/index.ts +3 -0
  113. package/src/mcp/server.ts +2 -1
  114. package/src/mcp/tools.ts +1642 -130
  115. package/src/mcp/types.ts +19 -0
  116. package/src/operations.ts +412 -0
  117. package/src/portable-capability-manifest.ts +67 -0
  118. package/src/scene-gallery.ts +184 -0
  119. package/src/spatial-scene/asset-admission.ts +183 -0
  120. package/src/spatial-scene/audit-rendered.ts +692 -0
  121. package/src/spatial-scene/audit.ts +617 -0
  122. package/src/spatial-scene/behavior-audit.ts +252 -0
  123. package/src/spatial-scene/behavior-bake.ts +233 -0
  124. package/src/spatial-scene/behavior-fns.ts +585 -0
  125. package/src/spatial-scene/behavior-gallery.ts +109 -0
  126. package/src/spatial-scene/behavior-stdlib.ts +323 -0
  127. package/src/spatial-scene/behavior-trace.ts +325 -0
  128. package/src/spatial-scene/behavior.ts +618 -0
  129. package/src/spatial-scene/build.ts +632 -0
  130. package/src/spatial-scene/camera-rig.ts +125 -0
  131. package/src/spatial-scene/camera-track.ts +4 -2
  132. package/src/spatial-scene/character.ts +124 -0
  133. package/src/spatial-scene/contracts.ts +75 -7
  134. package/src/spatial-scene/design-templates.ts +351 -0
  135. package/src/spatial-scene/design.ts +327 -0
  136. package/src/spatial-scene/direction-compile.ts +584 -0
  137. package/src/spatial-scene/direction.ts +122 -0
  138. package/src/spatial-scene/effects.ts +149 -0
  139. package/src/spatial-scene/evaluate.ts +109 -29
  140. package/src/spatial-scene/gallery.ts +277 -0
  141. package/src/spatial-scene/generate.ts +239 -0
  142. package/src/spatial-scene/geometry-native.ts +165 -0
  143. package/src/spatial-scene/geometry.ts +1216 -0
  144. package/src/spatial-scene/gltf.ts +600 -77
  145. package/src/spatial-scene/identity.ts +55 -2
  146. package/src/spatial-scene/index.ts +36 -0
  147. package/src/spatial-scene/inspect.ts +35 -6
  148. package/src/spatial-scene/material-lighting.ts +609 -0
  149. package/src/spatial-scene/math.ts +21 -4
  150. package/src/spatial-scene/motion-evidence.ts +88 -0
  151. package/src/spatial-scene/parametric.ts +765 -0
  152. package/src/spatial-scene/particle-preparation.ts +183 -0
  153. package/src/spatial-scene/particle.ts +195 -0
  154. package/src/spatial-scene/patch.ts +109 -15
  155. package/src/spatial-scene/performance.ts +1613 -0
  156. package/src/spatial-scene/probe.ts +137 -0
  157. package/src/spatial-scene/recipe-pack.ts +86 -0
  158. package/src/spatial-scene/render-effects.ts +240 -0
  159. package/src/spatial-scene/review.ts +639 -0
  160. package/src/spatial-scene/simulation-bake.ts +206 -0
  161. package/src/spatial-scene/simulation.ts +187 -0
  162. package/src/spatial-scene/solve.ts +366 -0
  163. package/src/spatial-scene/temporal-audit.ts +354 -0
  164. package/src/support-completion.ts +16 -0
  165. package/src/support.ts +42 -0
  166. package/src/version.ts +1 -1
  167. package/apps/desktop/application/operations/recording/index.ts +0 -5
  168. package/apps/desktop/application/operations/recording/pause.ts +0 -34
  169. package/apps/desktop/application/operations/recording/resume.ts +0 -34
  170. package/apps/desktop/application/operations/recording/shared.ts +0 -199
  171. package/apps/desktop/application/operations/recording/start.ts +0 -169
  172. package/apps/desktop/application/operations/recording/stop.ts +0 -34
  173. package/apps/desktop/capture/protocol.ts +0 -689
  174. package/apps/desktop/cli/capture-bundle.ts +0 -1117
  175. package/apps/desktop/cli/recording-controller.ts +0 -1567
  176. package/apps/desktop/cli/recording-daemon.ts +0 -931
  177. package/dist/index-42zsesc1.js +0 -2257
  178. package/dist/index-7308egqr.js +0 -48
  179. package/dist/index-8txs6fkn.js +0 -712
  180. package/dist/index-mcy8z0br.js +0 -192
  181. package/dist/index-p63wavx0.js +0 -2029
  182. package/dist/index-r7gdhmsp.js +0 -424
  183. package/dist/index-rvghzt7b.js +0 -2013
  184. package/dist/index-sh6xbav6.js +0 -1219
  185. package/dist/index-z1w83f81.js +0 -4
  186. package/dist/index-z7239b4h.js +0 -2363
  187. package/dist/skill-install-dh0ntqba.js +0 -10
  188. package/src/desktop.ts +0 -253
@@ -0,0 +1,127 @@
1
+ import { z } from "zod";
2
+
3
+ import {
4
+ spatialSceneSha256,
5
+ SpatialSceneV1Schema,
6
+ } from "../../../src/spatial-scene";
7
+ import { SpatialDirectionSchema } from "../../../src/spatial-scene/direction";
8
+ import { SpatialTemporalAuditOptionsSchema } from "../../../src/spatial-scene/temporal-audit";
9
+ import { SpatialRecipePackSchema } from "../../../src/spatial-scene/recipe-pack";
10
+ import { SpatialRenderRequestSchema, type SpatialRenderRequest } from "../application/spatial-render";
11
+ import type { SpatialEffectsPlanInput } from "../application/operations/spatial-direction";
12
+ import { MediaArtifactRequestSchema } from "../application/operations/media/shared";
13
+ import type { OperationInputValue } from "../code/contracts";
14
+ import { defineWorkflow } from "../code/public";
15
+
16
+ export const CinematicWorldInputSchema = z.strictObject({
17
+ /** The declarative pack an agent authors: direction, axes, previews, audit. */
18
+ pack: SpatialRecipePackSchema,
19
+ /** The admitted scene the pack binds by `sceneSha256`. */
20
+ scene: SpatialSceneV1Schema,
21
+ /** Repository artifact for the same scene, used only by render nodes. */
22
+ source: MediaArtifactRequestSchema,
23
+ }).superRefine((input, context) => {
24
+ if (input.pack.sceneSha256 !== spatialSceneSha256(input.scene)) {
25
+ context.addIssue({
26
+ code: "custom",
27
+ message: "Recipe pack sceneSha256 does not match the admitted scene.",
28
+ path: ["pack", "sceneSha256"],
29
+ });
30
+ }
31
+ input.pack.previews.forEach((preview, index) => {
32
+ const parsed = SpatialRenderRequestSchema.safeParse(preview.request);
33
+ if (!parsed.success) {
34
+ context.addIssue({
35
+ code: "custom",
36
+ message: `Preview ${preview.name} request is not a valid spatial render request.`,
37
+ path: ["pack", "previews", index, "request"],
38
+ });
39
+ }
40
+ });
41
+ });
42
+
43
+ /**
44
+ * The complete agent-directed planning and review loop for one admitted scene:
45
+ * inspect the world, check and compile the authored direction, plan a bounded
46
+ * gallery per requested axis, optionally bind declared effects into each
47
+ * preview render, and audit sampled temporal evidence. Every proposal stays
48
+ * `verified: false`; selection and promotion are separate explicit operations
49
+ * outside this workflow.
50
+ */
51
+ export const cinematicWorld = defineWorkflow({
52
+ id: "cinematic-world",
53
+ inputSchema: CinematicWorldInputSchema,
54
+ inputSchemaId: "slopcamera.workflow.cinematic-world.input/v1",
55
+ version: 1,
56
+ build(workflow, input) {
57
+ const sceneSha256 = input.pack.sceneSha256;
58
+ /** Parsed documents enter operation input positions unchanged; refs may substitute any position. */
59
+ const scene = input.scene as unknown as OperationInputValue<z.infer<typeof SpatialSceneV1Schema>>;
60
+ const direction = input.pack.direction as unknown as OperationInputValue<z.infer<typeof SpatialDirectionSchema>>;
61
+ const planning = workflow.namespace("planning");
62
+ const inspect = planning.scene.inspect("inspect", { scene });
63
+ const directionCheck = planning.scene.directionCheck("direction-check", {
64
+ direction,
65
+ scene,
66
+ });
67
+ const compilation = planning.scene.directionCompile("direction-compile", {
68
+ direction,
69
+ scene,
70
+ ...(input.pack.cameraId === undefined ? {} : { cameraId: input.pack.cameraId }),
71
+ });
72
+ const galleries = workflow.namespace("galleries");
73
+ const gallery = Object.fromEntries(input.pack.axes.map(axis => [axis, galleries.scene.directionGallery(axis, {
74
+ axis,
75
+ direction,
76
+ scene,
77
+ ...(input.pack.cameraId === undefined ? {} : { cameraId: input.pack.cameraId }),
78
+ })]));
79
+ const audit = input.pack.temporalAudit === undefined || input.pack.cameraId === undefined
80
+ ? undefined
81
+ : planning.scene.temporalAudit("temporal-audit", {
82
+ cameraId: input.pack.cameraId,
83
+ options: {
84
+ contacts: input.pack.temporalAudit.contacts,
85
+ cutBeforeUs: input.pack.temporalAudit.cutBeforeUs,
86
+ } as unknown as OperationInputValue<z.infer<typeof SpatialTemporalAuditOptionsSchema>>,
87
+ scene,
88
+ ...(input.pack.temporalAudit.timesUs === undefined
89
+ ? {} : { timesUs: input.pack.temporalAudit.timesUs }),
90
+ });
91
+ const previews = workflow.namespace("previews");
92
+ const renders = input.pack.previews.map(preview => {
93
+ const request = SpatialRenderRequestSchema.parse(preview.request) as unknown as OperationInputValue<SpatialRenderRequest>;
94
+ const branch = previews.namespace(preview.name);
95
+ const effects = input.pack.effects === undefined ? undefined : branch.scene.effectsPlan("effects", {
96
+ particleSystems: input.pack.effects.particleSystems,
97
+ renderPlan: input.pack.effects.renderPlan,
98
+ scene,
99
+ simulationBakes: input.pack.effects.simulationBakes,
100
+ } as unknown as OperationInputValue<SpatialEffectsPlanInput>);
101
+ const render = branch.scene.render("render", {
102
+ request: {
103
+ ...request,
104
+ ...(effects === undefined ? {} : { effects }),
105
+ },
106
+ sceneSha256,
107
+ source: input.source,
108
+ });
109
+ return {
110
+ effects,
111
+ name: preview.name,
112
+ render,
113
+ };
114
+ });
115
+ return {
116
+ compilation,
117
+ directionCheck,
118
+ galleries: gallery,
119
+ inspect,
120
+ previews: Object.fromEntries(renders.map(candidate => [candidate.name, {
121
+ ...(candidate.effects === undefined ? {} : { effects: candidate.effects }),
122
+ render: candidate.render,
123
+ }])),
124
+ ...(audit === undefined ? {} : { temporalAudit: audit }),
125
+ };
126
+ },
127
+ });
@@ -8,6 +8,7 @@ import {
8
8
  } from "../code/define-workflow";
9
9
  import type { WorkflowOutputValue } from "../code/contracts";
10
10
  import { chapteredDemo } from "./chaptered-demo";
11
+ import { cinematicWorld } from "./cinematic-world";
11
12
  import { directedScene } from "./scene-direction";
12
13
  import { creativeIteration } from "./creative-iteration";
13
14
  import { creativeSelection } from "./creative-selection";
@@ -52,6 +53,10 @@ export const BUILT_IN_WORKFLOWS: readonly BuiltInWorkflow[] = Object.freeze([
52
53
  description: "Render a prepared immutable spatial scene composition with exact frame timing and retained project audio.",
53
54
  title: "Directed scene",
54
55
  }),
56
+ catalogEntry(cinematicWorld, {
57
+ description: "Compile authored direction for one admitted scene into proposals, bounded galleries, effect-bound previews, and a temporal audit — selection and promotion stay explicit.",
58
+ title: "Cinematic world",
59
+ }),
55
60
  catalogEntry(chapteredDemo, {
56
61
  description: "Freeze the current chapter, overlay, and media composition and render an exact video.",
57
62
  title: "Chaptered demo",
@@ -84,6 +89,7 @@ export function builtInWorkflow(id: string): BuiltInWorkflow | undefined {
84
89
 
85
90
  export {
86
91
  chapteredDemo,
92
+ cinematicWorld,
87
93
  directedScene,
88
94
  creativeIteration,
89
95
  creativeSelection,