@pixeldojo/mcp 0.21.0 → 0.22.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.cjs CHANGED
@@ -1311,6 +1311,108 @@ var init_caption = __esm({
1311
1311
  }
1312
1312
  });
1313
1313
  async function run7(input, ctx) {
1314
+ if (!input.offer && !input.end_card) {
1315
+ return { kind: "text", text: "pixeldojo_overlay needs an offer, an end_card, or both." };
1316
+ }
1317
+ const { offer, end_card: card } = input;
1318
+ const submitted = await ctx.client.run(MODEL2, {
1319
+ prompt: "",
1320
+ video: input.video_url,
1321
+ ...input.color ? { color: input.color } : {},
1322
+ ...offer ? {
1323
+ offer_text: offer.text,
1324
+ offer_subtext: offer.subtext,
1325
+ offer_start: offer.start_sec,
1326
+ offer_duration: offer.duration_sec,
1327
+ offer_position: offer.position
1328
+ } : {},
1329
+ ...card ? {
1330
+ end_headline: card.headline,
1331
+ end_cta: card.cta,
1332
+ end_url: card.url,
1333
+ logo_url: card.logo_url,
1334
+ end_duration: card.duration_sec
1335
+ } : {}
1336
+ });
1337
+ const result = await pollJobUntilDoneOrHandoff(
1338
+ submitted.jobId,
1339
+ (id) => ctx.client.getJob(id),
1340
+ ctx.buildStatusUrl,
1341
+ { now: ctx.pollOverrides?.now, sleep: ctx.pollOverrides?.sleep }
1342
+ );
1343
+ return pollResultToSkillResult(
1344
+ result,
1345
+ (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Branded. Asset: ${urls[0]}`
1346
+ );
1347
+ }
1348
+ var MODEL2, InputSchema7, InputJsonSchema7, overlaySkill;
1349
+ var init_overlay = __esm({
1350
+ "src/skills/overlay.ts"() {
1351
+ init_poll();
1352
+ init_types();
1353
+ MODEL2 = "brand-overlay";
1354
+ InputSchema7 = zod.z.object({
1355
+ video_url: zod.z.string().url(),
1356
+ color: zod.z.string().optional(),
1357
+ offer: zod.z.object({
1358
+ text: zod.z.string().max(24),
1359
+ subtext: zod.z.string().max(40).optional(),
1360
+ start_sec: zod.z.number().min(0).optional(),
1361
+ duration_sec: zod.z.number().min(1).max(10).optional(),
1362
+ position: zod.z.enum(["top", "bottom"]).optional()
1363
+ }).optional(),
1364
+ end_card: zod.z.object({
1365
+ headline: zod.z.string().max(40),
1366
+ cta: zod.z.string().max(24).optional(),
1367
+ url: zod.z.string().max(40).optional(),
1368
+ logo_url: zod.z.string().url().optional(),
1369
+ duration_sec: zod.z.number().min(2).max(5).optional()
1370
+ }).optional()
1371
+ });
1372
+ InputJsonSchema7 = {
1373
+ type: "object",
1374
+ required: ["video_url"],
1375
+ properties: {
1376
+ video_url: { type: "string", format: "uri", description: "The video to brand (MP4 or MOV)." },
1377
+ color: { type: "string", description: "Brand color as #RRGGBB: the badge and the button. Defaults to #FFE500." },
1378
+ offer: {
1379
+ type: "object",
1380
+ description: "Offer callout: a badge that pops in on cue.",
1381
+ required: ["text"],
1382
+ properties: {
1383
+ text: { type: "string", maxLength: 24, description: 'e.g. "50% OFF".' },
1384
+ subtext: { type: "string", maxLength: 40, description: 'Small line under it, e.g. "This week only".' },
1385
+ start_sec: { type: "number", description: "Second it appears. Default 0.5." },
1386
+ duration_sec: { type: "number", minimum: 1, maximum: 10, description: "Seconds it stays. Default 3." },
1387
+ position: { type: "string", enum: ["top", "bottom"], description: "Default top." }
1388
+ }
1389
+ },
1390
+ end_card: {
1391
+ type: "object",
1392
+ description: "End card held after the last frame.",
1393
+ required: ["headline"],
1394
+ properties: {
1395
+ headline: { type: "string", maxLength: 40, description: 'e.g. "Your new favorite mug".' },
1396
+ cta: { type: "string", maxLength: 24, description: 'Button text, e.g. "Shop now".' },
1397
+ url: { type: "string", maxLength: 40, description: "Web address shown under the button." },
1398
+ logo_url: { type: "string", format: "uri", description: "PNG (transparent works best) or JPG." },
1399
+ duration_sec: { type: "number", minimum: 2, maximum: 5, description: "Default 3." }
1400
+ }
1401
+ }
1402
+ }
1403
+ };
1404
+ overlaySkill = {
1405
+ name: "pixeldojo_overlay",
1406
+ description: 'Add an offer callout (a badge like "50% OFF" that pops in on cue) and/or a branded end card (the last frame held under a logo, headline, button and web address) to a video. The text renders exactly as written, in the brand color. Pass video_url plus offer and/or end_card. 2 credits.',
1407
+ inputZod: InputSchema7,
1408
+ inputJsonSchema: InputJsonSchema7,
1409
+ allowedModels: [MODEL2],
1410
+ defaultModel: MODEL2,
1411
+ run: run7
1412
+ };
1413
+ }
1414
+ });
1415
+ async function run8(input, ctx) {
1314
1416
  const job = await ctx.client.getJob(input.jobId);
1315
1417
  if (job.status === "completed") {
1316
1418
  const urls = extractAssetUrls2(job);
@@ -1374,13 +1476,13 @@ function extractAssetUrls2(job) {
1374
1476
  if (output?.video) return [output.video];
1375
1477
  return [];
1376
1478
  }
1377
- var InputSchema7, InputJsonSchema7, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1479
+ var InputSchema8, InputJsonSchema8, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1378
1480
  var init_status = __esm({
1379
1481
  "src/skills/status.ts"() {
1380
- InputSchema7 = zod.z.object({
1482
+ InputSchema8 = zod.z.object({
1381
1483
  jobId: zod.z.string().min(1).max(200).describe("Job id returned from a prior pixeldojo_* skill handoff.")
1382
1484
  });
1383
- InputJsonSchema7 = {
1485
+ InputJsonSchema8 = {
1384
1486
  type: "object",
1385
1487
  properties: {
1386
1488
  jobId: {
@@ -1395,16 +1497,16 @@ var init_status = __esm({
1395
1497
  statusSkill = {
1396
1498
  name: "pixeldojo_status",
1397
1499
  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".',
1398
- inputZod: InputSchema7,
1399
- inputJsonSchema: InputJsonSchema7,
1500
+ inputZod: InputSchema8,
1501
+ inputJsonSchema: InputJsonSchema8,
1400
1502
  // status is special — it doesn't dispatch to a model
1401
1503
  allowedModels: [],
1402
1504
  defaultModel: "",
1403
- run: run7
1505
+ run: run8
1404
1506
  };
1405
1507
  }
1406
1508
  });
1407
- async function run8(input, ctx) {
1509
+ async function run9(input, ctx) {
1408
1510
  const product = await ctx.client.extractProduct(input.url);
1409
1511
  const summary = [
1410
1512
  `Product: ${product.name}`,
@@ -1421,13 +1523,13 @@ function truncate(input, max) {
1421
1523
  if (input.length <= max) return input;
1422
1524
  return input.slice(0, max - 3) + "...";
1423
1525
  }
1424
- var InputSchema8, InputJsonSchema8, fromUrlSkill;
1526
+ var InputSchema9, InputJsonSchema9, fromUrlSkill;
1425
1527
  var init_from_url = __esm({
1426
1528
  "src/skills/from-url.ts"() {
1427
- InputSchema8 = zod.z.object({
1529
+ InputSchema9 = zod.z.object({
1428
1530
  url: zod.z.string().min(1).max(2048).describe("Product page URL. Shopify, BigCommerce, WooCommerce, or any page with JSON-LD / OpenGraph product metadata.")
1429
1531
  });
1430
- InputJsonSchema8 = {
1532
+ InputJsonSchema9 = {
1431
1533
  type: "object",
1432
1534
  properties: {
1433
1535
  url: {
@@ -1440,12 +1542,12 @@ var init_from_url = __esm({
1440
1542
  fromUrlSkill = {
1441
1543
  name: "pixeldojo_from_url",
1442
1544
  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.",
1443
- inputZod: InputSchema8,
1444
- inputJsonSchema: InputJsonSchema8,
1545
+ inputZod: InputSchema9,
1546
+ inputJsonSchema: InputJsonSchema9,
1445
1547
  // No model dispatch — this skill calls a server-side scrape, not a generation.
1446
1548
  allowedModels: [],
1447
1549
  defaultModel: "",
1448
- run: run8
1550
+ run: run9
1449
1551
  };
1450
1552
  }
1451
1553
  });
@@ -2008,7 +2110,7 @@ async function redoShots(input, ctx) {
2008
2110
  followUp: keepGoing(filmId, 30, { soundtrack: input.soundtrack })
2009
2111
  };
2010
2112
  }
2011
- async function run9(input, ctx) {
2113
+ async function run10(input, ctx) {
2012
2114
  const action = input.action === "plan" && input.film_id ? input.cast?.length ? "cast" : "status" : input.action;
2013
2115
  if (action === "plan") return plan(input, ctx);
2014
2116
  if (!input.film_id) return { kind: "text", text: "produce/status/cast/redo need the film_id returned by the plan step." };
@@ -2028,7 +2130,7 @@ async function run9(input, ctx) {
2028
2130
  if (action === "redo") return redoShots(input, ctx);
2029
2131
  return advance(input.film_id, input.soundtrack, input.music_job_id, ctx);
2030
2132
  }
2031
- 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;
2133
+ 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;
2032
2134
  var init_film = __esm({
2033
2135
  "src/skills/film.ts"() {
2034
2136
  init_upload_helpers();
@@ -2036,7 +2138,7 @@ var init_film = __esm({
2036
2138
  MUSIC_VIDEO_LOOKS = ["rap-video", "neon-club", "stage-performance", "retro-camcorder", "y2k-pop", "moody-rnb", "rock-grit", "dream-pop", "k-pop"];
2037
2139
  LOOKS = [...STORY_LOOKS, ...MUSIC_VIDEO_LOOKS];
2038
2140
  MUSIC_CLIP_ENGINE_ID = "minimax-h3-reference";
2039
- InputSchema9 = zod.z.object({
2141
+ InputSchema10 = zod.z.object({
2040
2142
  idea: zod.z.string().max(2e3).optional().describe("One-to-three sentence film idea. The studio writes the screenplay (free). Provide idea OR script for planning."),
2041
2143
  script: zod.z.string().max(2e4).optional().describe("A full screenplay to plan instead of an idea (sluglines, action lines, dialogue)."),
2042
2144
  look: zod.z.enum(LOOKS).optional().describe("Visual style carried through frames, clips, and soundtrack. Default live-action, or rap-video for a music video."),
@@ -2064,7 +2166,7 @@ var init_film = __esm({
2064
2166
  soundtrack: zod.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."),
2065
2167
  music_job_id: zod.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.")
2066
2168
  });
2067
- InputJsonSchema9 = {
2169
+ InputJsonSchema10 = {
2068
2170
  type: "object",
2069
2171
  properties: {
2070
2172
  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.` },
@@ -2178,11 +2280,11 @@ var init_film = __esm({
2178
2280
  name: "pixeldojo_film",
2179
2281
  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.",
2180
2282
  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.",
2181
- inputZod: InputSchema9,
2182
- inputJsonSchema: InputJsonSchema9,
2283
+ inputZod: InputSchema10,
2284
+ inputJsonSchema: InputJsonSchema10,
2183
2285
  allowedModels: [],
2184
2286
  defaultModel: "",
2185
- run: run9
2287
+ run: run10
2186
2288
  };
2187
2289
  }
2188
2290
  });
@@ -2269,7 +2371,7 @@ function buildVideoPayload(verb, apiId, i) {
2269
2371
  };
2270
2372
  }
2271
2373
  }
2272
- async function run10(input, ctx) {
2374
+ async function run11(input, ctx) {
2273
2375
  const paramsGate = paramsWithoutModel(input.params, input.model);
2274
2376
  if (paramsGate) return { kind: "text", text: paramsGate };
2275
2377
  const verb = input.verb;
@@ -2332,7 +2434,7 @@ async function run10(input, ctx) {
2332
2434
  notes.join(" ")
2333
2435
  );
2334
2436
  }
2335
- var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema10, engineList, InputJsonSchema10, BASE_DESCRIPTION, videoSkill;
2437
+ var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema11, engineList, InputJsonSchema11, BASE_DESCRIPTION, videoSkill;
2336
2438
  var init_video = __esm({
2337
2439
  "src/skills/video.ts"() {
2338
2440
  init_poll();
@@ -2366,7 +2468,7 @@ var init_video = __esm({
2366
2468
  "wan-video-character-swap"
2367
2469
  ]);
2368
2470
  NO_IMAGE_ENGINES = /* @__PURE__ */ new Set(["flux-video-edit", "xai-video-edit"]);
2369
- InputSchema10 = zod.z.object({
2471
+ InputSchema11 = zod.z.object({
2370
2472
  verb: zod.z.enum(VERBS),
2371
2473
  prompt: zod.z.string().max(8e3).optional(),
2372
2474
  video_url: zod.z.string().url().optional(),
@@ -2381,7 +2483,7 @@ var init_video = __esm({
2381
2483
  params: ParamsInput
2382
2484
  });
2383
2485
  engineList = (verb) => `${verb}: ${VIDEO_STUDIO_ENGINES[verb].join(", ")} (default ${VIDEO_STUDIO_ENGINES[verb][0]})`;
2384
- InputJsonSchema10 = {
2486
+ InputJsonSchema11 = {
2385
2487
  type: "object",
2386
2488
  properties: {
2387
2489
  verb: {
@@ -2442,11 +2544,11 @@ var init_video = __esm({
2442
2544
  name: "pixeldojo_video",
2443
2545
  description: `${BASE_DESCRIPTION} Local files: video_path / image_path (uploaded to 24h temp storage first).`,
2444
2546
  hostedDescription: `${BASE_DESCRIPTION} Media must be public http(s) URLs.`,
2445
- inputZod: InputSchema10,
2446
- inputJsonSchema: InputJsonSchema10,
2547
+ inputZod: InputSchema11,
2548
+ inputJsonSchema: InputJsonSchema11,
2447
2549
  allowedModels: Array.from(new Set(VERBS.flatMap((v) => VIDEO_STUDIO_ENGINES[v]))),
2448
2550
  defaultModel: VIDEO_STUDIO_ENGINES.change[0],
2449
- run: run10
2551
+ run: run11
2450
2552
  };
2451
2553
  }
2452
2554
  });
@@ -2621,14 +2723,14 @@ async function produce2(id, ctx) {
2621
2723
  const musicNote = ep.musicEnabled && ep.music?.status === "failed" ? " The music bed failed, so this cut has no music." : "";
2622
2724
  return { kind: "text", text: `Export started, free${prior}.${musicNote} ${next(id, "produce", "~60s")}` };
2623
2725
  }
2624
- async function run11(input, ctx) {
2726
+ async function run12(input, ctx) {
2625
2727
  const action = input.action === "create" && input.episode_id ? "status" : input.action;
2626
2728
  if (action === "create") return create(input, ctx);
2627
2729
  if (!input.episode_id) return { kind: "text", text: "produce and status need the episode_id returned by the create step." };
2628
2730
  if (action === "produce") return produce2(input.episode_id, ctx);
2629
2731
  return status(input.episode_id, ctx);
2630
2732
  }
2631
- var STYLES2, CATEGORIES, ENGINES, MIN_SECONDS, MAX_SECONDS, MAX_IN_FLIGHT, InputSchema11, InputJsonSchema11, call, next, needsRender, PLAN_POLL_MS, PLAN_MAX_POLLS, stillPlanning, episodeSkill;
2733
+ var STYLES2, CATEGORIES, ENGINES, MIN_SECONDS, MAX_SECONDS, MAX_IN_FLIGHT, InputSchema12, InputJsonSchema12, call, next, needsRender, PLAN_POLL_MS, PLAN_MAX_POLLS, stillPlanning, episodeSkill;
2632
2734
  var init_episode = __esm({
2633
2735
  "src/skills/episode.ts"() {
2634
2736
  STYLES2 = ["editorial-motion", "paper-diorama", "hand-drawn", "storybook", "poster-vector", "soft-3d"];
@@ -2637,7 +2739,7 @@ var init_episode = __esm({
2637
2739
  MIN_SECONDS = 60;
2638
2740
  MAX_SECONDS = 300;
2639
2741
  MAX_IN_FLIGHT = 4;
2640
- InputSchema11 = zod.z.object({
2742
+ InputSchema12 = zod.z.object({
2641
2743
  action: zod.z.enum(["create", "produce", "status"]).default("create"),
2642
2744
  topic: zod.z.string().min(8).max(400).optional(),
2643
2745
  episode_id: zod.z.string().max(40).optional(),
@@ -2650,7 +2752,7 @@ var init_episode = __esm({
2650
2752
  music: zod.z.boolean().default(true),
2651
2753
  title: zod.z.string().max(120).optional()
2652
2754
  });
2653
- InputJsonSchema11 = {
2755
+ InputJsonSchema12 = {
2654
2756
  type: "object",
2655
2757
  properties: {
2656
2758
  action: {
@@ -2683,15 +2785,15 @@ var init_episode = __esm({
2683
2785
  episodeSkill = {
2684
2786
  name: "pixeldojo_episode",
2685
2787
  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.",
2686
- inputZod: InputSchema11,
2687
- inputJsonSchema: InputJsonSchema11,
2788
+ inputZod: InputSchema12,
2789
+ inputJsonSchema: InputJsonSchema12,
2688
2790
  allowedModels: [],
2689
2791
  defaultModel: "",
2690
- run: run11
2792
+ run: run12
2691
2793
  };
2692
2794
  }
2693
2795
  });
2694
- async function run12(input, ctx) {
2796
+ async function run13(input, ctx) {
2695
2797
  const productImages = [
2696
2798
  ...input.product_image_urls ?? [],
2697
2799
  ...await Promise.all((input.product_image_paths ?? []).map((p) => uploadLocalFile(p, ctx)))
@@ -2734,13 +2836,13 @@ async function run12(input, ctx) {
2734
2836
  (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]}`
2735
2837
  );
2736
2838
  }
2737
- var InputSchema12, InputJsonSchema12, adSkill;
2839
+ var InputSchema13, InputJsonSchema13, adSkill;
2738
2840
  var init_ad = __esm({
2739
2841
  "src/skills/ad.ts"() {
2740
2842
  init_types();
2741
2843
  init_poll();
2742
2844
  init_upload_helpers();
2743
- InputSchema12 = zod.z.object({
2845
+ InputSchema13 = zod.z.object({
2744
2846
  style: zod.z.string().max(80).optional().describe(
2745
2847
  "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."
2746
2848
  ),
@@ -2766,7 +2868,7 @@ var init_ad = __esm({
2766
2868
  path: ["product_url"]
2767
2869
  }
2768
2870
  );
2769
- InputJsonSchema12 = {
2871
+ InputJsonSchema13 = {
2770
2872
  type: "object",
2771
2873
  properties: {
2772
2874
  style: {
@@ -2853,16 +2955,16 @@ var init_ad = __esm({
2853
2955
  name: "pixeldojo_ad",
2854
2956
  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.",
2855
2957
  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.",
2856
- inputZod: InputSchema12,
2857
- inputJsonSchema: InputJsonSchema12,
2958
+ inputZod: InputSchema13,
2959
+ inputJsonSchema: InputJsonSchema13,
2858
2960
  // Composition skill — the server routes to the ad engine internally.
2859
2961
  allowedModels: [],
2860
2962
  defaultModel: "",
2861
- run: run12
2963
+ run: run13
2862
2964
  };
2863
2965
  }
2864
2966
  });
2865
- async function run13(input, ctx) {
2967
+ async function run14(input, ctx) {
2866
2968
  const client = ctx.client;
2867
2969
  const result = await client.runCampaign(input);
2868
2970
  if (result.kind === "campaign") {
@@ -2889,10 +2991,10 @@ async function run13(input, ctx) {
2889
2991
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
2890
2992
  };
2891
2993
  }
2892
- var InputSchema13, InputJsonSchema13, campaignSkill;
2994
+ var InputSchema14, InputJsonSchema14, campaignSkill;
2893
2995
  var init_campaign = __esm({
2894
2996
  "src/skills/campaign.ts"() {
2895
- InputSchema13 = zod.z.object({
2997
+ InputSchema14 = zod.z.object({
2896
2998
  productUrl: zod.z.string().url().optional().describe("Product page URL. We extract name + description + images automatically."),
2897
2999
  product: zod.z.object({
2898
3000
  name: zod.z.string().min(1).max(200),
@@ -2908,7 +3010,7 @@ var init_campaign = __esm({
2908
3010
  message: "productUrl or product is required",
2909
3011
  path: ["productUrl"]
2910
3012
  });
2911
- InputJsonSchema13 = {
3013
+ InputJsonSchema14 = {
2912
3014
  type: "object",
2913
3015
  properties: {
2914
3016
  productUrl: {
@@ -2959,17 +3061,17 @@ var init_campaign = __esm({
2959
3061
  campaignSkill = {
2960
3062
  name: "pixeldojo_campaign",
2961
3063
  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.",
2962
- inputZod: InputSchema13,
2963
- inputJsonSchema: InputJsonSchema13,
3064
+ inputZod: InputSchema14,
3065
+ inputJsonSchema: InputJsonSchema14,
2964
3066
  // Composition skill — internal sub-jobs route to per-tool models, no
2965
3067
  // single allowed-models list applies here.
2966
3068
  allowedModels: [],
2967
3069
  defaultModel: "",
2968
- run: run13
3070
+ run: run14
2969
3071
  };
2970
3072
  }
2971
3073
  });
2972
- async function run14(input, ctx) {
3074
+ async function run15(input, ctx) {
2973
3075
  const client = ctx.client;
2974
3076
  const result = await client.getCampaign(input.campaignId);
2975
3077
  if (result.kind === "campaign") {
@@ -2999,13 +3101,13 @@ async function run14(input, ctx) {
2999
3101
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
3000
3102
  };
3001
3103
  }
3002
- var InputSchema14, InputJsonSchema14, campaignStatusSkill;
3104
+ var InputSchema15, InputJsonSchema15, campaignStatusSkill;
3003
3105
  var init_campaign_status = __esm({
3004
3106
  "src/skills/campaign-status.ts"() {
3005
- InputSchema14 = zod.z.object({
3107
+ InputSchema15 = zod.z.object({
3006
3108
  campaignId: zod.z.string().min(1).max(200).describe("Campaign id returned from a prior pixeldojo_campaign handoff.")
3007
3109
  });
3008
- InputJsonSchema14 = {
3110
+ InputJsonSchema15 = {
3009
3111
  type: "object",
3010
3112
  properties: {
3011
3113
  campaignId: {
@@ -3018,15 +3120,15 @@ var init_campaign_status = __esm({
3018
3120
  campaignStatusSkill = {
3019
3121
  name: "pixeldojo_campaign_status",
3020
3122
  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.",
3021
- inputZod: InputSchema14,
3022
- inputJsonSchema: InputJsonSchema14,
3123
+ inputZod: InputSchema15,
3124
+ inputJsonSchema: InputJsonSchema15,
3023
3125
  allowedModels: [],
3024
3126
  defaultModel: "",
3025
- run: run14
3127
+ run: run15
3026
3128
  };
3027
3129
  }
3028
3130
  });
3029
- async function run15(input, ctx) {
3131
+ async function run16(input, ctx) {
3030
3132
  let url;
3031
3133
  try {
3032
3134
  url = await uploadLocalFile(input.path, ctx);
@@ -3042,16 +3144,16 @@ async function run15(input, ctx) {
3042
3144
  (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.)`
3043
3145
  };
3044
3146
  }
3045
- var InputSchema15, InputJsonSchema15, uploadSkill;
3147
+ var InputSchema16, InputJsonSchema16, uploadSkill;
3046
3148
  var init_upload = __esm({
3047
3149
  "src/skills/upload.ts"() {
3048
3150
  init_upload_helpers();
3049
- InputSchema15 = zod.z.object({
3151
+ InputSchema16 = zod.z.object({
3050
3152
  path: zod.z.string().min(1).max(4096).describe(
3051
3153
  "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."
3052
3154
  )
3053
3155
  });
3054
- InputJsonSchema15 = {
3156
+ InputJsonSchema16 = {
3055
3157
  type: "object",
3056
3158
  properties: {
3057
3159
  path: {
@@ -3064,15 +3166,15 @@ var init_upload = __esm({
3064
3166
  uploadSkill = {
3065
3167
  name: "pixeldojo_upload",
3066
3168
  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.",
3067
- inputZod: InputSchema15,
3068
- inputJsonSchema: InputJsonSchema15,
3169
+ inputZod: InputSchema16,
3170
+ inputJsonSchema: InputJsonSchema16,
3069
3171
  allowedModels: [],
3070
3172
  defaultModel: "",
3071
- run: run15
3173
+ run: run16
3072
3174
  };
3073
3175
  }
3074
3176
  });
3075
- async function run16(input, ctx) {
3177
+ async function run17(input, ctx) {
3076
3178
  const requested = input.model ?? DEFAULT_MODEL6;
3077
3179
  if (!ALLOWED4.includes(requested)) {
3078
3180
  return {
@@ -3110,14 +3212,14 @@ async function run16(input, ctx) {
3110
3212
  (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Audio ready. Asset: ${urls[0]}`
3111
3213
  );
3112
3214
  }
3113
- var ALLOWED4, DEFAULT_MODEL6, InputSchema16, InputJsonSchema16, audioSkill;
3215
+ var ALLOWED4, DEFAULT_MODEL6, InputSchema17, InputJsonSchema17, audioSkill;
3114
3216
  var init_audio = __esm({
3115
3217
  "src/skills/audio.ts"() {
3116
3218
  init_poll();
3117
3219
  init_types();
3118
3220
  ALLOWED4 = ["seed-audio", "text-to-speech"];
3119
3221
  DEFAULT_MODEL6 = "seed-audio";
3120
- InputSchema16 = zod.z.object({
3222
+ InputSchema17 = zod.z.object({
3121
3223
  prompt: zod.z.string().min(1).describe(
3122
3224
  "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."
3123
3225
  ),
@@ -3127,7 +3229,7 @@ var init_audio = __esm({
3127
3229
  output_format: zod.z.string().optional().describe("Output format. seed-audio: mp3 (default), wav, pcm, ogg_opus. text-to-speech: mp3 (default), wav, flac, pcm."),
3128
3230
  speed: zod.z.number().min(0.5).max(2).optional().describe("Speech speed multiplier, 0.5-2 (default 1). Both models.")
3129
3231
  });
3130
- InputJsonSchema16 = {
3232
+ InputJsonSchema17 = {
3131
3233
  type: "object",
3132
3234
  properties: {
3133
3235
  prompt: {
@@ -3165,15 +3267,15 @@ var init_audio = __esm({
3165
3267
  audioSkill = {
3166
3268
  name: "pixeldojo_audio",
3167
3269
  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.",
3168
- inputZod: InputSchema16,
3169
- inputJsonSchema: InputJsonSchema16,
3270
+ inputZod: InputSchema17,
3271
+ inputJsonSchema: InputJsonSchema17,
3170
3272
  allowedModels: [...ALLOWED4],
3171
3273
  defaultModel: DEFAULT_MODEL6,
3172
- run: run16
3274
+ run: run17
3173
3275
  };
3174
3276
  }
3175
3277
  });
3176
- async function run17(input, ctx) {
3278
+ async function run18(input, ctx) {
3177
3279
  if (input.source === "characters") {
3178
3280
  const { characters } = await ctx.client.listCharacters({ q: input.q, limit: input.limit ?? 25 });
3179
3281
  if (characters.length === 0) {
@@ -3224,17 +3326,17 @@ ${lines.join("\n")}
3224
3326
  Pass any URL back into pixeldojo_generate, pixeldojo_edit, pixeldojo_character, or pixeldojo_upscale as a reference input.`
3225
3327
  };
3226
3328
  }
3227
- var InputSchema17, InputJsonSchema17, librarySkill;
3329
+ var InputSchema18, InputJsonSchema18, librarySkill;
3228
3330
  var init_library = __esm({
3229
3331
  "src/skills/library.ts"() {
3230
- InputSchema17 = zod.z.object({
3332
+ InputSchema18 = zod.z.object({
3231
3333
  source: zod.z.enum(["media", "characters"]).optional().describe("media (default): saved and recent results. characters: saved Character Studio characters and elements, usable as @Name in prompts."),
3232
3334
  q: zod.z.string().optional().describe("Substring match against the prompt that produced the asset."),
3233
3335
  model: zod.z.string().optional().describe("Restrict to a single model (apiId)."),
3234
3336
  modality: zod.z.enum(["image", "video", "audio"]).optional().describe("Restrict to one output type."),
3235
3337
  limit: zod.z.number().int().min(1).max(50).optional().describe("Max results (default 10).")
3236
3338
  });
3237
- InputJsonSchema17 = {
3339
+ InputJsonSchema18 = {
3238
3340
  type: "object",
3239
3341
  properties: {
3240
3342
  source: {
@@ -3259,15 +3361,15 @@ var init_library = __esm({
3259
3361
  librarySkill = {
3260
3362
  name: "pixeldojo_library",
3261
3363
  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.",
3262
- inputZod: InputSchema17,
3263
- inputJsonSchema: InputJsonSchema17,
3364
+ inputZod: InputSchema18,
3365
+ inputJsonSchema: InputJsonSchema18,
3264
3366
  allowedModels: [],
3265
3367
  defaultModel: "",
3266
- run: run17
3368
+ run: run18
3267
3369
  };
3268
3370
  }
3269
3371
  });
3270
- async function run18(input, ctx) {
3372
+ async function run19(input, ctx) {
3271
3373
  const res = await ctx.client.saveMedia({
3272
3374
  url: input.url,
3273
3375
  prompt: input.prompt,
@@ -3281,17 +3383,17 @@ async function run18(input, ctx) {
3281
3383
  It will appear at https://pixeldojo.ai/my-images and in pixeldojo_library searches.`
3282
3384
  };
3283
3385
  }
3284
- var InputSchema18, InputJsonSchema18, saveSkill;
3386
+ var InputSchema19, InputJsonSchema19, saveSkill;
3285
3387
  var init_save = __esm({
3286
3388
  "src/skills/save.ts"() {
3287
- InputSchema18 = zod.z.object({
3389
+ InputSchema19 = zod.z.object({
3288
3390
  url: zod.z.string().url().describe("The asset URL to save (image or video)."),
3289
3391
  prompt: zod.z.string().optional().describe("The prompt that produced it \u2014 makes it findable in the library later."),
3290
3392
  tool_name: zod.z.string().optional().describe("Tool/model slug that produced it."),
3291
3393
  modality: zod.z.enum(["image", "video", "audio"]).optional(),
3292
3394
  job_id: zod.z.string().optional().describe("The jobId that produced this asset, when known.")
3293
3395
  });
3294
- InputJsonSchema18 = {
3396
+ InputJsonSchema19 = {
3295
3397
  type: "object",
3296
3398
  properties: {
3297
3399
  url: { type: "string", format: "uri", description: "The result URL to keep (image or video from a PixelDojo job)." },
@@ -3305,15 +3407,15 @@ var init_save = __esm({
3305
3407
  saveSkill = {
3306
3408
  name: "pixeldojo_save",
3307
3409
  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.`,
3308
- inputZod: InputSchema18,
3309
- inputJsonSchema: InputJsonSchema18,
3410
+ inputZod: InputSchema19,
3411
+ inputJsonSchema: InputJsonSchema19,
3310
3412
  allowedModels: [],
3311
3413
  defaultModel: "",
3312
- run: run18
3414
+ run: run19
3313
3415
  };
3314
3416
  }
3315
3417
  });
3316
- async function run19(input, ctx) {
3418
+ async function run20(input, ctx) {
3317
3419
  const res = await ctx.client.saveCharacter({
3318
3420
  name: input.name,
3319
3421
  kind: input.kind ?? "character",
@@ -3325,17 +3427,17 @@ async function run19(input, ctx) {
3325
3427
  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.`
3326
3428
  };
3327
3429
  }
3328
- var KINDS, InputSchema19, InputJsonSchema19, saveCharacterSkill;
3430
+ var KINDS, InputSchema20, InputJsonSchema20, saveCharacterSkill;
3329
3431
  var init_save_character = __esm({
3330
3432
  "src/skills/save-character.ts"() {
3331
3433
  KINDS = ["character", "product", "outfit", "location", "object", "style"];
3332
- InputSchema19 = zod.z.object({
3434
+ InputSchema20 = zod.z.object({
3333
3435
  name: zod.z.string().min(1).max(60).describe("What to call it. Used as @Name in prompts."),
3334
3436
  kind: zod.z.enum(KINDS).optional().describe("Default character."),
3335
3437
  image_urls: zod.z.array(zod.z.string().url()).max(8).optional().describe("3 to 5 photos from different angles works best for a character."),
3336
3438
  description: zod.z.string().max(1500).optional().describe("Appearance notes, or the scene text for an element.")
3337
3439
  });
3338
- InputJsonSchema19 = {
3440
+ InputJsonSchema20 = {
3339
3441
  type: "object",
3340
3442
  properties: {
3341
3443
  name: { type: "string", description: "What to call it. Used as @Name in prompts afterwards." },
@@ -3353,11 +3455,11 @@ var init_save_character = __esm({
3353
3455
  saveCharacterSkill = {
3354
3456
  name: "pixeldojo_save_character",
3355
3457
  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.",
3356
- inputZod: InputSchema19,
3357
- inputJsonSchema: InputJsonSchema19,
3458
+ inputZod: InputSchema20,
3459
+ inputJsonSchema: InputJsonSchema20,
3358
3460
  allowedModels: [],
3359
3461
  defaultModel: "",
3360
- run: run19
3462
+ run: run20
3361
3463
  };
3362
3464
  }
3363
3465
  });
@@ -3617,6 +3719,7 @@ __export(skills_exports, {
3617
3719
  generateSkill: () => generateSkill,
3618
3720
  librarySkill: () => librarySkill,
3619
3721
  listWorkflowsSkill: () => listWorkflowsSkill,
3722
+ overlaySkill: () => overlaySkill,
3620
3723
  runWorkflowSkill: () => runWorkflowSkill,
3621
3724
  saveCharacterSkill: () => saveCharacterSkill,
3622
3725
  saveSkill: () => saveSkill,
@@ -3655,6 +3758,7 @@ var init_skills = __esm({
3655
3758
  init_storyboard();
3656
3759
  init_upscale();
3657
3760
  init_caption();
3761
+ init_overlay();
3658
3762
  init_status();
3659
3763
  init_from_url();
3660
3764
  init_film();
@@ -3676,6 +3780,7 @@ var init_skills = __esm({
3676
3780
  storyboardSkill,
3677
3781
  upscaleSkill,
3678
3782
  captionSkill,
3783
+ overlaySkill,
3679
3784
  audioSkill,
3680
3785
  librarySkill,
3681
3786
  saveSkill,
@@ -3716,6 +3821,7 @@ var init_skills = __esm({
3716
3821
  pixeldojo_storyboard: render("Storyboard preview video"),
3717
3822
  pixeldojo_upscale: render("Upscale image or video"),
3718
3823
  pixeldojo_caption: render("Caption video"),
3824
+ pixeldojo_overlay: render("Add offer or end card"),
3719
3825
  pixeldojo_audio: render("Generate music, speech or sound"),
3720
3826
  pixeldojo_video: render("Change, animate or extend video"),
3721
3827
  pixeldojo_ad: render("Make video ad"),
@@ -3786,7 +3892,7 @@ function makeRedactedLogger(target = console) {
3786
3892
  }
3787
3893
 
3788
3894
  // src/server.ts
3789
- var PACKAGE_VERSION = "0.21.0" ;
3895
+ var PACKAGE_VERSION = "0.22.0" ;
3790
3896
  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.";
3791
3897
  function buildServer(options) {
3792
3898
  if (!options.apiKey) {