@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.
- package/NOTICE.md +1 -7
- package/PRIVACY.md +16 -7
- package/README.md +65 -20
- package/apps/desktop/README.md +14 -130
- package/apps/desktop/application/context.ts +6 -9
- package/apps/desktop/application/default-registry.ts +26 -10
- package/apps/desktop/application/operation.ts +14 -5
- package/apps/desktop/application/operations/index.ts +4 -1
- 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 +528 -97
- 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 +31 -2
- package/apps/desktop/cli/commands.ts +1215 -70
- package/apps/desktop/cli/gateway-review-provider.ts +334 -0
- package/apps/desktop/cli/help.ts +183 -23
- package/apps/desktop/cli/html-scene.ts +139 -28
- package/apps/desktop/cli/io.ts +2 -1
- package/apps/desktop/cli/main.ts +26 -50
- package/apps/desktop/cli/menubar.ts +244 -0
- package/apps/desktop/cli/music-analysis-service.ts +61 -0
- package/apps/desktop/cli/portable-surface.ts +18 -5
- 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 +268 -4
- package/apps/desktop/cli/workflow-code.ts +1 -1
- package/apps/desktop/code/application-node-planner.ts +0 -47
- package/apps/desktop/code/host-source-layout.ts +46 -0
- package/apps/desktop/code/public.ts +0 -1
- package/apps/desktop/code/runtime-identity.ts +50 -8
- package/apps/desktop/code/semantic-builder.ts +24 -43
- package/apps/desktop/code/source-bundle.ts +23 -6
- package/apps/desktop/code/source-typecheck.ts +131 -43
- package/apps/desktop/code/worker-client.ts +14 -2
- 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/music-analysis.ts +124 -1
- package/apps/desktop/core/storage.ts +75 -0
- package/apps/desktop/dist/cli/main.js +737 -291
- package/apps/desktop/html-overlay/audio-reactivity.ts +127 -0
- package/apps/desktop/html-overlay/index.ts +9 -0
- package/apps/desktop/html-overlay/runtime.ts +2 -0
- package/apps/desktop/html-overlay/scene.ts +29 -0
- 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 +32 -434
- 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-cgpkyjqa.js +3 -0
- package/dist/index-f0ptv8dm.js +7 -0
- package/dist/index-grk47tgs.js +3 -0
- package/dist/index-qry58nj2.js +10 -0
- package/dist/index.js +1 -240
- 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 +1 -1
- package/package.json +11 -24
- package/skills/slopcamera/SKILL.md +14 -1
- package/skills/slopcamera/references/diagrams.md +5 -14
- package/skills/slopcamera/references/directed-scenes.md +22 -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 +2 -2
- package/skills/slopcamera/references/music-video.md +23 -3
- package/skills/slopcamera/references/parametric-design.md +14 -0
- package/skills/slopcamera/references/reference-led-3d.md +1 -1
- package/skills/slopcamera/references/scene-building.md +32 -0
- package/skills/slopcamera/references/social-collage-banners.md +204 -0
- package/skills/slopcamera/references/support.md +25 -0
- package/skills/slopcamera/references/web-media-excerpts.md +120 -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 +250 -102
- 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 -23
- 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 +1642 -130
- 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 +233 -0
- package/src/spatial-scene/behavior-fns.ts +585 -0
- package/src/spatial-scene/behavior-gallery.ts +109 -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 +618 -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/support-completion.ts +16 -0
- package/src/support.ts +42 -0
- package/src/version.ts +1 -1
- package/apps/desktop/application/operations/recording/index.ts +0 -5
- package/apps/desktop/application/operations/recording/pause.ts +0 -34
- package/apps/desktop/application/operations/recording/resume.ts +0 -34
- package/apps/desktop/application/operations/recording/shared.ts +0 -199
- package/apps/desktop/application/operations/recording/start.ts +0 -169
- package/apps/desktop/application/operations/recording/stop.ts +0 -34
- package/apps/desktop/capture/protocol.ts +0 -689
- package/apps/desktop/cli/capture-bundle.ts +0 -1117
- package/apps/desktop/cli/recording-controller.ts +0 -1567
- package/apps/desktop/cli/recording-daemon.ts +0 -931
- package/dist/index-42zsesc1.js +0 -2257
- package/dist/index-7308egqr.js +0 -48
- package/dist/index-8txs6fkn.js +0 -712
- package/dist/index-mcy8z0br.js +0 -192
- package/dist/index-p63wavx0.js +0 -2029
- package/dist/index-r7gdhmsp.js +0 -424
- package/dist/index-rvghzt7b.js +0 -2013
- package/dist/index-sh6xbav6.js +0 -1219
- package/dist/index-z1w83f81.js +0 -4
- package/dist/index-z7239b4h.js +0 -2363
- package/dist/skill-install-dh0ntqba.js +0 -10
- package/src/desktop.ts +0 -253
package/dist/index-mcy8z0br.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
executeSlopcameraOperationWithLease,
|
|
4
|
-
isSlopcameraOperationCode,
|
|
5
|
-
parseSlopcameraOperationInput,
|
|
6
|
-
slopcameraOperationHostResourceClaims
|
|
7
|
-
} from "./index-z7239b4h.js";
|
|
8
|
-
import {
|
|
9
|
-
createDefaultHostResourceCoordinator
|
|
10
|
-
} from "./index-sh6xbav6.js";
|
|
11
|
-
|
|
12
|
-
// src/workflow.ts
|
|
13
|
-
var workflowIdPattern = /^[a-z0-9]+(?:[._-][a-z0-9]+)*$/u;
|
|
14
|
-
var workflowStepIdPattern = /^[A-Za-z0-9]+(?:[._:-][A-Za-z0-9]+)*$/u;
|
|
15
|
-
var defaultMaximumSteps = 64;
|
|
16
|
-
var hardMaximumSteps = 256;
|
|
17
|
-
|
|
18
|
-
class SlopcameraWorkflowError extends Error {
|
|
19
|
-
code;
|
|
20
|
-
completedSteps;
|
|
21
|
-
failedStep;
|
|
22
|
-
constructor(code, message, options = {}) {
|
|
23
|
-
super(`[${code}] ${message}`, { cause: options.cause });
|
|
24
|
-
this.name = "SlopcameraWorkflowError";
|
|
25
|
-
this.code = code;
|
|
26
|
-
this.completedSteps = Object.freeze([...options.completedSteps ?? []].sort((left, right) => left.index - right.index));
|
|
27
|
-
if (options.failedStep !== undefined) {
|
|
28
|
-
this.failedStep = Object.freeze({ ...options.failedStep });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function workflowError(code, message) {
|
|
33
|
-
throw new SlopcameraWorkflowError(code, message);
|
|
34
|
-
}
|
|
35
|
-
function validateWorkflowId(id) {
|
|
36
|
-
if (typeof id !== "string" || id.length < 1 || id.length > 80 || !workflowIdPattern.test(id)) {
|
|
37
|
-
workflowError("INVALID_WORKFLOW", "Workflow id must be 1 through 80 lowercase letters, numbers, dots, underscores, or hyphens.");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function validateStepId(id, completedSteps = []) {
|
|
41
|
-
if (typeof id !== "string" || id.length < 1 || id.length > 80 || !workflowStepIdPattern.test(id)) {
|
|
42
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", "Step id must be 1 through 80 letters, numbers, dots, underscores, colons, or hyphens.", { completedSteps });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function defineSlopcameraWorkflow(options) {
|
|
46
|
-
if (typeof options !== "object" || options === null) {
|
|
47
|
-
workflowError("INVALID_WORKFLOW", "Workflow definition must be an object.");
|
|
48
|
-
}
|
|
49
|
-
validateWorkflowId(options.id);
|
|
50
|
-
if (!Number.isSafeInteger(options.version) || options.version < 1) {
|
|
51
|
-
workflowError("INVALID_WORKFLOW", "Workflow version must be a positive safe integer.");
|
|
52
|
-
}
|
|
53
|
-
if (typeof options.parseInput !== "function" || typeof options.run !== "function") {
|
|
54
|
-
workflowError("INVALID_WORKFLOW", "Workflow definition requires parseInput and run functions.");
|
|
55
|
-
}
|
|
56
|
-
return Object.freeze({
|
|
57
|
-
id: options.id,
|
|
58
|
-
version: options.version,
|
|
59
|
-
parseInput: options.parseInput,
|
|
60
|
-
run: options.run
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function maximumSteps(value) {
|
|
64
|
-
const resolved = value ?? defaultMaximumSteps;
|
|
65
|
-
if (!Number.isSafeInteger(resolved) || resolved < 1 || resolved > hardMaximumSteps) {
|
|
66
|
-
workflowError("INVALID_WORKFLOW", `maximumSteps must be an integer from 1 through ${hardMaximumSteps}.`);
|
|
67
|
-
}
|
|
68
|
-
return resolved;
|
|
69
|
-
}
|
|
70
|
-
function aborted(completedSteps, cause) {
|
|
71
|
-
return new SlopcameraWorkflowError("WORKFLOW_ABORTED", "Workflow execution was aborted.", { cause, completedSteps });
|
|
72
|
-
}
|
|
73
|
-
async function runSlopcameraWorkflow(definition, value, options = {}) {
|
|
74
|
-
const normalized = defineSlopcameraWorkflow(definition);
|
|
75
|
-
const limit = maximumSteps(options.maximumSteps);
|
|
76
|
-
const signal = options.signal ?? options.dependencies?.signal ?? new AbortController().signal;
|
|
77
|
-
const invoked = new Set;
|
|
78
|
-
const completed = [];
|
|
79
|
-
const dispatched = [];
|
|
80
|
-
let acceptingOperations = true;
|
|
81
|
-
let nextIndex = 0;
|
|
82
|
-
if (signal.aborted)
|
|
83
|
-
throw aborted(completed);
|
|
84
|
-
let input;
|
|
85
|
-
try {
|
|
86
|
-
input = normalized.parseInput(value);
|
|
87
|
-
} catch (cause) {
|
|
88
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_INPUT", "Workflow input did not satisfy its parser.", { cause });
|
|
89
|
-
}
|
|
90
|
-
const executor = options.executor ?? ((code, operationInput, context2) => executeSlopcameraOperationWithLease(code, operationInput, context2.hostResourceLease, options.dependencies));
|
|
91
|
-
const hostResourceCoordinator = options.hostResourceCoordinator ?? options.dependencies?.hostResourceCoordinator ?? createDefaultHostResourceCoordinator();
|
|
92
|
-
const waitTimeoutMilliseconds = options.waitTimeoutMilliseconds ?? options.dependencies?.waitTimeoutMilliseconds;
|
|
93
|
-
async function dispatchOperation(id, code, operationInput) {
|
|
94
|
-
if (signal.aborted)
|
|
95
|
-
throw aborted(completed);
|
|
96
|
-
validateStepId(id, completed);
|
|
97
|
-
if (!isSlopcameraOperationCode(code)) {
|
|
98
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", `Workflow step ${id} names an unknown Slopcamera operation.`, { completedSteps: completed });
|
|
99
|
-
}
|
|
100
|
-
if (invoked.has(id)) {
|
|
101
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", `Duplicate workflow step id: ${id}.`, { completedSteps: completed });
|
|
102
|
-
}
|
|
103
|
-
if (nextIndex >= limit) {
|
|
104
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", `Workflow exceeds its ${String(limit)}-step limit.`, { completedSteps: completed });
|
|
105
|
-
}
|
|
106
|
-
const index = nextIndex;
|
|
107
|
-
nextIndex += 1;
|
|
108
|
-
invoked.add(id);
|
|
109
|
-
let normalizedInput;
|
|
110
|
-
try {
|
|
111
|
-
normalizedInput = parseSlopcameraOperationInput(code, operationInput);
|
|
112
|
-
} catch (cause) {
|
|
113
|
-
throw new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", `Workflow step ${id} has invalid input for ${code}.`, { cause, completedSteps: completed });
|
|
114
|
-
}
|
|
115
|
-
try {
|
|
116
|
-
const result = await hostResourceCoordinator.withLease(slopcameraOperationHostResourceClaims(code), async (hostResourceLease) => await executor(code, normalizedInput, {
|
|
117
|
-
hostResourceLease,
|
|
118
|
-
signal,
|
|
119
|
-
stepId: id
|
|
120
|
-
}), {
|
|
121
|
-
signal,
|
|
122
|
-
...waitTimeoutMilliseconds === undefined ? {} : { waitTimeoutMilliseconds }
|
|
123
|
-
});
|
|
124
|
-
completed.push(Object.freeze({ id, index, operation: code }));
|
|
125
|
-
if (signal.aborted)
|
|
126
|
-
throw aborted(completed);
|
|
127
|
-
return result;
|
|
128
|
-
} catch (cause) {
|
|
129
|
-
if (cause instanceof SlopcameraWorkflowError && cause.code === "WORKFLOW_ABORTED") {
|
|
130
|
-
throw cause;
|
|
131
|
-
}
|
|
132
|
-
if (signal.aborted)
|
|
133
|
-
throw aborted(completed, cause);
|
|
134
|
-
throw new SlopcameraWorkflowError("WORKFLOW_STEP_FAILED", `Workflow step ${id} (${code}) failed.`, {
|
|
135
|
-
cause,
|
|
136
|
-
completedSteps: completed,
|
|
137
|
-
failedStep: { id, operation: code }
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
const context = Object.freeze({
|
|
142
|
-
signal,
|
|
143
|
-
operation(id, code, operationInput) {
|
|
144
|
-
if (!acceptingOperations) {
|
|
145
|
-
const closed = Promise.reject(new SlopcameraWorkflowError("INVALID_WORKFLOW_STEP", "Workflow operations cannot start after authored workflow code has settled.", { completedSteps: completed }));
|
|
146
|
-
closed.catch(() => {
|
|
147
|
-
return;
|
|
148
|
-
});
|
|
149
|
-
return closed;
|
|
150
|
-
}
|
|
151
|
-
const operation = dispatchOperation(id, code, operationInput);
|
|
152
|
-
dispatched.push(operation);
|
|
153
|
-
operation.catch(() => {
|
|
154
|
-
return;
|
|
155
|
-
});
|
|
156
|
-
return operation;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
let output;
|
|
160
|
-
let runFailed = false;
|
|
161
|
-
let runFailure;
|
|
162
|
-
try {
|
|
163
|
-
output = await normalized.run(context, input);
|
|
164
|
-
} catch (cause) {
|
|
165
|
-
runFailed = true;
|
|
166
|
-
runFailure = cause;
|
|
167
|
-
} finally {
|
|
168
|
-
acceptingOperations = false;
|
|
169
|
-
}
|
|
170
|
-
const operationResults = await Promise.allSettled(dispatched);
|
|
171
|
-
if (signal.aborted)
|
|
172
|
-
throw aborted(completed, runFailed ? runFailure : undefined);
|
|
173
|
-
if (runFailed) {
|
|
174
|
-
if (runFailure instanceof SlopcameraWorkflowError)
|
|
175
|
-
throw runFailure;
|
|
176
|
-
throw new SlopcameraWorkflowError("WORKFLOW_FAILED", `Workflow ${normalized.id} failed in authored code.`, { cause: runFailure, completedSteps: completed });
|
|
177
|
-
}
|
|
178
|
-
const operationFailure = operationResults.find((result) => result.status === "rejected");
|
|
179
|
-
if (operationFailure !== undefined) {
|
|
180
|
-
const cause = operationFailure.reason;
|
|
181
|
-
if (cause instanceof SlopcameraWorkflowError)
|
|
182
|
-
throw cause;
|
|
183
|
-
throw new SlopcameraWorkflowError("WORKFLOW_STEP_FAILED", "A dispatched workflow operation failed.", { cause, completedSteps: completed });
|
|
184
|
-
}
|
|
185
|
-
return Object.freeze({
|
|
186
|
-
workflow: Object.freeze({ id: normalized.id, version: normalized.version }),
|
|
187
|
-
output,
|
|
188
|
-
steps: Object.freeze([...completed].sort((left, right) => left.index - right.index))
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export { SlopcameraWorkflowError, defineSlopcameraWorkflow, runSlopcameraWorkflow };
|