clipbait 1.8.0 → 1.9.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +25 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -56,6 +56,9 @@ Seven tools are available to any agent:
56
56
  | `start_live_autoclip` | Auto-clip a **live** Twitch stream continuously (`channelUrl`, optional `cadenceMin`). Pro plan. |
57
57
  | `probe_video` | Get a video's duration before clipping (`url`). |
58
58
  | `download_clip` | Save a finished clip to your `~/Downloads/` folder and return the path (`jobId`, `clipIndex` 1-based). Max 500 MB. |
59
+ | `list_social_accounts` | Show which accounts are connected for posting (X, TikTok, YouTube, Facebook). |
60
+ | `schedule_post` | Schedule a clip to post on connected socials at a future time (`clipUrl`, `platforms`, `scheduledTime`, `caption`). |
61
+ | `list_scheduled_posts` / `cancel_scheduled_post` | Review or cancel scheduled posts. |
59
62
 
60
63
  ## Terminal usage
61
64
 
package/index.js CHANGED
@@ -107,14 +107,18 @@ argument-hint: <video-url> [what you want]
107
107
  ---
108
108
  You have the \`clipbait\` MCP tools connected. The user's request: $ARGUMENTS
109
109
 
110
- Do this, conversationally and fast:
111
- 1. If there is no video URL in the request, ask for one (YouTube, Twitch VOD, Rumble, or Ganjing World). Otherwise don't ask for confirmation, just go.
112
- 2. Read the intent and set params for \`generate_clips\`:
113
- - vertical / shorts / tiktok / reels, or nothing specified => aspectRatio "9:16". landscape / widescreen / youtube => "16:9".
114
- - if they mention a number of clips, use it as maxClips (1 to 20), otherwise 9.
115
- 3. Call \`generate_clips\`, then poll \`get_job\` with the returned jobId every 30 seconds until status is "complete". Report progress between polls.
116
- 4. When complete, list each finished clip as a numbered list: its hook and its URL.
117
- 5. Then offer follow-ups and act on them by calling the tools again: regenerate at a different aspect ratio, pull more clips, or probe another video with \`probe_video\`.
110
+ Guide them like a friendly assistant, conversationally and fast:
111
+ 1. Need a video URL if none was given, ask for one (YouTube, Twitch VOD, Rumble, or Ganjing World).
112
+ 2. Set params for \`generate_clips\` from their intent (offer the choice if unclear, don't over-ask):
113
+ - aspect ratio: 9:16 (vertical / TikTok / Reels) is the default; 16:9 for YouTube / landscape.
114
+ - number of clips: use a number if they mention one (120), otherwise 9.
115
+ 3. Call \`generate_clips\`, then poll \`get_job\` with the returned jobId every ~30 seconds until status is "complete". Report progress between polls.
116
+ 4. When complete, list each finished clip as a numbered list: hook and URL.
117
+ 5. Then offer next steps and act on them by calling the tools:
118
+ - \`download_clip\` — save a clip to ~/Downloads.
119
+ - Post to social: call \`list_social_accounts\` to see connected platforms, then ask which platform(s), when to post (offer Today / Tomorrow / This weekend / a specific time), and the caption (offer to draft one). Show the plan (clip · platform · time · caption) and CONFIRM before calling \`schedule_post\` for each clip. Use \`list_scheduled_posts\` / \`cancel_scheduled_post\` to review or undo.
120
+ - Regenerate at a different aspect ratio, pull more clips, or \`probe_video\` another URL.
121
+ Keep it snappy. Don't ask for confirmation to start clipping unless the URL is missing — but always confirm before posting to social.
118
122
  `;
119
123
 
120
124
  // Claude Desktop config path per-OS.
@@ -275,6 +279,19 @@ async function runMcpServer() {
275
279
  } catch (e) { return fail(e); }
276
280
  });
277
281
 
282
+ server.tool("list_social_accounts", "List which social accounts are connected for posting (X, TikTok, YouTube, Facebook). Check before scheduling.", {},
283
+ async () => { try { const d = await api("GET", "/auth/social/status"); const map = { twitter: "x", tiktok: "tiktok", youtube: "youtube", facebook: "facebook" }; const c = Object.entries(d || {}).filter(([, v]) => v && v.connected).map(([k]) => map[k] || k); return ok(c.length ? `Connected for posting: ${c.join(", ")}` : "No social accounts connected yet. Connect them at https://app.clipbait.ai/me."); } catch (e) { return fail(e); } });
284
+
285
+ server.tool("schedule_post", "Schedule a finished clip to post on connected social accounts at a future time. Get clip URLs from get_job first; confirm the platform is connected via list_social_accounts.",
286
+ { clipUrl: z.string(), platforms: z.array(z.enum(["x", "tiktok", "youtube", "facebook"])).min(1), scheduledTime: z.string().describe("Future ISO 8601 time"), caption: z.string().optional(), clipTitle: z.string().optional(), clipJobId: z.string().optional(), clipIndex: z.number().int().optional() },
287
+ async (a) => { try { const d = await api("POST", "/scheduled-posts", { clipUrl: a.clipUrl, platforms: a.platforms, scheduledTime: a.scheduledTime, caption: a.caption || "", clipTitle: a.clipTitle, clipJobId: a.clipJobId, clipIndex: a.clipIndex }); return ok(`Scheduled to ${a.platforms.join(", ")} for ${a.scheduledTime} (post ${d.scheduledPost?._id || "?"}).`); } catch (e) { return fail(e); } });
288
+
289
+ server.tool("list_scheduled_posts", "List the user's scheduled/posted social posts.", { status: z.enum(["pending", "posted", "failed", "cancelled"]).optional() },
290
+ async (a) => { try { const d = await api("GET", "/scheduled-posts" + (a.status ? `?status=${a.status}` : "")); const posts = (d.posts || []).slice(0, 20).map((p) => `${p._id} · ${p.status} · ${(p.platforms || []).map((x) => x.name).join(",")} · ${new Date(p.scheduledTime).toISOString()} · ${p.clipTitle || ""}`).join("\n"); return ok(posts || "No scheduled posts."); } catch (e) { return fail(e); } });
291
+
292
+ server.tool("cancel_scheduled_post", "Cancel a scheduled post before it goes live.", { postId: z.string() },
293
+ async (a) => { try { await api("DELETE", "/scheduled-posts/" + a.postId); return ok(`Cancelled scheduled post ${a.postId}.`); } catch (e) { return fail(e); } });
294
+
278
295
  await server.connect(new StdioServerTransport());
279
296
  }
280
297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clipbait",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Clipbait CLI + MCP server — turn any video into viral clips, and auto-clip live streams, from your terminal or any AI agent.",
5
5
  "bin": { "clipbait": "index.js" },
6
6
  "type": "commonjs",