@happyvertical/smrt-video 0.51.32 → 0.51.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/__smrt-register__.d.ts +2 -0
  2. package/dist/__smrt-register__.d.ts.map +1 -0
  3. package/dist/character-asset.d.ts +22 -0
  4. package/dist/character-asset.d.ts.map +1 -0
  5. package/dist/character-assets.d.ts +11 -0
  6. package/dist/character-assets.d.ts.map +1 -0
  7. package/dist/character-owned-asset.d.ts +19 -0
  8. package/dist/character-owned-asset.d.ts.map +1 -0
  9. package/dist/character.d.ts +152 -0
  10. package/dist/character.d.ts.map +1 -0
  11. package/dist/characters.d.ts +23 -0
  12. package/dist/characters.d.ts.map +1 -0
  13. package/dist/composite-job.d.ts +89 -0
  14. package/dist/composite-job.d.ts.map +1 -0
  15. package/dist/index.d.ts +58 -1283
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +1 -1
  18. package/dist/manifest.json +1 -1
  19. package/dist/media-bundle-persistence.d.ts +2 -0
  20. package/dist/media-bundle-persistence.d.ts.map +1 -0
  21. package/dist/owned-asset-utils.d.ts +24 -0
  22. package/dist/owned-asset-utils.d.ts.map +1 -0
  23. package/dist/performer-asset.d.ts +22 -0
  24. package/dist/performer-asset.d.ts.map +1 -0
  25. package/dist/performer-assets.d.ts +11 -0
  26. package/dist/performer-assets.d.ts.map +1 -0
  27. package/dist/performer-owned-asset.d.ts +19 -0
  28. package/dist/performer-owned-asset.d.ts.map +1 -0
  29. package/dist/performer.d.ts +117 -0
  30. package/dist/performer.d.ts.map +1 -0
  31. package/dist/personality-profile.d.ts +10 -0
  32. package/dist/personality-profile.d.ts.map +1 -0
  33. package/dist/scene-asset.d.ts +22 -0
  34. package/dist/scene-asset.d.ts.map +1 -0
  35. package/dist/scene-assets.d.ts +11 -0
  36. package/dist/scene-assets.d.ts.map +1 -0
  37. package/dist/scene-owned-asset.d.ts +19 -0
  38. package/dist/scene-owned-asset.d.ts.map +1 -0
  39. package/dist/scene.d.ts +179 -0
  40. package/dist/scene.d.ts.map +1 -0
  41. package/dist/smrt-knowledge.json +4 -4
  42. package/dist/video-composition-asset.d.ts +21 -0
  43. package/dist/video-composition-asset.d.ts.map +1 -0
  44. package/dist/video-composition.d.ts +77 -0
  45. package/dist/video-composition.d.ts.map +1 -0
  46. package/dist/video-compositions.d.ts +13 -0
  47. package/dist/video-compositions.d.ts.map +1 -0
  48. package/dist/video-content.d.ts +10 -0
  49. package/dist/video-content.d.ts.map +1 -0
  50. package/dist/video-sequence-asset.d.ts +21 -0
  51. package/dist/video-sequence-asset.d.ts.map +1 -0
  52. package/dist/video-sequence.d.ts +66 -0
  53. package/dist/video-sequence.d.ts.map +1 -0
  54. package/dist/video-sequences.d.ts +13 -0
  55. package/dist/video-sequences.d.ts.map +1 -0
  56. package/dist/video-shot-asset.d.ts +21 -0
  57. package/dist/video-shot-asset.d.ts.map +1 -0
  58. package/dist/video-shot-character.d.ts +56 -0
  59. package/dist/video-shot-character.d.ts.map +1 -0
  60. package/dist/video-shot-characters.d.ts +13 -0
  61. package/dist/video-shot-characters.d.ts.map +1 -0
  62. package/dist/video-shot.d.ts +142 -0
  63. package/dist/video-shot.d.ts.map +1 -0
  64. package/dist/video-shots.d.ts +15 -0
  65. package/dist/video-shots.d.ts.map +1 -0
  66. package/dist/video-workflow.d.ts +187 -0
  67. package/dist/video-workflow.d.ts.map +1 -0
  68. package/package.json +10 -10
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-video",
5
- "packageVersion": "0.51.32",
5
+ "packageVersion": "0.51.33",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-video:CharacterAsset": {
8
8
  "name": "characterasset",
@@ -0,0 +1,2 @@
1
+ export { type MediaBundleFileDescriptor, type MediaBundleGpsTrackPoint, type MediaBundleInspection, type MediaBundleInspectionLike, type MediaBundleNormalizedMetadata, type MediaBundleSupportFileInspection, type MediaSupportFileVisibility, type PersistMediaBundleAssetInput, type PersistMediaBundleAssociationInput, type PersistMediaBundleInspectionOptions, type PersistMediaBundleInspectionResult, type PersistMediaBundleMetadataArtifactInput, persistMediaBundleInspection, type SmrtMediaBundlePersistenceAdapter, } from '@happyvertical/smrt-assets';
2
+ //# sourceMappingURL=media-bundle-persistence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-bundle-persistence.d.ts","sourceRoot":"","sources":["../src/media-bundle-persistence.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,uCAAuC,EAC5C,4BAA4B,EAC5B,KAAK,iCAAiC,GACvC,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type Asset } from '@happyvertical/smrt-assets';
2
+ import type { DatabaseInterface } from '@happyvertical/sql';
3
+ declare const VIDEO_ASSET_OWNER_COLUMNS: readonly ["character_id", "performer_id", "scene_id", "video_shot_id", "video_sequence_id", "video_composition_id"];
4
+ export type VideoAssetOwnerColumn = (typeof VIDEO_ASSET_OWNER_COLUMNS)[number];
5
+ export declare function mergeOwnedAssetIds(...groups: Array<Iterable<string | null | undefined>>): string[];
6
+ export declare function assertValidVideoAssetRole(role: string): void;
7
+ export declare function assertValidVideoAssetSortOrder(sortOrder: number): void;
8
+ export declare function resolveOwnedAssets(db: DatabaseInterface, tenantId: string | null | undefined, assetIds: Iterable<string | null | undefined>): Promise<Asset[]>;
9
+ export declare function listCanonicalOwnedAssetIds<T extends {
10
+ assetId: string;
11
+ }>(options: {
12
+ tableName: string;
13
+ loadLinks: () => Promise<T[]>;
14
+ }): Promise<string[]>;
15
+ export declare function listLegacyOwnedAssetIds(options: {
16
+ db: DatabaseInterface;
17
+ ownerColumn: VideoAssetOwnerColumn;
18
+ ownerId: string;
19
+ role?: string;
20
+ metaTypes: string[];
21
+ }): Promise<string[]>;
22
+ export declare function legacyVideoAssetMetaTypes(className: string): string[];
23
+ export {};
24
+ //# sourceMappingURL=owned-asset-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owned-asset-utils.d.ts","sourceRoot":"","sources":["../src/owned-asset-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAmB,MAAM,4BAA4B,CAAC;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,QAAA,MAAM,yBAAyB,qHAOrB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AA4D/E,wBAAgB,kBAAkB,CAChC,GAAG,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GACpD,MAAM,EAAE,CAgBV;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAM5D;AAED,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAMtE;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,iBAAiB,EACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAC5C,OAAO,CAAC,KAAK,EAAE,CAAC,CAkClB;AAED,wBAAsB,0BAA0B,CAC9C,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EAC7B,OAAO,EAAE;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;CAC/B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAYpB;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,EAAE,EAAE,iBAAiB,CAAC;IACtB,WAAW,EAAE,qBAAqB,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAwCpB;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAErE"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * PerformerAsset - legacy STI asset subclass for Performer-owned assets
3
+ *
4
+ * @deprecated Performer owned assets are now modeled canonically through
5
+ * `PerformerOwnedAsset` join rows in `performer_assets`. This legacy subtype
6
+ * remains readable during migration.
7
+ */
8
+ import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
9
+ /** Roles a performer asset can play */
10
+ export type PerformerAssetRole = 'reference' | 'seed';
11
+ export interface PerformerAssetOptions extends AssetOptions {
12
+ /** Performer this asset belongs to */
13
+ performerId?: string | null;
14
+ /** Role of this asset for the performer */
15
+ role?: PerformerAssetRole;
16
+ }
17
+ export declare class PerformerAsset extends Asset {
18
+ performerId: string | null;
19
+ role: PerformerAssetRole;
20
+ constructor(options?: PerformerAssetOptions);
21
+ }
22
+ //# sourceMappingURL=performer-asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performer-asset.d.ts","sourceRoot":"","sources":["../src/performer-asset.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,qBAKa,cAAe,SAAQ,KAAK;IAEvC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC,IAAI,EAAE,kBAAkB,CAAe;gBAE3B,OAAO,GAAE,qBAA0B;CAMhD"}
@@ -0,0 +1,11 @@
1
+ import type { SmrtCollectionOptions } from '@happyvertical/smrt-core';
2
+ import { SmrtJunction } from '@happyvertical/smrt-core';
3
+ import { PerformerOwnedAsset } from './performer-owned-asset.js';
4
+ export interface PerformerOwnedAssetCollectionOptions extends SmrtCollectionOptions {
5
+ }
6
+ export declare class PerformerOwnedAssetCollection extends SmrtJunction<PerformerOwnedAsset> {
7
+ static readonly _itemClass: typeof PerformerOwnedAsset;
8
+ protected leftField: string;
9
+ protected rightField: string;
10
+ }
11
+ //# sourceMappingURL=performer-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performer-assets.d.ts","sourceRoot":"","sources":["../src/performer-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAQ,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,WAAW,oCACf,SAAQ,qBAAqB;CAAG;AAElC,qBAKa,6BAA8B,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IAClF,MAAM,CAAC,QAAQ,CAAC,UAAU,6BAAuB;IACjD,SAAS,CAAC,SAAS,SAAiB;IACpC,SAAS,CAAC,UAAU,SAAa;CAClC"}
@@ -0,0 +1,19 @@
1
+ import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
2
+ import { SmrtObject } from '@happyvertical/smrt-core';
3
+ import type { PerformerAssetRole } from './performer-asset.js';
4
+ export interface PerformerOwnedAssetOptions extends SmrtObjectOptions {
5
+ performerId?: string;
6
+ assetId?: string;
7
+ role?: PerformerAssetRole;
8
+ sortOrder?: number;
9
+ tenantId?: string | null;
10
+ }
11
+ export declare class PerformerOwnedAsset extends SmrtObject {
12
+ tenantId: string | null;
13
+ performerId: string;
14
+ assetId: string;
15
+ role: PerformerAssetRole;
16
+ sortOrder: number;
17
+ constructor(options?: PerformerOwnedAssetOptions);
18
+ }
19
+ //# sourceMappingURL=performer-owned-asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performer-owned-asset.d.ts","sourceRoot":"","sources":["../src/performer-owned-asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,qBASa,mBAAoB,SAAQ,UAAU;IAEjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,WAAW,SAAM;IAGjB,OAAO,SAAM;IAGb,IAAI,EAAE,kBAAkB,CAAe;IAGvC,SAAS,SAAK;gBAEF,OAAO,GAAE,0BAA+B;CAQrD"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Performer Model
3
+ *
4
+ * Represents the physical likeness/face DNA for consistent face generation.
5
+ * A Performer can play multiple Characters (PersonalityProfiles).
6
+ * Ensures face consistency via IP-Adapter FaceID.
7
+ */
8
+ import type { Asset } from '@happyvertical/smrt-assets';
9
+ import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
10
+ import { SmrtObject } from '@happyvertical/smrt-core';
11
+ import type { PerformerAssetRole } from './performer-asset.js';
12
+ /**
13
+ * Performer DNA for IP-Adapter FaceID consistency
14
+ */
15
+ export interface PerformerDNA {
16
+ /** Gender */
17
+ gender: 'male' | 'female' | 'neutral';
18
+ /** Age range */
19
+ ageRange: 'child' | 'teen' | 'young_adult' | 'adult' | 'middle_aged' | 'senior';
20
+ /** Face embedding for IP-Adapter FaceID (512-dim vector) */
21
+ faceEmbedding?: number[];
22
+ /** Default clothing style (can be overridden per Character) */
23
+ defaultClothing?: {
24
+ style: 'business' | 'casual' | 'formal' | 'outdoor';
25
+ colors?: string[];
26
+ description?: string;
27
+ };
28
+ /** IP-Adapter weight for consistency (0.5-1.0) */
29
+ ipAdapterWeight: number;
30
+ /** FaceID weight for face consistency */
31
+ faceIdWeight?: number;
32
+ }
33
+ /**
34
+ * Performer status
35
+ */
36
+ export type PerformerStatus = 'pending' | 'ready';
37
+ /**
38
+ * Performer creation options
39
+ */
40
+ export interface PerformerOptions extends SmrtObjectOptions {
41
+ /** Human-readable name */
42
+ name?: string;
43
+ /** Description */
44
+ description?: string | null;
45
+ /** Performer DNA for consistent face generation */
46
+ dna?: PerformerDNA;
47
+ /** Reference images for IP-Adapter (multiple angles/expressions) */
48
+ referenceAssetIds?: string[];
49
+ /** Generated seed image asset ID */
50
+ seedImageAssetId?: string | null;
51
+ /** Default voice profile for this performer */
52
+ voiceProfileId?: string | null;
53
+ /** Performer status */
54
+ status?: PerformerStatus;
55
+ /** 1-1 profile record for this performer */
56
+ profileId?: string | null;
57
+ /** Tenant ID for multi-tenant isolation */
58
+ tenantId?: string | null;
59
+ }
60
+ /**
61
+ * Performer - The physical likeness/face DNA
62
+ *
63
+ * A Performer represents a person's visual identity for consistent
64
+ * face generation across multiple Characters. One Performer can play
65
+ * many Characters (e.g., same face as "Evening Anchor" and "Weekend Host").
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * import { Performer } from '@happyvertical/smrt-video';
70
+ *
71
+ * const performer = new Performer({
72
+ * name: 'Alex Bentley',
73
+ * dna: {
74
+ * gender: 'male',
75
+ * ageRange: 'adult',
76
+ * ipAdapterWeight: 0.75,
77
+ * },
78
+ * referenceAssetIds: ['ref-img-1', 'ref-img-2'],
79
+ * });
80
+ * await performer.save();
81
+ * ```
82
+ */
83
+ export declare class Performer extends SmrtObject {
84
+ tenantId: string | null;
85
+ /** Human-readable name */
86
+ name: string;
87
+ /** Description */
88
+ description: string | null;
89
+ /** Performer DNA for consistent face generation */
90
+ dna: PerformerDNA;
91
+ /** Reference images for IP-Adapter (multiple angles/expressions) */
92
+ referenceAssetIds: string[];
93
+ /** Generated seed image asset ID */
94
+ seedImageAssetId: string | null;
95
+ /** Default voice profile for this performer */
96
+ voiceProfileId: string | null;
97
+ /** Performer status */
98
+ status: PerformerStatus;
99
+ /** 1-1 profile record for this performer */
100
+ profileId: string | null;
101
+ constructor(options?: PerformerOptions);
102
+ private getPerformerAssetCollection;
103
+ private getLegacyFieldAssetIds;
104
+ private setLegacyFieldAssetId;
105
+ private clearLegacyFieldAssetId;
106
+ getAssets(role?: PerformerAssetRole): Promise<Asset[]>;
107
+ getAssetByRole(role: PerformerAssetRole): Promise<Asset | null>;
108
+ addAsset(asset: Asset, role?: PerformerAssetRole, sortOrder?: number): Promise<void>;
109
+ removeAsset(assetId: string, role?: PerformerAssetRole): Promise<void>;
110
+ /** Check if the performer has reference images */
111
+ get hasReferences(): boolean;
112
+ /** Check if the performer has a face embedding */
113
+ get hasFaceEmbedding(): boolean;
114
+ /** Check if the performer is ready for generation */
115
+ get isReady(): boolean;
116
+ }
117
+ //# sourceMappingURL=performer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performer.d.ts","sourceRoot":"","sources":["../src/performer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,C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a5E,kDAAkD;IAClD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,kDAAkD;IAClD,IAAI,gBAAgB,IAAI,OAAO,CAI9B;IAED,qDAAqD;IACrD,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * PersonalityProfile - DEPRECATED
3
+ *
4
+ * Use Character instead. This module re-exports Character as PersonalityProfile
5
+ * for backwards compatibility.
6
+ *
7
+ * @deprecated Use {@link Character} from './character.js' instead.
8
+ */
9
+ export { type BrandingConfig, Character as PersonalityProfile, type CharacterOptions as PersonalityProfileOptions, type CharacterSceneConfig, type CharacterStatus as PersonalityProfileStatus, } from './character.js';
10
+ //# sourceMappingURL=personality-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personality-profile.d.ts","sourceRoot":"","sources":["../src/personality-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,cAAc,EACnB,SAAS,IAAI,kBAAkB,EAC/B,KAAK,gBAAgB,IAAI,yBAAyB,EAClD,KAAK,oBAAoB,EACzB,KAAK,eAAe,IAAI,wBAAwB,GACjD,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * SceneAsset - legacy STI asset subclass for Scene-owned assets
3
+ *
4
+ * @deprecated Scene owned assets are now modeled canonically through
5
+ * `SceneOwnedAsset` join rows in `scene_assets`. This legacy subtype remains
6
+ * readable during migration.
7
+ */
8
+ import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
9
+ /** Roles a scene asset can play */
10
+ export type SceneAssetRole = 'source' | 'viewpoint-extract' | 'env-map';
11
+ export interface SceneAssetOptions extends AssetOptions {
12
+ /** Scene this asset belongs to */
13
+ sceneId?: string | null;
14
+ /** Role of this asset for the scene */
15
+ role?: SceneAssetRole;
16
+ }
17
+ export declare class SceneAsset extends Asset {
18
+ sceneId: string | null;
19
+ role: SceneAssetRole;
20
+ constructor(options?: SceneAssetOptions);
21
+ }
22
+ //# sourceMappingURL=scene-asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-asset.d.ts","sourceRoot":"","sources":["../src/scene-asset.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,mCAAmC;AACnC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,mBAAmB,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uCAAuC;IACvC,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,qBAKa,UAAW,SAAQ,KAAK;IAEnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE9B,IAAI,EAAE,cAAc,CAAY;gBAEpB,OAAO,GAAE,iBAAsB;CAK5C"}
@@ -0,0 +1,11 @@
1
+ import type { SmrtCollectionOptions } from '@happyvertical/smrt-core';
2
+ import { SmrtJunction } from '@happyvertical/smrt-core';
3
+ import { SceneOwnedAsset } from './scene-owned-asset.js';
4
+ export interface SceneOwnedAssetCollectionOptions extends SmrtCollectionOptions {
5
+ }
6
+ export declare class SceneOwnedAssetCollection extends SmrtJunction<SceneOwnedAsset> {
7
+ static readonly _itemClass: typeof SceneOwnedAsset;
8
+ protected leftField: string;
9
+ protected rightField: string;
10
+ }
11
+ //# sourceMappingURL=scene-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-assets.d.ts","sourceRoot":"","sources":["../src/scene-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAQ,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,gCACf,SAAQ,qBAAqB;CAAG;AAElC,qBAKa,yBAA0B,SAAQ,YAAY,CAAC,eAAe,CAAC;IAC1E,MAAM,CAAC,QAAQ,CAAC,UAAU,yBAAmB;IAC7C,SAAS,CAAC,SAAS,SAAa;IAChC,SAAS,CAAC,UAAU,SAAa;CAClC"}
@@ -0,0 +1,19 @@
1
+ import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
2
+ import { SmrtObject } from '@happyvertical/smrt-core';
3
+ import type { SceneAssetRole } from './scene-asset.js';
4
+ export interface SceneOwnedAssetOptions extends SmrtObjectOptions {
5
+ sceneId?: string;
6
+ assetId?: string;
7
+ role?: SceneAssetRole;
8
+ sortOrder?: number;
9
+ tenantId?: string | null;
10
+ }
11
+ export declare class SceneOwnedAsset extends SmrtObject {
12
+ tenantId: string | null;
13
+ sceneId: string;
14
+ assetId: string;
15
+ role: SceneAssetRole;
16
+ sortOrder: number;
17
+ constructor(options?: SceneOwnedAssetOptions);
18
+ }
19
+ //# sourceMappingURL=scene-owned-asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-owned-asset.d.ts","sourceRoot":"","sources":["../src/scene-owned-asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,qBASa,eAAgB,SAAQ,UAAU;IAE7C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,OAAO,SAAM;IAGb,OAAO,SAAM;IAGb,IAAI,EAAE,cAAc,CAAY;IAGhC,SAAS,SAAK;gBAEF,OAAO,GAAE,sBAA2B;CAQjD"}
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Scene Model
3
+ *
4
+ * Represents a virtual production scene (background environment).
5
+ * Supports 360° panoramas, standard images, and video backgrounds.
6
+ */
7
+ import type { Asset } from '@happyvertical/smrt-assets';
8
+ import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
9
+ import { SmrtObject } from '@happyvertical/smrt-core';
10
+ import type { SceneAssetRole } from './scene-asset.js';
11
+ /**
12
+ * Viewpoint extracted from 360° scene
13
+ */
14
+ export interface SceneViewpoint {
15
+ /** Viewpoint identifier */
16
+ id: string;
17
+ /** Human-readable name */
18
+ name: string;
19
+ /** Horizontal rotation (-180 to 180°) */
20
+ pan: number;
21
+ /** Vertical rotation (-90 to 90°) */
22
+ tilt: number;
23
+ /** Field of view (60-120°) */
24
+ fov: number;
25
+ /** Generated rectilinear image asset ID */
26
+ extractedAssetId?: string;
27
+ /** Viewpoint-specific lighting profile */
28
+ lightingProfile?: LightingProfile;
29
+ }
30
+ /**
31
+ * Lighting profile for IC-Light matching
32
+ */
33
+ export interface LightingProfile {
34
+ /** Dominant light direction (normalized vector) */
35
+ direction?: {
36
+ x: number;
37
+ y: number;
38
+ z: number;
39
+ };
40
+ /** Light color temperature (Kelvin) */
41
+ colorTemperature?: number;
42
+ /** Ambient light intensity (0-1) */
43
+ ambientIntensity?: number;
44
+ /** Key light intensity (0-1) */
45
+ keyLightIntensity?: number;
46
+ /** Shadow softness (0-1) */
47
+ shadowSoftness?: number;
48
+ /** Environment map asset ID for reflections */
49
+ envMapAssetId?: string;
50
+ }
51
+ /**
52
+ * Anchor point for character placement in scene
53
+ */
54
+ export interface AnchorPoint {
55
+ /** Anchor point identifier */
56
+ id: string;
57
+ /** Human-readable name */
58
+ name: string;
59
+ /** Position as normalized coordinates (0-1) */
60
+ position: {
61
+ x: number;
62
+ y: number;
63
+ };
64
+ /** Suggested character scale at this point */
65
+ suggestedScale: number;
66
+ /** Ground plane Y coordinate for perspective */
67
+ groundY: number;
68
+ /** Optional viewpoint this anchor belongs to */
69
+ viewpointId?: string;
70
+ }
71
+ /**
72
+ * Scene source type
73
+ */
74
+ export type SceneSourceType = 'image' | 'video' | 'panorama_360' | 'panorama_180';
75
+ /**
76
+ * Scene projection type
77
+ */
78
+ export type SceneProjection = 'equirectangular' | 'cubemap';
79
+ /**
80
+ * Scene status
81
+ */
82
+ export type SceneStatus = 'pending' | 'processing' | 'ready' | 'failed';
83
+ /**
84
+ * Scene creation options
85
+ */
86
+ export interface SceneOptions extends SmrtObjectOptions {
87
+ /** Human-readable name */
88
+ name?: string;
89
+ /** Description */
90
+ description?: string | null;
91
+ /** Source media asset ID */
92
+ sourceAssetId?: string | null;
93
+ /** Type of source media */
94
+ sourceType?: SceneSourceType;
95
+ /** Projection type for panoramas */
96
+ projection?: SceneProjection | null;
97
+ /** Extracted camera angles from 360° panoramas */
98
+ viewpoints?: SceneViewpoint[];
99
+ /** Lighting analysis for IC-Light matching */
100
+ lightingProfile?: LightingProfile | null;
101
+ /** Location metadata */
102
+ location?: {
103
+ name: string;
104
+ coordinates?: {
105
+ lat: number;
106
+ lng: number;
107
+ };
108
+ } | null;
109
+ /** Anchor points for character placement */
110
+ anchorPoints?: AnchorPoint[];
111
+ /** Scene status */
112
+ status?: SceneStatus;
113
+ /** Tenant ID for multi-tenant isolation */
114
+ tenantId?: string | null;
115
+ }
116
+ /**
117
+ * Scene for virtual production compositing
118
+ *
119
+ * Supports 360° panoramas, standard images, and video backgrounds
120
+ * with viewpoint extraction, lighting analysis, and character placement.
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * import { Scene } from '@happyvertical/smrt-video';
125
+ *
126
+ * const scene = new Scene({
127
+ * name: 'Town Hall Exterior',
128
+ * sourceAssetId: 'asset-townhall-pano',
129
+ * sourceType: 'panorama_360',
130
+ * projection: 'equirectangular',
131
+ * });
132
+ * await scene.save();
133
+ * ```
134
+ */
135
+ export declare class Scene extends SmrtObject {
136
+ tenantId: string | null;
137
+ /** Human-readable name */
138
+ name: string;
139
+ /** Description */
140
+ description: string | null;
141
+ /** Source media asset ID */
142
+ sourceAssetId: string | null;
143
+ /** Type of source media */
144
+ sourceType: SceneSourceType;
145
+ /** Projection type for panoramas */
146
+ projection: SceneProjection | null;
147
+ /** Extracted camera angles from 360° panoramas */
148
+ viewpoints: SceneViewpoint[];
149
+ /** Lighting analysis for IC-Light matching */
150
+ lightingProfile: LightingProfile | null;
151
+ /** Location metadata */
152
+ location: {
153
+ name: string;
154
+ coordinates?: {
155
+ lat: number;
156
+ lng: number;
157
+ };
158
+ } | null;
159
+ /** Anchor points for character placement */
160
+ anchorPoints: AnchorPoint[];
161
+ /** Scene status */
162
+ status: SceneStatus;
163
+ constructor(options?: SceneOptions);
164
+ private getSceneAssetCollection;
165
+ private getLegacyFieldAssetIds;
166
+ private setLegacyFieldAssetId;
167
+ private clearLegacyFieldAssetId;
168
+ getAssets(role?: SceneAssetRole): Promise<Asset[]>;
169
+ getAssetByRole(role: SceneAssetRole): Promise<Asset | null>;
170
+ addAsset(asset: Asset, role?: SceneAssetRole, sortOrder?: number): Promise<void>;
171
+ removeAsset(assetId: string, role?: SceneAssetRole): Promise<void>;
172
+ /** Check if this is a 360° panorama */
173
+ get isPanorama(): boolean;
174
+ /** Check if the scene has viewpoints extracted */
175
+ get hasViewpoints(): boolean;
176
+ /** Check if the scene is ready for compositing */
177
+ get isReady(): boolean;
178
+ }
179
+ //# sourceMappingURL=scene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,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AaxE,uCAAuC;IACvC,IAAI,UAAU,IAAI,OAAO,CAIxB;IAED,kDAAkD;IAClD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,kDAAkD;IAClD,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-video",
6
- "packageVersion": "0.51.32",
6
+ "packageVersion": "0.51.33",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "668e279fe6fb54339d7ebb3aafb79e173be919d7af63d74d073e2ecc2034e5b6",
11
- "packageJson": "6e747e204cfb05507a23cfaa69b25736e92d2ca186c77277a96dda1f7ba63349",
10
+ "manifest": "539f0bd23319b8d08de2e0b216d32d2f0554e4803468a966fe3a286775d8b35f",
11
+ "packageJson": "d086eeae696fc05a6904318395481e88db9ad3a517e5d16ed987e80a759a3135",
12
12
  "agents": "01c6489f21d949868550deecb68d3a1e264b9dee396ef437330aa3eb81c6a0c9"
13
13
  },
14
14
  "exports": [
@@ -29,7 +29,7 @@
29
29
  "@happyvertical/smrt-vitest": "workspace:*",
30
30
  "@happyvertical/sql": "catalog:",
31
31
  "@types/node": "24.13.6",
32
- "typescript": "5.9.3",
32
+ "typescript": "6.0.3",
33
33
  "vite": "8.1.4",
34
34
  "vitest": "4.1.10",
35
35
  "svelte": "^5.57.1"
@@ -0,0 +1,21 @@
1
+ /**
2
+ * VideoCompositionAsset - legacy STI asset subclass for VideoComposition-owned assets
3
+ *
4
+ * @deprecated VideoComposition now uses inherited Content asset helpers backed
5
+ * by `content_assets`. This legacy subtype remains readable during migration.
6
+ */
7
+ import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
8
+ /** Roles a video composition asset can play */
9
+ export type VideoCompositionAssetRole = 'video' | 'audio' | 'thumbnail';
10
+ export interface VideoCompositionAssetOptions extends AssetOptions {
11
+ /** VideoComposition this asset belongs to */
12
+ videoCompositionId?: string | null;
13
+ /** Role of this asset for the composition */
14
+ role?: VideoCompositionAssetRole;
15
+ }
16
+ export declare class VideoCompositionAsset extends Asset {
17
+ videoCompositionId: string | null;
18
+ role: VideoCompositionAssetRole;
19
+ constructor(options?: VideoCompositionAssetOptions);
20
+ }
21
+ //# sourceMappingURL=video-composition-asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-composition-asset.d.ts","sourceRoot":"","sources":["../src/video-composition-asset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,+CAA+C;AAC/C,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;AAExE,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,IAAI,CAAC,EAAE,yBAAyB,CAAC;CAClC;AAED,qBAKa,qBAAsB,SAAQ,KAAK;IAE9C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzC,IAAI,EAAE,yBAAyB,CAAW;gBAE9B,OAAO,GAAE,4BAAiC;CAMvD"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * VideoComposition Model
3
+ *
4
+ * The publishable output. Defines render spec (fps, width, height).
5
+ * Contains ordered sequences with optional transitions between them.
6
+ * Maps to Remotion <Composition /> + <TransitionSeries>.
7
+ *
8
+ * Design principle: store frames, compute seconds. seconds = frames / fps.
9
+ */
10
+ import type { Asset } from '@happyvertical/smrt-assets';
11
+ import { Content, type ContentOptions } from '@happyvertical/smrt-content';
12
+ import type { VideoCompositionAssetRole } from './video-composition-asset.js';
13
+ /**
14
+ * Render status for the composition
15
+ */
16
+ export type RenderStatus = 'draft' | 'rendering' | 'ready' | 'failed';
17
+ /**
18
+ * VideoComposition creation options
19
+ */
20
+ export interface VideoCompositionOptions extends ContentOptions {
21
+ /** Frames per second (e.g., 30) — everything downstream is in frames */
22
+ fps?: number;
23
+ /** Render width in pixels */
24
+ width?: number;
25
+ /** Render height in pixels */
26
+ height?: number;
27
+ /** Computed total: sum of sequences minus transition overlaps */
28
+ durationInFrames?: number;
29
+ /** Render status */
30
+ renderStatus?: RenderStatus;
31
+ /** Render progress (0-100) */
32
+ renderProgress?: number;
33
+ }
34
+ /**
35
+ * Publishable video composition
36
+ *
37
+ * VideoComposition is the top-level container for a rendered video.
38
+ * It defines the render spec and contains ordered VideoSequences.
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * import { VideoComposition } from '@happyvertical/smrt-video';
43
+ *
44
+ * const composition = new VideoComposition({
45
+ * title: 'Evening News - January 25, 2026',
46
+ * fps: 30,
47
+ * width: 1920,
48
+ * height: 1080,
49
+ * });
50
+ * await composition.save();
51
+ * ```
52
+ */
53
+ export declare class VideoComposition extends Content {
54
+ /** Frames per second — everything downstream is in frames */
55
+ fps: number;
56
+ /** Render width in pixels */
57
+ width: number;
58
+ /** Render height in pixels */
59
+ height: number;
60
+ /** Computed total: sum of sequences minus transition overlaps */
61
+ durationInFrames: number;
62
+ /** Render status */
63
+ renderStatus: RenderStatus;
64
+ /** Render progress (0-100) */
65
+ renderProgress: number;
66
+ constructor(options?: VideoCompositionOptions);
67
+ /** Duration in seconds */
68
+ get durationInSeconds(): number;
69
+ /** Check if the composition is ready for publishing */
70
+ get isReady(): boolean;
71
+ /** Check if the composition is currently rendering */
72
+ get isRendering(): boolean;
73
+ getAssets(relationship?: string): Promise<Asset[]>;
74
+ getAssets(role?: VideoCompositionAssetRole): Promise<Asset[]>;
75
+ getAssetByRole(role: VideoCompositionAssetRole): Promise<Asset | null>;
76
+ }
77
+ //# sourceMappingURL=video-composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-composition.d.ts","sourceR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