@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,84 @@
1
+ import { BridgeOptions } from "../bridge/file-bridge.js";
2
+ export declare function getAudioTools(bridgeOptions: BridgeOptions): {
3
+ adjust_audio_levels: {
4
+ description: string;
5
+ parameters: {
6
+ type: "object";
7
+ properties: {
8
+ node_id: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ level_db: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ };
17
+ required: string[];
18
+ };
19
+ handler: (args: {
20
+ node_id: string;
21
+ level_db: number;
22
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
23
+ };
24
+ add_audio_keyframes: {
25
+ description: string;
26
+ parameters: {
27
+ type: "object";
28
+ properties: {
29
+ node_id: {
30
+ type: string;
31
+ description: string;
32
+ };
33
+ keyframes: {
34
+ type: string;
35
+ items: {
36
+ type: string;
37
+ properties: {
38
+ time_seconds: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ level_db: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ };
47
+ required: string[];
48
+ };
49
+ description: string;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ handler: (args: {
55
+ node_id: string;
56
+ keyframes: Array<{
57
+ time_seconds: number;
58
+ level_db: number;
59
+ }>;
60
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
61
+ };
62
+ mute_track: {
63
+ description: string;
64
+ parameters: {
65
+ type: "object";
66
+ properties: {
67
+ track_index: {
68
+ type: string;
69
+ description: string;
70
+ };
71
+ muted: {
72
+ type: string;
73
+ description: string;
74
+ };
75
+ };
76
+ required: string[];
77
+ };
78
+ handler: (args: {
79
+ track_index: number;
80
+ muted: boolean;
81
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
82
+ };
83
+ };
84
+ //# sourceMappingURL=audio.d.ts.map
@@ -0,0 +1,123 @@
1
+ import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
2
+ import { sendCommand } from "../bridge/file-bridge.js";
3
+ export function getAudioTools(bridgeOptions) {
4
+ return {
5
+ adjust_audio_levels: {
6
+ description: "Adjust the audio level (volume) of a clip in dB",
7
+ parameters: {
8
+ type: "object",
9
+ properties: {
10
+ node_id: {
11
+ type: "string",
12
+ description: "Node ID of the audio or video clip",
13
+ },
14
+ level_db: {
15
+ type: "number",
16
+ description: "Audio level in dB (0 = unity, negative = quieter, positive = louder)",
17
+ },
18
+ },
19
+ required: ["node_id", "level_db"],
20
+ },
21
+ handler: async (args) => {
22
+ const script = buildToolScript(`
23
+ var result = __findClip("${escapeForExtendScript(args.node_id)}");
24
+ if (!result) return __error("Clip not found");
25
+
26
+ var clip = result.clip;
27
+ // Find the Volume component via locale-independent helper
28
+ var volComp = __findIntrinsic(clip, "volume");
29
+ if (!volComp) return __error("Could not find Volume component on clip");
30
+
31
+ var levelProp = __findProp(volComp, ["Level", "Volume", "Nivel"]);
32
+ if (!levelProp) return __error("Could not find Volume/Level property on clip");
33
+
34
+ levelProp.setValue(${args.level_db}, true);
35
+ return __result({ adjusted: true, clipName: clip.name, levelDb: ${args.level_db} });
36
+ `);
37
+ return sendCommand(script, bridgeOptions);
38
+ },
39
+ },
40
+ add_audio_keyframes: {
41
+ description: "Add audio level keyframes to create fades or level changes",
42
+ parameters: {
43
+ type: "object",
44
+ properties: {
45
+ node_id: {
46
+ type: "string",
47
+ description: "Node ID of the clip",
48
+ },
49
+ keyframes: {
50
+ type: "array",
51
+ items: {
52
+ type: "object",
53
+ properties: {
54
+ time_seconds: { type: "number", description: "Time in seconds relative to clip start" },
55
+ level_db: { type: "number", description: "Audio level in dB" },
56
+ },
57
+ required: ["time_seconds", "level_db"],
58
+ },
59
+ description: "Array of keyframe objects with time_seconds and level_db",
60
+ },
61
+ },
62
+ required: ["node_id", "keyframes"],
63
+ },
64
+ handler: async (args) => {
65
+ const keyframeCode = args.keyframes
66
+ .map((kf) => `
67
+ var kfT = new Time(); kfT.ticks = String(__secondsToTicks(${kf.time_seconds}));
68
+ levelProp.addKey(kfT);
69
+ levelProp.setValueAtKey(kfT, ${kf.level_db});`)
70
+ .join("\n");
71
+ const script = buildToolScript(`
72
+ var result = __findClip("${escapeForExtendScript(args.node_id)}");
73
+ if (!result) return __error("Clip not found");
74
+
75
+ var clip = result.clip;
76
+ var volComp = __findIntrinsic(clip, "volume");
77
+ if (!volComp) return __error("Could not find audio Volume component");
78
+ var levelProp = __findProp(volComp, ["Level", "Volume", "Nivel"]);
79
+
80
+ if (!levelProp) return __error("Could not find audio Level property");
81
+
82
+ levelProp.setTimeVarying(true);
83
+ ${keyframeCode}
84
+
85
+ return __result({ keyframesAdded: ${args.keyframes.length}, clipName: clip.name });
86
+ `);
87
+ return sendCommand(script, bridgeOptions);
88
+ },
89
+ },
90
+ mute_track: {
91
+ description: "Mute or unmute an audio track",
92
+ parameters: {
93
+ type: "object",
94
+ properties: {
95
+ track_index: {
96
+ type: "number",
97
+ description: "Audio track index (0-based)",
98
+ },
99
+ muted: {
100
+ type: "boolean",
101
+ description: "True to mute, false to unmute",
102
+ },
103
+ },
104
+ required: ["track_index", "muted"],
105
+ },
106
+ handler: async (args) => {
107
+ const script = buildToolScript(`
108
+ var seq = app.project.activeSequence;
109
+ if (!seq) return __error("No active sequence");
110
+
111
+ if (${args.track_index} >= seq.audioTracks.numTracks) return __error("Track index out of range");
112
+
113
+ var track = seq.audioTracks[${args.track_index}];
114
+ track.setMute(${args.muted ? 1 : 0});
115
+
116
+ return __result({ trackIndex: ${args.track_index}, muted: ${args.muted}, trackName: track.name });
117
+ `);
118
+ return sendCommand(script, bridgeOptions);
119
+ },
120
+ },
121
+ };
122
+ }
123
+ //# sourceMappingURL=audio.js.map
@@ -0,0 +1,30 @@
1
+ import { BridgeOptions } from "../bridge/file-bridge.js";
2
+ export declare function getCaptionTools(bridgeOptions: BridgeOptions): {
3
+ create_caption_track: {
4
+ description: string;
5
+ parameters: {
6
+ type: "object";
7
+ properties: {
8
+ item_id: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ start_seconds: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ caption_format: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ };
21
+ required: string[];
22
+ };
23
+ handler: (args: {
24
+ item_id: string;
25
+ start_seconds?: number;
26
+ caption_format?: string;
27
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
28
+ };
29
+ };
30
+ //# sourceMappingURL=captions.d.ts.map
@@ -0,0 +1,73 @@
1
+ import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
2
+ import { sendCommand } from "../bridge/file-bridge.js";
3
+ export function getCaptionTools(bridgeOptions) {
4
+ return {
5
+ create_caption_track: {
6
+ description: "Create a caption/subtitle track in the active sequence from an imported caption file (e.g., .srt, .vtt)",
7
+ parameters: {
8
+ type: "object",
9
+ properties: {
10
+ item_id: {
11
+ type: "string",
12
+ description: "Node ID or name of the imported caption project item (e.g., an .srt file)",
13
+ },
14
+ start_seconds: {
15
+ type: "number",
16
+ description: "Offset in seconds from the start of the sequence (default: 0)",
17
+ },
18
+ caption_format: {
19
+ type: "string",
20
+ description: "Caption format: 'subtitle' (default), '608', '708', 'teletext', 'ebu', 'op42', 'op47'",
21
+ },
22
+ },
23
+ required: ["item_id"],
24
+ },
25
+ handler: async (args) => {
26
+ const startSeconds = args.start_seconds ?? 0;
27
+ // Map requested format to the Sequence.* constant name and a numeric fallback.
28
+ // Numeric fallbacks follow Premiere's CaptionFormat enum ordering.
29
+ const formatMap = {
30
+ subtitle: { constant: "CAPTION_FORMAT_SUBTITLE", fallback: 0 },
31
+ "608": { constant: "CAPTION_FORMAT_608", fallback: 1 },
32
+ "708": { constant: "CAPTION_FORMAT_708", fallback: 2 },
33
+ teletext: { constant: "CAPTION_FORMAT_TELETEXT", fallback: 3 },
34
+ ebu: { constant: "CAPTION_FORMAT_OPEN_EBU", fallback: 4 },
35
+ op42: { constant: "CAPTION_FORMAT_OP42", fallback: 5 },
36
+ op47: { constant: "CAPTION_FORMAT_OP47", fallback: 6 },
37
+ };
38
+ const formatKey = args.caption_format || "subtitle";
39
+ const formatEntry = formatMap[formatKey] || formatMap["subtitle"];
40
+ const script = buildToolScript(`
41
+ var seq = app.project.activeSequence;
42
+ if (!seq) return __error("No active sequence");
43
+
44
+ var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
45
+ if (!item) return __error("Caption item not found: ${escapeForExtendScript(args.item_id)}");
46
+
47
+ // Resolve the caption format constant defensively. The Sequence.CAPTION_FORMAT_*
48
+ // constants may be undefined depending on the Premiere version, so fall back to
49
+ // the known numeric value if the constant cannot be read.
50
+ var captionFormat = ${formatEntry.fallback};
51
+ try {
52
+ if (typeof Sequence !== "undefined" && Sequence && typeof Sequence.${formatEntry.constant} !== "undefined") {
53
+ captionFormat = Sequence.${formatEntry.constant};
54
+ }
55
+ } catch (eFmt) {
56
+ captionFormat = ${formatEntry.fallback};
57
+ }
58
+
59
+ // createCaptionTrack may return undefined on success, so treat only a thrown
60
+ // error as a real failure.
61
+ try {
62
+ seq.createCaptionTrack(item, ${startSeconds}, captionFormat);
63
+ } catch (eCreate) {
64
+ return __error("Failed to create caption track: " + eCreate.toString());
65
+ }
66
+ return __result({ created: true, item: item.name, startSeconds: ${startSeconds}, format: "${formatKey}" });
67
+ `);
68
+ return sendCommand(script, bridgeOptions);
69
+ },
70
+ },
71
+ };
72
+ }
73
+ //# sourceMappingURL=captions.js.map
@@ -0,0 +1,153 @@
1
+ import { BridgeOptions } from "../bridge/file-bridge.js";
2
+ export declare function getClipboardTools(bridgeOptions: BridgeOptions): {
3
+ copy_effects_between_clips: {
4
+ description: string;
5
+ parameters: {
6
+ type: "object";
7
+ properties: {
8
+ source_node_id: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ target_node_id: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ effect_name: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ };
21
+ required: string[];
22
+ };
23
+ handler: (args: {
24
+ source_node_id: string;
25
+ target_node_id: string;
26
+ effect_name?: string;
27
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
28
+ };
29
+ copy_effect_values: {
30
+ description: string;
31
+ parameters: {
32
+ type: "object";
33
+ properties: {
34
+ source_node_id: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ target_node_id: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ effect_name: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ };
47
+ required: string[];
48
+ };
49
+ handler: (args: {
50
+ source_node_id: string;
51
+ target_node_id: string;
52
+ effect_name: string;
53
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
54
+ };
55
+ replace_clip_media: {
56
+ description: string;
57
+ parameters: {
58
+ type: "object";
59
+ properties: {
60
+ clip_node_id: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ new_item_id: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ };
69
+ required: string[];
70
+ };
71
+ handler: (args: {
72
+ clip_node_id: string;
73
+ new_item_id: string;
74
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
75
+ };
76
+ batch_apply_effect: {
77
+ description: string;
78
+ parameters: {
79
+ type: "object";
80
+ properties: {
81
+ effect_name: {
82
+ type: string;
83
+ description: string;
84
+ };
85
+ target: {
86
+ type: string;
87
+ enum: string[];
88
+ description: string;
89
+ };
90
+ track_type: {
91
+ type: string;
92
+ enum: string[];
93
+ description: string;
94
+ };
95
+ track_index: {
96
+ type: string;
97
+ description: string;
98
+ };
99
+ };
100
+ required: string[];
101
+ };
102
+ handler: (args: {
103
+ effect_name: string;
104
+ target: string;
105
+ track_type?: string;
106
+ track_index?: number;
107
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
108
+ };
109
+ remove_effect_by_name: {
110
+ description: string;
111
+ parameters: {
112
+ type: "object";
113
+ properties: {
114
+ node_id: {
115
+ type: string;
116
+ description: string;
117
+ };
118
+ effect_name: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ };
123
+ required: string[];
124
+ };
125
+ handler: (args: {
126
+ node_id: string;
127
+ effect_name: string;
128
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
129
+ };
130
+ set_blend_mode: {
131
+ description: string;
132
+ parameters: {
133
+ type: "object";
134
+ properties: {
135
+ node_id: {
136
+ type: string;
137
+ description: string;
138
+ };
139
+ blend_mode: {
140
+ type: string;
141
+ enum: string[];
142
+ description: string;
143
+ };
144
+ };
145
+ required: string[];
146
+ };
147
+ handler: (args: {
148
+ node_id: string;
149
+ blend_mode: string;
150
+ }) => Promise<import("../bridge/file-bridge.js").CommandResult>;
151
+ };
152
+ };
153
+ //# sourceMappingURL=clipboard.d.ts.map