@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.
Files changed (153) 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 +271 -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-grk47tgs.js +3 -0
  59. package/dist/index-gs48afpt.js +7 -0
  60. package/dist/index-qry58nj2.js +10 -0
  61. package/dist/index-zhg36tf9.js +3 -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/docs/studio.md +12 -0
  69. package/package.json +7 -5
  70. package/skills/slopcamera/SKILL.md +7 -1
  71. package/skills/slopcamera/references/directed-scenes.md +48 -2
  72. package/skills/slopcamera/references/gateway-media.md +15 -1
  73. package/skills/slopcamera/references/image-galleries.md +166 -0
  74. package/skills/slopcamera/references/install.md +1 -1
  75. package/skills/slopcamera/references/music-video.md +4 -0
  76. package/skills/slopcamera/references/native-studio.md +19 -0
  77. package/skills/slopcamera/references/parametric-design.md +14 -0
  78. package/skills/slopcamera/references/scene-building.md +172 -0
  79. package/skills/slopcamera/references/social-collage-banners.md +204 -0
  80. package/skills/slopcamera/references/workflows-sdk.md +3 -3
  81. package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
  82. package/src/capability-manifest.ts +361 -0
  83. package/src/cli.ts +222 -4
  84. package/src/code/canonical-json.ts +9 -0
  85. package/src/generate.ts +2 -2
  86. package/src/icon.ts +1111 -0
  87. package/src/image-gallery.ts +1049 -0
  88. package/src/index.ts +11 -0
  89. package/src/mcp/boundary.ts +11 -11
  90. package/src/mcp/index.ts +3 -0
  91. package/src/mcp/server.ts +2 -1
  92. package/src/mcp/tools.ts +1649 -132
  93. package/src/mcp/types.ts +19 -0
  94. package/src/operations.ts +412 -0
  95. package/src/portable-capability-manifest.ts +67 -0
  96. package/src/scene-gallery.ts +184 -0
  97. package/src/spatial-scene/asset-admission.ts +183 -0
  98. package/src/spatial-scene/audit-rendered.ts +692 -0
  99. package/src/spatial-scene/audit.ts +617 -0
  100. package/src/spatial-scene/behavior-audit.ts +252 -0
  101. package/src/spatial-scene/behavior-bake.ts +232 -0
  102. package/src/spatial-scene/behavior-fns.ts +585 -0
  103. package/src/spatial-scene/behavior-gallery.ts +108 -0
  104. package/src/spatial-scene/behavior-stdlib.ts +323 -0
  105. package/src/spatial-scene/behavior-trace.ts +325 -0
  106. package/src/spatial-scene/behavior.ts +617 -0
  107. package/src/spatial-scene/build.ts +632 -0
  108. package/src/spatial-scene/camera-rig.ts +125 -0
  109. package/src/spatial-scene/camera-track.ts +4 -2
  110. package/src/spatial-scene/character.ts +124 -0
  111. package/src/spatial-scene/contracts.ts +75 -7
  112. package/src/spatial-scene/design-templates.ts +351 -0
  113. package/src/spatial-scene/design.ts +327 -0
  114. package/src/spatial-scene/direction-compile.ts +584 -0
  115. package/src/spatial-scene/direction.ts +122 -0
  116. package/src/spatial-scene/effects.ts +149 -0
  117. package/src/spatial-scene/evaluate.ts +109 -29
  118. package/src/spatial-scene/gallery.ts +277 -0
  119. package/src/spatial-scene/generate.ts +239 -0
  120. package/src/spatial-scene/geometry-native.ts +165 -0
  121. package/src/spatial-scene/geometry.ts +1216 -0
  122. package/src/spatial-scene/gltf.ts +600 -77
  123. package/src/spatial-scene/identity.ts +55 -2
  124. package/src/spatial-scene/index.ts +36 -0
  125. package/src/spatial-scene/inspect.ts +35 -6
  126. package/src/spatial-scene/material-lighting.ts +609 -0
  127. package/src/spatial-scene/math.ts +21 -4
  128. package/src/spatial-scene/motion-evidence.ts +88 -0
  129. package/src/spatial-scene/parametric.ts +765 -0
  130. package/src/spatial-scene/particle-preparation.ts +183 -0
  131. package/src/spatial-scene/particle.ts +195 -0
  132. package/src/spatial-scene/patch.ts +109 -15
  133. package/src/spatial-scene/performance.ts +1613 -0
  134. package/src/spatial-scene/probe.ts +137 -0
  135. package/src/spatial-scene/recipe-pack.ts +86 -0
  136. package/src/spatial-scene/render-effects.ts +240 -0
  137. package/src/spatial-scene/review.ts +639 -0
  138. package/src/spatial-scene/simulation-bake.ts +206 -0
  139. package/src/spatial-scene/simulation.ts +187 -0
  140. package/src/spatial-scene/solve.ts +366 -0
  141. package/src/spatial-scene/temporal-audit.ts +354 -0
  142. package/src/version.ts +1 -1
  143. package/dist/index-42zsesc1.js +0 -2257
  144. package/dist/index-7131pg1c.js +0 -1820
  145. package/dist/index-7308egqr.js +0 -48
  146. package/dist/index-8txs6fkn.js +0 -712
  147. package/dist/index-fava6pge.js +0 -192
  148. package/dist/index-h1k0fnjq.js +0 -2363
  149. package/dist/index-r7gdhmsp.js +0 -424
  150. package/dist/index-sh6xbav6.js +0 -1219
  151. package/dist/index-z1w83f81.js +0 -4
  152. package/dist/index-zfnddgay.js +0 -2029
  153. package/dist/skill-install-dh0ntqba.js +0 -10
package/src/index.ts CHANGED
@@ -9,6 +9,8 @@ import {
9
9
  generateSlopcameraImageFile,
10
10
  slopcameraGatewayCredentialStatus,
11
11
  } from "./generate.js"
12
+ import { generateSlopcameraIcon } from "./icon.js"
13
+ import { generateSlopcameraImageGallery } from "./image-gallery.js"
12
14
  import { builtInIcons } from "./icons.js"
13
15
  import {
14
16
  resolveDiagramSource,
@@ -59,6 +61,8 @@ export const slopcameraApi = Object.freeze({
59
61
  DiagramValidationError,
60
62
  generateSlopcameraImage,
61
63
  generateSlopcameraImageFile,
64
+ generateSlopcameraImageGallery,
65
+ generateSlopcameraIcon,
62
66
  slopcameraGatewayCredentialStatus,
63
67
  slopcameraMcpProtocolVersion,
64
68
  slopcameraMcpServerName,
@@ -103,6 +107,8 @@ export {
103
107
  DiagramValidationError,
104
108
  generateSlopcameraImage,
105
109
  generateSlopcameraImageFile,
110
+ generateSlopcameraImageGallery,
111
+ generateSlopcameraIcon,
106
112
  slopcameraGatewayCredentialStatus,
107
113
  slopcameraMcpProtocolVersion,
108
114
  slopcameraMcpServerName,
@@ -136,10 +142,15 @@ export {
136
142
  WorkspaceBoundaryError,
137
143
  executeSlopcameraOperation,
138
144
  }
145
+ export * from "./capability-manifest.js"
139
146
  export * from "./cloud-errors.js"
140
147
  export * from "./generate.js"
141
148
  export * from "./host-resources.js"
149
+ export * from "./icon.js"
150
+ export * from "./image-gallery.js"
142
151
  export * from "./operations.js"
152
+ export * from "./portable-capability-manifest.js"
153
+ export * from "./scene-gallery.js"
143
154
  export * from "./studio/index.js"
144
155
  export * from "./workflow.js"
145
156
  export type * from "./types.js"
@@ -102,7 +102,7 @@ function isConfined(rootDirectory: string, target: string): boolean {
102
102
  return fromRoot === "" || (!fromRoot.startsWith("..") && !isAbsolute(fromRoot))
103
103
  }
104
104
 
105
- async function readUtf8WithCap(filePath: string): Promise<string> {
105
+ async function readUtf8WithCap(filePath: string, sourceLabel: string): Promise<string> {
106
106
  let handle
107
107
  try {
108
108
  handle = await open(filePath, "r")
@@ -110,13 +110,13 @@ async function readUtf8WithCap(filePath: string): Promise<string> {
110
110
  if (!metadata.isFile()) {
111
111
  throw new WorkspaceBoundaryError(
112
112
  "SOURCE_NOT_FILE",
113
- "Diagram source must be a regular file.",
113
+ `${sourceLabel} must be a regular file.`,
114
114
  )
115
115
  }
116
116
  if (metadata.size > mcpSourceByteLimit) {
117
117
  throw new WorkspaceBoundaryError(
118
118
  "SOURCE_TOO_LARGE",
119
- `Diagram source exceeds the ${mcpSourceByteLimit}-byte limit.`,
119
+ `${sourceLabel} exceeds the ${mcpSourceByteLimit}-byte limit.`,
120
120
  )
121
121
  }
122
122
 
@@ -135,7 +135,7 @@ async function readUtf8WithCap(filePath: string): Promise<string> {
135
135
  if (bytesRead > mcpSourceByteLimit) {
136
136
  throw new WorkspaceBoundaryError(
137
137
  "SOURCE_TOO_LARGE",
138
- `Diagram source exceeds the ${mcpSourceByteLimit}-byte limit.`,
138
+ `${sourceLabel} exceeds the ${mcpSourceByteLimit}-byte limit.`,
139
139
  )
140
140
  }
141
141
  try {
@@ -145,16 +145,16 @@ async function readUtf8WithCap(filePath: string): Promise<string> {
145
145
  } catch {
146
146
  throw new WorkspaceBoundaryError(
147
147
  "SOURCE_ENCODING",
148
- "Diagram source must contain valid UTF-8.",
148
+ `${sourceLabel} must contain valid UTF-8.`,
149
149
  )
150
150
  }
151
151
  } catch (error) {
152
152
  if (error instanceof WorkspaceBoundaryError) throw error
153
153
  const code = filesystemCode(error)
154
154
  if (code === "ENOENT") {
155
- throw new WorkspaceBoundaryError("SOURCE_NOT_FOUND", "Diagram source does not exist.")
155
+ throw new WorkspaceBoundaryError("SOURCE_NOT_FOUND", `${sourceLabel} does not exist.`)
156
156
  }
157
- throw new WorkspaceBoundaryError("FILESYSTEM_ERROR", "Diagram source could not be read.")
157
+ throw new WorkspaceBoundaryError("FILESYSTEM_ERROR", `${sourceLabel} could not be read.`)
158
158
  } finally {
159
159
  await handle?.close()
160
160
  }
@@ -202,7 +202,7 @@ export class WorkspaceBoundary {
202
202
  return fromRoot === "" ? "." : fromRoot.split("\\").join("/")
203
203
  }
204
204
 
205
- async readSource(value: string): Promise<WorkspaceSource> {
205
+ async readSource(value: string, sourceLabel = "Diagram source"): Promise<WorkspaceSource> {
206
206
  const normalized = normalizeRelativePath(value, { allowRoot: false })
207
207
  const lexicalPath = resolve(this.rootDirectory, normalized.native)
208
208
  this.assertConfined(lexicalPath)
@@ -214,19 +214,19 @@ export class WorkspaceBoundary {
214
214
  if (filesystemCode(error) === "ENOENT") {
215
215
  throw new WorkspaceBoundaryError(
216
216
  "SOURCE_NOT_FOUND",
217
- "Diagram source does not exist.",
217
+ `${sourceLabel} does not exist.`,
218
218
  )
219
219
  }
220
220
  throw new WorkspaceBoundaryError(
221
221
  "FILESYSTEM_ERROR",
222
- "Diagram source could not be resolved.",
222
+ `${sourceLabel} could not be resolved.`,
223
223
  )
224
224
  }
225
225
  this.assertConfined(canonicalPath)
226
226
  return {
227
227
  absolutePath: canonicalPath,
228
228
  relativePath: this.toRelativePath(canonicalPath),
229
- text: await readUtf8WithCap(canonicalPath),
229
+ text: await readUtf8WithCap(canonicalPath, sourceLabel),
230
230
  }
231
231
  }
232
232
 
package/src/mcp/index.ts CHANGED
@@ -8,6 +8,9 @@ export {
8
8
  SlopcameraMcpToolRuntime,
9
9
  mcpMaximumEdges,
10
10
  mcpMaximumRenderedPixels,
11
+ mcpMaximumReturnedAuditSamples,
12
+ mcpMaximumReturnedDiffEntries,
13
+ mcpMaximumReturnedEntities,
11
14
  mcpMaximumReturnedFindings,
12
15
  mcpMaximumScale,
13
16
  mcpMaximumShapes,
package/src/mcp/server.ts CHANGED
@@ -144,7 +144,7 @@ class SlopcameraMcpSession {
144
144
  version: this.serverVersion,
145
145
  },
146
146
  instructions:
147
- "Use check_diagram/render_diagram or search_slopcamera followed by execute_slopcamera with an exact registry code and typed JSON. Local paths are root-relative; source code is never accepted or evaluated.",
147
+ "Use check_diagram/render_diagram, the read-only scene tools (check_scene, inspect_scene, audit_scene, diff_scenes, evaluate_scene), or search_slopcamera followed by execute_slopcamera with an exact registry code and typed JSON. Local paths are root-relative; source code is never accepted or evaluated.",
148
148
  })
149
149
  }
150
150
 
@@ -232,6 +232,7 @@ export async function runMcpServer(
232
232
  const runtime = await SlopcameraMcpToolRuntime.create(
233
233
  options.rootDirectory ?? process.cwd(),
234
234
  options.generateDependencies,
235
+ options.hostResourceCoordinator,
235
236
  )
236
237
  const session = new SlopcameraMcpSession(
237
238
  runtime,