UNPKG

n8n

Version:

n8n Workflow Automation Tool

17 lines 717 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPublishedAgentSnapshot = getPublishedAgentSnapshot; const n8n_workflow_1 = require("n8n-workflow"); function getPublishedAgentSnapshot(agentEntity) { const activeVersionSchema = agentEntity.activeVersion?.schema; if (!activeVersionSchema) { throw new n8n_workflow_1.OperationalError('Agent is not published. Publish the agent before using it in a workflow.'); } return { ...agentEntity, schema: activeVersionSchema, tools: agentEntity.activeVersion?.tools ?? {}, skills: agentEntity.activeVersion?.skills ?? {}, }; } //# sourceMappingURL=agent-published-snapshot.js.map