feat: workflow foundation (#23621)

* feat: plugins

* feat: table definition

* feat: type and migration

* feat: add repositories

* feat: validate manifest with class-validator and load manifest info to database

* feat: workflow/plugin controller/service layer

* feat: implement workflow logic

* feat: make trigger static

* feat: dynamical instantiate plugin instances

* fix: access control and helper script

* feat: it works

* chore: simplify

* refactor: refactor and use queue for workflow execution

* refactor: remove unsused property in plugin-schema

* build wasm in prod

* feat: plugin loader in transaction

* fix: docker build arm64

* generated files

* shell check

* fix tests

* fix: waiting for migration to finish before loading plugin

* remove context reassignment

* feat: use mise to manage extism tools (#23760)

* pr feedback

* refactor: create workflow now including create filters and actions

* feat: workflow medium tests

* fix: broken medium test

* feat: medium tests

* chore: unify workflow job

* sign user id with jwt

* chore: query plugin with filters and action

* chore: read manifest in repository

* chore: load manifest from server configs

* merge main

* feat: endpoint documentation

* pr feedback

* load plugin from absolute path

* refactor:handle trigger

* throw error and return early

* pr feedback

* unify plugin services

* fix: plugins code

* clean up

* remove triggerConfig

* clean up

* displayName and methodName

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
Co-authored-by: bo0tzz <git@bo0tzz.me>
This commit is contained in:
Alex
2025-11-14 14:05:05 -06:00
committed by GitHub
parent d784d431d0
commit 4dcc049465
89 changed files with 7264 additions and 14 deletions

View File

@@ -25,6 +25,7 @@ class SystemConfigJobDto {
required this.smartSearch,
required this.thumbnailGeneration,
required this.videoConversion,
required this.workflow,
});
JobSettingsDto backgroundTask;
@@ -51,6 +52,8 @@ class SystemConfigJobDto {
JobSettingsDto videoConversion;
JobSettingsDto workflow;
@override
bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto &&
other.backgroundTask == backgroundTask &&
@@ -64,7 +67,8 @@ class SystemConfigJobDto {
other.sidecar == sidecar &&
other.smartSearch == smartSearch &&
other.thumbnailGeneration == thumbnailGeneration &&
other.videoConversion == videoConversion;
other.videoConversion == videoConversion &&
other.workflow == workflow;
@override
int get hashCode =>
@@ -80,10 +84,11 @@ class SystemConfigJobDto {
(sidecar.hashCode) +
(smartSearch.hashCode) +
(thumbnailGeneration.hashCode) +
(videoConversion.hashCode);
(videoConversion.hashCode) +
(workflow.hashCode);
@override
String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, faceDetection=$faceDetection, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]';
String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, faceDetection=$faceDetection, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -99,6 +104,7 @@ class SystemConfigJobDto {
json[r'smartSearch'] = this.smartSearch;
json[r'thumbnailGeneration'] = this.thumbnailGeneration;
json[r'videoConversion'] = this.videoConversion;
json[r'workflow'] = this.workflow;
return json;
}
@@ -123,6 +129,7 @@ class SystemConfigJobDto {
smartSearch: JobSettingsDto.fromJson(json[r'smartSearch'])!,
thumbnailGeneration: JobSettingsDto.fromJson(json[r'thumbnailGeneration'])!,
videoConversion: JobSettingsDto.fromJson(json[r'videoConversion'])!,
workflow: JobSettingsDto.fromJson(json[r'workflow'])!,
);
}
return null;
@@ -182,6 +189,7 @@ class SystemConfigJobDto {
'smartSearch',
'thumbnailGeneration',
'videoConversion',
'workflow',
};
}