owner-clone-ai-mcp 1.82.0 → 1.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/domains/video.js +58 -0
- package/package.json +1 -1
package/domains/video.js
CHANGED
|
@@ -217,6 +217,23 @@ const tools = [
|
|
|
217
217
|
id: { type: 'string', description: 'プロジェクトID' },
|
|
218
218
|
}, required: ['id'] },
|
|
219
219
|
},
|
|
220
|
+
{
|
|
221
|
+
name: 'list_video_notes',
|
|
222
|
+
description: 'タイムラインに書き込まれた「修正指示」を取得します。利用者が動画編集画面で対象を指して書いたメモです。各メモの scope=対象の説明(一文)/target_items=指された対象そのもの(種類・trackIdx・index・テロップ本文・開始秒)/context=その時刻に映っているもの。⚠️ **直す対象は target_items** です(context は対象ではありません)。利用者はテロップ3件などを**まとめて1つの指示**として指せるため、context だけを見ると1件しか直りません。「修正指示を書き込みました」と言われたら、まずこれを読んでください。',
|
|
223
|
+
inputSchema: { type: 'object', properties: {
|
|
224
|
+
id: { type: 'string', description: 'プロジェクトID' },
|
|
225
|
+
include_done: { type: 'boolean', description: 'true=対応済みも含める(省略=未対応のみ)' },
|
|
226
|
+
}, required: ['id'] },
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'resolve_video_note',
|
|
230
|
+
description: '修正指示を「対応済み」にします(done:false で未対応へ戻せます)。⚠️ 実際に直してから呼んでください。',
|
|
231
|
+
inputSchema: { type: 'object', properties: {
|
|
232
|
+
id: { type: 'string', description: 'プロジェクトID' },
|
|
233
|
+
note_id: { type: 'string', description: '修正指示のID(list_video_notes の id)' },
|
|
234
|
+
done: { type: 'boolean', description: 'true=対応済み(既定)/ false=未対応へ戻す' },
|
|
235
|
+
}, required: ['id', 'note_id'] },
|
|
236
|
+
},
|
|
220
237
|
{
|
|
221
238
|
name: 'restore_video_project',
|
|
222
239
|
description: 'ゴミ箱に入れた動画プロジェクトを復元します(delete_video_project の取り消し)。',
|
|
@@ -340,6 +357,47 @@ const handlers = {
|
|
|
340
357
|
const d = await callApi(`/video/${id}`, { method: 'DELETE' });
|
|
341
358
|
return `✅ ${d.message}`;
|
|
342
359
|
},
|
|
360
|
+
list_video_notes: async ({ id, include_done }) => {
|
|
361
|
+
const d = await callApi(`/video/${id}/notes${include_done ? '?include_done=1' : ''}`);
|
|
362
|
+
if (!d.notes || d.notes.length === 0) return '未対応の修正指示はありません。';
|
|
363
|
+
// ⚠️⚠️ 2026-10-04 の是正: ここで scope と target_items を落としていた。
|
|
364
|
+
// 落とすと「この時刻に映っているもの」しか残らず、**まとめて指された指示**で
|
|
365
|
+
// AIが1件しか直せない(利用者が3件選んでも、文章にはそのうち1件しか出ない)。
|
|
366
|
+
// 対象(target_items)を必ず機械可読な形で出すこと。
|
|
367
|
+
const label = { telop: 'テロップ', audio: '音声', video: '映像', image: '画像' };
|
|
368
|
+
const itemLine = (it) => {
|
|
369
|
+
const head = `- ${label[it.kind] || it.kind}: trackIdx=${it.trackIdx} index=${it.index}`;
|
|
370
|
+
if (it.missing) return `${head} ⚠️ すでに削除されています(指示を書いた後に消された)`;
|
|
371
|
+
const body = [
|
|
372
|
+
it.text != null ? `本文「${it.text}」` : null,
|
|
373
|
+
it.start != null ? `${it.start}秒〜` : null,
|
|
374
|
+
it.mediaId ? `mediaId=${it.mediaId}` : null,
|
|
375
|
+
].filter(Boolean).join(' / ');
|
|
376
|
+
return `${head} ${body}`;
|
|
377
|
+
};
|
|
378
|
+
return d.notes.map(n => {
|
|
379
|
+
const c = n.context || {};
|
|
380
|
+
const where = [
|
|
381
|
+
c.slide ? `スライド${c.slide.slideNumber}枚目${c.slide.title ? `「${c.slide.title}」` : ''}の${c.slide.localSec}秒地点` : null,
|
|
382
|
+
c.telops && c.telops.length ? `表示中のテロップ: ${c.telops.map(t => `「${t.text}」`).join(' ')}` : null,
|
|
383
|
+
c.slide && c.slide.revealedPaths && c.slide.revealedPaths.length ? `出現済み: ${c.slide.revealedPaths.join(', ')}` : null,
|
|
384
|
+
].filter(Boolean).join(' / ');
|
|
385
|
+
const lines = [`${n.done ? '✅' : '📝'} [${n.id}] ${n.at}秒 — ${n.text}`];
|
|
386
|
+
if (n.scope) lines.push(` ↳ 対象: ${n.scope}`);
|
|
387
|
+
if (n.target_items && n.target_items.length) {
|
|
388
|
+
lines.push(` ↳ ⚠️ 直すのはこの${n.target_items.length}件(まとめて1つの指示):`);
|
|
389
|
+
n.target_items.forEach(it => lines.push(` ${itemLine(it)}`));
|
|
390
|
+
} else if (n.target) {
|
|
391
|
+
lines.push(` ↳ 対象の指定: ${JSON.stringify(n.target)}`);
|
|
392
|
+
}
|
|
393
|
+
lines.push(` ↳ 参考(この時刻に映っているもの・対象ではない): ${where || 'なし'}`);
|
|
394
|
+
return lines.join('\n');
|
|
395
|
+
}).join('\n');
|
|
396
|
+
},
|
|
397
|
+
resolve_video_note: async ({ id, note_id, done }) => {
|
|
398
|
+
const d = await callApi(`/video/${id}/notes/${note_id}/resolve`, { method: 'POST', body: JSON.stringify({ done: done !== false }) });
|
|
399
|
+
return `✅ ${d.message}(${note_id})`;
|
|
400
|
+
},
|
|
343
401
|
restore_video_project: async ({ id }) => {
|
|
344
402
|
const d = await callApi(`/video/${id}/restore`, { method: 'POST' });
|
|
345
403
|
return `✅ ${d.message}: ${d.title || id}`;
|