import type { ContinuumObjectReference, ContinuumPackageVersion } from '@hypersoniclabs/helix-manifest'; export type HomeShellSceneResource = { id: string; kind: string; source: { kind: string; uri?: string; }; integrity: { sha256: string; }; bytes?: number; mimeType: string; }; export type HomeShellSceneDocument = { format: string; version: number; id: string; revision: string; integrity: { sha256: string; }; profiles?: Record; resources?: HomeShellSceneResource[]; collision?: { sets?: unknown[]; }; lights?: unknown[]; mounts?: unknown[]; materials?: unknown[]; }; export type HomeShellItem = { id: string; slug: string; title: string; kind: string; tags?: string[]; /** The Package this Item already resolves to, if it has one. */ continuumPackagePin?: { packageId: string; version?: string; manifestCid?: string; } | null; }; export type HomeScenePackageObject = { reference: ContinuumObjectReference; source: { kind: 'file'; path: string; audience: 'public'; }; }; export type HomeScenePackageDescriptor = { projectId: string; package: { schema: 'helix.continuum.package/1'; id: string; type: 'scene'; name: string; }; packagePublication: { slug: string; visibility: 'public' | 'private'; }; packageVersion: ContinuumPackageVersion; universalItemPin: { itemId: string; promoteToPublished?: true; }; objects: HomeScenePackageObject[]; listings: Array<{ listing: Record; }>; }; export type DerivedHomeScenePackage = { descriptor: HomeScenePackageDescriptor; /** Bundle-relative paths the caller must write beside the descriptor. */ files: Array<{ path: string; sha256: string; }>; /** * Whether another creator could mount this Scene into their own map. A mount * selects a profile and the resolver requires that profile to be `world`-kind, * so a Home that declares only a `home` profile is discoverable and buyable * but not embeddable. */ mountable: boolean; /** * Resources the Scene pins from somewhere other than its own bundle (a Vault * sky, say). They are deliberately NOT in the Package closure: the Package * owns the bytes it ships, and claiming bytes it does not ship would make the * closure a lie. */ externalResources: Array<{ id: string; kind: string; source: string; }>; }; export type HomeShellResourceBytes = { /** Bundle-relative URI, exactly as the Scene document pins it. */ uri: string; bytes: Uint8Array; }; /** Deterministic UUIDv5-shaped identity over a HELIX-owned namespace string. */ export declare function deterministicContinuumUuidFromNamespace(namespace: string): string; /** * The Package, Vault Listing and Marketplace Listing identities a given Home * Shell owns. Deriving them from the Item id rather than minting them makes the * whole promotion idempotent: re-running it reconciles the same rows instead of * creating a second Package for the same house. */ export declare function homeScenePackageIdentity(itemId: string): { packageId: string; vaultListingId: string; marketplaceListingId: string; }; export type DeriveHomeScenePackageInput = { item: HomeShellItem; /** The published Scene document, byte for byte as the CDN serves it. */ sceneBytes: Uint8Array; /** Every bundle resource the Scene document pins, already fetched. */ resources: HomeShellResourceBytes[]; version?: string; packageSlug?: string; tags?: string[]; /** * Publish into an EXISTING Package rather than the one derived from the Item. * Needed for a Home whose Scene Package was minted before this path existed — * without it a second run would create a second Package for the same house. */ packageId?: string; /** Publish the Item alongside the pin. Omitted leaves the Item's status alone. */ promoteToPublished?: boolean; }; export declare function deriveHomeScenePackage(input: DeriveHomeScenePackageInput): DerivedHomeScenePackage; /** * Where a Home Shell's Scene v2 bundle lives. * * The `home-shell` asset's `cdnUrl` is whichever rendition the compiler wrote as * the entry point: `scene.helix-scene.json` for a natively published Scene v2 * package, and the legacy `world.json` rollback rendition for a shell compiled * from GLB. Only `metadata.bundle` names the canonical Scene v2 bundle in both * cases, so resolve through it first — reading the cdnUrl alone reports a * perfectly Scene-backed Home as legacy. */ export declare function homeShellSceneBundleRoot(asset: { cdnUrl?: string | null; metadata?: { bundle?: { format?: string; version?: number; baseUrl?: string; } | null; } | null; }): string | null;