@clickraft/cli 0.11.2 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
- ## [0.11.2](https://github.com/clickraft/cli/compare/v0.11.1...v0.11.2) (2026-06-21)
1
+ ## [0.12.0](https://github.com/clickraft/cli/compare/v0.11.2...v0.12.0) (2026-07-02)
2
2
 
3
- ### Bug Fixes
3
+ ### ⚠ BREAKING CHANGES
4
4
 
5
- * **sdk:** accept input.width/height in GenerateCreateRequestSchema ([6f92a22](https://github.com/clickraft/cli/commit/6f92a22f8152ce48bbb7ce95e1f4c3134fe81b5d)), closes [#3](https://github.com/clickraft/cli/issues/3)
6
- * **sdk:** widen declaredParams required (optional) + defaultValue (any-typed) to match server ([03eb961](https://github.com/clickraft/cli/commit/03eb961f9c05272c96cbb7de8667ef0222e08691)), closes [#5](https://github.com/clickraft/cli/issues/5) [#6](https://github.com/clickraft/cli/issues/6) [#N](https://github.com/clickraft/cli/issues/N) [5/#6](https://github.com/5/cli/issues/6)
5
+ * **generate:** a lone --reference-image no longer sets the
6
+ image-to-video start frame. To set the start frame, use the new
7
+ --start-frame flag. --reference-image remains for reference images
8
+ (repeatable, max 8).
9
+
10
+ ### Features
11
+
12
+ * **generate:** route --reference-image to references and add --start-frame for i2v start frame ([b37ffee](https://github.com/clickraft/cli/commit/b37ffee452f97cbac99b9e1166d69124c101fc7b))
7
13
 
8
14
  # Changelog
9
15
 
@@ -11,6 +17,30 @@ All notable changes to the Clickraft CLI are documented here.
11
17
 
12
18
  ## Unreleased
13
19
 
20
+ ### Added
21
+
22
+ - **`generate create --start-frame <url|path>`** — sets the image-to-video start
23
+ frame. It is emitted as the scalar `referenceImageUrl`, which the server maps
24
+ to `start_image`. Accepts an http(s) URL or a local path (auto-uploaded, like
25
+ `--reference-image`).
26
+
27
+ ### Changed
28
+
29
+ - **BREAKING: `generate create --reference-image` now always routes to the
30
+ references category**, regardless of how many are supplied. Previously a
31
+ *single* `--reference-image` was collapsed into the scalar `referenceImageUrl`
32
+ (which the server treats as the image-to-video start frame), so it was rejected
33
+ by image models such as `gpt-image-2` that only accept references — while two
34
+ or more images worked. A single reference image is now sent as
35
+ `referenceImages: [{ url }]` and is accepted correctly.
36
+
37
+ **Migration (image-to-video users):** a lone `--reference-image <url>` no
38
+ longer sets the start frame. To set the start frame, use the new
39
+ `--start-frame <url>` flag. `--reference-image` remains for reference images
40
+ (repeatable, max 8). The same routing change applies to the `generate_create`
41
+ MCP tool: `referenceImages` is always references; the new `startFrame` input
42
+ sets the start frame.
43
+
14
44
  ### Fixed
15
45
 
16
46
  - **Workflow docs taught fictional node types and port names.** All examples in
package/dist/cli.js CHANGED
@@ -2061,13 +2061,19 @@ async function generateCreate(opts) {
2061
2061
  const preflightRefs = (opts.referenceImages ?? []).map(
2062
2062
  (v) => isUrlLike(v) ? v : PREFLIGHT_PLACEHOLDER_URL
2063
2063
  );
2064
- buildRequestBody({ ...opts, referenceImages: preflightRefs });
2064
+ const preflightStartFrame = opts.startFrame === void 0 ? void 0 : isUrlLike(opts.startFrame) ? opts.startFrame : PREFLIGHT_PLACEHOLDER_URL;
2065
+ buildRequestBody({ ...opts, referenceImages: preflightRefs, startFrame: preflightStartFrame });
2065
2066
  const referenceImages = await resolveReferenceImages({
2066
2067
  items: opts.referenceImages ?? [],
2067
2068
  client,
2068
2069
  signal: opts.signal
2069
2070
  });
2070
- const body = buildRequestBody({ ...opts, referenceImages });
2071
+ const startFrame = opts.startFrame === void 0 ? void 0 : (await resolveReferenceImages({
2072
+ items: [opts.startFrame],
2073
+ client,
2074
+ signal: opts.signal
2075
+ }))[0];
2076
+ const body = buildRequestBody({ ...opts, referenceImages, startFrame });
2071
2077
  return createGeneration({
2072
2078
  client,
2073
2079
  body,
@@ -2102,11 +2108,12 @@ async function resolveReferenceImages(args) {
2102
2108
  function buildRequestBody(args) {
2103
2109
  const input = {};
2104
2110
  if (args.prompt !== void 0) input.prompt = args.prompt;
2105
- if (args.referenceImages.length === 1) {
2106
- input.referenceImageUrl = args.referenceImages[0];
2107
- } else if (args.referenceImages.length > 1) {
2111
+ if (args.referenceImages.length > 0) {
2108
2112
  input.referenceImages = args.referenceImages.map((url) => ({ url }));
2109
2113
  }
2114
+ if (args.startFrame !== void 0) {
2115
+ input.referenceImageUrl = args.startFrame;
2116
+ }
2110
2117
  if (args.aspectRatio !== void 0) input.aspectRatio = args.aspectRatio;
2111
2118
  if (args.resolution !== void 0) input.resolution = args.resolution;
2112
2119
  if (args.durationSeconds !== void 0) input.durationSeconds = args.durationSeconds;
@@ -4292,7 +4299,8 @@ function renderCommandHelp(command) {
4292
4299
  " --product <spec> Product reference (repeatable)",
4293
4300
  " Format: <uuid> or <uuid>:<imageId>",
4294
4301
  " Server enforces reference cap per model",
4295
- " --reference-image <v> URL or local path (repeatable, max 8)",
4302
+ " --reference-image <v> Reference image: URL or local path (repeatable, max 8)",
4303
+ " --start-frame <v> Image-to-video start frame: URL or local path",
4296
4304
  " --aspect-ratio <a:b> e.g. 16:9",
4297
4305
  " --resolution <size> e.g. 1024x768, 720p, 1K",
4298
4306
  " --duration-seconds <n> For video/audio models (1-60)",
@@ -4607,6 +4615,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4607
4615
  ...COMMON_RICH_STRING_FLAGS,
4608
4616
  "prompt",
4609
4617
  "model-slug",
4618
+ "start-frame",
4610
4619
  "aspect-ratio",
4611
4620
  "resolution",
4612
4621
  "duration-seconds",
@@ -4629,6 +4638,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4629
4638
  prompt: parsed.string.prompt ?? parsed.positional[0],
4630
4639
  modelSlug,
4631
4640
  referenceImages: parsed.array["reference-image"],
4641
+ startFrame: parsed.string["start-frame"],
4632
4642
  aspectRatio: parsed.string["aspect-ratio"],
4633
4643
  resolution: parsed.string.resolution,
4634
4644
  durationSeconds: optionalInt(parsed.string["duration-seconds"], "duration-seconds"),