feat(workflows): add phase 5 backend templates and export support

- add shared workflow template and serialization helpers for YAML, Mermaid, and DOT export
- add pattern-to-workflow upgrade and template application flows in AryxAppService
- persist built-in and custom workflow templates in workspace state and expose new IPC/preload methods
- cover the new backend slice with shared and app-service tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-04-05 21:11:59 +02:00
co-authored by Copilot
parent f05ec8ac7f
commit 4971dcf9fc
17 changed files with 1094 additions and 6 deletions
+12 -1
View File
@@ -3,7 +3,7 @@ import { describe, expect, test } from 'bun:test';
import { createWorkspaceSeed } from '@shared/domain/workspace';
describe('workspace seed', () => {
test('starts empty and seeds the built-in orchestration patterns with a shared timestamp', () => {
test('starts empty and seeds built-in patterns and workflow templates with a shared timestamp', () => {
const workspace = createWorkspaceSeed();
expect(workspace.projects).toEqual([]);
@@ -30,6 +30,13 @@ describe('workspace seed', () => {
'group-chat',
'magentic',
]);
expect(workspace.workflowTemplates.map((template) => template.id)).toEqual([
'workflow-template-single',
'workflow-template-sequential',
'workflow-template-concurrent',
'workflow-template-handoff',
'workflow-template-group-chat',
]);
for (const pattern of workspace.patterns) {
expect(pattern.createdAt).toBe(workspace.lastUpdatedAt);
@@ -41,5 +48,9 @@ describe('workspace seed', () => {
expect(magentic?.availability).toBe('unavailable');
expect(magentic?.unavailabilityReason).toContain('unsupported');
for (const template of workspace.workflowTemplates) {
expect(template.createdAt).toBe(workspace.lastUpdatedAt);
expect(template.updatedAt).toBe(workspace.lastUpdatedAt);
}
});
});