feat: workflows & plugins (#26727)

feat: plugins

chore: better types

feat: plugins
This commit is contained in:
Jason Rasmussen 2026-05-18 11:09:33 -04:00 committed by GitHub
parent 7384799f19
commit 3d075f2bf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
144 changed files with 6099 additions and 7419 deletions

View file

@ -749,8 +749,11 @@ export enum BootstrapEventPriority {
StorageService = -195,
// Other services may need to queue jobs on bootstrap.
JobService = -190,
// Initialise config after other bootstrap services, stop other services from using config on bootstrap
// Initialize config after other bootstrap services, stop other services from using config on bootstrap
SystemConfig = 100,
PluginSync = 190,
// Load plugins into memory after sync
PluginLoad = 200,
}
export enum QueueName {
@ -863,7 +866,7 @@ export enum JobName {
Ocr = 'Ocr',
// Workflow
WorkflowRun = 'WorkflowRun',
WorkflowAssetCreate = 'WorkflowAssetCreate',
}
export const JobNameSchema = z.enum(JobName).describe('Job name').meta({ id: 'JobName' });
@ -909,6 +912,7 @@ export enum DatabaseLock {
CLIPDimSize = 512,
Library = 1337,
NightlyJobs = 600,
PluginImport = 666,
MediaLocation = 700,
GetSystemConfig = 69,
BackupDatabase = 42,
@ -1160,12 +1164,19 @@ export enum PluginContext {
export const PluginContextSchema = z.enum(PluginContext).describe('Plugin context').meta({ id: 'PluginContextType' });
export enum PluginTriggerType {
export enum WorkflowTrigger {
AssetCreate = 'AssetCreate',
PersonRecognized = 'PersonRecognized',
}
export const PluginTriggerTypeSchema = z
.enum(PluginTriggerType)
export const WorkflowTriggerSchema = z
.enum(WorkflowTrigger)
.describe('Plugin trigger type')
.meta({ id: 'PluginTriggerType' });
.meta({ id: 'WorkflowTrigger' });
export enum WorkflowType {
AssetV1 = 'AssetV1',
AssetPersonV1 = 'AssetPersonV1',
}
export const WorkflowTypeSchema = z.enum(WorkflowType).describe('Workflow type').meta({ id: 'WorkflowType' });