@officexapp/vidfarm-devcli 0.21.26 → 0.21.27
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/.agents/skills/vidfarm/SKILL.md +26 -6
- package/.agents/skills/vidfarm/references/assets-and-sourcing.md +26 -0
- package/.agents/skills/vidfarm/references/automation-and-local-dev.md +27 -6
- package/.agents/skills/vidfarm/references/core-workflows.md +1 -1
- package/.agents/skills/vidfarm/references/editor-workflows.md +44 -2
- package/.agents/skills/vidfarm/references/primitives.md +28 -0
- package/.agents/skills/vidfarm-media/SKILL.md +3 -1
- package/.agents/skills/vidfarm-media/references/tts.md +1 -1
- package/SKILL.director.md +152 -15
- package/SKILL.md +6 -2
- package/clipper.md +3 -2
- package/dist/src/cli.js +409 -19
- package/dist/src/devcli/cost-mode.js +46 -18
- package/dist/src/devcli/sequence.js +619 -0
- package/dist/src/services/sequence-prompts.js +463 -0
- package/package.json +3 -1
- package/public/assets/file-directory-app.js +26 -26
- package/public/assets/homepage-client-app.js +12 -12
- package/public/serve-shells/editor.html +66 -3
- package/public/serve-shells/library-files.html +60 -3
- package/public/serve-shells/library-raws.html +60 -3
- package/public/serve-shells/tools-clipper.html +60 -3
- package/public/serve-shells/tools-image.html +1069 -483
- package/public/serve-shells/tools-video.html +140 -14
|
@@ -11,9 +11,17 @@
|
|
|
11
11
|
// - hybrid : roughly $0.01–$1 per video. Free where it's free, spend on AI
|
|
12
12
|
// only where it clearly wins. (default recommendation.) Billed
|
|
13
13
|
// ops run but print a cost line.
|
|
14
|
-
// -
|
|
15
|
-
//
|
|
16
|
-
//
|
|
14
|
+
// - rich-ai : $1+ per video. AI video generation is used to mint REUSABLE
|
|
15
|
+
// greenscreen raws, which are then keyed and remixed with
|
|
16
|
+
// hyperframes/HTML-CSS motion and the rest of the raw library.
|
|
17
|
+
// The raws persist (local `~/.vidfarm` raws store, optionally
|
|
18
|
+
// `vidfarm sync push /raws` to the cloud on a Pro plan), so the
|
|
19
|
+
// spend amortizes into later hybrid/minimize videos. Billed ops
|
|
20
|
+
// run; cost is still surfaced. Shown to humans as "rich-ai".
|
|
21
|
+
// - pure-videogen : $5+ per video. The whole piece is generated footage —
|
|
22
|
+
// text script → image storyboard → per-scene, frame-by-frame
|
|
23
|
+
// video generation. No raws reuse, no HTML motion. The most
|
|
24
|
+
// expensive mode; reserve it for hero pieces.
|
|
17
25
|
//
|
|
18
26
|
// Those dollar figures are what the AI providers charge, and they are billed to
|
|
19
27
|
// the user's OWN provider keys (BYOK — the keys saved via `vidfarm
|
|
@@ -25,7 +33,7 @@
|
|
|
25
33
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
26
34
|
import path from "node:path";
|
|
27
35
|
import { resolveDevcliHome } from "./auth-store.js";
|
|
28
|
-
export const COST_MODES = ["minimize", "hybrid", "
|
|
36
|
+
export const COST_MODES = ["minimize", "hybrid", "rich-ai", "pure-videogen"];
|
|
29
37
|
/** What we assume when nothing is set. Hybrid is the founder-friendly middle,
|
|
30
38
|
* but callers can tell it apart from an explicit choice via `isSet`. */
|
|
31
39
|
export const DEFAULT_COST_MODE = "hybrid";
|
|
@@ -41,21 +49,29 @@ export function normalizeCostMode(raw) {
|
|
|
41
49
|
return "minimize";
|
|
42
50
|
if (["hybrid", "mixed", "balanced", "smart", "default"].includes(v))
|
|
43
51
|
return "hybrid";
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
// Check videogen BEFORE rich-ai: "pure-videogen" must not be swallowed by a
|
|
53
|
+
// looser "pure*" spelling, and "videogen" always means the frame-by-frame mode.
|
|
54
|
+
if (["pure-videogen", "purevideogen", "pure-video-gen", "videogen", "video-gen", "pure-video", "purevideo", "veo", "frame-by-frame", "cinematic"].includes(v))
|
|
55
|
+
return "pure-videogen";
|
|
56
|
+
// "pure-ai"/"pureai" are the LEGACY slug this mode used to be stored under —
|
|
57
|
+
// keep accepting them so an older ~/.vidfarm/cost-mode.json still resolves.
|
|
58
|
+
if (["rich-ai", "richai", "rich", "pure-ai", "pureai", "ai", "best", "best-quality", "premium", "max"].includes(v))
|
|
59
|
+
return "rich-ai";
|
|
46
60
|
return null;
|
|
47
61
|
}
|
|
48
62
|
/**
|
|
49
|
-
* Human-facing NAME for a mode.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
63
|
+
* Human-facing NAME for a mode. These match the canonical slugs one-for-one —
|
|
64
|
+
* there is no "pure-ai" mode any more, it is `rich-ai` everywhere (the old slug
|
|
65
|
+
* is still ACCEPTED as an alias by normalizeCostMode so saved cost-mode.json,
|
|
66
|
+
* --cost-mode flags, and VIDFARM_COST_MODE from older installs keep resolving).
|
|
52
67
|
*/
|
|
53
68
|
export const COST_MODE_DISPLAY = {
|
|
54
69
|
minimize: "minimize",
|
|
55
70
|
hybrid: "hybrid",
|
|
56
|
-
"
|
|
71
|
+
"rich-ai": "rich-ai",
|
|
72
|
+
"pure-videogen": "pure-videogen"
|
|
57
73
|
};
|
|
58
|
-
/** The
|
|
74
|
+
/** The modes as users see them, e.g. "<minimize|hybrid|rich-ai|pure-videogen>". */
|
|
59
75
|
export const COST_MODE_DISPLAY_LIST = COST_MODES.map((m) => COST_MODE_DISPLAY[m]);
|
|
60
76
|
export function costModeDisplayName(mode) {
|
|
61
77
|
return COST_MODE_DISPLAY[mode];
|
|
@@ -120,22 +136,34 @@ export const COST_MODE_BLURB = {
|
|
|
120
136
|
"credits only where they clearly win (a hero shot, a voice you can't fake locally). " +
|
|
121
137
|
"Billed ops run but each prints its cost so nothing is a surprise. Charges land on " +
|
|
122
138
|
"your own AI provider keys (BYOK).",
|
|
123
|
-
"
|
|
139
|
+
"rich-ai": "Rich AI — $1+ per video. AI video generation is spent on REUSABLE greenscreen raws " +
|
|
140
|
+
"(vidfarm avatar / generate --greenscreen), keyed once and then remixed with hyperframes " +
|
|
141
|
+
"HTML/CSS motion and the rest of the raw library. Those raws are saved in the local raws " +
|
|
142
|
+
"store (and pushed to the cloud with `vidfarm sync push /raws` on a Pro plan), so the same " +
|
|
143
|
+
"footage powers later hybrid/minimize videos for $0. AI image/voice/music used freely. " +
|
|
124
144
|
"Billed ops run without gating; cost is still shown. Charges land on your own AI " +
|
|
125
|
-
"provider keys (BYOK)."
|
|
145
|
+
"provider keys (BYOK).",
|
|
146
|
+
"pure-videogen": "Pure videogen — $5+ per video. Every shot is generated footage: write the script in text, " +
|
|
147
|
+
"storyboard it as images, then generate each scene frame-by-frame from those keyframes. " +
|
|
148
|
+
"No raw reuse, no HTML motion — the most expensive and most cinematic mode. Billed ops run " +
|
|
149
|
+
"without gating; cost is still shown, and a single run can be many dollars. Charges land on " +
|
|
150
|
+
"your own AI provider keys (BYOK)."
|
|
126
151
|
};
|
|
127
152
|
/** One short human line summarizing the active mode. */
|
|
128
153
|
export function costModeSummaryLine(resolved) {
|
|
129
154
|
const setNote = resolved.isSet ? `set via ${resolved.source}` : "NOT set — assuming hybrid";
|
|
130
155
|
return `cost mode: ${costModeDisplayName(resolved.mode)} (${setNote})`;
|
|
131
156
|
}
|
|
132
|
-
/** The
|
|
157
|
+
/** The "explain it simply" block an agent should relay to the user. */
|
|
133
158
|
export function costModeExplainer() {
|
|
134
159
|
return [
|
|
135
160
|
"How much do you want Vidfarm to spend on AI per video?",
|
|
136
|
-
" • minimize
|
|
137
|
-
" • hybrid
|
|
138
|
-
" • rich-ai
|
|
161
|
+
" • minimize — $0 videos: free local compute + free stock media, no AI spend at all.",
|
|
162
|
+
" • hybrid — ~$0.01–$1 per video (recommended): free where free, pay AI only where it clearly wins.",
|
|
163
|
+
" • rich-ai — $1+ per video: AI video gen mints REUSABLE greenscreen raws, then hyperframes",
|
|
164
|
+
" HTML/CSS motion remixes them with your library; the raws are saved and reused later.",
|
|
165
|
+
" • pure-videogen — $5+ per video: everything is generated footage — text script → image storyboard →",
|
|
166
|
+
" frame-by-frame scene generation. Most cinematic, most expensive.",
|
|
139
167
|
"Any spend is billed to YOUR own AI provider keys (BYOK) — add them with",
|
|
140
168
|
" `vidfarm add-provider-key <provider> <key>` or at vidfarm.cc/settings/developer.",
|
|
141
169
|
"Tip: before paying to generate music/SFX/images/video, try the free stock catalog —",
|
|
@@ -159,7 +187,7 @@ export class CostModeBlockedError extends Error {
|
|
|
159
187
|
*
|
|
160
188
|
* - minimize: throws unless `yes` is set — the agent must confirm with the user
|
|
161
189
|
* (or use the free local alternative named in `freeAlternative`).
|
|
162
|
-
* - hybrid /
|
|
190
|
+
* - hybrid / rich-ai: allowed; prints a one-line cost notice (unless json).
|
|
163
191
|
* - unset: allowed like hybrid, but prints a "no preference set — ask the user"
|
|
164
192
|
* nudge once so the default posture really is "ask before spending."
|
|
165
193
|
*/
|