@assemblyline-agents/remotion 2.0.0 → 3.1.0
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/LICENSE +1 -1
- package/README.md +15 -16
- package/dist/index.d.ts +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +221 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
- package/dist/mcp-server.d.ts +0 -2
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -219
- package/dist/mcp-server.js.map +0 -1
- package/dist/process.d.ts +0 -9
- package/dist/process.d.ts.map +0 -1
- package/dist/process.js +0 -43
- package/dist/process.js.map +0 -1
- package/dist/workspace.d.ts +0 -10
- package/dist/workspace.d.ts.map +0 -1
- package/dist/workspace.js +0 -51
- package/dist/workspace.js.map +0 -1
- package/skills/remotion/SKILL.md +0 -30
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# @assemblyline-agents/remotion
|
|
2
2
|
|
|
3
|
-
Official Assembly Line
|
|
3
|
+
Official Assembly Line sandbox CLI connection for a Remotion project.
|
|
4
4
|
|
|
5
|
-
This package
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
the CLI.
|
|
5
|
+
This package invokes Remotion's supported CLI inside the active run sandbox.
|
|
6
|
+
Project entry points never execute in the gateway process and do not inherit
|
|
7
|
+
gateway credentials. It does not use `@remotion/mcp`.
|
|
9
8
|
|
|
10
9
|
## Setup
|
|
11
10
|
|
|
@@ -16,26 +15,26 @@ npm install remotion @remotion/cli
|
|
|
16
15
|
assembly-line add remotion agent
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
Point the connection at the project when it is not the agent root
|
|
18
|
+
Point the connection at the project when it is not the agent root. The reviewed
|
|
19
|
+
operations run without requiring an approval surface:
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
22
|
import { defineRemotionConnection } from "@assemblyline-agents/remotion";
|
|
23
23
|
|
|
24
24
|
export default defineRemotionConnection({
|
|
25
|
-
|
|
26
|
-
entryPoint: "src/index.ts"
|
|
27
|
-
access: {
|
|
28
|
-
read: true,
|
|
29
|
-
write: { approval: "always" }
|
|
30
|
-
}
|
|
25
|
+
projectPath: "/workspace/video",
|
|
26
|
+
entryPoint: "src/index.ts"
|
|
31
27
|
});
|
|
32
28
|
```
|
|
33
29
|
|
|
30
|
+
Set `access: "approval-required"` if renders should pause for approval.
|
|
31
|
+
|
|
34
32
|
`list_compositions` and `check_versions` are read operations. `render_video`
|
|
35
|
-
and `render_still` require write authority because they create files.
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
and `render_still` require write authority because they create files. All four
|
|
34
|
+
commands run in the sandbox; this matters because listing compositions loads
|
|
35
|
+
project JavaScript. Entry points, props, output paths, codecs, and render limits
|
|
36
|
+
are typed, and project/output paths cannot escape `projectPath`.
|
|
38
37
|
|
|
39
38
|
The default CLI invocation is `npx --no-install remotion`. A deployment owner
|
|
40
|
-
can set `remotionCommand` and `remotionArgs` to another trusted
|
|
39
|
+
can set `remotionCommand` and `remotionArgs` to another trusted sandbox-local
|
|
41
40
|
launcher. Models and runtime-created connections cannot change the executable.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface RemotionConnectionOptions
|
|
3
|
-
/**
|
|
4
|
-
projectRoot?: string;
|
|
5
|
-
/** Trusted executable used to invoke the Remotion CLI. Defaults to `npx`. */
|
|
1
|
+
import { type ConnectionDefinition, type ConnectionPluginAccessSelection } from "@assemblyline-agents/core";
|
|
2
|
+
export interface RemotionConnectionOptions {
|
|
3
|
+
/** Executable available inside the sandbox. Defaults to `npx`. */
|
|
6
4
|
remotionCommand?: string;
|
|
7
5
|
/** Trusted arguments before the Remotion subcommand. Defaults to `--no-install remotion`. */
|
|
8
6
|
remotionArgs?: string[];
|
|
9
|
-
/**
|
|
7
|
+
/** Remotion project directory inside `/workspace`. Defaults to `/workspace`. */
|
|
8
|
+
projectPath?: string;
|
|
9
|
+
/** Optional entry point relative to projectPath. */
|
|
10
10
|
entryPoint?: string;
|
|
11
|
+
access?: ConnectionPluginAccessSelection;
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
maxOutputChars?: number;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
subject?: ConnectionDefinition["subject"];
|
|
11
16
|
}
|
|
12
|
-
export declare function defineRemotionConnection(options: RemotionConnectionOptions): import("@assemblyline-agents/core").
|
|
17
|
+
export declare function defineRemotionConnection(options: RemotionConnectionOptions): import("@assemblyline-agents/core").SandboxCliConnectionDefinition;
|
|
13
18
|
export declare const assemblyLinePlugin: import("@assemblyline-agents/core").PluginModule;
|
|
14
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EAKrC,MAAM,2BAA2B,CAAC;AAOnC,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,+BAA+B,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,sEAsB1E;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,227 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { connectionPluginMetadata, definePlugin, defineStdioMcpPluginConnection } from "@assemblyline-agents/core";
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
import { connectionPluginMetadata, definePlugin, defineSandboxCliPluginConnection } from "@assemblyline-agents/core";
|
|
4
3
|
const PLUGIN = connectionPluginMetadata("remotion");
|
|
5
|
-
const
|
|
4
|
+
const DEFAULT_TIMEOUT_MS = 30 * 60_000;
|
|
5
|
+
const DEFAULT_MAX_OUTPUT_CHARS = 256_000;
|
|
6
|
+
const MAX_PROPS_BYTES = 1024 * 1024;
|
|
6
7
|
export function defineRemotionConnection(options) {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
const command = options.remotionCommand ?? "npx";
|
|
9
|
+
const commandArgs = validatedCommandArgs(options.remotionArgs ?? ["--no-install", "remotion"]);
|
|
10
|
+
const projectPath = sandboxProjectPath(options.projectPath ?? "/workspace");
|
|
11
|
+
const defaultEntryPoint = options.entryPoint === undefined
|
|
12
|
+
? undefined
|
|
13
|
+
: projectRelativePath(options.entryPoint, "entryPoint");
|
|
14
|
+
const timeoutMs = positiveInteger(options.timeoutMs ?? DEFAULT_TIMEOUT_MS, "timeoutMs", 1_000, 24 * 60 * 60_000);
|
|
15
|
+
return defineSandboxCliPluginConnection(PLUGIN, {
|
|
16
|
+
command,
|
|
17
|
+
...(options.access ? { access: options.access } : {}),
|
|
18
|
+
tools: remotionTools({
|
|
19
|
+
commandArgs,
|
|
20
|
+
projectPath,
|
|
21
|
+
timeoutMs,
|
|
22
|
+
...(defaultEntryPoint ? { defaultEntryPoint } : {})
|
|
23
|
+
}),
|
|
24
|
+
maxOutputChars: options.maxOutputChars ?? DEFAULT_MAX_OUTPUT_CHARS,
|
|
25
|
+
...(options.required !== undefined ? { required: options.required } : {}),
|
|
26
|
+
...(options.subject ? { subject: options.subject } : {})
|
|
23
27
|
});
|
|
24
28
|
}
|
|
25
29
|
export const assemblyLinePlugin = definePlugin({ connections: [PLUGIN] });
|
|
30
|
+
function remotionTools(input) {
|
|
31
|
+
const invocation = (args) => ({
|
|
32
|
+
args: [...input.commandArgs, ...args],
|
|
33
|
+
cwd: input.projectPath,
|
|
34
|
+
timeoutMs: input.timeoutMs
|
|
35
|
+
});
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
name: "check_versions",
|
|
39
|
+
description: "Check Remotion package version compatibility in the sandbox project.",
|
|
40
|
+
inputSchema: emptyObjectSchema(),
|
|
41
|
+
build: () => invocation(["versions"])
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "list_compositions",
|
|
45
|
+
description: "Load the sandboxed Remotion project and list its composition IDs and dimensions.",
|
|
46
|
+
inputSchema: compositionListSchema(),
|
|
47
|
+
build(value) {
|
|
48
|
+
const record = inputRecord(value);
|
|
49
|
+
return invocation([
|
|
50
|
+
"compositions",
|
|
51
|
+
...entryArguments(record, input.defaultEntryPoint),
|
|
52
|
+
...propsArguments(record.props),
|
|
53
|
+
"--log=error"
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "render_video",
|
|
59
|
+
description: "Render one Remotion composition to a video under the sandbox workspace.",
|
|
60
|
+
inputSchema: renderVideoSchema(),
|
|
61
|
+
build(value) {
|
|
62
|
+
const record = inputRecord(value);
|
|
63
|
+
const outputPath = projectRelativePath(stringValue(record.outputPath, "outputPath"), "outputPath");
|
|
64
|
+
return invocation([
|
|
65
|
+
"render",
|
|
66
|
+
...entryArguments(record, input.defaultEntryPoint),
|
|
67
|
+
stringValue(record.compositionId, "compositionId"),
|
|
68
|
+
outputPath,
|
|
69
|
+
...propsArguments(record.props),
|
|
70
|
+
`--codec=${enumValue(record.codec, ["h264", "h265", "av1", "vp8", "vp9", "prores"], "h264")}`,
|
|
71
|
+
...(record.concurrency === undefined ? [] : [`--concurrency=${positiveInteger(record.concurrency, "concurrency", 1, 64)}`]),
|
|
72
|
+
...(record.crf === undefined ? [] : [`--crf=${finiteNumber(record.crf, "crf", 0, 51)}`]),
|
|
73
|
+
...(record.frames === undefined ? [] : [`--frames=${frameRange(record.frames)}`]),
|
|
74
|
+
...(record.overwrite === false ? ["--overwrite=false"] : []),
|
|
75
|
+
"--log=error"
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "render_still",
|
|
81
|
+
description: "Render one Remotion composition frame to an image under the sandbox workspace.",
|
|
82
|
+
inputSchema: renderStillSchema(),
|
|
83
|
+
build(value) {
|
|
84
|
+
const record = inputRecord(value);
|
|
85
|
+
const outputPath = projectRelativePath(stringValue(record.outputPath, "outputPath"), "outputPath");
|
|
86
|
+
return invocation([
|
|
87
|
+
"still",
|
|
88
|
+
...entryArguments(record, input.defaultEntryPoint),
|
|
89
|
+
stringValue(record.compositionId, "compositionId"),
|
|
90
|
+
outputPath,
|
|
91
|
+
...propsArguments(record.props),
|
|
92
|
+
...(record.frame === undefined ? [] : [`--frame=${integer(record.frame, "frame", -1_000_000, 1_000_000)}`]),
|
|
93
|
+
`--image-format=${enumValue(record.imageFormat, ["png", "jpeg", "pdf", "webp"], "png")}`,
|
|
94
|
+
...(record.overwrite === false ? ["--overwrite=false"] : []),
|
|
95
|
+
"--log=error"
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
function emptyObjectSchema() {
|
|
102
|
+
return { type: "object", properties: {}, additionalProperties: false };
|
|
103
|
+
}
|
|
104
|
+
function commonProperties() {
|
|
105
|
+
return {
|
|
106
|
+
entryPoint: { type: "string", minLength: 1 },
|
|
107
|
+
props: { type: "object", additionalProperties: true }
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function compositionListSchema() {
|
|
111
|
+
return {
|
|
112
|
+
type: "object",
|
|
113
|
+
properties: commonProperties(),
|
|
114
|
+
additionalProperties: false
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function renderVideoSchema() {
|
|
118
|
+
return {
|
|
119
|
+
type: "object",
|
|
120
|
+
required: ["compositionId", "outputPath"],
|
|
121
|
+
properties: {
|
|
122
|
+
compositionId: { type: "string", minLength: 1 },
|
|
123
|
+
outputPath: { type: "string", minLength: 1 },
|
|
124
|
+
...commonProperties(),
|
|
125
|
+
codec: { type: "string", enum: ["h264", "h265", "av1", "vp8", "vp9", "prores"] },
|
|
126
|
+
concurrency: { type: "integer", minimum: 1, maximum: 64 },
|
|
127
|
+
crf: { type: "number", minimum: 0, maximum: 51 },
|
|
128
|
+
frames: { type: "string", pattern: "^-?[0-9]+(?:-(?:-?[0-9]+)?)?$" },
|
|
129
|
+
overwrite: { type: "boolean" }
|
|
130
|
+
},
|
|
131
|
+
additionalProperties: false
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function renderStillSchema() {
|
|
135
|
+
return {
|
|
136
|
+
type: "object",
|
|
137
|
+
required: ["compositionId", "outputPath"],
|
|
138
|
+
properties: {
|
|
139
|
+
compositionId: { type: "string", minLength: 1 },
|
|
140
|
+
outputPath: { type: "string", minLength: 1 },
|
|
141
|
+
...commonProperties(),
|
|
142
|
+
frame: { type: "integer" },
|
|
143
|
+
imageFormat: { type: "string", enum: ["png", "jpeg", "pdf", "webp"] },
|
|
144
|
+
overwrite: { type: "boolean" }
|
|
145
|
+
},
|
|
146
|
+
additionalProperties: false
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function entryArguments(input, fallback) {
|
|
150
|
+
const value = input.entryPoint === undefined ? fallback : projectRelativePath(stringValue(input.entryPoint, "entryPoint"), "entryPoint");
|
|
151
|
+
return value ? [value] : [];
|
|
152
|
+
}
|
|
153
|
+
function propsArguments(value) {
|
|
154
|
+
if (value === undefined)
|
|
155
|
+
return [];
|
|
156
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
157
|
+
throw new Error("props must be a JSON object.");
|
|
158
|
+
const serialized = JSON.stringify(value);
|
|
159
|
+
if (Buffer.byteLength(serialized) > MAX_PROPS_BYTES)
|
|
160
|
+
throw new Error("props must be smaller than 1 MiB.");
|
|
161
|
+
return [`--props=${serialized}`];
|
|
162
|
+
}
|
|
163
|
+
function sandboxProjectPath(value) {
|
|
164
|
+
if (!value.trim() || /[\0\r\n]/u.test(value))
|
|
165
|
+
throw new Error("projectPath must be a non-empty sandbox path.");
|
|
166
|
+
const absolute = value.startsWith("/") ? posix.normalize(value) : posix.resolve("/workspace", value);
|
|
167
|
+
if (absolute !== "/workspace" && !absolute.startsWith("/workspace/")) {
|
|
168
|
+
throw new Error("projectPath must stay inside /workspace.");
|
|
169
|
+
}
|
|
170
|
+
return absolute;
|
|
171
|
+
}
|
|
172
|
+
function projectRelativePath(value, name) {
|
|
173
|
+
if (!value.trim() || /[\0\r\n]/u.test(value) || value.includes("\\")) {
|
|
174
|
+
throw new Error(`${name} must be a non-empty project-relative path.`);
|
|
175
|
+
}
|
|
176
|
+
const normalized = posix.normalize(value);
|
|
177
|
+
if (posix.isAbsolute(normalized) || normalized === ".." || normalized.startsWith("../")) {
|
|
178
|
+
throw new Error(`${name} must stay inside the Remotion project.`);
|
|
179
|
+
}
|
|
180
|
+
return normalized;
|
|
181
|
+
}
|
|
182
|
+
function validatedCommandArgs(value) {
|
|
183
|
+
if (!Array.isArray(value) || value.some((argument) => typeof argument !== "string" || argument.includes("\0"))) {
|
|
184
|
+
throw new Error("remotionArgs must contain only strings without NUL bytes.");
|
|
185
|
+
}
|
|
186
|
+
return [...value];
|
|
187
|
+
}
|
|
188
|
+
function inputRecord(value) {
|
|
189
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
190
|
+
}
|
|
191
|
+
function stringValue(value, name) {
|
|
192
|
+
if (typeof value !== "string" || !value.trim() || value.includes("\0"))
|
|
193
|
+
throw new Error(`${name} must be a non-empty string.`);
|
|
194
|
+
return value;
|
|
195
|
+
}
|
|
196
|
+
function positiveInteger(value, name, minimum, maximum) {
|
|
197
|
+
const parsed = integer(value, name, minimum, maximum);
|
|
198
|
+
if (parsed < 1)
|
|
199
|
+
throw new Error(`${name} must be positive.`);
|
|
200
|
+
return parsed;
|
|
201
|
+
}
|
|
202
|
+
function integer(value, name, minimum, maximum) {
|
|
203
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < minimum || value > maximum) {
|
|
204
|
+
throw new Error(`${name} must be an integer from ${minimum} to ${maximum}.`);
|
|
205
|
+
}
|
|
206
|
+
return value;
|
|
207
|
+
}
|
|
208
|
+
function finiteNumber(value, name, minimum, maximum) {
|
|
209
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum || value > maximum) {
|
|
210
|
+
throw new Error(`${name} must be a number from ${minimum} to ${maximum}.`);
|
|
211
|
+
}
|
|
212
|
+
return value;
|
|
213
|
+
}
|
|
214
|
+
function enumValue(value, allowed, fallback) {
|
|
215
|
+
if (value === undefined)
|
|
216
|
+
return fallback;
|
|
217
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
218
|
+
throw new Error(`Value must be one of: ${allowed.join(", ")}.`);
|
|
219
|
+
return value;
|
|
220
|
+
}
|
|
221
|
+
function frameRange(value) {
|
|
222
|
+
if (typeof value !== "string" || !/^-?[0-9]+(?:-(?:-?[0-9]+)?)?$/u.test(value)) {
|
|
223
|
+
throw new Error("frames must be one frame or a Remotion frame range such as 0-90.");
|
|
224
|
+
}
|
|
225
|
+
return value;
|
|
226
|
+
}
|
|
26
227
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,gCAAgC,EAOjC,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,UAAU,CAAE,CAAC;AACrD,MAAM,kBAAkB,GAAG,EAAE,GAAG,MAAM,CAAC;AACvC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AACzC,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAkBpC,MAAM,UAAU,wBAAwB,CAAC,OAAkC;IACzE,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,IAAI,KAAK,CAAC;IACjD,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;IAC/F,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC,CAAC;IAC5E,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,KAAK,SAAS;QACxD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,SAAS,IAAI,kBAAkB,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IAEjH,OAAO,gCAAgC,CAAC,MAAM,EAAE;QAC9C,OAAO;QACP,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,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E,CAAC;QAC/E,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assemblyline-agents/remotion",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,13 +9,11 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@assemblyline-agents/core": "2.0.0"
|
|
12
|
+
"@assemblyline-agents/core": "3.1.0"
|
|
14
13
|
},
|
|
15
14
|
"description": "Official Assembly Line workspace-scoped Remotion CLI connection plugin.",
|
|
16
15
|
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
"skills"
|
|
16
|
+
"dist"
|
|
19
17
|
],
|
|
20
18
|
"engines": {
|
|
21
19
|
"node": ">=22.19.0"
|
package/dist/mcp-server.d.ts
DELETED
package/dist/mcp-server.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":""}
|
package/dist/mcp-server.js
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
-
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
-
import { runProcess } from "./process.js";
|
|
6
|
-
import { RemotionWorkspace } from "./workspace.js";
|
|
7
|
-
const TOOLS = [
|
|
8
|
-
{
|
|
9
|
-
name: "list_compositions",
|
|
10
|
-
description: "List composition IDs and dimensions from the configured Remotion project.",
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: "object",
|
|
13
|
-
properties: {
|
|
14
|
-
entryPoint: { type: "string", description: "Optional project-relative entry point override." },
|
|
15
|
-
props: { type: "object", additionalProperties: true }
|
|
16
|
-
},
|
|
17
|
-
additionalProperties: false
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "check_versions",
|
|
22
|
-
description: "Run Remotion's version compatibility check in the configured project.",
|
|
23
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "render_video",
|
|
27
|
-
description: "Render one Remotion composition to a workspace-scoped video file.",
|
|
28
|
-
inputSchema: {
|
|
29
|
-
type: "object",
|
|
30
|
-
required: ["compositionId", "outputPath"],
|
|
31
|
-
properties: {
|
|
32
|
-
compositionId: { type: "string", minLength: 1 },
|
|
33
|
-
outputPath: { type: "string", minLength: 1 },
|
|
34
|
-
entryPoint: { type: "string" },
|
|
35
|
-
props: { type: "object", additionalProperties: true },
|
|
36
|
-
codec: { type: "string", enum: ["h264", "h265", "av1", "vp8", "vp9", "prores"] },
|
|
37
|
-
concurrency: { type: "integer", minimum: 1, maximum: 64 },
|
|
38
|
-
crf: { type: "number", minimum: 0, maximum: 51 },
|
|
39
|
-
frames: { type: "string", pattern: "^-?[0-9]+(?:-(?:-?[0-9]+)?)?$" },
|
|
40
|
-
overwrite: { type: "boolean" }
|
|
41
|
-
},
|
|
42
|
-
additionalProperties: false
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "render_still",
|
|
47
|
-
description: "Render one frame of a Remotion composition to a workspace-scoped image file.",
|
|
48
|
-
inputSchema: {
|
|
49
|
-
type: "object",
|
|
50
|
-
required: ["compositionId", "outputPath"],
|
|
51
|
-
properties: {
|
|
52
|
-
compositionId: { type: "string", minLength: 1 },
|
|
53
|
-
outputPath: { type: "string", minLength: 1 },
|
|
54
|
-
entryPoint: { type: "string" },
|
|
55
|
-
props: { type: "object", additionalProperties: true },
|
|
56
|
-
frame: { type: "integer" },
|
|
57
|
-
imageFormat: { type: "string", enum: ["png", "jpeg", "pdf", "webp"] },
|
|
58
|
-
overwrite: { type: "boolean" }
|
|
59
|
-
},
|
|
60
|
-
additionalProperties: false
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
const options = parseServerOptions(process.argv.slice(2));
|
|
65
|
-
const workspace = new RemotionWorkspace(options.projectRoot);
|
|
66
|
-
const server = new Server({ name: "openeve-remotion", version: "0.1.0" }, {
|
|
67
|
-
capabilities: { tools: {} },
|
|
68
|
-
instructions: "Remotion operations are restricted to the configured project root."
|
|
69
|
-
});
|
|
70
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
71
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
72
|
-
try {
|
|
73
|
-
return await callTool(request.params.name, recordValue(request.params.arguments));
|
|
74
|
-
}
|
|
75
|
-
catch (error) {
|
|
76
|
-
return toolResult({
|
|
77
|
-
error: error instanceof Error ? error.message : String(error)
|
|
78
|
-
}, true);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
await server.connect(new StdioServerTransport());
|
|
82
|
-
async function callTool(name, input) {
|
|
83
|
-
if (name === "check_versions") {
|
|
84
|
-
const result = await runRemotion(["versions"]);
|
|
85
|
-
return toolResult(result);
|
|
86
|
-
}
|
|
87
|
-
if (name === "list_compositions") {
|
|
88
|
-
const args = ["compositions", ...entryArguments(input), ...propsArguments(input.props), "--log=error"];
|
|
89
|
-
return toolResult(await runRemotion(args));
|
|
90
|
-
}
|
|
91
|
-
if (name === "render_video") {
|
|
92
|
-
const outputPath = outputFile(stringValue(input.outputPath, "outputPath"));
|
|
93
|
-
const args = [
|
|
94
|
-
"render",
|
|
95
|
-
...entryArguments(input),
|
|
96
|
-
stringValue(input.compositionId, "compositionId"),
|
|
97
|
-
outputPath,
|
|
98
|
-
...propsArguments(input.props),
|
|
99
|
-
`--codec=${enumValue(input.codec, ["h264", "h265", "av1", "vp8", "vp9", "prores"], "h264")}`,
|
|
100
|
-
...(input.concurrency === undefined ? [] : [`--concurrency=${integerValue(input.concurrency, "concurrency", 1, 64)}`]),
|
|
101
|
-
...(input.crf === undefined ? [] : [`--crf=${numberValue(input.crf, "crf", 0, 51)}`]),
|
|
102
|
-
...(input.frames === undefined ? [] : [`--frames=${frameRange(input.frames)}`]),
|
|
103
|
-
...(input.overwrite === false ? ["--overwrite=false"] : []),
|
|
104
|
-
"--log=error"
|
|
105
|
-
];
|
|
106
|
-
return toolResult({ outputPath, ...(await runRemotion(args)) });
|
|
107
|
-
}
|
|
108
|
-
if (name === "render_still") {
|
|
109
|
-
const outputPath = outputFile(stringValue(input.outputPath, "outputPath"));
|
|
110
|
-
const args = [
|
|
111
|
-
"still",
|
|
112
|
-
...entryArguments(input),
|
|
113
|
-
stringValue(input.compositionId, "compositionId"),
|
|
114
|
-
outputPath,
|
|
115
|
-
...propsArguments(input.props),
|
|
116
|
-
...(input.frame === undefined ? [] : [`--frame=${integerValue(input.frame, "frame", -1_000_000, 1_000_000)}`]),
|
|
117
|
-
`--image-format=${enumValue(input.imageFormat, ["png", "jpeg", "pdf", "webp"], "png")}`,
|
|
118
|
-
...(input.overwrite === false ? ["--overwrite=false"] : []),
|
|
119
|
-
"--log=error"
|
|
120
|
-
];
|
|
121
|
-
return toolResult({ outputPath, ...(await runRemotion(args)) });
|
|
122
|
-
}
|
|
123
|
-
throw new Error(`Unknown Remotion tool: ${name}`);
|
|
124
|
-
}
|
|
125
|
-
function runRemotion(args) {
|
|
126
|
-
return runProcess(options.remotionCommand, [...options.remotionArgs, ...args], {
|
|
127
|
-
cwd: workspace.root
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function entryArguments(input) {
|
|
131
|
-
const candidate = typeof input.entryPoint === "string" ? input.entryPoint : options.entryPoint;
|
|
132
|
-
return candidate ? [workspace.input(candidate, "entryPoint")] : [];
|
|
133
|
-
}
|
|
134
|
-
function propsArguments(value) {
|
|
135
|
-
if (value === undefined)
|
|
136
|
-
return [];
|
|
137
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
138
|
-
throw new Error("props must be a JSON object.");
|
|
139
|
-
}
|
|
140
|
-
const serialized = JSON.stringify(value);
|
|
141
|
-
if (Buffer.byteLength(serialized) > 1024 * 1024) {
|
|
142
|
-
throw new Error("props must be smaller than 1 MiB.");
|
|
143
|
-
}
|
|
144
|
-
return [`--props=${serialized}`];
|
|
145
|
-
}
|
|
146
|
-
function outputFile(value) {
|
|
147
|
-
return workspace.output(value, "outputPath");
|
|
148
|
-
}
|
|
149
|
-
function parseServerOptions(args) {
|
|
150
|
-
let projectRoot = process.cwd();
|
|
151
|
-
let remotionCommand = "npx";
|
|
152
|
-
const remotionArgs = [];
|
|
153
|
-
let entryPoint;
|
|
154
|
-
for (let index = 0; index < args.length; index += 2) {
|
|
155
|
-
const flag = args[index];
|
|
156
|
-
const value = args[index + 1];
|
|
157
|
-
if (!flag || value === undefined)
|
|
158
|
-
throw new Error(`Missing value for ${flag ?? "server option"}.`);
|
|
159
|
-
if (flag === "--project-root")
|
|
160
|
-
projectRoot = resolve(value);
|
|
161
|
-
else if (flag === "--remotion-command")
|
|
162
|
-
remotionCommand = value;
|
|
163
|
-
else if (flag === "--remotion-arg")
|
|
164
|
-
remotionArgs.push(value);
|
|
165
|
-
else if (flag === "--entry-point")
|
|
166
|
-
entryPoint = value;
|
|
167
|
-
else
|
|
168
|
-
throw new Error(`Unknown Remotion MCP server option: ${flag}`);
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
projectRoot,
|
|
172
|
-
remotionCommand,
|
|
173
|
-
remotionArgs: remotionArgs.length > 0 ? remotionArgs : ["--no-install", "remotion"],
|
|
174
|
-
...(entryPoint ? { entryPoint } : {})
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function recordValue(value) {
|
|
178
|
-
return value && typeof value === "object" && !Array.isArray(value)
|
|
179
|
-
? value
|
|
180
|
-
: {};
|
|
181
|
-
}
|
|
182
|
-
function stringValue(value, name) {
|
|
183
|
-
if (typeof value !== "string" || !value.trim())
|
|
184
|
-
throw new Error(`${name} must be a non-empty string.`);
|
|
185
|
-
return value;
|
|
186
|
-
}
|
|
187
|
-
function integerValue(value, name, minimum, maximum) {
|
|
188
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value < minimum || value > maximum) {
|
|
189
|
-
throw new Error(`${name} must be an integer from ${minimum} to ${maximum}.`);
|
|
190
|
-
}
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
function numberValue(value, name, minimum, maximum) {
|
|
194
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum || value > maximum) {
|
|
195
|
-
throw new Error(`${name} must be a number from ${minimum} to ${maximum}.`);
|
|
196
|
-
}
|
|
197
|
-
return value;
|
|
198
|
-
}
|
|
199
|
-
function enumValue(value, allowed, fallback) {
|
|
200
|
-
if (value === undefined)
|
|
201
|
-
return fallback;
|
|
202
|
-
if (typeof value !== "string" || !allowed.includes(value)) {
|
|
203
|
-
throw new Error(`Value must be one of: ${allowed.join(", ")}.`);
|
|
204
|
-
}
|
|
205
|
-
return value;
|
|
206
|
-
}
|
|
207
|
-
function frameRange(value) {
|
|
208
|
-
if (typeof value !== "string" || !/^-?[0-9]+(?:-(?:-?[0-9]+)?)?$/u.test(value)) {
|
|
209
|
-
throw new Error("frames must be one frame or a Remotion frame range such as 0-90.");
|
|
210
|
-
}
|
|
211
|
-
return value;
|
|
212
|
-
}
|
|
213
|
-
function toolResult(value, isError = false) {
|
|
214
|
-
return {
|
|
215
|
-
content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
|
|
216
|
-
...(isError ? { isError: true } : {})
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=mcp-server.js.map
|
package/dist/mcp-server.js.map
D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QAAW;IACrF,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAU,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,KAAU,CAAC;AACpB,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/E,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,KAAc,EAAE,OAAO,GAAG,KAAK;IACjD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/process.d.ts
DELETED
package/dist/process.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,aAAa,CAAC,CAuCxB"}
|
package/dist/process.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
const MAX_CAPTURE_BYTES = 256 * 1024;
|
|
3
|
-
export function runProcess(command, args, options) {
|
|
4
|
-
return new Promise((resolve, reject) => {
|
|
5
|
-
const child = spawn(command, args, {
|
|
6
|
-
cwd: options.cwd,
|
|
7
|
-
env: process.env,
|
|
8
|
-
shell: false,
|
|
9
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
10
|
-
});
|
|
11
|
-
let stdout = "";
|
|
12
|
-
let stderr = "";
|
|
13
|
-
let capturedBytes = 0;
|
|
14
|
-
const capture = (target, chunk) => {
|
|
15
|
-
capturedBytes += chunk.byteLength;
|
|
16
|
-
if (capturedBytes > MAX_CAPTURE_BYTES) {
|
|
17
|
-
child.kill("SIGKILL");
|
|
18
|
-
reject(new Error(`Process output exceeded ${MAX_CAPTURE_BYTES} bytes.`));
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (target === "stdout")
|
|
22
|
-
stdout += chunk.toString();
|
|
23
|
-
else
|
|
24
|
-
stderr += chunk.toString();
|
|
25
|
-
};
|
|
26
|
-
child.stdout.on("data", (chunk) => capture("stdout", chunk));
|
|
27
|
-
child.stderr.on("data", (chunk) => capture("stderr", chunk));
|
|
28
|
-
child.once("error", reject);
|
|
29
|
-
const timeout = setTimeout(() => {
|
|
30
|
-
child.kill("SIGKILL");
|
|
31
|
-
reject(new Error(`Process timed out after ${options.timeoutMs ?? 30 * 60_000}ms.`));
|
|
32
|
-
}, options.timeoutMs ?? 30 * 60_000);
|
|
33
|
-
child.once("close", (code, signal) => {
|
|
34
|
-
clearTimeout(timeout);
|
|
35
|
-
if (code === 0) {
|
|
36
|
-
resolve({ stdout: stdout.trim(), stderr: stderr.trim() });
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
reject(new Error(`${command} exited with ${code ?? signal ?? "unknown status"}${stderr.trim() ? `: ${stderr.trim()}` : ""}`));
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=process.js.map
|
package/dist/process.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,CAAC;AAOrC,MAAM,UAAU,UAAU,CACxB,OAAe,EACf,IAAc,EACd,OAA4C;IAE5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE;YACjC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC,CAAC;QACH,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAG,CAAC,MAA2B,EAAE,KAAa,EAAQ,EAAE;YACnE,aAAa,IAAI,KAAK,CAAC,UAAU,CAAC;YAClC,IAAI,aAAa,GAAG,iBAAiB,EAAE,CAAC;gBACtC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACtB,MAAM,CAAC,IAAI,KAAK,CAAC,2BAA2B,iBAAiB,SAAS,CAAC,CAAC,CAAC;gBACzE,OAAO;YACT,CAAC;YACD,IAAI,MAAM,KAAK,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;;gBAC/C,MAAM,IAAI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AAC"}
|
package/dist/workspace.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class RemotionWorkspace {
|
|
2
|
-
readonly root: string;
|
|
3
|
-
constructor(root: string);
|
|
4
|
-
input(value: string, name: string): string;
|
|
5
|
-
output(value: string, name: string): string;
|
|
6
|
-
private lexical;
|
|
7
|
-
private assertInside;
|
|
8
|
-
private existingAncestor;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=workspace.d.ts.map
|
package/dist/workspace.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAYA,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM;IAIxB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAQ1C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAW3C,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,gBAAgB;CASzB"}
|
package/dist/workspace.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, realpathSync } from "node:fs";
|
|
2
|
-
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
3
|
-
export class RemotionWorkspace {
|
|
4
|
-
root;
|
|
5
|
-
constructor(root) {
|
|
6
|
-
this.root = realpathSync(resolve(root));
|
|
7
|
-
}
|
|
8
|
-
input(value, name) {
|
|
9
|
-
const candidate = this.lexical(value, name);
|
|
10
|
-
if (!existsSync(candidate))
|
|
11
|
-
throw new Error(`${name} does not exist: ${value}`);
|
|
12
|
-
const real = realpathSync(candidate);
|
|
13
|
-
this.assertInside(real, name);
|
|
14
|
-
return real;
|
|
15
|
-
}
|
|
16
|
-
output(value, name) {
|
|
17
|
-
const candidate = this.lexical(value, name);
|
|
18
|
-
if (existsSync(candidate))
|
|
19
|
-
this.assertInside(realpathSync(candidate), name);
|
|
20
|
-
const parent = dirname(candidate);
|
|
21
|
-
const existingAncestor = this.existingAncestor(parent);
|
|
22
|
-
this.assertInside(realpathSync(existingAncestor), name);
|
|
23
|
-
mkdirSync(parent, { recursive: true });
|
|
24
|
-
this.assertInside(realpathSync(parent), name);
|
|
25
|
-
return candidate;
|
|
26
|
-
}
|
|
27
|
-
lexical(value, name) {
|
|
28
|
-
if (!value.trim())
|
|
29
|
-
throw new Error(`${name} must be a non-empty path.`);
|
|
30
|
-
const candidate = resolve(this.root, value);
|
|
31
|
-
this.assertInside(candidate, name);
|
|
32
|
-
return candidate;
|
|
33
|
-
}
|
|
34
|
-
assertInside(candidate, name) {
|
|
35
|
-
const relation = relative(this.root, candidate);
|
|
36
|
-
if (relation.startsWith("..") || isAbsolute(relation)) {
|
|
37
|
-
throw new Error(`${name} must stay inside ${this.root}.`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
existingAncestor(value) {
|
|
41
|
-
let candidate = value;
|
|
42
|
-
while (!existsSync(candidate)) {
|
|
43
|
-
const parent = dirname(candidate);
|
|
44
|
-
if (parent === candidate)
|
|
45
|
-
break;
|
|
46
|
-
candidate = parent;
|
|
47
|
-
}
|
|
48
|
-
return candidate;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=workspace.js.map
|
package/dist/workspace.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACR,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,iBAAiB;IACnB,IAAI,CAAS;IAEtB,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AA4B,CAAC,CAAC;QACxE,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACnC,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,YAAY,CAAC,SAAiB,EAAE,IAAY;QAClD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAChD,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAEO,gBAAgB,CAAC,KAAa;QACpC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;YAClC,IAAI,MAAM,KAAK,SAAS;gBAAE,MAAM;YAChC,SAAS,GAAG,MAAM,CAAC;QACrB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
package/skills/remotion/SKILL.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: remotion
|
|
3
|
-
description: Build, inspect, and render code-driven videos in the configured Remotion project.
|
|
4
|
-
---
|
|
5
|
-
# Remotion
|
|
6
|
-
|
|
7
|
-
Use Remotion for repeatable, code-driven video layouts, motion graphics,
|
|
8
|
-
captions, branded overlays, and parameterized variations. Inspect the existing
|
|
9
|
-
project and composition IDs before changing source code or rendering.
|
|
10
|
-
|
|
11
|
-
Keep composition source deterministic:
|
|
12
|
-
|
|
13
|
-
- Drive timing from frames and the composition FPS.
|
|
14
|
-
- Put reusable colors, typography, spacing, and durations in named constants.
|
|
15
|
-
- Use project-local media assets and preserve their aspect ratios.
|
|
16
|
-
- For TikTok, Reels, or Shorts, prefer a 9:16 composition such as 1080x1920.
|
|
17
|
-
- Keep important faces, products, captions, and calls to action inside safe
|
|
18
|
-
areas rather than against the edge.
|
|
19
|
-
- Use props for copy, media paths, colors, and variant decisions that should be
|
|
20
|
-
reusable across renders.
|
|
21
|
-
|
|
22
|
-
Call `list_compositions` before rendering when the composition ID or dimensions
|
|
23
|
-
are uncertain. Use `render_still` to review representative frames before
|
|
24
|
-
spending time on a full render. Rendering creates files and therefore requires
|
|
25
|
-
the connection's write policy.
|
|
26
|
-
|
|
27
|
-
Do not pass arbitrary CLI flags through another tool. Use only the typed
|
|
28
|
-
connection inputs. Keep every entry point and output inside the configured
|
|
29
|
-
project root. Check the project's Remotion license requirements before using
|
|
30
|
-
renders commercially or at automation scale.
|