autokap 1.7.6 → 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
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
|
});
|
|
@@ -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;
|