@happyvertical/smrt-images 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.
- package/dist/categorizer.d.ts +9 -3
- package/dist/deriver.d.ts +11 -5
- package/dist/editor.d.ts +14 -4
- package/dist/image.d.ts +10 -1
- package/dist/images.d.ts +5 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/media-bundle-persistence.d.ts +1 -1
- package/dist/metadata.d.ts +7 -2
- package/dist/prompts.d.ts +11 -2
- package/dist/route-module.d.ts +2 -2
- package/dist/search.d.ts +10 -4
- package/dist/smrt-knowledge.json +4 -4
- package/dist/types.d.ts +6 -3
- package/dist/ui.d.ts +7 -1
- package/dist/upstream.d.ts +9 -3
- package/dist/workbench.d.ts +6 -6
- package/package.json +10 -10
package/dist/categorizer.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ImageCategorizer - AI-powered image categorization
|
|
3
|
+
*
|
|
4
|
+
* Uses @happyvertical/ai to analyze image content and suggest
|
|
5
|
+
* tags, descriptions, and subject classifications.
|
|
6
|
+
*/
|
|
7
|
+
import type { AssetCollection } from '@happyvertical/smrt-assets';
|
|
8
|
+
import type { Image } from './image';
|
|
9
|
+
import type { CategoryResult, DetailedCategoryResult, ImageCategorizerOptions } from './types';
|
|
4
10
|
export declare class ImageCategorizer {
|
|
5
11
|
private readonly options;
|
|
6
12
|
constructor(options: ImageCategorizerOptions);
|
package/dist/deriver.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ImageDeriver - Creates new images from source images + AI prompts
|
|
3
|
+
*
|
|
4
|
+
* Combines multiple source images with creative prompts to generate
|
|
5
|
+
* new derivative images, tracking provenance via AssetAssociation.
|
|
6
|
+
*/
|
|
7
|
+
import type { AIClientOptions } from '@happyvertical/ai';
|
|
8
|
+
import type { AssetAssociationCollection, AssetStore } from '@happyvertical/smrt-assets';
|
|
9
|
+
import type { Image } from './image';
|
|
10
|
+
import type { ImageCollection } from './images';
|
|
11
|
+
import type { DeriveOptions } from './types';
|
|
6
12
|
export declare class ImageDeriver {
|
|
7
13
|
private readonly store;
|
|
8
14
|
private readonly collection;
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ImageEditor - Standard and AI-powered image editing
|
|
3
|
+
*
|
|
4
|
+
* Creates derivative assets for each edit operation, preserving
|
|
5
|
+
* the original image and linking via sourceAssetId (the derivation
|
|
6
|
+
* pointer; renamed from `parentId` in R3-D).
|
|
7
|
+
*
|
|
8
|
+
* Standard operations use @happyvertical/images (file-based API).
|
|
9
|
+
* AI operations use @happyvertical/ai.
|
|
10
|
+
*/
|
|
11
|
+
import type { AIClientOptions } from '@happyvertical/ai';
|
|
12
|
+
import type { AssetStore } from '@happyvertical/smrt-assets';
|
|
13
|
+
import type { Image } from './image';
|
|
14
|
+
import type { ImageCollection } from './images';
|
|
5
15
|
export declare class ImageEditor {
|
|
6
16
|
private readonly store;
|
|
7
17
|
private readonly collection;
|
package/dist/image.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image model - Asset subclass for image files
|
|
3
|
+
*
|
|
4
|
+
* Represents an image asset with dimensions and accessibility text.
|
|
5
|
+
* Uses STI (Single Table Inheritance) - stored in the assets table with _meta_type='Image'.
|
|
6
|
+
*
|
|
7
|
+
* For semantic search on images, use the centralized embedding system:
|
|
8
|
+
* @smrt({ embeddings: { fields: ['alt', 'description'] } })
|
|
9
|
+
*/
|
|
1
10
|
import { Asset } from '@happyvertical/smrt-assets';
|
|
2
|
-
import { ImageOptions } from './types';
|
|
11
|
+
import type { ImageOptions } from './types';
|
|
3
12
|
export declare class Image extends Asset {
|
|
4
13
|
width: number;
|
|
5
14
|
height: number;
|
package/dist/images.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageCollection - Collection manager for Image instances
|
|
3
|
+
*
|
|
4
|
+
* Provides image-specific query operations, tenant-aware queries, and bulk operations
|
|
5
|
+
*/
|
|
1
6
|
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
2
7
|
import { Image } from './image';
|
|
3
8
|
export declare class ImageCollection extends SmrtCollection<Image> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @happyvertical/smrt-images
|
|
3
|
+
*
|
|
4
|
+
* Image asset management with AI-powered categorization, search,
|
|
5
|
+
* editing, and metadata extraction.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import './__smrt-register__.js';
|
|
10
|
+
import './prompts.js';
|
|
1
11
|
export { ImageCategorizer } from './categorizer';
|
|
2
12
|
export { ImageDeriver } from './deriver';
|
|
3
13
|
export { ImageEditor } from './editor';
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { join } from "node:path";
|
|
|
7
7
|
import { Asset, persistMediaBundleInspection as persistImageMediaBundleInspection } from "@happyvertical/smrt-assets";
|
|
8
8
|
import { TenantIsolationError, TenantScoped, getCurrentTenant, isSuperAdminBypass } from "@happyvertical/smrt-tenancy";
|
|
9
9
|
//#region src/__smrt-register__.ts
|
|
10
|
-
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-images\",\"packageVersion\":\"0.51.32\",\"objects\":{\"@happyvertical/smrt-images:Image\":{\"name\":\"image\",\"className\":\"Image\",\"qualifiedName\":\"@happyvertical/smrt-images:Image\",\"collection\":\"assets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/images/src/image.ts\",\"packageName\":\"@happyvertical/smrt-images\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"generated\":true,\"source\":\"tenantScoped_decorator\",\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"autoFilter\":true,\"autoPopulate\":true,\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false},\"sourceUri\":{\"type\":\"text\",\"required\":false},\"mimeType\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"metadata\":{\"type\":\"text\",\"required\":false},\"version\":{\"type\":\"integer\",\"required\":true,\"default\":1},\"primaryVersionId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Asset\"},\"typeSlug\":{\"type\":\"text\",\"required\":false},\"statusSlug\":{\"type\":\"text\",\"required\":false},\"ownerProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"sourceAssetId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Asset\"},\"folderId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Folder\"},\"sourceType\":{\"type\":\"text\",\"required\":false},\"externalId\":{\"type\":\"text\",\"required\":false},\"externalRefs\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false},\"width\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"height\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"alt\":{\"type\":\"text\",\"required\":false,\"default\":\"\"}},\"methods\":{\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"mergeMetadata\":{\"name\":\"mergeMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getExternalRefs\":{\"name\":\"getExternalRefs\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, AssetExternalReference>\",\"isStatic\":false,\"isPublic\":true},\"getExternalRef\":{\"name\":\"getExternalRef\",\"async\":false,\"parameters\":[{\"name\":\"provider\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"AssetExternalReference | null\",\"isStatic\":false,\"isPublic\":true},\"setExternalRef\":{\"name\":\"setExternalRef\",\"async\":false,\"parameters\":[{\"name\":\"provider\",\"type\":\"string\",\"optional\":false},{\"name\":\"reference\",\"type\":\"any\",\"optional\":false,\"typeUnresolved\":true}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getTags\":{\"name\":\"getTags\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"hasTag\":{\"name\":\"hasTag\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getSource\":{\"name\":\"getSource\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Asset | null>\",\"isStatic\":false,\"isPublic\":true},\"getDerivatives\":{\"name\":\"getDerivatives\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"getType\":{\"name\":\"getType\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetType | null>\",\"isStatic\":false,\"isPublic\":true},\"getStatus\":{\"name\":\"getStatus\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetStatus | null>\",\"isStatic\":false,\"isPublic\":true},\"getAssociations\":{\"name\":\"getAssociations\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetAssociation[]>\",\"isStatic\":false,\"isPublic\":true},\"associateWith\":{\"name\":\"associateWith\",\"async\":true,\"parameters\":[{\"name\":\"metaType\",\"type\":\"string\",\"optional\":false},{\"name\":\"metaId\",\"type\":\"string\",\"optional\":false},{\"name\":\"role\",\"type\":\"any\",\"optional\":true,\"default\":\"default\"}],\"returnType\":\"Promise<AssetAssociation>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Asset | null>\",\"isStatic\":true,\"isPublic\":true},\"isValidImageFormat\":{\"name\":\"isValidImageFormat\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isHighResolution\":{\"name\":\"isHighResolution\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"generateAltText\":{\"name\":\"generateAltText\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<string>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"generateAltText\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"tableName\":\"assets\",\"tableStrategy\":\"sti\"},\"extends\":\"Asset\",\"exportName\":\"Image\",\"collectionExportName\":\"ImageCollection\",\"validationRules\":[{\"field\":\"version\",\"rule\":\"required\",\"fieldType\":\"integer\"}],\"schema\":{\"tableName\":\"assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"assets\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"source_uri\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"metadata\\\" TEXT,\\n \\\"version\\\" INTEGER DEFAULT 1,\\n \\\"primary_version_id\\\" UUID,\\n \\\"type_slug\\\" TEXT,\\n \\\"status_slug\\\" TEXT,\\n \\\"owner_profile_id\\\" UUID,\\n \\\"source_asset_id\\\" UUID,\\n \\\"folder_id\\\" UUID,\\n \\\"source_type\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"external_refs\\\" TEXT,\\n \\\"width\\\" INTEGER DEFAULT 0,\\n \\\"height\\\" INTEGER DEFAULT 0,\\n \\\"alt\\\" TEXT DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"source_uri\":{\"type\":\"TEXT\",\"notNull\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false},\"version\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":1},\"primary_version_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"type_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"status_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"owner_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"source_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"folder_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_type\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"external_refs\":{\"type\":\"TEXT\",\"notNull\":false},\"width\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"height\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"alt\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"assets_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"assets_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"assets_primary_version_id_idx\",\"columns\":[\"primary_version_id\"]},{\"name\":\"assets_owner_profile_id_idx\",\"columns\":[\"owner_profile_id\"]},{\"name\":\"assets_source_asset_id_idx\",\"columns\":[\"source_asset_id\"]},{\"name\":\"assets_folder_id_idx\",\"columns\":[\"folder_id\"]}],\"version\":\"dd79a8b6\"},\"importPath\":\"@happyvertical/smrt-images\"},\"@happyvertical/smrt-images:ImageCollection\":{\"name\":\"imagecollection\",\"className\":\"ImageCollection\",\"qualifiedName\":\"@happyvertical/smrt-images:ImageCollection\",\"collection\":\"assets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/images/src/images.ts\",\"packageName\":\"@happyvertical/smrt-images\",\"fields\":{},\"methods\":{\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByMinDimensions\":{\"name\":\"getByMinDimensions\",\"async\":true,\"parameters\":[{\"name\":\"minWidth\",\"type\":\"number\",\"optional\":false},{\"name\":\"minHeight\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByMaxDimensions\":{\"name\":\"getByMaxDimensions\",\"async\":true,\"parameters\":[{\"name\":\"maxWidth\",\"type\":\"number\",\"optional\":false},{\"name\":\"maxHeight\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getLandscape\":{\"name\":\"getLandscape\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getPortrait\":{\"name\":\"getPortrait\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getSquare\":{\"name\":\"getSquare\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getMissingAltText\":{\"name\":\"getMissingAltText\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getHighResolution\":{\"name\":\"getHighResolution\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByAspectRatio\":{\"name\":\"getByAspectRatio\",\"async\":true,\"parameters\":[{\"name\":\"minRatio\",\"type\":\"number\",\"optional\":false},{\"name\":\"maxRatio\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"assets\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Image\",\"exportName\":\"ImageCollection\",\"collectionExportName\":\"ImageCollectionCollection\",\"schema\":{\"tableName\":\"assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"assets\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"source_uri\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"metadata\\\" TEXT,\\n \\\"version\\\" INTEGER DEFAULT 1,\\n \\\"primary_version_id\\\" UUID,\\n \\\"type_slug\\\" TEXT,\\n \\\"status_slug\\\" TEXT,\\n \\\"owner_profile_id\\\" UUID,\\n \\\"source_asset_id\\\" UUID,\\n \\\"folder_id\\\" UUID,\\n \\\"source_type\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"external_refs\\\" TEXT,\\n \\\"width\\\" INTEGER DEFAULT 0,\\n \\\"height\\\" INTEGER DEFAULT 0,\\n \\\"alt\\\" TEXT DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"source_uri\":{\"type\":\"TEXT\",\"notNull\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false},\"version\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":1},\"primary_version_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"type_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"status_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"owner_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"source_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"folder_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_type\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"external_refs\":{\"type\":\"TEXT\",\"notNull\":false},\"width\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"height\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"alt\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"assets_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"assets_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"assets_primary_version_id_idx\",\"columns\":[\"primary_version_id\"]},{\"name\":\"assets_owner_profile_id_idx\",\"columns\":[\"owner_profile_id\"]},{\"name\":\"assets_source_asset_id_idx\",\"columns\":[\"source_asset_id\"]},{\"name\":\"assets_folder_id_idx\",\"columns\":[\"folder_id\"]}],\"version\":\"dd79a8b6\"},\"importPath\":\"@happyvertical/smrt-images\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-prompts\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
10
|
+
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-images\",\"packageVersion\":\"0.51.33\",\"objects\":{\"@happyvertical/smrt-images:Image\":{\"name\":\"image\",\"className\":\"Image\",\"qualifiedName\":\"@happyvertical/smrt-images:Image\",\"collection\":\"assets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/images/src/image.ts\",\"packageName\":\"@happyvertical/smrt-images\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"generated\":true,\"source\":\"tenantScoped_decorator\",\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"autoFilter\":true,\"autoPopulate\":true,\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false},\"sourceUri\":{\"type\":\"text\",\"required\":false},\"mimeType\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"metadata\":{\"type\":\"text\",\"required\":false},\"version\":{\"type\":\"integer\",\"required\":true,\"default\":1},\"primaryVersionId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Asset\"},\"typeSlug\":{\"type\":\"text\",\"required\":false},\"statusSlug\":{\"type\":\"text\",\"required\":false},\"ownerProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"sourceAssetId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Asset\"},\"folderId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Folder\"},\"sourceType\":{\"type\":\"text\",\"required\":false},\"externalId\":{\"type\":\"text\",\"required\":false},\"externalRefs\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false},\"width\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"height\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"alt\":{\"type\":\"text\",\"required\":false,\"default\":\"\"}},\"methods\":{\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"mergeMetadata\":{\"name\":\"mergeMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getExternalRefs\":{\"name\":\"getExternalRefs\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, AssetExternalReference>\",\"isStatic\":false,\"isPublic\":true},\"getExternalRef\":{\"name\":\"getExternalRef\",\"async\":false,\"parameters\":[{\"name\":\"provider\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"AssetExternalReference | null\",\"isStatic\":false,\"isPublic\":true},\"setExternalRef\":{\"name\":\"setExternalRef\",\"async\":false,\"parameters\":[{\"name\":\"provider\",\"type\":\"string\",\"optional\":false},{\"name\":\"reference\",\"type\":\"any\",\"optional\":false,\"typeUnresolved\":true}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getTags\":{\"name\":\"getTags\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"hasTag\":{\"name\":\"hasTag\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getSource\":{\"name\":\"getSource\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Asset | null>\",\"isStatic\":false,\"isPublic\":true},\"getDerivatives\":{\"name\":\"getDerivatives\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"getType\":{\"name\":\"getType\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetType | null>\",\"isStatic\":false,\"isPublic\":true},\"getStatus\":{\"name\":\"getStatus\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetStatus | null>\",\"isStatic\":false,\"isPublic\":true},\"getAssociations\":{\"name\":\"getAssociations\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<AssetAssociation[]>\",\"isStatic\":false,\"isPublic\":true},\"associateWith\":{\"name\":\"associateWith\",\"async\":true,\"parameters\":[{\"name\":\"metaType\",\"type\":\"string\",\"optional\":false},{\"name\":\"metaId\",\"type\":\"string\",\"optional\":false},{\"name\":\"role\",\"type\":\"any\",\"optional\":true,\"default\":\"default\"}],\"returnType\":\"Promise<AssetAssociation>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Asset | null>\",\"isStatic\":true,\"isPublic\":true},\"isValidImageFormat\":{\"name\":\"isValidImageFormat\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isHighResolution\":{\"name\":\"isHighResolution\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"generateAltText\":{\"name\":\"generateAltText\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<string>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"generateAltText\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"tableName\":\"assets\",\"tableStrategy\":\"sti\"},\"extends\":\"Asset\",\"exportName\":\"Image\",\"collectionExportName\":\"ImageCollection\",\"validationRules\":[{\"field\":\"version\",\"rule\":\"required\",\"fieldType\":\"integer\"}],\"schema\":{\"tableName\":\"assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"assets\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"source_uri\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"metadata\\\" TEXT,\\n \\\"version\\\" INTEGER DEFAULT 1,\\n \\\"primary_version_id\\\" UUID,\\n \\\"type_slug\\\" TEXT,\\n \\\"status_slug\\\" TEXT,\\n \\\"owner_profile_id\\\" UUID,\\n \\\"source_asset_id\\\" UUID,\\n \\\"folder_id\\\" UUID,\\n \\\"source_type\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"external_refs\\\" TEXT,\\n \\\"width\\\" INTEGER DEFAULT 0,\\n \\\"height\\\" INTEGER DEFAULT 0,\\n \\\"alt\\\" TEXT DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"source_uri\":{\"type\":\"TEXT\",\"notNull\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false},\"version\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":1},\"primary_version_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"type_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"status_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"owner_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"source_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"folder_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_type\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"external_refs\":{\"type\":\"TEXT\",\"notNull\":false},\"width\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"height\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"alt\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"assets_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"assets_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"assets_primary_version_id_idx\",\"columns\":[\"primary_version_id\"]},{\"name\":\"assets_owner_profile_id_idx\",\"columns\":[\"owner_profile_id\"]},{\"name\":\"assets_source_asset_id_idx\",\"columns\":[\"source_asset_id\"]},{\"name\":\"assets_folder_id_idx\",\"columns\":[\"folder_id\"]}],\"version\":\"dd79a8b6\"},\"importPath\":\"@happyvertical/smrt-images\"},\"@happyvertical/smrt-images:ImageCollection\":{\"name\":\"imagecollection\",\"className\":\"ImageCollection\",\"qualifiedName\":\"@happyvertical/smrt-images:ImageCollection\",\"collection\":\"assets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/images/src/images.ts\",\"packageName\":\"@happyvertical/smrt-images\",\"fields\":{},\"methods\":{\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByMinDimensions\":{\"name\":\"getByMinDimensions\",\"async\":true,\"parameters\":[{\"name\":\"minWidth\",\"type\":\"number\",\"optional\":false},{\"name\":\"minHeight\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByMaxDimensions\":{\"name\":\"getByMaxDimensions\",\"async\":true,\"parameters\":[{\"name\":\"maxWidth\",\"type\":\"number\",\"optional\":false},{\"name\":\"maxHeight\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getLandscape\":{\"name\":\"getLandscape\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getPortrait\":{\"name\":\"getPortrait\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getSquare\":{\"name\":\"getSquare\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getMissingAltText\":{\"name\":\"getMissingAltText\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getHighResolution\":{\"name\":\"getHighResolution\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true},\"getByAspectRatio\":{\"name\":\"getByAspectRatio\",\"async\":true,\"parameters\":[{\"name\":\"minRatio\",\"type\":\"number\",\"optional\":false},{\"name\":\"maxRatio\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"Promise<Image[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"assets\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Image\",\"exportName\":\"ImageCollection\",\"collectionExportName\":\"ImageCollectionCollection\",\"schema\":{\"tableName\":\"assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"assets\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"source_uri\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"metadata\\\" TEXT,\\n \\\"version\\\" INTEGER DEFAULT 1,\\n \\\"primary_version_id\\\" UUID,\\n \\\"type_slug\\\" TEXT,\\n \\\"status_slug\\\" TEXT,\\n \\\"owner_profile_id\\\" UUID,\\n \\\"source_asset_id\\\" UUID,\\n \\\"folder_id\\\" UUID,\\n \\\"source_type\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"external_refs\\\" TEXT,\\n \\\"width\\\" INTEGER DEFAULT 0,\\n \\\"height\\\" INTEGER DEFAULT 0,\\n \\\"alt\\\" TEXT DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"source_uri\":{\"type\":\"TEXT\",\"notNull\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false},\"version\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":1},\"primary_version_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"type_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"status_slug\":{\"type\":\"TEXT\",\"notNull\":false},\"owner_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"source_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"assets\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"folder_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_type\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"external_refs\":{\"type\":\"TEXT\",\"notNull\":false},\"width\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"height\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"alt\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"assets_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"assets_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"assets_primary_version_id_idx\",\"columns\":[\"primary_version_id\"]},{\"name\":\"assets_owner_profile_id_idx\",\"columns\":[\"owner_profile_id\"]},{\"name\":\"assets_source_asset_id_idx\",\"columns\":[\"source_asset_id\"]},{\"name\":\"assets_folder_id_idx\",\"columns\":[\"folder_id\"]}],\"version\":\"dd79a8b6\"},\"importPath\":\"@happyvertical/smrt-images\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-prompts\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/prompts.ts
|
|
13
13
|
var smrtImagesGenerateAltTextPrompt = definePrompt({
|
package/dist/manifest.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaBundleFileDescriptor, MediaBundleGpsTrackPoint, MediaBundleInspection, MediaBundleInspectionLike, MediaBundleNormalizedMetadata, MediaBundleSupportFileInspection, PersistMediaBundleAssetInput, PersistMediaBundleAssociationInput, PersistMediaBundleInspectionOptions, PersistMediaBundleInspectionResult, PersistMediaBundleMetadataArtifactInput, SmrtMediaBundlePersistenceAdapter } from '@happyvertical/smrt-assets';
|
|
1
|
+
import type { MediaBundleFileDescriptor, MediaBundleGpsTrackPoint, MediaBundleInspection, MediaBundleInspectionLike, MediaBundleNormalizedMetadata, MediaBundleSupportFileInspection, PersistMediaBundleAssetInput, PersistMediaBundleAssociationInput, PersistMediaBundleInspectionOptions, PersistMediaBundleInspectionResult, PersistMediaBundleMetadataArtifactInput, SmrtMediaBundlePersistenceAdapter } from '@happyvertical/smrt-assets';
|
|
2
2
|
export { type MediaSupportFileVisibility, persistMediaBundleInspection as persistImageMediaBundleInspection, } from '@happyvertical/smrt-assets';
|
|
3
3
|
export type ImageMediaBundleFileDescriptor = MediaBundleFileDescriptor;
|
|
4
4
|
export type ImageMediaBundleGpsTrackPoint = MediaBundleGpsTrackPoint;
|
package/dist/metadata.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ImageMetadataExtractor - Extracts metadata from image buffers
|
|
3
|
+
*
|
|
4
|
+
* Uses @happyvertical/images for dimension and format extraction.
|
|
5
|
+
*/
|
|
6
|
+
import type { Image } from './image';
|
|
7
|
+
import type { ImageMetadataResult } from './types';
|
|
3
8
|
export declare class ImageMetadataExtractor {
|
|
4
9
|
/**
|
|
5
10
|
* Extract metadata from an image buffer
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Prompt registrations for the @happyvertical/smrt-images package.
|
|
3
|
+
*
|
|
4
|
+
* Prompts are registered at module-load time via `definePrompt()` so that
|
|
5
|
+
* tenant-aware overrides can be applied at call time via `resolvePrompt()`.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the pattern used by `@happyvertical/smrt-profiles` (see
|
|
8
|
+
* `prompts.ts`) and `@happyvertical/smrt-properties` (see `prompts.ts`).
|
|
9
|
+
*/
|
|
10
|
+
import { type ResolvedPromptAI } from '@happyvertical/smrt-prompts';
|
|
11
|
+
export declare const smrtImagesGenerateAltTextPrompt: import("@happyvertical/smrt-prompts").PromptDefinition;
|
|
3
12
|
export declare function promptMessageOptions(ai: ResolvedPromptAI): {
|
|
4
13
|
maxTokens?: number | undefined;
|
|
5
14
|
temperature?: number | undefined;
|
package/dist/route-module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SmrtRouteDefinition, SmrtRouteModule } from '@happyvertical/smrt-types';
|
|
1
|
+
import type { SmrtRouteDefinition, SmrtRouteModule } from '@happyvertical/smrt-types';
|
|
2
2
|
import { ImageStudioRoute } from './svelte/routes/index.js';
|
|
3
|
-
import { createImagesRouteNavigation, IMAGES_DEFAULT_ROUTE_NAVIGATION, IMAGES_ROUTE_IDS, IMAGES_ROUTE_META, ImagesRouteId, ImagesRouteNavigationItem } from './svelte/routes/shared.js';
|
|
3
|
+
import { createImagesRouteNavigation, IMAGES_DEFAULT_ROUTE_NAVIGATION, IMAGES_ROUTE_IDS, IMAGES_ROUTE_META, type ImagesRouteId, type ImagesRouteNavigationItem } from './svelte/routes/shared.js';
|
|
4
4
|
export type { ImagesRouteId, ImagesRouteNavigationItem };
|
|
5
5
|
export { createImagesRouteNavigation, IMAGES_DEFAULT_ROUTE_NAVIGATION, IMAGES_ROUTE_IDS, IMAGES_ROUTE_META, ImageStudioRoute, };
|
|
6
6
|
export interface ImagesRouteDefinitions {
|
package/dist/search.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ImageSearch - AI-powered image search
|
|
3
|
+
*
|
|
4
|
+
* Provides text-based and semantic search across image collections
|
|
5
|
+
* with optional AI-powered similarity matching.
|
|
6
|
+
*/
|
|
7
|
+
import type { AIClientOptions } from '@happyvertical/ai';
|
|
8
|
+
import type { Image } from './image';
|
|
9
|
+
import type { ImageCollection } from './images';
|
|
10
|
+
import type { ImageSearchOptions } from './types';
|
|
5
11
|
export declare class ImageSearch {
|
|
6
12
|
private readonly collection;
|
|
7
13
|
readonly _options: {
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-images",
|
|
6
|
-
"packageVersion": "0.51.
|
|
6
|
+
"packageVersion": "0.51.33",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "02dcce4f7ed34dd6e0781e21fa9753783e616cd55fb9076ccacaa0a2d6a4472a",
|
|
11
|
+
"packageJson": "dc7a27cdac4ea5d37917293c807fb057756d6ed93d54a37dd126bb12e3d01755",
|
|
12
12
|
"agents": "85871e48eeda2f2f1f7f474be58202b8f25428a05dac4fa6170d00e74d23d39b"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "24.13.6",
|
|
42
42
|
"svelte": "^5.57.1",
|
|
43
43
|
"svelte-check": "^4.7.6",
|
|
44
|
-
"typescript": "
|
|
44
|
+
"typescript": "6.0.3",
|
|
45
45
|
"vite": "8.1.4",
|
|
46
46
|
"vitest": "4.1.10"
|
|
47
47
|
},
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for @happyvertical/smrt-images package
|
|
3
|
+
*/
|
|
4
|
+
import type { AIClientOptions } from '@happyvertical/ai';
|
|
5
|
+
import type { AssetOptions } from '@happyvertical/smrt-assets';
|
|
6
|
+
import type { DecisionClient, DecisionConfig } from '@happyvertical/smrt-core';
|
|
4
7
|
/**
|
|
5
8
|
* Options for creating an Image instance
|
|
6
9
|
*/
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Images Module UI Slot Declarations
|
|
3
|
+
*
|
|
4
|
+
* This file defines the UI extension points for the images module.
|
|
5
|
+
* UI components are implemented in the ./svelte subpath.
|
|
6
|
+
*/
|
|
7
|
+
import type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';
|
|
2
8
|
/**
|
|
3
9
|
* Images module UI slots
|
|
4
10
|
*/
|
package/dist/upstream.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* UpstreamManager - Manages importing images from upstream sources
|
|
3
|
+
*
|
|
4
|
+
* Searches across configured upstream source adapters and imports
|
|
5
|
+
* assets into the local store with provenance tracking.
|
|
6
|
+
*/
|
|
7
|
+
import type { AssetStore } from '@happyvertical/smrt-assets';
|
|
8
|
+
import type { Image } from './image';
|
|
9
|
+
import type { ImageCollection } from './images';
|
|
4
10
|
/**
|
|
5
11
|
* Minimal adapter interface for upstream asset sources.
|
|
6
12
|
* Full implementation lives in @happyvertical/assets (SDK package).
|
package/dist/workbench.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ImageEditorClient, ImageLike, ImagesGalleryClient } from './svelte/image-clients.js';
|
|
2
|
-
import
|
|
1
|
+
import type { ImageEditorClient, ImageLike, ImagesGalleryClient } from './svelte/image-clients.js';
|
|
2
|
+
import playground from './svelte/playground.js';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
packageName: string;
|
|
5
5
|
displayName: string;
|
|
@@ -16,17 +16,17 @@ declare const _default: {
|
|
|
16
16
|
title: string;
|
|
17
17
|
description?: string;
|
|
18
18
|
defaultPath: string;
|
|
19
|
-
component: import(
|
|
19
|
+
component: import("@happyvertical/smrt-types").ModuleComponentType<{
|
|
20
20
|
data?: unknown;
|
|
21
21
|
}>;
|
|
22
22
|
load?: ((input: unknown) => unknown) | undefined;
|
|
23
|
-
loadKind?: import(
|
|
24
|
-
nav?: import(
|
|
23
|
+
loadKind?: import("@happyvertical/smrt-types").SmrtRouteLoadKind;
|
|
24
|
+
nav?: import("@happyvertical/smrt-types").SmrtRouteNavigationMeta;
|
|
25
25
|
tags?: string[];
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
packageName: string;
|
|
29
28
|
description?: string | undefined;
|
|
29
|
+
packageName: string;
|
|
30
30
|
displayName: string;
|
|
31
31
|
}[];
|
|
32
32
|
recommendedCommands: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-images",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.33",
|
|
4
4
|
"description": "Image asset management with AI-powered categorization, search, editing, and metadata extraction for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"smrtRawPrimitives": "strict",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@happyvertical/ai": "^0.94.1",
|
|
42
42
|
"@happyvertical/images": "^0.94.1",
|
|
43
|
-
"@happyvertical/smrt-assets": "0.51.
|
|
44
|
-
"@happyvertical/smrt-core": "0.51.
|
|
45
|
-
"@happyvertical/smrt-prompts": "0.51.
|
|
46
|
-
"@happyvertical/smrt-tenancy": "0.51.
|
|
47
|
-
"@happyvertical/smrt-types": "0.51.
|
|
48
|
-
"@happyvertical/smrt-ui": "0.51.
|
|
43
|
+
"@happyvertical/smrt-assets": "0.51.33",
|
|
44
|
+
"@happyvertical/smrt-core": "0.51.33",
|
|
45
|
+
"@happyvertical/smrt-prompts": "0.51.33",
|
|
46
|
+
"@happyvertical/smrt-tenancy": "0.51.33",
|
|
47
|
+
"@happyvertical/smrt-types": "0.51.33",
|
|
48
|
+
"@happyvertical/smrt-ui": "0.51.33",
|
|
49
49
|
"@happyvertical/utils": "^0.94.1",
|
|
50
50
|
"jimp": "^1.6.1",
|
|
51
51
|
"sharp": "^0.35.4"
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"svelte": "^5.57.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@happyvertical/smrt-playground": "0.51.
|
|
58
|
-
"@happyvertical/smrt-vitest": "0.51.
|
|
57
|
+
"@happyvertical/smrt-playground": "0.51.33",
|
|
58
|
+
"@happyvertical/smrt-vitest": "0.51.33",
|
|
59
59
|
"@happyvertical/sql": "^0.94.1",
|
|
60
60
|
"@sveltejs/kit": "2.69.1",
|
|
61
61
|
"@sveltejs/package": "^2.5.8",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/node": "24.13.6",
|
|
64
64
|
"svelte": "^5.57.1",
|
|
65
65
|
"svelte-check": "^4.7.6",
|
|
66
|
-
"typescript": "
|
|
66
|
+
"typescript": "6.0.3",
|
|
67
67
|
"vite": "8.1.4",
|
|
68
68
|
"vitest": "4.1.10"
|
|
69
69
|
},
|