autokap 1.7.6 → 1.8.1
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 +6 -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
|
@@ -417,6 +417,12 @@ program
|
|
|
417
417
|
headed: opts.headed,
|
|
418
418
|
allowUploadFailure: opts.allowUploadFailure,
|
|
419
419
|
regenerateTts: opts.regenerateTts,
|
|
420
|
+
// Each preset runs under its own ephemeral runId, which is NOT a
|
|
421
|
+
// capture_runs row in a cloud batch (the parent cloud run owns the row),
|
|
422
|
+
// so the per-preset error-log export would 404. Failure telemetry for
|
|
423
|
+
// cloud recaptures is persisted server-side from the `preset_end:failed`
|
|
424
|
+
// checkpoint instead — disable the doomed local export here.
|
|
425
|
+
exportDebugLogs: false,
|
|
420
426
|
onProgress: (event) => {
|
|
421
427
|
const checkpoint = cloudCaptureProgressCheckpoint(event);
|
|
422
428
|
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;
|