Skip to content

armgit / hypit

Public Imported from GitHub
0

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.

732 B
Raw Blame
import {
  createFrontendFacet,
  frontendsFromFacets,
} from "@hypit/facet";
import type {
  FrontendFacet,
  Facet,
} from "@hypit/facet";
import { sourceFrontendPackageAbi } from "@hypit/source";

import type { RunFrontend } from "./types.js";

export type RunFrontendFacet = FrontendFacet<"run", RunFrontend> & {
  readonly abi: typeof sourceFrontendPackageAbi;
};

export function createRunFrontendFacet(frontend: RunFrontend): RunFrontendFacet {
  return createFrontendFacet(sourceFrontendPackageAbi, "run", frontend) as RunFrontendFacet;
}

export function runFrontendsFromFacets(facets: readonly Facet[]): readonly RunFrontend[] {
  return frontendsFromFacets<"run", RunFrontend>(sourceFrontendPackageAbi, "run", facets);
}