@funny-booth/langley-video-mcp 0.8.0 → 0.10.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 CHANGED
@@ -116,8 +116,9 @@ export function planStart(token, body, f = fetch) {
116
116
  export function planAct(token, action, body, f = fetch) {
117
117
  return post(`/plan/${action}`, token, body, f);
118
118
  }
119
- export async function planStatus(token, id, f = fetch) {
119
+ export async function planStatus(token, id, f = fetch, wait = false) {
120
+ // wait: 案を作っている途中なら、受け口ができるまで最大50秒待ってから返す(0.10.0)
120
121
  if (id)
121
- return [(await (await call(`/plan?id=${encodeURIComponent(id)}`, token, {}, f)).json())];
122
+ return [(await (await call(`/plan?id=${encodeURIComponent(id)}${wait ? "&wait=50" : ""}`, token, {}, f)).json())];
122
123
  return (await (await call("/plans", token, {}, f)).json()).plans;
123
124
  }
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ const fail = (e) => ({
16
16
  content: [{ type: "text", text: e instanceof AgentError ? e.message : `動画の受け口につながりません: ${String(e)}` }],
17
17
  isError: true,
18
18
  });
19
- const server = new McpServer({ name: "langley-video", version: "0.8.0" });
19
+ const server = new McpServer({ name: "langley-video", version: "0.10.0" });
20
20
  server.registerTool("video_productions", {
21
21
  description: "ラングレー動画の制作の一覧(新しい順)。どの動画がどの段階か(絵コンテ承認待ち・最終確認待ち・納品できる)と、承認画面のリンクを返す",
22
22
  inputSchema: {},
@@ -72,8 +72,13 @@ server.registerTool("video_request", {
72
72
  return fail(e);
73
73
  }
74
74
  });
75
- const planText = (p) => [
76
- `台本づくり ${p.id}(${p.sku}): 今の段 ${p.stage_ja}${p.working ? "(いま案を作っています。数分後にもう一度確かめてください)" : ""}`,
75
+ const planText = (p, full = false) => [
76
+ `台本づくり ${p.id}(${p.sku}・${p.started ?? ""} 開始${p.mine ? "・あなたが始めた" : ""}): 今の段 ${p.stage_ja}` +
77
+ `${p.working ? "(いま案を作っています。30秒ほどおいてもう一度確かめてください)" : ""}`,
78
+ ...(p.push_needed ? [`シナリオの OK の前に、推す特典・数字を平山様に聞いてください(OK のとき push に答えを入れる。「おまかせ」も可)` +
79
+ (p.push_candidates?.length ? `\n LP の今の候補: ${p.push_candidates.join(" / ")}` : "")] : []),
80
+ ...(p.push ? [`推す特典・数字(平山様が決めた): ${p.push}`] : []),
81
+ ...(p.brief ? (full ? [`クリエイティブブリーフ(広告の相談から引き継いだ):\n${p.brief}`] : [`クリエイティブブリーフあり(${p.brief.length}字・番号を渡すと全文を返す)`]) : []),
77
82
  ...(p.error ? [`前回の案づくりが止まりました: ${p.error}`] : []),
78
83
  ...Object.entries(p.approved).map(([, a]) => `OK 済み: ${a.summary}(${a.who})`),
79
84
  ...(p.latest ? [`最新の案: シート「${p.latest.tab}」(第${p.latest.version}版)`, ...p.latest.summary.map((s) => ` ${s}`)] : []),
@@ -83,12 +88,13 @@ const planText = (p) => [
83
88
  server.registerTool("video_plan_start", {
84
89
  description: "台本づくりを始める(シナリオ → 構成 → 台本 を、段ごとに平山様の OK をもらって進める。台本の OK の後に制作が始まる)。" +
85
90
  "まずシナリオの案(3つ)を作り、台本のシート(Google スプレッドシート)に書き出す。数分かかるので、video_plan_status で確かめる。" +
86
- "依頼の文章(wish)はそのまま渡す。方向性(direction)は広告の相談で決まったこと",
91
+ "依頼の文章(wish)はそのまま渡す。方向性(direction)は広告の相談で決まったこと。広告の相談で作ったクリエイティブブリーフ(brief)があれば全文を渡す",
87
92
  inputSchema: {
88
93
  sku: z.string().describe("商品の名前(例: ブラトップ・ヒートインナー)"),
89
94
  wish: z.string().min(1).max(2000).optional().describe("依頼した人の文章(そのまま・要約しない)"),
90
95
  references: z.array(z.string().url()).max(5).optional().describe("参考の広告の動画の URL(1本目の音声を文字に起こし、役割に分けて参考にする)"),
91
96
  direction: z.string().max(2000).optional().describe("方向性(広告の相談で決まった、何を作るか・季節や行事)"),
97
+ brief: z.string().max(8000).optional().describe("クリエイティブブリーフ(広告の相談で平山様と決めたことの全文・Markdown・要約しない)"),
92
98
  },
93
99
  }, async (args) => {
94
100
  try {
@@ -100,12 +106,17 @@ server.registerTool("video_plan_start", {
100
106
  }
101
107
  });
102
108
  server.registerTool("video_plan_status", {
103
- description: "台本づくりの様子(今の段・案づくりの途中か・最新の案の要点とシートの名前・OK 済みの段)。番号を渡さなければ新しい順に10件",
104
- inputSchema: { id: z.string().optional().describe("台本づくりの番号(p で始まる)") },
105
- }, async ({ id }) => {
109
+ description: "台本づくりの様子(今の段・案づくりの途中か・最新の案の要点とシートの名前・OK 済みの段・誰が始めたか・推す特典を聞く必要があるか)。" +
110
+ "番号を渡せばその1件(ブリーフの全文も)、渡さなければ新しい順に10件",
111
+ inputSchema: {
112
+ id: z.string().optional().describe("台本づくりの番号(p で始まる)"),
113
+ wait: z.boolean().optional().describe("true なら、案を作っている途中のとき、できるまで最大50秒待ってから返す(番号が要る)。" +
114
+ "まだなら、もう一度 wait: true で呼ぶ(合わせて10分まで)。平山様に「できた?」と声をかけてもらわずに待てる"),
115
+ },
116
+ }, async ({ id, wait }) => {
106
117
  try {
107
- const list = await planStatus(token(), id);
108
- return text(list.length ? list.map(planText).join("\n\n") : "台本づくりはまだありません");
118
+ const list = await planStatus(token(), id, fetch, Boolean(id && wait));
119
+ return text(list.length ? list.map((p) => planText(p, Boolean(id))).join("\n\n") : "台本づくりはまだありません");
109
120
  }
110
121
  catch (e) {
111
122
  return fail(e);
@@ -136,15 +147,17 @@ server.registerTool("video_plan_redo", {
136
147
  });
137
148
  server.registerTool("video_plan_approve", {
138
149
  description: "今の段の最新の案に OK を出して次の段へ進む。平山様が会話ではっきり OK と言ったときだけ呼ぶ(あいまいなら聞き直す・あなたが判断して呼ばない)。" +
139
- "シナリオは選んだ案の番号(choice)を渡す。台本の OK で、その台本のまま制作が始まる(絵コンテができたら Slack で知らせる)。OK を出せるのは平山様だけ",
150
+ "シナリオは選んだ案の番号(choice)を渡す。推す特典・数字が決まっていない台本づくりでは、シナリオの OK の前に平山様に聞き、答えを push に入れる" +
151
+ "(言葉のまま・「おまかせ」も可。聞かずに呼ぶと断られる)。台本の OK で、その台本のまま制作が始まる(絵コンテができたら Slack で知らせる)。OK を出せるのは平山様だけ",
140
152
  inputSchema: {
141
153
  id: z.string(),
142
154
  choice: z.number().int().min(1).optional().describe("シナリオの段で、OK を出す案の番号"),
143
155
  test: z.boolean().optional().describe("動作確認の試験のときだけ true(台本の OK で始まる制作に【試験】が付く)"),
156
+ push: z.string().max(500).optional().describe("シナリオの OK のとき、平山様が決めた推す特典・数字(言葉のまま・「おまかせ」も可)"),
144
157
  },
145
- }, async ({ id, choice, test }) => {
158
+ }, async ({ id, choice, test, push }) => {
146
159
  try {
147
- const r = await planAct(token(), "approve", { id, choice, test: test === true });
160
+ const r = await planAct(token(), "approve", { id, choice, test: test === true, push });
148
161
  return text(r.message + (r.productions?.length ? `\n制作名: ${r.productions.join("、")}` : ""));
149
162
  }
150
163
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funny-booth/langley-video-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "ラングレー動画の制作の状況・制作の依頼・納品セットの取得(Langley-AgentOS の「WEBマーケクリエイティブ」から使う MCP・stdio)",
6
6
  "publishConfig": {