makaron-cli 0.8.2 → 0.8.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.7.3",
3
+ "version": "0.8.4",
4
4
  "description": "AI image editing, video generation, and music creation via CLI. Agents can self-register, create projects, and produce creative media.",
5
5
  "author": {
6
6
  "name": "Makaron AI",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.7.3",
3
+ "version": "0.8.4",
4
4
  "description": "AI image editing, video generation, and music creation via CLI. Agents can self-register, create projects, and produce creative media.",
5
5
  "displayName": "Makaron",
6
6
  "shortDescription": "AI image/video/music creation from the terminal",
package/README.md CHANGED
@@ -97,6 +97,16 @@ Returns immediately:
97
97
  npx makaron-cli chat --project <id> --image ref1.jpg --image ref2.jpg -b "use these as style reference"
98
98
  ```
99
99
 
100
+ ### Inspect existing timeline media
101
+
102
+ Before starting a follow-up run on an existing project, list the current timeline media so you know what assets are available and which `<<<media_N>>>` references to use:
103
+
104
+ ```bash
105
+ npx makaron-cli project media <projectId> --json
106
+ ```
107
+
108
+ This is project-scoped. `responses get <runId> --pick output` only returns artifacts from one run; `project media` returns the whole project timeline: original uploads, references, generated images, video snapshots, and editable compositions.
109
+
100
110
  ### With video input (MP4/MOV/WebM)
101
111
 
102
112
  ```bash
@@ -110,8 +120,8 @@ npx makaron-cli chat --project <id> --video party.mp4 --image kid.jpg -b "make t
110
120
  npx makaron-cli chat --project <id> --video clip1.mp4 --video clip2.mp4 -b "splice these into one seamless video"
111
121
  ```
112
122
 
113
- Video files are uploaded via signed URL. CLI local video uploads follow the same compatibility contract as the normal frontend flow: `.mp4`, `.mov`, or `.webm`, max 200MB, target max 15s with 0.5s metadata tolerance, and <=1080p / 2,086,876 frame pixels. The frontend can transcode oversized videos; the CLI rejects them so later Seedance editing does not fail.
114
- The agent understands video content natively — it can analyze scenes, edit, extend, and compose videos. Seedance video-reference editing is supported for ~15s videos that meet the same upload limits; Kling remains the base/direct edit path.
123
+ Video files are uploaded via signed URL. CLI local video uploads support `.mp4`, `.mov`, or `.webm`, max 50MB, max 120s with 1s metadata tolerance, and <=1080p / 2,086,876 frame pixels. The frontend can transcode larger videos before upload; the CLI uploads directly to Storage and rejects videos above those limits.
124
+ The agent understands video content natively — it can analyze scenes, edit, extend, and compose videos. Seedance video-reference editing is still limited to ~15s provider references, so longer uploaded videos should be split/prepared by the agent before model submission; Kling remains the base/direct edit path.
115
125
  Use `chat --project <id|auto> --video ...` for any project/timeline video work. Direct `video create` is standalone and does not write timeline entries.
116
126
 
117
127
  ### Check status (single query)
@@ -134,64 +144,6 @@ Outputs one JSON per line as artifacts appear:
134
144
  {"event":"done","status":"completed"}
135
145
  ```
136
146
 
137
- ### New Agent quickstart
138
-
139
- For a new Agent, keep the default service flow to two response commands:
140
-
141
- ```bash
142
- npx makaron-cli responses next <runId> --json
143
- npx makaron-cli responses handle <messageId> --run <runId> --choice approve
144
- npx makaron-cli responses deliver <artifactId> --run <runId> --channel feishu --message-id <messageId>
145
- ```
146
-
147
- `responses next` emits a compact timeline, detects text-only checkpoints for creative/service work, and returns `next_commands` when the Agent must handle a Makaron message before waiting for artifacts. It exits with code `3` on an unhandled checkpoint so wrappers stop instead of silently waiting. After handling a checkpoint, run the returned `next_commands.inspect` command to continue. While the run is still generating, it returns `status: "running"` and `blocking: false`. If completed image/video artifacts exist and have not been delivered, it returns `status: "has_artifacts"` and `blocking: true` with compact `undelivered_artifacts` entries containing `kind`, `status`, `url`, `fileName`, and `contentType` when available, plus `next_commands.deliver`; the Agent must send the artifact URL to the user, then record delivery with `responses deliver`. A non-checkpoint response returns `status: "ready"` or `status: "delivered"`. If a run failed, `responses next --json` prints `status: "failed"` and `blocking: true` plus `error.type`, `error.message`, `error.recoverable`, `error.detail`, and `next_command` to stdout before exiting `1`, so wrappers can parse the failure without scraping stderr. Use `--no-fail` to inspect checkpoint JSON without failing. For pure Q&A runs, use:
148
-
149
- ```bash
150
- npx makaron-cli responses next <runId> --json --checkpoint-mode off
151
- ```
152
-
153
- `responses handle` is the single checkpoint action command. Valid choices are `approve`, `revise`, `ask_user`, and `continue`. `responses deliver` records that a completed artifact was actually delivered to the user, preventing repeated delivery prompts.
154
-
155
- ### Dialogue events for external Agents
156
-
157
- Use this when another Agent needs to read what Makaron said, handle text checkpoints, and relay artifacts without inventing customer-service wording.
158
-
159
- ```bash
160
- npx makaron-cli responses events <runId> --jsonl
161
- # alias: npx makaron-cli responses timeline <runId> --jsonl
162
- # compact view: npx makaron-cli responses timeline <runId> --jsonl --compact
163
- # pure Q&A view: npx makaron-cli responses timeline <runId> --jsonl --checkpoint-mode off
164
- ```
165
-
166
- `events` and `timeline` are lower-level commands. New Agents should start with `responses next` and use these only when they need raw event streams.
167
-
168
- Events use only three factual types:
169
-
170
- ```json
171
- {"type":"message","id":"msg_1","runId":"run_xxx","seq":1,"text":"Makaron original message","requires_approval":true,"approval_options":["approve","revise","ask_user","continue"]}
172
- {"type":"approval","messageId":"msg_1","choice":"approve","status":"recorded"}
173
- {"type":"artifact","kind":"image","status":"completed","url":"https://..."}
174
- ```
175
-
176
- Makaron uses a conservative checkpoint rule for creative/service Agents: if a run stops with substantive text, has no image/video/music/design artifact, and has no continuing execution action such as a tool call, the message is marked `requires_approval: true`. Pure status text such as queued, rendering, uploading, or completed is not treated as a checkpoint. Pure Q&A flows should pass `--checkpoint-mode off`. If a message has `requires_approval: true`, the external Agent must record an approval before continuing to wait for artifacts or claiming completion:
177
-
178
- ```bash
179
- npx makaron-cli responses approve msg_1 --run <runId> --note "Proceed."
180
- npx makaron-cli responses revise msg_1 --run <runId> "make it softer"
181
- npx makaron-cli responses ask-user msg_1 --run <runId>
182
- npx makaron-cli responses continue msg_1 --run <runId>
183
- npx makaron-cli responses handle msg_1 --run <runId> --choice approve
184
- ```
185
-
186
- Important: approvals are a local Agent gate in v0. They are recorded by the CLI so wrappers and Skills can fail fast, but they do not pause or resume the remote Makaron runtime yet. Wrappers can enforce the local gate with:
187
-
188
- ```bash
189
- npx makaron-cli responses events <runId> --jsonl --checkpoint-mode service --fail-on-unapproved
190
- # alias: npx makaron-cli responses timeline <runId> --jsonl --compact --fail-on-unapproved
191
- ```
192
-
193
- Use `--compact` when relaying to another Agent or chat system; it merges consecutive Makaron content chunks into a single readable message.
194
-
195
147
  ### Extract specific results
196
148
 
197
149
  ```bash
@@ -254,9 +206,9 @@ For project/timeline video editing, use:
254
206
  npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
255
207
  ```
256
208
 
257
- Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration 3|5|7|10|15`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`
209
+ Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s.
258
210
 
259
- Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=1080p input. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
211
+ Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
260
212
 
261
213
  ### `music` — Music generation
262
214
 
@@ -321,41 +273,6 @@ type MakaronOutput =
321
273
  | Motion design | "create an Instagram story with animated text" |
322
274
  | Multi-step | "edit the photo then make a video from it" |
323
275
 
324
- ## Minimal Agent Wrapper
325
-
326
- A new Agent can use this minimal flow:
327
-
328
- ```bash
329
- RUN_JSON=$(npx makaron-cli chat --project auto --json -b "$USER_PROMPT")
330
- RUN_ID=$(echo "$RUN_JSON" | jq -r .runId)
331
- PROJECT_URL=$(echo "$RUN_JSON" | jq -r .projectUrl)
332
- send_message "Project created: $PROJECT_URL"
333
-
334
- if ! NEXT=$(npx makaron-cli responses next "$RUN_ID" --json); then
335
- STATUS=$(echo "$NEXT" | jq -r .status)
336
- if [ "$STATUS" = "needs_approval" ]; then
337
- MSG_ID=$(echo "$NEXT" | jq -r .checkpoint.id)
338
- TEXT=$(echo "$NEXT" | jq -r .checkpoint.text)
339
- send_message "$TEXT"
340
- npx makaron-cli responses handle "$MSG_ID" --run "$RUN_ID" --choice ask_user
341
- exit 3
342
- elif [ "$STATUS" = "failed" ]; then
343
- send_message "$(echo "$NEXT" | jq -r .error.message)"
344
- exit 1
345
- fi
346
- fi
347
-
348
- NEXT=$(npx makaron-cli responses next "$RUN_ID" --json --no-fail)
349
- if [ "$(echo "$NEXT" | jq -r .status)" = "has_artifacts" ]; then
350
- ARTIFACT_ID=$(echo "$NEXT" | jq -r ".undelivered_artifacts[0].id")
351
- ARTIFACT_URL=$(echo "$NEXT" | jq -r ".undelivered_artifacts[0].url")
352
- DELIVERY_MESSAGE_ID=$(send_message "$ARTIFACT_URL")
353
- npx makaron-cli responses deliver "$ARTIFACT_ID" --run "$RUN_ID" --channel feishu --message-id "$DELIVERY_MESSAGE_ID"
354
- fi
355
-
356
- RESULT=$(npx makaron-cli responses get "$RUN_ID" --wait --json)
357
- ```
358
-
359
276
  ## Recommended Pattern: Service Flow (Feishu/OpenClaw/Group Chat)
360
277
 
361
278
  When serving end-users in a chat environment (Feishu, Slack, Discord), use this proactive message pattern:
package/SKILL.md CHANGED
@@ -86,6 +86,16 @@ Returns immediately:
86
86
  npx makaron-cli chat --project <id> --image ref1.jpg --image ref2.jpg -b "use these as style reference"
87
87
  ```
88
88
 
89
+ ### Inspect existing timeline media
90
+
91
+ Before starting a follow-up run on an existing project, list the current timeline media so you know what assets are available and which `<<<media_N>>>` references to use:
92
+
93
+ ```bash
94
+ npx makaron-cli project media <projectId> --json
95
+ ```
96
+
97
+ This is project-scoped. `responses get <runId> --pick output` only returns artifacts from one run; `project media` returns the whole project timeline: original uploads, references, generated images, video snapshots, and editable compositions.
98
+
89
99
  ### With video input (edit, compose, extend)
90
100
 
91
101
  ```bash
@@ -102,7 +112,7 @@ npx makaron-cli chat --project <id> --video clip1.mp4 --video clip2.mp4 -b "comb
102
112
  npx makaron-cli chat --project auto --video https://example.com/dance.mp4 -b "extend this to 15 seconds"
103
113
  ```
104
114
 
105
- Supported formats: MP4, MOV, WebM. CLI local video uploads follow the same compatibility contract as the normal frontend flow: max 200MB, target max 15s with 0.5s metadata tolerance, and <=1080p / 2,086,876 frame pixels. The frontend can transcode oversized videos; the CLI rejects them so later Seedance editing does not fail. Videos are uploaded to the project timeline. The Agent can analyze scenes, edit content, compose multiple clips, extend duration, and add effects — all via natural language. Seedance video-reference editing is supported for ~15s videos that meet these upload limits; Kling remains the base/direct edit path.
115
+ Supported formats: MP4, MOV, WebM. CLI local video uploads support max 50MB, max 120s with 1s metadata tolerance, and <=1080p / 2,086,876 frame pixels. The frontend can transcode larger videos before upload; the CLI uploads directly to Storage and rejects videos above those limits. Videos are uploaded to the project timeline. The Agent can analyze scenes, edit content, compose multiple clips, extend duration, and add effects — all via natural language. Seedance video-reference editing is still limited to ~15s provider references, so longer uploaded videos should be split/prepared by the agent before model submission; Kling remains the base/direct edit path.
106
116
 
107
117
  Use `chat --project <id|auto> --video ...` for any project/timeline video work. Direct video commands are standalone raw-tool calls.
108
118
 
@@ -126,64 +136,6 @@ Outputs one JSON per line as artifacts appear:
126
136
  {"event":"done","status":"completed"}
127
137
  ```
128
138
 
129
- ### New Agent quickstart
130
-
131
- For a new Agent, keep the default service flow to two response commands:
132
-
133
- ```bash
134
- npx makaron-cli responses next <runId> --json
135
- npx makaron-cli responses handle <messageId> --run <runId> --choice approve
136
- npx makaron-cli responses deliver <artifactId> --run <runId> --channel feishu --message-id <messageId>
137
- ```
138
-
139
- `responses next` emits a compact timeline, detects text-only checkpoints for creative/service work, and returns `next_commands` when the Agent must handle a Makaron message before waiting for artifacts. It exits with code `3` on an unhandled checkpoint so wrappers stop instead of silently waiting. After handling a checkpoint, run the returned `next_commands.inspect` command to continue. While the run is still generating, it returns `status: "running"` and `blocking: false`. If completed image/video artifacts exist and have not been delivered, it returns `status: "has_artifacts"` and `blocking: true` with compact `undelivered_artifacts` entries containing `kind`, `status`, `url`, `fileName`, and `contentType` when available, plus `next_commands.deliver`; the Agent must send the artifact URL to the user, then record delivery with `responses deliver`. A non-checkpoint response returns `status: "ready"` or `status: "delivered"`. If a run failed, `responses next --json` prints `status: "failed"` and `blocking: true` plus `error.type`, `error.message`, `error.recoverable`, `error.detail`, and `next_command` to stdout before exiting `1`, so wrappers can parse the failure without scraping stderr. Use `--no-fail` to inspect checkpoint JSON without failing. For pure Q&A runs, use:
140
-
141
- ```bash
142
- npx makaron-cli responses next <runId> --json --checkpoint-mode off
143
- ```
144
-
145
- `responses handle` is the single checkpoint action command. Valid choices are `approve`, `revise`, `ask_user`, and `continue`. `responses deliver` records that a completed artifact was actually delivered to the user, preventing repeated delivery prompts.
146
-
147
- ### Dialogue events for external Agents
148
-
149
- Use this when another Agent needs to read what Makaron said, handle text checkpoints, and relay artifacts without inventing customer-service wording.
150
-
151
- ```bash
152
- npx makaron-cli responses events <runId> --jsonl
153
- # alias: npx makaron-cli responses timeline <runId> --jsonl
154
- # compact view: npx makaron-cli responses timeline <runId> --jsonl --compact
155
- # pure Q&A view: npx makaron-cli responses timeline <runId> --jsonl --checkpoint-mode off
156
- ```
157
-
158
- `events` and `timeline` are lower-level commands. New Agents should start with `responses next` and use these only when they need raw event streams.
159
-
160
- Events use only three factual types:
161
-
162
- ```json
163
- {"type":"message","id":"msg_1","runId":"run_xxx","seq":1,"text":"Makaron original message","requires_approval":true,"approval_options":["approve","revise","ask_user","continue"]}
164
- {"type":"approval","messageId":"msg_1","choice":"approve","status":"recorded"}
165
- {"type":"artifact","kind":"image","status":"completed","url":"https://..."}
166
- ```
167
-
168
- Makaron uses a conservative checkpoint rule for creative/service Agents: if a run stops with substantive text, has no image/video/music/design artifact, and has no continuing execution action such as a tool call, the message is marked `requires_approval: true`. Pure status text such as queued, rendering, uploading, or completed is not treated as a checkpoint. Pure Q&A flows should pass `--checkpoint-mode off`. If a message has `requires_approval: true`, the external Agent must record an approval before continuing to wait for artifacts or claiming completion:
169
-
170
- ```bash
171
- npx makaron-cli responses approve msg_1 --run <runId> --note "Proceed."
172
- npx makaron-cli responses revise msg_1 --run <runId> "make it softer"
173
- npx makaron-cli responses ask-user msg_1 --run <runId>
174
- npx makaron-cli responses continue msg_1 --run <runId>
175
- npx makaron-cli responses handle msg_1 --run <runId> --choice approve
176
- ```
177
-
178
- Important: approvals are a local Agent gate in v0. They are recorded by the CLI so wrappers and Skills can fail fast, but they do not pause or resume the remote Makaron runtime yet. Wrappers can enforce the local gate with:
179
-
180
- ```bash
181
- npx makaron-cli responses events <runId> --jsonl --checkpoint-mode service --fail-on-unapproved
182
- # alias: npx makaron-cli responses timeline <runId> --jsonl --compact --fail-on-unapproved
183
- ```
184
-
185
- Use `--compact` when relaying to another Agent or chat system; it merges consecutive Makaron content chunks into a single readable message.
186
-
187
139
  ### Extract specific results
188
140
 
189
141
  ```bash
@@ -246,9 +198,9 @@ npx makaron-cli video status <taskId>
246
198
  npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
247
199
  ```
248
200
 
249
- Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration 3|5|7|10|15`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`
201
+ Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to 7), `--video <file|url>`, `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--model kling|seedance`. SeeDance accepts integer output duration 4-15s (default 5s); Kling supports 5-15s.
250
202
 
251
- Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=1080p input. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
203
+ Video edit model behavior: `--model kling --video` uses Kling base/direct edit internally; `--model seedance --video` uses the Seedance video-reference path and requires target <=15s, <=50MB, width/height 300-6000px, aspect ratio 0.4-2.5, and frame pixels 409,600-2,086,876. Tiny metadata padding up to 15.5s is accepted and output duration is clamped to 15s.
252
204
 
253
205
  ### `music` — Music generation
254
206
 
@@ -310,41 +262,6 @@ type MakaronOutput =
310
262
  | Motion design | "create an Instagram story with animated text" |
311
263
  | Multi-step | "edit the photo then make a video from it" |
312
264
 
313
- ## Minimal Agent Wrapper
314
-
315
- A new Agent can use this minimal flow:
316
-
317
- ```bash
318
- RUN_JSON=$(npx makaron-cli chat --project auto --json -b "$USER_PROMPT")
319
- RUN_ID=$(echo "$RUN_JSON" | jq -r .runId)
320
- PROJECT_URL=$(echo "$RUN_JSON" | jq -r .projectUrl)
321
- send_message "Project created: $PROJECT_URL"
322
-
323
- if ! NEXT=$(npx makaron-cli responses next "$RUN_ID" --json); then
324
- STATUS=$(echo "$NEXT" | jq -r .status)
325
- if [ "$STATUS" = "needs_approval" ]; then
326
- MSG_ID=$(echo "$NEXT" | jq -r .checkpoint.id)
327
- TEXT=$(echo "$NEXT" | jq -r .checkpoint.text)
328
- send_message "$TEXT"
329
- npx makaron-cli responses handle "$MSG_ID" --run "$RUN_ID" --choice ask_user
330
- exit 3
331
- elif [ "$STATUS" = "failed" ]; then
332
- send_message "$(echo "$NEXT" | jq -r .error.message)"
333
- exit 1
334
- fi
335
- fi
336
-
337
- NEXT=$(npx makaron-cli responses next "$RUN_ID" --json --no-fail)
338
- if [ "$(echo "$NEXT" | jq -r .status)" = "has_artifacts" ]; then
339
- ARTIFACT_ID=$(echo "$NEXT" | jq -r ".undelivered_artifacts[0].id")
340
- ARTIFACT_URL=$(echo "$NEXT" | jq -r ".undelivered_artifacts[0].url")
341
- DELIVERY_MESSAGE_ID=$(send_message "$ARTIFACT_URL")
342
- npx makaron-cli responses deliver "$ARTIFACT_ID" --run "$RUN_ID" --channel feishu --message-id "$DELIVERY_MESSAGE_ID"
343
- fi
344
-
345
- RESULT=$(npx makaron-cli responses get "$RUN_ID" --wait --json)
346
- ```
347
-
348
265
  ## Recommended Pattern: Service Flow (Feishu/OpenClaw/Group Chat)
349
266
 
350
267
  When serving end-users in a chat environment (Feishu, Slack, Discord), use this proactive message pattern: