@mevdragon/vidfarm-devcli 0.20.5 → 0.20.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/.agents/skills/editor-capabilities/SKILL.md +15 -1
- package/.agents/skills/vidfarm-director/SKILL.md +106 -0
- package/.agents/skills/vidfarm-director/recipes/find-and-fork-template.md +16 -0
- package/.agents/skills/vidfarm-director/recipes/local-edit-render-approve.md +13 -0
- package/.agents/skills/vidfarm-director/recipes/onboard-a-new-director.md +13 -0
- package/.agents/skills/vidfarm-director/recipes/retheme-template.md +17 -0
- package/.agents/skills/vidfarm-director/references/assets-and-sourcing.md +111 -0
- package/.agents/skills/vidfarm-director/references/automation-and-local-dev.md +243 -0
- package/.agents/skills/vidfarm-director/references/core-workflows.md +273 -0
- package/.agents/skills/vidfarm-director/references/editor-workflows.md +365 -0
- package/.agents/skills/vidfarm-director/references/onboarding.md +28 -0
- package/.agents/skills/vidfarm-director/references/primitives.md +265 -0
- package/SKILL.director.md +521 -261
- package/dist/src/cli.js +404 -96
- package/dist/src/devcli/clips.js +15 -10
- package/dist/src/devcli/doctor.js +2 -2
- package/dist/src/devcli/local-backend.js +46 -2
- package/dist/src/services/clip-curation/cost.js +5 -1
- package/dist/src/services/clip-curation/gemini.js +10 -0
- package/package.json +30 -10
- package/SKILL.platform.md +0 -432
- package/demo/README.md +0 -28
- package/demo/dist/app.css +0 -1
- package/demo/dist/app.js +0 -1850
- package/demo/dist/chunks/chunk-DXB73IDG.js +0 -1
- package/demo/dist/chunks/chunk-S7OWAJDS.js +0 -36
- package/demo/dist/chunks/chunk-VTIBZ6AN.js +0 -1
- package/demo/dist/chunks/dist-ADSJKBVE.js +0 -332
- package/demo/dist/chunks/domEditingLayers-VZMLL4AP-SGHWPND4.js +0 -1
- package/demo/dist/chunks/hyperframes-player-XB65TCD6.js +0 -425
- package/demo/dist/chunks/lib-XAQ37YOE.js +0 -1
- package/demo/dist/chunks/src-TJ2QYA4U.js +0 -207
- package/demo/dist/favicon.ico +0 -0
- package/demo/dist/icons/timeline/audio.svg +0 -7
- package/demo/dist/icons/timeline/captions.svg +0 -5
- package/demo/dist/icons/timeline/composition.svg +0 -12
- package/demo/dist/icons/timeline/image.svg +0 -18
- package/demo/dist/icons/timeline/music.svg +0 -10
- package/demo/dist/icons/timeline/text.svg +0 -3
- package/demo/dist/index.html +0 -15
- package/dist/src/account-pages-legacy.js +0 -9396
- package/dist/src/account-pages.js +0 -61
- package/dist/src/app.js +0 -21602
- package/dist/src/composition-runtime.js +0 -1053
- package/dist/src/config.js +0 -217
- package/dist/src/context.js +0 -447
- package/dist/src/dev-app-legacy.js +0 -739
- package/dist/src/dev-app.js +0 -6
- package/dist/src/devcli/migrate-local.js +0 -140
- package/dist/src/devcli/sync.js +0 -368
- package/dist/src/domain.js +0 -5
- package/dist/src/editor-chat-history.js +0 -82
- package/dist/src/editor-chat.js +0 -756
- package/dist/src/editor-dark-theme.js +0 -1128
- package/dist/src/frontend/debug.js +0 -71
- package/dist/src/frontend/discover-client.js +0 -130
- package/dist/src/frontend/discover-store.js +0 -23
- package/dist/src/frontend/file-directory.js +0 -1018
- package/dist/src/frontend/flockposter-cache-store.js +0 -124
- package/dist/src/frontend/homepage-client.js +0 -446
- package/dist/src/frontend/homepage-shared.js +0 -201
- package/dist/src/frontend/homepage-store.js +0 -66
- package/dist/src/frontend/homepage-view.js +0 -705
- package/dist/src/frontend/page-runtime-client.js +0 -132
- package/dist/src/frontend/page-runtime-store.js +0 -9
- package/dist/src/frontend/sentry.js +0 -42
- package/dist/src/frontend/template-editor-chat.js +0 -4181
- package/dist/src/help-page.js +0 -346
- package/dist/src/homepage.js +0 -1458
- package/dist/src/index.js +0 -16
- package/dist/src/instrument.js +0 -30
- package/dist/src/landing-page.js +0 -384
- package/dist/src/page-runtime.js +0 -2
- package/dist/src/page-shell.js +0 -1452
- package/dist/src/primitive-context.js +0 -416
- package/dist/src/primitive-registry.js +0 -3940
- package/dist/src/primitive-sdk.js +0 -4
- package/dist/src/primitives/hyperframes-media.js +0 -108
- package/dist/src/react-page-shell.js +0 -35
- package/dist/src/ready-post-schedule-component.js +0 -1540
- package/dist/src/registry.js +0 -296
- package/dist/src/reskin/agency-page.js +0 -299
- package/dist/src/reskin/calendar-page.js +0 -568
- package/dist/src/reskin/chat-page.js +0 -942
- package/dist/src/reskin/discover-page.js +0 -1788
- package/dist/src/reskin/document.js +0 -1587
- package/dist/src/reskin/help-page.js +0 -357
- package/dist/src/reskin/index-page.js +0 -62
- package/dist/src/reskin/inpaint-clipper-page.js +0 -890
- package/dist/src/reskin/inpaint-page.js +0 -2554
- package/dist/src/reskin/inpaint-video-page.js +0 -1339
- package/dist/src/reskin/job-runs-page.js +0 -477
- package/dist/src/reskin/library-page.js +0 -1634
- package/dist/src/reskin/login-page.js +0 -262
- package/dist/src/reskin/portfolio-page.js +0 -687
- package/dist/src/reskin/pricing-page.js +0 -390
- package/dist/src/reskin/settings-page.js +0 -732
- package/dist/src/reskin/theme.js +0 -711
- package/dist/src/runtime.js +0 -35
- package/dist/src/services/api-call-history.js +0 -249
- package/dist/src/services/auth.js +0 -152
- package/dist/src/services/billing-pricing.js +0 -39
- package/dist/src/services/billing.js +0 -241
- package/dist/src/services/cast.js +0 -127
- package/dist/src/services/chat-threads.js +0 -92
- package/dist/src/services/clip-records.js +0 -250
- package/dist/src/services/clip-search.js +0 -77
- package/dist/src/services/clip-vectors.js +0 -125
- package/dist/src/services/composition-sanitize.js +0 -124
- package/dist/src/services/composition-watch.js +0 -79
- package/dist/src/services/elevenlabs.js +0 -222
- package/dist/src/services/file-directory.js +0 -117
- package/dist/src/services/fork-access.js +0 -93
- package/dist/src/services/fork-manifest.js +0 -42
- package/dist/src/services/ghostcut.js +0 -179
- package/dist/src/services/hyperframes.js +0 -3517
- package/dist/src/services/job-capacity.js +0 -14
- package/dist/src/services/job-logs.js +0 -197
- package/dist/src/services/jobs.js +0 -136
- package/dist/src/services/local-dynamo.js +0 -0
- package/dist/src/services/media-processing.js +0 -766
- package/dist/src/services/primitive-media-lambda.js +0 -280
- package/dist/src/services/providers.js +0 -2748
- package/dist/src/services/rate-limits.js +0 -262
- package/dist/src/services/scene-annotations.js +0 -32
- package/dist/src/services/serverless-auth.js +0 -382
- package/dist/src/services/serverless-jobs.js +0 -1084
- package/dist/src/services/serverless-provider-keys.js +0 -409
- package/dist/src/services/serverless-records.js +0 -1515
- package/dist/src/services/serverless-template-configs.js +0 -75
- package/dist/src/services/storage.js +0 -461
- package/dist/src/services/swipe-customize.js +0 -437
- package/dist/src/services/template-certification.js +0 -413
- package/dist/src/services/template-loader.js +0 -99
- package/dist/src/services/template-runtime-bundles.js +0 -217
- package/dist/src/services/template-sources.js +0 -1017
- package/dist/src/services/upstream.js +0 -248
- package/dist/src/services/video-normalization.js +0 -2
- package/dist/src/services/webhooks.js +0 -62
- package/dist/src/template-editor-pages.js +0 -2576
- package/dist/src/template-editor-shell.js +0 -2893
- package/dist/src/template-sdk.js +0 -4
- package/dist/src/worker.js +0 -17
- package/public/assets/discover-client-app.js +0 -1
- package/public/assets/file-directory-app.js +0 -3
- package/public/assets/homepage-app.js +0 -54
- package/public/assets/homepage-client-app.js +0 -80
- package/public/assets/page-runtime-client-app.js +0 -94
- package/public/assets/placeholders/scene-placeholder.png +0 -0
- package/src/assets/SELLING_AWARENESS_STAGES.md +0 -579
- package/src/assets/SELLING_WITH_HOOKS.md +0 -377
- package/src/assets/SELLING_WITH_VSLS.md +0 -606
- package/src/assets/favicon.ico +0 -0
- package/src/assets/logo-vidfarm.png +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
const prefix = "[vidfarm]";
|
|
2
|
-
const maxBufferedEntries = 1000;
|
|
3
|
-
function shouldWriteToConsole(level) {
|
|
4
|
-
if (level !== "debug")
|
|
5
|
-
return true;
|
|
6
|
-
if (typeof window === "undefined")
|
|
7
|
-
return false;
|
|
8
|
-
try {
|
|
9
|
-
const params = new URLSearchParams(window.location.search);
|
|
10
|
-
return params.has("debug") || window.localStorage?.getItem("VIDFARM_DEBUG") === "1";
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function write(level, event, detail) {
|
|
17
|
-
const entry = {
|
|
18
|
-
event,
|
|
19
|
-
detail,
|
|
20
|
-
timestamp: new Date().toISOString()
|
|
21
|
-
};
|
|
22
|
-
if (typeof window !== "undefined") {
|
|
23
|
-
window.__VIDFARM_DEBUG_LOGS__ = window.__VIDFARM_DEBUG_LOGS__ ?? [];
|
|
24
|
-
window.__VIDFARM_DEBUG_LOGS__.push(entry);
|
|
25
|
-
if (window.__VIDFARM_DEBUG_LOGS__.length > maxBufferedEntries) {
|
|
26
|
-
window.__VIDFARM_DEBUG_LOGS__.splice(0, window.__VIDFARM_DEBUG_LOGS__.length - maxBufferedEntries);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (shouldWriteToConsole(level)) {
|
|
30
|
-
const method = level === "debug" ? "log" : level;
|
|
31
|
-
console[method](prefix, event, detail ?? "");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export function debugLog(event, detail) {
|
|
35
|
-
write("info", event, detail);
|
|
36
|
-
}
|
|
37
|
-
export function debugDebug(event, detail) {
|
|
38
|
-
write("debug", event, detail);
|
|
39
|
-
}
|
|
40
|
-
export function debugWarn(event, detail) {
|
|
41
|
-
write("warn", event, detail);
|
|
42
|
-
}
|
|
43
|
-
export function debugError(event, detail) {
|
|
44
|
-
write("error", event, detail);
|
|
45
|
-
}
|
|
46
|
-
export function installGlobalDebugHooks() {
|
|
47
|
-
if (typeof window === "undefined" || window.__VIDFARM_DEBUG_HOOKS__) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
window.__VIDFARM_DEBUG_HOOKS__ = true;
|
|
51
|
-
debugLog("boot.hooks-installed", {
|
|
52
|
-
href: window.location.href,
|
|
53
|
-
readyState: document.readyState,
|
|
54
|
-
userAgent: navigator.userAgent
|
|
55
|
-
});
|
|
56
|
-
window.addEventListener("error", (event) => {
|
|
57
|
-
debugError("window.error", {
|
|
58
|
-
message: event.message,
|
|
59
|
-
filename: event.filename,
|
|
60
|
-
lineno: event.lineno,
|
|
61
|
-
colno: event.colno,
|
|
62
|
-
error: event.error instanceof Error ? event.error.stack : event.error
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
window.addEventListener("unhandledrejection", (event) => {
|
|
66
|
-
debugError("window.unhandledrejection", {
|
|
67
|
-
reason: event.reason instanceof Error ? event.reason.stack : event.reason
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=debug.js.map
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// Client runtime for the reskinned /discover/feed page. It owns the feed's
|
|
2
|
-
// Zustand cache + the stale-while-revalidate fetch policy, and exposes a tiny
|
|
3
|
-
// imperative bridge (window.__vidfarmDiscover) that the page's inline script
|
|
4
|
-
// calls. Kept intentionally framework-free: the reskin page is SSR HTML, so
|
|
5
|
-
// this module just hydrates the store and hands the inline code a loader.
|
|
6
|
-
//
|
|
7
|
-
// Loading contract (what "snappy without redundant SSR load" means here):
|
|
8
|
-
// 1. The server inlines the first page of the default feed into the boot
|
|
9
|
-
// JSON (feedInitial). The inline script paints THAT immediately — zero
|
|
10
|
-
// follow-up fetch on first load.
|
|
11
|
-
// 2. This module seeds the same snapshot into the store so a back/forward
|
|
12
|
-
// navigation (or BFCache restore) is an instant cache hit.
|
|
13
|
-
// 3. Anything older than TTL_MS revalidates in the background; a fresh result
|
|
14
|
-
// replaces the snapshot and re-paints. Search queries always fetch fresh
|
|
15
|
-
// and are never cached.
|
|
16
|
-
import { createDiscoverStore } from "./discover-store.js";
|
|
17
|
-
// How long a cached default-feed snapshot is trusted before a background
|
|
18
|
-
// revalidation. Short on purpose: long enough to make back-navigation feel
|
|
19
|
-
// instant, short enough that an Add New / decompose elsewhere self-heals fast.
|
|
20
|
-
const TTL_MS = 20_000;
|
|
21
|
-
function readBoot() {
|
|
22
|
-
const el = document.querySelector("[data-rk-discover-boot]");
|
|
23
|
-
if (!el?.textContent)
|
|
24
|
-
return {};
|
|
25
|
-
try {
|
|
26
|
-
return JSON.parse(el.textContent) || {};
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
return {};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const boot = readBoot();
|
|
33
|
-
const accountId = boot.accountId || "";
|
|
34
|
-
const feedEndpoint = boot.feedEndpoint || "/discover/feed";
|
|
35
|
-
const store = createDiscoverStore(`vidfarm.discover.feed.v1.${accountId || "anon"}`);
|
|
36
|
-
// Seed the store from the SSR snapshot. This runs AFTER persist has rehydrated
|
|
37
|
-
// from sessionStorage, so the freshest source (the server render we're painting
|
|
38
|
-
// right now) wins over any older persisted copy.
|
|
39
|
-
if (boot.feedInitial && Array.isArray(boot.feedInitial)) {
|
|
40
|
-
const parsed = boot.feedFetchedAt ? Date.parse(boot.feedFetchedAt) : Number.NaN;
|
|
41
|
-
store.getState().setDefaultFeed(boot.feedInitial, Number.isFinite(parsed) ? parsed : Date.now());
|
|
42
|
-
}
|
|
43
|
-
function buildUrl(query) {
|
|
44
|
-
try {
|
|
45
|
-
const u = new URL(feedEndpoint, window.location.href);
|
|
46
|
-
if (query)
|
|
47
|
-
u.searchParams.set("q", query);
|
|
48
|
-
if (accountId)
|
|
49
|
-
u.searchParams.set("account", accountId);
|
|
50
|
-
return u.toString();
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return feedEndpoint;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async function fetchFeed(query) {
|
|
57
|
-
const r = await fetch(buildUrl(query), {
|
|
58
|
-
credentials: "same-origin",
|
|
59
|
-
headers: { accept: "application/json" }
|
|
60
|
-
});
|
|
61
|
-
if (!r.ok) {
|
|
62
|
-
throw new Error(r.status === 401
|
|
63
|
-
? "Sign in to browse the template feed."
|
|
64
|
-
: `Couldn't load templates (${r.status}).`);
|
|
65
|
-
}
|
|
66
|
-
const j = (await r.json());
|
|
67
|
-
return Array.isArray(j?.templates) ? j.templates : [];
|
|
68
|
-
}
|
|
69
|
-
function loadFeed(query, handlers) {
|
|
70
|
-
const q = (query || "").trim();
|
|
71
|
-
// Search: always fresh, never cached.
|
|
72
|
-
if (q) {
|
|
73
|
-
handlers.onLoading?.();
|
|
74
|
-
fetchFeed(q)
|
|
75
|
-
.then((items) => handlers.onResult(items, { fromCache: false, stale: false }))
|
|
76
|
-
.catch((err) => handlers.onError(err instanceof Error ? err : new Error(String(err))));
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const cached = store.getState().defaultFeed;
|
|
80
|
-
const now = Date.now();
|
|
81
|
-
if (cached && cached.items.length) {
|
|
82
|
-
const stale = now - cached.fetchedAt > TTL_MS;
|
|
83
|
-
handlers.onResult(cached.items, { fromCache: true, stale });
|
|
84
|
-
if (stale) {
|
|
85
|
-
// Background revalidate — keep the painted feed on failure.
|
|
86
|
-
fetchFeed("")
|
|
87
|
-
.then((items) => {
|
|
88
|
-
store.getState().setDefaultFeed(items, Date.now());
|
|
89
|
-
handlers.onResult(items, { fromCache: false, stale: false });
|
|
90
|
-
})
|
|
91
|
-
.catch(() => { });
|
|
92
|
-
}
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
// Cold (no seed, no cache) — foreground fetch.
|
|
96
|
-
handlers.onLoading?.();
|
|
97
|
-
fetchFeed("")
|
|
98
|
-
.then((items) => {
|
|
99
|
-
store.getState().setDefaultFeed(items, Date.now());
|
|
100
|
-
handlers.onResult(items, { fromCache: false, stale: false });
|
|
101
|
-
})
|
|
102
|
-
.catch((err) => handlers.onError(err instanceof Error ? err : new Error(String(err))));
|
|
103
|
-
}
|
|
104
|
-
// BFCache guard: the back/forward cache can restore a minutes-old page without
|
|
105
|
-
// re-running the server render. If the restored snapshot is stale (or the page
|
|
106
|
-
// came straight from BFCache), revalidate and broadcast so the inline script
|
|
107
|
-
// re-paints — but only when the user isn't mid-search.
|
|
108
|
-
window.addEventListener("pageshow", (event) => {
|
|
109
|
-
const cached = store.getState().defaultFeed;
|
|
110
|
-
if (!cached)
|
|
111
|
-
return;
|
|
112
|
-
const restored = event.persisted;
|
|
113
|
-
if (!restored && Date.now() - cached.fetchedAt <= TTL_MS)
|
|
114
|
-
return;
|
|
115
|
-
fetchFeed("")
|
|
116
|
-
.then((items) => {
|
|
117
|
-
store.getState().setDefaultFeed(items, Date.now());
|
|
118
|
-
window.dispatchEvent(new CustomEvent("vidfarm:discover-feed-updated", { detail: { items } }));
|
|
119
|
-
})
|
|
120
|
-
.catch(() => { });
|
|
121
|
-
});
|
|
122
|
-
window.__vidfarmDiscover = {
|
|
123
|
-
store,
|
|
124
|
-
loadFeed,
|
|
125
|
-
invalidate: () => store.getState().clear()
|
|
126
|
-
};
|
|
127
|
-
// Let the inline script know the bridge is live (it also feature-detects the
|
|
128
|
-
// global directly, so this is just a nudge for anything waiting).
|
|
129
|
-
window.dispatchEvent(new CustomEvent("vidfarm:discover-store-ready"));
|
|
130
|
-
//# sourceMappingURL=discover-client.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createStore } from "zustand/vanilla";
|
|
2
|
-
import { persist, createJSONStorage } from "zustand/middleware";
|
|
3
|
-
/**
|
|
4
|
-
* A vanilla Zustand store (no React needed — the reskin discover page is
|
|
5
|
-
* server-rendered HTML + inline JS) that persists the default feed to
|
|
6
|
-
* sessionStorage. sessionStorage — not localStorage — so the cache dies with
|
|
7
|
-
* the tab and never bleeds a stale feed across sessions.
|
|
8
|
-
*
|
|
9
|
-
* The store is keyed per account (agency multi-account scoping) so switching
|
|
10
|
-
* ?account= never shows another account's cached feed.
|
|
11
|
-
*/
|
|
12
|
-
export function createDiscoverStore(sessionKey) {
|
|
13
|
-
return createStore()(persist((set) => ({
|
|
14
|
-
defaultFeed: null,
|
|
15
|
-
setDefaultFeed: (items, fetchedAt) => set({ defaultFeed: { items, fetchedAt } }),
|
|
16
|
-
clear: () => set({ defaultFeed: null })
|
|
17
|
-
}), {
|
|
18
|
-
name: sessionKey,
|
|
19
|
-
version: 1,
|
|
20
|
-
storage: createJSONStorage(() => sessionStorage)
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=discover-store.js.map
|