@apify/actors-mcp-server 0.19.4-beta.0 → 0.19.4-beta.2
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.
- package/README.md +4 -1
- package/dist/apify_client.d.ts +21 -6
- package/dist/apify_client.d.ts.map +1 -1
- package/dist/apify_client.js +39 -5
- package/dist/apify_client.js.map +1 -1
- package/dist/const.d.ts +6 -1
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +6 -1
- package/dist/const.js.map +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +3 -4
- package/dist/errors.js.map +1 -1
- package/dist/index_internals.d.ts +1 -0
- package/dist/index_internals.d.ts.map +1 -1
- package/dist/index_internals_test_kit.d.ts +2 -2
- package/dist/index_internals_test_kit.d.ts.map +1 -1
- package/dist/index_internals_test_kit.js +2 -2
- package/dist/index_internals_test_kit.js.map +1 -1
- package/dist/mcp/actors.d.ts +16 -11
- package/dist/mcp/actors.d.ts.map +1 -1
- package/dist/mcp/actors.js +30 -29
- package/dist/mcp/actors.js.map +1 -1
- package/dist/mcp/legacy_server.d.ts.map +1 -1
- package/dist/mcp/legacy_server.js +2 -4
- package/dist/mcp/legacy_server.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/task_execution.d.ts +5 -8
- package/dist/mcp/task_execution.d.ts.map +1 -1
- package/dist/mcp/task_execution.js +5 -16
- package/dist/mcp/task_execution.js.map +1 -1
- package/dist/mcp/tool_call_engine.d.ts.map +1 -1
- package/dist/mcp/tool_call_engine.js +78 -13
- package/dist/mcp/tool_call_engine.js.map +1 -1
- package/dist/resources/api_resources.d.ts +4 -2
- package/dist/resources/api_resources.d.ts.map +1 -1
- package/dist/resources/api_resources.js +14 -31
- package/dist/resources/api_resources.js.map +1 -1
- package/dist/test_kit/cases/actors.cases.d.ts.map +1 -1
- package/dist/test_kit/cases/actors.cases.js +206 -2
- package/dist/test_kit/cases/actors.cases.js.map +1 -1
- package/dist/test_kit/cases/payments.cases.d.ts.map +1 -1
- package/dist/test_kit/cases/payments.cases.js +17 -0
- package/dist/test_kit/cases/payments.cases.js.map +1 -1
- package/dist/test_kit/helpers.d.ts +1 -0
- package/dist/test_kit/helpers.d.ts.map +1 -1
- package/dist/test_kit/helpers.js +1 -0
- package/dist/test_kit/helpers.js.map +1 -1
- package/dist/test_kit/register.js +2 -2
- package/dist/test_kit/register.js.map +1 -1
- package/dist/test_kit/tsconfig.tsbuildinfo +1 -1
- package/dist/test_kit/types.d.ts +2 -0
- package/dist/test_kit/types.d.ts.map +1 -1
- package/dist/tools/actor_tool_naming.d.ts +22 -11
- package/dist/tools/actor_tool_naming.d.ts.map +1 -1
- package/dist/tools/actor_tool_naming.js +38 -21
- package/dist/tools/actor_tool_naming.js.map +1 -1
- package/dist/tools/actors/actor_definition.d.ts +17 -5
- package/dist/tools/actors/actor_definition.d.ts.map +1 -1
- package/dist/tools/actors/actor_definition.js +83 -15
- package/dist/tools/actors/actor_definition.js.map +1 -1
- package/dist/tools/actors/actor_tools_factory.d.ts.map +1 -1
- package/dist/tools/actors/actor_tools_factory.js +4 -5
- package/dist/tools/actors/actor_tools_factory.js.map +1 -1
- package/dist/tools/actors/call_actor.d.ts.map +1 -1
- package/dist/tools/actors/call_actor.js +23 -7
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/actors/fetch_actor_details.d.ts +4 -0
- package/dist/tools/actors/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/actors/fetch_actor_details.js +33 -7
- package/dist/tools/actors/fetch_actor_details.js.map +1 -1
- package/dist/tools/actors/send_server_actor_request.d.ts +11 -0
- package/dist/tools/actors/send_server_actor_request.d.ts.map +1 -0
- package/dist/tools/actors/send_server_actor_request.js +425 -0
- package/dist/tools/actors/send_server_actor_request.js.map +1 -0
- package/dist/tools/actors/server_interface_schema.d.ts +31 -0
- package/dist/tools/actors/server_interface_schema.d.ts.map +1 -0
- package/dist/tools/actors/server_interface_schema.js +189 -0
- package/dist/tools/actors/server_interface_schema.js.map +1 -0
- package/dist/tools/api/apify_api_request.d.ts.map +1 -1
- package/dist/tools/api/apify_api_request.js +2 -2
- package/dist/tools/api/apify_api_request.js.map +1 -1
- package/dist/tools/api/apify_api_spec.d.ts +2 -0
- package/dist/tools/api/apify_api_spec.d.ts.map +1 -1
- package/dist/tools/api/apify_api_spec.js +4 -3
- package/dist/tools/api/apify_api_spec.js.map +1 -1
- package/dist/tools/builds/get_actor_build_list.d.ts +6 -0
- package/dist/tools/builds/get_actor_build_list.d.ts.map +1 -1
- package/dist/tools/registry.d.ts +1 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +3 -1
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/structured_output_schemas.d.ts +82 -0
- package/dist/tools/structured_output_schemas.d.ts.map +1 -1
- package/dist/tools/structured_output_schemas.js +55 -0
- package/dist/tools/structured_output_schemas.js.map +1 -1
- package/dist/tools/widgets/call_actor_widget.d.ts.map +1 -1
- package/dist/tools/widgets/call_actor_widget.js +1 -0
- package/dist/tools/widgets/call_actor_widget.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +53 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +7 -2
- package/dist/types.js.map +1 -1
- package/dist/utils/actor.d.ts +6 -4
- package/dist/utils/actor.d.ts.map +1 -1
- package/dist/utils/actor.js +27 -13
- package/dist/utils/actor.js.map +1 -1
- package/dist/utils/actor_details.d.ts +2 -2
- package/dist/utils/actor_details.d.ts.map +1 -1
- package/dist/utils/actor_details.js +5 -3
- package/dist/utils/actor_details.js.map +1 -1
- package/dist/utils/actor_search.d.ts +2 -0
- package/dist/utils/actor_search.d.ts.map +1 -1
- package/dist/utils/actor_search.js +7 -1
- package/dist/utils/actor_search.js.map +1 -1
- package/dist/utils/mcp.d.ts +3 -0
- package/dist/utils/mcp.d.ts.map +1 -1
- package/dist/utils/mcp.js +3 -0
- package/dist/utils/mcp.js.map +1 -1
- package/dist/utils/mcp_clients.d.ts +6 -1
- package/dist/utils/mcp_clients.d.ts.map +1 -1
- package/dist/utils/mcp_clients.js +23 -1
- package/dist/utils/mcp_clients.js.map +1 -1
- package/dist/utils/tool_status.d.ts.map +1 -1
- package/dist/utils/tool_status.js +2 -0
- package/dist/utils/tool_status.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import Ajv from 'ajv';
|
|
2
|
+
import dedent from 'dedent';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { readBodyUnderCap, sendApifyApiRequest } from '../../apify_client.js';
|
|
5
|
+
import { FAILURE_CATEGORY, HELPER_TOOLS, HTTP_FORBIDDEN, HTTP_UNAUTHORIZED, MAX_INLINE_BYTES } from '../../const.js';
|
|
6
|
+
import { getActorMCPServerPath, resolveOnStandbyOrigin } from '../../mcp/actors.js';
|
|
7
|
+
import { EXTERNAL_TOOL_CALL_TIMEOUT_MSEC } from '../../mcp/const.js';
|
|
8
|
+
import { isTextualMimeType, maskSessionToken, parseCharset, REDACTED } from '../../resources/api_resources.js';
|
|
9
|
+
import { ALL_TOOLS_PRESENT, TOOL_TYPE } from '../../types.js';
|
|
10
|
+
import { getActorDefinitionCached } from '../../utils/actor.js';
|
|
11
|
+
import { fixZodSchemaRequired } from '../../utils/ajv.js';
|
|
12
|
+
import { toPlainError } from '../../utils/logging.js';
|
|
13
|
+
import { respondAborted, respondOk, respondServerError, respondUserError } from '../../utils/mcp.js';
|
|
14
|
+
import { resolveActorInterfaces, resolveActorTenancy } from '../actor_tool_naming.js';
|
|
15
|
+
import { apiCallArgsShape, redactApiCallArgs } from '../api/apify_api_request.js';
|
|
16
|
+
import { API_METHODS, isRecord } from '../api/apify_api_spec.js';
|
|
17
|
+
import { parseBaseMimeType } from '../storage/storage_helpers.js';
|
|
18
|
+
import { anyJsonValueSchema, serverActorRequestOutputSchema } from '../structured_output_schemas.js';
|
|
19
|
+
import { fixActorNameInputAndLog } from './actor_tools_factory.js';
|
|
20
|
+
import { buildActorNotFoundResponse } from './fetch_actor_details.js';
|
|
21
|
+
const sendServerActorRequestArgs = z.object({
|
|
22
|
+
actor: z
|
|
23
|
+
.string()
|
|
24
|
+
.min(1)
|
|
25
|
+
.describe('The Actor: its ID, or its name in the "username/name" form, such as "apify/web-fetch".'),
|
|
26
|
+
method: z
|
|
27
|
+
.enum(API_METHODS)
|
|
28
|
+
.describe('HTTP method: GET, POST, PUT, PATCH, or DELETE. The Actor accepts or rejects it.'),
|
|
29
|
+
path: z.string().min(1).describe(dedent `
|
|
30
|
+
The path of an operation in the Actor API schema, starting with /. Take it from the schema; do not guess it.
|
|
31
|
+
A query string written into the path is sent too.
|
|
32
|
+
`),
|
|
33
|
+
query: apiCallArgsShape.query.describe('Query parameters, by name, for example {"limit": 10, "verbose": true}; a boolean is sent as true or ' +
|
|
34
|
+
'false. Added to a query string in the path.'),
|
|
35
|
+
body: z.unknown().optional().describe('The JSON request body, sent as application/json. Not allowed with GET.'),
|
|
36
|
+
});
|
|
37
|
+
/** The request may have gone out, but its response did not fully arrive; `status` is set when the headers did. */
|
|
38
|
+
class IncompleteResponseError extends Error {
|
|
39
|
+
constructor(message, status, isTimeout) {
|
|
40
|
+
super(message);
|
|
41
|
+
Object.defineProperty(this, "status", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: status
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(this, "isTimeout", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: isTimeout
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "name", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: 'IncompleteResponseError'
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function buildNoServerInterfaceText(actorName, interfaces, loadedToolNames) {
|
|
62
|
+
const text = `Actor '${actorName}' has no Actor Server with an API schema, and this tool sends requests only to ` +
|
|
63
|
+
'such Actors. Its README describes how to use it.';
|
|
64
|
+
if (!loadedToolNames.includes(HELPER_TOOLS.ACTOR_CALL))
|
|
65
|
+
return text;
|
|
66
|
+
if (interfaces.mcp) {
|
|
67
|
+
return `${text} Its MCP tools can be called with ${HELPER_TOOLS.ACTOR_CALL} as "${actorName}:toolName".`;
|
|
68
|
+
}
|
|
69
|
+
if (interfaces.input)
|
|
70
|
+
return `${text} It can be run from an input with ${HELPER_TOOLS.ACTOR_CALL}.`;
|
|
71
|
+
return text;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The URL of `path` on the Actor's standby origin, with `query` added after a query written into the path, or
|
|
75
|
+
* the error response when the request cannot be sent there.
|
|
76
|
+
*/
|
|
77
|
+
function buildRequestUrl(actor, actorName, { path, query }) {
|
|
78
|
+
const resolved = resolveOnStandbyOrigin(actor, path);
|
|
79
|
+
if (!resolved) {
|
|
80
|
+
return {
|
|
81
|
+
error: respondServerError(`Actor '${actorName}' has no valid Actor Server URL. The request was not sent.`),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// Unlike the MCP URL, a path with credentials is refused rather than stripped: the agent wrote them.
|
|
85
|
+
const { url, standbyOrigin } = resolved;
|
|
86
|
+
if (!url || url.username || url.password) {
|
|
87
|
+
return {
|
|
88
|
+
error: respondUserError(`The path must be a valid path on the Actor Server at ${standbyOrigin}, with no credentials. ` +
|
|
89
|
+
'The request was not sent.'),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// Not axios `params`: apify-client's serializer sends a boolean as 1 or 0. Not `url.searchParams`: it would
|
|
93
|
+
// encode the query written into the path again.
|
|
94
|
+
const addedQuery = new URLSearchParams(Object.entries(query !== null && query !== void 0 ? query : {}).map(([name, value]) => [name, String(value)])).toString();
|
|
95
|
+
if (addedQuery)
|
|
96
|
+
url.search = url.search ? `${url.search}&${addedQuery}` : addedQuery;
|
|
97
|
+
return { url };
|
|
98
|
+
}
|
|
99
|
+
/** A response header's value; `undefined` when it is absent or not a single string. */
|
|
100
|
+
function readHeader(headers, name) {
|
|
101
|
+
const value = headers[name];
|
|
102
|
+
return typeof value === 'string' ? value : undefined;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Sends the request once, without following redirects, and reads the body up to `MAX_INLINE_BYTES`. The deadline
|
|
106
|
+
* covers reading the body too. Any failure is thrown as an `IncompleteResponseError`: even a connection that drops
|
|
107
|
+
* before the status may have delivered the request.
|
|
108
|
+
*/
|
|
109
|
+
async function sendRequest({ client, url, method, body, signal, timeoutMillis, }) {
|
|
110
|
+
const deadline = AbortSignal.timeout(timeoutMillis);
|
|
111
|
+
let status;
|
|
112
|
+
try {
|
|
113
|
+
const response = await sendApifyApiRequest(client, {
|
|
114
|
+
url: url.href,
|
|
115
|
+
method,
|
|
116
|
+
// Bytes, not a string: apify-client compresses a string body of 1 KiB or more with brotli, which
|
|
117
|
+
// an Actor's server need not decode.
|
|
118
|
+
...(body !== undefined && {
|
|
119
|
+
data: new TextEncoder().encode(JSON.stringify(body)),
|
|
120
|
+
headers: { 'Content-Type': 'application/json' },
|
|
121
|
+
}),
|
|
122
|
+
responseType: 'stream',
|
|
123
|
+
maxRedirects: 0,
|
|
124
|
+
signal: AbortSignal.any([signal, deadline]),
|
|
125
|
+
});
|
|
126
|
+
status = response.status;
|
|
127
|
+
return {
|
|
128
|
+
status,
|
|
129
|
+
contentType: readHeader(response.headers, 'content-type'),
|
|
130
|
+
location: readHeader(response.headers, 'location'),
|
|
131
|
+
body: await readBodyUnderCap(response),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
throw new IncompleteResponseError(toPlainError(error).message, status, deadline.aborted);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The body decoded with `charset`, the session token masked before and after decoding; `undefined` when
|
|
140
|
+
* `TextDecoder` does not support the charset. In a JSON body whose escapes hide the token, only the string
|
|
141
|
+
* literals holding it are rewritten, so numbers and formatting stay as sent.
|
|
142
|
+
*/
|
|
143
|
+
function decodeBody(body, charset, token) {
|
|
144
|
+
let text;
|
|
145
|
+
try {
|
|
146
|
+
text = new TextDecoder(charset).decode(maskSessionToken(body, token)).replaceAll(token, REDACTED);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
if (!JSON.stringify(JSON.parse(text)).includes(token))
|
|
153
|
+
return text;
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return text;
|
|
157
|
+
}
|
|
158
|
+
return text.replace(/"(?:[^"\\]|\\.)*"/g, (literal) => {
|
|
159
|
+
const value = JSON.parse(literal);
|
|
160
|
+
return value.includes(token) ? JSON.stringify(value.replaceAll(token, REDACTED)) : literal;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/** Longest `errorMessage` returned; the full error stays in `body`. */
|
|
164
|
+
const ERROR_MESSAGE_MAX_LENGTH = 1000;
|
|
165
|
+
/**
|
|
166
|
+
* The `error` string of a JSON `{"error": ...}` body, cut to `ERROR_MESSAGE_MAX_LENGTH`; `undefined` for any other
|
|
167
|
+
* body, which the response already carries as `body`.
|
|
168
|
+
*/
|
|
169
|
+
function getReadableErrorMessage(body) {
|
|
170
|
+
try {
|
|
171
|
+
const parsed = z.object({ error: z.string() }).safeParse(JSON.parse(body));
|
|
172
|
+
if (!parsed.success)
|
|
173
|
+
return undefined;
|
|
174
|
+
const { error } = parsed.data;
|
|
175
|
+
return error.length > ERROR_MESSAGE_MAX_LENGTH ? `${error.slice(0, ERROR_MESSAGE_MAX_LENGTH)}…` : error;
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// An Actor can return plain text or malformed JSON.
|
|
179
|
+
}
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
/** A rejected request's recovery text lists up to this many documented operations, then counts the rest. */
|
|
183
|
+
export const RECOVERY_MAX_OPERATIONS = 20;
|
|
184
|
+
/** E.g. `Documented operations: GET / (required: query), POST / (required: request body). `; empty without any. */
|
|
185
|
+
function formatDocumentedOperations(operations = []) {
|
|
186
|
+
if (operations.length === 0)
|
|
187
|
+
return '';
|
|
188
|
+
const listed = operations.slice(0, RECOVERY_MAX_OPERATIONS);
|
|
189
|
+
const rest = operations.length - listed.length;
|
|
190
|
+
return `Documented operations: ${listed.join(', ')}${rest > 0 ? `, and ${rest} more` : ''}. `;
|
|
191
|
+
}
|
|
192
|
+
function buildRequestRecoveryText({ status, actorName, loadedToolNames, hasErrorMessage, operations, }) {
|
|
193
|
+
if (status === 429)
|
|
194
|
+
return 'The Actor Server rate limit was reached.';
|
|
195
|
+
if (status === 503)
|
|
196
|
+
return 'The Actor Server is temporarily unavailable.';
|
|
197
|
+
if (![400, 404, 405, 422].includes(status))
|
|
198
|
+
return undefined;
|
|
199
|
+
// Listed here so the agent can retry without first looking the operations up.
|
|
200
|
+
const documentation = formatDocumentedOperations(operations) +
|
|
201
|
+
(loadedToolNames.includes(HELPER_TOOLS.ACTOR_GET_DETAILS)
|
|
202
|
+
? `${HELPER_TOOLS.ACTOR_GET_DETAILS} with ${JSON.stringify({ actor: actorName, output: { serverInterface: true } })} lists the documented HTTP operations.`
|
|
203
|
+
: 'The Actor README may describe its HTTP endpoints.');
|
|
204
|
+
return hasErrorMessage
|
|
205
|
+
? `The Actor Server error may name the expected HTTP method, path, or parameters. ${documentation}`
|
|
206
|
+
: documentation;
|
|
207
|
+
}
|
|
208
|
+
/** The tool response for what the Actor Server sent back, with the session token masked. */
|
|
209
|
+
function buildResponse(request, response, { apifyToken: token, loadedToolNames, operations, }) {
|
|
210
|
+
var _a, _b, _c;
|
|
211
|
+
const { status } = response;
|
|
212
|
+
const contentType = (_a = response.contentType) === null || _a === void 0 ? void 0 : _a.replaceAll(token, REDACTED);
|
|
213
|
+
const location = (_b = response.location) === null || _b === void 0 ? void 0 : _b.replaceAll(token, REDACTED);
|
|
214
|
+
const outcome = `${request.method} ${request.path} on ${request.actorName} returned HTTP ${status}`;
|
|
215
|
+
// A 5xx is a failure, as an Apify API 5xx is in the API tools; any other refusal is the caller's.
|
|
216
|
+
const respondError = (texts, structuredContent) => status >= 500
|
|
217
|
+
? respondServerError(texts, { error: { statusCode: status }, structuredContent })
|
|
218
|
+
: respondUserError(texts, {
|
|
219
|
+
...((status === HTTP_UNAUTHORIZED || status === HTTP_FORBIDDEN) && {
|
|
220
|
+
category: FAILURE_CATEGORY.AUTH,
|
|
221
|
+
}),
|
|
222
|
+
httpStatus: status,
|
|
223
|
+
structuredContent,
|
|
224
|
+
});
|
|
225
|
+
const rejectBody = (reason) => {
|
|
226
|
+
const summary = `${outcome}. The body is not returned: ${reason}. The request itself was sent.`;
|
|
227
|
+
const structuredContent = {
|
|
228
|
+
...request,
|
|
229
|
+
status,
|
|
230
|
+
...(contentType && { contentType }),
|
|
231
|
+
...(location && { location }),
|
|
232
|
+
...(response.body !== undefined && { bytes: response.body.length }),
|
|
233
|
+
bodyOmitted: true,
|
|
234
|
+
reason,
|
|
235
|
+
summary,
|
|
236
|
+
};
|
|
237
|
+
return respondError([JSON.stringify(structuredContent), summary], structuredContent);
|
|
238
|
+
};
|
|
239
|
+
if (response.body === undefined)
|
|
240
|
+
return rejectBody(`it is larger than ${MAX_INLINE_BYTES} bytes`);
|
|
241
|
+
const bytes = response.body.length;
|
|
242
|
+
const mimeType = parseBaseMimeType(contentType);
|
|
243
|
+
if (bytes > 0 && !isTextualMimeType(mimeType)) {
|
|
244
|
+
return rejectBody(`it is ${bytes} bytes of ${mimeType !== null && mimeType !== void 0 ? mimeType : 'an unknown type'}, and only JSON, text, and XML bodies are returned`);
|
|
245
|
+
}
|
|
246
|
+
const charset = (_c = parseCharset(contentType)) !== null && _c !== void 0 ? _c : 'utf-8';
|
|
247
|
+
const body = bytes === 0 ? '' : decodeBody(response.body, charset, token);
|
|
248
|
+
if (body === undefined)
|
|
249
|
+
return rejectBody(`its charset "${charset}" is not supported`);
|
|
250
|
+
const bodyNote = bytes === 0 ? 'an empty body' : `${bytes} bytes of ${mimeType}`;
|
|
251
|
+
const redirectNote = location ? ` The redirect to ${location} was not followed.` : '';
|
|
252
|
+
const summary = `${outcome} with ${bodyNote}.${redirectNote}`;
|
|
253
|
+
const errorMessage = status >= 400 && body ? getReadableErrorMessage(body) : undefined;
|
|
254
|
+
const nextStep = buildRequestRecoveryText({
|
|
255
|
+
status,
|
|
256
|
+
actorName: request.actorName,
|
|
257
|
+
loadedToolNames,
|
|
258
|
+
hasErrorMessage: errorMessage !== undefined,
|
|
259
|
+
operations,
|
|
260
|
+
});
|
|
261
|
+
const data = {
|
|
262
|
+
...request,
|
|
263
|
+
status,
|
|
264
|
+
...(contentType && { contentType }),
|
|
265
|
+
body,
|
|
266
|
+
bytes,
|
|
267
|
+
...(location && { location }),
|
|
268
|
+
};
|
|
269
|
+
const structuredContent = {
|
|
270
|
+
...data,
|
|
271
|
+
summary,
|
|
272
|
+
...(errorMessage && { errorMessage }),
|
|
273
|
+
...(nextStep && { nextStep }),
|
|
274
|
+
};
|
|
275
|
+
const texts = [JSON.stringify(data), summary];
|
|
276
|
+
if (errorMessage)
|
|
277
|
+
texts.push(`Actor Server error: ${errorMessage}`);
|
|
278
|
+
if (nextStep)
|
|
279
|
+
texts.push(nextStep);
|
|
280
|
+
if (status < 400)
|
|
281
|
+
return respondOk(texts, { structuredContent });
|
|
282
|
+
return respondError(texts, structuredContent);
|
|
283
|
+
}
|
|
284
|
+
/** The tool response when the request went out but its response did not fully arrive. */
|
|
285
|
+
function buildIncompleteResponse(request, error, timeoutMillis) {
|
|
286
|
+
const got = error.status === undefined ? 'got no complete response' : `got HTTP ${error.status} but not the whole body`;
|
|
287
|
+
const why = error.isTimeout ? `within ${timeoutMillis / 1000} seconds` : `(${error.message})`;
|
|
288
|
+
return respondServerError(`${request.method} ${request.path} on ${request.actorName} ${got} ${why}. Nothing is returned, and the ` +
|
|
289
|
+
'Actor may still have processed the request.', { detail: error.isTimeout ? 'timeout' : error.status === undefined ? 'no response' : 'incomplete body' });
|
|
290
|
+
}
|
|
291
|
+
/** `timeoutMillis` shortens the deadline in local tests; production keeps `EXTERNAL_TOOL_CALL_TIMEOUT_MSEC`. */
|
|
292
|
+
export async function executeSendServerActorRequest(toolArgs, { timeoutMillis = EXTERNAL_TOOL_CALL_TIMEOUT_MSEC } = {}) {
|
|
293
|
+
const { apifyToken, apifyClient, mcpSessionId, loadedToolNames, signal } = toolArgs;
|
|
294
|
+
const args = sendServerActorRequestArgs.parse(toolArgs.args);
|
|
295
|
+
if (!apifyToken) {
|
|
296
|
+
return respondUserError('An Apify API token is required to send requests to an Actor Server.', {
|
|
297
|
+
category: FAILURE_CATEGORY.AUTH,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
// The path is not echoed: it can carry the session token.
|
|
301
|
+
if (!args.path.startsWith('/'))
|
|
302
|
+
return respondUserError('The path must start with "/".');
|
|
303
|
+
if (args.method === 'GET' && args.body !== undefined) {
|
|
304
|
+
return respondUserError('A GET request cannot have a body. Send the data in query instead.');
|
|
305
|
+
}
|
|
306
|
+
const actorName = fixActorNameInputAndLog(args.actor, { mcpSessionId, route: HELPER_TOOLS.ACTOR_SERVER_REQUEST });
|
|
307
|
+
const cached = await getActorDefinitionCached(actorName, apifyClient);
|
|
308
|
+
if (!cached)
|
|
309
|
+
return buildActorNotFoundResponse(actorName, loadedToolNames);
|
|
310
|
+
const { definition, info } = cached;
|
|
311
|
+
const tenancy = resolveActorTenancy(info);
|
|
312
|
+
// Every response from here on names the Actor, and the status once one arrived, in telemetry.
|
|
313
|
+
const withActorTelemetry = (response, httpStatus) => {
|
|
314
|
+
var _a;
|
|
315
|
+
return ({
|
|
316
|
+
...response,
|
|
317
|
+
toolTelemetry: {
|
|
318
|
+
...response.toolTelemetry,
|
|
319
|
+
actorId: info.id,
|
|
320
|
+
// With Actor Standby off there is no tenancy; `resolveActorTenancy` would report its single-tenant default.
|
|
321
|
+
...(((_a = info.actorStandby) === null || _a === void 0 ? void 0 : _a.isEnabled) === true && { actorTenancy: tenancy }),
|
|
322
|
+
...(httpStatus !== undefined && { httpStatus }),
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
// Not `getActorToolResolutionCached`: it resolves the MCP URL too, and a bad MCP path must not stop an HTTP request.
|
|
327
|
+
const interfaces = resolveActorInterfaces({
|
|
328
|
+
definition,
|
|
329
|
+
actor: info,
|
|
330
|
+
webServerMcpPath: getActorMCPServerPath(definition),
|
|
331
|
+
});
|
|
332
|
+
if (!interfaces.server) {
|
|
333
|
+
return withActorTelemetry(respondUserError(buildNoServerInterfaceText(definition.actorFullName, interfaces, loadedToolNames)));
|
|
334
|
+
}
|
|
335
|
+
const target = buildRequestUrl(info, definition.actorFullName, args);
|
|
336
|
+
if ('error' in target)
|
|
337
|
+
return withActorTelemetry(target.error);
|
|
338
|
+
const { url } = target;
|
|
339
|
+
const request = {
|
|
340
|
+
actorId: info.id,
|
|
341
|
+
actorName: definition.actorFullName,
|
|
342
|
+
interface: 'server',
|
|
343
|
+
tenancy,
|
|
344
|
+
method: args.method,
|
|
345
|
+
path: `${url.pathname}${url.search}`.replaceAll(apifyToken, REDACTED),
|
|
346
|
+
};
|
|
347
|
+
try {
|
|
348
|
+
const response = await sendRequest({
|
|
349
|
+
client: apifyClient,
|
|
350
|
+
url,
|
|
351
|
+
method: args.method,
|
|
352
|
+
body: args.body,
|
|
353
|
+
signal,
|
|
354
|
+
timeoutMillis,
|
|
355
|
+
});
|
|
356
|
+
return withActorTelemetry(buildResponse(request, response, {
|
|
357
|
+
apifyToken,
|
|
358
|
+
loadedToolNames,
|
|
359
|
+
operations: definition.webServerOperations,
|
|
360
|
+
}), response.status);
|
|
361
|
+
}
|
|
362
|
+
catch (error) {
|
|
363
|
+
if (signal.aborted)
|
|
364
|
+
return respondAborted();
|
|
365
|
+
if (!(error instanceof IncompleteResponseError))
|
|
366
|
+
throw error;
|
|
367
|
+
return withActorTelemetry(buildIncompleteResponse(request, error, timeoutMillis), error.status);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function buildDescription({ hasTool }) {
|
|
371
|
+
const details = hasTool(HELPER_TOOLS.ACTOR_GET_DETAILS)
|
|
372
|
+
? ` ${HELPER_TOOLS.ACTOR_GET_DETAILS} with output.serverInterface lists the documented operations.`
|
|
373
|
+
: '';
|
|
374
|
+
return dedent `
|
|
375
|
+
Send one HTTP request to an Actor Server: the HTTP API of a Server Actor, documented in its API schema (OpenAPI) and README.${details}
|
|
376
|
+
Give the method, the path, and optionally query parameters and a JSON body; the Actor Server's host and your Apify API token are added for you.
|
|
377
|
+
Only an Actor with an Actor Server and an API schema takes requests here; the Actor accepts or rejects the method and path.
|
|
378
|
+
A request to a single-tenant Actor Server can start a run of the Actor in your account, kept until its idle timeout; a multi-tenant Actor Server charges per event.
|
|
379
|
+
The request is sent once, with no retries and without following redirects. A JSON, text, or XML response body is returned as text; other content types, and bodies over ${MAX_INLINE_BYTES} bytes, are not returned.
|
|
380
|
+
|
|
381
|
+
Example call: {"actor": "apify/web-search", "method": "GET", "path": "/", "query": {"query": "AI news", "maxResults": 5}}
|
|
382
|
+
|
|
383
|
+
USAGE:
|
|
384
|
+
- Use when the Actor that fits the user's request has an Actor Server, and its API schema or README names the endpoint for the task.
|
|
385
|
+
- Fits requests for one or a few results returned in the HTTP response. Larger batches depend on the endpoint and the response size and time limits.
|
|
386
|
+
|
|
387
|
+
USAGE EXAMPLES:
|
|
388
|
+
- user_input: Search the web for the latest AI news with apify/web-search
|
|
389
|
+
- user_input: Find articles about Apify from the past week with apify/web-search
|
|
390
|
+
- user_input: Get the content of https://example.com with apify/web-fetch
|
|
391
|
+
`;
|
|
392
|
+
}
|
|
393
|
+
/** Sends one HTTP request to a Server Actor's API, the server interface its `webServerSchema` documents. */
|
|
394
|
+
export const sendServerActorRequest = Object.freeze({
|
|
395
|
+
type: TOOL_TYPE.INTERNAL,
|
|
396
|
+
name: HELPER_TOOLS.ACTOR_SERVER_REQUEST,
|
|
397
|
+
title: 'Send Server Actor request',
|
|
398
|
+
description: buildDescription(ALL_TOOLS_PRESENT),
|
|
399
|
+
buildDescription,
|
|
400
|
+
// Advertise explicit JSON types without letting AJV coerce the body, as apify-api-write does.
|
|
401
|
+
inputSchema: z.toJSONSchema(sendServerActorRequestArgs.extend({ body: sendServerActorRequestArgs.shape.body.meta(anyJsonValueSchema) })),
|
|
402
|
+
outputSchema: serverActorRequestOutputSchema,
|
|
403
|
+
// The shared validator coerces null and singleton arrays into scalar query values.
|
|
404
|
+
ajvValidate: new Ajv({ coerceTypes: false, strict: false, removeAdditional: true }).compile(fixZodSchemaRequired(z.toJSONSchema(sendServerActorRequestArgs))),
|
|
405
|
+
// A third-party payment provider cannot pay for an Actor Server run, so such a session is rejected before the call.
|
|
406
|
+
hasPaymentProviderStandbyCheck: true,
|
|
407
|
+
annotations: {
|
|
408
|
+
title: 'Send Server Actor request',
|
|
409
|
+
readOnlyHint: false,
|
|
410
|
+
// The agent can send DELETE, PUT, or PATCH to third-party code.
|
|
411
|
+
destructiveHint: true,
|
|
412
|
+
idempotentHint: false,
|
|
413
|
+
openWorldHint: true,
|
|
414
|
+
},
|
|
415
|
+
// The body can carry secrets, and an Actor Server can take a credential under any query name.
|
|
416
|
+
redactArgs: ({ actor, query, ...rest }) => ({
|
|
417
|
+
actor,
|
|
418
|
+
...redactApiCallArgs(rest),
|
|
419
|
+
...(query !== undefined && {
|
|
420
|
+
query: isRecord(query) ? Object.fromEntries(Object.keys(query).map((name) => [name, REDACTED])) : REDACTED,
|
|
421
|
+
}),
|
|
422
|
+
}),
|
|
423
|
+
call: async (toolArgs) => executeSendServerActorRequest(toolArgs),
|
|
424
|
+
});
|
|
425
|
+
//# sourceMappingURL=send_server_actor_request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send_server_actor_request.js","sourceRoot":"","sources":["../../../src/tools/actors/send_server_actor_request.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACrH,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAU/G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,WAAW,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,iBAAiB,E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
|
3
|
+
* Each operation with its required inputs, e.g.
|
|
4
|
+
* `['GET / (required: query)', 'POST / (required: request body)', 'GET /status']`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function listDocumentedOperations(schema: unknown): string[];
|
|
7
|
+
/**
|
|
8
|
+
* The server-interface text of `fetch-actor-details`, by `output.serverInterface`; none for an Actor without
|
|
9
|
+
* Actor Standby unless asked for. References are not expanded or fetched, and the schema's `servers` are not used.
|
|
10
|
+
* - `false`: one summary line with the tenancy and the operation count, naming the operations while few and short;
|
|
11
|
+
* none in a session without `send-server-actor-request`.
|
|
12
|
+
* - `true`: the operation list, plus the creator-written schema as is when the text fits `MAX_INLINE_BYTES`.
|
|
13
|
+
* - `"GET /search"`: one operation excerpt with inherited parameters and the root schema/security context.
|
|
14
|
+
* - `"#/components/schemas/Search"`: the raw node at that local JSON pointer.
|
|
15
|
+
* The send-tool example becomes the Actor's base URL without the send tool or in agentic payment mode.
|
|
16
|
+
* An unknown selection, or a selected text over the byte cap, is an error.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildServerInterfaceText({ actor, actorFullName, schema, serverInterface, loadedToolNames, hasPaymentProvider, }: {
|
|
19
|
+
actor: Pick<Actor, 'actorStandby' | 'standbyUrl'>;
|
|
20
|
+
actorFullName: string;
|
|
21
|
+
schema: unknown;
|
|
22
|
+
serverInterface: boolean | string;
|
|
23
|
+
loadedToolNames: readonly string[];
|
|
24
|
+
/** An agentic payment provider (x402, Skyfire) cannot pay for an Actor Server request. */
|
|
25
|
+
hasPaymentProvider: boolean;
|
|
26
|
+
}): {
|
|
27
|
+
text?: string;
|
|
28
|
+
} | {
|
|
29
|
+
error: string;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=server_interface_schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server_interface_schema.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/server_interface_schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAyE5C;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAMlE;AAkCD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,KAAK,EACL,aAAa,EACb,MAAM,EACN,eAAe,EACf,eAAe,EACf,kBAAkB,GACrB,EAAE;IACC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,0FAA0F;IAC1F,kBAAkB,EAAE,OAAO,CAAC;CAC/B,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAgExC"}
|