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
feat: complete public extension and transparent media paths
kashorin6d5a56c04309
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 79742d2e..f284650d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -4,9 +4,10 @@Pull requests are welcome. Documentation, examples and translations count as much as code.-When creating an original or reconstructed video, if a component has clear, high reuse value across-unrelated videos, you can ask your Agent to move it into Hypit's `packages/` folder, then submit it to-us in a Pull Request. Ordinary one-off components should remain project-local.+Video components normally live in the video project's `packages/` directory. When sharing one across+projects, publish it under your own npm scope or private registry and install a versioned release+through the project's package manager. Proposals for the official Distribution belong in an issue+that explains the shared production need.## Before you start@@ -16,7 +17,7 @@ contract, describe the approach in the issue first.## Set up-You need Node.js 22+ and pnpm 10.33, selected by the root `packageManager` field.+You need Node.js 22.12+ and pnpm 10.33, selected by the root `packageManager` field.```bashcorepack enablediff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.mdindex 786d76b3..a4a93622 100644--- a/CONTRIBUTING.zh-CN.md+++ b/CONTRIBUTING.zh-CN.md@@ -4,7 +4,7 @@欢迎提交 Pull Request。文档、示例和翻译与代码同样重要。-在原创或复刻视频时,只有当你认为 Agent 创作的某个组件在无关项目中也有明确且很高的复用价值时,才可以让 Agent 把它移入 Hypit 仓库的 `packages/` 文件夹,再提交给我们,发起一个 Pull Request。普通的一次性组件应留在项目内部。+视频组件通常保存在视频项目自己的 `packages/` 目录中。需要跨项目共享时,由所有者通过自己的 npm scope 或私有 registry 发布,再由各项目的包管理器安装版本化发行包。希望将能力纳入官方发行时,可以通过 issue 说明它解决的共同制作需求。## 开始之前@@ -12,7 +12,7 @@## 环境准备-需要 Node.js 22+ 和 pnpm 10.33,版本由根目录的 `packageManager` 字段指定。+需要 Node.js 22.12+ 和 pnpm 10.33,版本由根目录的 `packageManager` 字段指定。```bashcorepack enablediff --git a/README.md b/README.mdindex b523a5f4..216628e3 100644--- a/README.md+++ b/README.md@@ -20,7 +20,7 @@<p align="center"><a href="https://github.com/hypit-ai/hypit/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/hypit-ai/hypit?style=flat-square&color=FFD700&logo=github&logoColor=white&label=Stars"></a>- <a href="./package.json"><img alt="Node 22+" src="https://img.shields.io/badge/Node.js-22+-5FA04E?style=flat-square&logo=nodedotjs&logoColor=white"></a>+ <a href="./package.json"><img alt="Node 22.12+" src="https://img.shields.io/badge/Node.js-22.12%2B-5FA04E?style=flat-square&logo=nodedotjs&logoColor=white"></a><a href="./package.json"><img alt="pnpm 10.33" src="https://img.shields.io/badge/pnpm-10.33-F69220?style=flat-square&logo=pnpm&logoColor=white"></a><a href="./package.json"><img alt="TypeScript 5.9" src="https://img.shields.io/badge/TypeScript-5.9-3178C6?style=flat-square&logo=typescript&logoColor=white"></a><a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache--2.0%20with%20conditions-E3B341?style=flat-square"></a>diff --git a/README.zh-CN.md b/README.zh-CN.mdindex 6dd6437b..db036fb4 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -20,7 +20,7 @@<p align="center"><a href="https://github.com/hypit-ai/hypit/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/hypit-ai/hypit?style=flat-square&color=FFD700&logo=github&logoColor=white&label=Stars"></a>- <a href="./package.json"><img alt="Node 22+" src="https://img.shields.io/badge/Node.js-22+-5FA04E?style=flat-square&logo=nodedotjs&logoColor=white"></a>+ <a href="./package.json"><img alt="Node 22.12+" src="https://img.shields.io/badge/Node.js-22.12%2B-5FA04E?style=flat-square&logo=nodedotjs&logoColor=white"></a><a href="./package.json"><img alt="pnpm 10.33" src="https://img.shields.io/badge/pnpm-10.33-F69220?style=flat-square&logo=pnpm&logoColor=white"></a><a href="./package.json"><img alt="TypeScript 5.9" src="https://img.shields.io/badge/TypeScript-5.9-3178C6?style=flat-square&logo=typescript&logoColor=white"></a><a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache--2.0%20with%20conditions-E3B341?style=flat-square"></a>diff --git a/bin/hypit-studio.mjs b/bin/hypit-studio.mjsindex 295c6f2f..8c2ccadd 100755--- a/bin/hypit-studio.mjs+++ b/bin/hypit-studio.mjs@@ -15,16 +15,6 @@ const {installExternalPackageResolution,} = await import("../packages/package-loader-node/src/distribution-resolution.ts");installDistributionPackageResolution([distributionRoot]);-const {- hypitHostPackageRoot,- prepareHostPackages,-} = await import("../packages/runtime-host-node/src/index.ts");-const machinePackages = hypitHostPackageRoot();-installExternalPackageResolution([machinePackages]);-await prepareHostPackages(["[email protected]"], {- root: machinePackages,- onProgress(event) {- if (event.phase === "installing") process.stderr.write(`Installing ${event.specifier} for Studio...\n`);- },-});+const { hypitHostPackageRoot } = await import("../packages/runtime-host-node/src/index.ts");+installExternalPackageResolution([hypitHostPackageRoot()]);await import("../packages/studio/start.ts");diff --git a/examples/minimal-author-package/README.md b/examples/minimal-author-package/README.mdindex 60907a4f..adb1cc93 100644--- a/examples/minimal-author-package/README.md+++ b/examples/minimal-author-package/README.md@@ -1,16 +1,16 @@# Minimal author-package fixture-Use this directory only as the generic author-package fixture. It is deliberately not a complete video-project: the `packages/example-component` package is the authoritative small implementation, while-the package's `preview/` asset demonstrates a Surface preview. The fixture also includes a Style-Surface that reads an SVS Recipe and exact FontStackRef.+The `packages/example-component` directory contains a small complete Author Package. Its `preview/`+asset demonstrates a Surface preview, and its Style Surface reads an SVS Recipe and exact FontStackRef.+The Distribution includes these sources. The package README explains copying it into a video project,+selecting a released Hypit development dependency, compiling it and sharing its tarball.The fixture's Surface decoder also demonstrates the public value boundary: Style-like values consumea decoded recipe shaped as `{ path, properties }`, exact `FontStackRef` records and inline valuesonly after checking `record.value.kind === "inline"`. Media slots remain graph inputs rather thanpackage files.-The package builds against the single public `hypit` development dependency and emits JavaScript.+The package builds against one public Hypit framework dependency, `hypit`, and emits JavaScript.`pnpm --dir packages/example-component pack` produces a tarball with no Runtime dependencies of itsown. Installing that tarball in another project and importing `@example/example-component@1` loadsthe same Module and Surface through the consumer's active Hypit Distribution. The packageddiff --git a/examples/minimal-author-package/packages/example-component/README.md b/examples/minimal-author-package/packages/example-component/README.mdindex 24e5cb35..78b45e4b 100644--- a/examples/minimal-author-package/packages/example-component/README.md+++ b/examples/minimal-author-package/packages/example-component/README.md@@ -1,16 +1,15 @@# Example component fixture-This is the smallest complete author-package fixture. It is the canonical generic-package reference,-not a production component or a video example. Framework-facing imports come from-`hypit/author-kit`; video-domain imports use their owning `hypit/*` subpaths. The package has one-development dependency on the released Hypit Distribution and no Runtime dependency bundled into-its tarball.+A small complete package for learning Manifest, Surface, Fragment, Producer and activation wiring. Framework-facing imports come from+`hypit/author-kit`; video-domain imports use their owning `hypit/*` subpaths. Its only Hypit+framework dependency is the released `hypit` Distribution; TypeScript and Node types are ordinary+build tooling. No Runtime dependency is bundled into its tarball.It contains a Module Manifest with nominal Types and deterministic Producers, validators, a structuredSurface decoder returning `records`, `components`, `fragments` and `exports`, and sealed Fragments withliteral `fragment-input`, `fragment-operation` and `output` references. `src/temporal.ts` shows the-Surface-side `@hypit/temporal-markup` Window/Moment projections; that package is distinct from the-graph-side `@hypit/temporal` Producers.+Surface-side `hypit/temporal-markup` Window/Moment projections; that package is distinct from the+graph-side `hypit/temporal` Producers.The Surfaces demonstrate a box, a text surface, a media slot and a Style decoder. The slot is a graphinput; it is not a file bundled by the package. `preview/Box.png` is a real catalogue frame supplied@@ -22,3 +21,24 @@ and use its owner-scoped package name. If the owner chooses to share it, compilepackage through npm or a private registry. Consumers install a chosen release with their ordinarypackage manager and commit the resulting lockfile. The Source's logical Module import remains thesame whether the package is linked from the project workspace or installed from a registry.++## Use the included source outside the Hypit repository++Copy this directory into the video project's `packages/` and give the package and Module the owner's+name. The checked-in fixture's `workspace:*` dependency connects it to the repository during Hypit+development. In the copied package, replace that development dependency with the selected release:++```bash+npm install --save-dev hypit@<selected-release>+npm run build+npm pack+```++If the selected Distribution was supplied as a tarball, use its path in the install command instead.+Installing it as a development dependency supplies public types; the consumer's active Hypit+Distribution supplies the runtime APIs. The resulting component tarball contains its own built code+and preview assets. For registry publication, select a release version and remove the fixture's+`private: true` after the owner chooses to publish it.++The active Distribution's `packages/ranking/README.md` is the richer example for semantic input+projection, persistent visual state and a Companion. Its README and source ship with that Distribution.diff --git a/examples/minimal-author-package/packages/example-component/package.json b/examples/minimal-author-package/packages/example-component/package.jsonindex b35339f0..3075ee9e 100644--- a/examples/minimal-author-package/packages/example-component/package.json+++ b/examples/minimal-author-package/packages/example-component/package.json@@ -12,12 +12,15 @@".": "./dist/index.js","./preview": "./preview/preview.svml"},- "hypit": { "activation": "./dist/activation.js" },+ "hypit": {+ "activation": "./dist/activation.js"+ },"scripts": {"build": "tsc -p tsconfig.json",- "prepack": "pnpm build"+ "prepack": "npm run build"},"devDependencies": {+ "@types/node": "24.10.1","hypit": "workspace:*","typescript": "5.9.3"}diff --git a/package.json b/package.jsonindex ef7f1d67..3fb38f5a 100644--- a/package.json+++ b/package.json@@ -5,18 +5,86 @@"license": "SEE LICENSE IN LICENSE","type": "module","exports": {- "./artifact": "./packages/artifact/src/index.ts",- "./author-kit": "./packages/author-kit/src/index.ts",- "./composition": "./packages/composition/src/index.ts",- "./media": "./packages/media/src/index.ts",- "./program-space": "./packages/program-space/src/index.ts",- "./semantic-track": "./packages/semantic-track/src/index.ts",- "./spatial": "./packages/spatial/src/index.ts",- "./studio-adapter": "./packages/studio-adapter/src/index.ts",- "./svs": "./packages/svs/src/index.ts",- "./temporal": "./packages/temporal/src/index.ts",- "./temporal-markup": "./packages/temporal-markup/src/index.ts",- "./visual-ir": "./packages/visual-ir/src/index.ts"+ "./artifact": {+ "types": "./dist/public/artifact.d.ts",+ "import": "./packages/artifact/src/index.ts"+ },+ "./author-kit": {+ "types": "./dist/public/author-kit.d.ts",+ "import": "./packages/author-kit/src/index.ts"+ },+ "./caption": {+ "types": "./dist/public/caption.d.ts",+ "import": "./packages/caption/src/index.ts"+ },+ "./composition": {+ "types": "./dist/public/composition.d.ts",+ "import": "./packages/composition/src/index.ts"+ },+ "./endpoint-kit": {+ "types": "./dist/public/endpoint-kit.d.ts",+ "import": "./packages/endpoint-kit/src/index.ts"+ },+ "./generation": {+ "types": "./dist/public/generation.d.ts",+ "import": "./packages/generation/src/index.ts"+ },+ "./media": {+ "types": "./dist/public/media.d.ts",+ "import": "./packages/media/src/index.ts"+ },+ "./model-kit": {+ "types": "./dist/public/model-kit.d.ts",+ "import": "./packages/model-kit/src/index.ts"+ },+ "./narrative": {+ "types": "./dist/public/narrative.d.ts",+ "import": "./packages/narrative/src/index.ts"+ },+ "./program-space": {+ "types": "./dist/public/program-space.d.ts",+ "import": "./packages/program-space/src/index.ts"+ },+ "./runtime-kit": {+ "types": "./dist/public/runtime-kit.d.ts",+ "import": "./packages/runtime-kit/src/index.ts"+ },+ "./semantic-track": {+ "types": "./dist/public/semantic-track.d.ts",+ "import": "./packages/semantic-track/src/index.ts"+ },+ "./spatial": {+ "types": "./dist/public/spatial.d.ts",+ "import": "./packages/spatial/src/index.ts"+ },+ "./speech": {+ "types": "./dist/public/speech.d.ts",+ "import": "./packages/speech/src/index.ts"+ },+ "./studio-adapter": {+ "types": "./dist/public/studio-adapter.d.ts",+ "import": "./packages/studio-adapter/src/index.ts"+ },+ "./svs": {+ "types": "./dist/public/svs.d.ts",+ "import": "./packages/svs/src/index.ts"+ },+ "./temporal": {+ "types": "./dist/public/temporal.d.ts",+ "import": "./packages/temporal/src/index.ts"+ },+ "./temporal-markup": {+ "types": "./dist/public/temporal-markup.d.ts",+ "import": "./packages/temporal-markup/src/index.ts"+ },+ "./text": {+ "types": "./dist/public/text.d.ts",+ "import": "./packages/text/src/index.ts"+ },+ "./visual-ir": {+ "types": "./dist/public/visual-ir.d.ts",+ "import": "./packages/visual-ir/src/index.ts"+ }},"bin": {"hypit": "./bin/hypit.mjs",@@ -25,6 +93,7 @@"packageManager": "[email protected]","files": ["bin",+ "dist/public/**/*.d.ts","packages/*/src/**/*","packages/*/bin/**/*","packages/*/runtime/**/*",@@ -45,11 +114,18 @@"services/whisperx/src/**/*.py","docs/public/hypit-logo-dark.svg","docs/public/hypit-logo-light.svg",+ "examples/minimal-author-package/README.md",+ "examples/minimal-author-package/packages/*/package.json",+ "examples/minimal-author-package/packages/*/tsconfig.json",+ "examples/minimal-author-package/packages/*/README.md",+ "examples/minimal-author-package/packages/*/src/**/*",+ "examples/minimal-author-package/packages/*/preview/**/*","README.md","README.zh-CN.md","LICENSE"],"scripts": {+ "build:public-types": "node scripts/build-public-types.mjs","check": "tsc -p tsconfig.json --noEmit","docs:dev": "vitepress dev docs","docs:build": "vitepress build docs",@@ -58,23 +134,22 @@"test:whisperx-service": "uv run --project services/whisperx --frozen python -m unittest discover -s services/whisperx/tests -p \"test_*.py\"","test:image-opencv": "node test/run.mjs image-opencv","hypit": "node bin/hypit.mjs",- "studio": "pnpm --filter @hypit/studio exec node --import tsx start.ts"+ "studio": "pnpm --filter @hypit/studio exec node --import tsx start.ts",+ "prepare": "npm run build:public-types"},"engines": {- "node": ">=22"+ "node": ">=22.12.0"},"devDependencies": {"@hypit/artifact": "workspace:*",+ "@hypit/audio-track": "workspace:*",+ "@hypit/audio-track-studio": "workspace:*","@hypit/author-kit": "workspace:*",- "@hypit/resource-store-fs": "workspace:*",- "@hypit/resource-store-s3": "workspace:*",+ "@hypit/background-removal": "workspace:*","@hypit/build-result": "workspace:*","@hypit/build-result-fs": "workspace:*","@hypit/build-result-kit": "workspace:*","@hypit/build-result-s3": "workspace:*",- "@hypit/audio-track": "workspace:*",- "@hypit/audio-track-studio": "workspace:*",- "@hypit/background-removal": "workspace:*","@hypit/caption": "workspace:*","@hypit/caption-fine": "workspace:*","@hypit/caption-fine-studio": "workspace:*",@@ -89,8 +164,8 @@"@hypit/film": "workspace:*","@hypit/film-studio": "workspace:*","@hypit/fonts-open": "workspace:*",- "@hypit/generation": "workspace:*","@hypit/gemini": "workspace:*",+ "@hypit/generation": "workspace:*","@hypit/gpt-image": "workspace:*","@hypit/gpt-image-kits": "workspace:*","@hypit/grok-imagine": "workspace:*",@@ -110,17 +185,19 @@"@hypit/protocol": "workspace:*","@hypit/provider-hyperframes-aws-lambda": "workspace:*","@hypit/provider-hyperframes-local": "workspace:*",- "@hypit/provider-image-opencv-local": "workspace:*","@hypit/provider-hypihub": "workspace:*",+ "@hypit/provider-image-opencv-local": "workspace:*","@hypit/provider-kie": "workspace:*",- "@hypit/provider-vertex": "workspace:*","@hypit/provider-media-local": "workspace:*",+ "@hypit/provider-vertex": "workspace:*","@hypit/provider-whisperx-local": "workspace:*","@hypit/provider-xiaomi-mimo": "workspace:*","@hypit/ranking": "workspace:*","@hypit/ranking-studio": "workspace:*","@hypit/raster": "workspace:*","@hypit/render-hyperframes": "workspace:*",+ "@hypit/resource-store-fs": "workspace:*",+ "@hypit/resource-store-s3": "workspace:*","@hypit/run-markup": "workspace:*","@hypit/runtime-host-node": "workspace:*","@hypit/runtime-kit": "workspace:*",@@ -132,15 +209,15 @@"@hypit/seedance": "workspace:*","@hypit/seedance-kits": "workspace:*","@hypit/seedream": "workspace:*",- "@hypit/semantic-track": "workspace:*","@hypit/semantic-take-estimate": "workspace:*",+ "@hypit/semantic-track": "workspace:*","@hypit/spatial": "workspace:*",- "@hypit/stand-in": "workspace:*","@hypit/speech": "workspace:*","@hypit/speech-alignment": "workspace:*","@hypit/speech-evidence": "workspace:*","@hypit/speech-track": "workspace:*","@hypit/speech-track-studio": "workspace:*",+ "@hypit/stand-in": "workspace:*","@hypit/store-sqlite": "workspace:*","@hypit/studio-adapter": "workspace:*","@hypit/svs": "workspace:*",@@ -150,12 +227,18 @@"@hypit/typography-track": "workspace:*","@hypit/typography-track-studio": "workspace:*","@hypit/visual-ir": "workspace:*",+ "@hypit/volcengine-matting": "workspace:*","@hypit/whisperx": "workspace:*",+ "@rollup/plugin-node-resolve": "16.0.3","@types/node": "24.10.1",- "typescript": "5.9.3",+ "rollup": "4.62.4",+ "rollup-plugin-dts": "6.2.3","vitepress": "^1.6.4"},"dependencies": {- "tsx": "4.21.0"+ "cmu-pronouncing-dictionary": "3.0.0",+ "tsx": "4.21.0",+ "typescript": "5.9.3",+ "vite": "8.2.2"}}diff --git a/packages/author-kit/README.md b/packages/author-kit/README.mdindex 905b3282..a119746e 100644--- a/packages/author-kit/README.md+++ b/packages/author-kit/README.md@@ -19,8 +19,13 @@ own built files and assets. At execution time the active Hypit Distribution supppublic subpaths. This keeps one framework implementation in the process and prevents a componenttarball from carrying private copies of Core.-The minimal independent fixture is+The Distribution includes the small package example at[`examples/minimal-author-package/packages/example-component`](../../examples/minimal-author-package/packages/example-component).-It can remain a project workspace package, or its owner can publish the same package name and install-that release in another project through npm or a private registry. Neither path changes the logical-Module import written by the Source.+Copy it into the video's `packages/`, give it the owner's package and Module name, and follow its+README to select the installed Hypit release as its development dependency. It includes the Manifest,+Surface, Fragment, Producer, activation, preview and TypeScript build configuration. It can stay in+the project or be packed and installed in another project without changing its logical Module import.++For a component that follows speech, [Ranking](../ranking/README.md) traces the complete semantic+path from a Selection or Moment through projection, schedule and drawing to a Studio Companion.+Its implementation illustrates those relationships; a new component owns its own visual behavior.diff --git a/packages/background-removal/README.md b/packages/background-removal/README.mdindex 6c9ce97a..15708ce9 100644--- a/packages/background-removal/README.md+++ b/packages/background-removal/README.md@@ -1,9 +1,29 @@# @hypit/background-removalDeclares one external image capability: turn an input image into an image with its background removed.+Use it for a product, portrait or graphic that will be composited over another picture.```xml+<import as="remove" from="@hypit/background-removal@1"/><remove:Background id="cutout" source={portrait.image}/>```-The package does not choose a model, API, threshold, queue, or storage service. Those belong to the selected Endpoint. `@hypit/provider-kie` can fulfill this capability with KIE Recraft; another runtime may bind a local model without changing the author graph.+`source` accepts an image BlobArtifact, including an ordinary image file declaration or a generated+image Output. `{cutout.image}` publishes one image BlobArtifact with transparency. Keep its actual+dimensions when placing it in Media Track, or use Image Compose when a flattened still is wanted.++The package declares the visual operation; the selected Endpoint implements it. The existing+`@hypit/provider-kie` route uses+[KIE Recraft Remove Background](https://docs.kie.ai/market/recraft/remove-background), sending+`model: "recraft/remove-background"` and `input.image`. It follows the ordinary submit, poll and+collect lifecycle and expects one image result. Another Provider can fulfill the same capability+without changing the Source. This operation therefore needs no separate Recraft-specific author+Model to use the existing KIE implementation.++For a moving portrait, [Volcengine Matting](../volcengine-matting/README.md) provides+`<matte:Portrait source={performance.video}/>` through HypiHub. Normalize its processed video+before using it in a track.++This capability handles still images. Moving-person background removal requires a video-capable+operation and a result that preserves the changing silhouette and frame correspondence. Removing+one portrait's background does not remove the background of a subsequently generated performance.diff --git a/packages/caption/README.md b/packages/caption/README.mdindex ceb1f9f3..b872989d 100644--- a/packages/caption/README.md+++ b/packages/caption/README.md@@ -1,5 +1,9 @@# `@hypit/caption`+External components use `hypit/caption` from their `hypit` development dependency. The package+owns the types and helpers below; Source imports retain the `@hypit/caption@1` Module identity.++The deterministic Caption contract. Script emits one `CaptionDocument` containing display words,N:M alignment units and authored `||` cue breaks. Caption applies Styles to complete units selectedby a Role or a semantic Selection, then joins those units to a `SemanticTrack` for frame timing.diff --git a/packages/endpoint-kit/README.md b/packages/endpoint-kit/README.mdindex 5cc67128..f6868088 100644--- a/packages/endpoint-kit/README.md+++ b/packages/endpoint-kit/README.md@@ -1,7 +1,24 @@-# `@hypit/endpoint-kit`+# `hypit/endpoint-kit`SDK for packages that fulfill exact external capabilities.+External Provider packages import this public subpath from the `hypit` Distribution. Use `hypit` as+a development dependency, compile the Provider to JavaScript, and ship its code plus any ordinary+runtime dependencies. The active Distribution supplies this API when loading the package.+No Hypit checkout is needed to develop or install the extension.++```ts+import { defineEndpointPackage } from "hypit/endpoint-kit";+import type { AsyncEndpoint, CredentialRef, EndpointRequest } from "hypit/endpoint-kit";+import { generationTypes, compileWireRequest, sealGeneratedImageSet } from "hypit/generation";+```++For an existing model, name its exact versioned Capability and expected result Type. Map its request+ports into the service's wire format; the Provider need not import the model's implementation.+`hypit/generation` supplies the common generated-media values and optional wire-mapping helpers.+One Provider can implement multiple capabilities, and another Provider can implement those same+capabilities. The Profile selects the implementation used by a project.+An endpoint can call a vendor API, local process, Lambda function, device or human service. Anendpoint package declares the capabilities it fulfills, its result types, credentials and schedulinglimits, then installs handlers into a Host registrar.diff --git a/packages/endpoint-kit/src/index.ts b/packages/endpoint-kit/src/index.tsindex 21c3033d..79b6fa06 100644--- a/packages/endpoint-kit/src/index.ts+++ b/packages/endpoint-kit/src/index.ts@@ -19,6 +19,18 @@ import type {} from "@hypit/runtime";import { capacityUnits, verifyCredentialRef } from "@hypit/runtime";+export type { CanonicalValue, CapabilityRef, ModuleRef, StoredValue, TypeRef } from "@hypit/protocol";+export type {+ CapacityResourceClaim,+ CredentialAcquisition,+ CredentialRef,+ CredentialValue,+ OperationFailure,+ OperationProgress,+ OperationReceipt,+ ResourceStore,+} from "@hypit/runtime";+export type Awaitable<T> = T | Promise<T>;export type EndpointFulfillment = {diff --git a/packages/generation/README.md b/packages/generation/README.mdindex 41d70732..9d8b53e3 100644--- a/packages/generation/README.md+++ b/packages/generation/README.md@@ -1,7 +1,12 @@-# `@hypit/generation`+# `hypit/generation`Provider-neutral generated-media contracts shared by exact image, video and audio model packages.+External Model and Provider packages import this public subpath from the `hypit` Distribution.+It gives both sides the same request and result vocabulary without a dependency between their+implementations. `sealGenerationPortTable` describes a model's inputs; `GenerationWireMapping` and+`compileWireRequest` can translate those inputs to one Provider's documented wire fields.+The package owns `GenerationRequest`, `GeneratedImageSet` and `GeneratedVideoSet` identities,schemas, validators and graph facets. Generated sets are atomic Products: a Provider persists thereturned bytes in an ResourceStore and returns typed Blob references rather than transient URLs.diff --git a/packages/media-execution/src/execute.ts b/packages/media-execution/src/execute.tsindex 99459daf..90611c0a 100644--- a/packages/media-execution/src/execute.ts+++ b/packages/media-execution/src/execute.ts@@ -618,6 +618,32 @@ export async function executeInspectMedia(}}+async function sourceVideoEncoding(env: MediaExecutionEnvironment, path: string, streamIndex: number) {+ const bytes = await runProcess({+ executable: env.ffprobePath,+ argv: ["-v", "error", "-print_format", "json", "-show_streams", "-show_pixel_formats", path],+ timeoutMs: env.processTimeoutMs, maxStdoutBytes: env.maxProbeOutputBytes,+ ...(env.sharedLibraryPath === undefined ? {} : { sharedLibraryPath: env.sharedLibraryPath }),+ });+ const probe = JSON.parse(Buffer.from(bytes).toString("utf8")) as {+ streams: { index: number; codec_name?: string; pix_fmt?: string; tags?: Record<string, string> }[];+ pixel_formats: { name: string; flags: { alpha: number } }[];+ };+ const stream = probe.streams.find((item) => item.index === streamIndex);+ assert(stream !== undefined, `Media source has no video stream ${streamIndex}`);+ const pixelFormat = probe.pixel_formats.find((item) => item.name === stream.pix_fmt);+ assert(pixelFormat !== undefined, `Media source pixel format ${String(stream.pix_fmt)} is unknown`);+ const alphaTag = Object.entries(stream.tags ?? {}).find(([key]) => key.toLowerCase() === "alpha_mode")?.[1];+ const alpha = pixelFormat.flags.alpha === 1 || alphaTag === "1" || alphaTag === "straight";+ // FFmpeg's native VP8/VP9 decoders discard the WebM alpha sidecar.+ const decoder = !alpha ? undefined+ : stream.codec_name === "vp9" ? "libvpx-vp9" : stream.codec_name === "vp8" ? "libvpx" : undefined;+ return {+ alpha,+ inputArgs: decoder === undefined ? [] : [`-c:${streamIndex}`, decoder],+ };+}+export async function executeNormalizeMedia(env: MediaExecutionEnvironment,constraints: CanonicalValue,@@ -635,7 +661,11 @@ export async function executeNormalizeMedia(let visualWidth: number | undefined;let visualHeight: number | undefined;if (plan.video !== undefined) {- const output = join(work, "visual.mp4");+ const encoding = animation === undefined+ ? await sourceVideoEncoding(env, input, plan.video.index)+ : { alpha: true, inputArgs: [] };+ const outputType = encoding.alpha ? "video/webm" : "video/mp4";+ const output = join(work, encoding.alpha ? "visual.webm" : "visual.mp4");const fps = `${need.frameRate.numerator}/${need.frameRate.denominator}`;const filter = ["setpts=PTS-STARTPTS",@@ -649,20 +679,24 @@ export async function executeNormalizeMedia("setsar=1",].join(",");const visualInput = animation === undefined- ? ["-autorotate", "-i", input, "-map", `0:${plan.video.index}`]+ ? [...encoding.inputArgs, "-autorotate", "-i", input, "-map", `0:${plan.video.index}`]: ["-f", "concat", "-safe", "0", "-i", await animatedWebpConcat(env, animation, work), "-map", "0:v:0"];+ // The execution format must retain the source's alpha while materializing+ // the program clock. Both encodings publish the same SynchronizedMedia type.+ const encoderArgs = encoding.alpha+ ? ["-c:v", "libvpx-vp9", "-pix_fmt", "yuva420p", "-lossless", "1", "-auto-alt-ref", "0"]+ : ["-c:v", "libx264", "-preset", "veryfast", "-pix_fmt", "yuv420p", "-movflags", "+faststart"];await runProcess({executable: env.ffmpegPath,argv: ["-y", ...visualInput, "-an", "-vf", filter,- "-frames:v", String(plan.frameCount), "-fps_mode", "cfr", "-c:v", "libx264",- "-preset", "veryfast", "-pix_fmt", "yuv420p", "-movflags", "+faststart", output],+ "-frames:v", String(plan.frameCount), "-fps_mode", "cfr", ...encoderArgs, output],timeoutMs: env.processTimeoutMs,maxStdoutBytes: 64 * 1024,...(env.sharedLibraryPath === undefined ? {} : { sharedLibraryPath: env.sharedLibraryPath }),});const inspected = await outputInspection({path: output,- mediaType: "video/mp4",+ mediaType: outputType,ffprobePath: env.ffprobePath,timeoutMs: env.processTimeoutMs,maxProbeOutputBytes: env.maxProbeOutputBytes,@@ -674,7 +708,7 @@ export async function executeNormalizeMedia(assert(visual.sampleAspectRatio.numerator === 1 && visual.sampleAspectRatio.denominator === 1&& visual.rotationDegrees === 0,"Normalized visual retains non-square samples or display rotation");- visualArtifact = await env.artifacts.putFile(output, "video/mp4");+ visualArtifact = await env.artifacts.putFile(output, outputType);visualWidth = visual.width;visualHeight = visual.height;}@@ -1045,6 +1079,7 @@ export async function executeExtractFrame(const input = join(work, "source.bin");const output = join(work, "frame.png");await stageArtifact(env, need.source, input);+ const encoding = await sourceVideoEncoding(env, input, need.streamIndex);const selection = need.at.kind === "first"? "eq(n\\,0)": need.at.kind === "last"@@ -1055,7 +1090,7 @@ export async function executeExtractFrame(await runProcess({executable: env.ffmpegPath,argv: [- "-y", "-i", input, "-map", `0:${need.streamIndex}`, "-an",+ "-y", ...encoding.inputArgs, "-i", input, "-map", `0:${need.streamIndex}`, "-an","-vf", `setpts=PTS-STARTPTS,select=${selection}`,"-frames:v", "1", "-fps_mode", "vfr", "-c:v", "png", output,],diff --git a/packages/media-execution/test/alpha.test.ts b/packages/media-execution/test/alpha.test.tsnew file mode 100644index 00000000..5898b57e--- /dev/null+++ b/packages/media-execution/test/alpha.test.ts@@ -0,0 +1,50 @@+import assert from "node:assert/strict";+import test from "node:test";+import { mkdtemp, rm } from "node:fs/promises";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { MemoryResourceStore, alphaSize, ffmpegBytes, normalizeTestVideo, testMediaEnvironment, transparentVideoFixture, writeTestArtifact } from "../../../test/alpha-video-fixture.js";+import { executeExtractFrame } from "../src/index.js";+import { canonicalize } from "@hypit/protocol";++for (const format of ["webm", "webm-vp8", "mov"] as const) {+ test(`Normalize preserves transparent and translucent pixels, motion and audio from ${format}`, async () => {+ const directory = await mkdtemp(join(tmpdir(), "hypit-alpha-normalize-"));+ try {+ const resources = new MemoryResourceStore();+ const fixture = await transparentVideoFixture(directory, format);+ const source = await resources.put(fixture.bytes, fixture.mediaType);+ const media = await normalizeTestVideo(resources, source, true);+ assert.equal(media.visual!.artifact.mediaType, "video/webm");+ assert.equal(media.timeline.frameCount, 12);+ const visual = await writeTestArtifact(resources, media.visual!.artifact, join(directory, "normalized.webm"));+ const pixels = ffmpegBytes(["-c:v", "libvpx-vp9", "-i", visual, "-an", "-pix_fmt", "rgba", "-f", "rawvideo", "pipe:1"]);+ const stride = alphaSize.width * alphaSize.height * 4;+ assert.equal(pixels.length, stride * 12);+ const alpha = (f: number, x: number, y: number) => pixels[f * stride + (y * alphaSize.width + x) * 4 + 3]!;+ for (let f = 0; f < 12; f++) {+ assert.equal(alpha(f, 4, 4), 0);+ assert.equal(alpha(f, 32, 32), 255);+ assert.ok(Math.abs(alpha(f, 60, 32) - 128) <= 1);+ }+ assert.equal(alpha(0, 18, 32), 255);+ assert.equal(alpha(11, 18, 32), 0);+ const extracted = await executeExtractFrame(testMediaEnvironment(resources), canonicalize({+ source: media.visual!.artifact, streamIndex: 0, sourceFrameCount: 12,+ at: { kind: "first" }, output: { format: "png" },+ }));+ assert.equal(extracted.value.kind, "blob");+ const still = await writeTestArtifact(resources, extracted.value, join(directory, "extracted.png"));+ const stillPixels = ffmpegBytes(["-i", still, "-pix_fmt", "rgba", "-f", "rawvideo", "pipe:1"]);+ assert.equal(stillPixels[(4 * alphaSize.width + 4) * 4 + 3], 0);+ assert.equal(stillPixels[(32 * alphaSize.width + 32) * 4 + 3], 255);+ const audio = await writeTestArtifact(resources, media.audio!.artifact, join(directory, "normalized.wav"));+ const samples = ffmpegBytes(["-i", audio, "-f", "s16le", "pipe:1"]);+ assert.equal(samples.length, 48_000 * 2 * 2);+ assert.ok(samples.some((value) => value !== 0));+ const broll = await normalizeTestVideo(resources, source, false);+ assert.equal(broll.audio, undefined);+ assert.equal(broll.visual!.artifact.mediaType, "video/webm");+ } finally { await rm(directory, { recursive: true, force: true }); }+ });+}diff --git a/packages/media-pipeline/README.md b/packages/media-pipeline/README.mdindex 16ca060c..1f9b4447 100644--- a/packages/media-pipeline/README.md+++ b/packages/media-pipeline/README.md@@ -27,6 +27,11 @@ optional visual Artifact plus intrinsic extent, and optional audio Artifact. Strauthority choice and the trim/pad ledger remain in Selection and execution instead of travellingthrough every consumer.+Normalization preserves transparency in the selected visual stream. The executing Provider owns+the intermediate encoding; both opaque and transparent pictures use the same SynchronizedMedia+value. A later SemanticTake adds Script timing while retaining that prepared media. A visual+overlay can instead enter Media Track directly.+This package is the shared execution vocabulary. Speech authoring makes the boundary explicit:`<pipeline:Normalize>` produces one `SynchronizedMedia`, then a speech provider and deterministicalignment produce one `SemanticTake`. Media Track consumes that prepared value; it never owns andiff --git a/packages/model-kit/README.md b/packages/model-kit/README.mdindex cd24cabd..d606b420 100644--- a/packages/model-kit/README.md+++ b/packages/model-kit/README.md@@ -1,8 +1,50 @@-# `@hypit/model-kit`+# `hypit/model-kit`Author-model package helper for defining exact generated-media requests without repeating thenominal Type → Producer → Need → Graph Fragment shell.+An external model package develops against the public `hypit/model-kit`, `hypit/generation`, and+`hypit/author-kit` subpaths. The released `hypit` Distribution is its framework development+dependency; the model ships its own compiled JavaScript, Sources, and assets.++## Declare the authored request++For example, a model's request can have one prompt and a chosen output shape:++```ts+import { defineExactModelModule } from "hypit/model-kit";+import { sealGenerationPortTable } from "hypit/generation";++const ports = sealGenerationPortTable({+ model: "studio-image-v1",+ result: "image",+ ports: [+ { name: "prompt", value: { kind: "text" }, minItems: 1, maxItems: 1 },+ { name: "aspectRatio", value: { kind: "enum", values: ["1:1", "9:16"] }, minItems: 1, maxItems: 1 },+ ],+ requires: [],+});++export const model = defineExactModelModule({+ module: { name: "@studio/image-model", version: "1" },+ endpoints: [{ key: "image", requestTypeName: "ImageRequest", producerName: "generate-image", ports }],+});+```++The model name, ports, supported values, and cardinalities above are illustrative; declare the actual+model's author-visible semantics. A service-specific subset belongs in its Provider's `supports`.+Adding a new service for this request leaves the Model unchanged.++The definition supplies the Module Manifest, component handlers, exact-model Host facet, and each+endpoint's request Types and generation Fragment. Export the Manifest in the package activation's+`modules`, the component in `components`, and its Host facet in `hostFacets`. An Author Surface uses+`hypit/author-kit` to read Source and connects authored Text and media edges through+`createExactModelPrimaryGenerationFragment`. It publishes the resulting image, video, or audio as a+normal Output. See the public function types for the returned values and Fragment inputs.++The Model declares the Need; a separately selected Provider must implement its exact Capability and+result Type. Source selects the Model, while the Runtime Profile selects the Provider Endpoint.+`defineExactModelModule` does not make model requests generic. The calling package still owns itsexact fields, constraints, model identity, capability name and validator. The helper adds noProvider routing, fallback, credentials or Runtime authority.diff --git a/packages/narrative/README.md b/packages/narrative/README.mdindex 91c74f63..0c66025c 100644--- a/packages/narrative/README.md+++ b/packages/narrative/README.md@@ -1,3 +1,7 @@# `@hypit/narrative`+External components use `hypit/narrative` from their `hypit` development dependency. The package+owns the types and helpers below; Source imports retain the `@hypit/narrative@1` Module identity.++Public, provider-neutral contracts for authored speech and semantic selections.diff --git a/packages/package-loader-node/src/distribution-resolution.ts b/packages/package-loader-node/src/distribution-resolution.tsindex 5fdb112b..7c748f36 100644--- a/packages/package-loader-node/src/distribution-resolution.ts+++ b/packages/package-loader-node/src/distribution-resolution.ts@@ -51,11 +51,22 @@ function distributionPublicEntry(root: string, specifier: string): string | undeconst manifestPath = join(root, "package.json");const manifest = JSON.parse(readFileSync(manifestPath, "utf8")) as {readonly name?: string;- readonly exports?: Readonly<Record<string, string>>;+ readonly exports?: Readonly<Record<string, string | {+ readonly import?: string;+ readonly default?: string;+ }>>;};if (manifest.name !== "hypit") return undefined;const declared = manifest.exports?.[`./${specifier.slice("hypit/".length)}`];- return declared === undefined ? undefined : resolve(root, declared);+ const target = typeof declared === "string" ? declared : declared?.import ?? declared?.default;+ return target === undefined ? undefined : resolve(root, target);+}++/** Resolve one import owned by an explicit Hypit Distribution. */+export function resolveDistributionPackageImport(root: string, specifier: string): string | undefined {+ if (specifier.startsWith("@hypit/")) return distributionPackageEntry(resolve(root), specifier);+ if (specifier.startsWith("hypit/")) return distributionPublicEntry(resolve(root), specifier);+ return undefined;}/**@@ -85,9 +96,7 @@ export function installDistributionPackageResolution(roots: readonly string[]):// Try the explicit Distribution resolvers below.}for (const root of installed) {- const entry = specifier.startsWith("@hypit/")- ? distributionPackageEntry(root, specifier)- : distributionPublicEntry(root, specifier);+ const entry = resolveDistributionPackageImport(root, specifier);if (entry !== undefined) return { url: pathToFileURL(entry).href, shortCircuit: true };}throw new Error(`Active Hypit Distribution does not provide ${specifier}`);diff --git a/packages/package-loader-node/src/index.ts b/packages/package-loader-node/src/index.tsindex 3617eff7..f42e074e 100644--- a/packages/package-loader-node/src/index.ts+++ b/packages/package-loader-node/src/index.ts@@ -11,6 +11,7 @@ export {export {installDistributionPackageResolution,installExternalPackageResolution,+ resolveDistributionPackageImport,} from "./distribution-resolution.js";export {locateNodePackage,diff --git a/packages/package-loader-node/src/loader.ts b/packages/package-loader-node/src/loader.tsindex c188f4a5..14ca7f29 100644--- a/packages/package-loader-node/src/loader.ts+++ b/packages/package-loader-node/src/loader.ts@@ -175,15 +175,15 @@ export class NodePackageSelectionMissingError extends Error {/*** Resolve the ordinary upstream npm dependencies of Distribution packages.- * Internal @hypit dependencies are followed to their manifests; no project- * package is copied into the machine dependency home.+ * Internal @hypit dependencies are followed to their manifests. Other selected+ * packages belong to their project's package manager, including their dependencies.*/export async function distributionExternalPackageRequirements(specifiers: readonly string[],distributionRoot: string,): Promise<readonly { readonly name: string; readonly version: string; readonly specifier: string }[]> {const root = resolve(distributionRoot);- const queue = [...new Set(specifiers)].sort();+ const queue = [...new Set(specifiers.filter((name) => name.startsWith("@hypit/")))].sort();const visited = new Set<string>();const external = new Map<string, string>();while (queue.length > 0) {diff --git a/packages/package-loader-node/test/distribution-resolution.test.ts b/packages/package-loader-node/test/distribution-resolution.test.tsindex 67cccf81..8dee1467 100644--- a/packages/package-loader-node/test/distribution-resolution.test.ts+++ b/packages/package-loader-node/test/distribution-resolution.test.ts@@ -1,7 +1,24 @@import assert from "node:assert/strict";import test from "node:test";-import { installDistributionPackageResolution } from "../src/distribution-resolution.js";+import { resolve } from "node:path";++import {+ installDistributionPackageResolution,+ resolveDistributionPackageImport,+} from "../src/distribution-resolution.js";++test("one Distribution resolves its internal and public package spellings", () => {+ assert.equal(+ resolveDistributionPackageImport(process.cwd(), "@hypit/svs"),+ resolve(process.cwd(), "packages/svs/src/index.ts"),+ );+ assert.equal(+ resolveDistributionPackageImport(process.cwd(), "hypit/svs"),+ resolve(process.cwd(), "packages/svs/src/index.ts"),+ );+ assert.equal(resolveDistributionPackageImport(process.cwd(), "example-package"), undefined);+});test("an external Author Package imports the active Distribution public API", async () => {installDistributionPackageResolution([process.cwd()]);diff --git a/packages/package-loader-node/test/loader.test.ts b/packages/package-loader-node/test/loader.test.tsindex 73b020b2..a8c70b11 100644--- a/packages/package-loader-node/test/loader.test.ts+++ b/packages/package-loader-node/test/loader.test.ts@@ -58,7 +58,7 @@ test("loads an explicitly selected installed package", async () => {}});-test("Distribution requirements follow internal packages and return only exact upstream npm packages", async () => {+test("Distribution requirements leave project packages to npm and follow internal dependencies", async () => {const root = await mkdtemp(join(tmpdir(), "hypit-distribution-requirements-"));try {await projectPackage(root, "@hypit/provider-example", `{@@ -73,11 +73,12 @@ test("Distribution requirements follow internal packages and return only exact u"example-transport": "1.2.3",});assert.deepEqual(await distributionExternalPackageRequirements(- ["@hypit/provider-example"], root,+ ["@hypit/provider-example", "@studio/provider-art", "another-provider"], root,), [{ name: "example-sdk", version: "2.3.4", specifier: "[email protected]" },{ name: "example-transport", version: "1.2.3", specifier: "[email protected]" },]);+ assert.deepEqual(await distributionExternalPackageRequirements(["@studio/provider-art"], root), []);} finally {await rm(root, { recursive: true, force: true });}diff --git a/packages/provider-hyperframes-local/README.md b/packages/provider-hyperframes-local/README.mdindex bbf4fd98..670837d1 100644--- a/packages/provider-hyperframes-local/README.md+++ b/packages/provider-hyperframes-local/README.md@@ -7,6 +7,11 @@ Surface it decodes the exact bytes and checks declared dimensions, still/frame topaque/straight-alpha facts. These checks validate the typed rendering input; they do not createcontent identity or hidden output metadata.+Normalized transparent videos from Speech Track or Media Track use the ordinary video path.+The engine decodes them to PNG frames with alpha, then Chrome blends them with lower layers and+the authored Canvas background. PNG is the intermediate capture format; it does not ask to erase+the Film's background. The returned MP4 contains the completed composition.+Runtime configuration separates work size from shared capacity:- `defaultConcurrency` limits whole render requests admitted by the Endpoint's Runtime capacity resource.diff --git a/packages/provider-hyperframes-local/src/render.ts b/packages/provider-hyperframes-local/src/render.tsindex 6640a02b..b85f130b 100644--- a/packages/provider-hyperframes-local/src/render.ts+++ b/packages/provider-hyperframes-local/src/render.ts@@ -190,6 +190,12 @@ export async function renderHyperframesVisual(const browserPid = session.browser.process()?.pid;options.onProgress?.({ phase: "worker-initializing", worker, range: task, browserPid, elapsedMs: elapsedMs() });await stage(`worker ${worker} initialization`, config.initializationTimeoutMs, () => engine.initializeSession(activeSession));+ // HyperFrames' PNG capture clears the page/composition backgrounds for+ // standalone transparent exports. Here PNGs are intermediate frames of+ // a Film, whose authored Canvas background still belongs in the image.+ await activeSession.page.evaluate(() => {+ globalThis.document.getElementById("__hf_transparent_bg__")?.remove();+ });options.onProgress?.({ phase: "worker-start", worker, range: task, browserPid, elapsedMs: elapsedMs() });for (let frame = task.startFrame; frame < task.endFrameExclusive; frame++) {signal.throwIfAborted();diff --git a/packages/provider-hyperframes-local/test/alpha.test.ts b/packages/provider-hyperframes-local/test/alpha.test.tsnew file mode 100644index 00000000..765c28b0--- /dev/null+++ b/packages/provider-hyperframes-local/test/alpha.test.ts@@ -0,0 +1,85 @@+import assert from "node:assert/strict";+import test from "node:test";+import { mkdir, mkdtemp, rm } from "node:fs/promises";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { sealComposition } from "@hypit/composition";+import { compileHyperframesDocument } from "@hypit/hyperframes";+import type { Narrative } from "@hypit/narrative";+import { parseScript, narrativeValue } from "@hypit/script";+import { materializeSemanticTake } from "@hypit/speech";+import { appendSpeechTrackTake, assembleSpeechTrack, createSpeechTrackSet, projectSpeechTrackVisual,+ sealSpeechTrackHeader, sealSpeechTrackVisualSpec } from "@hypit/speech-track";+import { projectSemanticProgramSpace } from "@hypit/semantic-track";+import { appendMediaItem, appendTimedMediaLayer, createMediaLayerSet, createMediaSoundSet, createMediaTrackSet,+ finalizeMediaTrack, projectMediaVisualTrack, sealMediaItemSpec, sealMediaSampleLayerSpec, sealMediaTrackHeader } from "@hypit/media-track";+import { projectProgramWindow } from "../../../test/temporal-fixture.js";+import { MemoryResourceStore, ffmpegBytes, normalizeTestVideo, transparentVideoFixture, writeTestArtifact } from "../../../test/alpha-video-fixture.js";+import { renderHyperframesVisual } from "../src/index.js";++test("transparent normalized media composites through both SemanticTake/Speech Track and Media Track in Chrome", {+ skip: process.env.HYPIT_BROWSER_TESTS !== "1",+}, async () => {+ const directory = process.env.HYPIT_ALPHA_PROOF_DIR ?? await mkdtemp(join(tmpdir(), "hypit-alpha-render-"));+ await mkdir(directory, { recursive: true });+ try {+ const resources = new MemoryResourceStore();+ const fixture = await transparentVideoFixture(directory, "webm");+ const source = await resources.put(fixture.bytes, fixture.mediaType);+ const media = await normalizeTestVideo(resources, source, true);+ const broll = await normalizeTestVideo(resources, source, false);+ const narrative = narrativeValue(parseScript("alpha.svml", "<opening>Hello</opening>"), "story") as unknown as Narrative;+ const segment = narrative.segments[0]!;+ const token = narrative.tokens[0]!;+ // Known token timing isolates media preservation from remote speech recognition.+ const take = materializeSemanticTake(narrative,+ { narrativeId: narrative.id, kind: "segment", id: segment.id, tokenStart: 0, tokenEndExclusive: 1 }, media, {+ tokens: [{ tokenId: token.id, segmentId: segment.id, startFrame: 2, endFrameExclusive: 10 }],+ anchors: [+ { identity: segment.startAnchorId, frame: 0 }, { identity: segment.endAnchorId, frame: 12 },+ { identity: token.startAnchorId, frame: 2 }, { identity: token.endAnchorId, frame: 10 },+ ],+ });+ assert.deepEqual(take.media, media);+ const fit = { sizing: "contain" as const, framePoint: { x: 0.5, y: 0.5 }, contentPoint: { x: 0.5, y: 0.5 },+ offsetPx: { x: 0, y: 0 }, constraint: "bounded" as const };+ const frame = { xPx: 0, yPx: 0, widthPx: 96, heightPx: 64 };+ const set = appendSpeechTrackTake(createSpeechTrackSet(), take, frame, fit, sealSpeechTrackVisualSpec({ stackingOrder: 1 }));+ const semantic = assembleSpeechTrack(sealSpeechTrackHeader({ id: "speech" }), set);+ const speechVisual = projectSpeechTrackVisual(semantic, set);+ const space = projectSemanticProgramSpace(semantic);+ const header = sealMediaTrackHeader({ id: "broll" });+ const layers = appendTimedMediaLayer(createMediaLayerSet(), broll, fit, sealMediaSampleLayerSpec({ id: "cutout",+ occupancy: { mode: "once", align: "start" },+ appearance: { opacity: 1, filter: { blurPx: 0, brightness: 1, contrast: 1, saturation: 1 } },+ }));+ const spec = sealMediaItemSpec({ id: "broll-cutout", stackingOrder: 2, motion: { sustain: [] },+ presentation: { clip: { kind: "none" }, padding: { topPx: 0, rightPx: 0, bottomPx: 0, leftPx: 0 },+ border: { widthPx: 0, style: "solid", color: "#000000" }, shadows: [] } });+ const items = appendMediaItem(createMediaTrackSet(), header, space,+ { widthPx: 192, heightPx: 64, origin: "top-left", xDirection: "right", yDirection: "down", pixelAspect: "square" },+ layers, { ...frame, xPx: 96 }, spec, createMediaSoundSet(), projectProgramWindow({+ itemId: spec.id, semantic, projection: { start: { ref: "program.start" }, end: { ref: "program.end" } },+ }));+ const brollVisual = projectMediaVisualTrack(space, finalizeMediaTrack(items, header, space));+ const document = compileHyperframesDocument(sealComposition({ id: "alpha-proof",+ canvas: { width: 192, height: 64, clearColor: "#143cdc" }, tracks: [speechVisual, brollVisual] }), space);+ const rendered = await renderHyperframesVisual({ document }, { resources, workers: 2, quality: "high", processTimeoutMs: 120_000 });+ const video = await writeTestArtifact(resources, rendered.artifact, join(directory, "speech-and-broll.mp4"));+ const pixels = ffmpegBytes(["-i", video, "-pix_fmt", "rgb24", "-f", "rawvideo", "pipe:1"]);+ assert.equal(pixels.length, 192 * 64 * 3 * 12);+ const pixel = (f: number, x: number, y: number) => [...pixels.subarray(((f * 64 + y) * 192 + x) * 3, ((f * 64 + y) * 192 + x) * 3 + 3)];+ const close = (actual: number[], expected: number[]) => {+ assert.ok(actual.every((value, i) => Math.abs(value - expected[i]!) < 14), `${actual} differs from ${expected}`);+ };+ for (let f = 0; f < 12; f++) for (const left of [0, 96]) {+ close(pixel(f, left + 4, 4), [20, 60, 220]);+ close(pixel(f, left + 32, 32), [240, 20, 20]);+ close(pixel(f, left + 60, 32), [130, 40, 120]);+ }+ close(pixel(0, 18, 32), [240, 20, 20]);+ close(pixel(11, 18, 32), [20, 60, 220]);+ } finally {+ if (process.env.HYPIT_ALPHA_PROOF_DIR === undefined) await rm(directory, { recursive: true, force: true });+ }+});diff --git a/packages/provider-hypihub/README.md b/packages/provider-hypihub/README.mdindex 91a24489..865ae6d4 100644--- a/packages/provider-hypihub/README.md+++ b/packages/provider-hypihub/README.md@@ -12,6 +12,17 @@ admits them into the current Build's working byte area. Image references use Hypfor one video). First/last-frame images use `first_frame` and `last_frame`. It alsoexports a small Gemini-native VLM generator for callers that previously used Vertex.+For moving portraits, [Volcengine Matting](../volcengine-matting/README.md) maps+`@hypit/volcengine-matting@1#matte-portrait-video` to `POST /v1/videos` with+`model: "matte-portrait-video"`, `ref_video_url` and `format` (`WEBM` by default, or `MOV`).+Both formats carry transparency. The source video uses the same upload transport as other video+references; the returned job uses the same polling and asset collection lifecycle. The selected+account's `/v1/models` establishes availability. The processed video enters ordinary Normalize,+then either semantic alignment for a Script performance or Media Track for B-roll.++The existing [Background Removal](../background-removal/README.md) package handles single images+through KIE Recraft. This Provider does not bind that separate image capability either.+Runtime Profile example:```jsondiff --git a/packages/provider-hypihub/package.json b/packages/provider-hypihub/package.jsonindex d3a24e8c..fd84facc 100644--- a/packages/provider-hypihub/package.json+++ b/packages/provider-hypihub/package.json@@ -21,6 +21,7 @@"@hypit/driver-node": "workspace:*","@hypit/mimo-speech": "workspace:*","@hypit/seedance": "workspace:*",- "@hypit/speech": "workspace:*"+ "@hypit/speech": "workspace:*",+ "@hypit/volcengine-matting": "workspace:*"}}diff --git a/packages/provider-hypihub/src/mapping.ts b/packages/provider-hypihub/src/mapping.tsindex 03d95e9a..ec74bca3 100644--- a/packages/provider-hypihub/src/mapping.ts+++ b/packages/provider-hypihub/src/mapping.ts@@ -28,6 +28,14 @@ const seedance = (name: string, model: string): GenerationWireMapping => ({});export const hypiHubMappings: readonly GenerationWireMapping[] = [+ {+ capability: { module: { name: "@hypit/volcengine-matting", version: "1" }, name: "matte-portrait-video" },+ result: "video", routes: [{ model: "matte-portrait-video" }],+ fields: {+ source: { as: "url", field: "ref_video_url" },+ format: { as: "value", field: "format", whenAbsent: "WEBM" },+ },+ },seedance("seedance-2", "bytedance/seedance-2"),seedance("seedance-2-fast", "bytedance/seedance-2-fast"),seedance("seedance-2-mini", "bytedance/seedance-2-mini"),diff --git a/packages/provider-hypihub/test/provider.test.ts b/packages/provider-hypihub/test/provider.test.tsindex 4b435bff..7f292bfb 100644--- a/packages/provider-hypihub/test/provider.test.ts+++ b/packages/provider-hypihub/test/provider.test.ts@@ -11,6 +11,7 @@ import { sealSeedanceRequest, seedanceEndpoints } from "@hypit/seedance";import { sealSpeechEvidenceAudio } from "@hypit/speech";import { speechEvidenceTypes } from "@hypit/speech-evidence";import { whisperXCapabilities, whisperXRequestForEvidenceAudio } from "@hypit/whisperx";+import { portraitMattingEndpoint, sealPortraitMattingRequest } from "@hypit/volcengine-matting";import { createHypiHubProvider, diagnoseHypiHubProvider } from "../src/provider.js";@@ -33,6 +34,57 @@ async function endpointFor(request: Need, fetch: typeof globalThis.fetch): Promireturn resolution.registration.endpoint;}+test("HypiHub portrait matting uses the video job lifecycle and stores transparent output", async () => {+ const resources = new MemoryResourceStore();+ const source = await resources.put(new Uint8Array([1, 2, 3]), "video/mp4");+ const request: Need = {+ id: "need:portrait-matting", capability: portraitMattingEndpoint.capability, returns: portraitMattingEndpoint.returns,+ constraints: sealPortraitMattingRequest({ source: [{ role: "video", artifact: source }] }) as unknown as CanonicalValue,+ result: "record:cutout",+ };+ let submissions = 0;+ const registry = new EndpointRegistry();+ await createHypiHubProvider({+ publicAssetUrl: async (artifact) => { assert.equal(artifact.resource, source.resource); return "https://media.example.test/source.mp4"; },+ pollIntervalMs: 0,+ fetch: async (input, init) => {+ const url = String(input);+ if (url.endsWith("/models/matte-portrait-video")) return Response.json({ endpoints: ["videos"] });+ if (url.endsWith("/videos")) {+ submissions++;+ assert.deepEqual(JSON.parse(String(init?.body)), {+ model: "matte-portrait-video", ref_video_url: "https://media.example.test/source.mp4", format: "WEBM",+ });+ return Response.json({ id: "job_cutout", status: "queued" });+ }+ if (url.endsWith("/jobs/job_cutout")) return Response.json({ id: "job_cutout", status: "succeeded" });+ if (url.endsWith("/jobs/job_cutout/assets")) return Response.json({ items: [{ url: "https://media.example.test/cutout.webm" }] });+ if (url.endsWith("/cutout.webm")) return new Response(new Uint8Array([4, 5, 6]), { headers: { "content-type": "video/webm" } });+ throw new Error(`Unexpected request ${url}`);+ },+ }).install(registry);+ const resolution = registry.resolve(request);+ assert.equal(resolution.status, "resolved");+ assert.equal(resolution.registration.kind, "asynchronous");+ const endpoint = resolution.registration.endpoint;+ const context = { command: { kind: "fulfill-need" as const, id: "command:cutout", need: request },+ need: request, resources, credentials: { apiKey: { secret: "test-key" } }, operation: "operation:cutout" };+ const started = await endpoint.start(context);+ assert.equal(started.status, "pending");+ if (started.status !== "pending") return;+ const ready = await endpoint.poll({ ...context, handle: started.handle! });+ assert.equal(ready.status, "ready");+ if (ready.status !== "ready") return;+ const result = await endpoint.collect!({ ...context, handle: ready.handle });+ assert.equal(result.status, "completed");+ if (result.status !== "completed") return;+ assert.equal(result.result.value.kind, "inline");+ assert.equal(submissions, 1);+ const artifact = (result.result.value as unknown as { kind: "inline"; value: { videos: [typeof source] } }).value.videos[0];+ assert.equal(artifact.mediaType, "video/webm");+ assert.deepEqual(await resources.get(artifact.resource), new Uint8Array([4, 5, 6]));+});+function wav(sampleFrames: number): Uint8Array {const bytes = new Uint8Array(44 + sampleFrames * 2);const view = new DataView(bytes.buffer);diff --git a/packages/provider-media-local/README.md b/packages/provider-media-local/README.mdindex 3c2e8bf5..85156a3b 100644--- a/packages/provider-media-local/README.md+++ b/packages/provider-media-local/README.md@@ -20,13 +20,28 @@ The Endpoint:- maps explicit stream indexes into ffmpeg instead of relying on `0:v:0` / `0:a:0` guesses;- uses the selected authority stream's presentation interval;- preserves source A/V offset through deterministic trim, delay, pad and crop operations;-- emits a silent CFR H.264 visual and, when selected, an exact-length 48 kHz stereo PCM WAV.+- emits a silent CFR visual and, when selected, an exact-length 48 kHz stereo PCM WAV;- transforms synchronized A/V, extracts generic reference audio and extracts exact source frames;- encodes one authored image frame as an ordinary finite silent MP4 before normalization;- renders an explicit `AudioProgramPlan` into one exact-length 48 kHz stereo PCM `TimelineAudio`;- muxes exactly one verified silent visual stream and one verified program-audio stream into MP4;- distinguishes AAC coding-frame padding from the authoritative packet presentation span.+Normalize preserves alpha: transparent input becomes VP9 / `yuva420p` WebM, while opaque input+uses H.264 / `yuv420p` MP4. The input pixel format and WebM alpha metadata determine the choice.+Animated WebP is also normalized through an alpha-capable output. Transparent VP8/VP9 input uses libvpx+decoders so FFmpeg retains the alpha sidecar, including during PNG frame extraction.+Transparent normalization requires an FFmpeg build with the `libvpx-vp9` encoder; the normal+process error reports a missing codec if a custom deployment does not provide it.+These are this FFmpeg implementation's intermediate encodings; Source and Track inputs continue+to use ordinary SynchronizedMedia. Transform currently emits opaque MP4, so perform trim/retime+before matting when the resulting clip needs transparency.++The result is ordinary SynchronizedMedia. Speech Track and Media Track consume its transparent+picture through their existing visual outputs; choosing the A-roll or B-roll role belongs to the+Source. Local HyperFrames extracts alpha-preserving PNGs and composites them against the authored+Canvas and lower visual layers before encoding the final MP4.+The Runtime Adapter declares the selected `ffmpeg`/`ffprobe` pair as an external, non-daemon Program.Its shared probe checks the encoders and filters used by the execution body. Compatible custom pathsremain valid; the package neither pins a semantic Capability to one FFmpeg version nor mutates adiff --git a/packages/ranking/README.md b/packages/ranking/README.mdindex c144a750..16017899 100644--- a/packages/ranking/README.md+++ b/packages/ranking/README.md@@ -1,23 +1,63 @@-# @hypit/ranking+# `@hypit/ranking`-Progressive-ranking author components over a shared schedule utility:+Ranking boards that follow the argument of a video: introduce an item, give its verdict, and retain+its place while the next item is discussed. The board consumes the performance's SemanticTrack,+Frames, Styles, fonts, text and optional icons or sound.-- `Column`-- `TopThree`+| Form | Temporal behavior |+| --- | --- |+| `TierBoard` | Place icons into authored tiers. Each non-preset item has a reveal Window; its settled placement persists. |+| `Column` | Place labeled rows at explicit ranks. Each non-preset row has a reveal Window; preset rows are already settled. |+| `TopThree` | Stage up to three items from activation Instants and an explicit terminal Instant. |-The package consumes SemanticTrack timing, spatial frames, fonts, optional icons and sound, then-lowers each component to peer `VisualTrack` and optional `AudioTrack` values. Styles are compiled-from typed SVS Recipes and exact font references. Visible copy may be literal or an existing graph-`Text` reference.+The board's outer Window owns its lifetime. Item reveal Windows must fit within it and be disjoint+where the selected schedule requires succession. Ending a reveal does not remove its settled result.+`preset` supplies initial state and needs no reveal event.-`Column` assigns rows by explicit rank. Non-preset rows own disjoint reveal windows inside the-board lifetime; preset rows are settled from the first frame. `TopThree` assigns up to three items-to explicit trigger instants and a terminal instant.+## Bind the ranking to the target Script++This excerpt assumes the Script, SemanticTrack, Canvas, Frame and Style have been declared:```svml+<import as="ranking" from="@hypit/ranking@1"/>+<ranking:Column id="priorities" semantic={speech.semantic} canvas={vertical}frame={layout.ranking} during={story.segment.ranking} style={ranking-style}><ranking:ColumnItem rank="1" label="Winner" during={story.selection.winner}/><ranking:ColumnItem rank="2" preset="true" label="Already placed"/></ranking:Column>```++Choose `winner` to cover the phrase whose delivery stages this reveal. When that performance changes+length, the projected Window follows the phrase. Style defines how the reveal and settling use that+Window. TopThree instead accepts item `at` projections and a board `terminal` projection; a Moment+can supply the intended trigger.++Each board publishes `.schedule`, `.program` and `.visual`. Optional normalized `appear-sound` or+`move-sound` inputs add `.audio` where that form supports them. Include the wanted visual and audio+outputs as peers in Film. Labels can be literal or graph Text; Styles are typed SVS Recipes with+exact fonts. Use `hypit vocabulary @hypit/ranking --tag Column` (or another declared tag) for its+attributes, children, outputs and configured example.++## Read it as a semantic component example++The following files are included in the Distribution and show how the responsibilities connect:++| File | What to learn from it |+| --- | --- |+| [surface.ts](src/surface.ts) | `rankingSurface` resolves author inputs, projects the outer and item times through `createTemporalWindowProjection` / `createTemporalInstantProjection`, and retains the returned drafts and references. |+| [fragment.ts](src/fragment.ts) | `createRankingFragment` projects ProgramSpace and wires typed content, time, layout and Style inputs into finite operations. |+| [schedule.ts](src/schedule.ts) | Compute reveal, activation and settled spans from the projected times. |+| [component.ts](src/component.ts) and [render.ts](src/render.ts) | Build the ranking program and produce picture and optional sound from that schedule. |+| [manifest.ts](src/manifest.ts) and [activation.ts](src/activation.ts) | Publish Types, Producers, Surface vocabulary and package contributions. |+| [Ranking Companion](../ranking-studio/src/index.ts) | Read the same program, present persistent rows and activation lanes, and connect edits to actual Source inputs. |++A project component can use these relationships with its own behavior. External TypeScript uses+`hypit/author-kit`, `hypit/temporal-markup` and the appropriate `hypit/*` domain APIs; the official+implementation's `@hypit/*` imports are internal workspace spellings. Copy the relevant idea into+the project's own package, with its own Module identity, instead of editing the installed Ranking.++The Companion uses published values and temporal lineage, so a visible row and its reveal handle can+represent different spans. Moving the authored semantic boundary changes the shared event and its+consumers; editing a Style changes its appearance. [Studio Adapter](../studio-adapter/README.md)+contains a minimal project Companion and the exact presentation/editing interface.diff --git a/packages/runtime-kit/README.md b/packages/runtime-kit/README.mdindex 5868b6c8..a6804bb8 100644--- a/packages/runtime-kit/README.md+++ b/packages/runtime-kit/README.md@@ -1,10 +1,37 @@-# `@hypit/runtime-kit`+# `hypit/runtime-kit`Host facets for the two environmental choices a Local Runtime Profile may select:* an Endpoint implements external capabilities;* a Credential Store resolves explicit credential references.+External packages use this public subpath from their `hypit` development dependency. The built+package's `hypit.activation` entry exports a default package contribution with+`format: "hypit.node-package@1"` and the declared `hostFacets`.++For a Provider, `createRuntimeEndpointAdapterFacet({ use, activate })` advertises its owner-scoped+package name. `activate(context)` reads `instance`, `pool`, and the package's own `config`, then+returns `{ endpoint }` from `defineEndpointPackage`; it can also return `program` and `diagnose`.+The configuration helpers parse values and CredentialRefs. Activation describes the deployment;+credential resolution, remote invocation, and Managed Program startup happen through their Runtime+operations. Installing the same package in another project preserves its `use` name.++```json+{+ "endpoints": {+ "art.personal": {+ "use": "@studio/provider-art",+ "config": { "apiKey": { "store": "os", "key": "art.personal" } }+ }+ }+}+```++This is a Profile fragment: the Provider defines its actual config fields, and the complete Profile+selects the `os` Credential Store as well. Separate instances can use separate accounts. A binding+names the chosen instance when several offer the same capability. The default pool identity is the+instance; declare a shared pool only for a real shared account, deployment, or compute quota.+Each adapter is addressed by its kind and `use` name. A package advertises that name through a Hostfacet; the Runtime Profile selects it explicitly. Installing a package does not activate it.diff --git a/packages/speech/README.md b/packages/speech/README.mdindex e669f5e2..c5fe4d8b 100644--- a/packages/speech/README.md+++ b/packages/speech/README.md@@ -1,5 +1,9 @@# `@hypit/speech`+External components use `hypit/speech` from their `hypit` development dependency. The package+owns the types and helpers below; Source imports retain the `@hypit/speech@1` Module identity.++Public contracts for speech duration, normalized semantic Takes and provider-neutral evidence audio.A `SemanticTake` contains one normalized media product, one authored Segment, its words and localframe anchors. Ordered Takes are assembled by `@hypit/speech-track` into a `SemanticTrack`, which isdiff --git a/packages/studio-adapter/README.md b/packages/studio-adapter/README.mdindex a7f58948..0beeb826 100644--- a/packages/studio-adapter/README.md+++ b/packages/studio-adapter/README.md@@ -1,10 +1,13 @@-# `@hypit/studio-adapter`+# `hypit/studio-adapter`The stable companion-package ABI understood by Hypit Studio. It carries onlypresentation, lineage, inspector and interaction DTOs plus helpers that do notencode the official video UI policy. Domain computation and manifests do not depend on it;package activation can combine domain facets with a separate Companion implementation.+External packages use the public imports below with `hypit` as a development dependency, then ship+compiled JavaScript. The active Distribution supplies these APIs when Studio loads the component.+## A minimal project Track CompanionSuppose `@studio/score-strip@1` already owns a `track` Surface that emits a public VisualTrack and@@ -12,8 +15,8 @@ accepts a literal string `label` attribute. The Companion can reuse generic termadding package-specific presentation and one Inspector field:```ts-import { compositionTypes } from "@hypit/composition";-import type { StudioTrackCompanion } from "@hypit/studio-adapter";+import { compositionTypes } from "hypit/composition";+import type { StudioTrackCompanion } from "hypit/studio-adapter";export const companions: readonly StudioTrackCompanion[] = [{id: "score-strip",@@ -49,7 +52,7 @@ Merge the facet into the package's existing activation. In this example `authorCexports its existing modules, deterministic component and Markup facets:```ts-import { createStudioTrackCompanionHostFacet } from "@hypit/studio-adapter";+import { createStudioTrackCompanionHostFacet } from "hypit/studio-adapter";import authorContribution from "./author-activation.js";import { companions } from "./studio.js";diff --git a/packages/studio/README.md b/packages/studio/README.mdindex 6c2c9fc7..448bc9c4 100644--- a/packages/studio/README.md+++ b/packages/studio/README.md@@ -67,9 +67,9 @@ project nor its packages are added to the Hypit Distribution or contributor workThe Host resolves selected project packages from the project first and official`@hypit/*` imports from the read-only tool Distribution. The `@hypit/*`namespace is Distribution-owned and cannot be shadowed by a project install.-Companion manifests may declare `@hypit/studio-adapter` as a peer dependency for-editor/package-manager clarity; the active tool Distribution supplies that ABI at-runtime, so the project does not install or lock another copy.+External Companions compile against `hypit/studio-adapter` and the other public `hypit/*`+subpaths, with `hypit` as a development dependency. The active Distribution supplies those APIs+at runtime. Ship the Companion's compiled JavaScript with its component package.The companion owns what its Track means: matching, required same-Surface values,entities, lane range, finite chrome, title and ordered text/material layers,diff --git a/packages/studio/package.json b/packages/studio/package.jsonindex 5bbf46dc..a81658d2 100644--- a/packages/studio/package.json+++ b/packages/studio/package.json@@ -45,6 +45,6 @@"@hypit/video-cli": "workspace:*","@hypit/workspace": "workspace:*","@hypit/workspace-fs-node": "workspace:*",- "vite": "5.4.21"+ "vite": "8.2.2"}}diff --git a/packages/studio/start.ts b/packages/studio/start.tsindex 14283cab..e339a44a 100644--- a/packages/studio/start.ts+++ b/packages/studio/start.ts@@ -3,6 +3,7 @@ import { fileURLToPath } from "node:url";import { createServer } from "vite";import { findRuntimeProfile, resolveProjectRoot } from "@hypit/cli";+import { resolveDistributionPackageImport } from "@hypit/package-loader-node";import { videoCliDistribution, videoStudioCompanionPackages } from "@hypit/video-cli";import { openStudioBuildLibrary } from "./src/build-library.js";@@ -98,6 +99,13 @@ try {await buildLibrary.close();throw error;}+const distributionImports = {+ name: "hypit-distribution-imports",+ enforce: "pre" as const,+ resolveId(specifier: string): string | undefined {+ return resolveDistributionPackageImport(distributionPackageRoot, specifier);+ },+};const server = await createServer({configFile: false,root: here,@@ -109,7 +117,7 @@ const server = await createServer({// available for Source and material previews.fs: { allow: [workspaceRoot, packageRoot, distributionPackageRoot, here] },},- plugins: [studioPlugin({+ plugins: [distributionImports, studioPlugin({source,runPath,workspaceRoot,diff --git a/packages/text/README.md b/packages/text/README.mdindex 222ea154..4179eb55 100644--- a/packages/text/README.md+++ b/packages/text/README.md@@ -1,5 +1,8 @@# `@hypit/text`+External components use `hypit/text` for graph Text types, template helpers and Producer references,+with `hypit` as a development dependency. Source imports retain `@hypit/text@1`.+Domain-neutral text values and deterministic text programs.This package does not own the `.svml` grammar, call models, or know what a promptdiff --git a/packages/volcengine-matting/README.md b/packages/volcengine-matting/README.mdnew file mode 100644index 00000000..4432e7c2--- /dev/null+++ b/packages/volcengine-matting/README.md@@ -0,0 +1,89 @@+# `@hypit/volcengine-matting`++Remove the background of a moving portrait when the composition needs the person's silhouette+over another picture. The source video determines the performance, duration and dimensions.++```svml+<import as="matte" from="@hypit/volcengine-matting@1"/>+<matte:Portrait id="cutout" source={performance.video}/>+```++`source` is a video Blob from a file declaration, generation or another media operation.+`cutout.video` is the processed video Blob. `format="WEBM"` is the default; `format="MOV"`+selects a transparent QuickTime output. This interface exposes the model's two transparent+formats. The service's flat-background MP4 option is a different output treatment.++## Prepare the processed clip for its role++```svml+<import as="program" from="@hypit/program-space@1"/>+<import as="pipeline" from="@hypit/media-pipeline@1"/>+<import as="whisperx" from="@hypit/whisperx@1"/>++<program:Clock id="clock" frame-rate="30"/>+<pipeline:Normalize id="cutout-media" source={cutout.video} clock={clock}+ video="primary-moving" audio="default" span-authority="video"/>+<whisperx:SemanticTake id="opening-semantic" narrative={story}+ segment={story.segment.opening} media={cutout-media.media} language="en"/>+```++This excerpt assumes the performance and Script exist. Normalize keeps the transparent picture+and prepares the selected embedded audio on the program clock. WhisperX and semantic alignment+associate that prepared performance with the Script. Use `opening-semantic.take` in+[Speech Track](../speech-track/README.md); its screen position and stack order are independent+of its role as A-roll.++For B-roll, normalize `cutout.video` with `audio="none"` when its sound is unwanted, then use+`cutout-media.media` in [Media Track](../media-track/README.md). No SemanticTake is needed for+that overlay. Existing transparency can enter Normalize directly.++For example, this alternative uses the existing program's SemanticTrack and an authored Selection:++```svml+<import as="media-track" from="@hypit/media-track@1"/>+<pipeline:Normalize id="overlay-media" source={cutout.video} clock={clock}+ video="primary-moving" audio="none" span-authority="video"/>+<media-track:Track id="overlay" semantic={speech.semantic} canvas={canvas}>+ <media-track:Item media={overlay-media.media} during={story.selection.example}+ frame={overlay-frame} appearance={look.media.overlay}/>+</media-track:Track>+```++The Frame, Recipe and Selection belong to the composition. Add `overlay.visual` to Film and set+its stacking order in the Recipe. The performance underneath continues to supply semantic time.++The same processed clip can serve either role; matting does not choose its Track or timeline.+The local media Provider's Transform currently emits opaque MP4. When a clip also needs trimming+or retiming, apply that operation before matting, then normalize the cutout for its intended role.++Review motion, hair, hands, translucent edges and the selected speech against the intended+background. Reuse `cutout.video` or the prepared Output through the Run when changing placement,+captions or graphics.++## Model and Provider++The capability is `@hypit/volcengine-matting@1#matte-portrait-video`, returning a GeneratedVideoSet.+The Portrait Surface publishes its first video as `.video`. Its model ports are `source`+(one video) and optional `format` (`WEBM` or `MOV`). It takes no generation prompt or duration.++[HypiHub Provider](../provider-hypihub/README.md) maps it to `POST /v1/videos` with+`model: "matte-portrait-video"`, `ref_video_url` and `format`. Account availability and credentials+belong to the selected Runtime Endpoint. Submission, job polling, collection and Result storage+use that Provider's existing video operation.++To select this route explicitly in a Runtime Profile, bind the capability to an existing+HypiHub Endpoint:++```json+{+ "bindings": {+ "@hypit/volcengine-matting@1#matte-portrait-video": "hypihub.default"+ }+}+```++Here `hypihub.default` is the Endpoint ID from that profile. The Model describes the operation;+the Provider translates it to the service; the Endpoint supplies the account and execution settings.+No source duration or resolution needs to be copied into the Source or Runtime Profile.++The input and output formats follow [Volcengine's portrait-matting reference](https://github.com/volcengine/mediakit-cli/blob/main/skills/byted-mediakit-video/reference/matte-portrait-video.md).diff --git a/packages/volcengine-matting/package.json b/packages/volcengine-matting/package.jsonnew file mode 100644index 00000000..68e54af4--- /dev/null+++ b/packages/volcengine-matting/package.json@@ -0,0 +1,16 @@+{+ "name": "@hypit/volcengine-matting",+ "version": "0.0.0-dev",+ "license": "SEE LICENSE IN LICENSE",+ "private": true,+ "type": "module",+ "exports": { ".": "./src/index.ts" },+ "hypit": { "activation": "./src/activation.ts" },+ "dependencies": {+ "@hypit/artifact": "workspace:*",+ "@hypit/generation": "workspace:*",+ "@hypit/markup": "workspace:*",+ "@hypit/model-kit": "workspace:*",+ "@hypit/protocol": "workspace:*"+ }+}diff --git a/packages/volcengine-matting/src/activation.ts b/packages/volcengine-matting/src/activation.tsnew file mode 100644index 00000000..55eb1a03--- /dev/null+++ b/packages/volcengine-matting/src/activation.ts@@ -0,0 +1,13 @@+import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { portraitMattingSurface, volcengineMattingDefinition, volcengineMattingModuleRef } from "./index.js";+import { decodePortraitMattingSurface } from "./surface.js";++export const hypitPackage = {+ format: "hypit.node-package@1" as const,+ modules: [{ manifest: volcengineMattingDefinition.manifest }],+ components: [volcengineMattingDefinition.component],+ hostFacets: [volcengineMattingDefinition.hostFacet, createMarkupSurfaceHostFacet({+ module: volcengineMattingModuleRef, declaration: portraitMattingSurface, handler: decodePortraitMattingSurface,+ })],+};+export default hypitPackage;diff --git a/packages/volcengine-matting/src/index.ts b/packages/volcengine-matting/src/index.tsnew file mode 100644index 00000000..4fae04c2--- /dev/null+++ b/packages/volcengine-matting/src/index.ts@@ -0,0 +1,45 @@+import { artifactTypes } from "@hypit/artifact";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";+import type { GenerationPortValue } from "@hypit/generation";+import { defineExactModelModule } from "@hypit/model-kit";++export const volcengineMattingModuleRef = { name: "@hypit/volcengine-matting", version: "1" } as const;++export const portraitMattingPorts = sealGenerationPortTable({+ model: "matte-portrait-video",+ result: "video",+ ports: [+ { name: "source", value: { kind: "media", accepts: ["video"] }, minItems: 1, maxItems: 1 },+ { name: "format", value: { kind: "enum", values: ["WEBM", "MOV"] }, minItems: 0, maxItems: 1 },+ ],+ requires: [],+});++export function sealPortraitMattingRequest(ports: Readonly<Record<string, readonly GenerationPortValue[]>>) {+ return sealGenerationPortRequest(portraitMattingPorts, ports);+}++export const volcengineMattingDefinition = defineExactModelModule({+ module: volcengineMattingModuleRef,+ endpoints: [{ key: "portrait", requestTypeName: "PortraitMattingRequest",+ producerName: "request-portrait-matting", ports: portraitMattingPorts }],+});+export const portraitMattingEndpoint = volcengineMattingDefinition.endpoints.portrait!;++export const portraitMattingSurface = {+ name: "portrait", tag: "Portrait", mode: "structured" as const,+ outputs: [portraitMattingEndpoint.draftType, portraitMattingEndpoint.mediaBindings.source!.type],+ vocabulary: {+ summary: "Removes a video's background with Volcengine portrait matting and returns transparent video.",+ attributes: [+ { name: "id", kind: "identifier" as const, required: true, summary: "Names the processed video." },+ { name: "source", kind: "reference" as const, required: true, accepts: [artifactTypes.blob],+ summary: "The source video Artifact whose people remain visible." },+ { name: "format", kind: "literal" as const, required: false, values: ["WEBM", "MOV"],+ summary: "Transparent output container; defaults to WEBM." },+ ],+ ports: [{ name: "video", type: artifactTypes.blob, summary: "The processed video Artifact, before normalization." }],+ example: '<matte:Portrait id="cutout" source={performance.video}/>',+ notes: ["The source determines duration and dimensions. Normalize the output before using it in a track."],+ },+};diff --git a/packages/volcengine-matting/src/surface.ts b/packages/volcengine-matting/src/surface.tsnew file mode 100644index 00000000..d095c92a--- /dev/null+++ b/packages/volcengine-matting/src/surface.ts@@ -0,0 +1,48 @@+import { artifactTypes } from "@hypit/artifact";+import { sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";+import type { GenerationMediaPort } from "@hypit/generation";+import type { StructuredSurfaceHandler } from "@hypit/markup";+import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames } from "@hypit/model-kit";+import { canonicalize } from "@hypit/protocol";+import { portraitMattingEndpoint as endpoint } from "./index.js";++function assert(condition: unknown, message: string): asserts condition {+ if (!condition) throw new Error(message);+}++export const decodePortraitMattingSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {+ const { id, source, format } = element.attributes;+ for (const name of Object.keys(element.attributes)) {+ assert(["id", "source", "format"].includes(name), `${element.name} does not accept ${name}`);+ }+ assert(typeof id === "string" && id.trim().length > 0, `${element.name} requires id`);+ assert(!element.children.some((item) => item.kind === "element" || item.value.trim()), `${element.name} must be empty`);+ assert(typeof source === "object" && source.kind === "reference", `${element.name}.source must be a video reference`);+ const resolved = resolveReference(source.path);+ assert(resolved !== undefined && resolved.type.name === artifactTypes.blob.name+ && resolved.type.module.name === artifactTypes.blob.module.name+ && resolved.type.module.version === artifactTypes.blob.module.version, `${element.name}.source must be a Blob`);+ if (resolved.record !== undefined) {+ assert(resolved.record.value.kind === "blob" && resolved.record.value.mediaType.startsWith("video/"),+ `${element.name}.source must be video media`);+ }+ assert(format === undefined || typeof format === "string", `${element.name}.format must be literal`);+ const draft = sealGenerationRequestDraft(endpoint.ports, { format: [format ?? "WEBM"] });+ const binding = sealGenerationMediaBinding(endpoint.ports.ports.find((port) => port.name === "source")! as GenerationMediaPort,+ { role: "video" });+ const names = exactModelMediaInputNames("source");+ const fragment = createExactModelPrimaryGenerationFragment(endpoint, [{ name: "source", port: "source" }], []);+ return {+ records: [+ { id: `${id}.draft`, type: endpoint.draftType, value: { kind: "inline", value: canonicalize(draft) }, range: element.range },+ { id: `${id}.source-binding`, type: endpoint.mediaBindings.source!.type,+ value: { kind: "inline", value: canonicalize(binding) }, range: element.range },+ ],+ fragments: [fragment],+ components: [{ id, fragment: fragment.id, inputs: {+ draft: { kind: "record", id: `${id}.draft` },+ [names.binding]: { kind: "record", id: `${id}.source-binding` },+ [names.artifact]: resolved.ref,+ }, outputs: { video: `${id}.video` }, range: element.range }],+ };+};diff --git a/packages/volcengine-matting/test/matting.test.ts b/packages/volcengine-matting/test/matting.test.tsnew file mode 100644index 00000000..484b5abf--- /dev/null+++ b/packages/volcengine-matting/test/matting.test.ts@@ -0,0 +1,24 @@+import assert from "node:assert/strict";+import test from "node:test";+import { artifactTypes } from "@hypit/artifact";+import { parseStructuredElement } from "@hypit/markup";+import { sealPortraitMattingRequest } from "../src/index.js";+import { decodePortraitMattingSurface } from "../src/surface.js";++const source = { kind: "blob" as const, resource: "res_matting-source" as const, size: 4, mediaType: "video/mp4" };++test("portrait matting binds a source video and publishes an ordinary video edge for Normalize", async () => {+ assert.deepEqual(sealPortraitMattingRequest({ source: [{ role: "video", artifact: source }], format: ["MOV"] }).ports.format, ["MOV"]);+ assert.throws(() => sealPortraitMattingRequest({ source: [{ role: "image", artifact: { ...source, mediaType: "image/png" } }] }), /video|role/u);+ assert.throws(() => sealPortraitMattingRequest({ source: [{ role: "video", artifact: source }], format: ["MP4"] }), /format/u);+ const result = await decodePortraitMattingSurface({+ sourceName: "matting.svml",+ element: parseStructuredElement({ name: "matting.svml", text: '<matte:Portrait id="cutout" source={performance.video}/>' }, 0).element,+ resolveReference: () => ({ path: "performance.video", ref: { kind: "record", id: "performance.video" },+ type: artifactTypes.blob, record: { id: "performance.video", type: artifactTypes.blob, value: source } }),+ resolveAsset: () => { throw new Error("No file literal in this Source"); },+ });+ assert.deepEqual(result.components[0]!.outputs, { video: "cutout.video" });+ assert.deepEqual(result.components[0]!.inputs["source:artifact"], { kind: "record", id: "performance.video" });+ assert.deepEqual(result.fragments[0]!.exports.find((item) => item.name === "video")?.type, artifactTypes.blob);+});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 6e69a7b0..7dbb7f12 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -8,9 +8,18 @@ importers:.:dependencies:+ cmu-pronouncing-dictionary:+ specifier: 3.0.0+ version: 3.0.0tsx:specifier: 4.21.0version: 4.21.0+ typescript:+ specifier: 5.9.3+ version: 5.9.3+ vite:+ specifier: 8.2.2devDependencies:'@hypit/artifact':specifier: workspace:*@@ -270,21 +279,33 @@ importers:'@hypit/visual-ir':specifier: workspace:*version: link:packages/visual-ir+ '@hypit/volcengine-matting':+ specifier: workspace:*+ version: link:packages/volcengine-matting'@hypit/whisperx':specifier: workspace:*version: link:packages/whisperx+ '@rollup/plugin-node-resolve':+ specifier: 16.0.3+ version: 16.0.3([email protected])'@types/node':specifier: 24.10.1version: 24.10.1- typescript:- specifier: 5.9.3- version: 5.9.3+ rollup:+ specifier: 4.62.4+ version: 4.62.4+ rollup-plugin-dts:+ specifier: 6.2.3+ version: 6.2.3([email protected])([email protected])vitepress:specifier: ^1.6.4- version: 1.6.4(@algolia/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])+ version: 1.6.4(@algolia/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected])examples/minimal-author-package/packages/example-component:devDependencies:+ '@types/node':+ specifier: 24.10.1+ version: 24.10.1hypit:specifier: workspace:*version: link:../../../..@@ -2025,6 +2046,9 @@ importers:'@hypit/speech':specifier: workspace:*version: link:../speech+ '@hypit/volcengine-matting':+ specifier: workspace:*+ version: link:../volcengine-mattingpackages/provider-image-opencv-local:dependencies:@@ -3080,8 +3104,8 @@ importers:specifier: workspace:*version: link:../workspace-fs-nodevite:- specifier: 5.4.21- version: 5.4.21(@types/[email protected])+ specifier: 8.2.2packages/studio-adapter:dependencies:@@ -3331,6 +3355,24 @@ importers:specifier: workspace:*version: link:../protocol+ packages/volcengine-matting:+ dependencies:+ '@hypit/artifact':+ specifier: workspace:*+ version: link:../artifact+ '@hypit/generation':+ specifier: workspace:*+ version: link:../generation+ '@hypit/markup':+ specifier: workspace:*+ version: link:../markup+ '@hypit/model-kit':+ specifier: workspace:*+ version: link:../model-kit+ '@hypit/protocol':+ specifier: workspace:*+ version: link:../protocol+packages/whisperx:dependencies:'@hypit/component-kit':@@ -3555,6 +3597,10 @@ packages:resolution: {integrity: sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ==}engines: {node: '>=18.0.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==}engines: {node: '>=6.9.0'}@@ -4635,6 +4681,9 @@ packages:os: [linux]libc: [glibc]+ '@oxc-project/[email protected]':+ resolution: {integrity: sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A==}+'@protobufjs/[email protected]':resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==}@@ -4675,6 +4724,123 @@ packages:yauzl:optional: true+ '@rolldown/[email protected]':+ resolution: {integrity: sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm]+ os: [android]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [android]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [darwin]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [x64]+ os: [darwin]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [x64]+ os: [freebsd]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm]+ os: [linux]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [ppc64]+ os: [linux]+ libc: [glibc]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [s390x]+ os: [linux]+ libc: [glibc]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [openharmony]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [arm64]+ os: [win32]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw==}+ engines: {node: ^20.19.0 || >=22.12.0}+ cpu: [x64]+ os: [win32]++ '@rolldown/[email protected]':+ resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}++ '@rollup/[email protected]':+ resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==}+ engines: {node: '>=14.0.0'}+ peerDependencies:+ rollup: ^2.78.0||^3.0.0||^4.0.0+ peerDependenciesMeta:+ rollup:+ optional: true++ '@rollup/[email protected]':+ resolution: {integrity: sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==}+ engines: {node: '>=14.0.0'}+ peerDependencies:+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0+ peerDependenciesMeta:+ rollup:+ optional: true+'@rollup/[email protected]':resolution: {integrity: sha512-RrPokAb7dmbxFoeO3TloqHyOjgye8RkBhSqmp4aJMIex4c9r46ZstPnleDQOq1t46VOVjwIuwNogIqbodV1Vvg==}cpu: [arm]@@ -4892,6 +5058,9 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==}+ '@types/[email protected]':+ resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}+'@types/[email protected]':resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==}@@ -5200,6 +5369,10 @@ packages:supports-color:optional: true+ resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==}engines: {node: '>=18'}@@ -5351,6 +5524,15 @@ packages:resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==}+ resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}+ engines: {node: '>=12.0.0'}+ peerDependencies:+ picomatch: ^3 || ^4+ peerDependenciesMeta:+ picomatch:+ optional: true+resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==}engines: {node: ^12.20 || >= 14.13}@@ -5377,6 +5559,9 @@ packages:engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}os: [darwin]+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}+resolution: {integrity: sha512-RB5vLV+vvQeoFPCX4QMK6/hjVkbIamPp1QSUD0CiZcnj12qbpiL+pLbYtgD+oZkWl0tl9z+o2Utp+MpM3QRhBA==}engines: {node: '>=18'}@@ -5423,6 +5608,10 @@ packages:resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}+ resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==}@@ -5468,6 +5657,10 @@ packages:resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}+ resolution: {integrity: sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}@@ -5478,6 +5671,9 @@ packages:engines: {node: '>=14.16'}hasBin: true+ resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}+resolution: {integrity: sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==}engines: {node: '>=18'}@@ -5486,6 +5682,9 @@ packages:resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==}engines: {node: '>=16'}+ resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}+resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==}@@ -5498,6 +5697,80 @@ packages:resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==}+ resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [android]++ resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [darwin]++ resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [darwin]++ resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [freebsd]++ resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm]+ os: [linux]++ resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [win32]++ resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [win32]++ resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==}+ engines: {node: '>= 12.0.0'}+resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==}engines: {node: '>=14'}@@ -5568,6 +5841,11 @@ packages:engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}hasBin: true+ resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==}+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}+ hasBin: true+resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}engines: {node: '>=10.5.0'}@@ -5612,12 +5890,19 @@ packages:resolution: {integrity: sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==}+ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}+resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}+ resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-KvvtD7SrlBP7dlgkBghEE3r84CABm5SmV2aNcG4oCA+qDnJ/tvKonFVvwWAyyWUEwxuNawdfEAZKP9zM3oZ2Uw==}engines: {node: '>=4'}@@ -5626,6 +5911,10 @@ packages:resolution: {integrity: sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==}engines: {node: ^10 || ^12 || >=14}+ resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==}+ engines: {node: ^10 || ^12 || >=14}+resolution: {integrity: sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==}peerDependencies:@@ -5682,6 +5971,11 @@ packages:resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}+ resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==}+ engines: {node: '>= 0.4'}+ hasBin: true+resolution: {integrity: sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw==}@@ -5696,6 +5990,18 @@ packages:resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==}engines: {node: '>=8.0'}+ resolution: {integrity: sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig==}+ engines: {node: ^20.19.0 || >=22.12.0}+ hasBin: true++ resolution: {integrity: sha512-UgnEsfciXSPpASuOelix7m4DrmyQgiaWBnvI0TM4GxuDh5FkqW8E5hu57bCxXB90VvR1WNfLV80yEDN18UogSA==}+ engines: {node: '>=16'}+ peerDependencies:+ rollup: ^3.29.4 || ^4+ typescript: ^4.5 || ^5.0+resolution: {integrity: sha512-RXOqwaPsBGjMNMa4sQjDjHieHEZDFoj/Rdr46l2MU5DfEs16wHJPC2RPTPHWhNl+M3aI472LLqFkFKut4SblOg==}engines: {node: '>=18.0.0', npm: '>=8.0.0'}@@ -5778,6 +6084,10 @@ packages:resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==}engines: {node: '>=16'}+ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==}@@ -5803,6 +6113,10 @@ packages:resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}+ resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}+ engines: {node: '>=12.0.0'}+resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}@@ -5896,6 +6210,49 @@ packages:terser:optional: true+ resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==}+ engines: {node: ^20.19.0 || >=22.12.0}+ hasBin: true+ peerDependencies:+ '@types/node': ^20.19.0 || >=22.12.0+ '@vitejs/devtools': ^0.4.0 || ^0.5.0+ esbuild: ^0.27.0 || ^0.28.0+ jiti: '>=1.21.0'+ less: ^4.0.0+ sass: ^1.70.0+ sass-embedded: ^1.70.0+ stylus: '>=0.54.8'+ sugarss: ^5.0.0+ terser: ^5.16.0+ tsx: ^4.8.1+ yaml: ^2.4.2+ peerDependenciesMeta:+ '@types/node':+ optional: true+ '@vitejs/devtools':+ optional: true+ esbuild:+ optional: true+ jiti:+ optional: true+ less:+ optional: true+ sass:+ optional: true+ sass-embedded:+ optional: true+ stylus:+ optional: true+ sugarss:+ optional: true+ terser:+ optional: true+ tsx:+ optional: true+ yaml:+ optional: true+resolution: {integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==}hasBin: true@@ -6273,6 +6630,13 @@ snapshots:'@aws/[email protected]': {}+ '@babel/[email protected]':+ dependencies:+ '@babel/helper-validator-identifier': 7.29.7+ js-tokens: 4.0.0+ picocolors: 1.1.1+ optional: true+'@babel/[email protected]': {}'@babel/[email protected]': {}@@ -7141,6 +7505,8 @@ snapshots:'@napi-rs/[email protected]':optional: true+ '@oxc-project/[email protected]': {}+'@protobufjs/[email protected]': {}'@protobufjs/[email protected]': {}@@ -7166,6 +7532,71 @@ snapshots:modern-tar: 0.7.7yargs: 18.1.0+ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]':+ optional: true++ '@rolldown/[email protected]': {}++ '@rollup/[email protected]([email protected])':+ dependencies:+ '@rollup/pluginutils': 5.4.0([email protected])+ '@types/resolve': 1.20.2+ deepmerge: 4.3.1+ is-module: 1.0.0+ resolve: 1.22.12+ optionalDependencies:+ rollup: 4.62.4++ '@rollup/[email protected]([email protected])':+ dependencies:+ '@types/estree': 1.0.9+ estree-walker: 2.0.2+ picomatch: 4.0.7+ optionalDependencies:+ rollup: 4.62.4+'@rollup/[email protected]':optional: true@@ -7351,6 +7782,8 @@ snapshots:dependencies:undici-types: 7.16.0+ '@types/[email protected]': {}+'@types/[email protected]': {}'@types/[email protected]': {}@@ -7359,9 +7792,9 @@ snapshots:'@ungap/[email protected]': {}- '@vitejs/[email protected]([email protected](@types/[email protected]))([email protected]([email protected]))':+ '@vitejs/[email protected]([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))':dependencies:- vite: 5.4.21(@types/[email protected])+ vite: 5.4.21(@types/[email protected])([email protected])vue: 3.5.41([email protected])'@vue/[email protected]':@@ -7628,6 +8061,8 @@ snapshots:dependencies:ms: 2.1.3+ [email protected]: {}+@@ -7829,6 +8264,10 @@ snapshots:+ optionalDependencies:+ picomatch: 4.0.7+dependencies:node-domexception: 1.0.0@@ -7868,6 +8307,8 @@ snapshots:optional: true+ [email protected]: {}+dependencies:extend: 3.0.2@@ -7927,6 +8368,10 @@ snapshots:dependencies:es-define-property: 1.0.1+ dependencies:+ function-bind: 1.1.2+dependencies:'@types/hast': 3.0.5@@ -8012,18 +8457,27 @@ snapshots:+ dependencies:+ hasown: 2.0.4+dependencies:is-docker: 3.0.0+ [email protected]: {}+dependencies:is-inside-container: 1.0.0+ optional: true+dependencies:bignumber.js: 9.3.1@@ -8041,6 +8495,55 @@ snapshots:jwa: 2.0.1safe-buffer: 5.2.1+ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ dependencies:+ detect-libc: 2.1.2+ optionalDependencies:+ lightningcss-android-arm64: 1.33.0+ lightningcss-darwin-arm64: 1.33.0+ lightningcss-darwin-x64: 1.33.0+ lightningcss-freebsd-x64: 1.33.0+ lightningcss-linux-arm-gnueabihf: 1.33.0+ lightningcss-linux-arm64-gnu: 1.33.0+ lightningcss-linux-arm64-musl: 1.33.0+ lightningcss-linux-x64-gnu: 1.33.0+ lightningcss-linux-x64-musl: 1.33.0+ lightningcss-win32-arm64-msvc: 1.33.0+ lightningcss-win32-x64-msvc: 1.33.0+@@ -8108,6 +8611,8 @@ snapshots:+ [email protected]: {}+@@ -8156,10 +8661,14 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:cssesc: 3.0.0@@ -8171,6 +8680,12 @@ snapshots:picocolors: 1.1.1source-map-js: 1.2.1+ dependencies:+ nanoid: 3.3.18+ picocolors: 1.1.1+ source-map-js: 1.2.1+@@ -8252,6 +8767,13 @@ snapshots:+ dependencies:+ es-errors: 1.3.0+ is-core-module: 2.16.2+ path-parse: 1.0.7+ supports-preserve-symlinks-flag: 1.0.0+@@ -8267,6 +8789,35 @@ snapshots:semver-compare: 1.0.0sprintf-js: 1.1.3+ dependencies:+ '@oxc-project/types': 0.148.0+ '@rolldown/pluginutils': 1.0.1+ optionalDependencies:+ '@rolldown/binding-android-arm-eabi': 1.2.7+ '@rolldown/binding-android-arm64': 1.2.7+ '@rolldown/binding-darwin-arm64': 1.2.7+ '@rolldown/binding-darwin-x64': 1.2.7+ '@rolldown/binding-freebsd-x64': 1.2.7+ '@rolldown/binding-linux-arm-gnueabihf': 1.2.7+ '@rolldown/binding-linux-arm64-gnu': 1.2.7+ '@rolldown/binding-linux-arm64-musl': 1.2.7+ '@rolldown/binding-linux-ppc64-gnu': 1.2.7+ '@rolldown/binding-linux-s390x-gnu': 1.2.7+ '@rolldown/binding-linux-x64-gnu': 1.2.7+ '@rolldown/binding-linux-x64-musl': 1.2.7+ '@rolldown/binding-openharmony-arm64': 1.2.7+ '@rolldown/binding-win32-arm64-msvc': 1.2.7+ '@rolldown/binding-win32-x64-msvc': 1.2.7++ dependencies:+ magic-string: 0.30.21+ rollup: 4.62.4+ typescript: 5.9.3+ optionalDependencies:+ '@babel/code-frame': 7.29.7+dependencies:'@types/estree': 1.0.9@@ -8404,6 +8955,8 @@ snapshots:dependencies:copy-anything: 4.0.5+ [email protected]: {}+@@ -8454,6 +9007,11 @@ snapshots:+ dependencies:+ fdir: 6.5.0([email protected])+ picomatch: 4.0.7+@@ -8522,7 +9080,7 @@ snapshots:'@types/unist': 3.0.3vfile-message: 4.0.3- [email protected](@types/[email protected]):dependencies:esbuild: 0.21.5postcss: 8.5.25@@ -8530,8 +9088,22 @@ snapshots:optionalDependencies:'@types/node': 24.10.1fsevents: 2.3.3+ lightningcss: 1.33.0- [email protected](@algolia/[email protected])(@types/[email protected])([email protected])([email protected])([email protected]):+ dependencies:+ lightningcss: 1.33.0+ picomatch: 4.0.7+ postcss: 8.5.28+ rolldown: 1.2.7+ tinyglobby: 0.2.17+ optionalDependencies:+ '@types/node': 24.10.1+ esbuild: 0.27.7+ fsevents: 2.3.3+ tsx: 4.21.0++ [email protected](@algolia/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:'@docsearch/css': 3.8.2'@docsearch/js': 3.8.2(@algolia/[email protected])([email protected])@@ -8540,7 +9112,7 @@ snapshots:'@shikijs/transformers': 2.5.0'@shikijs/types': 2.5.0'@types/markdown-it': 14.1.2- '@vitejs/plugin-vue': 5.2.4([email protected](@types/[email protected]))([email protected]([email protected]))+ '@vitejs/plugin-vue': 5.2.4([email protected](@types/[email protected])([email protected]))([email protected]([email protected]))'@vue/devtools-api': 7.7.10'@vue/shared': 3.5.41'@vueuse/core': 12.8.2([email protected])@@ -8549,10 +9121,10 @@ snapshots:mark.js: 8.11.1minisearch: 7.2.0shiki: 2.5.0- vite: 5.4.21(@types/[email protected])+ vite: 5.4.21(@types/[email protected])([email protected])vue: 3.5.41([email protected])optionalDependencies:- postcss: 8.5.25+ postcss: 8.5.28transitivePeerDependencies:- '@algolia/client-search'- '@types/node'diff --git a/scripts/build-public-types.mjs b/scripts/build-public-types.mjsnew file mode 100644index 00000000..88364ebc--- /dev/null+++ b/scripts/build-public-types.mjs@@ -0,0 +1,63 @@+import { mkdir, readFile, rm } from "node:fs/promises";+import { dirname, isAbsolute, relative, resolve, sep } from "node:path";+import { fileURLToPath } from "node:url";++import { nodeResolve } from "@rollup/plugin-node-resolve";+import { rollup } from "rollup";+import { dts } from "rollup-plugin-dts";++const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");+const manifest = JSON.parse(await readFile(resolve(packageRoot, "package.json"), "utf8"));+const outputRoot = resolve(packageRoot, "dist/public");++function publicEntryTarget(name, declared) {+ if (typeof declared === "string") {+ throw new Error(`${name} must declare separate types and import targets`);+ }+ if (declared === null || typeof declared !== "object") {+ throw new Error(`${name} has an unsupported export declaration`);+ }+ if (typeof declared.types !== "string" || typeof declared.import !== "string") {+ throw new Error(`${name} must declare string types and import targets`);+ }+ return { input: declared.import, output: declared.types };+}++const entries = Object.entries(manifest.exports ?? {}).map(([name, declared]) => {+ if (!name.startsWith("./") || name === "./") {+ throw new Error(`Unsupported public export name ${name}`);+ }+ const target = publicEntryTarget(name, declared);+ const input = resolve(packageRoot, target.input);+ const output = resolve(packageRoot, target.output);+ const relativeOutput = relative(outputRoot, output);+ if (relativeOutput === "" || relativeOutput === ".."+ || relativeOutput.startsWith(`..${sep}`) || isAbsolute(relativeOutput)) {+ throw new Error(`${name} writes outside dist/public`);+ }+ return { name, input, output };+});++await rm(outputRoot, { recursive: true, force: true });+await mkdir(outputRoot, { recursive: true });++for (const entry of entries) {+ const bundle = await rollup({+ input: entry.input,+ onwarn(warning, warn) {+ if (warning.code === "UNRESOLVED_IMPORT") {+ throw new Error(`${entry.name}: ${warning.message}`);+ }+ warn(warning);+ },+ plugins: [+ nodeResolve({ extensions: [".ts", ".d.ts", ".js"] }),+ dts({ respectExternal: false }),+ ],+ });+ try {+ await bundle.write({ file: entry.output, format: "es" });+ } finally {+ await bundle.close();+ }+}diff --git a/skills/hypit/references/production/examples/visuals.ts b/skills/hypit/references/production/examples/visuals.tsindex 12471c4e..9adc7b85 100644--- a/skills/hypit/references/production/examples/visuals.ts+++ b/skills/hypit/references/production/examples/visuals.ts@@ -1,8 +1,8 @@-import { sealVisualTrack } from "@hypit/composition";-import type { FrameSpan } from "@hypit/composition";-import type { FontArtifactRef } from "@hypit/media";-import type { ProgramSpace } from "@hypit/program-space";-import { VISUAL_IR_V1 } from "@hypit/visual-ir";+import { sealVisualTrack } from "hypit/composition";+import type { FrameSpan } from "hypit/composition";+import type { FontArtifactRef } from "hypit/media";+import type { ProgramSpace } from "hypit/program-space";+import { VISUAL_IR_V1 } from "hypit/visual-ir";// The caller supplies its projected Window, resolved Frame and selected font faces.export function renderCard(input: {diff --git a/skills/hypit/references/production/examples/wordless-take.ts b/skills/hypit/references/production/examples/wordless-take.tsindex d6f977c6..219b2bdd 100644--- a/skills/hypit/references/production/examples/wordless-take.ts+++ b/skills/hypit/references/production/examples/wordless-take.ts@@ -1,6 +1,6 @@-import type { SynchronizedMedia } from "@hypit/media";-import type { Narrative, NarrativeExcerpt } from "@hypit/narrative";-import { materializeSemanticTake } from "@hypit/speech";+import type { SynchronizedMedia } from "hypit/media";+import type { Narrative, NarrativeExcerpt } from "hypit/narrative";+import { materializeSemanticTake } from "hypit/speech";// Expose this adapter through a project Producer/Surface with a take output.export function wordlessTake(diff --git a/test/alpha-video-fixture.ts b/test/alpha-video-fixture.tsnew file mode 100644index 00000000..4131bc18--- /dev/null+++ b/test/alpha-video-fixture.ts@@ -0,0 +1,83 @@+import assert from "node:assert/strict";+import { spawnSync } from "node:child_process";+import { readFile, writeFile } from "node:fs/promises";+import { join } from "node:path";+import { MemoryResourceStore } from "../packages/driver-node/src/index.js";+export { MemoryResourceStore };+import { executeInspectMedia, executeNormalizeMedia } from "../packages/media-execution/src/index.js";+import type { MediaExecutionEnvironment } from "../packages/media-execution/src/index.js";+import { verifyMediaInspection, verifySynchronizedMedia } from "@hypit/media";+import { selectMediaStreams } from "@hypit/media-pipeline";+import { canonicalize } from "@hypit/protocol";+import type { BlobRef } from "@hypit/protocol";++export function ffmpegBytes(args: string[], input?: Uint8Array): Buffer {+ const result = spawnSync("ffmpeg", ["-v", "error", "-y", ...args], {+ ...(input === undefined ? {} : { input }), maxBuffer: 16 * 1024 * 1024,+ });+ assert.equal(result.status, 0, result.stderr.toString());+ return result.stdout;+}++export const alphaSize = { width: 96, height: 64 };+export async function transparentVideoFixture(directory: string, format: "webm" | "webm-vp8" | "mov") {+ const { width, height } = alphaSize;+ const rgba = Buffer.alloc(width * height * 4 * 8);+ for (let f = 0; f < 8; f++) {+ for (let y = 16; y < 48; y++) for (let x = 16 + f; x < 64 + f; x++) {+ const offset = ((f * height + y) * width + x) * 4;+ rgba[offset] = 240;+ rgba[offset + 1] = 20;+ rgba[offset + 2] = 20;+ rgba[offset + 3] = x < 48 + f ? 255 : 128;+ }+ }+ const path = join(directory, format === "mov" ? "input.mov" : "input.webm");+ ffmpegBytes(["-f", "rawvideo", "-pix_fmt", "rgba", "-s", `${width}x${height}`, "-r", "8", "-i", "pipe:0",+ "-f", "lavfi", "-i", "sine=frequency=440:sample_rate=48000:duration=1",+ ...(format === "webm-vp8"+ // The portrait service returns VP8 with audio before the visual stream.+ ? ["-map", "1:a:0", "-map", "0:v:0", "-c:v", "libvpx", "-pix_fmt", "yuva420p", "-auto-alt-ref", "0", "-c:a", "libopus"]+ : format === "webm"+ ? ["-c:v", "libvpx-vp9", "-pix_fmt", "yuva420p", "-lossless", "1", "-auto-alt-ref", "0", "-c:a", "libopus"]+ : ["-c:v", "qtrle", "-pix_fmt", "argb", "-c:a", "pcm_s16le"]),+ "-t", "1", path], rgba);+ return { path, bytes: await readFile(path), mediaType: format === "mov" ? "video/quicktime" : "video/webm" };+}++export function testMediaEnvironment(resources: MemoryResourceStore): MediaExecutionEnvironment {+ return {+ ffmpegPath: "ffmpeg", ffprobePath: "ffprobe", processTimeoutMs: 60_000, maxProbeOutputBytes: 8 * 1024 * 1024,+ artifacts: {+ get: (source) => resources.get(source.resource),+ open: async (source) => {+ const bytes = await resources.get(source.resource);+ return bytes === undefined ? undefined : (async function* () { yield bytes; })();+ },+ put: (bytes, mediaType) => resources.put(bytes, mediaType),+ putFile: async (path, mediaType) => resources.put(await readFile(path), mediaType),+ },+ };+}++export async function normalizeTestVideo(resources: MemoryResourceStore, source: BlobRef, withAudio: boolean) {+ const env = testMediaEnvironment(resources);+ const inspected = await executeInspectMedia(env, canonicalize({ source }));+ assert.equal(inspected.value.kind, "inline");+ const inspection = inspected.value.value;+ verifyMediaInspection(inspection);+ const frameRate = { numerator: 12, denominator: 1 };+ const selection = selectMediaStreams(inspection, {+ video: { mode: "primary-moving" }, audio: { mode: withAudio ? "default" : "none" }, spanAuthority: "video", frameRate,+ });+ const result = await executeNormalizeMedia(env, canonicalize({ source, inspection, selection, frameRate,+ audio: { sampleRate: 48_000, channels: 2, codec: "pcm_s16le", loudness: "preserve" } }));+ assert.equal(result.value.kind, "inline");+ verifySynchronizedMedia(result.value.value);+ return result.value.value;+}++export async function writeTestArtifact(resources: MemoryResourceStore, source: BlobRef, path: string) {+ await writeFile(path, (await resources.get(source.resource))!);+ return path;+}