@clickraft/cli 0.11.1 → 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,8 +1,15 @@
1
- ## [0.11.1](https://github.com/clickraft/cli/compare/v0.11.0...v0.11.1) (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
- * **cli:** widen models schema to accept server lifecycle fields and any-typed constraints ([47eedfa](https://github.com/clickraft/cli/commit/47eedfa0e126034fa5f46e29610cc626d3de8c32)), closes [#10](https://github.com/clickraft/cli/issues/10) [#R2-constraints](https://github.com/clickraft/cli/issues/R2-constraints) [8/#10](https://github.com/8/cli/issues/10)
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))
6
13
 
7
14
  # Changelog
8
15
 
@@ -10,6 +17,30 @@ All notable changes to the Clickraft CLI are documented here.
10
17
 
11
18
  ## Unreleased
12
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
+
13
44
  ### Fixed
14
45
 
15
46
  - **Workflow docs taught fictional node types and port names.** All examples in
package/dist/cli.js CHANGED
@@ -95,8 +95,8 @@ var TokensListResponseSchema = z4.array(TokenRowSchema);
95
95
  var DeclaredParamSchema = z5.object({
96
96
  name: z5.string(),
97
97
  type: z5.string(),
98
- required: z5.boolean(),
99
- defaultValue: z5.string().nullable().optional(),
98
+ required: z5.boolean().optional(),
99
+ defaultValue: z5.unknown().optional(),
100
100
  enumValues: z5.array(z5.string()).nullable().optional(),
101
101
  description: z5.string().nullable().optional()
102
102
  }).strict();
@@ -139,6 +139,8 @@ var GenerateCreateRequestSchema = z6.object({
139
139
  "resolution must match WxH (e.g. 1280x720), p-token (e.g. 720p), or K-token (e.g. 1K)"
140
140
  ).optional(),
141
141
  durationSeconds: z6.number().int().min(1).max(60).optional(),
142
+ width: z6.number().int().min(64).max(8192).optional(),
143
+ height: z6.number().int().min(64).max(8192).optional(),
142
144
  providerParams: z6.record(z6.string(), z6.unknown()).optional()
143
145
  }).strict(),
144
146
  options: z6.object({
@@ -2059,13 +2061,19 @@ async function generateCreate(opts) {
2059
2061
  const preflightRefs = (opts.referenceImages ?? []).map(
2060
2062
  (v) => isUrlLike(v) ? v : PREFLIGHT_PLACEHOLDER_URL
2061
2063
  );
2062
- 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 });
2063
2066
  const referenceImages = await resolveReferenceImages({
2064
2067
  items: opts.referenceImages ?? [],
2065
2068
  client,
2066
2069
  signal: opts.signal
2067
2070
  });
2068
- 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 });
2069
2077
  return createGeneration({
2070
2078
  client,
2071
2079
  body,
@@ -2100,11 +2108,12 @@ async function resolveReferenceImages(args) {
2100
2108
  function buildRequestBody(args) {
2101
2109
  const input = {};
2102
2110
  if (args.prompt !== void 0) input.prompt = args.prompt;
2103
- if (args.referenceImages.length === 1) {
2104
- input.referenceImageUrl = args.referenceImages[0];
2105
- } else if (args.referenceImages.length > 1) {
2111
+ if (args.referenceImages.length > 0) {
2106
2112
  input.referenceImages = args.referenceImages.map((url) => ({ url }));
2107
2113
  }
2114
+ if (args.startFrame !== void 0) {
2115
+ input.referenceImageUrl = args.startFrame;
2116
+ }
2108
2117
  if (args.aspectRatio !== void 0) input.aspectRatio = args.aspectRatio;
2109
2118
  if (args.resolution !== void 0) input.resolution = args.resolution;
2110
2119
  if (args.durationSeconds !== void 0) input.durationSeconds = args.durationSeconds;
@@ -4290,7 +4299,8 @@ function renderCommandHelp(command) {
4290
4299
  " --product <spec> Product reference (repeatable)",
4291
4300
  " Format: <uuid> or <uuid>:<imageId>",
4292
4301
  " Server enforces reference cap per model",
4293
- " --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",
4294
4304
  " --aspect-ratio <a:b> e.g. 16:9",
4295
4305
  " --resolution <size> e.g. 1024x768, 720p, 1K",
4296
4306
  " --duration-seconds <n> For video/audio models (1-60)",
@@ -4605,6 +4615,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4605
4615
  ...COMMON_RICH_STRING_FLAGS,
4606
4616
  "prompt",
4607
4617
  "model-slug",
4618
+ "start-frame",
4608
4619
  "aspect-ratio",
4609
4620
  "resolution",
4610
4621
  "duration-seconds",
@@ -4627,6 +4638,7 @@ async function runGenerateCreate(argv, ctx, rc) {
4627
4638
  prompt: parsed.string.prompt ?? parsed.positional[0],
4628
4639
  modelSlug,
4629
4640
  referenceImages: parsed.array["reference-image"],
4641
+ startFrame: parsed.string["start-frame"],
4630
4642
  aspectRatio: parsed.string["aspect-ratio"],
4631
4643
  resolution: parsed.string.resolution,
4632
4644
  durationSeconds: optionalInt(parsed.string["duration-seconds"], "duration-seconds"),