@pixeldojo/mcp 0.21.0 → 0.23.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/index.js CHANGED
@@ -1309,6 +1309,171 @@ var init_caption = __esm({
1309
1309
  }
1310
1310
  });
1311
1311
  async function run7(input, ctx) {
1312
+ const { hook, callout, review, offer, end_card: card } = input;
1313
+ if (!hook && !callout && !review && !input.progress_bar && !offer && !card) {
1314
+ return { kind: "text", text: "pixeldojo_overlay needs at least one of hook, callout, review, progress_bar, offer or end_card." };
1315
+ }
1316
+ const submitted = await ctx.client.run(MODEL2, {
1317
+ prompt: "",
1318
+ video: input.video_url,
1319
+ ...input.color ? { color: input.color } : {},
1320
+ ...hook ? { hook_text: hook.text, hook_duration: hook.duration_sec } : {},
1321
+ ...callout ? {
1322
+ callout_title: callout.title,
1323
+ callout_subtitle: callout.subtitle,
1324
+ callout_start: callout.start_sec,
1325
+ callout_duration: callout.duration_sec
1326
+ } : {},
1327
+ ...review ? {
1328
+ review_quote: review.quote,
1329
+ review_name: review.name,
1330
+ review_stars: review.stars,
1331
+ review_start: review.start_sec,
1332
+ review_duration: review.duration_sec
1333
+ } : {},
1334
+ ...input.progress_bar ? { progress_bar: true } : {},
1335
+ ...offer ? {
1336
+ offer_text: offer.text,
1337
+ offer_subtext: offer.subtext,
1338
+ offer_start: offer.start_sec,
1339
+ offer_duration: offer.duration_sec,
1340
+ offer_position: offer.position
1341
+ } : {},
1342
+ ...card ? {
1343
+ end_headline: card.headline,
1344
+ end_cta: card.cta,
1345
+ end_url: card.url,
1346
+ logo_url: card.logo_url,
1347
+ end_duration: card.duration_sec
1348
+ } : {}
1349
+ });
1350
+ const result = await pollJobUntilDoneOrHandoff(
1351
+ submitted.jobId,
1352
+ (id) => ctx.client.getJob(id),
1353
+ ctx.buildStatusUrl,
1354
+ { now: ctx.pollOverrides?.now, sleep: ctx.pollOverrides?.sleep }
1355
+ );
1356
+ return pollResultToSkillResult(
1357
+ result,
1358
+ (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Branded. Asset: ${urls[0]}`
1359
+ );
1360
+ }
1361
+ var MODEL2, InputSchema7, InputJsonSchema7, overlaySkill;
1362
+ var init_overlay = __esm({
1363
+ "src/skills/overlay.ts"() {
1364
+ init_poll();
1365
+ init_types();
1366
+ MODEL2 = "brand-overlay";
1367
+ InputSchema7 = z.object({
1368
+ video_url: z.string().url(),
1369
+ color: z.string().optional(),
1370
+ hook: z.object({ text: z.string().max(60), duration_sec: z.number().min(1).max(6).optional() }).optional(),
1371
+ callout: z.object({
1372
+ title: z.string().max(32),
1373
+ subtitle: z.string().max(40).optional(),
1374
+ start_sec: z.number().min(0).optional(),
1375
+ duration_sec: z.number().min(1).max(10).optional()
1376
+ }).optional(),
1377
+ review: z.object({
1378
+ quote: z.string().max(90),
1379
+ name: z.string().max(30).optional(),
1380
+ stars: z.number().int().min(1).max(5).optional(),
1381
+ start_sec: z.number().min(0).optional(),
1382
+ duration_sec: z.number().min(1).max(10).optional()
1383
+ }).optional(),
1384
+ progress_bar: z.boolean().optional(),
1385
+ offer: z.object({
1386
+ text: z.string().max(24),
1387
+ subtext: z.string().max(40).optional(),
1388
+ start_sec: z.number().min(0).optional(),
1389
+ duration_sec: z.number().min(1).max(10).optional(),
1390
+ position: z.enum(["top", "bottom"]).optional()
1391
+ }).optional(),
1392
+ end_card: z.object({
1393
+ headline: z.string().max(40),
1394
+ cta: z.string().max(24).optional(),
1395
+ url: z.string().max(40).optional(),
1396
+ logo_url: z.string().url().optional(),
1397
+ duration_sec: z.number().min(2).max(5).optional()
1398
+ }).optional()
1399
+ });
1400
+ InputJsonSchema7 = {
1401
+ type: "object",
1402
+ required: ["video_url"],
1403
+ properties: {
1404
+ video_url: { type: "string", format: "uri", description: "The video to brand (MP4 or MOV)." },
1405
+ color: { type: "string", description: "Brand color as #RRGGBB: the badge and the button. Defaults to #FFE500." },
1406
+ hook: {
1407
+ type: "object",
1408
+ description: "Hook title over the first seconds, the overlay that decides whether people keep watching. 5-8 words.",
1409
+ required: ["text"],
1410
+ properties: {
1411
+ text: { type: "string", maxLength: 60, description: 'e.g. "Octopuses have THREE hearts?".' },
1412
+ duration_sec: { type: "number", minimum: 1, maximum: 6, description: "Default 2.5." }
1413
+ }
1414
+ },
1415
+ callout: {
1416
+ type: "object",
1417
+ description: 'Lower-third label that slides in from the left: a benefit ("Ships in 24h") or a name and title.',
1418
+ required: ["title"],
1419
+ properties: {
1420
+ title: { type: "string", maxLength: 32, description: "The label." },
1421
+ subtitle: { type: "string", maxLength: 40, description: "Optional second line." },
1422
+ start_sec: { type: "number", description: "Default 3." },
1423
+ duration_sec: { type: "number", minimum: 1, maximum: 10, description: "Default 4." }
1424
+ }
1425
+ },
1426
+ review: {
1427
+ type: "object",
1428
+ description: "Review card: stars, a short quote and a name.",
1429
+ required: ["quote"],
1430
+ properties: {
1431
+ quote: { type: "string", maxLength: 90, description: "The review text, without quote marks." },
1432
+ name: { type: "string", maxLength: 30, description: 'e.g. "Jess, verified buyer".' },
1433
+ stars: { type: "integer", minimum: 1, maximum: 5, description: "Default 5." },
1434
+ start_sec: { type: "number", description: "Default just after the hook." },
1435
+ duration_sec: { type: "number", minimum: 1, maximum: 10, description: "Default 4." }
1436
+ }
1437
+ },
1438
+ progress_bar: { type: "boolean", description: "A thin bar in the brand color across the top that fills as the video plays." },
1439
+ offer: {
1440
+ type: "object",
1441
+ description: "Offer callout: a badge that pops in on cue (after the hook when there is one).",
1442
+ required: ["text"],
1443
+ properties: {
1444
+ text: { type: "string", maxLength: 24, description: 'e.g. "50% OFF".' },
1445
+ subtext: { type: "string", maxLength: 40, description: 'Small line under it, e.g. "This week only".' },
1446
+ start_sec: { type: "number", description: "Second it appears. Default 0.5." },
1447
+ duration_sec: { type: "number", minimum: 1, maximum: 10, description: "Seconds it stays. Default 3." },
1448
+ position: { type: "string", enum: ["top", "bottom"], description: "Default top." }
1449
+ }
1450
+ },
1451
+ end_card: {
1452
+ type: "object",
1453
+ description: "End card held after the last frame.",
1454
+ required: ["headline"],
1455
+ properties: {
1456
+ headline: { type: "string", maxLength: 40, description: 'e.g. "Your new favorite mug".' },
1457
+ cta: { type: "string", maxLength: 24, description: 'Button text, e.g. "Shop now".' },
1458
+ url: { type: "string", maxLength: 40, description: "Web address shown under the button." },
1459
+ logo_url: { type: "string", format: "uri", description: "PNG (transparent works best) or JPG." },
1460
+ duration_sec: { type: "number", minimum: 2, maximum: 5, description: "Default 3." }
1461
+ }
1462
+ }
1463
+ }
1464
+ };
1465
+ overlaySkill = {
1466
+ name: "pixeldojo_overlay",
1467
+ description: 'Add short-form ad text layouts to a finished video, exact text in the brand color, clear of the TikTok/Reels/Shorts UI: hook (title over the first seconds), callout (lower-third label), review (stars, quote, name), progress_bar, offer ("50% OFF" badge) and end_card (logo, headline, button, web address over the held last frame). Pass video_url plus any of them; one call does all. 2 credits.',
1468
+ inputZod: InputSchema7,
1469
+ inputJsonSchema: InputJsonSchema7,
1470
+ allowedModels: [MODEL2],
1471
+ defaultModel: MODEL2,
1472
+ run: run7
1473
+ };
1474
+ }
1475
+ });
1476
+ async function run8(input, ctx) {
1312
1477
  const job = await ctx.client.getJob(input.jobId);
1313
1478
  if (job.status === "completed") {
1314
1479
  const urls = extractAssetUrls2(job);
@@ -1372,13 +1537,13 @@ function extractAssetUrls2(job) {
1372
1537
  if (output?.video) return [output.video];
1373
1538
  return [];
1374
1539
  }
1375
- var InputSchema7, InputJsonSchema7, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1540
+ var InputSchema8, InputJsonSchema8, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1376
1541
  var init_status = __esm({
1377
1542
  "src/skills/status.ts"() {
1378
- InputSchema7 = z.object({
1543
+ InputSchema8 = z.object({
1379
1544
  jobId: z.string().min(1).max(200).describe("Job id returned from a prior pixeldojo_* skill handoff.")
1380
1545
  });
1381
- InputJsonSchema7 = {
1546
+ InputJsonSchema8 = {
1382
1547
  type: "object",
1383
1548
  properties: {
1384
1549
  jobId: {
@@ -1393,16 +1558,16 @@ var init_status = __esm({
1393
1558
  statusSkill = {
1394
1559
  name: "pixeldojo_status",
1395
1560
  description: 'Check once, without waiting, on a jobId that a generation tool returned instead of an asset after its 30s wait. Free. Returns asset URLs when complete, the failure reason if it failed, or the current state and job age if still running. Campaign ids go to pixeldojo_campaign_status; films report progress through pixeldojo_film with action "status".',
1396
- inputZod: InputSchema7,
1397
- inputJsonSchema: InputJsonSchema7,
1561
+ inputZod: InputSchema8,
1562
+ inputJsonSchema: InputJsonSchema8,
1398
1563
  // status is special — it doesn't dispatch to a model
1399
1564
  allowedModels: [],
1400
1565
  defaultModel: "",
1401
- run: run7
1566
+ run: run8
1402
1567
  };
1403
1568
  }
1404
1569
  });
1405
- async function run8(input, ctx) {
1570
+ async function run9(input, ctx) {
1406
1571
  const product = await ctx.client.extractProduct(input.url);
1407
1572
  const summary = [
1408
1573
  `Product: ${product.name}`,
@@ -1419,13 +1584,13 @@ function truncate(input, max) {
1419
1584
  if (input.length <= max) return input;
1420
1585
  return input.slice(0, max - 3) + "...";
1421
1586
  }
1422
- var InputSchema8, InputJsonSchema8, fromUrlSkill;
1587
+ var InputSchema9, InputJsonSchema9, fromUrlSkill;
1423
1588
  var init_from_url = __esm({
1424
1589
  "src/skills/from-url.ts"() {
1425
- InputSchema8 = z.object({
1590
+ InputSchema9 = z.object({
1426
1591
  url: z.string().min(1).max(2048).describe("Product page URL. Shopify, BigCommerce, WooCommerce, or any page with JSON-LD / OpenGraph product metadata.")
1427
1592
  });
1428
- InputJsonSchema8 = {
1593
+ InputJsonSchema9 = {
1429
1594
  type: "object",
1430
1595
  properties: {
1431
1596
  url: {
@@ -1438,12 +1603,12 @@ var init_from_url = __esm({
1438
1603
  fromUrlSkill = {
1439
1604
  name: "pixeldojo_from_url",
1440
1605
  description: "Extract a product profile from a product page URL: name, description, image URLs (the first three are listed), and the extraction method used. Works on Shopify, BigCommerce, WooCommerce, or any page with JSON-LD / OpenGraph product metadata. Free. pixeldojo_campaign and pixeldojo_ad accept a product URL and run this extraction themselves; call this directly to check the product data first, or to reuse its images in other tools.",
1441
- inputZod: InputSchema8,
1442
- inputJsonSchema: InputJsonSchema8,
1606
+ inputZod: InputSchema9,
1607
+ inputJsonSchema: InputJsonSchema9,
1443
1608
  // No model dispatch — this skill calls a server-side scrape, not a generation.
1444
1609
  allowedModels: [],
1445
1610
  defaultModel: "",
1446
- run: run8
1611
+ run: run9
1447
1612
  };
1448
1613
  }
1449
1614
  });
@@ -2006,7 +2171,7 @@ async function redoShots(input, ctx) {
2006
2171
  followUp: keepGoing(filmId, 30, { soundtrack: input.soundtrack })
2007
2172
  };
2008
2173
  }
2009
- async function run9(input, ctx) {
2174
+ async function run10(input, ctx) {
2010
2175
  const action = input.action === "plan" && input.film_id ? input.cast?.length ? "cast" : "status" : input.action;
2011
2176
  if (action === "plan") return plan(input, ctx);
2012
2177
  if (!input.film_id) return { kind: "text", text: "produce/status/cast/redo need the film_id returned by the plan step." };
@@ -2026,7 +2191,7 @@ async function run9(input, ctx) {
2026
2191
  if (action === "redo") return redoShots(input, ctx);
2027
2192
  return advance(input.film_id, input.soundtrack, input.music_job_id, ctx);
2028
2193
  }
2029
- var STORY_LOOKS, MUSIC_VIDEO_LOOKS, LOOKS, MUSIC_CLIP_ENGINE_ID, InputSchema9, InputJsonSchema9, shots, benignDispatchRefusal, count, frameDone, RETRY_CLEARS, REFUSED, isRefused, PLANNER_POLL_MS, PLANNER_MAX_POLLS, isMusicVideo, needsSlice, stillPlanningText, LOOK_MUSIC, ARC, filmSkill;
2194
+ var STORY_LOOKS, MUSIC_VIDEO_LOOKS, LOOKS, MUSIC_CLIP_ENGINE_ID, InputSchema10, InputJsonSchema10, shots, benignDispatchRefusal, count, frameDone, RETRY_CLEARS, REFUSED, isRefused, PLANNER_POLL_MS, PLANNER_MAX_POLLS, isMusicVideo, needsSlice, stillPlanningText, LOOK_MUSIC, ARC, filmSkill;
2030
2195
  var init_film = __esm({
2031
2196
  "src/skills/film.ts"() {
2032
2197
  init_upload_helpers();
@@ -2034,7 +2199,7 @@ var init_film = __esm({
2034
2199
  MUSIC_VIDEO_LOOKS = ["rap-video", "neon-club", "stage-performance", "retro-camcorder", "y2k-pop", "moody-rnb", "rock-grit", "dream-pop", "k-pop"];
2035
2200
  LOOKS = [...STORY_LOOKS, ...MUSIC_VIDEO_LOOKS];
2036
2201
  MUSIC_CLIP_ENGINE_ID = "minimax-h3-reference";
2037
- InputSchema9 = z.object({
2202
+ InputSchema10 = z.object({
2038
2203
  idea: z.string().max(2e3).optional().describe("One-to-three sentence film idea. The studio writes the screenplay (free). Provide idea OR script for planning."),
2039
2204
  script: z.string().max(2e4).optional().describe("A full screenplay to plan instead of an idea (sluglines, action lines, dialogue)."),
2040
2205
  look: z.enum(LOOKS).optional().describe("Visual style carried through frames, clips, and soundtrack. Default live-action, or rap-video for a music video."),
@@ -2062,7 +2227,7 @@ var init_film = __esm({
2062
2227
  soundtrack: z.enum(["scene-synced", "flat", "none"]).default("scene-synced").describe("scene-synced composes one musical section per scene, pinned to the scene lengths (default). flat is a single cohesive bed. none skips music."),
2063
2228
  music_job_id: z.string().max(80).optional().describe("The music_job_id from the previous status reply while the score is composing, so that score is attached. A status call without it, once all clips are ready and no score is attached, starts and charges for a new score.")
2064
2229
  });
2065
- InputJsonSchema9 = {
2230
+ InputJsonSchema10 = {
2066
2231
  type: "object",
2067
2232
  properties: {
2068
2233
  idea: { type: "string", description: `Plan step: one-to-three sentence film idea. The studio writes the screenplay (free). Provide idea or script. Keep the user's own words for who each character is, including their gender and pronouns ("she", "he") and species; the writer has nothing else to go on.` },
@@ -2176,11 +2341,11 @@ var init_film = __esm({
2176
2341
  name: "pixeldojo_film",
2177
2342
  description: "Make a finished short film from one idea: screenplay, storyboard frames (AI-reviewed), video clips with spoken dialogue, scene-synced soundtrack, stitched export. Or a music video: pass song_path (a local file) or song_url (your own PixelDojo upload from pixeldojo_upload, never a third-party link) with optional lyrics; the film is cut to that song, each clip lip-synced to its slice on the studio music video engine, and no score is composed: the export plays the song. Every named character must be cast (cast: your own images, a portrait prompt, or a Character Studio character) before frames render; cast entries can also replace or remove someone. Phased: plan is free; cast; produce starts charged generation; status advances production (poll every ~30s); redo renders a new take of chosen shots and status re-exports.",
2178
2343
  hostedDescription: "Make a finished short film from one idea: screenplay, storyboard frames (AI-reviewed), video clips with spoken dialogue, scene-synced soundtrack, stitched export. Or a music video: pass song_url (your own PixelDojo upload made with POST /api/v1/upload, never a third-party link) with optional lyrics; the film is cut to that song, each clip lip-synced to its slice on the studio music video engine, and no score is composed: the export plays the song. Every named character must be cast (cast: your own images, a portrait prompt, or a Character Studio character) before frames render; cast entries can also replace or remove someone. Phased: plan is free; cast; produce starts charged generation; status advances production (poll every ~30s); redo renders a new take of chosen shots and status re-exports.",
2179
- inputZod: InputSchema9,
2180
- inputJsonSchema: InputJsonSchema9,
2344
+ inputZod: InputSchema10,
2345
+ inputJsonSchema: InputJsonSchema10,
2181
2346
  allowedModels: [],
2182
2347
  defaultModel: "",
2183
- run: run9
2348
+ run: run10
2184
2349
  };
2185
2350
  }
2186
2351
  });
@@ -2267,7 +2432,7 @@ function buildVideoPayload(verb, apiId, i) {
2267
2432
  };
2268
2433
  }
2269
2434
  }
2270
- async function run10(input, ctx) {
2435
+ async function run11(input, ctx) {
2271
2436
  const paramsGate = paramsWithoutModel(input.params, input.model);
2272
2437
  if (paramsGate) return { kind: "text", text: paramsGate };
2273
2438
  const verb = input.verb;
@@ -2330,7 +2495,7 @@ async function run10(input, ctx) {
2330
2495
  notes.join(" ")
2331
2496
  );
2332
2497
  }
2333
- var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema10, engineList, InputJsonSchema10, BASE_DESCRIPTION, videoSkill;
2498
+ var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema11, engineList, InputJsonSchema11, BASE_DESCRIPTION, videoSkill;
2334
2499
  var init_video = __esm({
2335
2500
  "src/skills/video.ts"() {
2336
2501
  init_poll();
@@ -2364,7 +2529,7 @@ var init_video = __esm({
2364
2529
  "wan-video-character-swap"
2365
2530
  ]);
2366
2531
  NO_IMAGE_ENGINES = /* @__PURE__ */ new Set(["flux-video-edit", "xai-video-edit"]);
2367
- InputSchema10 = z.object({
2532
+ InputSchema11 = z.object({
2368
2533
  verb: z.enum(VERBS),
2369
2534
  prompt: z.string().max(8e3).optional(),
2370
2535
  video_url: z.string().url().optional(),
@@ -2379,7 +2544,7 @@ var init_video = __esm({
2379
2544
  params: ParamsInput
2380
2545
  });
2381
2546
  engineList = (verb) => `${verb}: ${VIDEO_STUDIO_ENGINES[verb].join(", ")} (default ${VIDEO_STUDIO_ENGINES[verb][0]})`;
2382
- InputJsonSchema10 = {
2547
+ InputJsonSchema11 = {
2383
2548
  type: "object",
2384
2549
  properties: {
2385
2550
  verb: {
@@ -2440,11 +2605,11 @@ var init_video = __esm({
2440
2605
  name: "pixeldojo_video",
2441
2606
  description: `${BASE_DESCRIPTION} Local files: video_path / image_path (uploaded to 24h temp storage first).`,
2442
2607
  hostedDescription: `${BASE_DESCRIPTION} Media must be public http(s) URLs.`,
2443
- inputZod: InputSchema10,
2444
- inputJsonSchema: InputJsonSchema10,
2608
+ inputZod: InputSchema11,
2609
+ inputJsonSchema: InputJsonSchema11,
2445
2610
  allowedModels: Array.from(new Set(VERBS.flatMap((v) => VIDEO_STUDIO_ENGINES[v]))),
2446
2611
  defaultModel: VIDEO_STUDIO_ENGINES.change[0],
2447
- run: run10
2612
+ run: run11
2448
2613
  };
2449
2614
  }
2450
2615
  });
@@ -2619,14 +2784,14 @@ async function produce2(id, ctx) {
2619
2784
  const musicNote = ep.musicEnabled && ep.music?.status === "failed" ? " The music bed failed, so this cut has no music." : "";
2620
2785
  return { kind: "text", text: `Export started, free${prior}.${musicNote} ${next(id, "produce", "~60s")}` };
2621
2786
  }
2622
- async function run11(input, ctx) {
2787
+ async function run12(input, ctx) {
2623
2788
  const action = input.action === "create" && input.episode_id ? "status" : input.action;
2624
2789
  if (action === "create") return create(input, ctx);
2625
2790
  if (!input.episode_id) return { kind: "text", text: "produce and status need the episode_id returned by the create step." };
2626
2791
  if (action === "produce") return produce2(input.episode_id, ctx);
2627
2792
  return status(input.episode_id, ctx);
2628
2793
  }
2629
- var STYLES2, CATEGORIES, ENGINES, MIN_SECONDS, MAX_SECONDS, MAX_IN_FLIGHT, InputSchema11, InputJsonSchema11, call, next, needsRender, PLAN_POLL_MS, PLAN_MAX_POLLS, stillPlanning, episodeSkill;
2794
+ var STYLES2, CATEGORIES, ENGINES, MIN_SECONDS, MAX_SECONDS, MAX_IN_FLIGHT, InputSchema12, InputJsonSchema12, call, next, needsRender, PLAN_POLL_MS, PLAN_MAX_POLLS, stillPlanning, episodeSkill;
2630
2795
  var init_episode = __esm({
2631
2796
  "src/skills/episode.ts"() {
2632
2797
  STYLES2 = ["editorial-motion", "paper-diorama", "hand-drawn", "storybook", "poster-vector", "soft-3d"];
@@ -2635,7 +2800,7 @@ var init_episode = __esm({
2635
2800
  MIN_SECONDS = 60;
2636
2801
  MAX_SECONDS = 300;
2637
2802
  MAX_IN_FLIGHT = 4;
2638
- InputSchema11 = z.object({
2803
+ InputSchema12 = z.object({
2639
2804
  action: z.enum(["create", "produce", "status"]).default("create"),
2640
2805
  topic: z.string().min(8).max(400).optional(),
2641
2806
  episode_id: z.string().max(40).optional(),
@@ -2648,7 +2813,7 @@ var init_episode = __esm({
2648
2813
  music: z.boolean().default(true),
2649
2814
  title: z.string().max(120).optional()
2650
2815
  });
2651
- InputJsonSchema11 = {
2816
+ InputJsonSchema12 = {
2652
2817
  type: "object",
2653
2818
  properties: {
2654
2819
  action: {
@@ -2681,15 +2846,15 @@ var init_episode = __esm({
2681
2846
  episodeSkill = {
2682
2847
  name: "pixeldojo_episode",
2683
2848
  description: "Make a finished narrated faceless video (explainer, history, kids story) from one topic: script, scene visuals, AI narration, music bed, stitched export saved to the Library. Phased: create is free and returns a credit quote; produce is charged and advances one step per call (poll every ~30s until it returns the video URL); status is free.",
2684
- inputZod: InputSchema11,
2685
- inputJsonSchema: InputJsonSchema11,
2849
+ inputZod: InputSchema12,
2850
+ inputJsonSchema: InputJsonSchema12,
2686
2851
  allowedModels: [],
2687
2852
  defaultModel: "",
2688
- run: run11
2853
+ run: run12
2689
2854
  };
2690
2855
  }
2691
2856
  });
2692
- async function run12(input, ctx) {
2857
+ async function run13(input, ctx) {
2693
2858
  const productImages = [
2694
2859
  ...input.product_image_urls ?? [],
2695
2860
  ...await Promise.all((input.product_image_paths ?? []).map((p) => uploadLocalFile(p, ctx)))
@@ -2732,13 +2897,13 @@ async function run12(input, ctx) {
2732
2897
  (urls) => urls.length === 0 ? `Ad job ${submitted.jobId} completed but returned no assets.` : `Ad rendered (style: ${styleLabel}${submitted.ad?.product?.name ? `, product: ${submitted.ad.product.name}` : ""}). Video: ${urls[0]}`
2733
2898
  );
2734
2899
  }
2735
- var InputSchema12, InputJsonSchema12, adSkill;
2900
+ var InputSchema13, InputJsonSchema13, adSkill;
2736
2901
  var init_ad = __esm({
2737
2902
  "src/skills/ad.ts"() {
2738
2903
  init_types();
2739
2904
  init_poll();
2740
2905
  init_upload_helpers();
2741
- InputSchema12 = z.object({
2906
+ InputSchema13 = z.object({
2742
2907
  style: z.string().max(80).optional().describe(
2743
2908
  "Ad style slug (default ugc-testimonial). Catalog: GET /api/v1/marketing/presets \u2014 e.g. ugc-testimonial, unboxing-reveal, unboxing-asmr, virtual-try-on, street-style, product-showcase, macro-details, crush-test, hyper-motion, before-after, day-in-the-life, the-gift, tv-spot."
2744
2909
  ),
@@ -2764,7 +2929,7 @@ var init_ad = __esm({
2764
2929
  path: ["product_url"]
2765
2930
  }
2766
2931
  );
2767
- InputJsonSchema12 = {
2932
+ InputJsonSchema13 = {
2768
2933
  type: "object",
2769
2934
  properties: {
2770
2935
  style: {
@@ -2851,16 +3016,16 @@ var init_ad = __esm({
2851
3016
  name: "pixeldojo_ad",
2852
3017
  description: "Marketing Studio: turn a product into a rendered video ad with voiceover. Requires `product_url` (name, description and images are extracted), or `product_name` plus product_image_urls / product_image_paths. Pick a `style` slug (default ugc-testimonial; full catalog at GET https://pixeldojo.ai/api/v1/marketing/presets), and optionally add presenter reference images, a location, a hook, and the exact spoken script. Returns the video URL, or a jobId to check with pixeldojo_status.",
2853
3018
  hostedDescription: "Marketing Studio: turn a product into a rendered video ad with voiceover. Requires `product_url` (name, description and images are extracted), or `product_name` plus product_image_urls (public http(s) URLs). Pick a `style` slug (default ugc-testimonial; full catalog at GET https://pixeldojo.ai/api/v1/marketing/presets), and optionally add presenter reference images, a location, a hook, and the exact spoken script. Returns the video URL, or a jobId to check with pixeldojo_status.",
2854
- inputZod: InputSchema12,
2855
- inputJsonSchema: InputJsonSchema12,
3019
+ inputZod: InputSchema13,
3020
+ inputJsonSchema: InputJsonSchema13,
2856
3021
  // Composition skill — the server routes to the ad engine internally.
2857
3022
  allowedModels: [],
2858
3023
  defaultModel: "",
2859
- run: run12
3024
+ run: run13
2860
3025
  };
2861
3026
  }
2862
3027
  });
2863
- async function run13(input, ctx) {
3028
+ async function run14(input, ctx) {
2864
3029
  const client = ctx.client;
2865
3030
  const result = await client.runCampaign(input);
2866
3031
  if (result.kind === "campaign") {
@@ -2887,10 +3052,10 @@ async function run13(input, ctx) {
2887
3052
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
2888
3053
  };
2889
3054
  }
2890
- var InputSchema13, InputJsonSchema13, campaignSkill;
3055
+ var InputSchema14, InputJsonSchema14, campaignSkill;
2891
3056
  var init_campaign = __esm({
2892
3057
  "src/skills/campaign.ts"() {
2893
- InputSchema13 = z.object({
3058
+ InputSchema14 = z.object({
2894
3059
  productUrl: z.string().url().optional().describe("Product page URL. We extract name + description + images automatically."),
2895
3060
  product: z.object({
2896
3061
  name: z.string().min(1).max(200),
@@ -2906,7 +3071,7 @@ var init_campaign = __esm({
2906
3071
  message: "productUrl or product is required",
2907
3072
  path: ["productUrl"]
2908
3073
  });
2909
- InputJsonSchema13 = {
3074
+ InputJsonSchema14 = {
2910
3075
  type: "object",
2911
3076
  properties: {
2912
3077
  productUrl: {
@@ -2957,17 +3122,17 @@ var init_campaign = __esm({
2957
3122
  campaignSkill = {
2958
3123
  name: "pixeldojo_campaign",
2959
3124
  description: "Generate a coherent product launch package (hero image + N lifestyle variants + optional vertical video) from one URL or product profile. Composes hero / lifestyle / video models server-side; returns assets in one call or a handoff with campaignId to poll via pixeldojo_campaign_status.",
2960
- inputZod: InputSchema13,
2961
- inputJsonSchema: InputJsonSchema13,
3125
+ inputZod: InputSchema14,
3126
+ inputJsonSchema: InputJsonSchema14,
2962
3127
  // Composition skill — internal sub-jobs route to per-tool models, no
2963
3128
  // single allowed-models list applies here.
2964
3129
  allowedModels: [],
2965
3130
  defaultModel: "",
2966
- run: run13
3131
+ run: run14
2967
3132
  };
2968
3133
  }
2969
3134
  });
2970
- async function run14(input, ctx) {
3135
+ async function run15(input, ctx) {
2971
3136
  const client = ctx.client;
2972
3137
  const result = await client.getCampaign(input.campaignId);
2973
3138
  if (result.kind === "campaign") {
@@ -2997,13 +3162,13 @@ async function run14(input, ctx) {
2997
3162
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
2998
3163
  };
2999
3164
  }
3000
- var InputSchema14, InputJsonSchema14, campaignStatusSkill;
3165
+ var InputSchema15, InputJsonSchema15, campaignStatusSkill;
3001
3166
  var init_campaign_status = __esm({
3002
3167
  "src/skills/campaign-status.ts"() {
3003
- InputSchema14 = z.object({
3168
+ InputSchema15 = z.object({
3004
3169
  campaignId: z.string().min(1).max(200).describe("Campaign id returned from a prior pixeldojo_campaign handoff.")
3005
3170
  });
3006
- InputJsonSchema14 = {
3171
+ InputJsonSchema15 = {
3007
3172
  type: "object",
3008
3173
  properties: {
3009
3174
  campaignId: {
@@ -3016,15 +3181,15 @@ var init_campaign_status = __esm({
3016
3181
  campaignStatusSkill = {
3017
3182
  name: "pixeldojo_campaign_status",
3018
3183
  description: "Poll a campaign by campaignId returned from pixeldojo_campaign. Returns assets when every sub-job is done, or a handoff describing what is still in flight.",
3019
- inputZod: InputSchema14,
3020
- inputJsonSchema: InputJsonSchema14,
3184
+ inputZod: InputSchema15,
3185
+ inputJsonSchema: InputJsonSchema15,
3021
3186
  allowedModels: [],
3022
3187
  defaultModel: "",
3023
- run: run14
3188
+ run: run15
3024
3189
  };
3025
3190
  }
3026
3191
  });
3027
- async function run15(input, ctx) {
3192
+ async function run16(input, ctx) {
3028
3193
  let url;
3029
3194
  try {
3030
3195
  url = await uploadLocalFile(input.path, ctx);
@@ -3040,16 +3205,16 @@ async function run15(input, ctx) {
3040
3205
  (temp storage; auto-deletes in ~24h. Pass this URL as image_url, video_url for a clip, or song_url on pixeldojo_film for a song, to any pixeldojo tool that takes one.)`
3041
3206
  };
3042
3207
  }
3043
- var InputSchema15, InputJsonSchema15, uploadSkill;
3208
+ var InputSchema16, InputJsonSchema16, uploadSkill;
3044
3209
  var init_upload = __esm({
3045
3210
  "src/skills/upload.ts"() {
3046
3211
  init_upload_helpers();
3047
- InputSchema15 = z.object({
3212
+ InputSchema16 = z.object({
3048
3213
  path: z.string().min(1).max(4096).describe(
3049
3214
  "Absolute local file path to upload. JPEG, PNG, WebP, GIF (\u226450MB), MP4, WebM, MOV (\u2264200MB) or MP3, WAV, M4A, AAC, OGG, FLAC audio (\u226450MB). Returns a public URL on the temp CDN; storage auto-expires after 24 hours."
3050
3215
  )
3051
3216
  });
3052
- InputJsonSchema15 = {
3217
+ InputJsonSchema16 = {
3053
3218
  type: "object",
3054
3219
  properties: {
3055
3220
  path: {
@@ -3062,15 +3227,15 @@ var init_upload = __esm({
3062
3227
  uploadSkill = {
3063
3228
  name: "pixeldojo_upload",
3064
3229
  description: "Upload a local image, video or audio file (JPEG, PNG, WebP, GIF up to 50MB; MP4, WebM, MOV up to 200MB; MP3, WAV, M4A, AAC, OGG, FLAC up to 50MB) and get back a public URL that expires after 24 hours. Free. Pass an audio URL as song_url to pixeldojo_film for a music video. Pass the URL as image_url (stills) or video_url (clips) to tools that take hosted URLs only, such as pixeldojo_character, pixeldojo_storyboard and pixeldojo_upscale. pixeldojo_generate, pixeldojo_edit and pixeldojo_ad take local paths directly and need no separate upload.",
3065
- inputZod: InputSchema15,
3066
- inputJsonSchema: InputJsonSchema15,
3230
+ inputZod: InputSchema16,
3231
+ inputJsonSchema: InputJsonSchema16,
3067
3232
  allowedModels: [],
3068
3233
  defaultModel: "",
3069
- run: run15
3234
+ run: run16
3070
3235
  };
3071
3236
  }
3072
3237
  });
3073
- async function run16(input, ctx) {
3238
+ async function run17(input, ctx) {
3074
3239
  const requested = input.model ?? DEFAULT_MODEL6;
3075
3240
  if (!ALLOWED4.includes(requested)) {
3076
3241
  return {
@@ -3108,14 +3273,14 @@ async function run16(input, ctx) {
3108
3273
  (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Audio ready. Asset: ${urls[0]}`
3109
3274
  );
3110
3275
  }
3111
- var ALLOWED4, DEFAULT_MODEL6, InputSchema16, InputJsonSchema16, audioSkill;
3276
+ var ALLOWED4, DEFAULT_MODEL6, InputSchema17, InputJsonSchema17, audioSkill;
3112
3277
  var init_audio = __esm({
3113
3278
  "src/skills/audio.ts"() {
3114
3279
  init_poll();
3115
3280
  init_types();
3116
3281
  ALLOWED4 = ["seed-audio", "text-to-speech"];
3117
3282
  DEFAULT_MODEL6 = "seed-audio";
3118
- InputSchema16 = z.object({
3283
+ InputSchema17 = z.object({
3119
3284
  prompt: z.string().min(1).describe(
3120
3285
  "seed-audio: a script to speak, or a scene description (dialogue, sound effects, music), up to 2048 characters; refer to audio_urls clips in order as @Audio1..@Audio3. text-to-speech: the exact text to speak, up to 10,000 characters."
3121
3286
  ),
@@ -3125,7 +3290,7 @@ var init_audio = __esm({
3125
3290
  output_format: z.string().optional().describe("Output format. seed-audio: mp3 (default), wav, pcm, ogg_opus. text-to-speech: mp3 (default), wav, flac, pcm."),
3126
3291
  speed: z.number().min(0.5).max(2).optional().describe("Speech speed multiplier, 0.5-2 (default 1). Both models.")
3127
3292
  });
3128
- InputJsonSchema16 = {
3293
+ InputJsonSchema17 = {
3129
3294
  type: "object",
3130
3295
  properties: {
3131
3296
  prompt: {
@@ -3163,15 +3328,15 @@ var init_audio = __esm({
3163
3328
  audioSkill = {
3164
3329
  name: "pixeldojo_audio",
3165
3330
  description: "Generate audio: speech, multi-character dialogue, sound effects, and background music from one prompt (Seed Audio 1.0 by default; plain text-to-speech available). Voice cloning takes hosted reference clip URLs in audio_urls; local audio files are not accepted. Returns an audio URL, or a jobId for pixeldojo_status.",
3166
- inputZod: InputSchema16,
3167
- inputJsonSchema: InputJsonSchema16,
3331
+ inputZod: InputSchema17,
3332
+ inputJsonSchema: InputJsonSchema17,
3168
3333
  allowedModels: [...ALLOWED4],
3169
3334
  defaultModel: DEFAULT_MODEL6,
3170
- run: run16
3335
+ run: run17
3171
3336
  };
3172
3337
  }
3173
3338
  });
3174
- async function run17(input, ctx) {
3339
+ async function run18(input, ctx) {
3175
3340
  if (input.source === "characters") {
3176
3341
  const { characters } = await ctx.client.listCharacters({ q: input.q, limit: input.limit ?? 25 });
3177
3342
  if (characters.length === 0) {
@@ -3222,17 +3387,17 @@ ${lines.join("\n")}
3222
3387
  Pass any URL back into pixeldojo_generate, pixeldojo_edit, pixeldojo_character, or pixeldojo_upscale as a reference input.`
3223
3388
  };
3224
3389
  }
3225
- var InputSchema17, InputJsonSchema17, librarySkill;
3390
+ var InputSchema18, InputJsonSchema18, librarySkill;
3226
3391
  var init_library = __esm({
3227
3392
  "src/skills/library.ts"() {
3228
- InputSchema17 = z.object({
3393
+ InputSchema18 = z.object({
3229
3394
  source: z.enum(["media", "characters"]).optional().describe("media (default): saved and recent results. characters: saved Character Studio characters and elements, usable as @Name in prompts."),
3230
3395
  q: z.string().optional().describe("Substring match against the prompt that produced the asset."),
3231
3396
  model: z.string().optional().describe("Restrict to a single model (apiId)."),
3232
3397
  modality: z.enum(["image", "video", "audio"]).optional().describe("Restrict to one output type."),
3233
3398
  limit: z.number().int().min(1).max(50).optional().describe("Max results (default 10).")
3234
3399
  });
3235
- InputJsonSchema17 = {
3400
+ InputJsonSchema18 = {
3236
3401
  type: "object",
3237
3402
  properties: {
3238
3403
  source: {
@@ -3257,15 +3422,15 @@ var init_library = __esm({
3257
3422
  librarySkill = {
3258
3423
  name: "pixeldojo_library",
3259
3424
  description: "Search your Library, newest first. source=media (default): saved media (permanent) and recent API/MCP generations (deleted 1 hour after they finish), as URLs to reuse as references. source=characters: saved Character Studio characters and elements, each usable as @Name in any prompt.",
3260
- inputZod: InputSchema17,
3261
- inputJsonSchema: InputJsonSchema17,
3425
+ inputZod: InputSchema18,
3426
+ inputJsonSchema: InputJsonSchema18,
3262
3427
  allowedModels: [],
3263
3428
  defaultModel: "",
3264
- run: run17
3429
+ run: run18
3265
3430
  };
3266
3431
  }
3267
3432
  });
3268
- async function run18(input, ctx) {
3433
+ async function run19(input, ctx) {
3269
3434
  const res = await ctx.client.saveMedia({
3270
3435
  url: input.url,
3271
3436
  prompt: input.prompt,
@@ -3279,17 +3444,17 @@ async function run18(input, ctx) {
3279
3444
  It will appear at https://pixeldojo.ai/my-images and in pixeldojo_library searches.`
3280
3445
  };
3281
3446
  }
3282
- var InputSchema18, InputJsonSchema18, saveSkill;
3447
+ var InputSchema19, InputJsonSchema19, saveSkill;
3283
3448
  var init_save = __esm({
3284
3449
  "src/skills/save.ts"() {
3285
- InputSchema18 = z.object({
3450
+ InputSchema19 = z.object({
3286
3451
  url: z.string().url().describe("The asset URL to save (image or video)."),
3287
3452
  prompt: z.string().optional().describe("The prompt that produced it \u2014 makes it findable in the library later."),
3288
3453
  tool_name: z.string().optional().describe("Tool/model slug that produced it."),
3289
3454
  modality: z.enum(["image", "video", "audio"]).optional(),
3290
3455
  job_id: z.string().optional().describe("The jobId that produced this asset, when known.")
3291
3456
  });
3292
- InputJsonSchema18 = {
3457
+ InputJsonSchema19 = {
3293
3458
  type: "object",
3294
3459
  properties: {
3295
3460
  url: { type: "string", format: "uri", description: "The result URL to keep (image or video from a PixelDojo job)." },
@@ -3303,15 +3468,15 @@ var init_save = __esm({
3303
3468
  saveSkill = {
3304
3469
  name: "pixeldojo_save",
3305
3470
  description: `Save a generated image or video into the user's My Media library permanently ("save this", "keep it"). Results otherwise expire 1 hour after they finish. Pass the result URL; it is safety-checked before it is kept.`,
3306
- inputZod: InputSchema18,
3307
- inputJsonSchema: InputJsonSchema18,
3471
+ inputZod: InputSchema19,
3472
+ inputJsonSchema: InputJsonSchema19,
3308
3473
  allowedModels: [],
3309
3474
  defaultModel: "",
3310
- run: run18
3475
+ run: run19
3311
3476
  };
3312
3477
  }
3313
3478
  });
3314
- async function run19(input, ctx) {
3479
+ async function run20(input, ctx) {
3315
3480
  const res = await ctx.client.saveCharacter({
3316
3481
  name: input.name,
3317
3482
  kind: input.kind ?? "character",
@@ -3323,17 +3488,17 @@ async function run19(input, ctx) {
3323
3488
  text: `Saved ${res.kind} "${res.name}" to Character Studio (${res.image_urls.length} image${res.image_urls.length === 1 ? "" : "s"}). Use it in any prompt as ${res.mention}, for example "${res.mention} walking on a beach at sunset". It also appears at https://pixeldojo.ai/characters.`
3324
3489
  };
3325
3490
  }
3326
- var KINDS, InputSchema19, InputJsonSchema19, saveCharacterSkill;
3491
+ var KINDS, InputSchema20, InputJsonSchema20, saveCharacterSkill;
3327
3492
  var init_save_character = __esm({
3328
3493
  "src/skills/save-character.ts"() {
3329
3494
  KINDS = ["character", "product", "outfit", "location", "object", "style"];
3330
- InputSchema19 = z.object({
3495
+ InputSchema20 = z.object({
3331
3496
  name: z.string().min(1).max(60).describe("What to call it. Used as @Name in prompts."),
3332
3497
  kind: z.enum(KINDS).optional().describe("Default character."),
3333
3498
  image_urls: z.array(z.string().url()).max(8).optional().describe("3 to 5 photos from different angles works best for a character."),
3334
3499
  description: z.string().max(1500).optional().describe("Appearance notes, or the scene text for an element.")
3335
3500
  });
3336
- InputJsonSchema19 = {
3501
+ InputJsonSchema20 = {
3337
3502
  type: "object",
3338
3503
  properties: {
3339
3504
  name: { type: "string", description: "What to call it. Used as @Name in prompts afterwards." },
@@ -3351,11 +3516,11 @@ var init_save_character = __esm({
3351
3516
  saveCharacterSkill = {
3352
3517
  name: "pixeldojo_save_character",
3353
3518
  description: "Save a character (a person, from 3-5 photos) or an element (product, outfit, location, prop, style) to the user's Character Studio library. Afterwards write @Name in any prompt to use it. List saved ones with pixeldojo_library source=characters.",
3354
- inputZod: InputSchema19,
3355
- inputJsonSchema: InputJsonSchema19,
3519
+ inputZod: InputSchema20,
3520
+ inputJsonSchema: InputJsonSchema20,
3356
3521
  allowedModels: [],
3357
3522
  defaultModel: "",
3358
- run: run19
3523
+ run: run20
3359
3524
  };
3360
3525
  }
3361
3526
  });
@@ -3615,6 +3780,7 @@ __export(skills_exports, {
3615
3780
  generateSkill: () => generateSkill,
3616
3781
  librarySkill: () => librarySkill,
3617
3782
  listWorkflowsSkill: () => listWorkflowsSkill,
3783
+ overlaySkill: () => overlaySkill,
3618
3784
  runWorkflowSkill: () => runWorkflowSkill,
3619
3785
  saveCharacterSkill: () => saveCharacterSkill,
3620
3786
  saveSkill: () => saveSkill,
@@ -3653,6 +3819,7 @@ var init_skills = __esm({
3653
3819
  init_storyboard();
3654
3820
  init_upscale();
3655
3821
  init_caption();
3822
+ init_overlay();
3656
3823
  init_status();
3657
3824
  init_from_url();
3658
3825
  init_film();
@@ -3674,6 +3841,7 @@ var init_skills = __esm({
3674
3841
  storyboardSkill,
3675
3842
  upscaleSkill,
3676
3843
  captionSkill,
3844
+ overlaySkill,
3677
3845
  audioSkill,
3678
3846
  librarySkill,
3679
3847
  saveSkill,
@@ -3714,6 +3882,7 @@ var init_skills = __esm({
3714
3882
  pixeldojo_storyboard: render("Storyboard preview video"),
3715
3883
  pixeldojo_upscale: render("Upscale image or video"),
3716
3884
  pixeldojo_caption: render("Caption video"),
3885
+ pixeldojo_overlay: render("Add offer or end card"),
3717
3886
  pixeldojo_audio: render("Generate music, speech or sound"),
3718
3887
  pixeldojo_video: render("Change, animate or extend video"),
3719
3888
  pixeldojo_ad: render("Make video ad"),
@@ -3784,7 +3953,7 @@ function makeRedactedLogger(target = console) {
3784
3953
  }
3785
3954
 
3786
3955
  // src/server.ts
3787
- var PACKAGE_VERSION = "0.21.0" ;
3956
+ var PACKAGE_VERSION = "0.23.0" ;
3788
3957
  var SERVER_INSTRUCTIONS = "Pixel Dojo generates images, video, audio and short films from one catalog of AI models, billed in credits from the connected Pixel Dojo account. A job that runs past the 30-second wait returns a jobId to check later; check it rather than submitting again, since every new submission is charged. Generated asset URLs are deleted one hour after they are created: pixeldojo_save keeps one in the user's My Media permanently (after a safety check), and finished films stay in the account library. In any prompt, @Name uses a character, product, outfit, location, prop or style the user saved in Character Studio: its photos are attached automatically. pixeldojo_library source=characters lists them, and pixeldojo_save_character saves a new one from 3 to 5 photos.";
3789
3958
  function buildServer(options) {
3790
3959
  if (!options.apiKey) {