owner-clone-ai-mcp 1.70.0 → 1.71.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 +104 -0
- package/index.js +2 -1
- package/package.json +1 -1
package/domains/video.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// 動画編集ドメイン(docs/VIDEO_PLAN.md Phase 2・v1.71.0〜)
|
|
2
|
+
// スライドデッキから「要素の段階出現・切替アニメ付き」のスライド動画タイムラインを組む機能。
|
|
3
|
+
// 大原則: サーバーが持つのはタイムラインJSONのみ。音声/動画の実データ・mp4書き出しはユーザーPC側(編集画面 /video/<ID>)。
|
|
4
|
+
// → Claude Code / Desktop は手元の音声の文字起こし・SRT・台本を自分で読み、発話タイミングに合わせて
|
|
5
|
+
// timeline を組める(これがMCP連携の本命ユースケース)。
|
|
6
|
+
// ※ プランopt-inの機能(未解放プランでは403)。
|
|
7
|
+
const { callApi } = require('../lib/api');
|
|
8
|
+
|
|
9
|
+
const tools = [
|
|
10
|
+
{
|
|
11
|
+
name: 'get_video_timeline_spec',
|
|
12
|
+
description: '動画タイムライン(timeline JSON)の仕様を取得します。クリップ形式・transition/animの語彙・reveals(要素の段階出現)の組み方・音声同期のコツ。update_video_project で timeline を編集する前に一度確認してください。',
|
|
13
|
+
annotations: { readOnlyHint: true },
|
|
14
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'list_video_projects',
|
|
18
|
+
description: '動画プロジェクトの一覧(ID・タイトル・元スライドデッキ名・更新日時)を取得します。',
|
|
19
|
+
annotations: { readOnlyHint: true },
|
|
20
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'get_video_project',
|
|
24
|
+
description: '動画プロジェクトの内容を取得します。timeline=タイムラインJSON・slides=参照デッキの各スライド情報(title・note=ナレーション原稿・reveal_paths=段階出現できる要素の一覧(path と人間向けラベル))。タイムラインを編集するときは reveal_paths の path をそのまま reveals に使ってください。',
|
|
25
|
+
annotations: { readOnlyHint: true },
|
|
26
|
+
inputSchema: { type: 'object', properties: {
|
|
27
|
+
id: { type: 'string', description: 'プロジェクトID(list_video_projectsで確認)' },
|
|
28
|
+
}, required: ['id'] },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'create_video_project',
|
|
32
|
+
description: `スライドデッキから動画プロジェクトを新規作成します。deck_id を渡すと、各スライドの note(ナレーション原稿)の分量比でスライド尺を自動配分し、要素の段階出現(フェード)も等間隔で自動設定した初期タイムラインを作ります。
|
|
33
|
+
作成後の流れ: ①このツール ②必要なら update_video_project で発話タイミングに合わせて微調整 ③ユーザーが編集画面(/video/<ID>)で音声ファイルを選択し、プレビュー確認して mp4 書き出し(すべてPC内処理)。
|
|
34
|
+
手元に音声の文字起こし(タイムスタンプ付き)がある場合は、total_seconds に音声の長さを渡し、その後 update_video_project で各クリップの duration / reveals.at を発話に合わせると音声同期動画になります。`,
|
|
35
|
+
annotations: { destructiveHint: false },
|
|
36
|
+
inputSchema: { type: 'object', properties: {
|
|
37
|
+
deck_id: { type: 'string', description: '元スライドデッキID(list_slide_decksで確認)' },
|
|
38
|
+
title: { type: 'string', description: '動画タイトル(省略時はデッキ名から自動)' },
|
|
39
|
+
total_seconds: { type: 'number', description: '動画の総尺(秒)。音声の長さが分かっていれば渡す(省略時は枚数×8秒)' },
|
|
40
|
+
}, required: ['deck_id'] },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'update_video_project',
|
|
44
|
+
description: '動画プロジェクトを更新します(title / timeline)。timeline は get_video_timeline_spec の形式で全置換。既存の timeline は get_video_project で取得し、必要箇所だけ変えて渡してください(クリップの start は隙間なく連続させること)。音声実データはPC側のため、audio トラックは既存の内容を維持して渡すこと。',
|
|
45
|
+
annotations: { destructiveHint: false },
|
|
46
|
+
inputSchema: { type: 'object', properties: {
|
|
47
|
+
id: { type: 'string', description: 'プロジェクトID' },
|
|
48
|
+
title: { type: 'string' },
|
|
49
|
+
timeline: { type: 'object', description: 'タイムラインJSON(全置換・形式は get_video_timeline_spec)' },
|
|
50
|
+
}, required: ['id'] },
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'auto_build_video_timeline',
|
|
54
|
+
description: 'タイムラインを自動で組み直します(参照デッキの note 分量比で尺配分+要素出現を等間隔設定)。総尺を変えたいとき・手動編集をやり直したいときに。音声トラックは維持されます。',
|
|
55
|
+
annotations: { destructiveHint: true },
|
|
56
|
+
inputSchema: { type: 'object', properties: {
|
|
57
|
+
id: { type: 'string', description: 'プロジェクトID' },
|
|
58
|
+
total_seconds: { type: 'number', description: '動画の総尺(秒・省略時は枚数×8秒)' },
|
|
59
|
+
with_reveals: { type: 'boolean', description: 'false=要素の段階出現を付けない(省略=付ける)' },
|
|
60
|
+
}, required: ['id'] },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'delete_video_project',
|
|
64
|
+
description: '動画プロジェクトを削除します(タイムライン定義のみ削除・元スライドや手元の音声ファイルは消えません)。',
|
|
65
|
+
annotations: { destructiveHint: true },
|
|
66
|
+
inputSchema: { type: 'object', properties: {
|
|
67
|
+
id: { type: 'string', description: 'プロジェクトID' },
|
|
68
|
+
}, required: ['id'] },
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
const handlers = {
|
|
73
|
+
get_video_timeline_spec: async () => {
|
|
74
|
+
const d = await callApi('/video/schema');
|
|
75
|
+
return d.spec;
|
|
76
|
+
},
|
|
77
|
+
list_video_projects: async () => {
|
|
78
|
+
const rows = await callApi('/video');
|
|
79
|
+
if (!rows.length) return '動画プロジェクトはまだありません。create_video_project で作成できます。';
|
|
80
|
+
return rows.map(r => `- ${r.title || '無題'}${r.deck_title ? `(元: ${r.deck_title})` : ''}\n ID: ${r.id} / 更新: ${r.updated_at}`).join('\n');
|
|
81
|
+
},
|
|
82
|
+
get_video_project: async ({ id }) => {
|
|
83
|
+
const r = await callApi(`/video/${id}`);
|
|
84
|
+
return JSON.stringify(r, null, 2);
|
|
85
|
+
},
|
|
86
|
+
create_video_project: async (args) => {
|
|
87
|
+
const d = await callApi('/video', { method: 'POST', body: JSON.stringify(args) });
|
|
88
|
+
return `✅ ${d.message}\nID: ${d.id}\nタイトル: ${d.title}\n編集画面: ${d.edit_url}\n(音声ファイルの選択・プレビュー・mp4書き出しはユーザーが編集画面で行います)`;
|
|
89
|
+
},
|
|
90
|
+
update_video_project: async ({ id, ...rest }) => {
|
|
91
|
+
const d = await callApi(`/video/${id}`, { method: 'PATCH', body: JSON.stringify(rest) });
|
|
92
|
+
return `✅ ${d.message}\nID: ${d.id}`;
|
|
93
|
+
},
|
|
94
|
+
auto_build_video_timeline: async ({ id, ...rest }) => {
|
|
95
|
+
const d = await callApi(`/video/${id}/auto-build`, { method: 'POST', body: JSON.stringify(rest) });
|
|
96
|
+
return `✅ ${d.message}`;
|
|
97
|
+
},
|
|
98
|
+
delete_video_project: async ({ id }) => {
|
|
99
|
+
const d = await callApi(`/video/${id}`, { method: 'DELETE' });
|
|
100
|
+
return `✅ ${d.message}`;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
module.exports = { tools, handlers };
|
package/index.js
CHANGED
|
@@ -21,12 +21,13 @@ const brain = require('./domains/brain');
|
|
|
21
21
|
const funnels = require('./domains/funnels');
|
|
22
22
|
const skills = require('./domains/skills');
|
|
23
23
|
const slides = require('./domains/slides');
|
|
24
|
+
const video = require('./domains/video');
|
|
24
25
|
const analytics = require('./domains/analytics');
|
|
25
26
|
const myasp = require('./domains/myasp');
|
|
26
27
|
const wordpress = require('./domains/wordpress');
|
|
27
28
|
const macbuil = require('./domains/macbuil');
|
|
28
29
|
|
|
29
|
-
const allDomains = [knowledge, agentPresets, workflows, chatbots, schedulesAndTasks, projects, brain, funnels, skills, slides, analytics, myasp, wordpress, macbuil];
|
|
30
|
+
const allDomains = [knowledge, agentPresets, workflows, chatbots, schedulesAndTasks, projects, brain, funnels, skills, slides, video, analytics, myasp, wordpress, macbuil];
|
|
30
31
|
|
|
31
32
|
const TOOLS = allDomains.flatMap(d => d.tools);
|
|
32
33
|
const HANDLERS = Object.assign({}, ...allDomains.map(d => d.handlers));
|