Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.
TypeScript agentic-aiaiai-agentsai-videocompilerdslffmpeggenerative-aillmmarkup-languagemonorepoplugin-systemprogramming-languagetext-to-videotypescriptvideovideo-automationvideo-clonevideo-editingvideo-generation
import {
createRuntimeEndpointAdapterFacet,
runtimeConfigCredentialRef,
runtimeConfigActionLimits,
runtimeConfigExact,
runtimeConfigObject,
runtimeConfigPositiveInteger,
runtimeConfigString,
} from "@hypit/runtime-local/extension";
import { createPolloProvider } from "./provider.js";
const adapter = createRuntimeEndpointAdapterFacet({
use: "@hypit/provider-pollo",
activate(context) {
if (context.pool === undefined) throw new Error("Pollo Provider Pool is required");
const config = runtimeConfigObject(context.config, "Pollo");
runtimeConfigExact(config, [
"baseUrl",
"apiKey",
"defaultConcurrency",
"actionLimits",
"pollIntervalMs",
"requestTimeoutMs",
"operationTimeoutMs",
], "Pollo");
const baseUrl = runtimeConfigString(config.baseUrl, "Pollo baseUrl");
if (baseUrl !== undefined) {
const url = new URL(baseUrl);
if (url.protocol !== "https:" && url.hostname !== "localhost" && url.hostname !== "127.0.0.1") {
throw new Error("Pollo baseUrl must use HTTPS or loopback");
}
}
const apiKey = runtimeConfigCredentialRef(config.apiKey, "Pollo apiKey");
if (apiKey === undefined) throw new Error("Pollo apiKey CredentialRef is required");
const actionLimits = runtimeConfigActionLimits(config.actionLimits);
const defaultConcurrency = runtimeConfigPositiveInteger(config.defaultConcurrency, "Pollo defaultConcurrency");
const pollIntervalMs = runtimeConfigPositiveInteger(config.pollIntervalMs, "Pollo pollIntervalMs");
const requestTimeoutMs = runtimeConfigPositiveInteger(config.requestTimeoutMs, "Pollo requestTimeoutMs");
const operationTimeoutMs = runtimeConfigPositiveInteger(config.operationTimeoutMs, "Pollo operationTimeoutMs");
return {
endpoint: createPolloProvider({
instance: context.instance,
pool: context.pool,
...(baseUrl === undefined ? {} : { baseUrl }),
apiKey,
...(defaultConcurrency === undefined ? {} : { defaultConcurrency }),
...(actionLimits === undefined ? {} : { actionLimits }),
...(pollIntervalMs === undefined ? {} : { pollIntervalMs }),
...(requestTimeoutMs === undefined ? {} : { requestTimeoutMs }),
...(operationTimeoutMs === undefined ? {} : { operationTimeoutMs }),
}),
};
},
});
export const hypitPackage = {
format: "hypit.package@1" as const,
facets: [adapter],
};
export default hypitPackage;