@synthetic-ai/premiere-mcp 2.0.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +21 -0
  3. package/README.md +242 -0
  4. package/cep-plugin/.debug +8 -0
  5. package/cep-plugin/CSInterface.js +70 -0
  6. package/cep-plugin/CSXS/manifest.xml +49 -0
  7. package/cep-plugin/host.jsx +7 -0
  8. package/cep-plugin/index.html +419 -0
  9. package/cep-plugin/main.js +327 -0
  10. package/cep-plugin/premiere.jsx +24947 -0
  11. package/cep-plugin/synthetic-logo.png +0 -0
  12. package/dist/bridge/file-bridge.d.ts +29 -0
  13. package/dist/bridge/file-bridge.js +145 -0
  14. package/dist/bridge/script-builder.d.ts +19 -0
  15. package/dist/bridge/script-builder.js +408 -0
  16. package/dist/http-server.d.ts +21 -0
  17. package/dist/http-server.js +140 -0
  18. package/dist/index.d.ts +3 -0
  19. package/dist/index.js +70 -0
  20. package/dist/resources/extendscript-reference.d.ts +2 -0
  21. package/dist/resources/extendscript-reference.js +219 -0
  22. package/dist/server.d.ts +4 -0
  23. package/dist/server.js +276 -0
  24. package/dist/tools/advanced.d.ts +530 -0
  25. package/dist/tools/advanced.js +923 -0
  26. package/dist/tools/audio-advanced.d.ts +847 -0
  27. package/dist/tools/audio-advanced.js +1653 -0
  28. package/dist/tools/audio.d.ts +84 -0
  29. package/dist/tools/audio.js +123 -0
  30. package/dist/tools/captions.d.ts +30 -0
  31. package/dist/tools/captions.js +73 -0
  32. package/dist/tools/clipboard.d.ts +153 -0
  33. package/dist/tools/clipboard.js +381 -0
  34. package/dist/tools/color-advanced.d.ts +821 -0
  35. package/dist/tools/color-advanced.js +772 -0
  36. package/dist/tools/discovery.d.ts +128 -0
  37. package/dist/tools/discovery.js +445 -0
  38. package/dist/tools/effects.d.ts +211 -0
  39. package/dist/tools/effects.js +554 -0
  40. package/dist/tools/export-presets.d.ts +333 -0
  41. package/dist/tools/export-presets.js +490 -0
  42. package/dist/tools/export.d.ts +320 -0
  43. package/dist/tools/export.js +618 -0
  44. package/dist/tools/health.d.ts +9 -0
  45. package/dist/tools/health.js +25 -0
  46. package/dist/tools/inspection.d.ts +179 -0
  47. package/dist/tools/inspection.js +1089 -0
  48. package/dist/tools/keyframes.d.ts +253 -0
  49. package/dist/tools/keyframes.js +611 -0
  50. package/dist/tools/markers.d.ts +117 -0
  51. package/dist/tools/markers.js +206 -0
  52. package/dist/tools/media.d.ts +297 -0
  53. package/dist/tools/media.js +493 -0
  54. package/dist/tools/metadata.d.ts +178 -0
  55. package/dist/tools/metadata.js +278 -0
  56. package/dist/tools/multicam.d.ts +199 -0
  57. package/dist/tools/multicam.js +212 -0
  58. package/dist/tools/playback.d.ts +34 -0
  59. package/dist/tools/playback.js +63 -0
  60. package/dist/tools/playhead.d.ts +77 -0
  61. package/dist/tools/playhead.js +185 -0
  62. package/dist/tools/project-manager.d.ts +65 -0
  63. package/dist/tools/project-manager.js +81 -0
  64. package/dist/tools/project.d.ts +390 -0
  65. package/dist/tools/project.js +596 -0
  66. package/dist/tools/scripting.d.ts +98 -0
  67. package/dist/tools/scripting.js +434 -0
  68. package/dist/tools/selection.d.ts +120 -0
  69. package/dist/tools/selection.js +334 -0
  70. package/dist/tools/sequence-advanced.d.ts +84 -0
  71. package/dist/tools/sequence-advanced.js +471 -0
  72. package/dist/tools/sequence-settings.d.ts +397 -0
  73. package/dist/tools/sequence-settings.js +967 -0
  74. package/dist/tools/sequence.d.ts +211 -0
  75. package/dist/tools/sequence.js +378 -0
  76. package/dist/tools/source-monitor.d.ts +95 -0
  77. package/dist/tools/source-monitor.js +180 -0
  78. package/dist/tools/text.d.ts +97 -0
  79. package/dist/tools/text.js +159 -0
  80. package/dist/tools/timeline.d.ts +265 -0
  81. package/dist/tools/timeline.js +575 -0
  82. package/dist/tools/track-management.d.ts +482 -0
  83. package/dist/tools/track-management.js +787 -0
  84. package/dist/tools/track-targeting.d.ts +666 -0
  85. package/dist/tools/track-targeting.js +1318 -0
  86. package/dist/tools/tracks.d.ts +90 -0
  87. package/dist/tools/tracks.js +183 -0
  88. package/dist/tools/transitions-motion.d.ts +788 -0
  89. package/dist/tools/transitions-motion.js +680 -0
  90. package/dist/tools/transitions.d.ts +124 -0
  91. package/dist/tools/transitions.js +267 -0
  92. package/dist/tools/utility.d.ts +469 -0
  93. package/dist/tools/utility.js +1118 -0
  94. package/dist/tools/workspace.d.ts +25 -0
  95. package/dist/tools/workspace.js +61 -0
  96. package/package.json +66 -0
  97. package/scripts/build-chat-dmg.sh +210 -0
  98. package/scripts/build-chat-zip.sh +291 -0
  99. package/scripts/install-cep-windows.ps1 +99 -0
  100. package/scripts/install-cep.sh +66 -0
  101. package/scripts/install-chat-plugin.bat +67 -0
  102. package/scripts/install-chat-plugin.sh +85 -0
  103. package/scripts/install-windows.bat +95 -0
  104. package/scripts/package.mjs +218 -0
@@ -0,0 +1,278 @@
1
+ import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
2
+ import { sendCommand } from "../bridge/file-bridge.js";
3
+ export function getMetadataTools(bridgeOptions) {
4
+ return {
5
+ get_metadata: {
6
+ description: "Get metadata for a project item",
7
+ parameters: {
8
+ type: "object",
9
+ properties: {
10
+ item_id: {
11
+ type: "string",
12
+ description: "Node ID or name of the project item",
13
+ },
14
+ },
15
+ required: ["item_id"],
16
+ },
17
+ handler: async (args) => {
18
+ const script = buildToolScript(`
19
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
20
+ if (!item) return __error("Item not found");
21
+
22
+ var metadata = {};
23
+ try {
24
+ var xmpBlob = item.getProjectMetadata();
25
+ metadata.projectMetadata = xmpBlob;
26
+ } catch(e) {}
27
+
28
+ try {
29
+ var xmpBlob2 = item.getXMPMetadata();
30
+ metadata.xmpMetadata = xmpBlob2;
31
+ } catch(e) {}
32
+
33
+ metadata.name = item.name;
34
+ metadata.nodeId = item.nodeId;
35
+
36
+ try {
37
+ metadata.mediaPath = item.getMediaPath();
38
+ } catch(e) {}
39
+
40
+ return __result(metadata);
41
+ `);
42
+ return sendCommand(script, bridgeOptions);
43
+ },
44
+ },
45
+ set_metadata: {
46
+ description: "Set project metadata on a project item",
47
+ parameters: {
48
+ type: "object",
49
+ properties: {
50
+ item_id: {
51
+ type: "string",
52
+ description: "Node ID or name of the project item",
53
+ },
54
+ field_name: {
55
+ type: "string",
56
+ description: "Metadata field name (e.g., 'Column.Intrinsic.Description')",
57
+ },
58
+ value: {
59
+ type: "string",
60
+ description: "Value to set",
61
+ },
62
+ },
63
+ required: ["item_id", "field_name", "value"],
64
+ },
65
+ handler: async (args) => {
66
+ const script = buildToolScript(`
67
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
68
+ if (!item) return __error("Item not found");
69
+
70
+ item.setProjectMetadata("${escapeForExtendScript(args.value)}", "${escapeForExtendScript(args.field_name)}");
71
+
72
+ return __result({ updated: true, item: item.name, field: "${escapeForExtendScript(args.field_name)}" });
73
+ `);
74
+ return sendCommand(script, bridgeOptions);
75
+ },
76
+ },
77
+ set_color_label: {
78
+ description: "Set the color label on a project item or clip",
79
+ parameters: {
80
+ type: "object",
81
+ properties: {
82
+ item_id: {
83
+ type: "string",
84
+ description: "Node ID or name of the project item",
85
+ },
86
+ color_index: {
87
+ type: "number",
88
+ description: "Label color index (0=Violet, 1=Iris, 2=Caribbean, 3=Lavender, 4=Cerulean, 5=Forest, 6=Rose, 7=Mango, 8=Purple, 9=Blue, 10=Teal, 11=Magenta, 12=Tan, 13=Green, 14=Brown, 15=Yellow)",
89
+ },
90
+ },
91
+ required: ["item_id", "color_index"],
92
+ },
93
+ handler: async (args) => {
94
+ const script = buildToolScript(`
95
+ // Accept both project item IDs/names AND timeline clip nodeIds.
96
+ var item = __resolveProjectItemOrTimelineClip("${escapeForExtendScript(args.item_id)}");
97
+ if (!item) return __error("Item not found in project tree or timeline: ${escapeForExtendScript(args.item_id)}");
98
+
99
+ item.setColorLabel(${args.color_index});
100
+ return __result({ updated: true, item: item.name, colorIndex: ${args.color_index} });
101
+ `);
102
+ return sendCommand(script, bridgeOptions);
103
+ },
104
+ },
105
+ get_color_label: {
106
+ description: "Get the color label of a project item",
107
+ parameters: {
108
+ type: "object",
109
+ properties: {
110
+ item_id: {
111
+ type: "string",
112
+ description: "Node ID or name of the project item",
113
+ },
114
+ },
115
+ required: ["item_id"],
116
+ },
117
+ handler: async (args) => {
118
+ const script = buildToolScript(`
119
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
120
+ if (!item) return __error("Item not found");
121
+
122
+ var colorIndex = item.getColorLabel();
123
+ return __result({ item: item.name, colorIndex: colorIndex });
124
+ `);
125
+ return sendCommand(script, bridgeOptions);
126
+ },
127
+ },
128
+ get_footage_interpretation: {
129
+ description: "Get footage interpretation settings for a project item",
130
+ parameters: {
131
+ type: "object",
132
+ properties: {
133
+ item_id: {
134
+ type: "string",
135
+ description: "Node ID or name of the project item",
136
+ },
137
+ },
138
+ required: ["item_id"],
139
+ },
140
+ handler: async (args) => {
141
+ const script = buildToolScript(`
142
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
143
+ if (!item) return __error("Item not found");
144
+
145
+ var interp = item.getFootageInterpretation();
146
+ if (!interp) return __error("No footage interpretation available");
147
+
148
+ return __result({
149
+ item: item.name,
150
+ alphaUsage: interp.alphaUsage,
151
+ fieldType: interp.fieldType,
152
+ frameRate: interp.frameRate,
153
+ ignoreAlpha: interp.ignoreAlpha,
154
+ invertAlpha: interp.invertAlpha,
155
+ pixelAspectRatio: interp.pixelAspectRatio
156
+ });
157
+ `);
158
+ return sendCommand(script, bridgeOptions);
159
+ },
160
+ },
161
+ set_footage_interpretation: {
162
+ description: "Set footage interpretation settings for a project item",
163
+ parameters: {
164
+ type: "object",
165
+ properties: {
166
+ item_id: {
167
+ type: "string",
168
+ description: "Node ID or name of the project item",
169
+ },
170
+ frame_rate: {
171
+ type: "number",
172
+ description: "Override frame rate",
173
+ },
174
+ pixel_aspect_ratio: {
175
+ type: "number",
176
+ description: "Pixel aspect ratio (1.0 = square pixels)",
177
+ },
178
+ },
179
+ required: ["item_id"],
180
+ },
181
+ handler: async (args) => {
182
+ const script = buildToolScript(`
183
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
184
+ if (!item) return __error("Item not found");
185
+
186
+ var interp = item.getFootageInterpretation();
187
+ if (!interp) return __error("No footage interpretation available");
188
+
189
+ ${args.frame_rate !== undefined ? `interp.frameRate = ${args.frame_rate};` : ""}
190
+ ${args.pixel_aspect_ratio !== undefined ? `interp.pixelAspectRatio = ${args.pixel_aspect_ratio};` : ""}
191
+
192
+ item.setFootageInterpretation(interp);
193
+ return __result({ updated: true, item: item.name });
194
+ `);
195
+ return sendCommand(script, bridgeOptions);
196
+ },
197
+ },
198
+ get_xmp_metadata: {
199
+ description: "Get the raw XMP metadata for a project item (includes EXIF, IPTC, Dublin Core, etc.)",
200
+ parameters: {
201
+ type: "object",
202
+ properties: {
203
+ item_id: {
204
+ type: "string",
205
+ description: "Node ID or name of the project item",
206
+ },
207
+ },
208
+ required: ["item_id"],
209
+ },
210
+ handler: async (args) => {
211
+ const script = buildToolScript(`
212
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
213
+ if (!item) return __error("Item not found");
214
+
215
+ var xmp = item.getXMPMetadata();
216
+ return __result({ item: item.name, xmpMetadata: xmp });
217
+ `);
218
+ return sendCommand(script, bridgeOptions);
219
+ },
220
+ },
221
+ set_xmp_metadata: {
222
+ description: "Set raw XMP metadata on a project item (provide complete XMP XML string)",
223
+ parameters: {
224
+ type: "object",
225
+ properties: {
226
+ item_id: {
227
+ type: "string",
228
+ description: "Node ID or name of the project item",
229
+ },
230
+ xmp_xml: {
231
+ type: "string",
232
+ description: "Complete XMP metadata XML string to set",
233
+ },
234
+ },
235
+ required: ["item_id", "xmp_xml"],
236
+ },
237
+ handler: async (args) => {
238
+ const script = buildToolScript(`
239
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
240
+ if (!item) return __error("Item not found");
241
+
242
+ item.setXMPMetadata("${escapeForExtendScript(args.xmp_xml)}");
243
+ return __result({ updated: true, item: item.name });
244
+ `);
245
+ return sendCommand(script, bridgeOptions);
246
+ },
247
+ },
248
+ get_color_space: {
249
+ description: "Get the color space information for a project item",
250
+ parameters: {
251
+ type: "object",
252
+ properties: {
253
+ item_id: {
254
+ type: "string",
255
+ description: "Node ID or name of the project item",
256
+ },
257
+ },
258
+ required: ["item_id"],
259
+ },
260
+ handler: async (args) => {
261
+ const script = buildToolScript(`
262
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
263
+ if (!item) return __error("Item not found");
264
+
265
+ var info = { item: item.name };
266
+ try { info.colorSpace = item.getColorSpace(); } catch(e) { info.colorSpace = "unknown"; }
267
+ try { info.originalColorSpace = item.getOriginalColorSpace(); } catch(e) {}
268
+ try { info.embeddedLUT = item.getEmbeddedLUTID(); } catch(e) {}
269
+ try { info.inputLUT = item.getInputLUTID(); } catch(e) {}
270
+
271
+ return __result(info);
272
+ `);
273
+ return sendCommand(script, bridgeOptions);
274
+ },
275
+ },
276
+ };
277
+ }
278
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1,199 @@
1
+ import { BridgeOptions } from "../bridge/file-bridge.js";
2
+ export declare function getMulticamTools(bridgeOptions: BridgeOptions): {
3
+ create_multicam_sequence: {
4
+ description: string;
5
+ parameters: {
6
+ type: "object";
7
+ properties: {
8
+ name: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ clip_indices: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ sync_point: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ };
21
+ required: string[];
22
+ };
23
+ handler: (args: {
24
+ name?: string;
25
+ clip_indices: number[];
26
+ sync_point?: string;
27
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
28
+ };
29
+ switch_multicam_angle: {
30
+ description: string;
31
+ parameters: {
32
+ type: "object";
33
+ properties: {
34
+ track_index: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ time: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ angle_index: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ };
47
+ required: string[];
48
+ };
49
+ handler: (args: {
50
+ track_index: number;
51
+ time: number;
52
+ angle_index: number;
53
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
54
+ };
55
+ flatten_multicam: {
56
+ description: string;
57
+ parameters: {
58
+ type: "object";
59
+ properties: {
60
+ sequence_index: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ };
65
+ required: string[];
66
+ };
67
+ handler: (args: {
68
+ sequence_index: number;
69
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
70
+ };
71
+ get_multicam_angles: {
72
+ description: string;
73
+ parameters: {
74
+ type: "object";
75
+ properties: {
76
+ track_index: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ clip_index: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ };
85
+ required: string[];
86
+ };
87
+ handler: (args: {
88
+ track_index: number;
89
+ clip_index: number;
90
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
91
+ };
92
+ create_proxy: {
93
+ description: string;
94
+ parameters: {
95
+ type: "object";
96
+ properties: {
97
+ project_item_index: {
98
+ type: string;
99
+ description: string;
100
+ };
101
+ preset_path: {
102
+ type: string;
103
+ description: string;
104
+ };
105
+ };
106
+ required: string[];
107
+ };
108
+ handler: (args: {
109
+ project_item_index: number;
110
+ preset_path: string;
111
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
112
+ };
113
+ attach_proxy: {
114
+ description: string;
115
+ parameters: {
116
+ type: "object";
117
+ properties: {
118
+ project_item_index: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ proxy_path: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ };
127
+ required: string[];
128
+ };
129
+ handler: (args: {
130
+ project_item_index: number;
131
+ proxy_path: string;
132
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
133
+ };
134
+ has_proxy: {
135
+ description: string;
136
+ parameters: {
137
+ type: "object";
138
+ properties: {
139
+ project_item_index: {
140
+ type: string;
141
+ description: string;
142
+ };
143
+ };
144
+ required: string[];
145
+ };
146
+ handler: (args: {
147
+ project_item_index: number;
148
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
149
+ };
150
+ get_proxy_path: {
151
+ description: string;
152
+ parameters: {
153
+ type: "object";
154
+ properties: {
155
+ project_item_index: {
156
+ type: string;
157
+ description: string;
158
+ };
159
+ };
160
+ required: string[];
161
+ };
162
+ handler: (args: {
163
+ project_item_index: number;
164
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
165
+ };
166
+ toggle_proxies: {
167
+ description: string;
168
+ parameters: {
169
+ type: "object";
170
+ properties: {
171
+ enabled: {
172
+ type: string;
173
+ description: string;
174
+ };
175
+ };
176
+ required: string[];
177
+ };
178
+ handler: (args: {
179
+ enabled: boolean;
180
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
181
+ };
182
+ detach_proxy: {
183
+ description: string;
184
+ parameters: {
185
+ type: "object";
186
+ properties: {
187
+ project_item_index: {
188
+ type: string;
189
+ description: string;
190
+ };
191
+ };
192
+ required: string[];
193
+ };
194
+ handler: (args: {
195
+ project_item_index: number;
196
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
197
+ };
198
+ };
199
+ //# sourceMappingURL=multicam.d.ts.map
@@ -0,0 +1,212 @@
1
+ import { buildToolScript } from "../bridge/script-builder.js";
2
+ import { sendCommand } from "../bridge/file-bridge.js";
3
+ export function getMulticamTools(bridgeOptions) {
4
+ return {
5
+ create_multicam_sequence: {
6
+ description: "Create a multicam sequence from multiple project items. Clips are synced based on the specified sync point method.",
7
+ parameters: {
8
+ type: "object",
9
+ properties: {
10
+ name: { type: "string", description: "Name for the new multicam sequence. Default: 'Multicam Sequence'." },
11
+ clip_indices: { type: "array", description: "Array of project item indices (from root item) to include as camera angles. At least 2 required." },
12
+ sync_point: { type: "string", description: "How to sync the clips: 'inPoint', 'outPoint', 'timecode', or 'marker'. Default: 'inPoint'." },
13
+ },
14
+ required: ["clip_indices"],
15
+ },
16
+ handler: async (args) => {
17
+ const params = {
18
+ name: args.name || "Multicam Sequence",
19
+ clipIndices: args.clip_indices,
20
+ syncPoint: args.sync_point || "inPoint",
21
+ };
22
+ const paramsJson = JSON.stringify(JSON.stringify(params));
23
+ const script = buildToolScript(`
24
+ var result = createMulticamSequence(${paramsJson});
25
+ var parsed = JSON.parse(result);
26
+ if (!parsed.success) return __error(parsed.error);
27
+ return __result(parsed.data);
28
+ `);
29
+ return sendCommand(script, bridgeOptions);
30
+ },
31
+ },
32
+ switch_multicam_angle: {
33
+ description: "Switch the camera angle of a multicam clip at a specific time point. Used during multicam editing to cut between cameras.",
34
+ parameters: {
35
+ type: "object",
36
+ properties: {
37
+ track_index: { type: "number", description: "Video track index containing the multicam clip (0-based)" },
38
+ time: { type: "number", description: "Time in seconds where the angle switch should occur" },
39
+ angle_index: { type: "number", description: "Camera angle index to switch to (0-based)" },
40
+ },
41
+ required: ["track_index", "time", "angle_index"],
42
+ },
43
+ handler: async (args) => {
44
+ const script = buildToolScript(`
45
+ var result = switchMulticamAngle(${args.track_index}, ${args.time}, ${args.angle_index});
46
+ var parsed = JSON.parse(result);
47
+ if (!parsed.success) return __error(parsed.error);
48
+ return __result(parsed.data);
49
+ `);
50
+ return sendCommand(script, bridgeOptions);
51
+ },
52
+ },
53
+ flatten_multicam: {
54
+ description: "Flatten a multicam sequence into a regular single-camera sequence. This bakes all the camera switches.",
55
+ parameters: {
56
+ type: "object",
57
+ properties: {
58
+ sequence_index: { type: "number", description: "Index of the multicam sequence to flatten (0-based, from project sequences list)" },
59
+ },
60
+ required: ["sequence_index"],
61
+ },
62
+ handler: async (args) => {
63
+ const script = buildToolScript(`
64
+ var result = flattenMulticam(${args.sequence_index});
65
+ var parsed = JSON.parse(result);
66
+ if (!parsed.success) return __error(parsed.error);
67
+ return __result(parsed.data);
68
+ `);
69
+ return sendCommand(script, bridgeOptions);
70
+ },
71
+ },
72
+ get_multicam_angles: {
73
+ description: "Get the list of available camera angles for a multicam clip on the timeline.",
74
+ parameters: {
75
+ type: "object",
76
+ properties: {
77
+ track_index: { type: "number", description: "Video track index containing the multicam clip (0-based)" },
78
+ clip_index: { type: "number", description: "Clip index on the track (0-based)" },
79
+ },
80
+ required: ["track_index", "clip_index"],
81
+ },
82
+ handler: async (args) => {
83
+ const script = buildToolScript(`
84
+ var result = getMulticamAngles(${args.track_index}, ${args.clip_index});
85
+ var parsed = JSON.parse(result);
86
+ if (!parsed.success) return __error(parsed.error);
87
+ return __result(parsed.data);
88
+ `);
89
+ return sendCommand(script, bridgeOptions);
90
+ },
91
+ },
92
+ create_proxy: {
93
+ description: "Create a proxy file for a project item using a specified encoding preset. Proxies enable low-res editing with high-res final output.",
94
+ parameters: {
95
+ type: "object",
96
+ properties: {
97
+ project_item_index: { type: "number", description: "Project item index (0-based, from root item children)" },
98
+ preset_path: { type: "string", description: "Path to the encoding preset file for proxy creation" },
99
+ },
100
+ required: ["project_item_index", "preset_path"],
101
+ },
102
+ handler: async (args) => {
103
+ const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
104
+ const script = buildToolScript(`
105
+ var result = createProxy(${args.project_item_index}, "${presetPathEsc}");
106
+ var parsed = JSON.parse(result);
107
+ if (!parsed.success) return __error(parsed.error);
108
+ return __result(parsed.data);
109
+ `);
110
+ return sendCommand(script, bridgeOptions);
111
+ },
112
+ },
113
+ attach_proxy: {
114
+ description: "Attach an existing proxy file to a project item.",
115
+ parameters: {
116
+ type: "object",
117
+ properties: {
118
+ project_item_index: { type: "number", description: "Project item index (0-based, from root item children)" },
119
+ proxy_path: { type: "string", description: "Full path to the proxy media file" },
120
+ },
121
+ required: ["project_item_index", "proxy_path"],
122
+ },
123
+ handler: async (args) => {
124
+ const proxyPathEsc = args.proxy_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
125
+ const script = buildToolScript(`
126
+ var result = attachProxy(${args.project_item_index}, "${proxyPathEsc}");
127
+ var parsed = JSON.parse(result);
128
+ if (!parsed.success) return __error(parsed.error);
129
+ return __result(parsed.data);
130
+ `);
131
+ return sendCommand(script, bridgeOptions);
132
+ },
133
+ },
134
+ has_proxy: {
135
+ description: "Check if a project item has a proxy attached.",
136
+ parameters: {
137
+ type: "object",
138
+ properties: {
139
+ project_item_index: { type: "number", description: "Project item index (0-based, from root item children)" },
140
+ },
141
+ required: ["project_item_index"],
142
+ },
143
+ handler: async (args) => {
144
+ const script = buildToolScript(`
145
+ var result = hasProxy(${args.project_item_index});
146
+ var parsed = JSON.parse(result);
147
+ if (!parsed.success) return __error(parsed.error);
148
+ return __result(parsed.data);
149
+ `);
150
+ return sendCommand(script, bridgeOptions);
151
+ },
152
+ },
153
+ get_proxy_path: {
154
+ description: "Get the file path of the proxy attached to a project item.",
155
+ parameters: {
156
+ type: "object",
157
+ properties: {
158
+ project_item_index: { type: "number", description: "Project item index (0-based, from root item children)" },
159
+ },
160
+ required: ["project_item_index"],
161
+ },
162
+ handler: async (args) => {
163
+ const script = buildToolScript(`
164
+ var result = getProxyPath(${args.project_item_index});
165
+ var parsed = JSON.parse(result);
166
+ if (!parsed.success) return __error(parsed.error);
167
+ return __result(parsed.data);
168
+ `);
169
+ return sendCommand(script, bridgeOptions);
170
+ },
171
+ },
172
+ toggle_proxies: {
173
+ description: "Enable or disable proxy playback for the entire project.",
174
+ parameters: {
175
+ type: "object",
176
+ properties: {
177
+ enabled: { type: "boolean", description: "True to enable proxy playback, false to use original media" },
178
+ },
179
+ required: ["enabled"],
180
+ },
181
+ handler: async (args) => {
182
+ const script = buildToolScript(`
183
+ var result = toggleProxies(${args.enabled});
184
+ var parsed = JSON.parse(result);
185
+ if (!parsed.success) return __error(parsed.error);
186
+ return __result(parsed.data);
187
+ `);
188
+ return sendCommand(script, bridgeOptions);
189
+ },
190
+ },
191
+ detach_proxy: {
192
+ description: "Detach/remove the proxy from a project item (reverts to original media).",
193
+ parameters: {
194
+ type: "object",
195
+ properties: {
196
+ project_item_index: { type: "number", description: "Project item index (0-based, from root item children)" },
197
+ },
198
+ required: ["project_item_index"],
199
+ },
200
+ handler: async (args) => {
201
+ const script = buildToolScript(`
202
+ var result = detachProxy(${args.project_item_index});
203
+ var parsed = JSON.parse(result);
204
+ if (!parsed.success) return __error(parsed.error);
205
+ return __result(parsed.data);
206
+ `);
207
+ return sendCommand(script, bridgeOptions);
208
+ },
209
+ },
210
+ };
211
+ }
212
+ //# sourceMappingURL=multicam.js.map