mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-24 21:48:36 +02:00
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>
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
|
|
import { createWorkspaceSeed } from '@shared/domain/workspace';
|
|
|
|
describe('workspace seed', () => {
|
|
test('starts empty and seeds built-in workflows and workflow templates with a shared timestamp', () => {
|
|
const workspace = createWorkspaceSeed();
|
|
|
|
expect(workspace.projects).toEqual([]);
|
|
expect(workspace.sessions).toEqual([]);
|
|
expect(workspace.settings).toEqual({
|
|
theme: 'dark',
|
|
tooling: {
|
|
mcpServers: [],
|
|
lspProfiles: [],
|
|
},
|
|
discoveredUserTooling: {
|
|
mcpServers: [],
|
|
},
|
|
});
|
|
expect(workspace.selectedProjectId).toBeUndefined();
|
|
expect(workspace.selectedWorkflowId).toBeUndefined();
|
|
expect(workspace.selectedSessionId).toBeUndefined();
|
|
|
|
expect(workspace.workflows.map((workflow) => workflow.settings.orchestrationMode)).toEqual([
|
|
'single',
|
|
'sequential',
|
|
'concurrent',
|
|
'handoff',
|
|
'group-chat',
|
|
]);
|
|
expect(workspace.workflowTemplates.map((template) => template.id)).toEqual([
|
|
'workflow-template-code-review',
|
|
'workflow-template-research-summarize',
|
|
'workflow-template-customer-support',
|
|
'workflow-template-content-creation',
|
|
'workflow-template-multi-agent-debate',
|
|
'workflow-template-data-processing',
|
|
'workflow-template-approval',
|
|
'workflow-template-nested-orchestrator',
|
|
]);
|
|
|
|
for (const workflow of workspace.workflows) {
|
|
expect(workflow.createdAt).toBe(workspace.lastUpdatedAt);
|
|
expect(workflow.updatedAt).toBe(workspace.lastUpdatedAt);
|
|
expect(workflow.settings.approvalPolicy).toBeUndefined();
|
|
}
|
|
|
|
for (const template of workspace.workflowTemplates) {
|
|
expect(template.createdAt).toBe(workspace.lastUpdatedAt);
|
|
expect(template.updatedAt).toBe(workspace.lastUpdatedAt);
|
|
}
|
|
});
|
|
});
|