autokap 1.7.5 → 1.8.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/dist/cli-contract.d.ts +7 -0
- package/dist/cli-runner.js +5 -0
- package/dist/cli.js +2 -0
- package/dist/server-credit-usage.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli-contract.d.ts
CHANGED
|
@@ -48,6 +48,13 @@ export interface VideoClipMetadata {
|
|
|
48
48
|
clipId: string;
|
|
49
49
|
/** Storage path within the `videos` bucket (e.g. `raw/{video_id}/{clip_id}.mp4`). */
|
|
50
50
|
mp4StoragePath: string;
|
|
51
|
+
/**
|
|
52
|
+
* Live origin the clip was captured against (`artifact.captureUrl ??
|
|
53
|
+
* program.baseUrl`). The compositor resolves it to a project environment so
|
|
54
|
+
* a video-demo recapture self-heals its GitHub obsolescence baseline (AUT-221
|
|
55
|
+
* Lot 10). Optional for backward-compat with older CLIs that don't send it.
|
|
56
|
+
*/
|
|
57
|
+
captureUrl?: string;
|
|
51
58
|
/** Measured duration of the captured MP4 in milliseconds. */
|
|
52
59
|
durationMs: number;
|
|
53
60
|
/**
|
package/dist/cli-runner.js
CHANGED
|
@@ -821,6 +821,10 @@ export function buildVideoClipMetadata(videoId, result, program, runId) {
|
|
|
821
821
|
const storagePath = runId
|
|
822
822
|
? `raw/${videoId}/${runId}/${variantId}/${artifact.clipId}.mp4`
|
|
823
823
|
: `raw/${videoId}/${variantId}/${artifact.clipId}.mp4`;
|
|
824
|
+
// Live origin for the obsolescence baseline (AUT-221). Mirrors the
|
|
825
|
+
// screenshot upload path's `artifact.captureUrl ?? program.baseUrl`;
|
|
826
|
+
// baseUrl is already env-resolved server-side. Undefined when neither exists.
|
|
827
|
+
const captureUrl = artifact.captureUrl ?? program?.baseUrl;
|
|
824
828
|
const matchingTimings = result.opcodeTimings
|
|
825
829
|
.filter((t) => t.variantId === variantId && t.clipId === artifact.clipId)
|
|
826
830
|
.map((t) => ({
|
|
@@ -843,6 +847,7 @@ export function buildVideoClipMetadata(videoId, result, program, runId) {
|
|
|
843
847
|
theme: variantSpec?.theme ?? inferVariantTheme(variantId),
|
|
844
848
|
clipId: artifact.clipId,
|
|
845
849
|
mp4StoragePath: storagePath,
|
|
850
|
+
...(captureUrl ? { captureUrl } : {}),
|
|
846
851
|
durationMs: artifact.durationMs ?? 0,
|
|
847
852
|
opcodeTimings: matchingTimings,
|
|
848
853
|
});
|
package/dist/cli.js
CHANGED
|
@@ -219,6 +219,7 @@ program
|
|
|
219
219
|
.option('--cloud', 'Cloud runner mode: signals 4+ vCPU available, unblocks the conservative Linux FPS default (8 → 30)', false)
|
|
220
220
|
.option('--preset-ids <ids>', 'Comma-separated preset IDs to capture. When omitted, captures all presets with auto_recapture_enabled=true.')
|
|
221
221
|
.option('--outdated', 'Capture only outdated auto-recapture presets.', false)
|
|
222
|
+
.option('--regenerate-tts', 'Force fresh TTS synthesis for video presets — ignore cached audio segments. Reused segments become billable at full rate.', false)
|
|
222
223
|
.action(async (opts) => {
|
|
223
224
|
if (opts.debug) {
|
|
224
225
|
const { setDebugEnabled } = await import('./logger.js');
|
|
@@ -415,6 +416,7 @@ program
|
|
|
415
416
|
env: opts.env,
|
|
416
417
|
headed: opts.headed,
|
|
417
418
|
allowUploadFailure: opts.allowUploadFailure,
|
|
419
|
+
regenerateTts: opts.regenerateTts,
|
|
418
420
|
onProgress: (event) => {
|
|
419
421
|
const checkpoint = cloudCaptureProgressCheckpoint(event);
|
|
420
422
|
if (!checkpoint)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
export type CreditUsageType = 'screenshot' | 'clip' | 'video' | 'cloud_recapture' | 'ai_chat' | 'studio_creation' | 'studio_iteration' | 'error_analysis';
|
|
2
|
+
export type CreditUsageType = 'screenshot' | 'clip' | 'video' | 'cloud_recapture' | 'ai_chat' | 'studio_creation' | 'studio_iteration' | 'error_analysis' | 'obsolescence_analysis';
|
|
3
3
|
export declare function recordCreditUsage(supabase: SupabaseClient, params: {
|
|
4
4
|
userId: string;
|
|
5
5
|
projectId: string | null;
|