premiere-pro-mcp 1.18.4 → 1.18.6

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 (41) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +23 -24
  3. package/after-effects-cep-plugin/CSXS/manifest.xml +2 -2
  4. package/artifacts/MCPBridgeCEP.zxp +0 -0
  5. package/cep-plugin/CSXS/manifest.xml +3 -3
  6. package/cep-plugin/index.html +1 -1
  7. package/cep-plugin/updater.cjs +1 -1
  8. package/dist/bridge/script-builder.js +64 -0
  9. package/dist/http-security.d.ts +6 -5
  10. package/dist/http-security.js +10 -25
  11. package/dist/http-server.js +32 -251
  12. package/dist/tools/advanced.js +81 -12
  13. package/dist/tools/media.js +27 -2
  14. package/dist/tools/playback.js +12 -1
  15. package/dist/tools/project.d.ts +19 -2
  16. package/dist/tools/project.js +59 -6
  17. package/dist/tools/sequence.js +181 -24
  18. package/dist/tools/spot-workflows.d.ts +3 -3
  19. package/dist/tools/timeline.js +90 -15
  20. package/dist/tools/track-targeting.js +47 -14
  21. package/dist/tools/utility.d.ts +50 -4
  22. package/dist/tools/utility.js +182 -44
  23. package/dist/tools/uxp-advanced-workflows.js +2 -2
  24. package/dist/tools/uxp.js +1 -1
  25. package/docs/supported-actions.md +12 -12
  26. package/package.json +3 -6
  27. package/public-product-manifest.json +1 -1
  28. package/scripts/validate-adobe-marketplace-branding.mjs +0 -8
  29. package/uxp-plugin/advanced-workflows.cjs +90 -14
  30. package/uxp-plugin/commands.cjs +67 -2
  31. package/uxp-plugin/index.cjs +2 -30
  32. package/uxp-plugin/manifest.json +1 -1
  33. package/dist/homepage-experiment.d.ts +0 -32
  34. package/dist/homepage-experiment.js +0 -327
  35. package/dist/landing-compression.d.ts +0 -3
  36. package/dist/landing-compression.js +0 -16
  37. package/dist/landing-documents.d.ts +0 -38
  38. package/dist/landing-documents.js +0 -142
  39. package/scripts/build-workflow-starter-kit.py +0 -92
  40. package/scripts/generate-marketing-reference.mjs +0 -127
  41. package/scripts/tool-reference-data.mjs +0 -37
package/CHANGELOG.md CHANGED
@@ -6,6 +6,44 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.18.6] - 2026-09-29
10
+
11
+ ### Fixed
12
+
13
+ - `set_scale_width_height` never set the height. It wrote to a "Scale Height" property that Premiere's Motion effect does not have, then reported success. With Uniform Scale off, Premiere keeps the height in Motion > Scale. The tool now writes the width to Scale Width and the height to Scale, reads all three values back, fails when any does not match, and rejects values outside 0-10000 before building a script. (#642)
14
+
15
+ ### Changed
16
+
17
+ - The website moved to its own repository, [leancoderkavy/premiere-pro-mcp-site](https://github.com/leancoderkavy/premiere-pro-mcp-site), and is served at `https://premiere-pro-mcp.com`. It reads versions and tool counts from the published npm package and syncs them on its own, so releases here no longer update website files.
18
+ - The HTTP transport no longer serves website pages, the homepage experiment, or `/api/landing-events`. It answers `/mcp`, `/health`, and OAuth protected-resource metadata only. Other `GET` and `HEAD` paths on `premiere-pro-mcp.fly.dev` or a `*.premiere-pro-mcp.com` host redirect (`308`) to the same path on `https://premiere-pro-mcp.com`; any other host gets a JSON `404`. Its Content Security Policy is now deny-all, `/health` reports the running package `version`, and the `MCP_MAX_CONCURRENT_LANDING_DOCUMENTS`, `MCP_LANDING_MAX_HTML_BYTES`, and `MCP_LANDING_HTML_CACHE_BYTES` settings are gone. The Docker image no longer builds the site.
19
+
20
+ ### Verification scope
21
+
22
+ - Automated checks validate package behavior. The `set_scale_width_height` fix follows a live report from Premiere 26.5.1 but has not been re-verified on a licensed Premiere host. The website move was verified live: premiere-pro-mcp.com serves from Vercel, and the Fly deployment answers `/health` and redirects other paths to the website.
23
+
24
+ ## [1.18.5] - 2026-09-28
25
+
26
+ ### Fixed
27
+
28
+ - `unnest_sequence` refuses before any change when the nest is trimmed, speed-changed or reversed, a target track is locked, or the target range already holds a clip. It now overwrites each nested clip's exact source range in place instead of inserting it, which pushed later clips down the track and ignored each clip's in and out. It reads every clip back afterwards and reports "The timeline changed … Use Undo" on any mismatch. Effects, keyframes, and transitions inside the nest are not carried over; the description says so. (#642)
29
+ - `move_clip_to_track` refuses before calling QE when either track is locked or the target range is occupied, finds the moved clip even when its node ID changes, and reports a copy left on the original track or a changed start, length, or in/out. It is now marked EXPERIMENTAL (QE) and rejects non-integer track numbers. (#642)
30
+ - `replace_clip` overwrites exactly the old clip's start and end instead of inserting the new item, which pushed later clips down the track and used the new item's full length. It verifies the span, that the old clip is gone, and that track clip counts are unchanged, and refuses on a locked track. The old clip's linked partner is left in place; the description says so. (#642)
31
+ - `export_frame_uxp` checks that the PNG exists after Premiere's exporter returns. It fails when no file was written, reports the real path when the host names the file differently (with or without the `.png` extension), and reports `committed_unverified` when UXP storage cannot check or the file already existed before the export. The panel's direct frame-export path now uses the same handler. (#642)
32
+ - `encode_media_uxp` results for jobs sent to Adobe Media Encoder carry `ameQueueStarted: "unknown"` and a note. Premiere 26.5.1 accepted UXP encodes into the Media Encoder queue without starting it. The tool does not start the queue through CEP; the note points to Media Encoder or `start_batch_encode`. (#642)
33
+ - `organize_project_items_uxp` remove verifies absence by walking the project tree instead of checking the Project panel selection first, which could still hold the removed item and turned a successful removal into `committed_unverified`. Remove now requires `project_item_id` and never falls back to the selection. (#642)
34
+ - `refresh_media` reads the interpreted frame rate before and after the refresh. When the refresh leaves an implausible rate (reported on stills as 29.97 becoming 2.75e-8), it restores the previous rate, reads it back, and reports `repaired: true`; if the restore does not stick, it fails with the manual fix. A real rate change from the source file is kept. (#642)
35
+ - `edit_timeline_uxp` MOGRT inserts (`insert_mogrt_path`, `insert_mogrt_library`) read the placement back instead of reporting the SequenceEditor return value. The result is `verified` when a returned item starts at the requested time, within one frame, on the requested video track. It fails with `UXP_VERIFICATION_FAILED` when nothing is there, and stays `committed_unverified` when the track cannot be read. Results include `sequenceId`, `requested`, and up to 16 `placements`. (#642)
36
+ - `set_sequence_pixel_aspect_ratio` compares the read-back ratio as a number, so a host that formats it as `1`, `1:1`, or `1.42222` no longer fails a correct update. A real mismatch reports the value Premiere read back. (#642)
37
+ - `play_source_monitor` fails with "No clip is loaded in the Source Monitor" instead of reporting a playback request that does nothing, names the loaded clip, and rejects a `speed` that is zero, not finite, or outside -64 to 64 before building a script. (#642)
38
+ - `create_bars_and_tone` takes an optional `bin_id`. The bin is resolved before anything is created, the new item is moved there, and its location is read back; the result is `committed_unverified` when the move cannot be confirmed. (#642)
39
+ - `get_unused_media` and `get_duplicate_media` page their output with `offset`, `limit` (1-500, default 100), and a case-insensitive `contains` name filter, and return `total`, `returned`, `truncated`, and `nextOffset`. Large projects no longer return unbounded lists. (#642)
40
+ - `get_duplicate_media` no longer groups different After Effects compositions imported from the same `.aep` or `.aepx` as duplicates. The same composition imported twice is still reported. (#642)
41
+ - `get_project_panel_metadata` caps the returned XML at `max_chars` (256-200000, default 20000) and reports `truncated` and `totalChars`. Truncated XML is marked as unsafe to pass back to `set_project_panel_metadata`. (#642)
42
+
43
+ ### Verification scope
44
+
45
+ - Automated checks validate package behavior. These changes follow live reports from Premiere 26.5.1 but have not been re-verified on a licensed Premiere host. The `unnest_sequence` and `replace_clip` overwrite path (`Track.overwriteClip` with source In/Out marks) has only been exercised against test fakes; its readback reports any host difference as a failure.
46
+
9
47
  ## [1.18.4] - 2026-09-28
10
48
 
11
49
  ### Fixed
package/README.md CHANGED
@@ -22,7 +22,7 @@ The [completed AE render handoff](docs/after-effects-render-handoff.md) previews
22
22
  [![Node.js](https://img.shields.io/badge/Node.js-20.19%2B-green.svg)](https://nodejs.org)
23
23
  [![MCP](https://img.shields.io/badge/MCP-2026--07--28-purple.svg)](https://modelcontextprotocol.io/specification/2026-07-28)
24
24
  [![npm](https://img.shields.io/npm/v/premiere-pro-mcp.svg)](https://www.npmjs.com/package/premiere-pro-mcp)
25
- [![Fly.io](https://img.shields.io/badge/Fly.io-deployed-7C3AED.svg)](https://premiere-pro-mcp.fly.dev)
25
+ [![Website](https://img.shields.io/badge/website-premiere--pro--mcp.com-7C3AED.svg)](https://premiere-pro-mcp.com/)
26
26
  [![Premiere Pro](https://img.shields.io/badge/Premiere%20Pro-2020--2026-9999FF.svg)](https://www.adobe.com/products/premiere.html)
27
27
 
28
28
  [![npm downloads](https://img.shields.io/npm/dm/premiere-pro-mcp.svg?label=npm%20downloads)](https://www.npmjs.com/package/premiere-pro-mcp)
@@ -36,7 +36,7 @@ The [completed AE render handoff](docs/after-effects-render-handoff.md) previews
36
36
 
37
37
  ---
38
38
 
39
- ![MCP for Adobe Premiere Pro turns a structured AI request into an organized local editing workflow](landing/public/marketing/premiere-pro-mcp-campaign-hero-v1.png)
39
+ ![MCP for Adobe Premiere Pro turns a structured AI request into an organized local editing workflow](https://premiere-pro-mcp.com/marketing/premiere-pro-mcp-campaign-hero-v1.png)
40
40
 
41
41
  <details>
42
42
  <summary><strong>Table of contents</strong></summary>
@@ -110,9 +110,9 @@ The current source exposes 384 core tools for supported workflow steps spanning
110
110
 
111
111
  <a id="latest-release"></a>
112
112
 
113
- ### Latest release: 1.18.3
113
+ ### Latest release: 1.18.5
114
114
 
115
- The published v1.18.3 npm artifact contains **384 core tools**, 382 in its default profile,
115
+ The published v1.18.5 npm artifact contains **384 core tools**, 382 in its default profile,
116
116
  and 478 with a compatible UXP connection. The development catalog above can include
117
117
  unreleased work. See the [versioned facts and package provenance](https://premiere-pro-mcp.com/facts/).
118
118
 
@@ -154,7 +154,7 @@ if the connection is unavailable.
154
154
  manifest, and proof runbook make workflow and verification boundaries
155
155
  inspectable without claiming a licensed-host walkthrough occurred.
156
156
  - **Faster, clearer delivery:** immutable MCP registration work is reused
157
- safely across stateless requests, and the landing now has a lighter,
157
+ safely across stateless requests, and the website gained a lighter,
158
158
  mobile-first workflow view plus current machine-readable facts and crawl
159
159
  guidance for its public pages.
160
160
  - **Explicit boundary:** the hosted endpoint remains an operator-managed MCP
@@ -162,7 +162,7 @@ if the connection is unavailable.
162
162
  local Premiere processes. See the generated [supported action catalog](docs/supported-actions.md)
163
163
  for individual capability and verification contracts.
164
164
 
165
- See the [v1.18.3 release notes](https://github.com/leancoderkavy/premiere-pro-mcp/releases/tag/v1.18.3)
165
+ See the [v1.18.5 release notes](https://github.com/leancoderkavy/premiere-pro-mcp/releases/tag/v1.18.5)
166
166
  for complete details. Live installation in Premiere Pro still requires host verification.
167
167
 
168
168
  ### Current MCP protocol support
@@ -210,7 +210,7 @@ their bins, media rules, and organization rules before a facility uses one.
210
210
  > ### Install the published package (verify the name)
211
211
  >
212
212
  > ```bash
213
- > npm i -g premiere-pro-mcp@1.18.3
213
+ > npm i -g premiere-pro-mcp@1.18.5
214
214
  > ```
215
215
  >
216
216
  > This repository publishes only **`premiere-pro-mcp`**. A differently named package (`adobe-premiere-pro-mcp`) may also declare a `premiere-pro-mcp` executable. Before configuring a client, confirm:
@@ -218,7 +218,7 @@ their bins, media rules, and organization rules before a facility uses one.
218
218
  > | Check | Expected |
219
219
  > | --- | --- |
220
220
  > | Package name | `premiere-pro-mcp` (not `adobe-premiere-pro-mcp`) |
221
- > | Version | `1.18.3` |
221
+ > | Version | `1.18.5` |
222
222
  > | Homepage / repo | https://premiere-pro-mcp.com/ · https://github.com/leancoderkavy/premiere-pro-mcp |
223
223
  >
224
224
  > ```bash
@@ -231,9 +231,9 @@ their bins, media rules, and organization rules before a facility uses one.
231
231
 
232
232
  ### Easiest supported path: Claude Desktop
233
233
 
234
- 1. Download the current [Claude Desktop bundle (`.mcpb`)](https://github.com/leancoderkavy/premiere-pro-mcp/releases/download/v1.18.3/premiere-pro-mcp-1.18.3.mcpb).
234
+ 1. Download the current [Claude Desktop bundle (`.mcpb`)](https://github.com/leancoderkavy/premiere-pro-mcp/releases/download/v1.18.5/premiere-pro-mcp-1.18.5.mcpb).
235
235
  2. In Claude Desktop, open **Settings > Extensions > Advanced settings > Install Extension**, select the downloaded bundle, and restart Claude Desktop.
236
- 3. Download the separate [signed Premiere connector (`.zxp`)](https://github.com/leancoderkavy/premiere-pro-mcp/releases/download/v1.18.3/MCPBridgeCEP.zxp). Open it with your trusted ZXP installer. If your computer has no ZXP installer, use the npm connector installer in **Advanced setup** below.
236
+ 3. Download the separate [signed Premiere connector (`.zxp`)](https://github.com/leancoderkavy/premiere-pro-mcp/releases/download/v1.18.5/MCPBridgeCEP.zxp). Open it with your trusted ZXP installer. If your computer has no ZXP installer, use the npm connector installer in **Advanced setup** below.
237
237
  4. Restart Premiere, open a project, then open **Window > Extensions > MCP for Adobe Premiere Pro**.
238
238
  5. In Claude, enter: `Safely check my Premiere connection with verify_premiere_connection. Make no changes.`
239
239
 
@@ -241,7 +241,7 @@ The Claude bundle contains the local MCP server, so this route does not require
241
241
 
242
242
  ### First proof, before the first edit
243
243
 
244
- ![Illustrated local Premiere MCP workflow](landing/public/premiere-pro-mcp-demo-poster.png)
244
+ ![Illustrated local Premiere MCP workflow](https://premiere-pro-mcp.com/premiere-pro-mcp-demo-poster.png)
245
245
 
246
246
  *This is an illustrated workflow, not a Premiere panel screenshot or licensed-host proof.*
247
247
 
@@ -533,11 +533,11 @@ From a clone of this repository:
533
533
  ```bash
534
534
  codex plugin marketplace add .
535
535
  codex plugin add premiere-pro@premiere-pro-mcp
536
- npx -y premiere-pro-mcp@1.18.3 --install-cep
536
+ npx -y premiere-pro-mcp@1.18.5 --install-cep
537
537
  ```
538
538
 
539
539
  Restart Premiere Pro and start a new Codex session after installation. The plugin
540
- launches `premiere-pro-mcp@1.18.3` through `npx`; the separate CEP installation is
540
+ launches `premiere-pro-mcp@1.18.5` through `npx`; the separate CEP installation is
541
541
  required because the MCP server communicates with the running Premiere host through
542
542
  the local bridge.
543
543
 
@@ -575,7 +575,7 @@ For Claude Code, add this repository as a marketplace and install the plugin:
575
575
  Then install the Premiere bridge and start a new Claude Code session:
576
576
 
577
577
  ```bash
578
- npx -y premiere-pro-mcp@1.18.3 --install-cep
578
+ npx -y premiere-pro-mcp@1.18.5 --install-cep
579
579
  ```
580
580
 
581
581
  The Claude Code package lives in
@@ -843,7 +843,7 @@ argument, undo, confirmation, and live-host boundaries.
843
843
 
844
844
  ## Architecture
845
845
 
846
- ![Local-first MCP for Adobe Premiere Pro workflow from AI assistant through the MCP bridge to a verified Premiere result](landing/public/marketing/premiere-pro-mcp-workflow-v1.png)
846
+ ![Local-first MCP for Adobe Premiere Pro workflow from AI assistant through the MCP bridge to a verified Premiere result](https://premiere-pro-mcp.com/marketing/premiere-pro-mcp-workflow-v1.png)
847
847
 
848
848
  **Local (stdio):**
849
849
 
@@ -1235,8 +1235,10 @@ feature coverage, playback, rendering, or editorial correctness.
1235
1235
 
1236
1236
  The server includes an HTTP/SSE transport (`src/http-server.ts`) for remote access via [mcp-remote](https://github.com/geelen/mcp-remote) or any MCP client that supports Streamable HTTP.
1237
1237
 
1238
- A live operator-managed instance is running at **https://premiere-pro-mcp.fly.dev**.
1239
- It is not a public desktop relay: it cannot connect an authenticated user to
1238
+ An operator-managed MCP endpoint runs at **https://premiere-pro-mcp.fly.dev/mcp**
1239
+ (health check: `/health`). The website is **https://premiere-pro-mcp.com**, served
1240
+ from a separate repository; other paths on the Fly host redirect there.
1241
+ The endpoint is not a public desktop relay: it cannot connect an authenticated user to
1240
1242
  Premiere on that user's computer. Public users should use the local stdio setup
1241
1243
  until the separate device-pairing relay is available.
1242
1244
 
@@ -1349,9 +1351,6 @@ user/device authorization are implemented.
1349
1351
  | `MCP_MAX_REQUESTS_PER_SOCKET` | Requests permitted on one keep-alive socket | `100` |
1350
1352
  | `MCP_MAX_CONCURRENT_REQUESTS` | In-flight authenticated MCP request ceiling | `8` |
1351
1353
  | `MCP_MAX_CONCURRENT_STREAMS` | Open authenticated SSE stream ceiling; isolated from operation capacity | `32` |
1352
- | `MCP_MAX_CONCURRENT_LANDING_DOCUMENTS` | Concurrent HTML reads, nonce injection and asynchronous compression; excess work returns `503` | `4` |
1353
- | `MCP_LANDING_MAX_HTML_BYTES` | Maximum source HTML document bytes | `4194304` (4 MiB) |
1354
- | `MCP_LANDING_HTML_CACHE_BYTES` | Source HTML cache memory budget; must be at least the document byte limit | `16777216` (16 MiB) |
1355
1354
  | `PREMIERE_MCP_PROJECT_BACKUP_MAX_BYTES` | Positive integer byte budget for one project backup | `2147483648` (2 GiB) |
1356
1355
  | `MCP_RATE_LIMIT_PER_MINUTE` | Per-credential token-bucket refill rate | `120` |
1357
1356
  | `MCP_RATE_LIMIT_BURST` | Per-credential short burst allowance | `30` |
@@ -1469,10 +1468,10 @@ by default. Enable them only by setting
1469
1468
  body/socket/request limits, and applies a bounded in-process per-credential rate and concurrency limit before
1470
1469
  MCP request parsing or Premiere bridge work begins. It returns `413`, `429`, or `503` on containment failures. Configure an
1471
1470
  upstream rate limit and request-size limit too; process-local counters do not protect a multi-machine deployment.
1472
- - **The landing CSP uses a per-response nonce for scripts**, and its static assets use explicit cache policies.
1473
- Keep the server in front of the exported landing so those controls are not bypassed by a separate static host.
1474
- Source HTML is cached as immutable build output; restart the HTTP process after replacing
1475
- an export. Each response still gets a fresh nonce. HEAD requests skip body rendering.
1471
+ - **The HTTP transport serves no web pages.** It answers only `/mcp`, `/health`, and OAuth
1472
+ protected-resource metadata under a deny-all Content Security Policy. Other `GET`/`HEAD` paths on
1473
+ `premiere-pro-mcp.fly.dev` or a `*.premiere-pro-mcp.com` host redirect (`308`) to
1474
+ `https://premiere-pro-mcp.com`; every other host receives a JSON `404`.
1476
1475
  - **Media scans yield between asynchronous filesystem operations** and bound total traversal:
1477
1476
  25,000 entries, 5,000 matching files, 2,000 directories, depth 32, a 1,000-directory
1478
1477
  pending queue, and a cooperative five-second budget. A stalled OS call can exceed that
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <ExtensionManifest Version="7.0" ExtensionBundleId="com.mcp.aftereffects.bridge" ExtensionBundleVersion="1.18.4" ExtensionBundleName="MCP for Adobe After Effects">
2
+ <ExtensionManifest Version="7.0" ExtensionBundleId="com.mcp.aftereffects.bridge" ExtensionBundleVersion="1.18.6" ExtensionBundleName="MCP for Adobe After Effects">
3
3
  <ExtensionList>
4
- <Extension Id="com.mcp.aftereffects.bridge.panel" Version="1.18.4"/>
4
+ <Extension Id="com.mcp.aftereffects.bridge.panel" Version="1.18.6"/>
5
5
  </ExtensionList>
6
6
  <ExecutionEnvironment>
7
7
  <HostList>
Binary file
@@ -1,8 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <ExtensionManifest Version="7.0" ExtensionBundleId="com.mcp.premiere.bridge" ExtensionBundleVersion="1.18.4" ExtensionBundleName="MCP for Adobe Premiere Pro">
2
+ <ExtensionManifest Version="7.0" ExtensionBundleId="com.mcp.premiere.bridge" ExtensionBundleVersion="1.18.6" ExtensionBundleName="MCP for Adobe Premiere Pro">
3
3
  <ExtensionList>
4
- <Extension Id="com.mcp.premiere.bridge.panel" Version="1.18.4"/>
5
- <Extension Id="com.mcp.premiere.bridge.headless" Version="1.18.4"/>
4
+ <Extension Id="com.mcp.premiere.bridge.panel" Version="1.18.6"/>
5
+ <Extension Id="com.mcp.premiere.bridge.headless" Version="1.18.6"/>
6
6
  </ExtensionList>
7
7
  <ExecutionEnvironment>
8
8
  <HostList>
@@ -81,7 +81,7 @@
81
81
  <section class="update-section" aria-live="polite">
82
82
  <div class="update-copy">
83
83
  <span class="section-label">MCP updates</span>
84
- <strong id="updateTitle">Version 1.18.4</strong>
84
+ <strong id="updateTitle">Version 1.18.6</strong>
85
85
  <span id="updateDetail">Checking the global MCP server and connector release…</span>
86
86
  </div>
87
87
  <button id="btnUpdate" class="button button-update" onclick="handleUpdateClick()" type="button" aria-describedby="updateDetail" disabled>
@@ -7,7 +7,7 @@
7
7
  })(this, function () {
8
8
  "use strict";
9
9
 
10
- var CURRENT_VERSION = "1.18.4";
10
+ var CURRENT_VERSION = "1.18.6";
11
11
  var PACKAGE_NAME = "premiere-pro-mcp";
12
12
  var LATEST_PACKAGE_API = "https://registry.npmjs.org/" + PACKAGE_NAME;
13
13
  var LATEST_RELEASE_API =
@@ -72,6 +72,70 @@ function __writeClipSpan(item, startTicks, endTicks) {
72
72
  }
73
73
  }
74
74
 
75
+ // Tick comparisons for values that round-trip through seconds (ProjectItem
76
+ // marks take seconds). Far below one frame at any frame rate.
77
+ var __TICK_MATCH_TOL = 16;
78
+
79
+ function __isTrackLocked(track) {
80
+ try {
81
+ if (track && typeof track.isLocked === "function") return !!track.isLocked();
82
+ } catch (eLocked) {}
83
+ return false;
84
+ }
85
+
86
+ // Place exactly [inTicks, outTicks) of a project item on ONE track at
87
+ // startTicks without rippling. Track.overwriteClip places the item's In/Out
88
+ // range, so set those marks first and restore the item's own marks afterwards.
89
+ // mediaType: 1 = video, 2 = audio. Callers must prove the destination range is
90
+ // empty first; overwrite never shifts neighbours but would replace them.
91
+ // Returns { ok, attempted, marksRestored, error }. attempted=true means the
92
+ // overwrite call ran (or threw), so the timeline may have changed.
93
+ function __overwriteRangeOnTrack(track, item, startTicks, inTicks, outTicks, mediaType) {
94
+ if (!track || typeof track.overwriteClip !== "function") {
95
+ return { ok: false, attempted: false, marksRestored: true, error: "Track.overwriteClip is unavailable on this Premiere build" };
96
+ }
97
+ if (!item || typeof item.getInPoint !== "function" || typeof item.getOutPoint !== "function" ||
98
+ typeof item.setInPoint !== "function" || typeof item.setOutPoint !== "function") {
99
+ return { ok: false, attempted: false, marksRestored: true, error: "Project item In/Out marks cannot be set on this Premiere build" };
100
+ }
101
+ var originalIn = null;
102
+ var originalOut = null;
103
+ try {
104
+ originalIn = String(item.getInPoint(mediaType).ticks);
105
+ originalOut = String(item.getOutPoint(mediaType).ticks);
106
+ } catch (eMarks) {
107
+ return { ok: false, attempted: false, marksRestored: true, error: "Could not read the project item's In/Out marks" };
108
+ }
109
+ function setMarks(wantIn, wantOut) {
110
+ var currentOut = parseFloat(item.getOutPoint(mediaType).ticks);
111
+ if (parseFloat(wantIn) >= currentOut) {
112
+ item.setOutPoint(__ticksToSeconds(wantOut), mediaType);
113
+ item.setInPoint(__ticksToSeconds(wantIn), mediaType);
114
+ } else {
115
+ item.setInPoint(__ticksToSeconds(wantIn), mediaType);
116
+ item.setOutPoint(__ticksToSeconds(wantOut), mediaType);
117
+ }
118
+ return Math.abs(parseFloat(item.getInPoint(mediaType).ticks) - parseFloat(wantIn)) <= __TICK_MATCH_TOL &&
119
+ Math.abs(parseFloat(item.getOutPoint(mediaType).ticks) - parseFloat(wantOut)) <= __TICK_MATCH_TOL;
120
+ }
121
+ function restore() {
122
+ try { return setMarks(originalIn, originalOut); } catch (eRestore) { return false; }
123
+ }
124
+ var applied = false;
125
+ try { applied = setMarks(inTicks, outTicks); } catch (eSet) { applied = false; }
126
+ if (!applied) {
127
+ return { ok: false, attempted: false, marksRestored: restore(), error: "Premiere did not apply the source In/Out range to project item " + item.name };
128
+ }
129
+ var at = new Time();
130
+ at.ticks = String(startTicks);
131
+ try {
132
+ track.overwriteClip(item, at);
133
+ } catch (eOverwrite) {
134
+ return { ok: false, attempted: true, marksRestored: restore(), error: "Track.overwriteClip rejected project item " + item.name + ": " + eOverwrite.toString() };
135
+ }
136
+ return { ok: true, attempted: true, marksRestored: restore(), error: "" };
137
+ }
138
+
75
139
  function __ticksToTimecode(ticks, fps) {
76
140
  var totalSeconds = __ticksToSeconds(ticks);
77
141
  var hours = Math.floor(totalSeconds / 3600);
@@ -1,8 +1,9 @@
1
1
  import type http from "node:http";
2
- export interface HttpSecurityHeaderOptions {
3
- scriptNonce?: string;
4
- }
5
- export declare function buildContentSecurityPolicy(options?: HttpSecurityHeaderOptions): string;
2
+ /**
3
+ * The HTTP transport serves JSON, redirects, and MCP streams only. It never
4
+ * returns an HTML document, so the policy denies every fetch, frame, and form.
5
+ */
6
+ export declare function buildContentSecurityPolicy(): string;
6
7
  export declare const HTTP_SECURITY_HEADERS: Readonly<{
7
8
  "Content-Security-Policy": string;
8
9
  "Strict-Transport-Security": "max-age=31536000; includeSubDomains";
@@ -12,5 +13,5 @@ export declare const HTTP_SECURITY_HEADERS: Readonly<{
12
13
  "Permissions-Policy": "camera=(), microphone=(), geolocation=()";
13
14
  "Cross-Origin-Opener-Policy": "same-origin";
14
15
  }>;
15
- export declare function applyHttpSecurityHeaders(res: http.ServerResponse, options?: HttpSecurityHeaderOptions): void;
16
+ export declare function applyHttpSecurityHeaders(res: http.ServerResponse): void;
16
17
  //# sourceMappingURL=http-security.d.ts.map
@@ -1,24 +1,13 @@
1
- export function buildContentSecurityPolicy(options = {}) {
2
- const scriptSource = [
3
- "'self'",
4
- ...(options.scriptNonce ? [`'nonce-${options.scriptNonce}'`] : []),
5
- "https://www.googletagmanager.com",
6
- "https://us-assets.i.posthog.com",
7
- "https://eu-assets.i.posthog.com",
8
- ].join(" ");
1
+ /**
2
+ * The HTTP transport serves JSON, redirects, and MCP streams only. It never
3
+ * returns an HTML document, so the policy denies every fetch, frame, and form.
4
+ */
5
+ export function buildContentSecurityPolicy() {
9
6
  return [
10
- "default-src 'self'",
11
- "base-uri 'self'",
7
+ "default-src 'none'",
8
+ "base-uri 'none'",
12
9
  "frame-ancestors 'none'",
13
- "object-src 'none'",
14
- "form-action 'self'",
15
- "img-src 'self' data: https:",
16
- "media-src 'self'",
17
- "font-src 'self'",
18
- "style-src 'self' 'unsafe-inline'",
19
- `script-src ${scriptSource}`,
20
- "connect-src 'self' https://www.google.com https://www.google-analytics.com https://www.googletagmanager.com https://us.i.posthog.com https://eu.i.posthog.com https://*.posthog.com",
21
- "upgrade-insecure-requests",
10
+ "form-action 'none'",
22
11
  ].join("; ");
23
12
  }
24
13
  export const HTTP_SECURITY_HEADERS = Object.freeze({
@@ -30,12 +19,8 @@ export const HTTP_SECURITY_HEADERS = Object.freeze({
30
19
  "Permissions-Policy": "camera=(), microphone=(), geolocation=()",
31
20
  "Cross-Origin-Opener-Policy": "same-origin",
32
21
  });
33
- export function applyHttpSecurityHeaders(res, options = {}) {
34
- const headers = {
35
- ...HTTP_SECURITY_HEADERS,
36
- "Content-Security-Policy": buildContentSecurityPolicy(options),
37
- };
38
- for (const [name, value] of Object.entries(headers)) {
22
+ export function applyHttpSecurityHeaders(res) {
23
+ for (const [name, value] of Object.entries(HTTP_SECURITY_HEADERS)) {
39
24
  res.setHeader(name, value);
40
25
  }
41
26
  }