export function buildPluginToolSourceMetadata(plugin) {
    return {
        kind: "plugin",
        pluginId: plugin.id,
        pluginDisplayName: plugin.displayName,
    };
}
export function toPluginToolDefinition(plugin, tool) {
    return {
        ...tool,
        source: `plugin:${plugin.id}`,
        sourceMetadata: buildPluginToolSourceMetadata(plugin),
    };
}
/** Convenience wrapper for plugin authors. */
export function definePlugin(entry) {
    return {
        id: entry.id,
        displayName: entry.displayName,
        setup: entry.setup,
        dispose: entry.dispose ?? (async () => { }),
    };
}
//# sourceMappingURL=contracts.js.map