@pixeldojo/mcp 0.20.0 → 0.21.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/cli.js CHANGED
@@ -1248,6 +1248,67 @@ var init_upscale = __esm({
1248
1248
  }
1249
1249
  });
1250
1250
  async function run6(input, ctx) {
1251
+ const submitted = await ctx.client.run(MODEL, {
1252
+ prompt: "",
1253
+ video: input.video_url,
1254
+ ...input.style ? { caption_style: input.style } : {},
1255
+ ...input.highlight_color ? { highlight_color: input.highlight_color } : {}
1256
+ });
1257
+ const result = await pollJobUntilDoneOrHandoff(
1258
+ submitted.jobId,
1259
+ (id) => ctx.client.getJob(id),
1260
+ ctx.buildStatusUrl,
1261
+ { now: ctx.pollOverrides?.now, sleep: ctx.pollOverrides?.sleep }
1262
+ );
1263
+ return pollResultToSkillResult(
1264
+ result,
1265
+ (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Captioned. Asset: ${urls[0]}`
1266
+ );
1267
+ }
1268
+ var MODEL, STYLES, InputSchema6, InputJsonSchema6, captionSkill;
1269
+ var init_caption = __esm({
1270
+ "src/skills/caption.ts"() {
1271
+ init_poll();
1272
+ init_types();
1273
+ MODEL = "video-autocaption";
1274
+ STYLES = ["pop", "highlighter", "clean"];
1275
+ InputSchema6 = z.object({
1276
+ video_url: z.string().url().describe("URL of the video to caption. It must have speech."),
1277
+ style: z.enum(STYLES).optional(),
1278
+ highlight_color: z.string().optional()
1279
+ });
1280
+ InputJsonSchema6 = {
1281
+ type: "object",
1282
+ required: ["video_url"],
1283
+ properties: {
1284
+ video_url: {
1285
+ type: "string",
1286
+ format: "uri",
1287
+ description: "The video to caption (MP4 or MOV). It must have speech; a silent clip is refused uncharged."
1288
+ },
1289
+ style: {
1290
+ type: "string",
1291
+ enum: STYLES,
1292
+ description: "pop (default): bold caps, the spoken word lit and growing. highlighter: the spoken word on a block of the color. clean: sentence case on a dark box."
1293
+ },
1294
+ highlight_color: {
1295
+ type: "string",
1296
+ description: "The highlight as #RRGGBB (a brand color) or a name like yellow, green, pink. Defaults to yellow."
1297
+ }
1298
+ }
1299
+ };
1300
+ captionSkill = {
1301
+ name: "pixeldojo_caption",
1302
+ description: "Burn animated word-by-word captions onto a video with speech, the short-form look for TikTok, Reels and Shorts: the spoken word lights up, placed above the platform buttons. Pass video_url; optional style (pop, highlighter, clean) and highlight_color (#RRGGBB for a brand color). 5 credits.",
1303
+ inputZod: InputSchema6,
1304
+ inputJsonSchema: InputJsonSchema6,
1305
+ allowedModels: [MODEL],
1306
+ defaultModel: MODEL,
1307
+ run: run6
1308
+ };
1309
+ }
1310
+ });
1311
+ async function run7(input, ctx) {
1251
1312
  const job = await ctx.client.getJob(input.jobId);
1252
1313
  if (job.status === "completed") {
1253
1314
  const urls = extractAssetUrls2(job);
@@ -1311,13 +1372,13 @@ function extractAssetUrls2(job) {
1311
1372
  if (output?.video) return [output.video];
1312
1373
  return [];
1313
1374
  }
1314
- var InputSchema6, InputJsonSchema6, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1375
+ var InputSchema7, InputJsonSchema7, STUCK_HINT_MS, ABANDON_HINT_MS, statusSkill;
1315
1376
  var init_status = __esm({
1316
1377
  "src/skills/status.ts"() {
1317
- InputSchema6 = z.object({
1378
+ InputSchema7 = z.object({
1318
1379
  jobId: z.string().min(1).max(200).describe("Job id returned from a prior pixeldojo_* skill handoff.")
1319
1380
  });
1320
- InputJsonSchema6 = {
1381
+ InputJsonSchema7 = {
1321
1382
  type: "object",
1322
1383
  properties: {
1323
1384
  jobId: {
@@ -1332,16 +1393,16 @@ var init_status = __esm({
1332
1393
  statusSkill = {
1333
1394
  name: "pixeldojo_status",
1334
1395
  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".',
1335
- inputZod: InputSchema6,
1336
- inputJsonSchema: InputJsonSchema6,
1396
+ inputZod: InputSchema7,
1397
+ inputJsonSchema: InputJsonSchema7,
1337
1398
  // status is special — it doesn't dispatch to a model
1338
1399
  allowedModels: [],
1339
1400
  defaultModel: "",
1340
- run: run6
1401
+ run: run7
1341
1402
  };
1342
1403
  }
1343
1404
  });
1344
- async function run7(input, ctx) {
1405
+ async function run8(input, ctx) {
1345
1406
  const product = await ctx.client.extractProduct(input.url);
1346
1407
  const summary = [
1347
1408
  `Product: ${product.name}`,
@@ -1358,13 +1419,13 @@ function truncate(input, max) {
1358
1419
  if (input.length <= max) return input;
1359
1420
  return input.slice(0, max - 3) + "...";
1360
1421
  }
1361
- var InputSchema7, InputJsonSchema7, fromUrlSkill;
1422
+ var InputSchema8, InputJsonSchema8, fromUrlSkill;
1362
1423
  var init_from_url = __esm({
1363
1424
  "src/skills/from-url.ts"() {
1364
- InputSchema7 = z.object({
1425
+ InputSchema8 = z.object({
1365
1426
  url: z.string().min(1).max(2048).describe("Product page URL. Shopify, BigCommerce, WooCommerce, or any page with JSON-LD / OpenGraph product metadata.")
1366
1427
  });
1367
- InputJsonSchema7 = {
1428
+ InputJsonSchema8 = {
1368
1429
  type: "object",
1369
1430
  properties: {
1370
1431
  url: {
@@ -1377,12 +1438,12 @@ var init_from_url = __esm({
1377
1438
  fromUrlSkill = {
1378
1439
  name: "pixeldojo_from_url",
1379
1440
  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.",
1380
- inputZod: InputSchema7,
1381
- inputJsonSchema: InputJsonSchema7,
1441
+ inputZod: InputSchema8,
1442
+ inputJsonSchema: InputJsonSchema8,
1382
1443
  // No model dispatch — this skill calls a server-side scrape, not a generation.
1383
1444
  allowedModels: [],
1384
1445
  defaultModel: "",
1385
- run: run7
1446
+ run: run8
1386
1447
  };
1387
1448
  }
1388
1449
  });
@@ -1945,7 +2006,7 @@ async function redoShots(input, ctx) {
1945
2006
  followUp: keepGoing(filmId, 30, { soundtrack: input.soundtrack })
1946
2007
  };
1947
2008
  }
1948
- async function run8(input, ctx) {
2009
+ async function run9(input, ctx) {
1949
2010
  const action = input.action === "plan" && input.film_id ? input.cast?.length ? "cast" : "status" : input.action;
1950
2011
  if (action === "plan") return plan(input, ctx);
1951
2012
  if (!input.film_id) return { kind: "text", text: "produce/status/cast/redo need the film_id returned by the plan step." };
@@ -1965,7 +2026,7 @@ async function run8(input, ctx) {
1965
2026
  if (action === "redo") return redoShots(input, ctx);
1966
2027
  return advance(input.film_id, input.soundtrack, input.music_job_id, ctx);
1967
2028
  }
1968
- var STORY_LOOKS, MUSIC_VIDEO_LOOKS, LOOKS, MUSIC_CLIP_ENGINE_ID, InputSchema8, InputJsonSchema8, shots, benignDispatchRefusal, count, frameDone, RETRY_CLEARS, REFUSED, isRefused, PLANNER_POLL_MS, PLANNER_MAX_POLLS, isMusicVideo, needsSlice, stillPlanningText, LOOK_MUSIC, ARC, filmSkill;
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;
1969
2030
  var init_film = __esm({
1970
2031
  "src/skills/film.ts"() {
1971
2032
  init_upload_helpers();
@@ -1973,7 +2034,7 @@ var init_film = __esm({
1973
2034
  MUSIC_VIDEO_LOOKS = ["rap-video", "neon-club", "stage-performance", "retro-camcorder", "y2k-pop", "moody-rnb", "rock-grit", "dream-pop", "k-pop"];
1974
2035
  LOOKS = [...STORY_LOOKS, ...MUSIC_VIDEO_LOOKS];
1975
2036
  MUSIC_CLIP_ENGINE_ID = "minimax-h3-reference";
1976
- InputSchema8 = z.object({
2037
+ InputSchema9 = z.object({
1977
2038
  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."),
1978
2039
  script: z.string().max(2e4).optional().describe("A full screenplay to plan instead of an idea (sluglines, action lines, dialogue)."),
1979
2040
  look: z.enum(LOOKS).optional().describe("Visual style carried through frames, clips, and soundtrack. Default live-action, or rap-video for a music video."),
@@ -2001,7 +2062,7 @@ var init_film = __esm({
2001
2062
  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."),
2002
2063
  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.")
2003
2064
  });
2004
- InputJsonSchema8 = {
2065
+ InputJsonSchema9 = {
2005
2066
  type: "object",
2006
2067
  properties: {
2007
2068
  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.` },
@@ -2115,11 +2176,11 @@ var init_film = __esm({
2115
2176
  name: "pixeldojo_film",
2116
2177
  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.",
2117
2178
  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.",
2118
- inputZod: InputSchema8,
2119
- inputJsonSchema: InputJsonSchema8,
2179
+ inputZod: InputSchema9,
2180
+ inputJsonSchema: InputJsonSchema9,
2120
2181
  allowedModels: [],
2121
2182
  defaultModel: "",
2122
- run: run8
2183
+ run: run9
2123
2184
  };
2124
2185
  }
2125
2186
  });
@@ -2206,7 +2267,7 @@ function buildVideoPayload(verb, apiId, i) {
2206
2267
  };
2207
2268
  }
2208
2269
  }
2209
- async function run9(input, ctx) {
2270
+ async function run10(input, ctx) {
2210
2271
  const paramsGate = paramsWithoutModel(input.params, input.model);
2211
2272
  if (paramsGate) return { kind: "text", text: paramsGate };
2212
2273
  const verb = input.verb;
@@ -2269,7 +2330,7 @@ async function run9(input, ctx) {
2269
2330
  notes.join(" ")
2270
2331
  );
2271
2332
  }
2272
- var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema9, engineList, InputJsonSchema9, BASE_DESCRIPTION, videoSkill;
2333
+ var VIDEO_STUDIO_ENGINES, VERBS, BACKWARD_ENGINES, clamp, NEEDS_VIDEO_DURATION, NO_IMAGE_ENGINES, InputSchema10, engineList, InputJsonSchema10, BASE_DESCRIPTION, videoSkill;
2273
2334
  var init_video = __esm({
2274
2335
  "src/skills/video.ts"() {
2275
2336
  init_poll();
@@ -2303,7 +2364,7 @@ var init_video = __esm({
2303
2364
  "wan-video-character-swap"
2304
2365
  ]);
2305
2366
  NO_IMAGE_ENGINES = /* @__PURE__ */ new Set(["flux-video-edit", "xai-video-edit"]);
2306
- InputSchema9 = z.object({
2367
+ InputSchema10 = z.object({
2307
2368
  verb: z.enum(VERBS),
2308
2369
  prompt: z.string().max(8e3).optional(),
2309
2370
  video_url: z.string().url().optional(),
@@ -2318,7 +2379,7 @@ var init_video = __esm({
2318
2379
  params: ParamsInput
2319
2380
  });
2320
2381
  engineList = (verb) => `${verb}: ${VIDEO_STUDIO_ENGINES[verb].join(", ")} (default ${VIDEO_STUDIO_ENGINES[verb][0]})`;
2321
- InputJsonSchema9 = {
2382
+ InputJsonSchema10 = {
2322
2383
  type: "object",
2323
2384
  properties: {
2324
2385
  verb: {
@@ -2379,11 +2440,11 @@ var init_video = __esm({
2379
2440
  name: "pixeldojo_video",
2380
2441
  description: `${BASE_DESCRIPTION} Local files: video_path / image_path (uploaded to 24h temp storage first).`,
2381
2442
  hostedDescription: `${BASE_DESCRIPTION} Media must be public http(s) URLs.`,
2382
- inputZod: InputSchema9,
2383
- inputJsonSchema: InputJsonSchema9,
2443
+ inputZod: InputSchema10,
2444
+ inputJsonSchema: InputJsonSchema10,
2384
2445
  allowedModels: Array.from(new Set(VERBS.flatMap((v) => VIDEO_STUDIO_ENGINES[v]))),
2385
2446
  defaultModel: VIDEO_STUDIO_ENGINES.change[0],
2386
- run: run9
2447
+ run: run10
2387
2448
  };
2388
2449
  }
2389
2450
  });
@@ -2558,28 +2619,28 @@ async function produce2(id, ctx) {
2558
2619
  const musicNote = ep.musicEnabled && ep.music?.status === "failed" ? " The music bed failed, so this cut has no music." : "";
2559
2620
  return { kind: "text", text: `Export started, free${prior}.${musicNote} ${next(id, "produce", "~60s")}` };
2560
2621
  }
2561
- async function run10(input, ctx) {
2622
+ async function run11(input, ctx) {
2562
2623
  const action = input.action === "create" && input.episode_id ? "status" : input.action;
2563
2624
  if (action === "create") return create(input, ctx);
2564
2625
  if (!input.episode_id) return { kind: "text", text: "produce and status need the episode_id returned by the create step." };
2565
2626
  if (action === "produce") return produce2(input.episode_id, ctx);
2566
2627
  return status(input.episode_id, ctx);
2567
2628
  }
2568
- var STYLES, CATEGORIES, ENGINES, MIN_SECONDS, MAX_SECONDS, MAX_IN_FLIGHT, InputSchema10, InputJsonSchema10, call, next, needsRender, PLAN_POLL_MS, PLAN_MAX_POLLS, stillPlanning, episodeSkill;
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;
2569
2630
  var init_episode = __esm({
2570
2631
  "src/skills/episode.ts"() {
2571
- STYLES = ["editorial-motion", "paper-diorama", "hand-drawn", "storybook", "poster-vector", "soft-3d"];
2632
+ STYLES2 = ["editorial-motion", "paper-diorama", "hand-drawn", "storybook", "poster-vector", "soft-3d"];
2572
2633
  CATEGORIES = ["education", "history", "kids", "storytelling", "custom"];
2573
2634
  ENGINES = ["omni-draft", "omni-final", "still-motion"];
2574
2635
  MIN_SECONDS = 60;
2575
2636
  MAX_SECONDS = 300;
2576
2637
  MAX_IN_FLIGHT = 4;
2577
- InputSchema10 = z.object({
2638
+ InputSchema11 = z.object({
2578
2639
  action: z.enum(["create", "produce", "status"]).default("create"),
2579
2640
  topic: z.string().min(8).max(400).optional(),
2580
2641
  episode_id: z.string().max(40).optional(),
2581
2642
  category: z.enum(CATEGORIES).default("education"),
2582
- style: z.enum(STYLES).default("editorial-motion"),
2643
+ style: z.enum(STYLES2).default("editorial-motion"),
2583
2644
  aspect: z.enum(["16:9", "9:16"]).default("16:9"),
2584
2645
  length_seconds: z.number().int().min(MIN_SECONDS).max(MAX_SECONDS).default(120),
2585
2646
  voice: z.string().min(1).max(80).default("Wise_Woman"),
@@ -2587,7 +2648,7 @@ var init_episode = __esm({
2587
2648
  music: z.boolean().default(true),
2588
2649
  title: z.string().max(120).optional()
2589
2650
  });
2590
- InputJsonSchema10 = {
2651
+ InputJsonSchema11 = {
2591
2652
  type: "object",
2592
2653
  properties: {
2593
2654
  action: {
@@ -2598,7 +2659,7 @@ var init_episode = __esm({
2598
2659
  topic: { type: "string", description: "Create step: what the episode is about, 8 to 400 characters." },
2599
2660
  episode_id: { type: "string", description: "The episode_id from the create step. Required for produce and status." },
2600
2661
  category: { type: "string", enum: [...CATEGORIES], description: "Create step: tone of the script. Default education." },
2601
- style: { type: "string", enum: [...STYLES], description: "Create step: visual style of every scene. Default editorial-motion." },
2662
+ style: { type: "string", enum: [...STYLES2], description: "Create step: visual style of every scene. Default editorial-motion." },
2602
2663
  aspect: { type: "string", enum: ["16:9", "9:16"], description: "Create step: 16:9 landscape (default) or 9:16 vertical." },
2603
2664
  length_seconds: { type: "integer", minimum: MIN_SECONDS, maximum: MAX_SECONDS, description: "Create step: target length in seconds. Default 120." },
2604
2665
  voice: { type: "string", description: "Create step: narrator voice id from the text-to-speech tool (e.g. Wise_Woman, Deep_Voice_Man, Friendly_Person). Default Wise_Woman." },
@@ -2620,15 +2681,15 @@ var init_episode = __esm({
2620
2681
  episodeSkill = {
2621
2682
  name: "pixeldojo_episode",
2622
2683
  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.",
2623
- inputZod: InputSchema10,
2624
- inputJsonSchema: InputJsonSchema10,
2684
+ inputZod: InputSchema11,
2685
+ inputJsonSchema: InputJsonSchema11,
2625
2686
  allowedModels: [],
2626
2687
  defaultModel: "",
2627
- run: run10
2688
+ run: run11
2628
2689
  };
2629
2690
  }
2630
2691
  });
2631
- async function run11(input, ctx) {
2692
+ async function run12(input, ctx) {
2632
2693
  const productImages = [
2633
2694
  ...input.product_image_urls ?? [],
2634
2695
  ...await Promise.all((input.product_image_paths ?? []).map((p) => uploadLocalFile(p, ctx)))
@@ -2671,13 +2732,13 @@ async function run11(input, ctx) {
2671
2732
  (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]}`
2672
2733
  );
2673
2734
  }
2674
- var InputSchema11, InputJsonSchema11, adSkill;
2735
+ var InputSchema12, InputJsonSchema12, adSkill;
2675
2736
  var init_ad = __esm({
2676
2737
  "src/skills/ad.ts"() {
2677
2738
  init_types();
2678
2739
  init_poll();
2679
2740
  init_upload_helpers();
2680
- InputSchema11 = z.object({
2741
+ InputSchema12 = z.object({
2681
2742
  style: z.string().max(80).optional().describe(
2682
2743
  "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."
2683
2744
  ),
@@ -2703,7 +2764,7 @@ var init_ad = __esm({
2703
2764
  path: ["product_url"]
2704
2765
  }
2705
2766
  );
2706
- InputJsonSchema11 = {
2767
+ InputJsonSchema12 = {
2707
2768
  type: "object",
2708
2769
  properties: {
2709
2770
  style: {
@@ -2790,16 +2851,16 @@ var init_ad = __esm({
2790
2851
  name: "pixeldojo_ad",
2791
2852
  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.",
2792
2853
  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.",
2793
- inputZod: InputSchema11,
2794
- inputJsonSchema: InputJsonSchema11,
2854
+ inputZod: InputSchema12,
2855
+ inputJsonSchema: InputJsonSchema12,
2795
2856
  // Composition skill — the server routes to the ad engine internally.
2796
2857
  allowedModels: [],
2797
2858
  defaultModel: "",
2798
- run: run11
2859
+ run: run12
2799
2860
  };
2800
2861
  }
2801
2862
  });
2802
- async function run12(input, ctx) {
2863
+ async function run13(input, ctx) {
2803
2864
  const client = ctx.client;
2804
2865
  const result = await client.runCampaign(input);
2805
2866
  if (result.kind === "campaign") {
@@ -2826,10 +2887,10 @@ async function run12(input, ctx) {
2826
2887
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
2827
2888
  };
2828
2889
  }
2829
- var InputSchema12, InputJsonSchema12, campaignSkill;
2890
+ var InputSchema13, InputJsonSchema13, campaignSkill;
2830
2891
  var init_campaign = __esm({
2831
2892
  "src/skills/campaign.ts"() {
2832
- InputSchema12 = z.object({
2893
+ InputSchema13 = z.object({
2833
2894
  productUrl: z.string().url().optional().describe("Product page URL. We extract name + description + images automatically."),
2834
2895
  product: z.object({
2835
2896
  name: z.string().min(1).max(200),
@@ -2845,7 +2906,7 @@ var init_campaign = __esm({
2845
2906
  message: "productUrl or product is required",
2846
2907
  path: ["productUrl"]
2847
2908
  });
2848
- InputJsonSchema12 = {
2909
+ InputJsonSchema13 = {
2849
2910
  type: "object",
2850
2911
  properties: {
2851
2912
  productUrl: {
@@ -2896,17 +2957,17 @@ var init_campaign = __esm({
2896
2957
  campaignSkill = {
2897
2958
  name: "pixeldojo_campaign",
2898
2959
  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.",
2899
- inputZod: InputSchema12,
2900
- inputJsonSchema: InputJsonSchema12,
2960
+ inputZod: InputSchema13,
2961
+ inputJsonSchema: InputJsonSchema13,
2901
2962
  // Composition skill — internal sub-jobs route to per-tool models, no
2902
2963
  // single allowed-models list applies here.
2903
2964
  allowedModels: [],
2904
2965
  defaultModel: "",
2905
- run: run12
2966
+ run: run13
2906
2967
  };
2907
2968
  }
2908
2969
  });
2909
- async function run13(input, ctx) {
2970
+ async function run14(input, ctx) {
2910
2971
  const client = ctx.client;
2911
2972
  const result = await client.getCampaign(input.campaignId);
2912
2973
  if (result.kind === "campaign") {
@@ -2936,13 +2997,13 @@ async function run13(input, ctx) {
2936
2997
  statusUrl: result.statusUrl ?? ctx.buildStatusUrl(result.campaignId)
2937
2998
  };
2938
2999
  }
2939
- var InputSchema13, InputJsonSchema13, campaignStatusSkill;
3000
+ var InputSchema14, InputJsonSchema14, campaignStatusSkill;
2940
3001
  var init_campaign_status = __esm({
2941
3002
  "src/skills/campaign-status.ts"() {
2942
- InputSchema13 = z.object({
3003
+ InputSchema14 = z.object({
2943
3004
  campaignId: z.string().min(1).max(200).describe("Campaign id returned from a prior pixeldojo_campaign handoff.")
2944
3005
  });
2945
- InputJsonSchema13 = {
3006
+ InputJsonSchema14 = {
2946
3007
  type: "object",
2947
3008
  properties: {
2948
3009
  campaignId: {
@@ -2955,15 +3016,15 @@ var init_campaign_status = __esm({
2955
3016
  campaignStatusSkill = {
2956
3017
  name: "pixeldojo_campaign_status",
2957
3018
  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.",
2958
- inputZod: InputSchema13,
2959
- inputJsonSchema: InputJsonSchema13,
3019
+ inputZod: InputSchema14,
3020
+ inputJsonSchema: InputJsonSchema14,
2960
3021
  allowedModels: [],
2961
3022
  defaultModel: "",
2962
- run: run13
3023
+ run: run14
2963
3024
  };
2964
3025
  }
2965
3026
  });
2966
- async function run14(input, ctx) {
3027
+ async function run15(input, ctx) {
2967
3028
  let url;
2968
3029
  try {
2969
3030
  url = await uploadLocalFile(input.path, ctx);
@@ -2979,16 +3040,16 @@ async function run14(input, ctx) {
2979
3040
  (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.)`
2980
3041
  };
2981
3042
  }
2982
- var InputSchema14, InputJsonSchema14, uploadSkill;
3043
+ var InputSchema15, InputJsonSchema15, uploadSkill;
2983
3044
  var init_upload = __esm({
2984
3045
  "src/skills/upload.ts"() {
2985
3046
  init_upload_helpers();
2986
- InputSchema14 = z.object({
3047
+ InputSchema15 = z.object({
2987
3048
  path: z.string().min(1).max(4096).describe(
2988
3049
  "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."
2989
3050
  )
2990
3051
  });
2991
- InputJsonSchema14 = {
3052
+ InputJsonSchema15 = {
2992
3053
  type: "object",
2993
3054
  properties: {
2994
3055
  path: {
@@ -3001,15 +3062,15 @@ var init_upload = __esm({
3001
3062
  uploadSkill = {
3002
3063
  name: "pixeldojo_upload",
3003
3064
  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.",
3004
- inputZod: InputSchema14,
3005
- inputJsonSchema: InputJsonSchema14,
3065
+ inputZod: InputSchema15,
3066
+ inputJsonSchema: InputJsonSchema15,
3006
3067
  allowedModels: [],
3007
3068
  defaultModel: "",
3008
- run: run14
3069
+ run: run15
3009
3070
  };
3010
3071
  }
3011
3072
  });
3012
- async function run15(input, ctx) {
3073
+ async function run16(input, ctx) {
3013
3074
  const requested = input.model ?? DEFAULT_MODEL6;
3014
3075
  if (!ALLOWED4.includes(requested)) {
3015
3076
  return {
@@ -3047,14 +3108,14 @@ async function run15(input, ctx) {
3047
3108
  (urls) => urls.length === 0 ? `Job ${submitted.jobId} completed but returned no assets.` : `Audio ready. Asset: ${urls[0]}`
3048
3109
  );
3049
3110
  }
3050
- var ALLOWED4, DEFAULT_MODEL6, InputSchema15, InputJsonSchema15, audioSkill;
3111
+ var ALLOWED4, DEFAULT_MODEL6, InputSchema16, InputJsonSchema16, audioSkill;
3051
3112
  var init_audio = __esm({
3052
3113
  "src/skills/audio.ts"() {
3053
3114
  init_poll();
3054
3115
  init_types();
3055
3116
  ALLOWED4 = ["seed-audio", "text-to-speech"];
3056
3117
  DEFAULT_MODEL6 = "seed-audio";
3057
- InputSchema15 = z.object({
3118
+ InputSchema16 = z.object({
3058
3119
  prompt: z.string().min(1).describe(
3059
3120
  "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."
3060
3121
  ),
@@ -3064,7 +3125,7 @@ var init_audio = __esm({
3064
3125
  output_format: z.string().optional().describe("Output format. seed-audio: mp3 (default), wav, pcm, ogg_opus. text-to-speech: mp3 (default), wav, flac, pcm."),
3065
3126
  speed: z.number().min(0.5).max(2).optional().describe("Speech speed multiplier, 0.5-2 (default 1). Both models.")
3066
3127
  });
3067
- InputJsonSchema15 = {
3128
+ InputJsonSchema16 = {
3068
3129
  type: "object",
3069
3130
  properties: {
3070
3131
  prompt: {
@@ -3102,15 +3163,15 @@ var init_audio = __esm({
3102
3163
  audioSkill = {
3103
3164
  name: "pixeldojo_audio",
3104
3165
  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.",
3105
- inputZod: InputSchema15,
3106
- inputJsonSchema: InputJsonSchema15,
3166
+ inputZod: InputSchema16,
3167
+ inputJsonSchema: InputJsonSchema16,
3107
3168
  allowedModels: [...ALLOWED4],
3108
3169
  defaultModel: DEFAULT_MODEL6,
3109
- run: run15
3170
+ run: run16
3110
3171
  };
3111
3172
  }
3112
3173
  });
3113
- async function run16(input, ctx) {
3174
+ async function run17(input, ctx) {
3114
3175
  if (input.source === "characters") {
3115
3176
  const { characters } = await ctx.client.listCharacters({ q: input.q, limit: input.limit ?? 25 });
3116
3177
  if (characters.length === 0) {
@@ -3161,17 +3222,17 @@ ${lines.join("\n")}
3161
3222
  Pass any URL back into pixeldojo_generate, pixeldojo_edit, pixeldojo_character, or pixeldojo_upscale as a reference input.`
3162
3223
  };
3163
3224
  }
3164
- var InputSchema16, InputJsonSchema16, librarySkill;
3225
+ var InputSchema17, InputJsonSchema17, librarySkill;
3165
3226
  var init_library = __esm({
3166
3227
  "src/skills/library.ts"() {
3167
- InputSchema16 = z.object({
3228
+ InputSchema17 = z.object({
3168
3229
  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."),
3169
3230
  q: z.string().optional().describe("Substring match against the prompt that produced the asset."),
3170
3231
  model: z.string().optional().describe("Restrict to a single model (apiId)."),
3171
3232
  modality: z.enum(["image", "video", "audio"]).optional().describe("Restrict to one output type."),
3172
3233
  limit: z.number().int().min(1).max(50).optional().describe("Max results (default 10).")
3173
3234
  });
3174
- InputJsonSchema16 = {
3235
+ InputJsonSchema17 = {
3175
3236
  type: "object",
3176
3237
  properties: {
3177
3238
  source: {
@@ -3196,15 +3257,15 @@ var init_library = __esm({
3196
3257
  librarySkill = {
3197
3258
  name: "pixeldojo_library",
3198
3259
  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.",
3199
- inputZod: InputSchema16,
3200
- inputJsonSchema: InputJsonSchema16,
3260
+ inputZod: InputSchema17,
3261
+ inputJsonSchema: InputJsonSchema17,
3201
3262
  allowedModels: [],
3202
3263
  defaultModel: "",
3203
- run: run16
3264
+ run: run17
3204
3265
  };
3205
3266
  }
3206
3267
  });
3207
- async function run17(input, ctx) {
3268
+ async function run18(input, ctx) {
3208
3269
  const res = await ctx.client.saveMedia({
3209
3270
  url: input.url,
3210
3271
  prompt: input.prompt,
@@ -3218,17 +3279,17 @@ async function run17(input, ctx) {
3218
3279
  It will appear at https://pixeldojo.ai/my-images and in pixeldojo_library searches.`
3219
3280
  };
3220
3281
  }
3221
- var InputSchema17, InputJsonSchema17, saveSkill;
3282
+ var InputSchema18, InputJsonSchema18, saveSkill;
3222
3283
  var init_save = __esm({
3223
3284
  "src/skills/save.ts"() {
3224
- InputSchema17 = z.object({
3285
+ InputSchema18 = z.object({
3225
3286
  url: z.string().url().describe("The asset URL to save (image or video)."),
3226
3287
  prompt: z.string().optional().describe("The prompt that produced it \u2014 makes it findable in the library later."),
3227
3288
  tool_name: z.string().optional().describe("Tool/model slug that produced it."),
3228
3289
  modality: z.enum(["image", "video", "audio"]).optional(),
3229
3290
  job_id: z.string().optional().describe("The jobId that produced this asset, when known.")
3230
3291
  });
3231
- InputJsonSchema17 = {
3292
+ InputJsonSchema18 = {
3232
3293
  type: "object",
3233
3294
  properties: {
3234
3295
  url: { type: "string", format: "uri", description: "The result URL to keep (image or video from a PixelDojo job)." },
@@ -3242,15 +3303,15 @@ var init_save = __esm({
3242
3303
  saveSkill = {
3243
3304
  name: "pixeldojo_save",
3244
3305
  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.`,
3245
- inputZod: InputSchema17,
3246
- inputJsonSchema: InputJsonSchema17,
3306
+ inputZod: InputSchema18,
3307
+ inputJsonSchema: InputJsonSchema18,
3247
3308
  allowedModels: [],
3248
3309
  defaultModel: "",
3249
- run: run17
3310
+ run: run18
3250
3311
  };
3251
3312
  }
3252
3313
  });
3253
- async function run18(input, ctx) {
3314
+ async function run19(input, ctx) {
3254
3315
  const res = await ctx.client.saveCharacter({
3255
3316
  name: input.name,
3256
3317
  kind: input.kind ?? "character",
@@ -3262,17 +3323,17 @@ async function run18(input, ctx) {
3262
3323
  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.`
3263
3324
  };
3264
3325
  }
3265
- var KINDS, InputSchema18, InputJsonSchema18, saveCharacterSkill;
3326
+ var KINDS, InputSchema19, InputJsonSchema19, saveCharacterSkill;
3266
3327
  var init_save_character = __esm({
3267
3328
  "src/skills/save-character.ts"() {
3268
3329
  KINDS = ["character", "product", "outfit", "location", "object", "style"];
3269
- InputSchema18 = z.object({
3330
+ InputSchema19 = z.object({
3270
3331
  name: z.string().min(1).max(60).describe("What to call it. Used as @Name in prompts."),
3271
3332
  kind: z.enum(KINDS).optional().describe("Default character."),
3272
3333
  image_urls: z.array(z.string().url()).max(8).optional().describe("3 to 5 photos from different angles works best for a character."),
3273
3334
  description: z.string().max(1500).optional().describe("Appearance notes, or the scene text for an element.")
3274
3335
  });
3275
- InputJsonSchema18 = {
3336
+ InputJsonSchema19 = {
3276
3337
  type: "object",
3277
3338
  properties: {
3278
3339
  name: { type: "string", description: "What to call it. Used as @Name in prompts afterwards." },
@@ -3290,11 +3351,11 @@ var init_save_character = __esm({
3290
3351
  saveCharacterSkill = {
3291
3352
  name: "pixeldojo_save_character",
3292
3353
  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.",
3293
- inputZod: InputSchema18,
3294
- inputJsonSchema: InputJsonSchema18,
3354
+ inputZod: InputSchema19,
3355
+ inputJsonSchema: InputJsonSchema19,
3295
3356
  allowedModels: [],
3296
3357
  defaultModel: "",
3297
- run: run18
3358
+ run: run19
3298
3359
  };
3299
3360
  }
3300
3361
  });
@@ -3543,6 +3604,7 @@ __export(skills_exports, {
3543
3604
  audioSkill: () => audioSkill,
3544
3605
  campaignSkill: () => campaignSkill,
3545
3606
  campaignStatusSkill: () => campaignStatusSkill,
3607
+ captionSkill: () => captionSkill,
3546
3608
  characterSkill: () => characterSkill,
3547
3609
  editSkill: () => editSkill,
3548
3610
  episodeSkill: () => episodeSkill,
@@ -3590,6 +3652,7 @@ var init_skills = __esm({
3590
3652
  init_character();
3591
3653
  init_storyboard();
3592
3654
  init_upscale();
3655
+ init_caption();
3593
3656
  init_status();
3594
3657
  init_from_url();
3595
3658
  init_film();
@@ -3610,6 +3673,7 @@ var init_skills = __esm({
3610
3673
  characterSkill,
3611
3674
  storyboardSkill,
3612
3675
  upscaleSkill,
3676
+ captionSkill,
3613
3677
  audioSkill,
3614
3678
  librarySkill,
3615
3679
  saveSkill,
@@ -3649,6 +3713,7 @@ var init_skills = __esm({
3649
3713
  pixeldojo_character: render("Consistent character image"),
3650
3714
  pixeldojo_storyboard: render("Storyboard preview video"),
3651
3715
  pixeldojo_upscale: render("Upscale image or video"),
3716
+ pixeldojo_caption: render("Caption video"),
3652
3717
  pixeldojo_audio: render("Generate music, speech or sound"),
3653
3718
  pixeldojo_video: render("Change, animate or extend video"),
3654
3719
  pixeldojo_ad: render("Make video ad"),
@@ -3719,7 +3784,7 @@ function makeRedactedLogger(target = console) {
3719
3784
  }
3720
3785
 
3721
3786
  // src/server.ts
3722
- var PACKAGE_VERSION = "0.20.0" ;
3787
+ var PACKAGE_VERSION = "0.21.0" ;
3723
3788
  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.";
3724
3789
  function buildServer(options) {
3725
3790
  if (!options.apiKey) {
@@ -3891,6 +3956,7 @@ function printInit() {
3891
3956
  `# pixeldojo_character Consistent characters across shots.`,
3892
3957
  `# pixeldojo_storyboard Multi-shot scenes from one brief.`,
3893
3958
  `# pixeldojo_upscale Enhance any image or video.`,
3959
+ `# pixeldojo_caption Animated word-by-word captions on a video.`,
3894
3960
  `# pixeldojo_audio Voices + effects + music in one clip.`,
3895
3961
  `# pixeldojo_library Search your saved media + generations.`,
3896
3962
  `# pixeldojo_*_workflow Save / run / list multi-step chains.`,