@funny-booth/langley-video-mcp 0.0.1-stage → 0.2.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/dist/client.js +16 -0
- package/dist/index.js +36 -2
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -48,6 +48,22 @@ export async function request(token, sku, appeal, count, f = fetch) {
|
|
|
48
48
|
}, f);
|
|
49
49
|
return (await res.json());
|
|
50
50
|
}
|
|
51
|
+
export const CHANGE_AREAS = ["storyboard", "approval_page", "slack", "video", "materials", "agent", "other"];
|
|
52
|
+
export const CHANGE_URGENCIES = ["today", "this_week", "whenever"];
|
|
53
|
+
/** 仕組みの改修を依頼する(受け付けて記録するだけ。仕組みはすぐには変わらない) */
|
|
54
|
+
export async function requestChange(token, body, f = fetch) {
|
|
55
|
+
const res = await call("/change-requests", token, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
headers: { "Content-Type": "application/json" },
|
|
58
|
+
body: JSON.stringify(body),
|
|
59
|
+
}, f);
|
|
60
|
+
return (await res.json());
|
|
61
|
+
}
|
|
62
|
+
/** 自分が出した改修の依頼の進み具合(新しい順に20件まで) */
|
|
63
|
+
export async function myRequests(token, f = fetch) {
|
|
64
|
+
const res = await call("/my-requests", token, {}, f);
|
|
65
|
+
return (await res.json()).requests;
|
|
66
|
+
}
|
|
51
67
|
/** 納品セットの zip を、パソコンのダウンロードフォルダに保存する。保存した場所を返す */
|
|
52
68
|
export async function delivery(token, name, dir = join(homedir(), "Downloads"), f = fetch) {
|
|
53
69
|
const res = await call(`/delivery?name=${encodeURIComponent(name)}`, token, {}, f);
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import { AgentError, delivery, productions, request } from "./client.js";
|
|
8
|
+
import { AgentError, CHANGE_AREAS, CHANGE_URGENCIES, delivery, myRequests, productions, request, requestChange } from "./client.js";
|
|
9
9
|
const token = () => process.env.TOOL_TOKEN;
|
|
10
10
|
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
11
11
|
const fail = (e) => ({
|
|
12
12
|
content: [{ type: "text", text: e instanceof AgentError ? e.message : `動画の受け口につながりません: ${String(e)}` }],
|
|
13
13
|
isError: true,
|
|
14
14
|
});
|
|
15
|
-
const server = new McpServer({ name: "langley-video", version: "0.
|
|
15
|
+
const server = new McpServer({ name: "langley-video", version: "0.2.0" });
|
|
16
16
|
server.registerTool("video_productions", {
|
|
17
17
|
description: "ラングレー動画の制作の一覧(新しい順)。どの動画がどの段階か(絵コンテ承認待ち・最終確認待ち・納品できる)と、承認画面のリンクを返す",
|
|
18
18
|
inputSchema: {},
|
|
@@ -56,4 +56,38 @@ server.registerTool("video_delivery", {
|
|
|
56
56
|
return fail(e);
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
+
server.registerTool("video_request_change", {
|
|
60
|
+
description: "動画の仕組み(絵コンテ・承認画面・Slack の知らせ・完成した動画・素材選び・エージェント)の改修を依頼する。" +
|
|
61
|
+
"仕組みはすぐには変わらない(担当が改修し、確かめてから反映する)。改修の相談のエージェント(@動画改修)を許可された人だけが使える",
|
|
62
|
+
inputSchema: {
|
|
63
|
+
area: z.enum(CHANGE_AREAS).describe("storyboard=絵コンテ(台本・テロップ・ナレーション・カットの選び方)/ approval_page=承認画面 / slack=Slack の知らせ / video=完成した動画・納品セット / materials=素材選び・素材の範囲 / agent=エージェント / other=その他"),
|
|
64
|
+
summary: z.string().min(1).max(200).describe("1行の要約"),
|
|
65
|
+
want: z.string().min(1).max(2000).describe("どう変わってほしいか(見え方・例を含めて)"),
|
|
66
|
+
current: z.string().min(1).max(1000).optional().describe("今どうなっているか(確かめた事実)"),
|
|
67
|
+
why: z.string().min(1).max(1000).optional().describe("なぜ変えたいか"),
|
|
68
|
+
urgency: z.enum(CHANGE_URGENCIES).describe("today=今日中 / this_week=今週中 / whenever=いつでも"),
|
|
69
|
+
},
|
|
70
|
+
}, async (args) => {
|
|
71
|
+
try {
|
|
72
|
+
const r = await requestChange(token(), args);
|
|
73
|
+
return text(`受け付けました。受付番号: ${r.id}(状態: ${r.review_status})`);
|
|
74
|
+
}
|
|
75
|
+
catch (e) {
|
|
76
|
+
return fail(e);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
server.registerTool("video_my_requests", {
|
|
80
|
+
description: "自分が出した改修の依頼の進み具合(新しい順に20件まで)。review_status は pending=受付 / in_progress=対応中 / done=反映済み / declined=見送り / needs_info=情報が足りない。note は担当からの説明",
|
|
81
|
+
inputSchema: {},
|
|
82
|
+
}, async () => {
|
|
83
|
+
try {
|
|
84
|
+
const list = await myRequests(token());
|
|
85
|
+
if (!list.length)
|
|
86
|
+
return text("改修の依頼はまだありません");
|
|
87
|
+
return text(JSON.stringify(list));
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
return fail(e);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
59
93
|
await server.connect(new StdioServerTransport());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funny-booth/langley-video-mcp",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ラングレー動画の制作の状況・制作の依頼・納品セットの取得(Langley-AgentOS の「WEBマーケクリエイティブ」から使う MCP・stdio)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"license": "UNLICENSED",
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/yutamatsuura/langley-video-mcp.git"
|
|
43
|
+
"url": "git+https://github.com/yutamatsuura/langley-video-mcp.git"
|
|
44
44
|
}
|
|
45
45
|
}
|