@trops/dash-core 0.1.348 → 0.1.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61429,8 +61429,30 @@ const DEFAULT_MAX_TOOL_ROUNDS = 10;
61429
61429
  * Convert MCP tool format to Anthropic tool format.
61430
61430
  * MCP: { name, description, inputSchema }
61431
61431
  * Anthropic: { name, description, input_schema }
61432
- */
61432
+ *
61433
+ * Server-side tools (web_search, code_execution, computer_use, bash, etc.)
61434
+ * carry a `type` field and are handled by Anthropic's servers — pass them
61435
+ * through unchanged. They do NOT need input_schema or local execution.
61436
+ */
61437
+ const ANTHROPIC_SERVER_TOOL_TYPE_PREFIXES = [
61438
+ "web_search",
61439
+ "code_execution",
61440
+ "computer_",
61441
+ "bash_",
61442
+ "text_editor_",
61443
+ ];
61444
+
61445
+ function isAnthropicServerTool(tool) {
61446
+ if (!tool?.type) return false;
61447
+ return ANTHROPIC_SERVER_TOOL_TYPE_PREFIXES.some((p) =>
61448
+ tool.type.startsWith(p),
61449
+ );
61450
+ }
61451
+
61433
61452
  function mcpToolToAnthropic(tool) {
61453
+ if (isAnthropicServerTool(tool)) {
61454
+ return tool;
61455
+ }
61434
61456
  return {
61435
61457
  name: tool.name,
61436
61458
  description: tool.description || "",