Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions backend/src/dsl/__tests__/compiler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,16 @@ describe('compileWorkflowGraph', () => {
nodes: [
{
id: 'log-node',
type: 'core.console.log',
type: 'core.http.request',
position: { x: 0, y: 0 },
data: {
label: 'Console',
label: 'HTTP Request',
config: {
params: {},
params: {
method: 'GET',
},
inputOverrides: {
label: 'Log',
data: 'hello',
url: 'https://example.com',
},
},
},
Expand Down Expand Up @@ -252,48 +253,48 @@ describe('compileWorkflowGraph', () => {
},
{
id: 'branchA',
type: 'core.text.splitter',
type: 'core.http.request',
position: { x: -100, y: 100 },
data: {
label: 'Branch A',
config: {
params: {
separator: '\n',
method: 'POST',
},
inputOverrides: {
text: 'Branch A payload',
url: 'https://example.com/branch-a',
},
},
},
},
{
id: 'branchB',
type: 'core.text.splitter',
type: 'core.http.request',
position: { x: 100, y: 100 },
data: {
label: 'Branch B',
config: {
params: {
separator: '\n',
method: 'POST',
},
inputOverrides: {
text: 'Branch B payload',
url: 'https://example.com/branch-b',
},
},
},
},
{
id: 'merge',
type: 'core.text.splitter',
type: 'core.http.request',
position: { x: 0, y: 200 },
data: {
label: 'Merge',
config: {
params: {
separator: '\n',
method: 'POST',
},
inputOverrides: {
text: 'Merge payload',
url: 'https://example.com/merge',
},
},
},
Expand Down
31 changes: 1 addition & 30 deletions backend/src/workflows/__tests__/workflow-ai-agent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,6 @@ const workflowGraph = WorkflowGraphSchema.parse({
},
},
},
{
id: 'console-log',
type: 'core.console.log',
position: { x: 960, y: 160 },
data: {
label: 'Console Log',
config: {
params: {},
inputOverrides: {
label: 'Agent Output',
},
},
},
},
],
edges: [
{
Expand All @@ -105,13 +91,6 @@ const workflowGraph = WorkflowGraphSchema.parse({
sourceHandle: 'chatModel',
targetHandle: 'chatModel',
},
{
id: 'agent-to-console',
source: 'agent-node',
target: 'console-log',
sourceHandle: 'responseText',
targetHandle: 'data',
},
],
viewport: { x: 0, y: 0, zoom: 1 },
});
Expand All @@ -125,7 +104,6 @@ describe('Workflow d177b3c0-644e-40f0-8aa2-7b4f2c13a3af', () => {
'entry-point',
'gemini-provider',
'agent-node',
'console-log',
]);

const geminiAction = definition.actions.find((action) => action.ref === 'gemini-provider');
Expand All @@ -141,13 +119,6 @@ describe('Workflow d177b3c0-644e-40f0-8aa2-7b4f2c13a3af', () => {
sourceRef: 'gemini-provider',
sourceHandle: 'chatModel',
});

const consoleAction = definition.actions.find((action) => action.ref === 'console-log');
expect(consoleAction?.dependsOn).toEqual(['agent-node']);
expect(consoleAction?.inputMappings?.data).toEqual({
sourceRef: 'agent-node',
sourceHandle: 'responseText',
});
});

it('commits the workflow via service and persists compiled definition', async () => {
Expand Down Expand Up @@ -290,7 +261,7 @@ describe('Workflow d177b3c0-644e-40f0-8aa2-7b4f2c13a3af', () => {
const definition = await service.commit(workflowId, authContext);

expect(savedDefinition).not.toBeNull();
expect(savedDefinition!.actions.length).toBe(4);
expect(savedDefinition!.actions.length).toBe(3);
expect(
definition.actions.find((action) => action.componentId === 'core.ai.agent'),
).toBeDefined();
Expand Down
29 changes: 8 additions & 21 deletions packages/contracts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const awsCredentialSchema = () =>
sessionToken: z.string().optional(),
region: z.string().optional(),
}),
{ schemaName: awsCredentialContractName, isCredential: true }
{ schemaName: awsCredentialContractName, isCredential: true },
);

export type AwsCredential = z.infer<ReturnType<typeof awsCredentialSchema>>;
Expand Down Expand Up @@ -97,18 +97,6 @@ export const McpToolDefinitionSchema = () =>

export type McpToolDefinition = z.infer<ReturnType<typeof McpToolDefinitionSchema>>;

export const consoleLogResultContractName = 'core.console-log.result.v1';
export const consoleLogResultSchema = () =>
withPortMeta(
z.object({
logged: z.boolean(),
preview: z.string(),
}),
{ schemaName: consoleLogResultContractName }
);

export type ConsoleLogResult = z.infer<ReturnType<typeof consoleLogResultSchema>>;

export const secretMetadataContractName = 'core.secret-fetch.metadata.v1';
export const secretMetadataSchema = () =>
withPortMeta(
Expand All @@ -117,7 +105,7 @@ export const secretMetadataSchema = () =>
version: z.number(),
format: z.enum(['raw', 'json']),
}),
{ schemaName: secretMetadataContractName }
{ schemaName: secretMetadataContractName },
);

export type SecretMetadata = z.infer<ReturnType<typeof secretMetadataSchema>>;
Expand All @@ -132,17 +120,16 @@ export const fileContractSchema = () =>
size: z.number(),
content: z.string(),
}),
{ schemaName: fileContractName }
{ schemaName: fileContractName },
);

export type FileContract = z.infer<ReturnType<typeof fileContractSchema>>;

export const destinationWriterContractName = 'destination.writer';
export const destinationWriterSchema = () =>
withPortMeta(
z.object(DestinationConfigSchema.shape),
{ schemaName: destinationWriterContractName }
);
withPortMeta(z.object(DestinationConfigSchema.shape), {
schemaName: destinationWriterContractName,
});

export type DestinationWriter = z.infer<ReturnType<typeof destinationWriterSchema>>;

Expand All @@ -157,7 +144,7 @@ export const manualApprovalPendingSchema = () =>
respondedAt: z.string(),
requestId: z.string(),
}),
{ schemaName: manualApprovalPendingContractName }
{ schemaName: manualApprovalPendingContractName },
);

export type ManualApprovalPending = z.infer<ReturnType<typeof manualApprovalPendingSchema>>;
Expand All @@ -180,7 +167,7 @@ export const manualSelectionPendingSchema = () =>
respondedAt: z.string(),
requestId: z.string(),
}),
{ schemaName: manualSelectionPendingContractName }
{ schemaName: manualSelectionPendingContractName },
);

export type ManualSelectionPending = z.infer<ReturnType<typeof manualSelectionPendingSchema>>;
4 changes: 2 additions & 2 deletions worker/scripts/benchmark-scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ const parallelDefinition: WorkflowDefinition = {
},
{
ref: 'merge',
componentId: 'core.console.log',
params: { data: 'merge complete' },
componentId: 'core.workflow.entrypoint',
params: {},
dependsOn: ['branch1', 'branch2'],
inputMappings: {},
inputOverrides: {},
Expand Down
15 changes: 6 additions & 9 deletions worker/src/__tests__/worker-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,8 @@ workerDescribe('Worker Integration Tests', () => {
},
{
ref: 'errorHandler',
componentId: 'core.console.log',
params: {
data: 'handled upstream failure',
label: 'error-handler',
},
componentId: 'core.workflow.entrypoint',
params: {},
inputOverrides: {},
dependsOn: [],
inputMappings: {},
Expand Down Expand Up @@ -577,16 +574,16 @@ workerDescribe('Worker Integration Tests', () => {
},
{
ref: 'branchA',
componentId: 'core.console.log',
params: { data: 'branchA' },
componentId: 'core.workflow.entrypoint',
params: {},
inputOverrides: {},
dependsOn: ['trigger'],
inputMappings: {},
},
{
ref: 'branchB',
componentId: 'core.console.log',
params: { data: 'branchB' },
componentId: 'core.workflow.entrypoint',
params: {},
inputOverrides: {},
dependsOn: ['trigger'],
inputMappings: {},
Expand Down
112 changes: 0 additions & 112 deletions worker/src/components/core/console-log.ts

This file was deleted.

1 change: 0 additions & 1 deletion worker/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import './core/test-error-generator';
import './notification/slack';
import './core/text-splitter';
import './core/text-joiner';
import './core/console-log';
import './core/secret-fetch';
import './core/array-pick';
import './core/array-pack';
Expand Down
Loading