You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
900 B
27 lines
900 B
/**
|
|
* @deprecated 此模块已废弃,请使用 server/service/a2a/client.ts 中的 invokeAgentViaA2A()。
|
|
*
|
|
* 本文件保留为薄包装,仅用于向后兼容。底层已切换到 A2A Service 层。
|
|
* 新代码请直接 import { invokeAgentViaA2A } from "#server/service/a2a/client"。
|
|
*/
|
|
|
|
import type { AgentInvocation, AgentInvocationResult } from "./types";
|
|
import { invokeAgentViaA2A } from "../a2a/client";
|
|
import log4js from "logger";
|
|
|
|
const logger = log4js.getLogger("APP");
|
|
|
|
export async function invokeAgent(
|
|
invocation: AgentInvocation,
|
|
options?: {
|
|
maxRecursionDepth?: number;
|
|
timeoutMs?: number;
|
|
maxOutputTokens?: number;
|
|
},
|
|
): Promise<AgentInvocationResult> {
|
|
logger.warn(
|
|
"[COLLAB] invokeAgent is deprecated, use invokeAgentViaA2A from a2a/client instead. agentSlug=%s",
|
|
invocation.agentSlug,
|
|
);
|
|
return invokeAgentViaA2A(invocation, options);
|
|
}
|
|
|