Skip to content

Commit 1c2c2c6

Browse files
authored
v0.5.110: webhook execution speedups, SSRF patches
2 parents ecd3536 + 19ef526 commit 1c2c2c6

File tree

47 files changed

+689
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+689
-408
lines changed

apps/docs/content/docs/en/tools/parallel_ai.mdx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,24 @@ Search the web using Parallel AI. Provides comprehensive search results with int
4444
| Parameter | Type | Required | Description |
4545
| --------- | ---- | -------- | ----------- |
4646
| `objective` | string | Yes | The search objective or question to answer |
47-
| `search_queries` | string | No | Optional comma-separated list of search queries to execute |
48-
| `processor` | string | No | Processing method: base or pro \(default: base\) |
49-
| `max_results` | number | No | Maximum number of results to return \(default: 5\) |
50-
| `max_chars_per_result` | number | No | Maximum characters per result \(default: 1500\) |
47+
| `search_queries` | string | No | Comma-separated list of search queries to execute |
48+
| `mode` | string | No | Search mode: one-shot, agentic, or fast \(default: one-shot\) |
49+
| `max_results` | number | No | Maximum number of results to return \(default: 10\) |
50+
| `max_chars_per_result` | number | No | Maximum characters per result excerpt \(minimum: 1000\) |
51+
| `include_domains` | string | No | Comma-separated list of domains to restrict search results to |
52+
| `exclude_domains` | string | No | Comma-separated list of domains to exclude from search results |
5153
| `apiKey` | string | Yes | Parallel AI API Key |
5254

5355
#### Output
5456

5557
| Parameter | Type | Description |
5658
| --------- | ---- | ----------- |
59+
| `search_id` | string | Unique identifier for this search request |
5760
| `results` | array | Search results with excerpts from relevant pages |
5861
|`url` | string | The URL of the search result |
5962
|`title` | string | The title of the search result |
60-
|`excerpts` | array | Text excerpts from the page |
63+
|`publish_date` | string | Publication date of the page \(YYYY-MM-DD\) |
64+
|`excerpts` | array | LLM-optimized excerpts from the page |
6165

6266
### `parallel_extract`
6367

@@ -68,31 +72,33 @@ Extract targeted information from specific URLs using Parallel AI. Processes pro
6872
| Parameter | Type | Required | Description |
6973
| --------- | ---- | -------- | ----------- |
7074
| `urls` | string | Yes | Comma-separated list of URLs to extract information from |
71-
| `objective` | string | Yes | What information to extract from the provided URLs |
72-
| `excerpts` | boolean | Yes | Include relevant excerpts from the content |
73-
| `full_content` | boolean | Yes | Include full page content |
75+
| `objective` | string | No | What information to extract from the provided URLs |
76+
| `excerpts` | boolean | No | Include relevant excerpts from the content \(default: true\) |
77+
| `full_content` | boolean | No | Include full page content as markdown \(default: false\) |
7478
| `apiKey` | string | Yes | Parallel AI API Key |
7579

7680
#### Output
7781

7882
| Parameter | Type | Description |
7983
| --------- | ---- | ----------- |
84+
| `extract_id` | string | Unique identifier for this extraction request |
8085
| `results` | array | Extracted information from the provided URLs |
8186
|`url` | string | The source URL |
8287
|`title` | string | The title of the page |
83-
|`content` | string | Extracted content |
84-
|`excerpts` | array | Relevant text excerpts |
88+
|`publish_date` | string | Publication date \(YYYY-MM-DD\) |
89+
|`excerpts` | array | Relevant text excerpts in markdown |
90+
|`full_content` | string | Full page content as markdown |
8591

8692
### `parallel_deep_research`
8793

88-
Conduct comprehensive deep research across the web using Parallel AI. Synthesizes information from multiple sources with citations. Can take up to 15 minutes to complete.
94+
Conduct comprehensive deep research across the web using Parallel AI. Synthesizes information from multiple sources with citations. Can take up to 45 minutes to complete.
8995

9096
#### Input
9197

9298
| Parameter | Type | Required | Description |
9399
| --------- | ---- | -------- | ----------- |
94100
| `input` | string | Yes | Research query or question \(up to 15,000 characters\) |
95-
| `processor` | string | No | Compute level: base, lite, pro, ultra, ultra2x, ultra4x, ultra8x \(default: base\) |
101+
| `processor` | string | No | Processing tier: pro, ultra, pro-fast, ultra-fast \(default: pro\) |
96102
| `include_domains` | string | No | Comma-separated list of domains to restrict research to \(source policy\) |
97103
| `exclude_domains` | string | No | Comma-separated list of domains to exclude from research \(source policy\) |
98104
| `apiKey` | string | Yes | Parallel AI API Key |
@@ -101,17 +107,17 @@ Conduct comprehensive deep research across the web using Parallel AI. Synthesize
101107

102108
| Parameter | Type | Description |
103109
| --------- | ---- | ----------- |
104-
| `status` | string | Task status \(completed, failed\) |
110+
| `status` | string | Task status \(completed, failed, running\) |
105111
| `run_id` | string | Unique ID for this research task |
106112
| `message` | string | Status message |
107113
| `content` | object | Research results \(structured based on output_schema\) |
108114
| `basis` | array | Citations and sources with reasoning and confidence levels |
109-
|`field` | string | Output field name |
115+
|`field` | string | Output field dot-notation path |
110116
|`reasoning` | string | Explanation for the result |
111117
|`citations` | array | Array of sources |
112118
|`url` | string | Source URL |
113119
|`title` | string | Source title |
114120
|`excerpts` | array | Relevant excerpts from the source |
115-
|`confidence` | string | Confidence level indicator |
121+
|`confidence` | string | Confidence level \(high, medium\) |
116122

117123

apps/sim/app/api/mcp/servers/[id]/refresh/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ export const POST = withMcpAuth<{ id: string }>('read')(
192192
)
193193
} catch (error) {
194194
connectionStatus = 'error'
195-
lastError = error instanceof Error ? error.message : 'Connection test failed'
195+
lastError =
196+
error instanceof Error ? error.message.split('\n')[0].slice(0, 200) : 'Connection failed'
196197
logger.warn(`[${requestId}] Failed to connect to server ${serverId}:`, error)
197198
}
198199

apps/sim/app/api/mcp/servers/test-connection/route.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ interface TestConnectionResult {
4141
warnings?: string[]
4242
}
4343

44+
/**
45+
* Extracts a user-friendly error message from connection errors.
46+
* Keeps diagnostic info (timeout, DNS, HTTP status) but strips
47+
* verbose internals (Zod details, full response bodies, stack traces).
48+
*/
49+
function sanitizeConnectionError(error: unknown): string {
50+
if (!(error instanceof Error)) {
51+
return 'Unknown connection error'
52+
}
53+
54+
const firstLine = error.message.split('\n')[0]
55+
return firstLine.length > 200 ? `${firstLine.slice(0, 200)}...` : firstLine
56+
}
57+
4458
/**
4559
* POST - Test connection to an MCP server before registering it
4660
*/
@@ -137,8 +151,7 @@ export const POST = withMcpAuth('write')(
137151
} catch (toolError) {
138152
logger.warn(`[${requestId}] Connection established but could not list tools:`, toolError)
139153
result.success = false
140-
const errorMessage = toolError instanceof Error ? toolError.message : 'Unknown error'
141-
result.error = `Connection established but could not list tools: ${errorMessage}`
154+
result.error = 'Connection established but could not list tools'
142155
result.warnings = result.warnings || []
143156
result.warnings.push(
144157
'Server connected but tool listing failed - connection may be incomplete'
@@ -163,11 +176,7 @@ export const POST = withMcpAuth('write')(
163176
logger.warn(`[${requestId}] MCP server test failed:`, error)
164177

165178
result.success = false
166-
if (error instanceof Error) {
167-
result.error = error.message
168-
} else {
169-
result.error = 'Unknown connection error'
170-
}
179+
result.error = sanitizeConnectionError(error)
171180
} finally {
172181
if (client) {
173182
try {

apps/sim/app/api/mcp/tools/execute/route.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ export const POST = withMcpAuth('read')(
8989
tool = tools.find((t) => t.name === toolName) ?? null
9090

9191
if (!tool) {
92+
logger.warn(`[${requestId}] Tool ${toolName} not found on server ${serverId}`, {
93+
availableTools: tools.map((t) => t.name),
94+
})
9295
return createMcpErrorResponse(
93-
new Error(
94-
`Tool ${toolName} not found on server ${serverId}. Available tools: ${tools.map((t) => t.name).join(', ')}`
95-
),
96-
'Tool not found',
96+
new Error('Tool not found'),
97+
'Tool not found on the specified server',
9798
404
9899
)
99100
}

apps/sim/app/api/tools/a2a/cancel-task/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export async function POST(request: NextRequest) {
7676
return NextResponse.json(
7777
{
7878
success: false,
79-
error: error instanceof Error ? error.message : 'Failed to cancel task',
79+
error: 'Failed to cancel task',
8080
},
8181
{ status: 500 }
8282
)

apps/sim/app/api/tools/a2a/delete-push-notification/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export async function POST(request: NextRequest) {
8686
return NextResponse.json(
8787
{
8888
success: false,
89-
error: error instanceof Error ? error.message : 'Failed to delete push notification',
89+
error: 'Failed to delete push notification',
9090
},
9191
{ status: 500 }
9292
)

apps/sim/app/api/tools/a2a/get-agent-card/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function POST(request: NextRequest) {
8484
return NextResponse.json(
8585
{
8686
success: false,
87-
error: error instanceof Error ? error.message : 'Failed to fetch Agent Card',
87+
error: 'Failed to fetch Agent Card',
8888
},
8989
{ status: 500 }
9090
)

apps/sim/app/api/tools/a2a/get-push-notification/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function POST(request: NextRequest) {
107107
return NextResponse.json(
108108
{
109109
success: false,
110-
error: error instanceof Error ? error.message : 'Failed to get push notification',
110+
error: 'Failed to get push notification',
111111
},
112112
{ status: 500 }
113113
)

apps/sim/app/api/tools/a2a/get-task/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function POST(request: NextRequest) {
8787
return NextResponse.json(
8888
{
8989
success: false,
90-
error: error instanceof Error ? error.message : 'Failed to get task',
90+
error: 'Failed to get task',
9191
},
9292
{ status: 500 }
9393
)

apps/sim/app/api/tools/a2a/resubscribe/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export async function POST(request: NextRequest) {
111111
return NextResponse.json(
112112
{
113113
success: false,
114-
error: error instanceof Error ? error.message : 'Failed to resubscribe',
114+
error: 'Failed to resubscribe',
115115
},
116116
{ status: 500 }
117117
)

0 commit comments

Comments
 (0)