mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-28 23:48:39 +02:00
refactor: remove legacy patterns system, unify on workflows
Remove the entire patterns domain model, IPC channels, sidecar services, renderer components, and tests. Sessions now bind exclusively to workflows via workflowId. Builtin workflows replace builtin patterns. Backend: - Make AgentNodeConfig standalone (no longer extends PatternAgentDefinition) - Add WorkflowOrchestrationMode and WorkflowExecutionDefinition - Create builtin workflows (single-agent, sequential, concurrent, handoff, group-chat) - Rewrite session model config helpers for workflow-only - Remove pattern IPC channels, handlers, and preload bindings - Merge createSession/createWorkflowSession into single method - Remove sidecar PatternGraphResolver, PatternValidator, pattern DTOs - Add workspace migration for legacy sessions (patternId -> workflowId) Frontend: - Delete PatternEditor, pattern-graph components, patternGraph lib - Delete NewSessionModal (session creation uses workflows directly) - Remove PatternsSection from SettingsPanel - Update App.tsx, ChatPane, ActivityPanel, Sidebar, RunTimeline, AgentConfigFields, InlinePills, sessionActivity to use workflow types - Delete pattern.ts domain module 78 files changed across backend and frontend. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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 built-in patterns and workflow templates with a shared timestamp', () => {
|
||||
test('starts empty and seeds built-in workflows and workflow templates with a shared timestamp', () => {
|
||||
const workspace = createWorkspaceSeed();
|
||||
|
||||
expect(workspace.projects).toEqual([]);
|
||||
@@ -19,16 +19,15 @@ describe('workspace seed', () => {
|
||||
},
|
||||
});
|
||||
expect(workspace.selectedProjectId).toBeUndefined();
|
||||
expect(workspace.selectedPatternId).toBeUndefined();
|
||||
expect(workspace.selectedWorkflowId).toBeUndefined();
|
||||
expect(workspace.selectedSessionId).toBeUndefined();
|
||||
|
||||
expect(workspace.patterns.map((pattern) => pattern.mode)).toEqual([
|
||||
expect(workspace.workflows.map((workflow) => workflow.settings.orchestrationMode)).toEqual([
|
||||
'single',
|
||||
'sequential',
|
||||
'concurrent',
|
||||
'handoff',
|
||||
'group-chat',
|
||||
'magentic',
|
||||
]);
|
||||
expect(workspace.workflowTemplates.map((template) => template.id)).toEqual([
|
||||
'workflow-template-code-review',
|
||||
@@ -41,16 +40,12 @@ describe('workspace seed', () => {
|
||||
'workflow-template-nested-orchestrator',
|
||||
]);
|
||||
|
||||
for (const pattern of workspace.patterns) {
|
||||
expect(pattern.createdAt).toBe(workspace.lastUpdatedAt);
|
||||
expect(pattern.updatedAt).toBe(workspace.lastUpdatedAt);
|
||||
expect(pattern.approvalPolicy?.rules).toContainEqual({ kind: 'tool-call' });
|
||||
for (const workflow of workspace.workflows) {
|
||||
expect(workflow.createdAt).toBe(workspace.lastUpdatedAt);
|
||||
expect(workflow.updatedAt).toBe(workspace.lastUpdatedAt);
|
||||
expect(workflow.settings.approvalPolicy).toBeUndefined();
|
||||
}
|
||||
|
||||
const magentic = workspace.patterns.find((pattern) => pattern.mode === 'magentic');
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user