popost 4.6.14 → 4.6.16
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/README.md +1 -1
- package/SKILL.md +4 -2
- package/dist/cli.js +1258 -590
- package/dist/index.js +1256 -588
- package/dist/types/feedback/bundle.d.ts +7 -0
- package/dist/types/feedback/media.d.ts +34 -0
- package/dist/types/feedback/request.d.ts +8 -0
- package/dist/types/feedback/transcript.d.ts +2 -0
- package/dist/types/feedback/upload.d.ts +7 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/video/generate/cloud.d.ts +18 -4
- package/dist/types/video/generate/failure.d.ts +61 -0
- package/dist/types/video/generate/index.d.ts +21 -4
- package/dist/types/video/generate/picture-fit.d.ts +60 -0
- package/dist/types/video/generate/voice-clips.d.ts +47 -0
- package/dist/types/video/render/record.d.ts +13 -3
- package/dist/types/video/replication/check.d.ts +10 -0
- package/dist/types/video/wallet.d.ts +6 -0
- package/package.json +1 -1
- package/references/execution-contract.md +2 -2
- package/references/providers.md +1 -1
- package/references/video-continuity.md +1 -1
- package/references/video-performers.md +2 -2
- package/references/video-product.md +4 -3
- package/references/video-replication.md +2 -2
- package/references/video-sound.md +9 -2
- package/references/video-step-1-read.md +1 -1
- package/references/video-step-7-deliver.md +3 -2
- package/references/video-tools.md +37 -13
- package/references/video.md +15 -4
|
@@ -65,8 +65,9 @@ text reader, run `popost video text final.mp4 --out final.text.json` first and a
|
|
|
65
65
|
A round is finished when every shot of `worst` is fixed or written into the delivery notes with the reason it stays (a
|
|
66
66
|
source that does not have it, a missing tool or material). `compare` counts the rounds: `round` is how many states of
|
|
67
67
|
the project have been compared, this one included (rendering again without a change is the same state), and `next`
|
|
68
|
-
says what the round asks.
|
|
69
|
-
|
|
68
|
+
says what the round asks. Deliver only a render that was compared: one round is enough when it finds nothing to fix
|
|
69
|
+
(every worst shot written down with its reason); after a fix, render and compare again (`"round": 2`, then 3), so
|
|
70
|
+
every change is checked; at most three rounds. `stillWorst` names the shots that stayed among the worst
|
|
70
71
|
with a similar score since an earlier round: fix them or write down why they stay. When `render` prints a `warning`,
|
|
71
72
|
the render before it was never compared: compare before changing more. When it prints `problems`, the music ends
|
|
72
73
|
before the video does: fix it as their `fix` says (video-tools.md, "Generated music") before delivering. To see the effects as the reference shows
|
|
@@ -164,7 +164,7 @@ https://github.com/PopostAI/popost/tree/main/skills/popost/tools/video
|
|
|
164
164
|
| `POPOST_OCR_CMD` (text reader) | `<cmd> <list.json> <out.json>`; list.json is `[{ "frame": 120, "file": "/abs/000120.jpg" }]` | out.json: `[{ "frame": 120, "lines": [{ "text": "...", "confidence": 0.97, "box": [x, y, w, h] }] }]`, boxes as fractions of the frame |
|
|
165
165
|
| `POPOST_ASR_CMD` (transcriber) | `<cmd> <audio.wav> <out.json> [language]` | out.json: `{ "language": "zh", "words": [{ "text": "...", "start": 1.02, "end": 1.16, "confidence": 0.99 }] }`, times in seconds |
|
|
166
166
|
| `POPOST_TTS_CMD` (speaker) | `<cmd> <text.txt> <out.wav> [voice] [speed]` | a WAV at out.wav; optionally `<out.wav>.words.json`: `{ "words": [{ "text", "start", "end" }] }` in seconds |
|
|
167
|
-
| `POPOST_GEN_CMD` (generator) | `<cmd> video\|image <request.json> <out-file>`; request `{ "prompt", "seconds"?, "aspect"?, "images"?, "videos"?, "audios"?, "firstFrame"?, "lastFrame"? }`, references and frames as paths (frames only without references) | the clip or picture at out-file, and one JSON line on stdout: `{ "credits"?: number }`. To have a price agreed first: nothing made, `{ "confirm": { "credits": n, ... } }` and exit code 3; such a tool answers a request with `"priceOnly": true` that way whatever its budget |
|
|
167
|
+
| `POPOST_GEN_CMD` (generator) | `<cmd> video\|image <request.json> <out-file>`; request `{ "prompt", "seconds"?, "aspect"?, "images"?, "videos"?, "audios"?, "firstFrame"?, "lastFrame"? }`, references and frames as paths (frames only without references) | the clip or picture at out-file, and one JSON line on stdout: `{ "credits"?: number }`. To have a price agreed first: nothing made, `{ "confirm": { "credits": n, ... } }` and exit code 3; such a tool answers a request with `"priceOnly": true` that way whatever its budget. A failure may add `{ "error": { "code", "retryable"?, "reason"?, "refundedCredits"?, "sound"? } }` ("sound": true: a content refusal of the reference sound) (with its non-zero exit code): `materials` gives refunded credits back to its budget and does not send that request again in the same call |
|
|
168
168
|
|
|
169
169
|
- What they change: a text reader lets `describe` read the captions (the beats) and `readback` check the render; a
|
|
170
170
|
transcriber reads what is said (spoken beats) and times a voice's words; a speaker makes the voice-over
|
|
@@ -315,7 +315,7 @@ asset at the output path. Import previously made clips as existing footage with
|
|
|
315
315
|
distinct from clips made by the CLI.
|
|
316
316
|
|
|
317
317
|
Set `POPOST_GEN_FRAMES=true` only if the external adapter sends `firstFrame` and `lastFrame` as exact frame constraints
|
|
318
|
-
and the
|
|
318
|
+
and the model it uses supports them. Set it to `false` for a references-only route. The CLI rejects exact-frame
|
|
319
319
|
requests when support is disabled and warns when undeclared. A picture added to an ordinary reference list does
|
|
320
320
|
not lock the first or last frame. Use a single generation for continuous action within the model's limit, or split
|
|
321
321
|
at a reference cut that motivates the new framing.
|
|
@@ -482,7 +482,7 @@ of this clip-generator choice. Set up the selected built-in generator once:
|
|
|
482
482
|
```bash
|
|
483
483
|
popost auth login # only if a selected account connection is missing
|
|
484
484
|
export POPOST_GEN_CMD="popost video generate"
|
|
485
|
-
popost video generate --models # the video models: ids, resolutions, seconds, aspect ratios, reference limits, credits
|
|
485
|
+
popost video generate --models # the video models: ids, resolutions, seconds, aspect ratios, reference limits, credits; the default marked
|
|
486
486
|
```
|
|
487
487
|
|
|
488
488
|
In a shell without `export`, set the same environment value using its native syntax. Connection and a model listing
|
|
@@ -490,18 +490,29 @@ are read-only access/preparation; paid submissions still follow the shared autho
|
|
|
490
490
|
|
|
491
491
|
| Variable | What it sets | Unset |
|
|
492
492
|
|---|---|---|
|
|
493
|
-
| `POPOST_VIDEO_MODEL` | the model of a clip: an `id` from `--models
|
|
493
|
+
| `POPOST_VIDEO_MODEL` | the model of a clip: an `id` from `--models`; set it only to a model the user names | the platform's default model (`"default": true` in `--models`) |
|
|
494
494
|
| `POPOST_VIDEO_RESOLUTION` | the resolution of a clip, one its model lists | the model's default |
|
|
495
495
|
| `POPOST_IMAGE_MODEL` | the model of a picture (`popost provider cli models` lists them) | the platform's default |
|
|
496
496
|
| `POPOST_GEN_MAX_CREDITS` | older form of a ceiling for one call; `--confirm --max-credits N` is the one to use | every call asks first |
|
|
497
497
|
| `POPOST_GEN_WAIT_MIN` | the minutes a clip is waited for | 30 |
|
|
498
498
|
| `POPOST_GEN_NO_WAIT` | `1`: a clip or picture that is not done once it is sent is answered `{"pending": {...}}` with exit code 4 (as `--no-wait`; `materials` sets it); the same call later downloads it, not paid twice | the call waits for the file |
|
|
499
499
|
|
|
500
|
-
The request never chooses the model, the resolution or the budget
|
|
501
|
-
|
|
500
|
+
The request never chooses the model, the resolution or the budget, and neither does the agent's own judgment: clips
|
|
501
|
+
are made with the platform's default model unless the user names another, whatever another model offers (native
|
|
502
|
+
speech, price, length, reference limits). Name the model in the plan; when the default cannot do what a clip needs
|
|
503
|
+
(frames, reference sounds, more reference pictures), say so and let the user choose. A request's `"aspect"` goes to
|
|
504
|
+
the model as it is (some models take `"adaptive"`; `--models` lists each model's ratios), and a clip without
|
|
505
|
+
`"seconds"` is 5 seconds long.
|
|
502
506
|
References are uploaded to the account first: `"images"` JPEG, PNG or WebP, `"videos"` MP4 or MOV, `"audios"` MP3 or
|
|
503
507
|
WAV (clips and sounds for a clip only). `"firstFrame"` and `"lastFrame"` (pictures) go the same way, for a model that
|
|
504
508
|
`--models` lists with `"frames": true`; another model refuses them and says so, and nothing is charged.
|
|
509
|
+
A picture (a frame or a reference) whose shape or size the model does not take is fitted first, with ffmpeg: the
|
|
510
|
+
model's picture limits where `--models` lists them, else width/height from 0.4 to 2.5 and sides of 300 to 6000 px. It
|
|
511
|
+
is never cropped: it is placed whole on a canvas of the nearest allowed ratio (scaled up when a side is too short, down
|
|
512
|
+
when one is too long), the room around it filled with a blurred, darker copy of the picture. The copy is made in a
|
|
513
|
+
scratch directory; the user's file is not changed. The clip's result (and `pending`) lists each one in `fitted`
|
|
514
|
+
(`file`, `was`, `now`, `how`); `materials` copies it to the file's entry. Tell the user when a picture of theirs was
|
|
515
|
+
padded, and look at a clip made from a padded first frame: it opens on that canvas.
|
|
505
516
|
|
|
506
517
|
**The price must be covered before anything is charged.** Every request is priced first. Without `--confirm` nothing is
|
|
507
518
|
charged: `generate` prints one line,
|
|
@@ -511,6 +522,11 @@ and exits with 3; `popost video materials` puts that price on the file (`confirm
|
|
|
511
522
|
rule above), run `materials` again with `--confirm --max-credits <left>`: it submits independent clips concurrently within
|
|
512
523
|
that command's allocation (it hands what is left to the generator as `POPOST_GEN_MAX_CREDITS`) and prints `chargedCredits`. A price
|
|
513
524
|
above what is left asks again. Without enough credits it fails before asking (`popost account` shows the balance).
|
|
525
|
+
A clip paid when it was sent that then fails is refunded, and what this command paid for it goes back to its
|
|
526
|
+
allocation: the clips it sends later (queued after the anchor or another clip) are still made within the same N.
|
|
527
|
+
`chargedCredits` is then net and `refundedCredits` says what came back; a failed clip is not sent again in the same
|
|
528
|
+
command (its `failure` says why), so read the reason before running it again. A clip paid by an earlier command that
|
|
529
|
+
fails now gives nothing back to this one: `popost usage --dir P --budget N` counts that refund.
|
|
514
530
|
`POPOST_GEN_MAX_CREDITS` and `--yes` (`POPOST_GEN_CMD="popost video generate --yes"`) still work as before.
|
|
515
531
|
|
|
516
532
|
**Generated video is the expensive item: only the agreed clips are made.** The first `materials --confirm
|
|
@@ -540,13 +556,17 @@ charged (0 when it was paid before) and its request key.
|
|
|
540
556
|
`~/.cache/popost/tasks/videos/` (`POPOST_TASK_DIR` moves it). After a crash or a timeout, run the same command again:
|
|
541
557
|
it finds the clip, waits for it or downloads it, and pays nothing more. Only a clip that failed (its credits were
|
|
542
558
|
refunded) or expired is made again, as a new attempt that is priced again.
|
|
543
|
-
- **Failures** print one line on stderr and exit with 1 (2: the setup or the request needs fixing)
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
559
|
+
- **Failures** print one line on stderr and exit with 1 (2: the setup or the request needs fixing); a clip that failed
|
|
560
|
+
on popost.ai also prints `{"error": {"code", "retryable"?, "reason"?, "refundedCredits"?, "sound"?}}` on stdout. The
|
|
561
|
+
line says what failed, the reason as the model gave it, what was charged and what to do next: no account connected,
|
|
562
|
+
video generation not available for the account (`VIDEO_GENERATION_DISABLED`), not enough credits, a request the
|
|
563
|
+
model does not take as it is (`VIDEO_OPTION_UNSUPPORTED` when it is priced, nothing charged; `VIDEO_REQUEST_REJECTED`
|
|
564
|
+
when the model refuses it, refunded; `retryable: false`: running it again unchanged fails again, so first change
|
|
565
|
+
what `reason` names; frames together with references are refused before anything is sent), content rejected
|
|
566
|
+
(`CONTENT_REJECTED`, refunded; `"sound": true` when it was the voice sample), a failure of the service
|
|
567
|
+
(`UPSTREAM_ERROR`, `retryable: true`, refunded; the same request may pass later), or still being made after
|
|
568
|
+
`POPOST_GEN_WAIT_MIN` (run the same command again later). Only a failure of the service is run again as it is; what
|
|
569
|
+
to do for each is in "Common failures".
|
|
550
570
|
|
|
551
571
|
## Collecting a source
|
|
552
572
|
|
|
@@ -619,6 +639,10 @@ under the band). Pointer, boxes and zoom are drawn into the recording, the same
|
|
|
619
639
|
| `render`: `The effect "..." could not be downloaded` | No network and the sound was never fetched on this machine: connect and render again, or delete its `sfx` tracks and say so in the notes. |
|
|
620
640
|
| An on-camera beat is said by no clip | Make the clip of that shot with `speech.lines` naming the beat ("Lines a person says"). When it costs more than is left, stop and tell the user the price. |
|
|
621
641
|
| A paid command ends with exit code 3 and `confirm` | Nothing was made or charged. Within what is left of the agreed budget: run it again with `--confirm --max-credits <left>`. Above it, or the scope changed: show the user `confirm` and ask. `"reason": "unplanned"`: "The built-in generator". |
|
|
642
|
+
| `materials` / `generate`: a clip failed with `VIDEO_REQUEST_REJECTED` or `VIDEO_OPTION_UNSUPPORTED` | The model will not take the request as it is; nothing was charged (a paid clip was refunded). Read `failure.reason` (`error.reason` of `generate`): it names the part, for example a picture's aspect ratio or a setting. Running it again unchanged fails again: change that part (a setting the model lists in `--models`; a picture of the user's only after asking them), then run again. Do not change the model on your own. |
|
|
643
|
+
| `materials` / `generate`: `CONTENT_REJECTED` with `"sound": true` (the voice sample was refused) | Stop and ask the user: another voice sample (`popost video voice sample` with another stretch or another recording) or another model they name. Never drop the voice reference or switch voices on your own: the clips would speak with different voices. Refunded. |
|
|
644
|
+
| `materials` / `generate`: `CONTENT_REJECTED` (other content) | Refunded. Change the wording of the prompt (no names of brands, characters or well-known works); ask the user before changing or leaving out a picture of theirs. The same request is refused again. |
|
|
645
|
+
| `materials` / `generate`: `UPSTREAM_ERROR` (`retryable: true`) | A failure of the service, refunded. The same request may pass later: run the same command again (a new attempt, priced again). `materials` does not send it again within the same call. |
|
|
622
646
|
| `describe`: `while decoding frames for the sheets`, `Error initializing filters`, `Cannot allocate memory` on a longer reference | Earlier video test builds made a deeply nested FFmpeg selection expression. Update to a build with balanced frame selection, rebuild the matching CLI, and retry the same reference. This error alone does not prove missing dependencies or insufficient physical memory. |
|
|
623
647
|
| `music make`: `problems` at `--prompt` (the description was refused) | Not charged. Describe the music by genre, mood, tempo and instruments, without names or lyrics, or take `suggestion`; run it again. |
|
|
624
648
|
| `music make`: `popost.ai could not make the music` | Not charged (refunded). Run the same command again later; when it keeps failing, deliver without music and say so. |
|
package/references/video.md
CHANGED
|
@@ -63,6 +63,10 @@ keep their previous behavior; an approved repair uses a separate project and doe
|
|
|
63
63
|
reservations and any covered repairs as [onboarding.md](onboarding.md#commission-budget-and-reuse) describes. `INSUFFICIENT_CREDITS`:
|
|
64
64
|
the balance is short; `popost account` shows it and where to add credits. Tell the user once that the video's
|
|
65
65
|
charges show as one line, "Task: <the title step 0 gave it>", with its items, on their popost.ai account page.
|
|
66
|
+
- Model: clips on popost.ai are made with the platform's default model (`"default"` in `popost video generate
|
|
67
|
+
--models`) unless the user names another. Leave `POPOST_VIDEO_MODEL` unset and choose no model by your own
|
|
68
|
+
judgment (native speech, price, length or reference limits); name the model in the cost overview. When the default
|
|
69
|
+
cannot do what the video needs, say so and let the user choose.
|
|
66
70
|
- Generated clips retain a separate plan guard. `materials` and `generate` stop a new/changed clip outside the
|
|
67
71
|
recorded plan with exit code 3, `"reason": "unplanned"` and `confirm.clip`/`confirm.clips`; the blocked clip is not
|
|
68
72
|
charged. Inspect its exact key, purpose, account/model, quote, remaining budget and repair coverage. If valid
|
|
@@ -105,10 +109,17 @@ Lines of your own speaker (`POPOST_TTS_CMD`) are kept there as well, by its comm
|
|
|
105
109
|
run again (another `--fit-tempo`, one line changed) speaks only the new lines; after changing a setting the speaker
|
|
106
110
|
reads from its own environment rather than its command line, delete `.popost/video-cache/voice/`.
|
|
107
111
|
|
|
108
|
-
Commands that take minutes (`describe` of a long reference, `
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
is
|
|
112
|
+
Commands that take minutes (`describe` of a long reference, `capture` of a page with many steps, `template fill
|
|
113
|
+
--speak`, `render`) print their progress on stderr. Keep every single wait under about four minutes: after about five
|
|
114
|
+
minutes without a model request, the next request can send the whole conversation again (megabytes of pictures, which
|
|
115
|
+
is what a metered network or VPN pays for) and starts without the model's cache, so the step is slower too. Run such a
|
|
116
|
+
command in the background with its answer and its progress in files, and wait for it in rounds that end after at most
|
|
117
|
+
about three and a half minutes whether it is done or not, for example
|
|
118
|
+
`timeout 200 bash -c 'until [ -s render.json ]; do sleep 5; done'; tail -c 300 render.err`, then wait again. Bound the
|
|
119
|
+
wait, not the command: a `timeout` around the command itself stops it and its work is done again. A loop that waits
|
|
120
|
+
until the command is done, with no bound, is one long wait too. Wait for the file it writes or for its process id;
|
|
121
|
+
never `pgrep -f` with words of the command, which also finds the shell that is waiting and so waits until its own
|
|
122
|
+
timeout.
|
|
112
123
|
A whole `render` keeps each shot it encoded (a long shot split every four seconds from its start) in the project's
|
|
113
124
|
`.cache/render-chunks/`, keyed by everything the shot shows (the drawn page state, scene files, pictures, fonts and render settings). After a local fix, render the whole
|
|
114
125
|
video again: only the shots the fix touched are drawn, the others are copied, and `chunks` in the answer says how
|