@apify/actors-mcp-server 0.12.1-beta.2 → 0.12.1-beta.3

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.
Files changed (47) hide show
  1. package/README.md +2 -6
  2. package/dist/const.d.ts +7 -1
  3. package/dist/const.d.ts.map +1 -1
  4. package/dist/const.js +7 -1
  5. package/dist/const.js.map +1 -1
  6. package/dist/errors.d.ts +3 -3
  7. package/dist/errors.js +3 -3
  8. package/dist/index_internals.d.ts +1 -7
  9. package/dist/index_internals.d.ts.map +1 -1
  10. package/dist/index_internals.js +1 -6
  11. package/dist/index_internals.js.map +1 -1
  12. package/dist/input.d.ts +0 -1
  13. package/dist/input.d.ts.map +1 -1
  14. package/dist/input.js +0 -21
  15. package/dist/input.js.map +1 -1
  16. package/dist/mcp/server.d.ts +5 -36
  17. package/dist/mcp/server.d.ts.map +1 -1
  18. package/dist/mcp/server.js +20 -94
  19. package/dist/mcp/server.js.map +1 -1
  20. package/dist/mcp/utils.d.ts.map +1 -1
  21. package/dist/mcp/utils.js +2 -0
  22. package/dist/mcp/utils.js.map +1 -1
  23. package/dist/stdio.js +0 -15
  24. package/dist/stdio.js.map +1 -1
  25. package/dist/tools/actors/actor_tools_factory.d.ts +5 -5
  26. package/dist/tools/actors/actor_tools_factory.js +3 -3
  27. package/dist/tools/registry.d.ts +0 -1
  28. package/dist/tools/registry.d.ts.map +1 -1
  29. package/dist/tools/registry.js +0 -2
  30. package/dist/tools/registry.js.map +1 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/dist/types.d.ts +0 -8
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/types.js.map +1 -1
  35. package/dist/utils/auth.d.ts +0 -1
  36. package/dist/utils/auth.d.ts.map +1 -1
  37. package/dist/utils/auth.js +11 -8
  38. package/dist/utils/auth.js.map +1 -1
  39. package/dist/utils/tools_loader.d.ts +2 -6
  40. package/dist/utils/tools_loader.d.ts.map +1 -1
  41. package/dist/utils/tools_loader.js +20 -44
  42. package/dist/utils/tools_loader.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/tools/actors/add_actor.d.ts +0 -7
  45. package/dist/tools/actors/add_actor.d.ts.map +0 -1
  46. package/dist/tools/actors/add_actor.js +0 -60
  47. package/dist/tools/actors/add_actor.js.map +0 -1
package/README.md CHANGED
@@ -378,15 +378,11 @@ The v2 configuration preserves backward compatibility with v1 usage. Notes:
378
378
  - `actors` param (URL) and `--actors` flag (CLI) are still supported.
379
379
  - Internally they are merged into `tools` selectors.
380
380
  - Examples: `?actors=apify/rag-web-browser` ≡ `?tools=apify/rag-web-browser`; `--actors apify/rag-web-browser` ≡ `--tools apify/rag-web-browser`.
381
- - `enable-adding-actors` (CLI) and `enableAddingActors` (URL) are supported but deprecated.
382
- - Prefer including the specific tool `tools=call-actor` (default via the `actors` category).
383
- - `add-actor` is no longer selectable for new connections on any surface — `call-actor` is substituted in its place, same enabled/alongside-other-tools behavior as before.
384
- - `enableActorAutoLoading` remains as a legacy alias for `enableAddingActors` and is mapped automatically.
381
+ - `enableAddingActors` (URL), `enable-adding-actors` (CLI), and the legacy `enableActorAutoLoading` alias have been removed. To call Actors dynamically, use `tools=call-actor` (included by default via the `actors` category). Any lingering raw value is ignored.
385
382
  - Defaults remain compatible: when no `tools` are specified, the server loads `actors`, `docs`, and `apify/rag-web-browser`.
386
383
  - If any `tools` are specified, the defaults are not added (same as v1 intent for explicit selection).
387
384
  - `call-actor` is now included by default via the `actors` category (additive change). To exclude it, specify an explicit `tools` list without `actors`.
388
- - `preview` category is deprecated and removed. Use specific tool names instead.
389
- - `tools=add-actor` and `tools=experimental` are no longer selectable for new connections — `call-actor` is substituted at selection time. Use `tools=call-actor` (or the default `actors` category) instead.
385
+ - `tools=add-actor`, `tools=experimental`, and `tools=preview` are retired: they are ignored and load no tools. Use `tools=call-actor` (or the default `actors` category) instead.
390
386
 
391
387
  Existing URLs and commands using `?actors=...` or `--actors` continue to work unchanged.
392
388
 
package/dist/const.d.ts CHANGED
@@ -21,7 +21,6 @@ export declare const SERVER_MODE_AUTO_DETECTION_ENABLED = true;
21
21
  export declare const SERVER_NAME = "apify-mcp-server";
22
22
  export declare const SERVER_TITLE = "Apify MCP Server";
23
23
  export declare const HELPER_TOOLS: {
24
- readonly ACTOR_ADD: "add-actor";
25
24
  readonly ACTOR_CALL: "call-actor";
26
25
  readonly ACTOR_CALL_WIDGET: "call-actor-widget";
27
26
  readonly ACTOR_GET_DETAILS: "fetch-actor-details";
@@ -46,6 +45,13 @@ export declare const HELPER_TOOLS: {
46
45
  readonly PROBLEM_REPORT: "report-problem";
47
46
  };
48
47
  export type HelperToolName = (typeof HELPER_TOOLS)[keyof typeof HELPER_TOOLS];
48
+ /**
49
+ * Retired tool selectors: `add-actor` and `experimental` (add-actor was deleted in the stateless
50
+ * migration) and the deprecated `preview` pseudo-category. They name neither a registry category
51
+ * nor a real tool anymore, so they resolve to nothing — never loaded, never treated as an Actor ID,
52
+ * never requiring a token by themselves.
53
+ */
54
+ export declare const RETIRED_SELECTOR_NAMES: ReadonlySet<string>;
49
55
  /**
50
56
  * Client-name substrings (lowercased, matched against `clientInfo.name`) that `report-problem` is
51
57
  * hidden from. Applied once per connection in the compose step, where the client is known.
@@ -1 +1 @@
1
- {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAE7C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAKhD,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAG7C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAa,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C,yGAAyG;AACzG,eAAO,MAAM,kBAAkB,4CAA4C,CAAC;AAG5E,2HAA2H;AAC3H,eAAO,MAAM,kCAAkC,OAAO,CAAC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O,MAAM,aAAa;;;CAGhB,CAAC;AAEX,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,qBAAqB,QAAqB,CAAC;AAGxD;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAGX,eAAO,MAAM,6CAA6C,uCAAuC,CAAC;AAClG,eAAO,MAAM,sCAAsC,0BAA0B,CAAC;AAC9E,eAAO,MAAM,wCAAwC,4BAA4B,CAAC;AAGlF,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,cAAc,MAAM,CAAC;AAGlC,eAAO,MAAM,iCAAiC,mCAAoC,CAAC"}
package/dist/const.js CHANGED
@@ -28,7 +28,6 @@ export const SERVER_MODE_AUTO_DETECTION_ENABLED = true;
28
28
  export const SERVER_NAME = 'apify-mcp-server';
29
29
  export const SERVER_TITLE = 'Apify MCP Server';
30
30
  export const HELPER_TOOLS = {
31
- ACTOR_ADD: 'add-actor',
32
31
  ACTOR_CALL: 'call-actor',
33
32
  ACTOR_CALL_WIDGET: 'call-actor-widget',
34
33
  ACTOR_GET_DETAILS: 'fetch-actor-details',
@@ -52,6 +51,13 @@ export const HELPER_TOOLS = {
52
51
  DOCS_FETCH: 'fetch-apify-docs',
53
52
  PROBLEM_REPORT: 'report-problem',
54
53
  };
54
+ /**
55
+ * Retired tool selectors: `add-actor` and `experimental` (add-actor was deleted in the stateless
56
+ * migration) and the deprecated `preview` pseudo-category. They name neither a registry category
57
+ * nor a real tool anymore, so they resolve to nothing — never loaded, never treated as an Actor ID,
58
+ * never requiring a token by themselves.
59
+ */
60
+ export const RETIRED_SELECTOR_NAMES = new Set(['add-actor', 'experimental', 'preview']);
55
61
  /**
56
62
  * Client-name substrings (lowercased, matched against `clientInfo.name`) that `report-problem` is
57
63
  * hidden from. Applied once per connection in the compose step, where the client is known.
package/dist/const.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAK,CAAC;AAC7C,0HAA0H;AAC1H,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,kBAAkB;AAClB,6FAA6F;AAC7F,8FAA8F;AAC9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAK,CAAC;AAE7C,cAAc;AACd;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC;AAE7C,yGAAyG;AACzG,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAE5E,aAAa;AACb,2HAA2H;AAC3H,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEvD,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,qBAAqB;IACxC,wBAAwB,EAAE,4BAA4B;IACtD,gBAAgB,EAAE,iBAAiB;IACnC,cAAc,EAAE,eAAe;IAC/B,qBAAqB,EAAE,sBAAsB;IAC7C,cAAc,EAAE,eAAe;IAC/B,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAo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D_ERROR_KIND)[keyof typeof ACTOR_LOAD_ERROR_KIND];
20
20
  /**
21
21
  * Surfaced (not thrown) by `getActorsAsTools` in the `errors[]` field when an
22
- * Actor cannot be loaded for a *sanitized*, user-safe reason. Single-Actor
23
- * callers (`add-actor`, `call-actor`) read `errors[0]` and forward the
24
- * message to the agent; bulk callers ignore the array.
22
+ * Actor cannot be loaded for a *sanitized*, user-safe reason. The single-Actor
23
+ * caller (`call-actor`) reads `errors[0]` and forwards the message to the agent;
24
+ * bulk callers ignore the array.
25
25
  *
26
26
  * `message` is always safe to forward to the LLM agent / client verbatim.
27
27
  * Raw backend errors (network, 5xx, auth) are caught at the call site and
package/dist/errors.js CHANGED
@@ -38,9 +38,9 @@ export const ACTOR_LOAD_ERROR_KIND = {
38
38
  };
39
39
  /**
40
40
  * Surfaced (not thrown) by `getActorsAsTools` in the `errors[]` field when an
41
- * Actor cannot be loaded for a *sanitized*, user-safe reason. Single-Actor
42
- * callers (`add-actor`, `call-actor`) read `errors[0]` and forward the
43
- * message to the agent; bulk callers ignore the array.
41
+ * Actor cannot be loaded for a *sanitized*, user-safe reason. The single-Actor
42
+ * caller (`call-actor`) reads `errors[0]` and forwards the message to the agent;
43
+ * bulk callers ignore the array.
44
44
  *
45
45
  * `message` is always safe to forward to the LLM agent / client verbatim.
46
46
  * Raw backend errors (network, 5xx, auth) are caught at the call site and
@@ -5,21 +5,15 @@ import { resolvePaymentProvider } from './payments/index.js';
5
5
  import type { PaymentProvider } from './payments/types.js';
6
6
  import { getServerCard } from './server_card.js';
7
7
  import { actorNameToToolName } from './tools/actor_tool_naming.js';
8
- import { addActor } from './tools/actors/add_actor.js';
9
8
  import { getCategoryTools, getDefaultTools, getUnauthEnabledToolCategories, unauthEnabledTools } from './tools/index.js';
10
9
  import type { ActorStore, ToolCategory } from './types.js';
11
10
  import { parseQueryParamList } from './utils/generic.js';
12
11
  import { getExpectedToolNamesByCategories } from './utils/tool_categories_helpers.js';
13
12
  import { getToolPublicFieldOnly } from './utils/tools.js';
14
13
  import { TTLLRUCache } from './utils/ttl_lru.js';
15
- export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools,
16
- /**
17
- * @deprecated Backward-compat alias for the `addActor` tool entry. Kept for the apify-mcp-server-internal migration; remove once it no longer imports `addTool`.
18
- */
19
- addActor as addTool, getCategoryTools, type ActorStore, type ToolCategory, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, type PaymentProvider, };
14
+ export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools, getCategoryTools, type ActorStore, type ToolCategory, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, type PaymentProvider, };
20
15
  /** @deprecated Use HELPER_TOOLS / HelperToolName. Kept for backward compatibility with apify-mcp-server-internal. */
21
16
  export declare const HelperTools: {
22
- readonly ACTOR_ADD: "add-actor";
23
17
  readonly ACTOR_CALL: "call-actor";
24
18
  readonly ACTOR_CALL_WIDGET: "call-actor-widget";
25
19
  readonly ACTOR_GET_DETAILS: "fetch-actor-details";
@@ -1 +1 @@
1
- {"version":3,"file":"index_internals.d.ts","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAgB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE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CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACH,WAAW,EACX,gCAAgC,EAChC,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,eAAe,GACvB,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;CAAe,CAAC;AACxC,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC"}
@@ -7,17 +7,12 @@ import { processParamsGetTools } from './mcp/utils.js';
7
7
  import { resolvePaymentProvider } from './payments/index.js';
8
8
  import { getServerCard } from './server_card.js';
9
9
  import { actorNameToToolName } from './tools/actor_tool_naming.js';
10
- import { addActor } from './tools/actors/add_actor.js';
11
10
  import { getCategoryTools, getDefaultTools, getUnauthEnabledToolCategories, unauthEnabledTools, } from './tools/index.js';
12
11
  import { parseQueryParamList } from './utils/generic.js';
13
12
  import { getExpectedToolNamesByCategories } from './utils/tool_categories_helpers.js';
14
13
  import { getToolPublicFieldOnly } from './utils/tools.js';
15
14
  import { TTLLRUCache } from './utils/ttl_lru.js';
16
- export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools,
17
- /**
18
- * @deprecated Backward-compat alias for the `addActor` tool entry. Kept for the apify-mcp-server-internal migration; remove once it no longer imports `addTool`.
19
- */
20
- addActor as addTool, getCategoryTools, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, };
15
+ export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools, getCategoryTools, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, };
21
16
  /** @deprecated Use HELPER_TOOLS / HelperToolName. Kept for backward compatibility with apify-mcp-server-internal. */
22
17
  export const HelperTools = HELPER_TOOLS;
23
18
  //# sourceMappingURL=index_internals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index_internals.js","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAAA;;EAEE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAA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ChC,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAGhB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GAEzB,CAAC;AAEF,qHAAqH;AACrH,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
package/dist/input.d.ts CHANGED
@@ -5,7 +5,6 @@ export declare function normalizeList(value: string | unknown[] | undefined): st
5
5
  *
6
6
  * Responsibilities:
7
7
  * - Coerce `actors`, `tools` from string/array into trimmed arrays ('' → []).
8
- * - Normalize booleans (including legacy `enableActorAutoLoading`).
9
8
  * - Merge `actors` into `tools` so selection lives in one place.
10
9
  *
11
10
  * Semantics passed to the loader:
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAgB,MAAM,YAAY,CAAC;AAGtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CASzF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAqCjE"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAgB,MAAM,YAAY,CAAC;AAGtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CASzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CA2BjE"}
package/dist/input.js CHANGED
@@ -1,12 +1,3 @@
1
- /*
2
- * Actor input processing.
3
- *
4
- * Normalizes raw inputs (CLI/env/HTTP) into a consistent `Input` shape.
5
- * No tool-loading is done here; we only canonicalize values and preserve
6
- * intent via `undefined` (use defaults later) vs empty (explicitly none).
7
- */
8
- import log from '@apify/log';
9
- import { parseBooleanOrNull } from '@apify/utilities';
10
1
  // Normalize lists from comma-separated strings or arrays.
11
2
  export function normalizeList(value) {
12
3
  if (value === undefined)
@@ -26,25 +17,14 @@ export function normalizeList(value) {
26
17
  *
27
18
  * Responsibilities:
28
19
  * - Coerce `actors`, `tools` from string/array into trimmed arrays ('' → []).
29
- * - Normalize booleans (including legacy `enableActorAutoLoading`).
30
20
  * - Merge `actors` into `tools` so selection lives in one place.
31
21
  *
32
22
  * Semantics passed to the loader:
33
23
  * - `undefined` → use defaults; `[]` → explicitly none.
34
24
  */
35
25
  export function processInput(originalInput) {
36
- var _a, _b;
37
26
  // Normalize actors (strings and arrays) to a clean array or undefined
38
27
  const actors = normalizeList(originalInput.actors);
39
- // Map deprecated flag to the new one and normalize both to boolean.
40
- let enableAddingActors;
41
- if (originalInput.enableAddingActors === undefined && originalInput.enableActorAutoLoading !== undefined) {
42
- log.warning('enableActorAutoLoading is deprecated, use enableAddingActors instead');
43
- enableAddingActors = (_a = parseBooleanOrNull(originalInput.enableActorAutoLoading)) !== null && _a !== void 0 ? _a : false;
44
- }
45
- else {
46
- enableAddingActors = (_b = parseBooleanOrNull(originalInput.enableAddingActors)) !== null && _b !== void 0 ? _b : false;
47
- }
48
28
  // Normalize tools (strings/arrays) to a clean array or undefined
49
29
  let tools = normalizeList(originalInput.tools);
50
30
  // Merge actors into tools. If tools undefined → tools = actors, then remove actors;
@@ -63,7 +43,6 @@ export function processInput(originalInput) {
63
43
  return {
64
44
  ...originalInput,
65
45
  actors: Array.isArray(actors) && actors.length > 0 && tools !== undefined ? undefined : actors,
66
- enableAddingActors,
67
46
  tools,
68
47
  };
69
48
  }
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRo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MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;QAC9F,KAAK;KACR,CAAC;AACN,CAAC"}
@@ -5,7 +5,6 @@ import type { TaskStore } from '@modelcontextprotocol/sdk/experimental/tasks/int
5
5
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
6
6
  import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
7
7
  import { ApifyClient } from '../apify_client.js';
8
- import type { ActorsAsToolsResult } from '../tools/index.js';
9
8
  import type { ActorsMcpServerOptions, ActorStore, Input, TelemetryEnv, ToolEntry } from '../types.js';
10
9
  import { SERVER_MODE } from '../types.js';
11
10
  /**
@@ -14,7 +13,6 @@ import { SERVER_MODE } from '../types.js';
14
13
  export declare class ActorsMcpServer {
15
14
  readonly server: Server;
16
15
  readonly tools: Map<string, ToolEntry>;
17
- private toolsChangedHandler;
18
16
  private sigintHandler;
19
17
  private currentLogLevel;
20
18
  readonly options: ActorsMcpServerOptions;
@@ -77,8 +75,7 @@ export declare class ActorsMcpServer {
77
75
  * gated here by servability. Every other tool composes eagerly, so a recovery/rehydration load
78
76
  * without an initialize still restores them. report-problem is withheld until the client is known
79
77
  * and re-added by the initialize flush. Used by every input-driven load path and the flush.
80
- * (loadActorsAsTools upserts actor tools directly; actor tools are never gated, so they need no
81
- * filtering.)
78
+ * (Actor tools are never gated, so they need no filtering.)
82
79
  */
83
80
  private composeToolsForClient;
84
81
  /**
@@ -96,20 +93,6 @@ export declare class ActorsMcpServer {
96
93
  * Returns an array of tool names.
97
94
  */
98
95
  listToolNames(): string[];
99
- /**
100
- * Register handler to get notified when tools change.
101
- * The handler receives an array of tool names that the server has after the change.
102
- * This is primarily used to store the tools in shared state (e.g., Redis) for recovery
103
- * when the server loses local state.
104
- * @throws {Error} - If a handler is already registered.
105
- * @param handler - The handler function to be called when tools change.
106
- */
107
- registerToolsChangedHandler(handler: (toolNames: string[]) => void): void;
108
- /**
109
- * Unregister the handler for tools changed event.
110
- * @throws {Error} - If no handler is currently registered.
111
- */
112
- unregisterToolsChangedHandler(): void;
113
96
  /**
114
97
  * Returns the list of all internal tool names (e.g., 'call-actor', 'search-actors').
115
98
  */
@@ -130,14 +113,10 @@ export declare class ActorsMcpServer {
130
113
  /**
131
114
  * Buffer-or-compose gate shared by the actor-tools loaders. If the server mode isn't resolved
132
115
  * yet ('auto' before initialize), queue the whole source for `composePendingToolsForClient` and
133
- * (if non-empty) upsert the mode-agnostic actor tools immediately with the given `shouldNotify`.
116
+ * (if non-empty) upsert the mode-agnostic actor tools immediately.
134
117
  * Once the mode is resolved, compose the client-specific set via `composeToolsForClient` (which
135
118
  * withholds report-problem until the client is known) and upsert it; if the client still isn't
136
119
  * known, queue the source so the initialize flush re-composes and adds the client-gated tools.
137
- *
138
- * Callers pass different `shouldNotify` values: `loadToolsByName` forwards `actorTools.length > 0`
139
- * (notify only when actor tools were fetched), while `loadToolsFromUrl` and `loadToolsFromInput`
140
- * pass `false` and defer to the post-initialize reconcile. See `composePendingToolsForClient`.
141
120
  */
142
121
  private registerFetchedActorTools;
143
122
  /**
@@ -145,13 +124,6 @@ export declare class ActorsMcpServer {
145
124
  * Skips toolNames that are already loaded and loads only the missing ones.
146
125
  */
147
126
  loadToolsByName(toolNames: string[], apifyClient: ApifyClient): Promise<void>;
148
- /**
149
- * Load Actors as tools, upsert successes into the server, and return both the tool
150
- * entries and any per-name {@link ActorLoadError}s. Bulk callers read `tools`; the
151
- * `add-actor` tool reads `errors[0]` to forward a precise reason to the agent
152
- * (not-found / load-failed / standby-payment-not-supported).
153
- */
154
- loadActorsAsTools(actorIdsOrNames: string[], apifyClient: ApifyClient): Promise<ActorsAsToolsResult>;
155
127
  /** Load tools from URL params. Used by SSE and HTTP entry points. */
156
128
  loadToolsFromUrl(url: string, apifyClient: ApifyClient): Promise<void>;
157
129
  /**
@@ -165,17 +137,14 @@ export declare class ActorsMcpServer {
165
137
  * work. See #721.
166
138
  */
167
139
  loadToolsFromInput(input: Input, apifyClient: ApifyClient): Promise<void>;
168
- /** Delete tools from the server and notify the handler.
169
- */
170
- removeToolsByName(toolNames: string[], shouldNotifyToolsChangedHandler?: boolean): string[];
140
+ /** Delete tools from the server. */
141
+ removeToolsByName(toolNames: string[]): string[];
171
142
  /**
172
143
  * Upsert new tools.
173
144
  * @param tools - Array of tool wrappers to add or update
174
- * @param shouldNotifyToolsChangedHandler - Whether to notify the tools changed handler
175
145
  * @returns Array of added/updated tool wrappers
176
146
  */
177
- upsertTools(tools: ToolEntry[], shouldNotifyToolsChangedHandler?: boolean): ToolEntry[];
178
- private notifyToolsChangedHandler;
147
+ upsertTools(tools: ToolEntry[]): ToolEntry[];
179
148
  private removeToolByName;
180
149
  private setupErrorHandling;
181
150
  private setupLoggingProxy;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAyB/E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAiBjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EACR,sBAAsB,EACtB,UAAU,EAGV,KAAK,EAEL,YAAY,EACZ,SAAS,EAEZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAkCrD;;GAEG;AACH,qBAAa,eAAe;IACxB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CA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,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAe/B"}
@@ -16,7 +16,6 @@ import { resolveAvailableWidgets } from '../resources/widgets.js';
16
16
  import { getServerInfo } from '../server_card.js';
17
17
  import { getTelemetryEnv } from '../telemetry.js';
18
18
  import { withReportProblemNudge } from '../tools/dev/report_problem.js';
19
- import { getActorsAsTools } from '../tools/index.js';
20
19
  import { SERVER_MODE, TOOL_TYPE } from '../types.js';
21
20
  import { isMcpClientFaultMessage, sanitizeMezmoMessage } from '../utils/logging.js';
22
21
  import { getRequestOriginForClient, isReportProblemBlockedForClient } from '../utils/mcp_clients.js';
@@ -61,12 +60,6 @@ export class ActorsMcpServer {
61
60
  writable: true,
62
61
  value: void 0
63
62
  });
64
- Object.defineProperty(this, "toolsChangedHandler", {
65
- enumerable: true,
66
- configurable: true,
67
- writable: true,
68
- value: void 0
69
- });
70
63
  Object.defineProperty(this, "sigintHandler", {
71
64
  enumerable: true,
72
65
  configurable: true,
@@ -319,11 +312,10 @@ export class ActorsMcpServer {
319
312
  * gated here by servability. Every other tool composes eagerly, so a recovery/rehydration load
320
313
  * without an initialize still restores them. report-problem is withheld until the client is known
321
314
  * and re-added by the initialize flush. Used by every input-driven load path and the flush.
322
- * (loadActorsAsTools upserts actor tools directly; actor tools are never gated, so they need no
323
- * filtering.)
315
+ * (Actor tools are never gated, so they need no filtering.)
324
316
  */
325
- composeToolsForClient(input, actorTools, isSessionRestore = false) {
326
- const tools = getToolsForServerMode(input, actorTools, this.serverMode, isSessionRestore);
317
+ composeToolsForClient(input, actorTools) {
318
+ const tools = getToolsForServerMode(input, actorTools, this.serverMode);
327
319
  if (this.isReportProblemServable())
328
320
  return tools;
329
321
  return tools.filter((tool) => tool.name !== HELPER_TOOLS.PROBLEM_REPORT);
@@ -343,14 +335,13 @@ export class ActorsMcpServer {
343
335
  composePendingToolsForClient() {
344
336
  if (this.pendingToolsUntilClientKnown.length === 0)
345
337
  return;
346
- const tools = this.pendingToolsUntilClientKnown.flatMap(({ input, actorTools, isSessionRestore }) => this.composeToolsForClient(input, actorTools, isSessionRestore));
338
+ const tools = this.pendingToolsUntilClientKnown.flatMap(({ input, actorTools }) => this.composeToolsForClient(input, actorTools));
347
339
  this.pendingToolsUntilClientKnown = [];
348
- // Notify after the flush so shared-state handlers (e.g. Redis recovery) see the final tool
349
- // set. Load paths already upserted the client-agnostic tools pre-init; re-upserting is
340
+ // Load paths already upserted the client-agnostic tools pre-init; re-upserting is
350
341
  // idempotent, and this pass adds the client-gated tools (e.g. report-problem) now that the
351
- // client is known, reconciling shared state to the complete set.
342
+ // client is known.
352
343
  if (tools.length > 0)
353
- this.upsertTools(tools, true);
344
+ this.upsertTools(tools);
354
345
  }
355
346
  /**
356
347
  * Returns an array of tool names.
@@ -358,30 +349,6 @@ export class ActorsMcpServer {
358
349
  listToolNames() {
359
350
  return Array.from(this.tools.keys());
360
351
  }
361
- /**
362
- * Register handler to get notified when tools change.
363
- * The handler receives an array of tool names that the server has after the change.
364
- * This is primarily used to store the tools in shared state (e.g., Redis) for recovery
365
- * when the server loses local state.
366
- * @throws {Error} - If a handler is already registered.
367
- * @param handler - The handler function to be called when tools change.
368
- */
369
- registerToolsChangedHandler(handler) {
370
- if (this.toolsChangedHandler) {
371
- throw new Error('Tools changed handler is already registered.');
372
- }
373
- this.toolsChangedHandler = handler;
374
- }
375
- /**
376
- * Unregister the handler for tools changed event.
377
- * @throws {Error} - If no handler is currently registered.
378
- */
379
- unregisterToolsChangedHandler() {
380
- if (!this.toolsChangedHandler) {
381
- throw new Error('Tools changed handler is not registered.');
382
- }
383
- this.toolsChangedHandler = undefined;
384
- }
385
352
  /**
386
353
  * Returns the list of all internal tool names (e.g., 'call-actor', 'search-actors').
387
354
  */
@@ -417,27 +384,23 @@ export class ActorsMcpServer {
417
384
  /**
418
385
  * Buffer-or-compose gate shared by the actor-tools loaders. If the server mode isn't resolved
419
386
  * yet ('auto' before initialize), queue the whole source for `composePendingToolsForClient` and
420
- * (if non-empty) upsert the mode-agnostic actor tools immediately with the given `shouldNotify`.
387
+ * (if non-empty) upsert the mode-agnostic actor tools immediately.
421
388
  * Once the mode is resolved, compose the client-specific set via `composeToolsForClient` (which
422
389
  * withholds report-problem until the client is known) and upsert it; if the client still isn't
423
390
  * known, queue the source so the initialize flush re-composes and adds the client-gated tools.
424
- *
425
- * Callers pass different `shouldNotify` values: `loadToolsByName` forwards `actorTools.length > 0`
426
- * (notify only when actor tools were fetched), while `loadToolsFromUrl` and `loadToolsFromInput`
427
- * pass `false` and defer to the post-initialize reconcile. See `composePendingToolsForClient`.
428
391
  */
429
- registerFetchedActorTools(input, actorTools, shouldNotify, isSessionRestore = false) {
392
+ registerFetchedActorTools(input, actorTools) {
430
393
  if (!this.serverModeResolved) {
431
- this.pendingToolsUntilClientKnown.push({ input, actorTools, isSessionRestore });
394
+ this.pendingToolsUntilClientKnown.push({ input, actorTools });
432
395
  if (actorTools.length > 0)
433
- this.upsertTools(actorTools, shouldNotify);
396
+ this.upsertTools(actorTools);
434
397
  return;
435
398
  }
436
- const tools = this.composeToolsForClient(input, actorTools, isSessionRestore);
399
+ const tools = this.composeToolsForClient(input, actorTools);
437
400
  if (tools.length > 0)
438
- this.upsertTools(tools, shouldNotify);
401
+ this.upsertTools(tools);
439
402
  if (!this.clientKnown)
440
- this.pendingToolsUntilClientKnown.push({ input, actorTools, isSessionRestore });
403
+ this.pendingToolsUntilClientKnown.push({ input, actorTools });
441
404
  }
442
405
  /**
443
406
  * Loads missing toolNames from a provided list of tool names.
@@ -453,28 +416,7 @@ export class ActorsMcpServer {
453
416
  actorStore: this.actorStore,
454
417
  paymentProvider: this.options.paymentProvider,
455
418
  });
456
- // isSessionRestore: true. This replays the tool names a session already had (stored via
457
- // listAllToolNames), so the add-actor cutoff must NOT rewrite them — a stored 'add-actor'
458
- // resolves to itself. The live paths (loadToolsFromInput/loadToolsFromUrl, flag omitted)
459
- // instead substitute call-actor for a fresh selection. Both the flag and this exception go
460
- // away in PR 2, when add-actor is deleted and there is nothing left to preserve.
461
- this.registerFetchedActorTools(restoreInput, actorTools, actorTools.length > 0, true);
462
- }
463
- /**
464
- * Load Actors as tools, upsert successes into the server, and return both the tool
465
- * entries and any per-name {@link ActorLoadError}s. Bulk callers read `tools`; the
466
- * `add-actor` tool reads `errors[0]` to forward a precise reason to the agent
467
- * (not-found / load-failed / standby-payment-not-supported).
468
- */
469
- async loadActorsAsTools(actorIdsOrNames, apifyClient) {
470
- const result = await getActorsAsTools(actorIdsOrNames, apifyClient, {
471
- actorStore: this.actorStore,
472
- paymentProvider: this.options.paymentProvider,
473
- });
474
- if (result.tools.length > 0) {
475
- this.upsertTools(result.tools, true);
476
- }
477
- return result;
419
+ this.registerFetchedActorTools(restoreInput, actorTools);
478
420
  }
479
421
  /** Load tools from URL params. Used by SSE and HTTP entry points. */
480
422
  async loadToolsFromUrl(url, apifyClient) {
@@ -484,7 +426,7 @@ export class ActorsMcpServer {
484
426
  paymentProvider: this.options.paymentProvider,
485
427
  });
486
428
  log.debug('Loading tools from query parameters');
487
- this.registerFetchedActorTools(input, actorTools, false);
429
+ this.registerFetchedActorTools(input, actorTools);
488
430
  }
489
431
  /**
490
432
  * Two-phase: getActors (async, client-agnostic Apify fetch) then composeToolsForClient
@@ -501,30 +443,24 @@ export class ActorsMcpServer {
501
443
  actorStore: this.actorStore,
502
444
  paymentProvider: this.options.paymentProvider,
503
445
  });
504
- this.registerFetchedActorTools(input, actorTools, false);
446
+ this.registerFetchedActorTools(input, actorTools);
505
447
  }
506
- /** Delete tools from the server and notify the handler.
507
- */
508
- removeToolsByName(toolNames, shouldNotifyToolsChangedHandler = false) {
448
+ /** Delete tools from the server. */
449
+ removeToolsByName(toolNames) {
509
450
  const removedTools = [];
510
451
  for (const toolName of toolNames) {
511
452
  if (this.removeToolByName(toolName)) {
512
453
  removedTools.push(toolName);
513
454
  }
514
455
  }
515
- if (removedTools.length > 0) {
516
- if (shouldNotifyToolsChangedHandler)
517
- this.notifyToolsChangedHandler();
518
- }
519
456
  return removedTools;
520
457
  }
521
458
  /**
522
459
  * Upsert new tools.
523
460
  * @param tools - Array of tool wrappers to add or update
524
- * @param shouldNotifyToolsChangedHandler - Whether to notify the tools changed handler
525
461
  * @returns Array of added/updated tool wrappers
526
462
  */
527
- upsertTools(tools, shouldNotifyToolsChangedHandler = false) {
463
+ upsertTools(tools) {
528
464
  // Client gating (e.g. hiding report-problem from Anthropic surfaces) is applied earlier, in
529
465
  // composeToolsForClient — the single compose choke point where the client is known. Do not
530
466
  // filter here: this is a low-level commit point reached before the client is known too.
@@ -532,15 +468,8 @@ export class ActorsMcpServer {
532
468
  const stored = this.options.paymentProvider ? this.options.paymentProvider.decorateToolSchema(tool) : tool;
533
469
  this.tools.set(stored.name, stored);
534
470
  }
535
- if (shouldNotifyToolsChangedHandler)
536
- this.notifyToolsChangedHandler();
537
471
  return tools;
538
472
  }
539
- notifyToolsChangedHandler() {
540
- if (!this.toolsChangedHandler)
541
- return;
542
- this.toolsChangedHandler(this.listAllToolNames());
543
- }
544
473
  removeToolByName(toolName) {
545
474
  if (this.tools.has(toolName)) {
546
475
  this.tools.delete(toolName);
@@ -1033,9 +962,6 @@ export class ActorsMcpServer {
1033
962
  }
1034
963
  }
1035
964
  this.tools.clear();
1036
- if (this.toolsChangedHandler) {
1037
- this.unregisterToolsChangedHandler();
1038
- }
1039
965
  // Closing the server also removes its event handlers.
1040
966
  await this.server.close();
1041
967
  }