@apify/actors-mcp-server 0.20.3-beta.0 → 0.20.3-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 +9 -6
- package/dist/const.d.ts +0 -6
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -7
- package/dist/const.js.map +1 -1
- package/dist/stdio.js +2 -2
- package/dist/stdio.js.map +1 -1
- package/dist/test_kit/cases/actors.cases.d.ts.map +1 -1
- package/dist/test_kit/cases/actors.cases.js +22 -0
- package/dist/test_kit/cases/actors.cases.js.map +1 -1
- package/dist/test_kit/cases/registration.cases.d.ts.map +1 -1
- package/dist/test_kit/cases/registration.cases.js +3 -6
- package/dist/test_kit/cases/registration.cases.js.map +1 -1
- package/dist/test_kit/tsconfig.tsbuildinfo +1 -1
- package/dist/tools/actor_input_schema.d.ts +0 -8
- package/dist/tools/actor_input_schema.d.ts.map +1 -1
- package/dist/tools/actor_input_schema.js +2 -29
- package/dist/tools/actor_input_schema.js.map +1 -1
- package/dist/tools/actor_tool_naming.d.ts +13 -10
- package/dist/tools/actor_tool_naming.d.ts.map +1 -1
- package/dist/tools/actor_tool_naming.js +31 -19
- package/dist/tools/actor_tool_naming.js.map +1 -1
- package/dist/tools/actors/actor_tool_contract.d.ts +2 -6
- package/dist/tools/actors/actor_tool_contract.d.ts.map +1 -1
- package/dist/tools/actors/actor_tool_contract.js +53 -35
- package/dist/tools/actors/actor_tool_contract.js.map +1 -1
- package/dist/tools/actors/actor_tools_factory.d.ts +3 -2
- package/dist/tools/actors/actor_tools_factory.d.ts.map +1 -1
- package/dist/tools/actors/actor_tools_factory.js +17 -22
- package/dist/tools/actors/actor_tools_factory.js.map +1 -1
- package/dist/tools/actors/call_actor.d.ts +1 -1
- package/dist/tools/actors/call_actor.d.ts.map +1 -1
- package/dist/tools/actors/call_actor.js +18 -17
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/actors/call_actor_mcp_tool.d.ts.map +1 -1
- package/dist/tools/actors/call_actor_mcp_tool.js +4 -4
- package/dist/tools/actors/call_actor_mcp_tool.js.map +1 -1
- package/dist/tools/actors/send_server_actor_request.d.ts +2 -0
- package/dist/tools/actors/send_server_actor_request.d.ts.map +1 -1
- package/dist/tools/actors/send_server_actor_request.js +29 -6
- package/dist/tools/actors/send_server_actor_request.js.map +1 -1
- package/dist/tools/structured_output_schemas.d.ts +1 -1
- package/dist/tools/structured_output_schemas.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/server-instructions/index.js +1 -1
- package/dist/utils/server-instructions/index.js.map +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
|
@@ -61,14 +61,6 @@ export declare function markInputPropertiesAsRequired(input: ActorInputSchema):
|
|
|
61
61
|
export declare function buildActorInputSchema(actorFullName: string, input: ActorInputSchema | undefined): {
|
|
62
62
|
inputSchema: ActorInputSchema;
|
|
63
63
|
};
|
|
64
|
-
/**
|
|
65
|
-
* Returns a shallow-cloned input schema that keeps only whitelisted properties
|
|
66
|
-
* and filters the required array accordingly. All other top-level fields are preserved.
|
|
67
|
-
* If properties are missing, the original input is returned unchanged.
|
|
68
|
-
*
|
|
69
|
-
* Exposure policies can offer a subset of Actor inputs without redefining the schema.
|
|
70
|
-
*/
|
|
71
|
-
export declare function pruneSchemaPropertiesByWhitelist(input: ActorInputSchema, whitelist: Iterable<string>): ActorInputSchema;
|
|
72
64
|
/**
|
|
73
65
|
* Determines the type of items in an array schema property, since Actor input schemas usually
|
|
74
66
|
* omit `items.type`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_input_schema.d.ts","sourceRoot":"","sources":["../../src/tools/actor_input_schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAM5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":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/F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAmB5E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC1C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC7C,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CASlC;AAmDD,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAE,GAAG;IAChF,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACnC,CAgBA;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAQrH;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQnG;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,0BAA0B,CAWjH"}
|
|
@@ -5,7 +5,6 @@ import { SchemaTooLargeError } from '../errors.js';
|
|
|
5
5
|
import { createAjv, fixZodSchemaRequired } from '../utils/ajv.js';
|
|
6
6
|
import { addGlobsProperties, addKeyValueProperties, addProxyProperties, addPseudoUrlsProperties, addRequestListSourcesProperties, addResourcePickerProperties as addArrayResourcePickerProperties, } from '../utils/apify_properties.js';
|
|
7
7
|
import { getToolSchemaID } from './actor_tool_naming.js';
|
|
8
|
-
import { getActorToolPolicy } from './actors/actor_tool_contract.js';
|
|
9
8
|
// Real Apify Actor input schemas run up to ~140 KB post-transform; cap at 256 KB to bound AJV's
|
|
10
9
|
// synchronous codegen so a pathological untrusted schema can't freeze the event loop. Only the
|
|
11
10
|
// untrusted callers (actor_tools_factory, mcp/proxy) reach AJV through here; trusted compileSchema()
|
|
@@ -171,34 +170,8 @@ export function buildActorInputSchema(actorFullName, input) {
|
|
|
171
170
|
if ('$schema' in working) {
|
|
172
171
|
delete working.$schema;
|
|
173
172
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
? pruneSchemaPropertiesByWhitelist(working, policy.exposedInputs)
|
|
177
|
-
: working;
|
|
178
|
-
finalSchema.$id = getToolSchemaID(actorFullName);
|
|
179
|
-
return { inputSchema: finalSchema };
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Returns a shallow-cloned input schema that keeps only whitelisted properties
|
|
183
|
-
* and filters the required array accordingly. All other top-level fields are preserved.
|
|
184
|
-
* If properties are missing, the original input is returned unchanged.
|
|
185
|
-
*
|
|
186
|
-
* Exposure policies can offer a subset of Actor inputs without redefining the schema.
|
|
187
|
-
*/
|
|
188
|
-
export function pruneSchemaPropertiesByWhitelist(input, whitelist) {
|
|
189
|
-
if (!input || !input.properties || typeof input.properties !== 'object' || !whitelist)
|
|
190
|
-
return input;
|
|
191
|
-
const allowed = new Set(Array.from(whitelist));
|
|
192
|
-
const newProps = {};
|
|
193
|
-
for (const key of Object.keys(input.properties)) {
|
|
194
|
-
if (allowed.has(key))
|
|
195
|
-
newProps[key] = input.properties[key];
|
|
196
|
-
}
|
|
197
|
-
const cloned = { ...input, properties: newProps };
|
|
198
|
-
if (Array.isArray(input.required)) {
|
|
199
|
-
cloned.required = input.required.filter((k) => allowed.has(k));
|
|
200
|
-
}
|
|
201
|
-
return cloned;
|
|
173
|
+
working.$id = getToolSchemaID(actorFullName);
|
|
174
|
+
return { inputSchema: working };
|
|
202
175
|
}
|
|
203
176
|
/**
|
|
204
177
|
* Determines the type of items in an array schema property, since Actor input schemas usually
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_input_schema.js","sourceRoot":"","sources":["../../src/tools/actor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U,GAAqB,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5D,IAAI,qBAAqB,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IACtE,qBAAqB,GAAG,4BAA4B,CAAC,qBAAqB,CAAC,CAAC;IAC5E,qBAAqB,GAAG,4BAA4B,CAAC,qBAAqB,CAAC,CAAC;IAC5E,qBAAqB,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;IACtE,qBAAqB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;IACjE,qBAAqB,GAAG,8BAA8B,CAAC,qBAAqB,CAAC,CAAC;IAC9E,qBAAqB,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;IACtE,OAAO,qBAAqB,CAAC;AACjC,CAAC"}
|
|
@@ -3,14 +3,17 @@ import { ACTOR_TOOL_MODE } from '../types.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* The single rule for which interfaces an Actor has. Two routes are derived from it: the Actor's own tool
|
|
5
5
|
* (`resolveActorToolMode`, read by tool loading) and `call-actor` (`getActorToolModeFromInterfaces`, read through
|
|
6
|
-
* `getActorToolResolutionCached`). The
|
|
7
|
-
* input interface; `call-actor`
|
|
6
|
+
* `getActorToolResolutionCached`). The three interfaces are independent of each other. The own tool takes the server
|
|
7
|
+
* interface first, then the MCP server, then the input interface; `call-actor` takes the input interface first, then
|
|
8
|
+
* the MCP server, and never the server interface, so it still starts runs of such an Actor.
|
|
8
9
|
*
|
|
9
10
|
* | server | MCP path | input schema | HTTP schema | `input` | `mcp` | `server` | own tool | `call-actor` |
|
|
10
11
|
* |--------|----------|--------------|-------------|---------|-------|----------|----------------------------|----------------------------|
|
|
11
12
|
* | off | any | any | any | true | false | false | `RUN` | `RUN` |
|
|
12
|
-
* | on | present |
|
|
13
|
-
* | on | present |
|
|
13
|
+
* | on | present | non-empty | yes | true | true | true | `SERVER` | `RUN` |
|
|
14
|
+
* | on | present | non-empty | no | true | true | false | `MCP` | `RUN` |
|
|
15
|
+
* | on | present | empty | yes | false | true | true | `SERVER` | `MCP` |
|
|
16
|
+
* | on | present | empty | no | false | true | false | `MCP` | `MCP` |
|
|
14
17
|
* | on | absent | non-empty | yes | true | false | true | `SERVER` | `RUN` |
|
|
15
18
|
* | on | absent | non-empty | no | true | false | false | `RUN` | `RUN` |
|
|
16
19
|
* | on | absent | empty | yes | false | false | true | `SERVER` | `SERVER_ACTOR_WITHOUT_MCP` |
|
|
@@ -18,11 +21,6 @@ import { ACTOR_TOOL_MODE } from '../types.js';
|
|
|
18
21
|
*
|
|
19
22
|
* "server" is the Actor's `actorStandby.isEnabled` (the API field is named standby). "MCP path" is
|
|
20
23
|
* `webServerMcpPath`. "HTTP schema" is `definition.hasWebServerSchema`.
|
|
21
|
-
* Actors in `INPUT_INTERFACE_ACTORS` (`../const.ts`) are served through the input interface although they declare
|
|
22
|
-
* other interfaces: their MCP path reads as absent, and their own tool never takes `SERVER`. With an empty input
|
|
23
|
-
* schema (including a malformed one `pruneActorDefinition` drops) they get no tool, like any other server Actor.
|
|
24
|
-
* An MCP-server Actor does not get `input` even with a non-empty input schema: Store data shows that
|
|
25
|
-
* interface is unused on such Actors.
|
|
26
24
|
* The input schema counts as empty when the definition has no `input`, `input.properties` is missing,
|
|
27
25
|
* or `input.properties` has zero keys. Nothing else counts — a non-empty `required` with no properties
|
|
28
26
|
* still reads as empty.
|
|
@@ -30,8 +28,13 @@ import { ACTOR_TOOL_MODE } from '../types.js';
|
|
|
30
28
|
export declare function resolveActorInterfaces({ actor, definition, webServerMcpPath }: ActorInfo): ActorInterfaces;
|
|
31
29
|
/** The own-tool column of the table on {@link resolveActorInterfaces}. */
|
|
32
30
|
export declare function resolveActorToolMode(actorInfo: ActorInfo): ACTOR_TOOL_MODE;
|
|
33
|
-
/** The `call-actor` column of the table on {@link resolveActorInterfaces}:
|
|
31
|
+
/** The `call-actor` column of the table on {@link resolveActorInterfaces}: a run, else MCP tools, else none. */
|
|
34
32
|
export declare function getActorToolModeFromInterfaces({ input, mcp, }: ActorInterfaces): Exclude<ACTOR_TOOL_MODE, typeof ACTOR_TOOL_MODE.SERVER>;
|
|
33
|
+
/**
|
|
34
|
+
* The tool a session calls a Server Actor's HTTP API with: the Actor's own tool when loaded (its description says to
|
|
35
|
+
* prefer it), else `send-server-actor-request` when loaded, else none.
|
|
36
|
+
*/
|
|
37
|
+
export declare function findServerTool(actorFullName: string, loadedToolNames: readonly string[]): string | undefined;
|
|
35
38
|
/** Multi-tenant when the Actor's standby configuration says so; single-tenant otherwise, the platform default. */
|
|
36
39
|
export declare function resolveActorTenancy(actor: Pick<Actor, 'actorStandby'>): ActorTenancy;
|
|
37
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_tool_naming.d.ts","sourceRoot":"","sources":["../../src/tools/actor_tool_naming.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAiB,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"actor_tool_naming.d.ts","sourceRoot":"","sources":["../../src/tools/actor_tool_naming.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAiB,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,SAAS,GAAG,eAAe,CAK1G;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,eAAe,CAM1E;AAED,gHAAgH;AAChH,wBAAgB,8BAA8B,CAAC,EAC3C,KAAK,EACL,GAAG,G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A8J;AAC9J,wBAAgB,WAAW,CACvB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GACpC,OAAO,CAET"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import log from '@apify/log';
|
|
3
|
-
import { APIFY_MCP_URL, HELPER_TOOLS
|
|
3
|
+
import { APIFY_MCP_URL, HELPER_TOOLS } from '../const.js';
|
|
4
4
|
import { MAX_TOOL_NAME_LENGTH, TOOL_NAME_HASH_LENGTH } from '../mcp/const.js';
|
|
5
5
|
import { ACTOR_TENANCY, ACTOR_TOOL_MODE } from '../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* The single rule for which interfaces an Actor has. Two routes are derived from it: the Actor's own tool
|
|
8
8
|
* (`resolveActorToolMode`, read by tool loading) and `call-actor` (`getActorToolModeFromInterfaces`, read through
|
|
9
|
-
* `getActorToolResolutionCached`). The
|
|
10
|
-
* input interface; `call-actor`
|
|
9
|
+
* `getActorToolResolutionCached`). The three interfaces are independent of each other. The own tool takes the server
|
|
10
|
+
* interface first, then the MCP server, then the input interface; `call-actor` takes the input interface first, then
|
|
11
|
+
* the MCP server, and never the server interface, so it still starts runs of such an Actor.
|
|
11
12
|
*
|
|
12
13
|
* | server | MCP path | input schema | HTTP schema | `input` | `mcp` | `server` | own tool | `call-actor` |
|
|
13
14
|
* |--------|----------|--------------|-------------|---------|-------|----------|----------------------------|----------------------------|
|
|
14
15
|
* | off | any | any | any | true | false | false | `RUN` | `RUN` |
|
|
15
|
-
* | on | present |
|
|
16
|
-
* | on | present |
|
|
16
|
+
* | on | present | non-empty | yes | true | true | true | `SERVER` | `RUN` |
|
|
17
|
+
* | on | present | non-empty | no | true | true | false | `MCP` | `RUN` |
|
|
18
|
+
* | on | present | empty | yes | false | true | true | `SERVER` | `MCP` |
|
|
19
|
+
* | on | present | empty | no | false | true | false | `MCP` | `MCP` |
|
|
17
20
|
* | on | absent | non-empty | yes | true | false | true | `SERVER` | `RUN` |
|
|
18
21
|
* | on | absent | non-empty | no | true | false | false | `RUN` | `RUN` |
|
|
19
22
|
* | on | absent | empty | yes | false | false | true | `SERVER` | `SERVER_ACTOR_WITHOUT_MCP` |
|
|
@@ -21,11 +24,6 @@ import { ACTOR_TENANCY, ACTOR_TOOL_MODE } from '../types.js';
|
|
|
21
24
|
*
|
|
22
25
|
* "server" is the Actor's `actorStandby.isEnabled` (the API field is named standby). "MCP path" is
|
|
23
26
|
* `webServerMcpPath`. "HTTP schema" is `definition.hasWebServerSchema`.
|
|
24
|
-
* Actors in `INPUT_INTERFACE_ACTORS` (`../const.ts`) are served through the input interface although they declare
|
|
25
|
-
* other interfaces: their MCP path reads as absent, and their own tool never takes `SERVER`. With an empty input
|
|
26
|
-
* schema (including a malformed one `pruneActorDefinition` drops) they get no tool, like any other server Actor.
|
|
27
|
-
* An MCP-server Actor does not get `input` even with a non-empty input schema: Store data shows that
|
|
28
|
-
* interface is unused on such Actors.
|
|
29
27
|
* The input schema counts as empty when the definition has no `input`, `input.properties` is missing,
|
|
30
28
|
* or `input.properties` has zero keys. Nothing else counts — a non-empty `required` with no properties
|
|
31
29
|
* still reads as empty.
|
|
@@ -34,26 +32,40 @@ export function resolveActorInterfaces({ actor, definition, webServerMcpPath })
|
|
|
34
32
|
var _a, _b, _c;
|
|
35
33
|
if (((_a = actor.actorStandby) === null || _a === void 0 ? void 0 : _a.isEnabled) !== true)
|
|
36
34
|
return { input: true, mcp: false, server: false };
|
|
37
|
-
const mcp = Boolean(webServerMcpPath) && !INPUT_INTERFACE_ACTORS.has(definition.actorFullName);
|
|
38
35
|
const hasInputProperties = Object.keys((_c = (_b = definition.input) === null || _b === void 0 ? void 0 : _b.properties) !== null && _c !== void 0 ? _c : {}).length > 0;
|
|
39
|
-
return { input: hasInputProperties
|
|
36
|
+
return { input: hasInputProperties, mcp: Boolean(webServerMcpPath), server: definition.hasWebServerSchema };
|
|
40
37
|
}
|
|
41
38
|
/** The own-tool column of the table on {@link resolveActorInterfaces}. */
|
|
42
39
|
export function resolveActorToolMode(actorInfo) {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
40
|
+
const { server, mcp, input } = resolveActorInterfaces(actorInfo);
|
|
41
|
+
if (server)
|
|
45
42
|
return ACTOR_TOOL_MODE.SERVER;
|
|
46
|
-
}
|
|
47
|
-
return getActorToolModeFromInterfaces(interfaces);
|
|
48
|
-
}
|
|
49
|
-
/** The `call-actor` column of the table on {@link resolveActorInterfaces}: MCP tools, else a run, else none. */
|
|
50
|
-
export function getActorToolModeFromInterfaces({ input, mcp, }) {
|
|
51
43
|
if (mcp)
|
|
52
44
|
return ACTOR_TOOL_MODE.MCP;
|
|
53
45
|
if (input)
|
|
54
46
|
return ACTOR_TOOL_MODE.RUN;
|
|
55
47
|
return ACTOR_TOOL_MODE.SERVER_ACTOR_WITHOUT_MCP;
|
|
56
48
|
}
|
|
49
|
+
/** The `call-actor` column of the table on {@link resolveActorInterfaces}: a run, else MCP tools, else none. */
|
|
50
|
+
export function getActorToolModeFromInterfaces({ input, mcp, }) {
|
|
51
|
+
if (input)
|
|
52
|
+
return ACTOR_TOOL_MODE.RUN;
|
|
53
|
+
if (mcp)
|
|
54
|
+
return ACTOR_TOOL_MODE.MCP;
|
|
55
|
+
return ACTOR_TOOL_MODE.SERVER_ACTOR_WITHOUT_MCP;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The tool a session calls a Server Actor's HTTP API with: the Actor's own tool when loaded (its description says to
|
|
59
|
+
* prefer it), else `send-server-actor-request` when loaded, else none.
|
|
60
|
+
*/
|
|
61
|
+
export function findServerTool(actorFullName, loadedToolNames) {
|
|
62
|
+
const ownTool = actorNameToToolName(actorFullName);
|
|
63
|
+
if (loadedToolNames.includes(ownTool))
|
|
64
|
+
return ownTool;
|
|
65
|
+
if (loadedToolNames.includes(HELPER_TOOLS.ACTOR_SERVER_REQUEST))
|
|
66
|
+
return HELPER_TOOLS.ACTOR_SERVER_REQUEST;
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
57
69
|
/** Multi-tenant when the Actor's standby configuration says so; single-tenant otherwise, the platform default. */
|
|
58
70
|
export function resolveActorTenancy(actor) {
|
|
59
71
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_tool_naming.js","sourceRoot":"","sources":["../../src/tools/actor_tool_naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"actor_tool_naming.js","sourceRoot":"","sources":["../../src/tools/actor_tool_naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAa;;IACrF,IAAI,CAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,MAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAE9F,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,MAAA,MAAA,UAAU,CAAC,KAAK,0CAAE,UAAU,mCAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAC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AM,gBAAgB,GAAG,qEAAqE,kBAAkB,EAAE,EAAE,CAAC;AAE5H,8JAA8J;AAC9J,MAAM,UAAU,WAAW,CACvB,OAAe,EACf,eAAkC,EAClC,cAAmC;IAEnC,OAAO,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnG,CAAC"}
|
|
@@ -9,16 +9,12 @@ type DirectActorPolicyConfig = {
|
|
|
9
9
|
};
|
|
10
10
|
type ServerActorToolPolicyConfig = {
|
|
11
11
|
buildDescription?: (context: ToolDescriptionContext) => string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/** Replaces the description of the named inputs of the tool (`path`, `query`, `body`). */
|
|
13
|
+
inputDescriptions?: Readonly<Record<string, string>>;
|
|
14
14
|
};
|
|
15
15
|
type ActorToolPolicyConfig = {
|
|
16
16
|
/** Direct tools only; `call-actor` and the widgets keep the Actor's own contract. */
|
|
17
17
|
directInput?: DirectActorPolicyConfig;
|
|
18
|
-
/** Only these inputs are served; the others are hidden but still accepted and passed to the run. */
|
|
19
|
-
exposedInputs?: readonly string[];
|
|
20
|
-
/** Appended to the run tool's description. */
|
|
21
|
-
buildDescription?: (context: ToolDescriptionContext) => string;
|
|
22
18
|
/** The Actor's own tool when it is served through its server interface; a run tool gets none of it. */
|
|
23
19
|
serverTool?: ServerActorToolPolicyConfig;
|
|
24
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_tool_contract.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/actor_tool_contract.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"actor_tool_contract.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/actor_tool_contract.ts"],"names":[],"mappings":"AACA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wBAAwB,CACpC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB"}
|
|
@@ -1,43 +1,59 @@
|
|
|
1
1
|
import { RAG_WEB_BROWSER, WEB_FETCH, WEB_SEARCH } from '../../const.js';
|
|
2
|
+
import { actorNameToToolName } from '../actor_tool_naming.js';
|
|
3
|
+
/** Appended to the `apify/rag-web-browser` tool description, a Server Actor tool (`GET /search`). */
|
|
2
4
|
const RAG_WEB_BROWSER_ADDITIONAL_DESC = `Use this tool for generic web content: it searches the web by query and returns the text of the top results.
|
|
3
5
|
This tool scrapes the data itself - it does NOT just find tools.
|
|
6
|
+
Example: {"method":"GET","path":"/search","query":{"query":"latest AI agent payment protocols","maxResults":3}}
|
|
7
|
+
If query is a URL, the tool fetches that page instead of searching.
|
|
4
8
|
|
|
5
9
|
Examples of when to use:
|
|
6
10
|
- General questions answered by web pages (e.g., "What's the weather in Prague?", "Latest news about the EU AI Act", "How does HTTP/3 work?")
|
|
7
11
|
|
|
8
12
|
For detailed data from a specific platform (e.g. Amazon products with prices, Instagram posts, Google Maps places with ratings), a specialized Actor from the Apify Store returns complete, structured results; this tool returns page text only.`;
|
|
13
|
+
// The `apify/web-fetch` and `apify/web-search` tool descriptions, Server Actor tools (`GET /` and `POST /`), share
|
|
14
|
+
// one shape: what the tool returns, the parameters that change what it returns, when it fits, what it does not do,
|
|
15
|
+
// and an example call. The facts are the Actors' own API schemas. Client-agnostic on purpose: no references to any
|
|
16
|
+
// specific client or its built-in tools, so the same text works for every MCP client; the sibling web tool is named
|
|
17
|
+
// only when the session serves it.
|
|
18
|
+
/** The `apify/web-fetch` tool description. */
|
|
19
|
+
const buildWebFetchDescription = ({ hasTool }) => {
|
|
20
|
+
const webSearchTool = actorNameToToolName(WEB_SEARCH);
|
|
21
|
+
return `Fetches one URL and returns its content as a JSON object with a field per requested format, plus metadata such as the final URL, HTTP status, content type and page title.
|
|
22
|
+
formats selects markdown, html, text, links (a deduplicated list) or raw (the original bytes); when omitted, an HTML or PDF page comes back as markdown, other text as text and binary content as raw.
|
|
23
|
+
The page is fetched without running JavaScript unless wait is set, which renders it in a real browser and waits the given milliseconds for late-loaded content; a rendered request is slower. The Actor handles common bot protection and rate limits, so it also retrieves pages where a plain HTTP fetch is blocked.
|
|
24
|
+
Use it when the user gives a URL and wants its content, data or links, or an answer that requires reading that page.
|
|
25
|
+
It does not search the web; it needs a URL.${hasTool(webSearchTool) ? ` To find pages by query, use ${webSearchTool}.` : ''}
|
|
26
|
+
Example: {"method":"GET","path":"/","query":{"url":"https://example.com","formats":["markdown"]}}`;
|
|
27
|
+
};
|
|
28
|
+
/** The `apify/web-search` tool description. */
|
|
29
|
+
const buildWebSearchDescription = ({ hasTool }) => {
|
|
30
|
+
const webFetchTool = actorNameToToolName(WEB_FETCH);
|
|
31
|
+
return `Runs one web search and returns one page of organic results as JSON: title, URL, snippet and position of each result, with publication date, publisher and sublinks when the search engine provides them.
|
|
32
|
+
provider picks google (the default) or duckduckgo; maxResults caps the results, and omitting it returns the whole page, about 10; countryCode and languageCode localize the ranking; dateFrom and dateTo (YYYY-MM-DD) bound the publication date; allowedDomains and blockedDomains (up to 10 hostnames each, subdomains included) restrict or exclude sites.
|
|
33
|
+
Use it when the user wants links to choose from, wants to know which pages exist for a topic, or asks a question that a result title or snippet answers.
|
|
34
|
+
It does not fetch page content; it returns links and snippets only.${hasTool(webFetchTool) ? ` To read a result page, use ${webFetchTool}.` : ''}
|
|
35
|
+
Example: {"method":"GET","path":"/","query":{"query":"latest AI agent payment protocols","maxResults":5}}`;
|
|
36
|
+
};
|
|
9
37
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
const WEB_FETCH_ADDITIONAL_DESC = `Use this tool to fetch a URL and return its complete content.
|
|
14
|
-
It renders JavaScript and bypasses anti-bot protection, so it also retrieves pages where a plain HTTP fetch is blocked, fails (e.g. 403 or 429), or returns incomplete content.
|
|
15
|
-
The page comes back verbatim, with no summarization, as a JSON object with a field per requested format.
|
|
16
|
-
Example: {"method":"GET","path":"/","query":{"url":"https://example.com","formats":["markdown"]}}
|
|
17
|
-
wait is in milliseconds (1 to 60000), for pages whose content shows up late.
|
|
18
|
-
|
|
19
|
-
Examples of when to use:
|
|
20
|
-
- User provides a URL and wants its content, its data or links, or an answer that requires reading that page
|
|
21
|
-
- A previous attempt to fetch a page was blocked, returned an error or CAPTCHA, or came back incomplete because the page needs JavaScript rendering
|
|
22
|
-
- Verbatim page content is needed, e.g. for quoting, extraction, or archiving
|
|
23
|
-
|
|
24
|
-
It does not search the web - it needs a URL. To find pages by query, use a web search tool.
|
|
25
|
-
If the exact URL cannot be fetched (e.g. a non-http(s) scheme such as ftp:), say so rather than silently substituting a different URL.`;
|
|
26
|
-
/**
|
|
27
|
-
* Appended to the `query` input description of the `apify/web-fetch` tool. Lives on the input because that is what
|
|
28
|
-
* an agent reads while writing the argument: agents silently rewrote ftp:// URLs to https:// instead of telling
|
|
29
|
-
* the user the scheme is unsupported.
|
|
38
|
+
* The input descriptions of the two tools: `path`, and `query` listing every parameter of `GET /`. The url scheme
|
|
39
|
+
* rule lives on the input because that is what an agent reads while writing the argument: agents silently rewrote
|
|
40
|
+
* ftp:// URLs to https:// instead of telling the user the scheme is unsupported.
|
|
30
41
|
*/
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
const WEB_FETCH_INPUT_DESCRIPTIONS = {
|
|
43
|
+
path: 'Always "/".',
|
|
44
|
+
query: 'url (required; http(s) only - for any other scheme, such as ftp:, tell the user this tool cannot fetch it ' +
|
|
45
|
+
'rather than substituting a different URL), formats (array of markdown, html, text, links, raw), unwrap ' +
|
|
46
|
+
'(boolean; returns the first producible format as the response body instead of a JSON object), headers ' +
|
|
47
|
+
'(extra request headers as a JSON string), wait (milliseconds, 1 to 60000; renders the page in a real ' +
|
|
48
|
+
'browser and waits for late-loaded content).',
|
|
49
|
+
};
|
|
50
|
+
const WEB_SEARCH_INPUT_DESCRIPTIONS = {
|
|
51
|
+
path: 'Always "/".',
|
|
52
|
+
query: 'query (required; operators such as site: pass through unchecked), provider (google, the default, or ' +
|
|
53
|
+
'duckduckgo), maxResults (integer; omitted returns the whole page), languageCode (ISO 639-1, such as en or ' +
|
|
54
|
+
'pt-BR), countryCode (ISO 3166-1 alpha-2, such as US or CZ), location (a place name, google only), dateFrom ' +
|
|
55
|
+
'and dateTo (YYYY-MM-DD), allowedDomains and blockedDomains (arrays of up to 10 hostnames).',
|
|
56
|
+
};
|
|
41
57
|
/** Presentation rules preserve existing generic-call behavior; directInput is direct-tool-only. */
|
|
42
58
|
const ACTOR_TOOL_POLICIES = {
|
|
43
59
|
'apify/website-content-crawler': {
|
|
@@ -48,17 +64,19 @@ const ACTOR_TOOL_POLICIES = {
|
|
|
48
64
|
},
|
|
49
65
|
},
|
|
50
66
|
[RAG_WEB_BROWSER]: {
|
|
51
|
-
|
|
52
|
-
buildDescription: () => RAG_WEB_BROWSER_ADDITIONAL_DESC,
|
|
67
|
+
serverTool: { buildDescription: () => RAG_WEB_BROWSER_ADDITIONAL_DESC },
|
|
53
68
|
},
|
|
54
69
|
[WEB_FETCH]: {
|
|
55
70
|
serverTool: {
|
|
56
|
-
buildDescription:
|
|
57
|
-
|
|
71
|
+
buildDescription: buildWebFetchDescription,
|
|
72
|
+
inputDescriptions: WEB_FETCH_INPUT_DESCRIPTIONS,
|
|
58
73
|
},
|
|
59
74
|
},
|
|
60
75
|
[WEB_SEARCH]: {
|
|
61
|
-
|
|
76
|
+
serverTool: {
|
|
77
|
+
buildDescription: buildWebSearchDescription,
|
|
78
|
+
inputDescriptions: WEB_SEARCH_INPUT_DESCRIPTIONS,
|
|
79
|
+
},
|
|
62
80
|
},
|
|
63
81
|
};
|
|
64
82
|
export function getActorToolPolicy(actorFullName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_tool_contract.js","sourceRoot":"","sources":["../../../src/tools/actors/actor_tool_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"actor_tool_contract.js","sourceRoot":"","sources":["../../../src/tools/actors/actor_tool_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qGAAqG;AACrG,MAAM,+BAA+B,GAAG;;;;;;;;kPAQ0M,CAAC;AAEnP,mHAAmH;AACnH,mHAAmH;AACnH,mHAAmH;AACnH,oHAAoH;AACpH,mCAAmC;AAEnC,8CAA8C;AAC9C,MAAM,wBAAwB,GAAG,CAAC,EAAE,OAAO,EAA0B,EAAU,EAAE;IAC7E,MAAM,aAAa,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACtD,OAAO;;;;6CAIkC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,gCAAgC,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE;kGACzB,CAAC;AACnG,CAAC,CAAC;AAEF,+CAA+C;AAC/C,MAAM,yBAAyB,GAAG,CAAC,EAAE,OAAO,EAA0B,EAAU,EAAE;IAC9E,MAAM,YAAY,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpD,OAAO;;;qEAG0D,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,+BAA+B,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE;0GACtC,CAAC;AAC3G,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,4BAA4B,GAAG;IACjC,IAAI,EAAE,aAAa;IACnB,KAAK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C,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1E,OAAO,GAAG,IAAI,IAAI,IAAI,2DAA2D,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,0BAA0B,OAAO,GAAG,CAAC;AAC/J,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,aAAqB,EAAE,IAA6B;;IAC3F,OAAO,CAAC,MAAA,MAAA,oBAAoB,CAAC,aAAa,CAAC,0CAAE,YAAY,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AACpG,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,wBAAwB,CACpC,aAAqB,EACrB,KAA8B;;IAE9B,OAAO,EAAE,GAAG,MAAA,oBAAoB,CAAC,aAAa,CAAC,0CAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -36,8 +36,9 @@ export declare function getNormalActorsAsTools(actorsInfo: ActorInfo[], options?
|
|
|
36
36
|
/**
|
|
37
37
|
* Builds the own tool of each Actor served through its server interface: `send-server-actor-request` with the Actor
|
|
38
38
|
* fixed, its documented operations in the description and its methods and paths in the input schema.
|
|
39
|
-
* `readOnlyHint` is the Actor's, as for a run tool
|
|
40
|
-
* input
|
|
39
|
+
* `readOnlyHint` is the Actor's, as for a run tool. The policy's `serverTool` (`getActorToolPolicy`), when the Actor
|
|
40
|
+
* has one, replaces the generic opening and the Actor description with its own text and the generic input
|
|
41
|
+
* descriptions with its own.
|
|
41
42
|
*/
|
|
42
43
|
export declare function getServerActorsAsTools(actorsInfo: ActorInfo[]): ToolEntry[];
|
|
43
44
|
export declare function getMCPServersAsTools(actorsInfo: ActorInfo[], apifyClient: Pick<ApifyClient, 'token' | 'requestOrigin'>, mcpSessionId?: string): Promise<ToolEntry[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor_tools_factory.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/actor_tools_factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"actor_tools_factory.d.ts","sourceRoot":"","sources":["../../../src/tools/actors/actor_tools_factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAEH,KAAK,SAAS,EACd,KAAK,UAAU,EAGf,KAAK,SAAS,EAKjB,MAAM,gBAAgB,CAAC;AA4CxB;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5G;AA0BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,sBAAsB,CACxC,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACrF,OAAO,CAAC,SAAS,EAAE,CAAC,CAwFtB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CA2D3E;AAED,wBAAsB,oBAAoB,CACtC,UAAU,EAAE,SAAS,EAAE,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,eAAe,CAAC,EACzD,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqDtB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAalG;AAED,eAAO,MAAM,wBAAwB,8FACsD,CAAC;AAE5F,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,QAAY,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,cAAc,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAClC,eAAe,EAAE,MAAM,EAAE,EACzB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE;IACN,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,GACF,OAAO,CAAC,mBAAmB,CAAC,CAmG9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import log from '@apify/log';
|
|
2
|
-
import { ACTOR_MAX_MEMORY_MBYTES, FAILURE_CATEGORY, HELPER_TOOLS,
|
|
2
|
+
import { ACTOR_MAX_MEMORY_MBYTES, FAILURE_CATEGORY, HELPER_TOOLS, OFFICIAL_ACTORS_WITH_SIDE_EFFECTS, OFFICIAL_APIFY_USERNAMES, } from '../../const.js';
|
|
3
3
|
import { ActorLoadError } from '../../errors.js';
|
|
4
4
|
import { getActorMCPServerPath, getActorMCPServerURL } from '../../mcp/actors.js';
|
|
5
5
|
import { connectMCPClient } from '../../mcp/client.js';
|
|
@@ -13,7 +13,7 @@ import { actorNameToToolName, getActorToolModeFromInterfaces, isActorBlockedUnde
|
|
|
13
13
|
import { buildEnrichedDirectActorOutputSchema, actorRunOutputSchema, serverActorRequestOutputSchema, } from '../structured_output_schemas.js';
|
|
14
14
|
import { CALL_ACTOR_WAIT_SECS_DEFAULT, WAIT_SECS_MAX } from './actor_run_response.js';
|
|
15
15
|
import { buildDirectActorContract, getActorToolPolicy } from './actor_tool_contract.js';
|
|
16
|
-
import { buildServerActorToolSchemas, executeSendServerActorRequest, redactServerActorRequestArgs, } from './send_server_actor_request.js';
|
|
16
|
+
import { buildServerActorToolSchemas, executeSendServerActorRequest, redactServerActorRequestArgs, SERVER_REQUEST_TRANSPORT_NOTE, } from './send_server_actor_request.js';
|
|
17
17
|
import { buildServerActorToolDescription, formatTenancyBilling } from './server_interface_details.js';
|
|
18
18
|
/**
|
|
19
19
|
* MCP-only opt-in injected next to the Actor's own input fields. Same contract as `call-actor`'s
|
|
@@ -128,14 +128,9 @@ export async function getNormalActorsAsTools(actorsInfo, options) {
|
|
|
128
128
|
// per-call copy of the input schema alive for the session's lifetime.
|
|
129
129
|
const contractDescription = contract.description;
|
|
130
130
|
// Names call-actor only when the session actually has it.
|
|
131
|
-
const buildDescription = (
|
|
132
|
-
var _a, _b;
|
|
133
|
-
const { hasTool } = context;
|
|
131
|
+
const buildDescription = ({ hasTool }) => {
|
|
134
132
|
let description = `This tool calls the Actor "${actorFullName}" and retrieves its output results.
|
|
135
133
|
${hasTool(HELPER_TOOLS.ACTOR_CALL) ? `Use this tool instead of the "${HELPER_TOOLS.ACTOR_CALL}" if user requests this specific Actor.\n` : ''}Actor description: ${actorDescription}`;
|
|
136
|
-
const policyDescription = (_b = (_a = getActorToolPolicy(actorFullName)) === null || _a === void 0 ? void 0 : _a.buildDescription) === null || _b === void 0 ? void 0 : _b.call(_a, context);
|
|
137
|
-
if (policyDescription)
|
|
138
|
-
description += `\n\n${policyDescription}`;
|
|
139
134
|
if (contractDescription)
|
|
140
135
|
description += `\n\n${contractDescription}`;
|
|
141
136
|
return description;
|
|
@@ -192,11 +187,12 @@ ${hasTool(HELPER_TOOLS.ACTOR_CALL) ? `Use this tool instead of the "${HELPER_TOO
|
|
|
192
187
|
/**
|
|
193
188
|
* Builds the own tool of each Actor served through its server interface: `send-server-actor-request` with the Actor
|
|
194
189
|
* fixed, its documented operations in the description and its methods and paths in the input schema.
|
|
195
|
-
* `readOnlyHint` is the Actor's, as for a run tool
|
|
196
|
-
* input
|
|
190
|
+
* `readOnlyHint` is the Actor's, as for a run tool. The policy's `serverTool` (`getActorToolPolicy`), when the Actor
|
|
191
|
+
* has one, replaces the generic opening and the Actor description with its own text and the generic input
|
|
192
|
+
* descriptions with its own.
|
|
197
193
|
*/
|
|
198
194
|
export function getServerActorsAsTools(actorsInfo) {
|
|
199
|
-
var _a, _b, _c, _d
|
|
195
|
+
var _a, _b, _c, _d;
|
|
200
196
|
const tools = [];
|
|
201
197
|
for (const actorInfo of actorsInfo) {
|
|
202
198
|
const { definition, actor } = actorInfo;
|
|
@@ -212,23 +208,22 @@ export function getServerActorsAsTools(actorsInfo) {
|
|
|
212
208
|
});
|
|
213
209
|
const policy = (_b = getActorToolPolicy(actorFullName)) === null || _b === void 0 ? void 0 : _b.serverTool;
|
|
214
210
|
const schemas = buildServerActorToolSchemas(toolInfo);
|
|
215
|
-
for (const [name,
|
|
211
|
+
for (const [name, text] of Object.entries((_c = policy === null || policy === void 0 ? void 0 : policy.inputDescriptions) !== null && _c !== void 0 ? _c : {})) {
|
|
216
212
|
const property = (_d = schemas.inputSchema.properties) === null || _d === void 0 ? void 0 : _d[name];
|
|
217
213
|
if (property)
|
|
218
|
-
property.description =
|
|
214
|
+
property.description = text;
|
|
219
215
|
}
|
|
220
216
|
// Names fetch-actor-details only when the session has it, and only when the operations are not in full.
|
|
221
217
|
const buildDescription = (context) => {
|
|
222
|
-
var _a;
|
|
218
|
+
var _a, _b;
|
|
223
219
|
const { hasTool } = context;
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
`;
|
|
220
|
+
const about = (_b = (_a = policy === null || policy === void 0 ? void 0 : policy.buildDescription) === null || _a === void 0 ? void 0 : _a.call(policy, context)) !== null && _b !== void 0 ? _b : `This tool sends one HTTP request to the server interface of the Actor "${actorFullName}" and returns the response.\nActor description: ${description}`;
|
|
221
|
+
const preferThisTool = hasTool(HELPER_TOOLS.ACTOR_SERVER_REQUEST)
|
|
222
|
+
? `Use this tool instead of the "${HELPER_TOOLS.ACTOR_SERVER_REQUEST}" if user requests this specific Actor.`
|
|
223
|
+
: undefined;
|
|
224
|
+
const head = [about, '', costNotice, SERVER_REQUEST_TRANSPORT_NOTE, preferThisTool, '', 'Operations:', '']
|
|
225
|
+
.filter((line) => line !== undefined)
|
|
226
|
+
.join('\n');
|
|
232
227
|
return buildServerActorToolDescription(head, toolInfo, hasTool(HELPER_TOOLS.ACTOR_GET_DETAILS));
|
|
233
228
|
};
|
|
234
229
|
tools.push({
|