//#region src/agent/embedded/xopc-tools-bridge.ts
/** Map xopc {@link AgentTool} instances to pi-coding-agent {@link ToolDefinition}s for `createAgentSession`. */
function xopcToolsToDefinitions(tools) {
	return tools.map((tool) => {
		return {
			name: tool.name,
			label: tool.label ?? tool.name,
			description: tool.description ?? tool.name,
			parameters: tool.parameters,
			async execute(toolCallId, params, signal, onUpdate) {
				return tool.execute(toolCallId, params, signal, onUpdate);
			}
		};
	});
}
//#endregion
export { xopcToolsToDefinitions };

//# sourceMappingURL=xopc-tools-bridge.js.map