Skip to content
Open
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
11 changes: 6 additions & 5 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.text.splitter',
position: { x: 0, y: 0 },
data: {
label: 'Console',
label: 'Text Splitter',
config: {
params: {},
params: {
separator: '\\n',
},
inputOverrides: {
label: 'Log',
data: 'hello',
text: 'hello',
},
},
},
Expand Down
28 changes: 12 additions & 16 deletions backend/src/workflows/__tests__/workflow-ai-agent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,17 @@ const workflowGraph = WorkflowGraphSchema.parse({
},
},
{
id: 'console-log',
type: 'core.console.log',
id: 'text-block',
type: 'core.text.splitter',
position: { x: 960, y: 160 },
data: {
label: 'Console Log',
label: 'Output Splitter',
config: {
params: {},
params: {
separator: '\\n',
},
inputOverrides: {
label: 'Agent Output',
text: 'Agent Output',
},
},
},
Expand All @@ -106,11 +108,9 @@ const workflowGraph = WorkflowGraphSchema.parse({
targetHandle: 'chatModel',
},
{
id: 'agent-to-console',
id: 'agent-to-text',
source: 'agent-node',
target: 'console-log',
sourceHandle: 'responseText',
targetHandle: 'data',
target: 'text-block',
},
],
viewport: { x: 0, y: 0, zoom: 1 },
Expand All @@ -125,7 +125,7 @@ describe('Workflow d177b3c0-644e-40f0-8aa2-7b4f2c13a3af', () => {
'entry-point',
'gemini-provider',
'agent-node',
'console-log',
'text-block',
]);

const geminiAction = definition.actions.find((action) => action.ref === 'gemini-provider');
Expand All @@ -142,12 +142,8 @@ describe('Workflow d177b3c0-644e-40f0-8aa2-7b4f2c13a3af', () => {
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',
});
const textBlockAction = definition.actions.find((action) => action.ref === 'text-block');
expect(textBlockAction?.dependsOn).toEqual(['agent-node']);
});

it('commits the workflow via service and persists compiled definition', async () => {
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