UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

18 lines 784 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.registerAgentToolSourceAgent = registerAgentToolSourceAgent; exports.getAgentToolSourceAgent = getAgentToolSourceAgent; // Internal registry that links Agent.asTool() function tools back to their source // Agent instances so RunState reconstruction can traverse nested agent-tools // without storing hidden metadata on the tool object itself. const agentToolSourceRegistry = new WeakMap(); function registerAgentToolSourceAgent(tool, agent) { agentToolSourceRegistry.set(tool, agent); } function getAgentToolSourceAgent(tool) { if (tool.type !== 'function') { return undefined; } return agentToolSourceRegistry.get(tool); } //# sourceMappingURL=agentToolSourceRegistry.js.map