veogent 1.0.3 β 1.0.8
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/index.js +100 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -176,6 +176,19 @@ program
|
|
|
176
176
|
} catch (error) {}
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
+
program
|
|
180
|
+
.command('recent-chapters')
|
|
181
|
+
.description('Get recently created or updated chapters')
|
|
182
|
+
.option('-l, --limit <limit>', 'Maximum number of recent chapters to return', '10')
|
|
183
|
+
.action(async (options) => {
|
|
184
|
+
try {
|
|
185
|
+
const data = await api.get(`/app/chapter/recent-chapters?limit=${options.limit}`);
|
|
186
|
+
console.log(JSON.stringify(data.data || data, null, 2));
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.log(JSON.stringify({ status: "error", message: error.message }));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
179
192
|
program
|
|
180
193
|
.command('create-chapter-content')
|
|
181
194
|
.description('Generate content for a specific chapter')
|
|
@@ -231,6 +244,18 @@ program
|
|
|
231
244
|
console.log(JSON.stringify({ status: "error", message: error.response?.data?.message || error.message }));
|
|
232
245
|
}
|
|
233
246
|
});
|
|
247
|
+
program
|
|
248
|
+
.command('scenes <projectId> <chapterId>')
|
|
249
|
+
.description('Get all scenes for a specific chapter')
|
|
250
|
+
.action(async (projectId, chapterId) => {
|
|
251
|
+
try {
|
|
252
|
+
const data = await api.get(`/app/scenes/${projectId}/${chapterId}`);
|
|
253
|
+
console.log(JSON.stringify(data.data || data, null, 2));
|
|
254
|
+
} catch (error) {
|
|
255
|
+
console.log(JSON.stringify({ status: "error", message: error.message }));
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
234
259
|
program
|
|
235
260
|
.command('create-scene')
|
|
236
261
|
.description('Create a new scene from text content')
|
|
@@ -304,13 +329,17 @@ program
|
|
|
304
329
|
// Conditionally add fields based on strict DTO validators
|
|
305
330
|
if (options.type === 'GENERATE_IMAGES') {
|
|
306
331
|
payload.imageModel = options.imagemodel;
|
|
332
|
+
payload.orientation = options.orientation || 'HORIZONTAL';
|
|
307
333
|
}
|
|
308
334
|
if (options.type === 'GENERATE_VIDEO') {
|
|
309
335
|
payload.model = options.videomodel;
|
|
310
336
|
payload.videoSpeedMode = options.speed;
|
|
311
|
-
payload.useFlowKey =
|
|
337
|
+
payload.useFlowKey = true;
|
|
338
|
+
// Add fallback or provided orientation for video generations
|
|
339
|
+
payload.orientation = options.orientation || 'HORIZONTAL';
|
|
340
|
+
payload.imageModel = options.imagemodel;
|
|
312
341
|
}
|
|
313
|
-
if (['CREATE_CHAPTER_VIDEO', 'VIDEO_UPSCALE'].includes(options.type)) {
|
|
342
|
+
if (['CREATE_SCENE_VIDEO', 'CREATE_CHAPTER_VIDEO', 'VIDEO_UPSCALE'].includes(options.type)) {
|
|
314
343
|
payload.orientation = options.orientation || 'HORIZONTAL'; // Provide fallback
|
|
315
344
|
}
|
|
316
345
|
|
|
@@ -345,6 +374,59 @@ program
|
|
|
345
374
|
}
|
|
346
375
|
});
|
|
347
376
|
|
|
377
|
+
// --- YouTube Metadata & Thumbnails ---
|
|
378
|
+
program
|
|
379
|
+
.command('generate-yt-metadata')
|
|
380
|
+
.description('Generate YouTube metadata (Title, Description, Tags) for a chapter')
|
|
381
|
+
.requiredOption('-p, --project <project>', 'Project ID')
|
|
382
|
+
.requiredOption('-c, --chapter <chapter>', 'Chapter ID')
|
|
383
|
+
.requiredOption('-l, --lang <lang>', 'Story language')
|
|
384
|
+
.action(async (options) => {
|
|
385
|
+
try {
|
|
386
|
+
const payload = {
|
|
387
|
+
projectId: options.project,
|
|
388
|
+
chapterId: options.chapter,
|
|
389
|
+
storyLanguage: options.lang
|
|
390
|
+
};
|
|
391
|
+
const data = await api.post('/app/youtube/metadata/generate', payload);
|
|
392
|
+
console.log(JSON.stringify({ status: "success", metadata: data.data || data }, null, 2));
|
|
393
|
+
} catch (error) {
|
|
394
|
+
console.log(JSON.stringify({ status: "error", message: error.response?.data?.message || error.message }));
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
program
|
|
399
|
+
.command('generate-yt-thumbnail')
|
|
400
|
+
.description('Triggers a request to generate a YouTube thumbnail for a chapter')
|
|
401
|
+
.requiredOption('-p, --project <project>', 'Project ID')
|
|
402
|
+
.requiredOption('-c, --chapter <chapter>', 'Chapter ID')
|
|
403
|
+
.requiredOption('-l, --lang <lang>', 'Story language')
|
|
404
|
+
.action(async (options) => {
|
|
405
|
+
try {
|
|
406
|
+
const payload = {
|
|
407
|
+
projectId: options.project,
|
|
408
|
+
chapterId: options.chapter,
|
|
409
|
+
storyLanguage: options.lang
|
|
410
|
+
};
|
|
411
|
+
const data = await api.post('/app/youtube/thumbnails/generate', payload);
|
|
412
|
+
console.log(JSON.stringify({ status: "success", request: data.data || data }, null, 2));
|
|
413
|
+
} catch (error) {
|
|
414
|
+
console.log(JSON.stringify({ status: "error", message: error.response?.data?.message || error.message }));
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
program
|
|
419
|
+
.command('yt-thumbnails <projectId> <chapterId>')
|
|
420
|
+
.description('Get generated YouTube thumbnails for a chapter')
|
|
421
|
+
.action(async (projectId, chapterId) => {
|
|
422
|
+
try {
|
|
423
|
+
const data = await api.get(`/app/youtube/projects/${projectId}/chapters/${chapterId}/thumbnails`);
|
|
424
|
+
console.log(JSON.stringify(data.data || data, null, 2));
|
|
425
|
+
} catch (error) {
|
|
426
|
+
console.log(JSON.stringify({ status: "error", message: error.message }));
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
|
|
348
430
|
// --- System ---
|
|
349
431
|
program
|
|
350
432
|
.command('skill')
|
|
@@ -370,6 +452,8 @@ Agents **CANNOT** authenticate automatically because \`veogent login\` opens a l
|
|
|
370
452
|
|
|
371
453
|
## π Chapters & Scenes
|
|
372
454
|
* **List Chapters for a Project:** \`veogent chapters <projectId>\`
|
|
455
|
+
* **List Recent Chapters globally:** \`veogent recent-chapters -l 5\`
|
|
456
|
+
* **List Scenes for a Chapter:** \`veogent scenes <projectId> <chapterId>\`
|
|
373
457
|
* **Create Chapter Content:** \`veogent create-chapter-content -p <projectId> -c <chapterId> -s 5\` (Generates text/story content for 5 scenes)
|
|
374
458
|
* **Create Scene:** \`veogent create-scene -p <projectId> -c <chapterId> -C <sceneId1> <sceneId2>\`
|
|
375
459
|
|
|
@@ -421,10 +505,20 @@ If a generated image prompt needs adjustment by the AI, use \`veogent edit-scene
|
|
|
421
505
|
|
|
422
506
|
* **List All Generation Requests/Jobs Status:** \`veogent requests\`
|
|
423
507
|
|
|
424
|
-
## π‘ Best Practices for AI Agents
|
|
425
|
-
1. **
|
|
426
|
-
2. **
|
|
427
|
-
3.
|
|
508
|
+
## π‘ Best Practices for AI Agents (The VEOGENT Pipeline)
|
|
509
|
+
1. **Step 1: Description First.** Run \`veogent create-project-description\` to flesh out the lore, then use that payload for \`veogent create-project\`.
|
|
510
|
+
2. **Step 2: Chapter & Scene Content.** Run \`veogent create-chapter-content\` to ask the AI for a scene breakdown array. IMMEDIATELY supply that script array to \`veogent create-scene\` (use \`--flowkey\` so Firebase syncs it up).
|
|
511
|
+
3. **Step 3: Await Casting (CRITICAL).** The system will auto-generate characters. Do NOT rush to generate scenes. Use \`veogent characters <projectId>\` repeatedly (polling) until you observe EVERY character object contains an \`imageUri\`.
|
|
512
|
+
*(Alternatively, query \`veogent project <projectId>\` and check the \`"progress"\` object. It tracks the status of character generations. If a character hits FAILED, PROCESSING, or PENDING do not spam requests. Wait).*
|
|
513
|
+
4. **Step 4: Generate Images.** Start requesting \`GENERATE_IMAGES\` for the individual scenes in your desired orientation.
|
|
514
|
+
*(Anti-Spam Check: Use \`veogent assets <projId> <chapId> <sceneId> <type>\` to check history. IF there is an existing job with \`"status": "PROCESSING"\` or \`"PENDING"\`, YOU MUST WAIT. Do NOT fire another request).*
|
|
515
|
+
*(Concurrency Limit: The system only allows a maximum of 5 running/processing generation requests at a time globally. If the API responds with a "maximum reached" error, do NOT treat it as a task failure. Simply WAIT and poll until older requests complete).*
|
|
516
|
+
5. **Step 5: Art Directing & QA.** Download/view the generated image/video. If itβs glitched, bad quality, or misaligned with the script: STOP. Use \`veogent edit-scene\` to inject camera angles (Tilt, Wide, Close-up) and text adjustments to fix the prompt, then regenerate it.
|
|
517
|
+
6. **Step 6: Animate.** Once the frame is director-approved, proceed to \`GENERATE_VIDEO\`.
|
|
518
|
+
*(CRITICAL RULE: Do NOT generate a video for a scene unless that scene ALREADY has a successfully generated Image in the matching orientation. Ex: To generate a VERTICAL video, a VERTICAL image must exist first).*
|
|
519
|
+
7. **Step 7: YouTube Publishing Assets.** Wrap up the movie by generating metadata (Title, Description, Tags) using \`veogent generate-yt-metadata\` and triggering a thumbnail request via \`veogent generate-yt-thumbnail\`. To retrieve the final Thumbnail image, call \`veogent yt-thumbnails <proj> <chap>\`.
|
|
520
|
+
|
|
521
|
+
**Error Handling:** The CLI returns JSON like \`{"status": "error", "message": "..."}\`. Check this before proceeding with the next logic block. If an API request returns \`400 Bad Request\`, review your flags.`;
|
|
428
522
|
console.log(skillContent);
|
|
429
523
|
});
|
|
430
524
|
|