n8n/packages/nodes-base/nodes/MessageAnAgent/v2/MessageAnAgentV2.node.ts
Eugene 5e326f2666
feat(editor): Message an Agent node v2 (no-changelog) (#33812)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 13:37:36 +00:00

38 lines
902 B
TypeScript

import type {
IExecuteFunctions,
INodeExecutionData,
INodeType,
INodeTypeBaseDescription,
INodeTypeDescription,
} from 'n8n-workflow';
import { commonProperties, execute, messageProperty, sharedVersionDescription } from '../shared';
export class MessageAnAgentV2 implements INodeType {
description: INodeTypeDescription;
constructor(thisBaseDescription: INodeTypeBaseDescription) {
this.description = {
...thisBaseDescription,
...sharedVersionDescription,
version: 2,
properties: [
{
displayName: 'Agent',
name: 'agentId',
type: 'agentSelector',
default: { __rl: true, mode: 'list', value: '' },
required: true,
description: 'The agent to send the message to',
},
messageProperty,
...commonProperties,
],
};
}
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
return await execute.call(this);
}
}