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
refactor: give models and kits independent package ownership
kashorin43a8250b0bce
diff --git a/packages/elevenlabs-speech/package.json b/packages/elevenlabs-speech/package.jsonindex 9ff9cc73..5a962daf 100644--- a/packages/elevenlabs-speech/package.json+++ b/packages/elevenlabs-speech/package.json@@ -1,6 +1,6 @@{"name": "@hypit/elevenlabs-speech",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,10 +10,17 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",- "@hypit/model-kit": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*","@hypit/markup": "workspace:*"diff --git a/packages/elevenlabs-speech/src/activation.ts b/packages/elevenlabs-speech/src/activation.tsindex 363b63d5..3ad4f7f3 100644--- a/packages/elevenlabs-speech/src/activation.ts+++ b/packages/elevenlabs-speech/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {decodeElevenLabsVoiceDesignSurface,@@ -10,12 +12,12 @@ import {} from "./index.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: elevenLabsSpeechManifest }],- components: [elevenLabsSpeechComponent],- hostFacets: [- elevenLabsSpeechDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[elevenLabsSpeechComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ elevenLabsSpeechDefinition.facet,+ createMarkupSurfaceFacet({module: elevenLabsSpeechModuleRef,declaration: elevenLabsSpeechMarkupSurfaces.find((item) => item.name === "voiceDesign")!,handler: decodeElevenLabsVoiceDesignSurface,diff --git a/packages/elevenlabs-speech/src/fragment.ts b/packages/elevenlabs-speech/src/fragment.tsindex 7204e895..bb606c1e 100644--- a/packages/elevenlabs-speech/src/fragment.ts+++ b/packages/elevenlabs-speech/src/fragment.ts@@ -1,5 +1,5 @@-import { createExactModelPrimaryGenerationFragment } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";+import { createExactModelPrimaryGenerationFragment } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";/** Model result projection over the same graph-native request assembly as every exact model. */export function createElevenLabsSpeechAudioFragment(diff --git a/packages/elevenlabs-speech/src/index.ts b/packages/elevenlabs-speech/src/index.tsindex e7186d8c..66eeec60 100644--- a/packages/elevenlabs-speech/src/index.ts+++ b/packages/elevenlabs-speech/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const elevenLabsSpeechModuleRef = { name: "@hypit/elevenlabs-speech", version: "1" } as const;export const elevenLabsSpeechModels = ["eleven_ttv_v3"] as const;@@ -77,7 +77,7 @@ const spokenAttributes: readonly SurfaceAttributeVocabulary[] = [const referencePort: readonly SurfacePortVocabulary[] = [{name: "reference",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The designed voice reference, addressed as `<id>.reference`.",}];diff --git a/packages/elevenlabs-speech/src/surface.ts b/packages/elevenlabs-speech/src/surface.tsindex 03ab681c..9dbb0d8d 100644--- a/packages/elevenlabs-speech/src/surface.ts+++ b/packages/elevenlabs-speech/src/surface.ts@@ -1,16 +1,11 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding } from "@hypit/generation";-import type { GenerationMediaPort } from "@hypit/generation";-import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";-import type { CanonicalValue } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding } from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";+import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";+import { textTypes, verifyText } from "@hypit/hypit/text";+import type { CanonicalValue } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";import { createElevenLabsSpeechAudioFragment } from "./fragment.js";import { elevenLabsSpeechEndpoints, sealElevenLabsSpeechRequestDraft } from "./index.js";diff --git a/packages/elevenlabs-speech/test/elevenlabs-speech.test.ts b/packages/elevenlabs-speech/test/elevenlabs-speech.test.tsindex a66c8a3e..cdf8e0e6 100644--- a/packages/elevenlabs-speech/test/elevenlabs-speech.test.ts+++ b/packages/elevenlabs-speech/test/elevenlabs-speech.test.ts@@ -1,7 +1,7 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/blob";import { generationTypes } from "@hypit/generation";import { parseStructuredElement } from "@hypit/markup";import type { SurfaceResolvedReference } from "@hypit/markup";@@ -49,7 +49,7 @@ test("ElevenLabs Speech declares the exact voice design request shape", () => {text: ["A voice sample with enough detail to make the test intent clear."],voiceDescription: ["a".repeat(1001)],}), /voiceDescription.+1000/u);- assert.equal(elevenLabsNodePackage.format, "hypit.node-package@1");+ assert.equal(elevenLabsNodePackage.format, "hypit.package@1");assert.deepEqual(elevenLabsSpeechMarkupSurfaces.map((surface) => surface.name), ["voiceDesign"]);});@@ -59,7 +59,7 @@ test("VoiceDesign publishes one reusable voice reference", async () => {</eleven:VoiceDesign>`));assert.deepEqual(result.components[0]!.outputs, { audio: "host.reference" });const exported = result.fragments[0]!.exports.find((item) => item.name === "audio");- assert.deepEqual(exported?.type, artifactTypes.blob);+ assert.deepEqual(exported?.type, blobTypes.blob);assert.deepEqual(result.components[0]!.inputs["speech:text"], {kind: "record",id: "story.segment.opening.speech",diff --git a/packages/fishaudio-speech/package.json b/packages/fishaudio-speech/package.jsonindex 871cb8c8..d2e1036d 100644--- a/packages/fishaudio-speech/package.json+++ b/packages/fishaudio-speech/package.json@@ -1,6 +1,6 @@{"name": "@hypit/fishaudio-speech",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,10 +10,17 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",- "@hypit/model-kit": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*","@hypit/markup": "workspace:*"diff --git a/packages/fishaudio-speech/src/activation.ts b/packages/fishaudio-speech/src/activation.tsindex 383328e9..250609e6 100644--- a/packages/fishaudio-speech/src/activation.ts+++ b/packages/fishaudio-speech/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {decodeFishAudioVoiceCloneSurface,@@ -11,17 +13,17 @@ import {} from "./index.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: fishAudioSpeechManifest }],- components: [fishAudioSpeechComponent],- hostFacets: [- fishAudioSpeechDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[fishAudioSpeechComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ fishAudioSpeechDefinition.facet,+ createMarkupSurfaceFacet({module: fishAudioSpeechModuleRef,declaration: fishAudioSpeechMarkupSurfaces.find((item) => item.name === "voiceDesign")!,handler: decodeFishAudioVoiceDesignSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: fishAudioSpeechModuleRef,declaration: fishAudioSpeechMarkupSurfaces.find((item) => item.name === "voiceClone")!,handler: decodeFishAudioVoiceCloneSurface,diff --git a/packages/fishaudio-speech/src/fragment.ts b/packages/fishaudio-speech/src/fragment.tsindex 068b7cc7..9113d09c 100644--- a/packages/fishaudio-speech/src/fragment.ts+++ b/packages/fishaudio-speech/src/fragment.ts@@ -1,5 +1,5 @@-import { createExactModelPrimaryGenerationFragment } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";+import { createExactModelPrimaryGenerationFragment } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";/** Model result projection over the same graph-native request assembly as every exact model. */export function createFishAudioSpeechAudioFragment(diff --git a/packages/fishaudio-speech/src/index.ts b/packages/fishaudio-speech/src/index.tsindex ef210d25..a176d33c 100644--- a/packages/fishaudio-speech/src/index.ts+++ b/packages/fishaudio-speech/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const fishAudioSpeechModuleRef = { name: "@hypit/fishaudio-speech", version: "1" } as const;export const fishAudioSpeechModels = [@@ -92,13 +92,13 @@ const spokenAttributes: readonly SurfaceAttributeVocabulary[] = [const referencePort: readonly SurfacePortVocabulary[] = [{name: "reference",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The designed voice reference, addressed as `<id>.reference`.",}];const audioPort: readonly SurfacePortVocabulary[] = [{name: "audio",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The independent speech, addressed as `<id>.audio`.",}];@@ -135,7 +135,7 @@ export const fishAudioSpeechMarkupSurfaces = [kind: "reference",required: true,summary: "The audio Resource carrying the voice identity to reproduce.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},],ports: audioPort,diff --git a/packages/fishaudio-speech/src/surface.ts b/packages/fishaudio-speech/src/surface.tsindex f2496941..090b7970 100644--- a/packages/fishaudio-speech/src/surface.ts+++ b/packages/fishaudio-speech/src/surface.ts@@ -1,16 +1,11 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding } from "@hypit/generation";-import type { GenerationMediaPort } from "@hypit/generation";-import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";-import type { CanonicalValue } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding } from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";+import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";+import { textTypes, verifyText } from "@hypit/hypit/text";+import type { CanonicalValue } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";import { createFishAudioSpeechAudioFragment } from "./fragment.js";import { fishAudioSpeechEndpoints, sealFishAudioSpeechRequestDraft } from "./index.js";@@ -65,7 +60,7 @@ function speechText(reference: SurfaceResolvedReference, subject: string): Surfa}function voiceReference(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {- if (!sameType(reference.type, artifactTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);+ if (!sameType(reference.type, blobTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);const value = reference.record?.value;if (value !== undefined && (value.kind !== "blob" || !value.mediaType.startsWith("audio/"))) {throw new Error(`${subject} must reference audio media`);diff --git a/packages/fishaudio-speech/test/fishaudio-speech.test.ts b/packages/fishaudio-speech/test/fishaudio-speech.test.tsindex 54f46b1b..3fa6db06 100644--- a/packages/fishaudio-speech/test/fishaudio-speech.test.ts+++ b/packages/fishaudio-speech/test/fishaudio-speech.test.ts@@ -1,7 +1,7 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/blob";import { generationTypes } from "@hypit/generation";import { parseStructuredElement } from "@hypit/markup";import type { SurfaceResolvedReference } from "@hypit/markup";@@ -36,10 +36,10 @@ const speechReference: SurfaceResolvedReference = {const voiceReference: SurfaceResolvedReference = {path: "host.reference",ref: { kind: "record", id: "host.reference" },- type: artifactTypes.blob,+ type: blobTypes.blob,record: {id: "host.reference",- type: artifactTypes.blob,+ type: blobTypes.blob,value: { kind: "blob", resource: "res_voice-reference", size: 4, mediaType: "audio/wav" },},};@@ -65,7 +65,7 @@ test("Fish Audio Speech declares the two exact audio request shapes", () => {});test("the installed author package contributes the two explicit speech operations", () => {- assert.equal(fishAudioNodePackage.format, "hypit.node-package@1");+ assert.equal(fishAudioNodePackage.format, "hypit.package@1");assert.equal(fishAudioNodePackage.modules[0]?.manifest.version, "1");assert.deepEqual(fishAudioSpeechMarkupSurfaces.map((surface) => surface.name), ["voiceDesign", "voiceClone"]);});@@ -76,7 +76,7 @@ test("VoiceDesign publishes one reusable voice reference", async () => {</fish:VoiceDesign>`));assert.deepEqual(result.components[0]!.outputs, { audio: "host.reference" });const exported = result.fragments[0]!.exports.find((item) => item.name === "audio");- assert.deepEqual(exported?.type, artifactTypes.blob);+ assert.deepEqual(exported?.type, blobTypes.blob);assert.deepEqual(result.components[0]!.inputs["speech:text"], {kind: "record",id: "story.segment.opening.speech",diff --git a/packages/generation/README.md b/packages/generation/README.mdindex 199bb485..42595ea6 100644--- a/packages/generation/README.md+++ b/packages/generation/README.md@@ -20,14 +20,30 @@ Provider and only use operations its API actually exposes. The generic helper necatalogue nor switches to another route after a failure. Actual URL resolution belongs to requestexecution, not to discovering a model name or making a planning placeholder.-The package owns `GenerationRequest`, `GeneratedImageSet` and `GeneratedVideoSet` identities,+The package owns `GenerationRequest`, `GeneratedAudioSet`, `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.This package does not choose a model, Provider, credential, queue or retry policy. Model packages-declare exact request Capabilities; selected Endpoint packages implement those+declare exact request Capabilities; selected Provider packages create Endpoint instances that implement thoseCapabilities in a selected Runtime Profile.+## Exact Model authoring++`@hypit/hypit/generation/model` is the author-model subpath for defining an exact generated-media+Model without repeating the nominal Type → Producer → Need → Graph Fragment shell. It belongs to+Generation because it derives request Types, validation, facets and author bindings directly from+one `GenerationPortTable`; it is not a second Model registry or a generic kit.++```ts+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { sealGenerationPortTable } from "@hypit/hypit/generation";+```++The Model still owns its exact name, accepted ports, constraints and validation. The selected+Provider separately owns supported wire mappings and execution. The helper performs no Provider+selection, fallback, credential lookup or Runtime routing.+## Reference fields in resource transportA service may consume per-media metadata while preparing a URL rather than in its generation JSON.diff --git a/packages/generation/package.json b/packages/generation/package.jsonindex 60317864..939f0a04 100644--- a/packages/generation/package.json+++ b/packages/generation/package.json@@ -5,19 +5,23 @@"private": true,"type": "module","exports": {- ".": "./src/index.ts"+ ".": "./src/index.ts",+ "./model": "./src/model.ts"},"hypit": {"activation": "./src/activation.ts"},"dependencies": {- "@hypit/artifact": "workspace:*",- "@hypit/component-kit": "workspace:*",+ "@hypit/author": "workspace:*",+ "@hypit/blob": "workspace:*",+ "@hypit/facet": "workspace:*",+ "@hypit/producer": "workspace:*","@hypit/protocol": "workspace:*",- "@hypit/text": "workspace:*"+ "@hypit/text": "workspace:*",+ "@hypit/admission": "workspace:*"},"devDependencies": {- "@hypit/driver-node": "workspace:*",- "@hypit/validation": "workspace:*"+ "@hypit/executor": "workspace:*",+ "@hypit/admission": "workspace:*"}}diff --git a/packages/generation/src/activation.ts b/packages/generation/src/activation.tsindex 85185e9a..1fd646c0 100644--- a/packages/generation/src/activation.ts+++ b/packages/generation/src/activation.ts@@ -1,9 +1,11 @@+import { createAdmissionPackageFacet } from "@hypit/admission";+import { createProducerPackageFacet } from "@hypit/producer";import { generationComponent, generationManifest } from "./index.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: generationManifest }],- components: [generationComponent],+ facets: [...[generationComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)])],};export default hypitPackage;diff --git a/packages/generation/src/component.ts b/packages/generation/src/component.tsindex 8b13aca9..a7c28123 100644--- a/packages/generation/src/component.ts+++ b/packages/generation/src/component.ts@@ -1,4 +1,5 @@-import type { ComponentPackage } from "@hypit/component-kit";+import type { AdmissionPackage } from "@hypit/admission";+import type { ProducerPackage } from "@hypit/producer";import {verifyGeneratedAudioSet,@@ -74,4 +75,4 @@ export const generationComponent = {},},],-} satisfies ComponentPackage;+} satisfies ProducerPackage & AdmissionPackage;diff --git a/packages/generation/src/manifest.ts b/packages/generation/src/manifest.tsindex d56868f8..cf99e6b8 100644--- a/packages/generation/src/manifest.ts+++ b/packages/generation/src/manifest.ts@@ -1,7 +1,7 @@import {- artifactDependency,- artifactTypes,-} from "@hypit/artifact";+ blobDependency,+ blobTypes,+} from "@hypit/blob";import type { ModuleManifest, ProducerRef, TypeRef } from "@hypit/protocol";import { generatedAudioSetSchema, generatedImageSetSchema, generatedVideoSetSchema } from "./schema.js";@@ -23,7 +23,7 @@ export const generationManifest: ModuleManifest = {format: "hypit.module@1",name: generationModuleRef.name,version: generationModuleRef.version,- dependencies: [artifactDependency],+ dependencies: [blobDependency],types: [{name: generationTypes.audioSet.name,@@ -40,7 +40,7 @@ export const generationManifest: ModuleManifest = {{name: generationProducers.primaryAudio.name,inputs: [{ name: "set", type: generationTypes.audioSet }],- outputs: [{ name: "audio", type: artifactTypes.blob }],+ outputs: [{ name: "audio", type: blobTypes.blob }],needs: [],},{@@ -48,7 +48,7 @@ export const generationManifest: ModuleManifest = {inputs: [{ name: "set", type: generationTypes.imageSet }],outputs: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,}],needs: [],},@@ -57,7 +57,7 @@ export const generationManifest: ModuleManifest = {inputs: [{ name: "set", type: generationTypes.videoSet }],outputs: [{name: "video",- type: artifactTypes.blob,+ type: blobTypes.blob,}],needs: [],},diff --git a/packages/model-kit/src/index.ts b/packages/generation/src/model.tssimilarity index 94%rename from packages/model-kit/src/index.tsrename to packages/generation/src/model.tsindex bac86086..393e50be 100644--- a/packages/model-kit/src/index.ts+++ b/packages/generation/src/model.ts@@ -1,15 +1,15 @@+import type { AdmissionPackage, TypeValidatorFacet } from "@hypit/admission";import type {- ComponentPackage,+ ProducerPackage,PlannedNeedFacet,PlannedNeedPresentation,PlannedNeedSpecification,ProducerFacet,ProducerHandlerContext,- TypeValidatorFacet,-} from "@hypit/component-kit";-import { artifactDependency, artifactTypes } from "@hypit/artifact";-import { sealGraphFragment } from "@hypit/elaborator";-import type { HostFacet } from "@hypit/host";+} from "@hypit/producer";+import { blobDependency, blobTypes } from "@hypit/blob";+import { sealGraphFragment } from "@hypit/author";+import type { Facet } from "@hypit/facet";import {bindGenerationMedia,bindGenerationText,@@ -130,53 +130,53 @@ export type ExactModelModule<Key extends string = string> = {readonly manifest: ModuleManifest;/** Keyed by the endpoint keys declared by the module. */readonly endpoints: Readonly<Record<Key, ExactModelEndpoint>>;- readonly component: ComponentPackage & {+ readonly component: (ProducerPackage & AdmissionPackage) & {readonly validators: readonly TypeValidatorFacet[];readonly producers: readonly ProducerFacet[];readonly plannedNeeds: readonly PlannedNeedFacet[];};- /** Inert declaration of these exact models for Hosts that address one directly. */- readonly hostFacet: ExactModelHostFacet;+ /** Inert declaration of these exact models for consumers that address one directly. */+ readonly facet: ExactModelFacet;};-export const exactModelHostAbi = "hypit.exact-model-host@1";+export const exactModelFacetAbi = "hypit.exact-model@1";/**- * What one installed package can generate, named exactly, for a Host that drives a+ * What one installed package can generate, named exactly, for a caller that drives a* single model without a Build. It carries no Provider choice and no Runtime state;* the Host still resolves who fulfils the Capability.*/-export type ExactModelHostFacet = HostFacet & {- readonly abi: typeof exactModelHostAbi;+export type ExactModelFacet = Facet & {+ readonly abi: typeof exactModelFacetAbi;/** The exact model names this package declares, in declaration order. */readonly offers: readonly string[];readonly implementation: { readonly endpoints: readonly ExactModelEndpoint[] };};-function createExactModelHostFacet(endpoints: readonly ExactModelEndpoint[]): ExactModelHostFacet {- assert(endpoints.length > 0, "an exact model Host facet declares no endpoint");+function createExactModelFacet(endpoints: readonly ExactModelEndpoint[]): ExactModelFacet {+ assert(endpoints.length > 0, "an exact model facet declares no endpoint");return {- abi: exactModelHostAbi,+ abi: exactModelFacetAbi,offers: endpoints.map((item) => item.ports.model),implementation: { endpoints },};}-/** Read every exact model declared by one selected package's Host facets. */-export function exactModelsFromHostFacets(- facets: readonly HostFacet[],+/** Read every exact model declared by one selected package's exact-model facets. */+export function exactModelsFromFacets(+ facets: readonly Facet[],): readonly ExactModelEndpoint[] {const found: ExactModelEndpoint[] = [];for (const facet of facets) {- if (facet.abi !== exactModelHostAbi) continue;+ if (facet.abi !== exactModelFacetAbi) continue;const implementation = facet.implementation as { readonly endpoints?: unknown } | null;const declared = implementation === null ? undefined : implementation.endpoints;- assert(Array.isArray(declared), `${exactModelHostAbi} facet has an invalid implementation`);+ assert(Array.isArray(declared), `${exactModelFacetAbi} facet has an invalid implementation`);for (const item of declared as readonly unknown[]) {const endpoint = item as ExactModelEndpoint | null;assert(endpoint !== null && typeof endpoint === "object"&& typeof endpoint.key === "string" && typeof endpoint.ports?.model === "string",- `${exactModelHostAbi} facet declares an invalid exact model`);+ `${exactModelFacetAbi} facet declares an invalid exact model`);found.push(endpoint);}}@@ -258,7 +258,7 @@ function sameReference(/*** Read one exact-model request from its declared assembly graph.*- * This follows only the exact producers published by the model Host facet. It never searches for+ * This follows only the exact producers published by the exact-model facet. It never searches for* object shapes or guesses which upstream record "looks like" a request. Missing media stays a* symbolic graph edge; scalar parameters and authored Text remain available before the file exists.*/@@ -457,7 +457,7 @@ export function defineExactModelModule<const Key extends string>(version: options.module.version,dependencies: [{ module: generationModuleRef },- artifactDependency,+ blobDependency,textDependency,],types: endpointData.flatMap((item) => [@@ -494,7 +494,7 @@ export function defineExactModelModule<const Key extends string>(inputs: [{ name: "draft", type: item.draftType },{ name: "binding", type: binding.type },- { name: "artifact", type: artifactTypes.blob },+ { name: "artifact", type: blobTypes.blob },],outputs: [{ name: "draft", type: item.draftType }],needs: [],@@ -568,7 +568,7 @@ export function defineExactModelModule<const Key extends string>(module: { ...options.module },manifest,endpoints: endpoints as Readonly<Record<Key, ExactModelEndpoint>>,- hostFacet: createExactModelHostFacet(Object.values(endpoints) as readonly ExactModelEndpoint[]),+ facet: createExactModelFacet(Object.values(endpoints) as readonly ExactModelEndpoint[]),component: {validators: endpointData.flatMap((item) => [{type: item.requestType,@@ -714,7 +714,7 @@ export function createExactModelPrimaryGenerationFragment(assert(binding !== undefined, `${endpoint.ports.model} has no media port ${item.port}`);const inputNames = exactModelMediaInputNames(item.name);inputs.push({ name: inputNames.binding, type: binding.type });- inputs.push({ name: inputNames.artifact, type: artifactTypes.blob });+ inputs.push({ name: inputNames.artifact, type: blobTypes.blob });const id = `bind:${String(index + 1).padStart(4, "0")}:${item.port}`;operations.push({id,@@ -760,7 +760,7 @@ export function createExactModelPrimaryGenerationFragment(operations,exports: [{name: result,- type: artifactTypes.blob,+ type: blobTypes.blob,root: operation(`select-primary-${result}`),}],});diff --git a/packages/generation/test/identity.test.ts b/packages/generation/test/identity.test.tsindex d32585d5..90a7d210 100644--- a/packages/generation/test/identity.test.ts+++ b/packages/generation/test/identity.test.ts@@ -1,8 +1,8 @@import assert from "node:assert/strict";import test from "node:test";-import { registerTypeValidatorFacets } from "@hypit/component-kit";-import { MemoryResourceStore } from "@hypit/driver-node";+import { registerTypeValidatorFacets } from "@hypit/admission";+import { MemoryResourceStore } from "@hypit/executor";import {generationComponent,generationProducers,@@ -13,7 +13,7 @@ import {verifyGeneratedImageSet,verifyGeneratedAudioSet,} from "@hypit/generation";-import { TypeValidatorRegistry } from "@hypit/validation";+import { TypeValidatorRegistry } from "@hypit/admission";test("generated media validators bind artifacts and result contents", async () => {const store = new MemoryResourceStore();diff --git a/packages/model-kit/test/model-kit.test.ts b/packages/generation/test/model.test.tssimilarity index 99%rename from packages/model-kit/test/model-kit.test.tsrename to packages/generation/test/model.test.tsindex e496184e..d5947a5d 100644--- a/packages/model-kit/test/model-kit.test.ts+++ b/packages/generation/test/model.test.ts@@ -11,7 +11,7 @@ import {createExactModelPrimaryGenerationFragment,defineExactModelModule,plannedExactModelRequest,-} from "@hypit/model-kit";+} from "@hypit/generation/model";import type { BuildState } from "@hypit/protocol";import { sealText } from "@hypit/text";diff --git a/packages/generation/test/ports.test.ts b/packages/generation/test/ports.test.tsindex 2c58c574..59bd1820 100644--- a/packages/generation/test/ports.test.ts+++ b/packages/generation/test/ports.test.ts@@ -1,7 +1,7 @@import assert from "node:assert/strict";import test from "node:test";-import { MemoryResourceStore } from "@hypit/driver-node";+import { MemoryResourceStore } from "@hypit/executor";import {assertMappingCoversPorts,bindGenerationMedia,diff --git a/packages/gpt-image-kits/package.json b/packages/gpt-image-kits/package.jsonindex f9c5904e..115ca63a 100644--- a/packages/gpt-image-kits/package.json+++ b/packages/gpt-image-kits/package.json@@ -1,6 +1,6 @@{"name": "@hypit/gpt-image-kits",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -9,7 +9,7 @@},"files": ["kits", "README.md"],"devDependencies": {- "@hypit/svs": "workspace:*",+ "@hypit/recipe": "workspace:*","@hypit/text": "workspace:*"}}diff --git a/packages/gpt-image/README.md b/packages/gpt-image/README.mdindex 1493435c..313fe86a 100644--- a/packages/gpt-image/README.md+++ b/packages/gpt-image/README.md@@ -13,7 +13,7 @@ do not narrow this model-owned vocabulary or leak into author source.The one physical package exposes two independently importable logical modules:- `@hypit/gpt-image@1`: the raw exact model;-- `@hypit/gpt-image/clean@1`: generation followed by the existing explicit image-transform+- `@hypit/gpt-image/clean@1`: generation followed by an explicit shared image transformProgram, exporting one cleaned image while retaining both operations in the graph.Both modules own an `Image` Markup Surface. They use the same author shape, so choosing the clean@@ -46,8 +46,10 @@ Provider before generation.`prompt` is an ordinary `Text` graph edge. Every `Reference` is an ordinary image Artifact edge;the Surface does not copy runtime media into request metadata. The raw module expands to request-assembly, generation and primary-image selection. The clean module then adds the official-`gptImageDenoiseV1` Program and the shared image-transform Need as one further visible operation.+assembly, generation and primary-image selection. The clean module then adds its package-owned+`gptImageCleanupProgram` and the shared `Transform` Need as one further visible operation. The+generic image-operations package owns the Program shape and operation semantics; this package owns+the selected cleanup recipe.The Surface implementation belongs to this package. `model-kit` remains responsible only for theexact request and Fragment shell; it owns no author-Surface registry or model syntax.diff --git a/packages/gpt-image/package.json b/packages/gpt-image/package.jsonindex dbbb2bb7..2c253785 100644--- a/packages/gpt-image/package.json+++ b/packages/gpt-image/package.json@@ -1,6 +1,6 @@{"name": "@hypit/gpt-image",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,25 +10,32 @@"hypit": {"activation": "./src/activation.ts"},+ "files": [+ "dist",+ "README.md"+ ],"dependencies": {- "@hypit/artifact": "workspace:*",- "@hypit/elaborator": "workspace:*",- "@hypit/generation": "workspace:*",- "@hypit/image-transform": "workspace:*",- "@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*",- "@hypit/protocol": "workspace:*",- "@hypit/text": "workspace:*"+ "@hypit/image-operations": "workspace:^"+ },+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"},"devDependencies": {- "@hypit/core": "workspace:*",+ "@hypit/blob": "workspace:*",+ "@hypit/kernel": "workspace:*",+ "@hypit/author": "workspace:*",+ "@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*",+ "@hypit/markup": "workspace:*","@hypit/media": "workspace:*","@hypit/narrative": "workspace:*",- "@hypit/raster": "workspace:*",+ "@hypit/protocol": "workspace:*","@hypit/run": "workspace:*","@hypit/seedance": "workspace:*","@hypit/spatial": "workspace:*",- "@hypit/speech": "workspace:*",+ "@hypit/recipe": "workspace:*",+ "@hypit/temporal": "workspace:*",+ "@hypit/text": "workspace:*","@hypit/timeline": "workspace:*"}}diff --git a/packages/gpt-image/src/activation.ts b/packages/gpt-image/src/activation.tsindex 1c2b9921..17915324 100644--- a/packages/gpt-image/src/activation.ts+++ b/packages/gpt-image/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {gptImageCleanManifest,@@ -15,21 +17,21 @@ import {decodeGptImageSurface,} from "./surface.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{manifest: gptImageManifest,}, {manifest: gptImageCleanManifest,}],- components: [gptImageComponent],- hostFacets: [- gptImageDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[gptImageComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ gptImageDefinition.facet,+ createMarkupSurfaceFacet({module: gptImageModuleRef,declaration: gptImageMarkupSurfaces.find((item) => item.name === "image")!,handler: decodeGptImageSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: gptImageCleanModuleRef,declaration: gptImageCleanMarkupSurfaces.find((item) => item.name === "image")!,handler: decodeCleanGptImageSurface,diff --git a/packages/gpt-image/src/cleanup-program.ts b/packages/gpt-image/src/cleanup-program.tsnew file mode 100644index 00000000..c3de993c--- /dev/null+++ b/packages/gpt-image/src/cleanup-program.ts@@ -0,0 +1,17 @@+import { sealImageTransformProgram } from "@hypit/image-operations";++/** The package-owned cleanup recipe used by `@hypit/gpt-image/clean@1`. */+export const gptImageCleanupProgram = sealImageTransformProgram({+ operations: [{+ kind: "denoise",+ method: "nlm-ycrcb",+ lumaStrength: 2,+ chromaStrength: 10,+ templateWindow: 7,+ searchWindow: 21,+ saturationRecovery: 1.02,+ }, {+ kind: "encode",+ format: "png",+ }],+});diff --git a/packages/gpt-image/src/fragment.ts b/packages/gpt-image/src/fragment.tsindex d92c1ff4..2d4e98c0 100644--- a/packages/gpt-image/src/fragment.ts+++ b/packages/gpt-image/src/fragment.ts@@ -1,11 +1,11 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGraphFragment } from "@hypit/elaborator";-import { generationProducers } from "@hypit/generation";-import { imageTransformProducers, imageTransformTypes } from "@hypit/image-transform";-import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";-import type { FragmentOperation } from "@hypit/elaborator";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGraphFragment } from "@hypit/hypit/author";+import { generationProducers } from "@hypit/hypit/generation";+import { imageTransformProducers, imageTransformTypes } from "@hypit/image-operations";+import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";+import type { FragmentOperation } from "@hypit/hypit/author";+import { textTypes } from "@hypit/hypit/text";import { gptImageEndpoints } from "./index.js";@@ -49,7 +49,7 @@ export function createGptImageCleanFragment(if (binding === undefined) throw new Error(`gpt-image-2 has no media port ${item.port}`);const inputNames = exactModelMediaInputNames(item.name);inputs.push({ name: inputNames.binding, type: binding.type });- inputs.push({ name: inputNames.artifact, type: artifactTypes.blob });+ inputs.push({ name: inputNames.artifact, type: blobTypes.blob });const id = `bind:${String(index + 1).padStart(4, "0")}:${item.port}`;operations.push({id,@@ -94,7 +94,7 @@ export function createGptImageCleanFragment(operations,exports: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,root: operation("clean-image"),}],});diff --git a/packages/gpt-image/src/index.ts b/packages/gpt-image/src/index.tsindex 0519d28b..2150e5b1 100644--- a/packages/gpt-image/src/index.ts+++ b/packages/gpt-image/src/index.ts@@ -1,14 +1,14 @@-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/hypit/blob";import {sealGenerationPortRequest,sealGenerationRequestDraft,sealGenerationPortTable,-} from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { imageTransformModuleRef, imageTransformTypes } from "@hypit/image-transform";-import { textTypes } from "@hypit/text";+} from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { imageOperationsModuleRef, imageTransformTypes } from "@hypit/image-operations";+import { textTypes } from "@hypit/hypit/text";export const gptImageModuleRef = { name: "@hypit/gpt-image", version: "1" } as const;@@ -110,7 +110,7 @@ const gptImageChildren: readonly SurfaceChildVocabulary[] = [{ tag: "Reference", cardinality: "many",summary: "Attaches one image Artifact as a reference picture.",attributes: [- { name: "image", kind: "reference", required: true, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference", required: true, accepts: [blobTypes.blob],summary: "Selects the image Artifact this reference contributes." },] },];@@ -141,7 +141,7 @@ const gptImageSurfaceDeclaration = {children: gptImageChildren,ports: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The primary generated image, addressed as `<id>.image`.",}],example: gptImageExample,@@ -172,18 +172,18 @@ export const gptImageCleanMarkupSurfaces = [{imageTransformTypes.program,],vocabulary: {- summary: "Generates one picture with the exact GPT Image 2 model and runs the official denoise Program over it.",+ summary: "Generates one picture with the exact GPT Image 2 model and runs this package's cleanup Program over it.",attributes: gptImageAttributes,children: gptImageChildren,ports: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The cleaned image, addressed as `<id>.image`.",}],example: gptImageExample,notes: [...gptImageNotes,- "Generation and the image-transform Need stay two visible operations in the graph.",+ "Generation and the shared Transform Need stay two visible operations in the graph.",],},}] as const;@@ -194,10 +194,11 @@ export const gptImageCleanManifest = {version: gptImageCleanModuleRef.version,dependencies: [{ module: gptImageModuleRef },- { module: imageTransformModuleRef },+ { module: imageOperationsModuleRef },],types: [],capabilities: [],producers: [],};+export { gptImageCleanupProgram } from "./cleanup-program.js";export { createGptImageCleanFragment } from "./fragment.js";diff --git a/packages/gpt-image/src/surface.ts b/packages/gpt-image/src/surface.tsindex f13fbfe6..f4444787 100644--- a/packages/gpt-image/src/surface.ts+++ b/packages/gpt-image/src/surface.ts@@ -1,28 +1,21 @@-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/hypit/blob";import {generationPort,sealGenerationMediaBinding,-} from "@hypit/generation";-import type { GenerationMediaPort } from "@hypit/generation";-import {- gptImageDenoiseV1,- imageTransformTypes,-} from "@hypit/image-transform";+} from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";+import { imageTransformTypes } from "@hypit/image-operations";import {exactModelMediaInputNames,exactModelTextInputName,createExactModelPrimaryGenerationFragment,-} from "@hypit/model-kit";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+} from "@hypit/hypit/generation/model";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import { textTypes, verifyText } from "@hypit/hypit/text";import { createGptImageCleanFragment } from "./fragment.js";+import { gptImageCleanupProgram } from "./cleanup-program.js";import {gptImage2Ports,gptImageEndpoints,@@ -102,7 +95,7 @@ function references(exactAttributes(child, ["image"], ["image"]);assert(!child.children.some((item) => item.kind === "element" || item.value.trim().length > 0),`${child.name} must be empty`);- const image = resolve(child, "image", artifactTypes.blob, resolveReference);+ const image = resolve(child, "image", blobTypes.blob, resolveReference);if (image.record !== undefined) {assert(image.record.value.kind === "blob" && image.record.value.mediaType.startsWith("image/"),`${child.name}.image must reference image media`);@@ -167,7 +160,7 @@ function decode(clean: boolean): StructuredSurfaceHandler {records.push({id: `${id}.cleanup`,type: imageTransformTypes.program,- value: { kind: "inline", value: gptImageDenoiseV1 as unknown as CanonicalValue },+ value: { kind: "inline", value: gptImageCleanupProgram as unknown as CanonicalValue },range: element.range,});inputs.cleanup = { kind: "record", id: `${id}.cleanup` };diff --git a/packages/gpt-image/test/broll-graph.test.ts b/packages/gpt-image/test/broll-graph.test.tsindex c2298fe3..37180820 100644--- a/packages/gpt-image/test/broll-graph.test.ts+++ b/packages/gpt-image/test/broll-graph.test.ts@@ -2,7 +2,7 @@ import assert from "node:assert/strict";import test from "node:test";import { fixtureResource } from "../../../test/fixture-resource.js";-import { artifactManifest, artifactTypes } from "@hypit/artifact";+import { blobManifest, blobTypes } from "@hypit/blob";import {createResolvedClosure,link,@@ -10,8 +10,8 @@ import {sealCompiledGraph,sealRecord,start,-} from "@hypit/core";-import { elaborateAuthorGraph } from "@hypit/elaborator";+} from "@hypit/kernel";+import { elaborateAuthorGraph } from "@hypit/author";import {generationManifest,sealGenerationMediaBinding,@@ -21,18 +21,18 @@ import {createGptImageCleanFragment,gptImage2Ports,gptImageCleanManifest,+ gptImageCleanupProgram,gptImageEndpoints,gptImageManifest,sealGptImage2Draft,} from "@hypit/gpt-image";-import { gptImageDenoiseV1, imageTransformManifest, imageTransformTypes } from "@hypit/image-transform";-import { exactModelMediaInputNames } from "@hypit/model-kit";+import { imageOperationsManifest, imageTransformTypes } from "@hypit/image-operations";+import { exactModelMediaInputNames } from "@hypit/generation/model";import { mediaManifest } from "@hypit/media";import { narrativeManifest } from "@hypit/narrative";import { timelineManifest } from "@hypit/timeline";import { temporalManifest } from "@hypit/temporal";import type { CanonicalValue, ResourceId, ModuleManifest, StoredValue, TypeRef } from "@hypit/protocol";-import { rasterManifest } from "@hypit/raster";import { createProvidedCandidate } from "@hypit/run";import {createSeedanceAssembledGenerationFragment,@@ -40,9 +40,8 @@ import {seedanceManifest,seedancePorts,} from "@hypit/seedance";-import { speechManifest } from "@hypit/speech";import { spatialManifest } from "@hypit/spatial";-import { svsManifest } from "@hypit/svs";+import { recipeManifest } from "@hypit/recipe";import { textManifest } from "@hypit/text";const image = (name: string) => ({@@ -54,11 +53,10 @@ const image = (name: string) => ({function fixture() {const manifests: ModuleManifest[] = [- artifactManifest,+ blobManifest,textManifest,generationManifest,- rasterManifest,- imageTransformManifest,+ imageOperationsManifest,gptImageManifest,gptImageCleanManifest,narrativeManifest,@@ -66,8 +64,7 @@ function fixture() {temporalManifest,timelineManifest,spatialManifest,- svsManifest,- speechManifest,+ recipeManifest,seedanceManifest,];const closure = createResolvedClosure(manifests);@@ -83,10 +80,10 @@ function fixture() {readonly value: StoredValue;}> = [];const add = (id: string, type: TypeRef, value: StoredValue) => records.push({ id, type, value });- add("person", artifactTypes.blob, image("person"));- add("product", artifactTypes.blob, image("product"));+ add("person", blobTypes.blob, image("person"));+ add("product", blobTypes.blob, image("product"));add("cleanup", imageTransformTypes.program, {- kind: "inline", value: gptImageDenoiseV1 as unknown as CanonicalValue,+ kind: "inline", value: gptImageCleanupProgram as unknown as CanonicalValue,});const gptFragments = {@@ -206,7 +203,7 @@ test("an explicitly selected holding-image Candidate prunes only that branch", (const { program, graph } = fixture();const candidate = createProvidedCandidate({id: "approved-holding",- type: artifactTypes.blob,+ type: blobTypes.blob,value: image("approved-holding"),});const realized = sealCompiledGraph({diff --git a/packages/gpt-image/test/surface.test.ts b/packages/gpt-image/test/surface.test.tsindex 6015897e..1efaaafa 100644--- a/packages/gpt-image/test/surface.test.ts+++ b/packages/gpt-image/test/surface.test.ts@@ -1,7 +1,7 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/blob";import { parseStructuredElement } from "@hypit/markup";import type { StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/markup";import { textTypes } from "@hypit/text";@@ -20,7 +20,7 @@ const refs = new Map<string, SurfaceResolvedReference>([...["person.image", "product.image"].map((path) => [path, {path,ref: { kind: "component-output" as const, component: path.split(".")[0]!, output: "image" },- type: artifactTypes.blob,+ type: blobTypes.blob,}] as const),]);@@ -71,7 +71,7 @@ test("raw GPT Image Surface keeps Text and every reference image on explicit gra]);});-test("clean GPT Image Surface adds the official denoise as one visible downstream operation", async () => {+test("clean GPT Image Surface adds its package-owned cleanup as one visible downstream operation", async () => {const result = await decode(authored, decodeCleanGptImageSurface);const component = result.components[0]!;assert.deepEqual(component.inputs.cleanup, { kind: "record", id: "holding.cleanup" });diff --git a/packages/grok-imagine/package.json b/packages/grok-imagine/package.jsonindex 91c1803f..b07cd555 100644--- a/packages/grok-imagine/package.json+++ b/packages/grok-imagine/package.json@@ -1,6 +1,6 @@{"name": "@hypit/grok-imagine",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,18 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/grok-imagine/src/activation.ts b/packages/grok-imagine/src/activation.tsindex dddbd140..bc060e55 100644--- a/packages/grok-imagine/src/activation.ts+++ b/packages/grok-imagine/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {grokImagineComponent,grokImagineDefinition,@@ -9,17 +11,17 @@ import {import { decodeGrokImaginePreviewVideoSurface, decodeGrokImagineVideoSurface } from "./surface.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: grokImagineManifest }],- components: [grokImagineComponent],- hostFacets: [- grokImagineDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[grokImagineComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ grokImagineDefinition.facet,+ createMarkupSurfaceFacet({module: grokImagineModuleRef,declaration: grokImagineMarkupSurfaces.find((item) => item.name === "video")!,handler: decodeGrokImagineVideoSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: grokImagineModuleRef,declaration: grokImagineMarkupSurfaces.find((item) => item.name === "preview-video")!,handler: decodeGrokImaginePreviewVideoSurface,diff --git a/packages/grok-imagine/src/index.ts b/packages/grok-imagine/src/index.tsindex 502dcbac..8e29bcc1 100644--- a/packages/grok-imagine/src/index.ts+++ b/packages/grok-imagine/src/index.ts@@ -1,14 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type {- SurfaceAttributeVocabulary,- SurfaceChildVocabulary,- SurfacePortVocabulary,- SurfaceVocabulary,-} from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary, SurfacePortVocabulary, SurfaceVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const grokImagineModuleRef = { name: "@hypit/grok-imagine", version: "1" } as const;export const grokImagineModels = ["grok-imagine-video", "grok-imagine-video-1.5-preview"] as const;@@ -122,13 +117,13 @@ const grokImagineVideoChildren: readonly SurfaceChildVocabulary[] = [{ tag: "Reference", cardinality: "many",summary: "Attaches one image Artifact the model generates from.",attributes: [- { name: "image", kind: "reference", required: true, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference", required: true, accepts: [blobTypes.blob],summary: "Selects the image Artifact this reference contributes." },] },];const grokImagineVideoPortVocabulary: readonly SurfacePortVocabulary[] = [- { name: "video", type: artifactTypes.blob,+ { name: "video", type: blobTypes.blob,summary: "The generated video Artifact." },];diff --git a/packages/grok-imagine/src/surface.ts b/packages/grok-imagine/src/surface.tsindex e8def2de..c3d3b9fe 100644--- a/packages/grok-imagine/src/surface.ts+++ b/packages/grok-imagine/src/surface.ts@@ -1,20 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort, GenerationPortValue } from "@hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort, GenerationPortValue } from "@hypit/hypit/generation";import {createExactModelPrimaryGenerationFragment,exactModelMediaInputNames,exactModelTextInputName,-} from "@hypit/model-kit";-import type { ExactModelEndpoint } from "@hypit/model-kit";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+} from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { grokImagineEndpoints } from "./index.js";@@ -84,7 +79,7 @@ function decoder(endpoint: ExactModelEndpoint): StructuredSurfaceHandler {assert(localName(child.name) === "Reference", `${element.name} accepts only Reference children`);exact(child, ["image"]);assert(!child.children.some((item) => item.kind === "element" || item.value.trim()), `${child.name} must be empty`);- const image = ref(child, "image", artifactTypes.blob, resolveReference);+ const image = ref(child, "image", blobTypes.blob, resolveReference);if (image.record !== undefined) {assert(image.record.value.kind === "blob" && image.record.value.mediaType.startsWith("image/"),`${child.name}.image must be image media`);diff --git a/packages/mimo-speech/package.json b/packages/mimo-speech/package.jsonindex b62279a4..f3fa4800 100644--- a/packages/mimo-speech/package.json+++ b/packages/mimo-speech/package.json@@ -1,6 +1,6 @@{"name": "@hypit/mimo-speech",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,10 +10,17 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",- "@hypit/model-kit": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*","@hypit/markup": "workspace:*"diff --git a/packages/mimo-speech/src/activation.ts b/packages/mimo-speech/src/activation.tsindex c7bcc397..ae25e7d0 100644--- a/packages/mimo-speech/src/activation.ts+++ b/packages/mimo-speech/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {decodeMimoVoiceCloneSurface,@@ -11,17 +13,17 @@ import {} from "./index.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: mimoSpeechManifest }],- components: [mimoSpeechComponent],- hostFacets: [- mimoSpeechDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[mimoSpeechComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ mimoSpeechDefinition.facet,+ createMarkupSurfaceFacet({module: mimoSpeechModuleRef,declaration: mimoSpeechMarkupSurfaces.find((item) => item.name === "voiceDesign")!,handler: decodeMimoVoiceDesignSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: mimoSpeechModuleRef,declaration: mimoSpeechMarkupSurfaces.find((item) => item.name === "voiceClone")!,handler: decodeMimoVoiceCloneSurface,diff --git a/packages/mimo-speech/src/fragment.ts b/packages/mimo-speech/src/fragment.tsindex 11c7b817..9c0fc293 100644--- a/packages/mimo-speech/src/fragment.ts+++ b/packages/mimo-speech/src/fragment.ts@@ -1,5 +1,5 @@-import { createExactModelPrimaryGenerationFragment } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";+import { createExactModelPrimaryGenerationFragment } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";/** Model result projection over the same graph-native request assembly as every exact model. */export function createMimoSpeechAudioFragment(diff --git a/packages/mimo-speech/src/index.ts b/packages/mimo-speech/src/index.tsindex 5a9fbf9e..b34a0486 100644--- a/packages/mimo-speech/src/index.ts+++ b/packages/mimo-speech/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const mimoSpeechModuleRef = { name: "@hypit/mimo-speech", version: "1" } as const;export const mimoSpeechModels = [@@ -93,13 +93,13 @@ const spokenAttributes: readonly SurfaceAttributeVocabulary[] = [const referencePort: readonly SurfacePortVocabulary[] = [{name: "reference",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The designed voice reference, addressed as `<id>.reference`.",}];const audioPort: readonly SurfacePortVocabulary[] = [{name: "audio",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The independent speech, addressed as `<id>.audio`.",}];@@ -136,7 +136,7 @@ export const mimoSpeechMarkupSurfaces = [kind: "reference",required: true,summary: "The audio Resource carrying the voice identity to reproduce.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},],ports: audioPort,diff --git a/packages/mimo-speech/src/surface.ts b/packages/mimo-speech/src/surface.tsindex 4187aa1c..5673ff91 100644--- a/packages/mimo-speech/src/surface.ts+++ b/packages/mimo-speech/src/surface.ts@@ -1,16 +1,11 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding } from "@hypit/generation";-import type { GenerationMediaPort, GenerationPortValue } from "@hypit/generation";-import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";-import type { CanonicalValue } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding } from "@hypit/hypit/generation";+import type { GenerationMediaPort, GenerationPortValue } from "@hypit/hypit/generation";+import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";+import { textTypes, verifyText } from "@hypit/hypit/text";+import type { CanonicalValue } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";import { createMimoSpeechAudioFragment } from "./fragment.js";import { mimoSpeechEndpoints, sealMimoSpeechRequestDraft } from "./index.js";@@ -65,7 +60,7 @@ function speechText(reference: SurfaceResolvedReference, subject: string): Surfa}function voiceReference(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {- if (!sameType(reference.type, artifactTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);+ if (!sameType(reference.type, blobTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);const value = reference.record?.value;if (value !== undefined && (value.kind !== "blob" || !value.mediaType.startsWith("audio/"))) {throw new Error(`${subject} must reference audio media`);diff --git a/packages/mimo-speech/test/mimo-speech.test.ts b/packages/mimo-speech/test/mimo-speech.test.tsindex acc65427..68025f10 100644--- a/packages/mimo-speech/test/mimo-speech.test.ts+++ b/packages/mimo-speech/test/mimo-speech.test.ts@@ -1,7 +1,7 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/blob";import { generationTypes } from "@hypit/generation";import { parseStructuredElement } from "@hypit/markup";import type { SurfaceResolvedReference } from "@hypit/markup";@@ -36,10 +36,10 @@ const speechReference: SurfaceResolvedReference = {const voiceReference: SurfaceResolvedReference = {path: "host.reference",ref: { kind: "record", id: "host.reference" },- type: artifactTypes.blob,+ type: blobTypes.blob,record: {id: "host.reference",- type: artifactTypes.blob,+ type: blobTypes.blob,value: { kind: "blob", resource: "res_voice-reference", size: 4, mediaType: "audio/wav" },},};@@ -65,7 +65,7 @@ test("MiMo Speech declares the two exact audio request shapes", () => {});test("the installed author package contributes the two explicit speech operations", () => {- assert.equal(mimoNodePackage.format, "hypit.node-package@1");+ assert.equal(mimoNodePackage.format, "hypit.package@1");assert.equal(mimoNodePackage.modules[0]?.manifest.version, "1");assert.deepEqual(mimoSpeechMarkupSurfaces.map((surface) => surface.name), ["voiceDesign", "voiceClone"]);});@@ -76,7 +76,7 @@ test("VoiceDesign publishes one reusable voice reference", async () => {</mimo:VoiceDesign>`));assert.deepEqual(result.components[0]!.outputs, { audio: "host.reference" });const exported = result.fragments[0]!.exports.find((item) => item.name === "audio");- assert.deepEqual(exported?.type, artifactTypes.blob);+ assert.deepEqual(exported?.type, blobTypes.blob);assert.deepEqual(result.components[0]!.inputs["speech:text"], {kind: "record",id: "story.segment.opening.speech",diff --git a/packages/minimax-h3/package.json b/packages/minimax-h3/package.jsonindex 6d326e72..8cefaac4 100644--- a/packages/minimax-h3/package.json+++ b/packages/minimax-h3/package.json@@ -1,6 +1,6 @@{"name": "@hypit/minimax-h3",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,18 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/minimax-h3/src/activation.ts b/packages/minimax-h3/src/activation.tsindex 7229333a..a06d49a3 100644--- a/packages/minimax-h3/src/activation.ts+++ b/packages/minimax-h3/src/activation.ts@@ -1,14 +1,18 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";import { minimaxH3Component, minimaxH3Definition, minimaxH3Manifest, minimaxH3ModuleRef,minimaxH3MarkupSurfaces } from "./index.js";import { decodeMinimaxFrameVideoSurface, decodeMinimaxReferenceVideoSurface, decodeMinimaxTextVideoSurface } from "./surface.js";-export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest: minimaxH3Manifest }], components: [minimaxH3Component], hostFacets: [- minimaxH3Definition.hostFacet,- createMarkupSurfaceHostFacet({ module: minimaxH3ModuleRef,+export const hypitPackage = { format: "hypit.package@1" as const, modules: [{ manifest: minimaxH3Manifest }], facets: [+ createProducerPackageFacet(minimaxH3Component),+ createAdmissionPackageFacet(minimaxH3Component),+ minimaxH3Definition.facet,+ createMarkupSurfaceFacet({ module: minimaxH3ModuleRef,declaration: minimaxH3MarkupSurfaces.find((item) => item.name === "text-video")!, handler: decodeMinimaxTextVideoSurface }),- createMarkupSurfaceHostFacet({ module: minimaxH3ModuleRef,+ createMarkupSurfaceFacet({ module: minimaxH3ModuleRef,declaration: minimaxH3MarkupSurfaces.find((item) => item.name === "frame-video")!, handler: decodeMinimaxFrameVideoSurface }),- createMarkupSurfaceHostFacet({ module: minimaxH3ModuleRef,+ createMarkupSurfaceFacet({ module: minimaxH3ModuleRef,declaration: minimaxH3MarkupSurfaces.find((item) => item.name === "reference-video")!, handler: decodeMinimaxReferenceVideoSurface }),] };export default hypitPackage;diff --git a/packages/minimax-h3/src/index.ts b/packages/minimax-h3/src/index.tsindex 4c26ef4c..903a256a 100644--- a/packages/minimax-h3/src/index.ts+++ b/packages/minimax-h3/src/index.ts@@ -1,13 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type {- SurfaceAttributeVocabulary,- SurfacePortVocabulary,- SurfaceVocabulary,-} from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary, SurfaceVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const minimaxH3ModuleRef = { name: "@hypit/minimax-h3", version: "1" } as const;@@ -107,7 +103,7 @@ const minimaxH3AspectRatio: SurfaceAttributeVocabulary = {};const minimaxH3VideoPorts: readonly SurfacePortVocabulary[] = [- { name: "video", type: artifactTypes.blob, summary: "The generated video Artifact." },+ { name: "video", type: blobTypes.blob, summary: "The generated video Artifact." },];const minimaxH3DurationNote = "`duration` is a whole number of seconds between 4 and 15.";@@ -129,9 +125,9 @@ export const minimaxH3MarkupSurfaces = [summary: "Generates one video Artifact from a first frame, a last frame, or both with the MiniMax H3 model.",attributes: [...minimaxH3Common,- { name: "first-frame", kind: "reference", required: false, accepts: [artifactTypes.blob],+ { name: "first-frame", kind: "reference", required: false, accepts: [blobTypes.blob],summary: "Selects the image Artifact the generated video opens on." },- { name: "last-frame", kind: "reference", required: false, accepts: [artifactTypes.blob],+ { name: "last-frame", kind: "reference", required: false, accepts: [blobTypes.blob],summary: "Selects the image Artifact the generated video closes on." },],ports: minimaxH3VideoPorts,@@ -154,11 +150,11 @@ export const minimaxH3MarkupSurfaces = [{ tag: "Reference", cardinality: "many",summary: "Attaches one subject Artifact the model generates from, chosen by an `image`, `video` or `audio` reference.",attributes: [- { name: "image", kind: "reference", required: false, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference", required: false, accepts: [blobTypes.blob],summary: "Selects the image Artifact whose subject the generated video carries." },- { name: "video", kind: "reference", required: false, accepts: [artifactTypes.blob],+ { name: "video", kind: "reference", required: false, accepts: [blobTypes.blob],summary: "Selects the video Artifact whose subject the generated video carries." },- { name: "audio", kind: "reference", required: false, accepts: [artifactTypes.blob],+ { name: "audio", kind: "reference", required: false, accepts: [blobTypes.blob],summary: "Selects the audio Artifact the generated video carries." },] },],diff --git a/packages/minimax-h3/src/surface.ts b/packages/minimax-h3/src/surface.tsindex 500db59e..44d24dc8 100644--- a/packages/minimax-h3/src/surface.ts+++ b/packages/minimax-h3/src/surface.ts@@ -1,11 +1,11 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort, GenerationMediaRole, GenerationPortValue } from "@hypit/generation";-import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelMediaInput } from "@hypit/model-kit";-import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort, GenerationMediaRole, GenerationPortValue } from "@hypit/hypit/generation";+import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelMediaInput } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { minimaxH3Endpoints } from "./index.js";type Media = { readonly port: "referenceImage" | "referenceVideo" | "referenceAudio" | "firstFrame" | "lastFrame"; readonly role: GenerationMediaRole; readonly source: SurfaceResolvedReference };@@ -26,7 +26,7 @@ function ref(element: StructuredElement, name: string, type: TypeRef, resolve: (const result = resolve(value.path); assert(result !== undefined && sameType(result.type, type), `${element.name}.${name} has the wrong type`); return result;}function mediaRef(element: StructuredElement, name: string, role: GenerationMediaRole, resolve: (path: string) => SurfaceResolvedReference | undefined): SurfaceResolvedReference {- const result = ref(element, name, artifactTypes.blob, resolve);+ const result = ref(element, name, blobTypes.blob, resolve);if (result.record !== undefined) assert(result.record.value.kind === "blob" && result.record.value.mediaType.startsWith(`${role}/`), `${element.name}.${name} must be ${role} media`);return result;}diff --git a/packages/model-kit/README.md b/packages/model-kit/README.mddeleted file mode 100644index b1ca6cfe..00000000--- a/packages/model-kit/README.md+++ /dev/null@@ -1,80 +0,0 @@-# `@hypit/hypit/model-kit`--Author-model package helper for defining exact generated-media requests without repeating the-nominal Type → Producer → Need → Graph Fragment shell.--An external model package develops against the public `@hypit/hypit/model-kit`, `@hypit/hypit/generation`, and-`@hypit/hypit/author-kit` subpaths. The released `@hypit/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/hypit/model-kit";-import { sealGenerationPortTable } from "@hypit/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/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 its-exact fields, constraints, model identity, capability name and validator. The helper adds no-Provider routing, fallback, credentials or Runtime authority.--This is a package-authoring utility, not an author-importable model by itself.--## Model-owned request checks--An endpoint may supply two synchronous, pure functions in addition to its port table:--- `validateInputs(inputs)` checks values already supplied, both in drafts and complete requests.- Text and media may still be missing from a draft. Use this for rules such as a reference's media- type; do not require a future input to exist.-- `validateRequest(request)` checks additional relationships that require the complete request.- It runs after the port table and `validateInputs`, when every required input is available.--Both return `void` and throw a useful error to reject. They read the supplied values only: no IO,-Provider selection, request mutation or saved validation result. Existing port rules remain in the-port table. The helper supplies structural validation before calling either function.--Register each rule once in the endpoint definition. The helper connects these functions to Type-validators, media/Text bindings, finalization, generation and planning. Planning checks the known-values and leaves future media on the existing graph edges. A directly supplied request or an-existing Need receives full validation, just as it does during execution.--For a public request builder, use `model.endpoints.image.sealRequest(ports)`: it canonicalizes the-request and applies all model rules. `endpoint.validateRequest(value)` checks an existing complete-request; `endpoint.validateDraft(value)` checks a partially assembled one. Calling the common-generation port helpers alone applies only the port table, not these model-owned functions.--Keep service-specific limits in the Provider. Its existing `supports` and pre-submission preparation-should share its own checks, rejecting known unsupported values before resource transfer. This does-not require the Provider to import the Model implementation or add any fields to the request.diff --git a/packages/model-kit/package.json b/packages/model-kit/package.jsondeleted file mode 100644index f1bae183..00000000--- a/packages/model-kit/package.json+++ /dev/null@@ -1,19 +0,0 @@-{- "name": "@hypit/model-kit",- "version": "0.0.0-dev",- "license": "SEE LICENSE IN LICENSE",- "private": true,- "type": "module",- "exports": {- ".": "./src/index.ts"- },- "dependencies": {- "@hypit/artifact": "workspace:*",- "@hypit/component-kit": "workspace:*",- "@hypit/elaborator": "workspace:*",- "@hypit/generation": "workspace:*",- "@hypit/host": "workspace:*",- "@hypit/protocol": "workspace:*",- "@hypit/text": "workspace:*"- }-}diff --git a/packages/nano-banana/package.json b/packages/nano-banana/package.jsonindex 29615981..19cf90d8 100644--- a/packages/nano-banana/package.json+++ b/packages/nano-banana/package.json@@ -1,6 +1,6 @@{"name": "@hypit/nano-banana",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,18 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/nano-banana/src/activation.ts b/packages/nano-banana/src/activation.tsindex ff2c6ea4..b4d4ae7c 100644--- a/packages/nano-banana/src/activation.ts+++ b/packages/nano-banana/src/activation.ts@@ -1,14 +1,18 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";import {nanoBananaComponent, nanoBananaDefinition, nanoBananaManifest, nanoBananaModuleRef,nanoBananaMarkupSurfaces,} from "./index.js";import { decodeNanoBananaImageSurface, decodeNanoBananaProImageSurface } from "./surface.js";-export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest: nanoBananaManifest }], components: [nanoBananaComponent], hostFacets: [- nanoBananaDefinition.hostFacet,- createMarkupSurfaceHostFacet({ module: nanoBananaModuleRef,+export const hypitPackage = { format: "hypit.package@1" as const, modules: [{ manifest: nanoBananaManifest }], facets: [+ createProducerPackageFacet(nanoBananaComponent),+ createAdmissionPackageFacet(nanoBananaComponent),+ nanoBananaDefinition.facet,+ createMarkupSurfaceFacet({ module: nanoBananaModuleRef,declaration: nanoBananaMarkupSurfaces.find((item) => item.name === "image")!, handler: decodeNanoBananaImageSurface }),- createMarkupSurfaceHostFacet({ module: nanoBananaModuleRef,+ createMarkupSurfaceFacet({ module: nanoBananaModuleRef,declaration: nanoBananaMarkupSurfaces.find((item) => item.name === "pro-image")!, handler: decodeNanoBananaProImageSurface }),] };export default hypitPackage;diff --git a/packages/nano-banana/src/index.ts b/packages/nano-banana/src/index.tsindex 1b8867a2..d0affab9 100644--- a/packages/nano-banana/src/index.ts+++ b/packages/nano-banana/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const nanoBananaModuleRef = { name: "@hypit/nano-banana", version: "1" } as const;export const nanoBananaModels = ["nano-banana-2", "nano-banana-pro"] as const;@@ -105,7 +105,7 @@ const nanoBananaChildren: readonly SurfaceChildVocabulary[] = [{ tag: "Reference", cardinality: "many",summary: "Attaches one image Artifact as a reference picture.",attributes: [- { name: "image", kind: "reference", required: true, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference", required: true, accepts: [blobTypes.blob],summary: "Selects the image Artifact this reference contributes." },] },];@@ -128,7 +128,7 @@ const surface = (children: nanoBananaChildren,ports: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The primary generated image, addressed as `<id>.image`.",}],example,diff --git a/packages/nano-banana/src/surface.ts b/packages/nano-banana/src/surface.tsindex b006a433..32e6c42a 100644--- a/packages/nano-banana/src/surface.ts+++ b/packages/nano-banana/src/surface.ts@@ -1,20 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort } from "@hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";import {createExactModelPrimaryGenerationFragment,exactModelMediaInputNames,exactModelTextInputName,-} from "@hypit/model-kit";-import type { ExactModelEndpoint } from "@hypit/model-kit";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+} from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { nanoBananaEndpoints } from "./index.js";@@ -76,7 +71,7 @@ function decoder(endpoint: ExactModelEndpoint): StructuredSurfaceHandler {assert(localName(child.name) === "Reference", `${element.name} accepts only Reference children`);exact(child, ["image"]);assert(!child.children.some((item) => item.kind === "element" || item.value.trim()), `${child.name} must be empty`);- const image = ref(child, "image", artifactTypes.blob, resolveReference);+ const image = ref(child, "image", blobTypes.blob, resolveReference);if (image.record !== undefined) {assert(image.record.value.kind === "blob" && image.record.value.mediaType.startsWith("image/"),`${child.name}.image must reference image media`);diff --git a/packages/pixverse/package.json b/packages/pixverse/package.jsonindex 2598604e..4f5d46ec 100644--- a/packages/pixverse/package.json+++ b/packages/pixverse/package.json@@ -1,6 +1,6 @@{"name": "@hypit/pixverse",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,15 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": ["dist", "README.md"],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/pixverse/src/activation.ts b/packages/pixverse/src/activation.tsindex 3951d271..51923c57 100644--- a/packages/pixverse/src/activation.ts+++ b/packages/pixverse/src/activation.ts@@ -1,13 +1,17 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";import {pixverseComponent, pixverseDefinition, pixverseManifest, pixverseModuleRef, pixverseMarkupSurfaces,} from "./index.js";import { decodePixverseReferenceVideoSurface, decodePixverseVideoSurface } from "./surface.js";-export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest: pixverseManifest }], components: [pixverseComponent], hostFacets: [- pixverseDefinition.hostFacet,- createMarkupSurfaceHostFacet({ module: pixverseModuleRef,+export const hypitPackage = { format: "hypit.package@1" as const, modules: [{ manifest: pixverseManifest }], facets: [+ createProducerPackageFacet(pixverseComponent),+ createAdmissionPackageFacet(pixverseComponent),+ pixverseDefinition.facet,+ createMarkupSurfaceFacet({ module: pixverseModuleRef,declaration: pixverseMarkupSurfaces.find((item) => item.name === "video")!, handler: decodePixverseVideoSurface }),- createMarkupSurfaceHostFacet({ module: pixverseModuleRef,+ createMarkupSurfaceFacet({ module: pixverseModuleRef,declaration: pixverseMarkupSurfaces.find((item) => item.name === "reference-video")!, handler: decodePixverseReferenceVideoSurface }),] };export default hypitPackage;diff --git a/packages/pixverse/src/index.ts b/packages/pixverse/src/index.tsindex ea83f616..71153a2c 100644--- a/packages/pixverse/src/index.ts+++ b/packages/pixverse/src/index.ts@@ -1,15 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";import type {GenerationPort,GenerationPortRequirement,GenerationPortTable,GenerationPortValue,GenerationRequest,-} from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+} from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";import { pixverseRequestValidator } from "./validation.js";@@ -138,7 +138,7 @@ const pixverseAspectRatio: SurfaceAttributeVocabulary = {const pixverseVideoPort: readonly SurfacePortVocabulary[] = [{name: "video",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The generated video, addressed as `<id>.video`.",}];@@ -158,9 +158,9 @@ export const pixverseMarkupSurfaces = [...pixverseCommonAttributes,{ name: "duration", kind: "literal" as const, required: true,summary: "How many seconds of video to render, from 1 to 15." },- { name: "first-frame", kind: "reference" as const, required: false, accepts: [artifactTypes.blob],+ { name: "first-frame", kind: "reference" as const, required: false, accepts: [blobTypes.blob],summary: "Starts the video from one image Artifact." },- { name: "last-frame", kind: "reference" as const, required: false, accepts: [artifactTypes.blob],+ { name: "last-frame", kind: "reference" as const, required: false, accepts: [blobTypes.blob],summary: "Ends the video on one image Artifact, bridging from the first frame." },pixverseAspectRatio,{ name: "multi-clip", kind: "literal" as const, required: false, values: ["true", "false"],@@ -204,9 +204,9 @@ export const pixverseMarkupSurfaces = [cardinality: "many" as const,summary: "Attaches one subject Artifact the model generates from, chosen by an `image` or `video` reference.",attributes: [- { name: "image", kind: "reference" as const, required: false, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference" as const, required: false, accepts: [blobTypes.blob],summary: "Selects the image Artifact whose subject the generated video carries." },- { name: "video", kind: "reference" as const, required: false, accepts: [artifactTypes.blob],+ { name: "video", kind: "reference" as const, required: false, accepts: [blobTypes.blob],summary: "Selects the video Artifact whose motion and subject the generated video carries." },],}],diff --git a/packages/pixverse/src/surface.ts b/packages/pixverse/src/surface.tsindex 7a58a691..c4db6b36 100644--- a/packages/pixverse/src/surface.ts+++ b/packages/pixverse/src/surface.ts@@ -1,20 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort, GenerationMediaRole, GenerationPortValue } from "@hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort, GenerationMediaRole, GenerationPortValue } from "@hypit/hypit/generation";import {createExactModelPrimaryGenerationFragment,exactModelMediaInputNames,exactModelTextInputName,-} from "@hypit/model-kit";-import type { ExactModelEndpoint } from "@hypit/model-kit";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+} from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { pixverseEndpointsByModel } from "./index.js";import type { PixverseModel } from "./index.js";@@ -91,7 +86,7 @@ function media(role: GenerationMediaRole,resolve: (path: string) => SurfaceResolvedReference | undefined,): SurfaceResolvedReference {- const artifact = ref(element, name, artifactTypes.blob, resolve);+ const artifact = ref(element, name, blobTypes.blob, resolve);if (artifact.record !== undefined) {assert(artifact.record.value.kind === "blob" && artifact.record.value.mediaType.startsWith(`${role}/`),`${element.name}.${name} must reference ${role} media`);diff --git a/packages/pixverse/src/validation.ts b/packages/pixverse/src/validation.tsindex cae60802..547a3322 100644--- a/packages/pixverse/src/validation.ts+++ b/packages/pixverse/src/validation.ts@@ -1,4 +1,4 @@-import type { GenerationRequest } from "@hypit/generation";+import type { GenerationRequest } from "@hypit/hypit/generation";import type { PixverseModel } from "./index.js";/**diff --git a/packages/seedance-kits/README.md b/packages/seedance-kits/README.mdindex 724fb44e..67cc5bfc 100644--- a/packages/seedance-kits/README.md+++ b/packages/seedance-kits/README.md@@ -3,6 +3,13 @@Data-only authoring Kits for recurring Seedance semantics. They are `TextTemplate` source modules,not model wrappers, Providers or new execution nodes.+This package has no activation and no Runtime dependency. Running+`npm run pack:independent -- packages/seedance-kits` preserves the ordinary package exports, the SVS files and their documentation;+projects select its npm release through their package manager and lockfile.++The official Hypit Distribution currently obtains this data package as a default npm dependency; it+is not copied into the root tarball and does not share the root package's release cadence.+Import a selected public Source from the installed package, for example`@hypit/seedance-kits/speaker`. The package manager or active Distribution owns the installedversion; Source Closure reads that Source and its relative dependencies without copying it into the@@ -71,7 +78,7 @@ Run Target lets an author inspect the assembled prompt without generating media.Speaker, B-roll, Podcast, Call and Street Interview expose prompt choices through their TextTemplates. The examples above use author-chosen literal durations. Measure adopted speech with-`hypit measure` first, then choose a duration within the selected model's declared range; there is+`hypit estimate` first, then choose a duration within the selected model's declared range; there isno duration-estimation node on the generation route.## Recipe, dialogue and action@@ -156,7 +163,7 @@ continuous shot for the whole montage” ask for different results.Every Seedance image/video Reference requires `person-reference="true|false"`: true if the suppliedmaterial contains a person, false otherwise. Audio must omit it. The-[Seedance author package](../seedance/README.md#visual-reference-metadata) explains `person-reference`+[Seedance author package](https://www.npmjs.com/package/@hypit/seedance#visual-reference-metadata) explains `person-reference`and its frame variants. The Kit supplies direction; the actual reference edges supply media andmetadata. For movement-led work, a reference video can carry the motion while the text explains whatto preserve and change.diff --git a/packages/seedance-kits/package.json b/packages/seedance-kits/package.jsonindex 8bb890e4..3517b298 100644--- a/packages/seedance-kits/package.json+++ b/packages/seedance-kits/package.json@@ -1,6 +1,6 @@{"name": "@hypit/seedance-kits",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -18,7 +18,7 @@"README.md"],"devDependencies": {- "@hypit/svs": "workspace:*",+ "@hypit/recipe": "workspace:*","@hypit/text": "workspace:*"}}diff --git a/packages/seedance-kits/test/kits.test.ts b/packages/seedance-kits/test/kits.test.tsindex 0f2a693a..920c3dbc 100644--- a/packages/seedance-kits/test/kits.test.ts+++ b/packages/seedance-kits/test/kits.test.ts@@ -1,8 +1,8 @@import assert from "node:assert/strict";import { readFileSync } from "node:fs";import test from "node:test";-import { parseSvs } from "@hypit/svs";-import { renderText, sealTextBindings, textTemplateFromSvsRecipes } from "@hypit/text";+import { parseRecipe } from "@hypit/recipe";+import { renderText, sealTextBindings, textTemplateFromRecipes } from "@hypit/text";const cases = [{ file: "speaker-v1.svs", id: "speaker-v1", bindings: { dialogue: "HOST: Meaning comes first." }, marker: "@audio1 is the speaker's voice-timbre reference" },@@ -17,8 +17,8 @@ const cases = [test("Seedance Kits are finite data programs with distinct rendered semantics", () => {for (const item of cases) {const source = readFileSync(new URL(`../kits/${item.file}`, import.meta.url), "utf8");- const recipes = parseSvs(item.file, source.slice(source.indexOf("<sheet"))).recipes.map((recipe) => recipe.value);- const template = textTemplateFromSvsRecipes(recipes, item.id);+ const recipes = parseRecipe(item.file, source.slice(source.indexOf("<sheet"))).recipes.map((recipe) => recipe.value);+ const template = textTemplateFromRecipes(recipes, item.id);const output = renderText(template, sealTextBindings(item.bindings));assert.match(output.value, new RegExp(item.marker, "u"), item.file);}diff --git a/packages/seedance/README.md b/packages/seedance/README.mdindex e386dcaa..9f805830 100644--- a/packages/seedance/README.md+++ b/packages/seedance/README.md@@ -3,6 +3,17 @@Exact Seedance author model module. It owns the request schema and exactly three invocation Surfaces;it does not contain service credentials, HTTP code, queues, runtime routing or usage-specific Prompt assembly.+Its implementation imports only the public `@hypit/hypit/*` author and model APIs. The repository keeps+TypeScript source entry points for joint development; `npm run pack:independent -- packages/seedance`+builds the owner package into a temporary release directory whose exports and activation point at compiled+JavaScript. The resulting tarball contains no private Hypit workspace dependency or second copy of the Host.+The npm version selects those package bytes; Source continues to address the logical Module as+`@hypit/seedance@1`.++The official Hypit Distribution currently declares this package as a default npm dependency rather+than embedding its source. A project may explicitly install another compatible version; the ordinary+project lockfile records the actual selection.+The three model invocation shapes are deliberately separate:- `TextVideo`: Prompt only; this is the only shape that exposes Web Search.@@ -10,12 +21,12 @@ The three model invocation shapes are deliberately separate:- `ReferenceVideo`: one or more image, video or audio references within the model's port limits.All three preserve the remote result as one atomic `GeneratedVideoSet`, then expose its first ordered-member as an ordinary `BlobArtifact`. Their prompt ports consume ordinary `Text`, so a Script projection,+member as an ordinary `Blob`. Their prompt ports consume ordinary `Text`, so a Script projection,generic Text Template or third-party author module can feed them without becoming part of Seedance.`standard`, `fast`, `mini` and `2.5` select model variants independently of the invocation shape. Duration isthe author's literal, in whole seconds inside the model's declared range; measure the spoken line first-with `hypit measure` and write the number here. Nothing in the graph computes it, so a Build plan is+with `hypit estimate` and write the number here. Nothing in the graph computes it, so a Build plan iscomplete before it starts.## Reference audiodiff --git a/packages/seedance/package.json b/packages/seedance/package.jsonindex 8c149436..4e07f567 100644--- a/packages/seedance/package.json+++ b/packages/seedance/package.json@@ -1,22 +1,26 @@{"name": "@hypit/seedance",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module","exports": {".": "./src/index.ts"},+ "files": [+ "dist",+ "README.md"+ ],"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",- "@hypit/elaborator": "workspace:*",- "@hypit/generation": "workspace:*",- "@hypit/model-kit": "workspace:*",+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/hypit": "workspace:*",+ "@hypit/markup": "workspace:*","@hypit/protocol": "workspace:*",- "@hypit/text": "workspace:*",- "@hypit/markup": "workspace:*"+ "typescript": "5.9.3"}}diff --git a/packages/seedance/src/activation.ts b/packages/seedance/src/activation.tsindex c4bda476..25abeff2 100644--- a/packages/seedance/src/activation.ts+++ b/packages/seedance/src/activation.ts@@ -1,4 +1,6 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import {decodeSeedanceFrameVideoSurface,@@ -12,22 +14,22 @@ import {} from "./index.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: seedanceManifest }],- components: [seedanceComponent],- hostFacets: [- seedanceDefinition.hostFacet,- createMarkupSurfaceHostFacet({+ facets: [+ ...[seedanceComponent].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),+ seedanceDefinition.facet,+ createMarkupSurfaceFacet({module: seedanceModuleRef,declaration: seedanceMarkupSurfaces.find((item) => item.name === "text-video")!,handler: decodeSeedanceTextVideoSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: seedanceModuleRef,declaration: seedanceMarkupSurfaces.find((item) => item.name === "frame-video")!,handler: decodeSeedanceFrameVideoSurface,}),- createMarkupSurfaceHostFacet({+ createMarkupSurfaceFacet({module: seedanceModuleRef,declaration: seedanceMarkupSurfaces.find((item) => item.name === "reference-video")!,handler: decodeSeedanceReferenceVideoSurface,diff --git a/packages/seedance/src/fragment.ts b/packages/seedance/src/fragment.tsindex 38e5e66a..a082a09a 100644--- a/packages/seedance/src/fragment.ts+++ b/packages/seedance/src/fragment.ts@@ -1,15 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGraphFragment } from "@hypit/elaborator";-import { generationProducers } from "@hypit/generation";-import { createExactModelPrimaryGenerationFragment } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGraphFragment } from "@hypit/hypit/author";+import { generationProducers } from "@hypit/hypit/generation";+import { createExactModelPrimaryGenerationFragment } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/hypit/generation/model";const input = (name: string) => ({ kind: "fragment-input" as const, name });const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });/*** Keep the remote GeneratedVideoSet atomic, then deterministically expose its- * primary video as an ordinary BlobArtifact for downstream media programs.+ * primary video as an ordinary Blob for downstream media programs.*/export function createSeedanceGenerationFragment(endpoint: ExactModelEndpoint) {return sealGraphFragment({@@ -30,7 +30,7 @@ export function createSeedanceGenerationFragment(endpoint: ExactModelEndpoint) {],exports: [{name: "video",- type: artifactTypes.blob,+ type: blobTypes.blob,root: operation("select-primary-video"),}],});diff --git a/packages/seedance/src/index.ts b/packages/seedance/src/index.tsindex 85abc979..9009669b 100644--- a/packages/seedance/src/index.ts+++ b/packages/seedance/src/index.ts@@ -1,14 +1,14 @@-import { sealGenerationPortTable } from "@hypit/generation";+import { sealGenerationPortTable } from "@hypit/hypit/generation";import type {GenerationPortTable,GenerationPortValue,GenerationRequest,-} from "@hypit/generation";-import { artifactTypes } from "@hypit/artifact";-import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";-import type { ResourceId } from "@hypit/protocol";+} from "@hypit/hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import type { ResourceId } from "@hypit/hypit/protocol";+import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";import { validateSeedanceInputs } from "./validation.js";export const seedanceModuleRef = { name: "@hypit/seedance", version: "1" } as const;@@ -150,7 +150,7 @@ const seedanceCommonAttributes: readonly SurfaceAttributeVocabulary[] = [name: "duration",kind: "literal",required: true,- summary: "Sets the length of the video in whole seconds within the model's range; the author's decision, measured beforehand with hypit measure.",+ summary: "Sets the length of the video in whole seconds within the model's range; the author's decision, estimated beforehand with hypit estimate.",},{name: "resolution",@@ -182,7 +182,7 @@ const personReferenceAttribute = (name: string, required = false): SurfaceAttribconst seedanceVideoPort: readonly SurfacePortVocabulary[] = [{name: "video",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The first ordered member of the generated set, addressed as `<id>.video`.",}];@@ -242,14 +242,14 @@ export const seedanceMarkupSurfaces = [kind: "reference",required: true,summary: "The image Artifact the generated video opens on.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},{name: "last-frame",kind: "reference",required: false,summary: "The image Artifact the generated video closes on.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},],ports: seedanceVideoPort,@@ -282,21 +282,21 @@ export const seedanceMarkupSurfaces = [kind: "reference",required: false,summary: "The image Artifact this reference contributes to the generation.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},{name: "video",kind: "reference",required: false,summary: "The video Artifact this reference contributes to the generation.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},{name: "audio",kind: "reference",required: false,summary: "The audio Artifact this reference contributes to the generation.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],},],}],diff --git a/packages/seedance/src/surface.ts b/packages/seedance/src/surface.tsindex 3eb1d74d..a74daa5e 100644--- a/packages/seedance/src/surface.ts+++ b/packages/seedance/src/surface.ts@@ -1,24 +1,19 @@-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/hypit/blob";import {generationPort,sealGenerationMediaBinding,sealGenerationRequestDraft,-} from "@hypit/generation";+} from "@hypit/hypit/generation";import type {GenerationMediaPort,GenerationMediaRole,GenerationPortTable,-} from "@hypit/generation";-import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { ExactModelEndpoint, ExactModelMediaInput } from "@hypit/model-kit";-import type { CanonicalValue } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";+} from "@hypit/hypit/generation";+import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint, ExactModelMediaInput } from "@hypit/hypit/generation/model";+import { textTypes, verifyText } from "@hypit/hypit/text";+import type { CanonicalValue } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";import { createSeedanceAssembledGenerationFragment } from "./fragment.js";import { seedanceEndpoints, seedancePorts } from "./index.js";@@ -105,7 +100,7 @@ function mediaReference(role: GenerationMediaRole,subject: string,): SurfaceResolvedReference {- if (!sameType(reference.type, artifactTypes.blob)) throw new Error(`${subject} must reference a BlobArtifact`);+ if (!sameType(reference.type, blobTypes.blob)) throw new Error(`${subject} must reference a Blob`);const value = reference.record?.value;if (value !== undefined && (value.kind !== "blob" || !value.mediaType.startsWith(`${role}/`))) {throw new Error(`${subject} must reference ${role} media`);diff --git a/packages/seedance/src/validation.ts b/packages/seedance/src/validation.tsindex ac98f0f0..0713668f 100644--- a/packages/seedance/src/validation.ts+++ b/packages/seedance/src/validation.ts@@ -1,5 +1,5 @@-import type { GenerationRequestDraft } from "@hypit/generation";-import type { BlobRef } from "@hypit/protocol";+import type { GenerationRequestDraft } from "@hypit/hypit/generation";+import type { BlobRef } from "@hypit/hypit/protocol";/** Seedance's reference-audio rule, shared by known imports and request assembly. */export function validateSeedanceAudio(artifact: BlobRef, subject = "Seedance reference audio"): void {diff --git a/packages/seedance/test/surface.test.ts b/packages/seedance/test/surface.test.tsindex 2f44affa..82584ac4 100644--- a/packages/seedance/test/surface.test.ts+++ b/packages/seedance/test/surface.test.ts@@ -1,10 +1,10 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/hypit/blob";import { parseStructuredElement } from "@hypit/markup";-import type { StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/markup";-import { textTypes } from "@hypit/text";+import type { StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes } from "@hypit/hypit/text";import { fixtureResource } from "../../../test/fixture-resource.js";import {@@ -22,7 +22,7 @@ const refs = new Map<string, SurfaceResolvedReference>([...["first.image", "last.image", "generated.image", "voice.audio"].map((path) => [path, {path,ref: { kind: "component-output" as const, component: path.split(".")[0]!, output: path.split(".")[1]! },- type: artifactTypes.blob,+ type: blobTypes.blob,}] as const),]);@@ -55,7 +55,7 @@ test("admitted M4A audio is rejected at decode while future audio remains a grapadmitted.set("voice.audio", {...refs.get("voice.audio")!,record: {- id: "voice", type: artifactTypes.blob,+ id: "voice", type: blobTypes.blob,value: { kind: "blob", resource: fixtureResource("admitted-voice"), size: 4, mediaType },},});diff --git a/packages/seedance/test/validation.test.ts b/packages/seedance/test/validation.test.tsindex cb2ff171..f63d3d2c 100644--- a/packages/seedance/test/validation.test.ts+++ b/packages/seedance/test/validation.test.ts@@ -1,9 +1,9 @@import assert from "node:assert/strict";import test from "node:test";-import { sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationRequest } from "@hypit/generation";-import { plannedExactModelRequest } from "@hypit/model-kit";-import type { ExactModelEndpoint } from "@hypit/model-kit";+import { sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationRequest } from "@hypit/hypit/generation";+import { plannedExactModelRequest } from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint } from "@hypit/hypit/generation/model";import { canonicalize } from "@hypit/protocol";import type { BlobRef, BuildState, ProducerRef, StoredValue } from "@hypit/protocol";import { fixtureResource } from "../../../test/fixture-resource.js";diff --git a/packages/seedream/package.json b/packages/seedream/package.jsonindex da55602c..ed7d3a63 100644--- a/packages/seedream/package.json+++ b/packages/seedream/package.json@@ -1,6 +1,6 @@{"name": "@hypit/seedream",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,15 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": ["dist", "README.md"],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/seedream/src/activation.ts b/packages/seedream/src/activation.tsindex 2ccbedad..97959687 100644--- a/packages/seedream/src/activation.ts+++ b/packages/seedream/src/activation.ts@@ -1,12 +1,16 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";import { seedreamComponent, seedreamDefinition, seedreamManifest, seedreamModuleRef,seedreamMarkupSurfaces } from "./index.js";import { decodeSeedreamReferenceImageSurface, decodeSeedreamTextImageSurface } from "./surface.js";-export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest: seedreamManifest }], components: [seedreamComponent], hostFacets: [- seedreamDefinition.hostFacet,- createMarkupSurfaceHostFacet({ module: seedreamModuleRef,+export const hypitPackage = { format: "hypit.package@1" as const, modules: [{ manifest: seedreamManifest }], facets: [+ createProducerPackageFacet(seedreamComponent),+ createAdmissionPackageFacet(seedreamComponent),+ seedreamDefinition.facet,+ createMarkupSurfaceFacet({ module: seedreamModuleRef,declaration: seedreamMarkupSurfaces.find((item) => item.name === "text-image")!, handler: decodeSeedreamTextImageSurface }),- createMarkupSurfaceHostFacet({ module: seedreamModuleRef,+ createMarkupSurfaceFacet({ module: seedreamModuleRef,declaration: seedreamMarkupSurfaces.find((item) => item.name === "reference-image")!, handler: decodeSeedreamReferenceImageSurface }),] };export default hypitPackage;diff --git a/packages/seedream/src/index.ts b/packages/seedream/src/index.tsindex 6d333c64..0e77ba6e 100644--- a/packages/seedream/src/index.ts+++ b/packages/seedream/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const seedreamModuleRef = { name: "@hypit/seedream", version: "1" } as const;@@ -94,7 +94,7 @@ const seedreamAttributes: readonly SurfaceAttributeVocabulary[] = [const seedreamImagePort = {name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The primary generated image, addressed as `<id>.image`.",} as const;@@ -133,7 +133,7 @@ export const seedreamMarkupSurfaces = [{kind: "reference",required: true,summary: "The Artifact supplied as a reference picture, which must carry image media.",- accepts: [artifactTypes.blob],+ accepts: [blobTypes.blob],}],}],ports: [seedreamImagePort],diff --git a/packages/seedream/src/surface.ts b/packages/seedream/src/surface.tsindex e1b7d0cb..c326fa5c 100644--- a/packages/seedream/src/surface.ts+++ b/packages/seedream/src/surface.ts@@ -1,10 +1,10 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort } from "@hypit/generation";-import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";-import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";+import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames, exactModelTextInputName } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { seedreamEndpoints } from "./index.js";function assert(condition: unknown, message: string): asserts condition { if (!condition) throw new Error(message); }@@ -53,7 +53,7 @@ function decoder(referenceMode: boolean): StructuredSurfaceHandler {assert(referenceMode && localName(child.name) === "Reference", `${element.name} accepts no such child`);exact(child, ["image"]);assert(!child.children.some((item) => item.kind === "element" || item.value.trim()), `${child.name} must be empty`);- const image = ref(child, "image", artifactTypes.blob, resolveReference);+ const image = ref(child, "image", blobTypes.blob, resolveReference);if (image.record !== undefined) assert(image.record.value.kind === "blob" && image.record.value.mediaType.startsWith("image/"), `${child.name}.image must be image media`);images.push(image);}diff --git a/packages/volcengine-matting/README.md b/packages/volcengine-matting/README.mdindex 8eb740f6..35ae46a3 100644--- a/packages/volcengine-matting/README.md+++ b/packages/volcengine-matting/README.md@@ -16,13 +16,13 @@ formats. The service's flat-background MP4 option is a different output treatmen## Prepare the processed clip for its role```svml-<import as="pipeline" from="@hypit/media-pipeline@1"/>+<import as="mediaop" from="@hypit/media-operations@1"/><import as="whisperx" from="@hypit/whisperx@1"/><import as="semantic" from="@hypit/narrative-temporal@1"/><import as="media" from="@hypit/media@1"/><time:Clock id="clock" frame-rate="30"/>-<pipeline:Normalize id="cutout-media" source={cutout.video} clock={clock}+<mediaop:Normalize id="cutout-media" source={cutout.video} clock={clock}video="primary-moving" audio="default" span-authority="video"/><whisperx:Alignment id="opening-alignment" narrative={story}segment={story.segment.opening} media={cutout-media.media}@@ -50,7 +50,7 @@ For example, this alternative uses the existing program's Timeline and an author```svml<import as="visual" from="@hypit/visual-track@1"/>-<pipeline:Normalize id="overlay-media" source={cutout.video} clock={clock}+<mediaop:Normalize id="overlay-media" source={cutout.video} clock={clock}video="primary-moving" audio="none" span-authority="video"/><visual:Track id="overlay" timeline={speech.timeline}><visual:Clip media={overlay-media.media} during={story-time.example}diff --git a/packages/volcengine-matting/package.json b/packages/volcengine-matting/package.jsonindex 68e54af4..e888babf 100644--- a/packages/volcengine-matting/package.json+++ b/packages/volcengine-matting/package.json@@ -1,16 +1,27 @@{"name": "@hypit/volcengine-matting",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",- "exports": { ".": "./src/index.ts" },- "hypit": { "activation": "./src/activation.ts" },- "dependencies": {- "@hypit/artifact": "workspace:*",+ "exports": {+ ".": "./src/index.ts"+ },+ "hypit": {+ "activation": "./src/activation.ts"+ },+ "files": [+ "dist",+ "README.md"+ ],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "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.tsindex 55eb1a03..88cf94c5 100644--- a/packages/volcengine-matting/src/activation.ts+++ b/packages/volcengine-matting/src/activation.ts@@ -1,12 +1,14 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";import { portraitMattingSurface, volcengineMattingDefinition, volcengineMattingModuleRef } from "./index.js";import { decodePortraitMattingSurface } from "./surface.js";export const hypitPackage = {- format: "hypit.node-package@1" as const,+ format: "hypit.package@1" as const,modules: [{ manifest: volcengineMattingDefinition.manifest }],- components: [volcengineMattingDefinition.component],- hostFacets: [volcengineMattingDefinition.hostFacet, createMarkupSurfaceHostFacet({+ facets: [+ ...[volcengineMattingDefinition.component].flatMap((component) => [createProducerPackageFacet(component), createAdmissionPackageFacet(component)]),volcengineMattingDefinition.facet, createMarkupSurfaceFacet({module: volcengineMattingModuleRef, declaration: portraitMattingSurface, handler: decodePortraitMattingSurface,})],};diff --git a/packages/volcengine-matting/src/index.ts b/packages/volcengine-matting/src/index.tsindex 4fae04c2..25202e5c 100644--- a/packages/volcengine-matting/src/index.ts+++ b/packages/volcengine-matting/src/index.ts@@ -1,7 +1,7 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortValue } from "@hypit/generation";-import { defineExactModelModule } from "@hypit/model-kit";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortValue } from "@hypit/hypit/generation";+import { defineExactModelModule } from "@hypit/hypit/generation/model";export const volcengineMattingModuleRef = { name: "@hypit/volcengine-matting", version: "1" } as const;@@ -33,12 +33,12 @@ export const portraitMattingSurface = {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],+ { name: "source", kind: "reference" as const, required: true, accepts: [blobTypes.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." }],+ ports: [{ name: "video", type: blobTypes.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.tsindex d095c92a..b29d75ae 100644--- a/packages/volcengine-matting/src/surface.ts+++ b/packages/volcengine-matting/src/surface.ts@@ -1,9 +1,9 @@-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 { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort } from "@hypit/hypit/generation";+import { canonicalize } from "@hypit/hypit/protocol";+import type { StructuredSurfaceHandler } from "@hypit/hypit/markup";+import { createExactModelPrimaryGenerationFragment, exactModelMediaInputNames } from "@hypit/hypit/generation/model";import { portraitMattingEndpoint as endpoint } from "./index.js";function assert(condition: unknown, message: string): asserts condition {@@ -19,9 +19,9 @@ export const decodePortraitMattingSurface: StructuredSurfaceHandler = ({ elementassert(!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`);+ assert(resolved !== undefined && resolved.type.name === blobTypes.blob.name+ && resolved.type.module.name === blobTypes.blob.module.name+ && resolved.type.module.version === blobTypes.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`);diff --git a/packages/volcengine-matting/test/matting.test.ts b/packages/volcengine-matting/test/matting.test.tsindex 484b5abf..3973ea22 100644--- a/packages/volcengine-matting/test/matting.test.ts+++ b/packages/volcengine-matting/test/matting.test.ts@@ -1,6 +1,6 @@import assert from "node:assert/strict";import test from "node:test";-import { artifactTypes } from "@hypit/artifact";+import { blobTypes } from "@hypit/blob";import { parseStructuredElement } from "@hypit/markup";import { sealPortraitMattingRequest } from "../src/index.js";import { decodePortraitMattingSurface } from "../src/surface.js";@@ -15,10 +15,10 @@ test("portrait matting binds a source video and publishes an ordinary video edgesourceName: "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 } }),+ type: blobTypes.blob, record: { id: "performance.video", type: blobTypes.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);+ assert.deepEqual(result.fragments[0]!.exports.find((item) => item.name === "video")?.type, blobTypes.blob);});diff --git a/packages/wan/package.json b/packages/wan/package.jsonindex 1c0d7d6c..89d8c385 100644--- a/packages/wan/package.json+++ b/packages/wan/package.json@@ -1,6 +1,6 @@{"name": "@hypit/wan",- "version": "0.0.0-dev",+ "version": "0.1.0","license": "SEE LICENSE IN LICENSE","private": true,"type": "module",@@ -10,11 +10,15 @@"hypit": {"activation": "./src/activation.ts"},- "dependencies": {- "@hypit/artifact": "workspace:*",+ "files": ["dist", "README.md"],+ "peerDependencies": {+ "@hypit/hypit": "workspace:^"+ },+ "devDependencies": {+ "@hypit/blob": "workspace:*","@hypit/generation": "workspace:*",+ "@hypit/hypit": "workspace:*","@hypit/markup": "workspace:*",- "@hypit/model-kit": "workspace:*","@hypit/protocol": "workspace:*","@hypit/text": "workspace:*"}diff --git a/packages/wan/src/activation.ts b/packages/wan/src/activation.tsindex d1370084..70587787 100644--- a/packages/wan/src/activation.ts+++ b/packages/wan/src/activation.ts@@ -1,11 +1,15 @@-import { createMarkupSurfaceHostFacet } from "@hypit/markup";+import { createMarkupSurfaceFacet } from "@hypit/hypit/markup";+import { createAdmissionPackageFacet } from "@hypit/hypit/admission";+import { createProducerPackageFacet } from "@hypit/hypit/producer";import { wanComponent, wanDefinition, wanManifest, wanModuleRef, wanMarkupSurfaces } from "./index.js";import { decodeWanImageSurface, decodeWanProImageSurface } from "./surface.js";-export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest: wanManifest }], components: [wanComponent], hostFacets: [- wanDefinition.hostFacet,- createMarkupSurfaceHostFacet({ module: wanModuleRef,+export const hypitPackage = { format: "hypit.package@1" as const, modules: [{ manifest: wanManifest }], facets: [+ createProducerPackageFacet(wanComponent),+ createAdmissionPackageFacet(wanComponent),+ wanDefinition.facet,+ createMarkupSurfaceFacet({ module: wanModuleRef,declaration: wanMarkupSurfaces.find((item) => item.name === "image")!, handler: decodeWanImageSurface }),- createMarkupSurfaceHostFacet({ module: wanModuleRef,+ createMarkupSurfaceFacet({ module: wanModuleRef,declaration: wanMarkupSurfaces.find((item) => item.name === "pro-image")!, handler: decodeWanProImageSurface }),] };export default hypitPackage;diff --git a/packages/wan/src/index.ts b/packages/wan/src/index.tsindex f0fec42e..02781fde 100644--- a/packages/wan/src/index.ts+++ b/packages/wan/src/index.ts@@ -1,9 +1,9 @@-import { artifactTypes } from "@hypit/artifact";-import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/generation";-import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";-import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/markup";-import { defineExactModelModule } from "@hypit/model-kit";-import { textTypes } from "@hypit/text";+import { blobTypes } from "@hypit/hypit/blob";+import { sealGenerationPortRequest, sealGenerationPortTable } from "@hypit/hypit/generation";+import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/hypit/generation";+import type { SurfaceAttributeVocabulary, SurfaceChildVocabulary } from "@hypit/hypit/markup";+import { defineExactModelModule } from "@hypit/hypit/generation/model";+import { textTypes } from "@hypit/hypit/text";export const wanModuleRef = { name: "@hypit/wan", version: "1" } as const;export const wanModels = ["wan-2.7-image", "wan-2.7-image-pro"] as const;@@ -95,7 +95,7 @@ const wanChildren: readonly SurfaceChildVocabulary[] = [{ tag: "Reference", cardinality: "many",summary: "Attaches one image Artifact the model edits or draws on.",attributes: [- { name: "image", kind: "reference", required: true, accepts: [artifactTypes.blob],+ { name: "image", kind: "reference", required: true, accepts: [blobTypes.blob],summary: "Selects the image Artifact this reference contributes." },] },];@@ -118,7 +118,7 @@ const surface = (children: wanChildren,ports: [{name: "image",- type: artifactTypes.blob,+ type: blobTypes.blob,summary: "The primary generated image, addressed as `<id>.image`.",}],example,diff --git a/packages/wan/src/surface.ts b/packages/wan/src/surface.tsindex 1f6d9486..c2d0b012 100644--- a/packages/wan/src/surface.ts+++ b/packages/wan/src/surface.ts@@ -1,20 +1,15 @@-import { artifactTypes } from "@hypit/artifact";-import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/generation";-import type { GenerationMediaPort, GenerationPortValue } from "@hypit/generation";+import { blobTypes } from "@hypit/hypit/blob";+import { generationPort, sealGenerationMediaBinding, sealGenerationRequestDraft } from "@hypit/hypit/generation";+import type { GenerationMediaPort, GenerationPortValue } from "@hypit/hypit/generation";import {createExactModelPrimaryGenerationFragment,exactModelMediaInputNames,exactModelTextInputName,-} from "@hypit/model-kit";-import type { ExactModelEndpoint } from "@hypit/model-kit";-import type {- MarkupAttributeValue,- StructuredElement,- StructuredSurfaceHandler,- SurfaceResolvedReference,-} from "@hypit/markup";-import type { CanonicalValue, TypeRef } from "@hypit/protocol";-import { textTypes, verifyText } from "@hypit/text";+} from "@hypit/hypit/generation/model";+import type { ExactModelEndpoint } from "@hypit/hypit/generation/model";+import type { CanonicalValue, TypeRef } from "@hypit/hypit/protocol";+import type { MarkupAttributeValue, StructuredElement, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/markup";+import { textTypes, verifyText } from "@hypit/hypit/text";import { wanEndpoints } from "./index.js";@@ -97,7 +92,7 @@ function decoder(endpoint: ExactModelEndpoint): StructuredSurfaceHandler {assert(localName(child.name) === "Reference", `${element.name} accepts only Reference children`);exact(child, ["image"], ["image"]);assert(!child.children.some((item) => item.kind === "element" || item.value.trim()), `${child.name} must be empty`);- const image = ref(child, "image", artifactTypes.blob, resolveReference);+ const image = ref(child, "image", blobTypes.blob, resolveReference);if (image.record !== undefined) {assert(image.record.value.kind === "blob" && image.record.value.mediaType.startsWith("image/"),`${child.name}.image must reference image media`);