@motionharness/bridge-davinci 0.0.0-stage → 0.0.22

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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,13 @@
1
+ Hotion Harness DaVinci Resolve Bridge (@motionharness/bridge-davinci)
2
+ Copyright 2026 MH contributors
3
+
4
+ This product includes software developed by MH contributors.
5
+ The bridge implementation moved into this optional monorepo package retains
6
+ its existing Apache License, Version 2.0 notices and previously granted rights.
7
+
8
+ This distribution bundles third-party JavaScript dependencies. Their copyright
9
+ and license notices are included in THIRD_PARTY_NOTICES.md; those dependencies
10
+ are not relicensed by the Apache License.
11
+
12
+ The native bridge is built against OpenFX 1.4 headers. Their original copyright
13
+ and BSD license are included in OPENFX_LICENSE.
package/OPENFX_LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2003-2015, The Open Effects Association Ltd. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice,
7
+ this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright notice,
9
+ this list of conditions and the following disclaimer in the documentation
10
+ and/or other materials provided with the distribution.
11
+ * Neither the name The Open Effects Association Ltd, nor the names of its
12
+ contributors may be used to endorse or promote products derived from this
13
+ software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,3 +1,115 @@
1
- # Temporary Holding Version
1
+ # Hotion Harness · DaVinci Resolve 可选组件
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 时间线承载完整的普通视频,动效源码仍在 Hotion Harness 中编辑。主 CLI 提供 `mh bridge davinci`,Agent 同时使用达芬奇官方 MCP 处理实拍剪辑、音轨和原生变速。组件不启动另一套 MCP 服务。安装组件时一并安装固定菜单、简洁小窗和侧栏 OFX;给时间线片段自动附加 OFX 尚未提供。
4
+
5
+ ## 支持范围
6
+
7
+ Studio 可发送和更新普通视频,支持透明合成;更新时核对源规格、片段状态与内容版本。Resolve 使用渲染完成的视频文件,不依赖 Studio 会话持续运行。
8
+
9
+ 当前 macOS 安装包包含桥接、固定菜单、简洁状态窗口和侧栏 OFX。侧栏读取效果自身的源视频路径,并核对当前工程的素材池身份及关联元数据,不依赖时间线选择。更新采用每个关联独立的固定视频路径;历史版本独立保存。旧关联首次更新会迁移到固定路径,旧效果若仍缓存旧路径会停止操作:保存并重新打开工程,或重新附加效果后再试,也可继续使用固定菜单。
10
+
11
+ ## 安装与恢复
12
+
13
+ ```sh
14
+ mh bridge davinci install
15
+ mh bridge davinci doctor
16
+ mh bridge davinci status
17
+ mh bridge davinci uninstall
18
+ ```
19
+
20
+ 组件与 SDK、CLI 使用相同版本号,由同一个正式 tag 发布。开发版本先运行组件的 `package` 命令,再执行 `mh bridge davinci install --package <输出的 packageDirectory>`。默认安装仅在明确请求后下载固定版本组件,主 CLI 不携带该依赖。安装会核对清单、CLI 版本和全部文件摘要,然后激活新版本。修复复用同一个命令;固定版本的本地安装包完整且兼容时直接复用,无需下载。非本组件文件或用户修改会保留并报冲突。卸载保留源工程、关联和不可变产物,也保留用户修改过的入口文件。运行中的任务会阻止卸载。
21
+
22
+ 修复或升级时,未重新指定工作目录便继续使用原目录。入口文件先完整暂存,再与组件激活记录一同登记;中断后重新安装会核对并恢复,外部修改保留且明确报错。损坏的组件版本会保留到组件目录内的 `quarantine`,再从已核对的安装包重建;不会删除源工程、关联记录或用户修改。
23
+
24
+ 组件需 Node.js 22.18+、Resolve Studio 的本机外部脚本访问,以及 FFmpeg/ffprobe;透明 ProRes 导出需要 FFmpeg 7 或更新版本。可用 `MH_FFMPEG`、`MH_FFPROBE` 指定已有可执行文件。安装和 `doctor` 不把依赖存在等同于实机验收通过。
25
+
26
+ 安装器只保存已解析的 Node、pnpm、FFmpeg、ffprobe 位置,供达芬奇菜单与后台进程启动时使用;不会复制终端中的凭据或完整环境。移动这些工具后重新运行安装命令修复。缺少 FFmpeg/ffprobe 时应先安装并运行 `doctor` 检查。
27
+
28
+ 后台任务会持续保护当前组件安装,使用其他工作目录的任务也在保护范围内。运行中尝试修复或卸载会立即返回 `TASK_BUSY`,查询和取消仍可使用。启动失败会保留原任务;`recover check` 只核对,修复原因后通过 `recover resume` 明确继续原任务。
29
+
30
+ 主 CLI 自动升级会先运行目标版本的只读兼容检查;已装组件不兼容或无法验证时停止升级并保留当前版本。组件清单可声明有上下界的 CLI 版本范围;旧清单继续要求版本完全匹配。
31
+
32
+ 后台任务的进程监督目前支持 macOS。Windows 暂无对应的进程监督实现,会在入队前返回 `WORKER_LEASE_REQUIRED`,不启动后台修改。
33
+
34
+ 工作目录默认为用户应用数据目录内的 `mh/bridge/davinci/workspace`。CLI 的 JSON 请求可明确指定 `workspace`;Studio 只操作本机宿主固定的目录。`MH_BRIDGE_DIR` 可用于隔离测试或管理指定的组件目录。
35
+
36
+ ## 侧栏入口
37
+
38
+ 运行 `mh bridge davinci install` 会一并安装菜单、小窗和 OFX。OFX 默认安装到 `/Library/OFX/Plugins`;系统目录需要权限时会请求 macOS 管理员授权,取消或失败会报告未完成,不能当作完整安装成功。安装后保存工程并重启 Resolve,给普通视频附加 Hotion Harness 滤镜。侧栏提供“编辑 Hotion Harness 工程”“更新此素材”“查看状态”和“更多…”。更新直接核对并固定目标,复用已有更新流程,影响该素材在当前工程中的全部引用。立即显示状态提示,重复点击复用正在进行的请求;不需要先打开管理窗口。效果中保存的 ID 和当前时间线选择都不能替代源路径、素材池身份及元数据的交叉核对,无法唯一确定时停止。
39
+
40
+ 自动附加、自动恢复被移除的效果和“不可单独删除”不在当前范围;用户按图文步骤自行添加侧栏,缺少视觉入口时仍可从固定菜单编辑、更新片段。新旧入口协议在升级期间并存,旧二进制仍可能给出过期路径提示,需重新启动 Resolve 才会加载新的原生入口。
41
+
42
+ ## Studio 流程
43
+
44
+ 日常操作直接使用侧栏的编辑、更新和状态按钮。没有添加侧栏 OFX 时,选中普通视频后仍可从「工作区 → 脚本 → Utility → Hotion Harness」使用“编辑工程”和“更新到达芬奇”。独立的“管理所选片段”菜单已移除;升级仅清理未被用户修改的自有旧菜单。
45
+
46
+ 组件安装后,Studio 导出面板并列显示“发送到达芬奇”。未安装时隐藏该按钮,旁边的说明提供安装命令。先打开目标 Resolve 时间线,再选择导出格式发送。已关联的源在同一位置提供“更新到达芬奇”。发送前先显示工程、时间线、空闲视频轨和播放头位置;更新前显示实际目标与本次核对的引用数量。确认后按该目标在后台完成渲染、完整解码验证和导入;动效内容或目标剪辑改变会报冲突,不覆盖用户操作。
47
+
48
+ 发送成功后提供可关闭的侧栏入口提示,图文步骤包含特效库搜索、拖入片段的真实界面截图,快捷键作为补充。选择“不再提示”后,仍可从导出区的桥接说明或侧栏“更多…”窗口底部打开图文步骤。CLI 完成发送的任务结果包含可选的 `sidebarHint`,供 Agent 在交付时说明;`mh bridge davinci sidebar-guide` 返回本机图文页位置。帮助页不修改 Resolve,也不意味着侧栏已自动附加。
49
+
50
+ MP4/H.264 用于不透明视频。MOV/ProRes 4444 或 4444 XQ 支持 straight alpha。源中的音轨当前仍由桥接明确拒绝,请让 Agent 在 Resolve 中管理音轨,避免静默丢声。
51
+
52
+ 确认并提交后返回任务 ID;真实阶段为 queued、preparing、rendering、validating、applying,再到 completed、failed、cancelled 或 outcome-unknown。重复提交同一幂等键返回原任务。网络丢失回执时,当前 Studio 页会保留已确认请求,重新打开导出面板或刷新页面只按原键查询,不自动重发。暂时查不到任务也不会改用新键;“重试原请求”明确使用原目标、版本条件和幂等键。已知任务 ID 丢失时只允许继续核对,不盲目重发。重开导出面板会核对当前源内容、已应用版本和原生关联;该轻量核对不扫描时间线或切换达芬奇页面,完整引用检查仅在明确准备更新时进行。其他素材、多目标或纯渲染任务可继续观察,面板不会把它们当成当前素材已经更新。
53
+
54
+ ## Agent 从 Resolve 开始
55
+
56
+ 1. 用达芬奇官方 MCP 读取明确的工程和时间线,完成实拍剪辑,并取得插入目标。
57
+ 2. 用主 CLI 创建或修改可编辑 Hotion Harness 工程,匹配输出尺寸、帧率和时长。
58
+ 3. 可先调用 `mh bridge davinci action prepare --project <源目录> --json '{"operation":"send","idempotencyKey":"..."}'` 获取固定目标及版本条件,将返回的 `request` 原样交给 `send`,并保留同一 `--project`。无需人工确认的 Agent 流程也可直接调用 `mh bridge davinci send --project <源目录> --json '<请求>'`。请求至少包含 `idempotencyKey`,可包含 `export`(与 `mh render` 相同的格式/编码/透明度等选项)以及 `scope`、`timelineId`、`track`、`recordFrame`。
59
+ 4. 用 `mh bridge davinci task --json '{"taskId":"..."}'` 查询完成结果。也可传 `idempotencyKey` 恢复丢失的任务 ID。
60
+ 5. 用 Resolve MCP 对普通视频做原生剪辑。修改动效源后,调用 `update`,指定 `bindingId`、可选 `expectedRevision` 和新的 `idempotencyKey`。
61
+
62
+ `inspect --json '{"bindingId":"...","mode":"status"}'` 只核对当前源版本与素材身份,不读取全部剪辑;默认 `inspect` 仍执行完整引用检查。`action prepare` 的结果是只读确认资料,不创建任务,也不渲染视频。
63
+
64
+ 显式管理接口还有 `bind`、`render`、`adopt`、`insert`、`apply`、`sync`、`duplicate`、`inspect`、`timeline`、`selection`、`cancel` 和 `recover`。每个动作使用 `--json`、`--file` 或 `--stdin`。用 `mh bridge davinci describe --json '{"operation":"insert"}'` 查看已安装适配器的完整请求结构。修改动作需要幂等键;支持范围以 `doctor` 和实际任务结果为准。规格变化不会自动重剪已有时间线,应发送为新素材。固定播放文件通过原生 RelinkClips 刷新,并逐次核对全部引用,不要求关闭默认全局设置。恒定变速、倒放和定格的剪辑状态会保留,但刷新结果存在以下预览限制。已关联代理和未知时间映射继续明确阻止自动更新。
65
+
66
+ `duplicate` 可仅复制编辑源,也可明确指定 `bindingId`、`itemId`、`timelineId` 及当前媒体/时间线指纹,复制编辑源与不可变视频后让这一个时间线实例使用新关联;其他实例继续引用原素材。当前原生独立实例流程限定源与时间线均为 30 fps、无已有 Take Selector、无关联音轨和曲线变速,临时归一化不可超出源时长。原生步骤写入恢复记录;发生外部改动时停止,不能凭旧状态盲目回滚。
67
+
68
+ ## 入口与历史版本
69
+
70
+ macOS 原生包安装“编辑工程”和“更新到达芬奇”两个菜单脚本,入口为 Resolve「工作区 → 脚本 → Utility → Hotion Harness」。主 CLI `edit` 可按选中片段的稳定关联打开源工程。
71
+
72
+ 侧栏“更多…”按效果自身的源路径固定素材身份,后来切换选择不会把操作转给另一段素材。窗口直接提供该关联确实应用过的历史版本、指定时间线实例的独立副本(多处引用时先明确选择具体片段)、重新定位源目录和丢失元数据时的关联修复;目录面板只在明确点击相应操作后出现。恢复版本前显示会影响的引用数量,独立副本则明确只改变一个时间线实例。结果不明时先核对原任务,再明确选择继续原任务;原任务可能包含多个目标,不会被管理窗口缩成当前一段。
73
+
74
+ 默认构建和安装包同时包含菜单、小窗和图像透传 OFX。插件仅提供源工程入口和更新状态,不承载动效渲染。普通视频不会自动附加 OFX,`entry restore` 当前返回能力不可用;缺少或删除视觉入口不影响源关联,可以继续通过固定菜单和 CLI 管理。安装 OFX 与自动附加 OFX 是两个独立能力。
75
+
76
+ 安装器默认使用官方目录 `/Library/OFX/Plugins`;`MH_DAVINCI_OFX_DIR` 可指定受支持的位置。目录权限不足时通过随包权限准备程序请求系统授权,安装结果分别报告 OFX、菜单和小窗状态。升级或修复只处理已核对的自有文件;无法完成 OFX 安装时明确报错。原生窗口作为小型 AppKit 应用随包提供,不包含浏览器、Studio 或渲染引擎。
77
+
78
+ `restore` 接受 `bindingId`、`artifactId`、`expectedRevision`、`idempotencyKey`,将同规格的历史视频复制到该关联的固定视频路径,核对目标后原子替换并刷新原素材,不覆盖动效源。当前源与旧版视频不同会如实显示过期。只丢失原生关联元数据时,可传 `associationOnly:true`、`bindingId`、`expectedRevision`、`expectedMediaFingerprint`、`idempotencyKey`:组件核对记录中的原生素材 ID、固定路径和完整文件摘要后只恢复元数据,已有其他身份时拒绝覆盖。`relink` 在源移动后核对源内容再更新位置。关联记录和目录都丢失时,需要从备份恢复或明确重新关联,不能仅凭同名文件猜测。
79
+
80
+ `migrate --json '{"legacyWorkspace":"<旧目录>"}'` 只检查旧版记录,并返回可否迁移、阻止原因和 `legacyFingerprint`。旧目录有活动任务、结果不明的任务或正在使用的协作锁时,必须先处理原任务。加 `"apply":true` 才复制到空的新工作目录;可同时传入预览的 `expectedLegacyFingerprint`。复制后再次核对旧清单和目标清单,发生并发修改时保留已有记录并停止登记。完全相同的迁移可重复执行,会返回原回执,不覆盖导入后的新编辑。备份保留旧清单的全部任务历史,工作目录搬移后仍按相对位置定位。旧任务不会自动继续,旧生成器不会原地改造成普通视频。
81
+
82
+ 迁移回执同时登记旧入口的工作目录身份。较早的回执可在原迁移请求中显式增加 `registerLegacyEntry:true` 补登记,普通重复请求仍不修改记录。`legacy entry` 只读核对迁移备份、关联和当前选中片段,返回固定目标;它本身不安装旧共享启动器转发,也不打开工程。旧入口转发安装和专用 MCP 配置退役需分别显式执行,普通安装不会接管旧入口。
83
+
84
+ `legacy retire entries --json '{"legacyWorkspace":"<旧目录>"}'` 只读预览共享 Lua 入口;确认后使用同一请求加 `apply:true`,并将预览的 `fingerprint` 填入 `expectedFingerprint`。仅接管能够按旧版模板逐字节复原、且已有完整迁移登记的入口。它转发点击时的片段身份到主 CLI 状态窗口;数据清单与原工程保留。旧任务、旧目录锁或预览后的文件变化会阻止接管。原 Lua 私有备份按路径与内容分别保留;之后修复沿用已登记的目标目录,卸载先核对并恢复原字节和权限,再移除新 helper。用户改动转发器或备份时停止自动修复、卸载。真实旧 Inspector 点击仍需宿主验收。
85
+
86
+ `legacy retire mcp --json '{"legacyWorkspace":"<旧目录>","serverName":"mh-bridge"}'` 预览已迁移旧桥接的 Codex 用户级配置。确认后仅提交 `apply:true`、`previewId` 和 `expectedPreviewFingerprint`。组件通过 Codex 官方 `mcp get` 核对有效配置,再用 `mcp remove` 移除这一项,随后读回;不自行重写 TOML。仅支持已识别的直接 Node 启动结构,项目覆盖、未知启动包装及其他客户端会保留。私有回执只备份目标配置节,供核对和手动恢复;不备份其他 MCP 的凭据。结果不明时使用原预览回执再次查询,不重复执行移除,也不覆盖后来修改的配置。已完成回执的重放只返回历史结果。客户端可能仍缓存会话,移除配置不等于已停止旧 MCP 进程。
87
+
88
+ 迁入旧记录后,`legacy preview` 接受明确的 `scope`、`timelineId` 和可选 `itemIds`,逐项列出可转换对象、保留原因、整条时间线的复制限制和预览指纹。若任何 Fusion 片段不能完整转换或未在本次范围内,包括缺少旧关联记录、未知曲线、动态缩放或其他效果,则保留原时间线,不创建转换副本。时间线含非零视频淡入淡出时也会提前拒绝:当前宿主的 `SetFades` 保存重开行为尚不能保证保留。预览列出具体片段、轨道和原因,不自动补写属性或放宽识别条件。
89
+
90
+ 仅当整条时间线通过检查时,`legacy convert` 才接受预览返回的 `previewId`、`expectedPreviewFingerprint` 与新 `idempotencyKey`,复制时间线并在副本中把完全识别的自有生成器转换为普通视频;为它们复制视频字节并建立新媒体、新关联。执行前再次检查最终转换范围,未通过时不调用 `DuplicateTimeline` 或 `ImportMedia`。原时间线、原关联和旧产物保持。转换后先对照画面再使用新时间线;恢复方式是选择保留的原时间线,不覆盖用户在副本中的后续修改。中断时使用原 taskId 查询或 `recover`,不会为同一任务再创建一个副本。旧任务已发生的原生结果仍按原记录核对,新的保护不会把部分副本误报为已回滚。
91
+
92
+ 半途转换不能安全继续时,可明确执行 `recover --json '{"taskId":"...","action":"keep-original"}'`。组件只读核对原时间线仍保持后取消剩余步骤,结果列出保留的部分副本和已导入媒体;已有副本修改不会被叫作“已回滚”,也不会自动删除。
93
+
94
+ 独立副本若在依赖安装时失败,会保留源目录并说明达芬奇步骤尚未开始。此时 `recover check` 不会再次启动依赖安装;修复依赖后,`recover resume` 必须验证副本与原公开工程包的完整内容指纹一致,才继续同一任务,不重新解包或覆盖目录。若决定结束,`keep-original` 只在源副本未登记、没有新产物或原生事务记录,且原关联和时间线仍匹配时取消剩余步骤,返回 `partial-source-retained`。一旦已经进入原生实例事务,不能用此方式绕过事务恢复检查。
95
+
96
+ 旧生成器转换为实验性功能,仅支持完整识别、原速、同帧率、整数帧裁切且整条时间线可安全复制的对象。不保证任意旧 Fusion 工程均可无损迁移。不能完整转换的 Fusion 片段、非零视频淡入淡出及其他不支持项会阻止自动转换。组件不使用 DRT 导入绕过这些限制,也不自动重配旧合成。转换后的素材沿用原产物的核验状态,未核验的旧视频不会因复制而变成已核验。
97
+
98
+ ## 开发
99
+
100
+ ```sh
101
+ pnpm --filter @motionharness/bridge-davinci build
102
+ pnpm --filter @motionharness/bridge-davinci test
103
+ ```
104
+
105
+ 用 `pnpm --filter @motionharness/bridge-davinci package` 在根目录 `.tmp/` 制作独立安装包,不发布。构建生成自包含的 `dist/runner.mjs` 和文件摘要清单。公开包只带 runner、受支持的 Resolve 脚本和入口资源,不包含验证日志、机器路径、编辑器或另一套渲染器。临时验收文件统一放在仓库根 `.tmp/`;自动测试与真实 Resolve 验收分别记录。
106
+
107
+ macOS 原生构建使用 `node packages/bridge/davinci/native/build.mjs`,生成通用 arm64/x86_64 的 `HotionHarnessStatus.app`、`HotionHarness.ofx.bundle` 和权限准备程序 `HotionHarnessInstall`。需要 Apple 命令行构建工具和 Resolve OpenFX 开发 SDK;`HOTION_OFX_SDK` 可指定 SDK 目录。二进制只输出到 `.tmp/`,不写入源码目录。
108
+
109
+ 默认 `package` 自动构建这些原生资源,也可设置 `MH_BRIDGE_NATIVE_BUILD=<完整构建目录>` 复用构建。缺少任一原生组件会停止打包。旧 `--experimental-ofx` 参数兼容保留,但不再改变包内容。开发机需要 SDK 和编译工具,用户安装发布包无需这些构建依赖。
110
+
111
+ ### 固定视频与更新恢复
112
+
113
+ 每个关联使用 `artifacts/media/<bindingId>/<文件名>` 作为播放文件,`artifacts/<artifactId>/` 保存独立的历史版本。渲染和完整视频校验成功后,先记录任务的目标、旧版本和新版本,再由原生脚本核对素材身份与剪辑状态,在同一目录原子替换播放文件,并通过 `RelinkClips` 刷新。不会覆盖历史文件或使用硬链接。渲染失败保留旧画面;发布后结果不明时保留原任务,不自动重新提交。通过管理窗口或 `recover` 核对已应用版本,只有原目标仍匹配才允许继续。
114
+
115
+ 固定路径不保证所有未知宿主版本和代理组合的行为。组件沿用已验证宿主范围,已关联代理、无法核对的媒体或不支持的时间线结构仍拒绝更新。普通视频暂停时可能保留旧帧,播放或移动播放头后才显示新画面;定格画面也可能保留旧版本。定格不因此阻止更新。状态小窗及管理窗口以一行次要文字提示“预览未刷新请播放;定格可能保留旧画面。”任务完成代表视频文件与关联已更新,不保证宿主预览已经重绘。管理窗口保留恢复版本、重新定位、修复关联等低频功能。
@@ -0,0 +1,196 @@
1
+ # Bundled third-party notices
2
+
3
+ The following installed packages contribute code to the self-contained runner. Their original license notices follow in full.
4
+
5
+ ## fflate@0.8.3
6
+
7
+ License: MIT.
8
+
9
+ ### LICENSE
10
+
11
+ MIT License
12
+
13
+ Copyright (c) 2026 Arjun Barrett
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+
33
+ ## graceful-fs@4.2.11
34
+
35
+ License: ISC.
36
+
37
+ ### LICENSE
38
+
39
+ The ISC License
40
+
41
+ Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
42
+
43
+ Permission to use, copy, modify, and/or distribute this software for any
44
+ purpose with or without fee is hereby granted, provided that the above
45
+ copyright notice and this permission notice appear in all copies.
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
48
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
49
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
50
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
51
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
52
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
53
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
54
+
55
+
56
+ ## proper-lockfile@4.1.2
57
+
58
+ License: MIT.
59
+
60
+ ### LICENSE
61
+
62
+ The MIT License (MIT)
63
+
64
+ Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
65
+
66
+ Permission is hereby granted, free of charge, to any person obtaining a copy
67
+ of this software and associated documentation files (the "Software"), to deal
68
+ in the Software without restriction, including without limitation the rights
69
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
+ copies of the Software, and to permit persons to whom the Software is
71
+ furnished to do so, subject to the following conditions:
72
+
73
+ The above copyright notice and this permission notice shall be included in
74
+ all copies or substantial portions of the Software.
75
+
76
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
82
+ THE SOFTWARE.
83
+
84
+
85
+ ## retry@0.12.0
86
+
87
+ License: MIT.
88
+
89
+ ### License
90
+
91
+ Copyright (c) 2011:
92
+ Tim Koschützki (tim@debuggable.com)
93
+ Felix Geisendörfer (felix@debuggable.com)
94
+
95
+ Permission is hereby granted, free of charge, to any person obtaining a copy
96
+ of this software and associated documentation files (the "Software"), to deal
97
+ in the Software without restriction, including without limitation the rights
98
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
+ copies of the Software, and to permit persons to whom the Software is
100
+ furnished to do so, subject to the following conditions:
101
+
102
+ The above copyright notice and this permission notice shall be included in
103
+ all copies or substantial portions of the Software.
104
+
105
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
106
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
107
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
108
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
109
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
111
+ THE SOFTWARE.
112
+
113
+
114
+ ## signal-exit@3.0.7
115
+
116
+ License: ISC.
117
+
118
+ ### LICENSE.txt
119
+
120
+ The ISC License
121
+
122
+ Copyright (c) 2015, Contributors
123
+
124
+ Permission to use, copy, modify, and/or distribute this software
125
+ for any purpose with or without fee is hereby granted, provided
126
+ that the above copyright notice and this permission notice
127
+ appear in all copies.
128
+
129
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
130
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
131
+ OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
132
+ LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
133
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
134
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
135
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
136
+
137
+
138
+ ## smol-toml@1.9.1
139
+
140
+ License: BSD-3-Clause.
141
+
142
+ ### LICENSE
143
+
144
+ Copyright (c) Squirrel Chat et al., All rights reserved.
145
+
146
+ Redistribution and use in source and binary forms, with or without
147
+ modification, are permitted provided that the following conditions are met:
148
+
149
+ 1. Redistributions of source code must retain the above copyright notice, this
150
+ list of conditions and the following disclaimer.
151
+ 2. Redistributions in binary form must reproduce the above copyright notice,
152
+ this list of conditions and the following disclaimer in the
153
+ documentation and/or other materials provided with the distribution.
154
+ 3. Neither the name of the copyright holder nor the names of its contributors
155
+ may be used to endorse or promote products derived from this software without
156
+ specific prior written permission.
157
+
158
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
159
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
160
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
161
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
162
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
163
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
164
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
165
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
166
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
167
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
168
+
169
+
170
+ ## zod@4.3.6
171
+
172
+ License: MIT.
173
+
174
+ ### LICENSE
175
+
176
+ MIT License
177
+
178
+ Copyright (c) 2025 Colin McDonnell
179
+
180
+ Permission is hereby granted, free of charge, to any person obtaining a copy
181
+ of this software and associated documentation files (the "Software"), to deal
182
+ in the Software without restriction, including without limitation the rights
183
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
184
+ copies of the Software, and to permit persons to whom the Software is
185
+ furnished to do so, subject to the following conditions:
186
+
187
+ The above copyright notice and this permission notice shall be included in all
188
+ copies or substantial portions of the Software.
189
+
190
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
191
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
192
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
193
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
194
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
195
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
196
+ SOFTWARE.