@apify/actors-mcp-server 0.9.2 → 0.9.3-beta.0
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 +2 -2
- package/dist/actor/const.js +1 -4
- package/dist/actor/const.js.map +1 -1
- package/dist/actor/server.d.ts.map +1 -1
- package/dist/actor/server.js +11 -15
- package/dist/actor/server.js.map +1 -1
- package/dist/actor/types.js +1 -4
- package/dist/actor/types.js.map +1 -1
- package/dist/actor/utils.js +1 -4
- package/dist/actor/utils.js.map +1 -1
- package/dist/{apify-client.d.ts → apify_client.d.ts} +1 -1
- package/dist/{apify-client.d.ts.map → apify_client.d.ts.map} +1 -1
- package/dist/{apify-client.js → apify_client.js} +1 -4
- package/dist/apify_client.js.map +1 -0
- package/dist/const.d.ts +1 -1
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +4 -7
- package/dist/const.js.map +1 -1
- package/dist/errors.js +1 -4
- package/dist/errors.js.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/index_internals.d.ts +16 -0
- package/dist/index_internals.d.ts.map +1 -0
- package/dist/index_internals.js +18 -0
- package/dist/index_internals.js.map +1 -0
- package/dist/input.js +1 -4
- package/dist/input.js.map +1 -1
- package/dist/instrument.js +1 -4
- package/dist/instrument.js.map +1 -1
- package/dist/main.js +2 -5
- package/dist/main.js.map +1 -1
- package/dist/mcp/actors.js +2 -5
- package/dist/mcp/actors.js.map +1 -1
- package/dist/mcp/client.js +1 -4
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/const.js +1 -4
- package/dist/mcp/const.js.map +1 -1
- package/dist/mcp/proxy.js +1 -4
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/server.d.ts +6 -2
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +72 -91
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/utils.d.ts +4 -3
- package/dist/mcp/utils.d.ts.map +1 -1
- package/dist/mcp/utils.js +6 -8
- package/dist/mcp/utils.js.map +1 -1
- package/dist/prompts/index.js +2 -5
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/{latest-news-on-topic.d.ts → latest_news_on_topic.d.ts} +1 -1
- package/dist/prompts/latest_news_on_topic.d.ts.map +1 -0
- package/dist/prompts/{latest-news-on-topic.js → latest_news_on_topic.js} +1 -4
- package/dist/prompts/latest_news_on_topic.js.map +1 -0
- package/dist/resources/resource_service.d.ts +2 -2
- package/dist/resources/resource_service.d.ts.map +1 -1
- package/dist/resources/resource_service.js +4 -7
- package/dist/resources/resource_service.js.map +1 -1
- package/dist/resources/widgets.js +1 -4
- package/dist/resources/widgets.js.map +1 -1
- package/dist/server_card.js +1 -4
- package/dist/server_card.js.map +1 -1
- package/dist/state.d.ts +1 -1
- package/dist/state.js +2 -5
- package/dist/state.js.map +1 -1
- package/dist/stdio.js +5 -7
- package/dist/stdio.js.map +1 -1
- package/dist/telemetry.js +1 -4
- package/dist/telemetry.js.map +1 -1
- package/dist/tools/build.d.ts +1 -1
- package/dist/tools/build.js +1 -4
- package/dist/tools/build.js.map +1 -1
- package/dist/tools/categories.d.ts +49 -9
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +86 -26
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/common/abort_actor_run.d.ts +6 -0
- package/dist/tools/common/abort_actor_run.d.ts.map +1 -0
- package/dist/tools/common/abort_actor_run.js +48 -0
- package/dist/tools/common/abort_actor_run.js.map +1 -0
- package/dist/tools/{helpers.d.ts → common/add_actor.d.ts} +2 -2
- package/dist/tools/common/add_actor.d.ts.map +1 -0
- package/dist/tools/{helpers.js → common/add_actor.js} +7 -10
- package/dist/tools/common/add_actor.js.map +1 -0
- package/dist/tools/{dataset_collection.d.ts → common/dataset_collection.d.ts} +1 -1
- package/dist/tools/common/dataset_collection.d.ts.map +1 -0
- package/dist/tools/{dataset_collection.js → common/dataset_collection.js} +6 -9
- package/dist/tools/common/dataset_collection.js.map +1 -0
- package/dist/tools/common/fetch_apify_docs.d.ts +3 -0
- package/dist/tools/common/fetch_apify_docs.d.ts.map +1 -0
- package/dist/tools/{fetch-apify-docs.js → common/fetch_apify_docs.js} +10 -13
- package/dist/tools/common/fetch_apify_docs.js.map +1 -0
- package/dist/tools/{get-actor-output.d.ts → common/get_actor_output.d.ts} +2 -2
- package/dist/tools/common/get_actor_output.d.ts.map +1 -0
- package/dist/tools/{get-actor-output.js → common/get_actor_output.js} +9 -12
- package/dist/tools/common/get_actor_output.js.map +1 -0
- package/dist/tools/common/get_actor_run_log.d.ts +7 -0
- package/dist/tools/common/get_actor_run_log.d.ts.map +1 -0
- package/dist/tools/common/get_actor_run_log.js +52 -0
- package/dist/tools/common/get_actor_run_log.js.map +1 -0
- package/dist/tools/common/get_dataset.d.ts +6 -0
- package/dist/tools/common/get_dataset.d.ts.map +1 -0
- package/dist/tools/common/get_dataset.js +55 -0
- package/dist/tools/common/get_dataset.js.map +1 -0
- package/dist/tools/common/get_dataset_items.d.ts +6 -0
- package/dist/tools/common/get_dataset_items.d.ts.map +1 -0
- package/dist/tools/common/get_dataset_items.js +98 -0
- package/dist/tools/common/get_dataset_items.js.map +1 -0
- package/dist/tools/common/get_dataset_schema.d.ts +6 -0
- package/dist/tools/common/get_dataset_schema.d.ts.map +1 -0
- package/dist/tools/common/get_dataset_schema.js +91 -0
- package/dist/tools/common/get_dataset_schema.js.map +1 -0
- package/dist/tools/common/get_html_skeleton.d.ts +3 -0
- package/dist/tools/common/get_html_skeleton.d.ts.map +1 -0
- package/dist/tools/{get-html-skeleton.js → common/get_html_skeleton.js} +10 -13
- package/dist/tools/common/get_html_skeleton.js.map +1 -0
- package/dist/tools/common/get_key_value_store.d.ts +6 -0
- package/dist/tools/common/get_key_value_store.d.ts.map +1 -0
- package/dist/tools/common/get_key_value_store.js +45 -0
- package/dist/tools/common/get_key_value_store.js.map +1 -0
- package/dist/tools/common/get_key_value_store_keys.d.ts +6 -0
- package/dist/tools/common/get_key_value_store_keys.d.ts.map +1 -0
- package/dist/tools/common/get_key_value_store_keys.js +56 -0
- package/dist/tools/common/get_key_value_store_keys.js.map +1 -0
- package/dist/tools/common/get_key_value_store_record.d.ts +6 -0
- package/dist/tools/common/get_key_value_store_record.d.ts.map +1 -0
- package/dist/tools/common/get_key_value_store_record.js +48 -0
- package/dist/tools/common/get_key_value_store_record.js.map +1 -0
- package/dist/tools/{key_value_store_collection.d.ts → common/key_value_store_collection.d.ts} +1 -1
- package/dist/tools/common/key_value_store_collection.d.ts.map +1 -0
- package/dist/tools/{key_value_store_collection.js → common/key_value_store_collection.js} +6 -9
- package/dist/tools/common/key_value_store_collection.js.map +1 -0
- package/dist/tools/{run_collection.d.ts → common/run_collection.d.ts} +1 -1
- package/dist/tools/common/run_collection.d.ts.map +1 -0
- package/dist/tools/{run_collection.js → common/run_collection.js} +7 -10
- package/dist/tools/common/run_collection.js.map +1 -0
- package/dist/tools/common/search_apify_docs.d.ts +3 -0
- package/dist/tools/common/search_apify_docs.d.ts.map +1 -0
- package/dist/tools/{search-apify-docs.js → common/search_apify_docs.js} +8 -11
- package/dist/tools/common/search_apify_docs.js.map +1 -0
- package/dist/tools/core/actor_execution.d.ts +40 -0
- package/dist/tools/core/actor_execution.d.ts.map +1 -0
- package/dist/tools/core/actor_execution.js +87 -0
- package/dist/tools/core/actor_execution.js.map +1 -0
- package/dist/{utils/actor-response.d.ts → tools/core/actor_response.d.ts} +3 -3
- package/dist/tools/core/actor_response.d.ts.map +1 -0
- package/dist/{utils/actor-response.js → tools/core/actor_response.js} +1 -4
- package/dist/tools/core/actor_response.js.map +1 -0
- package/dist/tools/core/actor_tools_factory.d.ts +37 -0
- package/dist/tools/core/actor_tools_factory.d.ts.map +1 -0
- package/dist/tools/core/actor_tools_factory.js +218 -0
- package/dist/tools/core/actor_tools_factory.js.map +1 -0
- package/dist/tools/core/call_actor_common.d.ts +95 -0
- package/dist/tools/core/call_actor_common.d.ts.map +1 -0
- package/dist/tools/core/call_actor_common.js +227 -0
- package/dist/tools/core/call_actor_common.js.map +1 -0
- package/dist/tools/core/fetch_actor_details_common.d.ts +25 -0
- package/dist/tools/core/fetch_actor_details_common.d.ts.map +1 -0
- package/dist/tools/core/fetch_actor_details_common.js +54 -0
- package/dist/tools/core/fetch_actor_details_common.js.map +1 -0
- package/dist/tools/core/get_actor_run_common.d.ts +54 -0
- package/dist/tools/core/get_actor_run_common.d.ts.map +1 -0
- package/dist/tools/core/get_actor_run_common.js +111 -0
- package/dist/tools/core/get_actor_run_common.js.map +1 -0
- package/dist/tools/core/search_actors_common.d.ts +17 -0
- package/dist/tools/core/search_actors_common.d.ts.map +1 -0
- package/dist/tools/core/search_actors_common.js +103 -0
- package/dist/tools/core/search_actors_common.js.map +1 -0
- package/dist/tools/default/actor_executor.d.ts +7 -0
- package/dist/tools/default/actor_executor.d.ts.map +1 -0
- package/dist/tools/default/actor_executor.js +31 -0
- package/dist/tools/default/actor_executor.js.map +1 -0
- package/dist/tools/default/call_actor.d.ts +8 -0
- package/dist/tools/default/call_actor.d.ts.map +1 -0
- package/dist/tools/default/call_actor.js +132 -0
- package/dist/tools/default/call_actor.js.map +1 -0
- package/dist/tools/default/fetch_actor_details.d.ts +7 -0
- package/dist/tools/default/fetch_actor_details.d.ts.map +1 -0
- package/dist/tools/default/fetch_actor_details.js +42 -0
- package/dist/tools/default/fetch_actor_details.js.map +1 -0
- package/dist/tools/default/get_actor_run.d.ts +7 -0
- package/dist/tools/default/get_actor_run.d.ts.map +1 -0
- package/dist/tools/default/get_actor_run.js +46 -0
- package/dist/tools/default/get_actor_run.js.map +1 -0
- package/dist/tools/default/search_actors.d.ts +7 -0
- package/dist/tools/default/search_actors.d.ts.map +1 -0
- package/dist/tools/default/search_actors.js +62 -0
- package/dist/tools/default/search_actors.js.map +1 -0
- package/dist/tools/index.d.ts +11 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +17 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/openai/actor_executor.d.ts +8 -0
- package/dist/tools/openai/actor_executor.d.ts.map +1 -0
- package/dist/tools/openai/actor_executor.js +49 -0
- package/dist/tools/openai/actor_executor.js.map +1 -0
- package/dist/tools/openai/call_actor.d.ts +8 -0
- package/dist/tools/openai/call_actor.d.ts.map +1 -0
- package/dist/tools/openai/call_actor.js +117 -0
- package/dist/tools/openai/call_actor.js.map +1 -0
- package/dist/tools/openai/fetch_actor_details.d.ts +7 -0
- package/dist/tools/openai/fetch_actor_details.d.ts.map +1 -0
- package/dist/tools/openai/fetch_actor_details.js +47 -0
- package/dist/tools/openai/fetch_actor_details.js.map +1 -0
- package/dist/tools/openai/fetch_actor_details_internal.d.ts +3 -0
- package/dist/tools/openai/fetch_actor_details_internal.d.ts.map +1 -0
- package/dist/tools/{fetch-actor-details-internal.js → openai/fetch_actor_details_internal.js} +9 -13
- package/dist/tools/openai/fetch_actor_details_internal.js.map +1 -0
- package/dist/tools/openai/get_actor_run.d.ts +7 -0
- package/dist/tools/openai/get_actor_run.d.ts.map +1 -0
- package/dist/tools/openai/get_actor_run.js +53 -0
- package/dist/tools/openai/get_actor_run.js.map +1 -0
- package/dist/tools/openai/search_actors.d.ts +7 -0
- package/dist/tools/openai/search_actors.d.ts.map +1 -0
- package/dist/tools/openai/search_actors.js +76 -0
- package/dist/tools/openai/search_actors.js.map +1 -0
- package/dist/tools/openai/search_actors_internal.d.ts +3 -0
- package/dist/tools/openai/search_actors_internal.d.ts.map +1 -0
- package/dist/tools/{search-actors-internal.js → openai/search_actors_internal.js} +10 -14
- package/dist/tools/openai/search_actors_internal.js.map +1 -0
- package/dist/tools/{structured-output-schemas.d.ts → structured_output_schemas.d.ts} +1 -1
- package/dist/tools/{structured-output-schemas.d.ts.map → structured_output_schemas.d.ts.map} +1 -1
- package/dist/tools/{structured-output-schemas.js → structured_output_schemas.js} +1 -4
- package/dist/tools/structured_output_schemas.js.map +1 -0
- package/dist/tools/utils.js +2 -5
- package/dist/tools/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +76 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -5
- package/dist/types.js.map +1 -1
- package/dist/utils/actor.d.ts +1 -1
- package/dist/utils/actor.js +1 -4
- package/dist/utils/actor.js.map +1 -1
- package/dist/utils/{actor-card.d.ts → actor_card.d.ts} +2 -2
- package/dist/utils/{actor-card.d.ts.map → actor_card.d.ts.map} +1 -1
- package/dist/utils/{actor-card.js → actor_card.js} +2 -5
- package/dist/utils/actor_card.js.map +1 -0
- package/dist/utils/{actor-details.d.ts → actor_details.d.ts} +3 -3
- package/dist/utils/{actor-details.d.ts.map → actor_details.d.ts.map} +1 -1
- package/dist/utils/{actor-details.js → actor_details.js} +3 -6
- package/dist/utils/actor_details.js.map +1 -0
- package/dist/utils/{actor-search.d.ts → actor_search.d.ts} +13 -1
- package/dist/utils/actor_search.d.ts.map +1 -0
- package/dist/utils/{actor-search.js → actor_search.js} +19 -6
- package/dist/utils/actor_search.js.map +1 -0
- package/dist/utils/ajv.js +1 -4
- package/dist/utils/ajv.js.map +1 -1
- package/dist/utils/{apify-docs.d.ts → apify_docs.d.ts} +1 -1
- package/dist/utils/{apify-docs.d.ts.map → apify_docs.d.ts.map} +1 -1
- package/dist/utils/{apify-docs.js → apify_docs.js} +1 -4
- package/dist/utils/apify_docs.js.map +1 -0
- package/dist/utils/{apify-properties.d.ts → apify_properties.d.ts} +1 -1
- package/dist/utils/{apify-properties.d.ts.map → apify_properties.d.ts.map} +1 -1
- package/dist/utils/{apify-properties.js → apify_properties.js} +1 -4
- package/dist/utils/apify_properties.js.map +1 -0
- package/dist/utils/auth.d.ts +2 -0
- package/dist/utils/auth.d.ts.map +1 -1
- package/dist/utils/auth.js +5 -6
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/generic.js +1 -4
- package/dist/utils/generic.js.map +1 -1
- package/dist/utils/html.js +1 -4
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/{html-to-md.d.ts → html_to_md.d.ts} +1 -1
- package/dist/utils/html_to_md.d.ts.map +1 -0
- package/dist/utils/{html-to-md.js → html_to_md.js} +1 -4
- package/dist/utils/html_to_md.js.map +1 -0
- package/dist/utils/logging.js +1 -4
- package/dist/utils/logging.js.map +1 -1
- package/dist/utils/mcp.js +1 -4
- package/dist/utils/mcp.js.map +1 -1
- package/dist/utils/{mcp-clients.d.ts → mcp_clients.d.ts} +1 -1
- package/dist/utils/mcp_clients.d.ts.map +1 -0
- package/dist/utils/{mcp-clients.js → mcp_clients.js} +1 -4
- package/dist/utils/mcp_clients.js.map +1 -0
- package/dist/utils/{pricing-info.d.ts → pricing_info.d.ts} +1 -1
- package/dist/utils/{pricing-info.d.ts.map → pricing_info.d.ts.map} +1 -1
- package/dist/utils/{pricing-info.js → pricing_info.js} +1 -4
- package/dist/utils/pricing_info.js.map +1 -0
- package/dist/utils/progress.d.ts +1 -1
- package/dist/utils/progress.js +1 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/{schema-generation.d.ts → schema_generation.d.ts} +1 -1
- package/dist/utils/{schema-generation.d.ts.map → schema_generation.d.ts.map} +1 -1
- package/dist/utils/{schema-generation.js → schema_generation.js} +1 -4
- package/dist/utils/schema_generation.js.map +1 -0
- package/dist/utils/server-instructions/common.d.ts +19 -0
- package/dist/utils/server-instructions/common.d.ts.map +1 -0
- package/dist/utils/{server-instructions.js → server-instructions/common.js} +10 -42
- package/dist/utils/server-instructions/common.js.map +1 -0
- package/dist/utils/server-instructions/default.d.ts +6 -0
- package/dist/utils/server-instructions/default.d.ts.map +1 -0
- package/dist/utils/server-instructions/default.js +14 -0
- package/dist/utils/server-instructions/default.js.map +1 -0
- package/dist/utils/server-instructions/index.d.ts +10 -0
- package/dist/utils/server-instructions/index.d.ts.map +1 -0
- package/dist/utils/server-instructions/index.js +18 -0
- package/dist/utils/server-instructions/index.js.map +1 -0
- package/dist/utils/server-instructions/openai.d.ts +7 -0
- package/dist/utils/server-instructions/openai.d.ts.map +1 -0
- package/dist/utils/server-instructions/openai.js +30 -0
- package/dist/utils/server-instructions/openai.js.map +1 -0
- package/dist/utils/skyfire.js +1 -4
- package/dist/utils/skyfire.js.map +1 -1
- package/dist/utils/tool_categories_helpers.d.ts +11 -0
- package/dist/utils/tool_categories_helpers.d.ts.map +1 -0
- package/dist/utils/tool_categories_helpers.js +21 -0
- package/dist/utils/tool_categories_helpers.js.map +1 -0
- package/dist/utils/{tool-status.d.ts → tool_status.d.ts} +1 -1
- package/dist/utils/tool_status.d.ts.map +1 -0
- package/dist/utils/{tool-status.js → tool_status.js} +1 -4
- package/dist/utils/tool_status.js.map +1 -0
- package/dist/utils/tools.d.ts +12 -2
- package/dist/utils/tools.d.ts.map +1 -1
- package/dist/utils/tools.js +38 -6
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/{tools-loader.d.ts → tools_loader.d.ts} +5 -4
- package/dist/utils/tools_loader.d.ts.map +1 -0
- package/dist/utils/{tools-loader.js → tools_loader.js} +66 -69
- package/dist/utils/tools_loader.js.map +1 -0
- package/dist/utils/{ttl-lru.d.ts → ttl_lru.d.ts} +1 -1
- package/dist/utils/{ttl-lru.d.ts.map → ttl_lru.d.ts.map} +1 -1
- package/dist/utils/{ttl-lru.js → ttl_lru.js} +1 -4
- package/dist/utils/ttl_lru.js.map +1 -0
- package/dist/utils/{userid-cache.d.ts → userid_cache.d.ts} +2 -2
- package/dist/utils/userid_cache.d.ts.map +1 -0
- package/dist/utils/{userid-cache.js → userid_cache.js} +2 -5
- package/dist/utils/userid_cache.js.map +1 -0
- package/dist/utils/version.js +1 -4
- package/dist/utils/version.js.map +1 -1
- package/dist/web/dist/actor-detail-widget.js +62 -59
- package/dist/web/dist/actor-run-widget.js +116 -118
- package/dist/web/dist/search-actors-widget.js +91 -88
- package/manifest.json +1 -1
- package/package.json +8 -8
- package/server.json +1 -1
- package/dist/apify-client.js.map +0 -1
- package/dist/index-internals.d.ts +0 -15
- package/dist/index-internals.d.ts.map +0 -1
- package/dist/index-internals.js +0 -20
- package/dist/index-internals.js.map +0 -1
- package/dist/prompts/latest-news-on-topic.d.ts.map +0 -1
- package/dist/prompts/latest-news-on-topic.js.map +0 -1
- package/dist/tools/actor.d.ts +0 -73
- package/dist/tools/actor.d.ts.map +0 -1
- package/dist/tools/actor.js +0 -596
- package/dist/tools/actor.js.map +0 -1
- package/dist/tools/dataset.d.ts +0 -14
- package/dist/tools/dataset.d.ts.map +0 -1
- package/dist/tools/dataset.js +0 -235
- package/dist/tools/dataset.js.map +0 -1
- package/dist/tools/dataset_collection.d.ts.map +0 -1
- package/dist/tools/dataset_collection.js.map +0 -1
- package/dist/tools/fetch-actor-details-internal.d.ts +0 -3
- package/dist/tools/fetch-actor-details-internal.d.ts.map +0 -1
- package/dist/tools/fetch-actor-details-internal.js.map +0 -1
- package/dist/tools/fetch-actor-details.d.ts +0 -3
- package/dist/tools/fetch-actor-details.d.ts.map +0 -1
- package/dist/tools/fetch-actor-details.js +0 -103
- package/dist/tools/fetch-actor-details.js.map +0 -1
- package/dist/tools/fetch-apify-docs.d.ts +0 -3
- package/dist/tools/fetch-apify-docs.d.ts.map +0 -1
- package/dist/tools/fetch-apify-docs.js.map +0 -1
- package/dist/tools/get-actor-output.d.ts.map +0 -1
- package/dist/tools/get-actor-output.js.map +0 -1
- package/dist/tools/get-html-skeleton.d.ts +0 -3
- package/dist/tools/get-html-skeleton.d.ts.map +0 -1
- package/dist/tools/get-html-skeleton.js.map +0 -1
- package/dist/tools/helpers.d.ts.map +0 -1
- package/dist/tools/helpers.js.map +0 -1
- package/dist/tools/key_value_store.d.ts +0 -14
- package/dist/tools/key_value_store.d.ts.map +0 -1
- package/dist/tools/key_value_store.js +0 -142
- package/dist/tools/key_value_store.js.map +0 -1
- package/dist/tools/key_value_store_collection.d.ts.map +0 -1
- package/dist/tools/key_value_store_collection.js.map +0 -1
- package/dist/tools/run.d.ts +0 -15
- package/dist/tools/run.d.ts.map +0 -1
- package/dist/tools/run.js +0 -231
- package/dist/tools/run.js.map +0 -1
- package/dist/tools/run_collection.d.ts.map +0 -1
- package/dist/tools/run_collection.js.map +0 -1
- package/dist/tools/search-actors-internal.d.ts +0 -3
- package/dist/tools/search-actors-internal.d.ts.map +0 -1
- package/dist/tools/search-actors-internal.js.map +0 -1
- package/dist/tools/search-apify-docs.d.ts +0 -3
- package/dist/tools/search-apify-docs.d.ts.map +0 -1
- package/dist/tools/search-apify-docs.js.map +0 -1
- package/dist/tools/store_collection.d.ts +0 -26
- package/dist/tools/store_collection.d.ts.map +0 -1
- package/dist/tools/store_collection.js +0 -198
- package/dist/tools/store_collection.js.map +0 -1
- package/dist/tools/structured-output-schemas.js.map +0 -1
- package/dist/utils/actor-card.js.map +0 -1
- package/dist/utils/actor-details.js.map +0 -1
- package/dist/utils/actor-response.d.ts.map +0 -1
- package/dist/utils/actor-response.js.map +0 -1
- package/dist/utils/actor-search.d.ts.map +0 -1
- package/dist/utils/actor-search.js.map +0 -1
- package/dist/utils/apify-docs.js.map +0 -1
- package/dist/utils/apify-properties.js.map +0 -1
- package/dist/utils/html-to-md.d.ts.map +0 -1
- package/dist/utils/html-to-md.js.map +0 -1
- package/dist/utils/mcp-clients.d.ts.map +0 -1
- package/dist/utils/mcp-clients.js.map +0 -1
- package/dist/utils/pricing-info.js.map +0 -1
- package/dist/utils/schema-generation.js.map +0 -1
- package/dist/utils/server-instructions.d.ts +0 -14
- package/dist/utils/server-instructions.d.ts.map +0 -1
- package/dist/utils/server-instructions.js.map +0 -1
- package/dist/utils/tool-categories-helpers.d.ts +0 -10
- package/dist/utils/tool-categories-helpers.d.ts.map +0 -1
- package/dist/utils/tool-categories-helpers.js +0 -22
- package/dist/utils/tool-categories-helpers.js.map +0 -1
- package/dist/utils/tool-status.d.ts.map +0 -1
- package/dist/utils/tool-status.js.map +0 -1
- package/dist/utils/tools-loader.d.ts.map +0 -1
- package/dist/utils/tools-loader.js.map +0 -1
- package/dist/utils/ttl-lru.js.map +0 -1
- package/dist/utils/userid-cache.d.ts.map +0 -1
- package/dist/utils/userid-cache.js.map +0 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2a568bcf-320b-5a08-a070-fecf787f1eca")}catch(e){}}();
|
|
3
1
|
import { fixedAjvCompile } from '../tools/utils.js';
|
|
4
2
|
import { ajv } from '../utils/ajv.js';
|
|
5
3
|
/**
|
|
@@ -44,5 +42,4 @@ export const latestNewsOnTopicPrompt = {
|
|
|
44
42
|
return `I want you to use the RAG web browser to search the web for the latest news on the "${data.topic}" topic. Retrieve news from the last ${timespan}. The RAG web browser accepts a query parameter that supports all Google input, including filters and flags—be sure to use them to accomplish my goal. Today is ${currentDateUtc} UTC.`;
|
|
45
43
|
},
|
|
46
44
|
};
|
|
47
|
-
//# sourceMappingURL=
|
|
48
|
-
//# debugId=2a568bcf-320b-5a08-a070-fecf787f1eca
|
|
45
|
+
//# sourceMappingURL=latest_news_on_topic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latest_news_on_topic.js","sourceRoot":"","sources":["../../src/prompts/latest_news_on_topic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC;;GAEG;AACH,MAAM,IAAI,GAAqB;IAC3B;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE,IAAI;KACjB;IACD;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,kIAAkI;QAC/I,QAAQ,EAAE,KAAK;KAClB;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,GAAG,eAAe,CAAC,GAAG,EAAE;IACpC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE;gBAC/C,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,GAAG,CAAC,WAAW;aAC/B,CAAC,CAAC,CAAC;KACP;IACD,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CAC3E,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAe;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,qEAAqE;IAClF,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACb,MAAM,cAAc,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QACzF,OAAO,uFAAuF,IAAI,CAAC,KAAK,wCAAwC,QAAQ,mKAAmK,cAAc,OAAO,CAAC;IACrV,CAAC;CACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ListResourcesResult, ListResourceTemplatesResult, ReadResourceResult, TextResourceContents } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ServerMode } from '../types.js';
|
|
3
3
|
import type { AvailableWidget } from './widgets.js';
|
|
4
4
|
type ExtendedResourceContents = TextResourceContents & {
|
|
5
5
|
html?: string;
|
|
@@ -15,7 +15,7 @@ type ResourceService = {
|
|
|
15
15
|
};
|
|
16
16
|
type ResourceServiceOptions = {
|
|
17
17
|
skyfireMode?: boolean;
|
|
18
|
-
|
|
18
|
+
mode?: ServerMode;
|
|
19
19
|
getAvailableWidgets: () => Map<string, AvailableWidget>;
|
|
20
20
|
};
|
|
21
21
|
export declare function createResourceService(options: ResourceServiceOptions): ResourceService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource_service.d.ts","sourceRoot":"","sources":["../../src/resources/resource_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,kBAAkB,EAAY,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAK/J,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"resource_service.d.ts","sourceRoot":"","sources":["../../src/resources/resource_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,kBAAkB,EAAY,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAK/J,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,wBAAwB,GAAG,oBAAoB,GAAG;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,KAAK,0BAA0B,GAAG,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,GAAG;IACrE,QAAQ,EAAE,wBAAwB,EAAE,CAAC;CACxC,CAAC;AAEF,KAAK,eAAe,GAAG;IACnB,aAAa,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClD,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACnE,qBAAqB,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACrE,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,mBAAmB,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC3D,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAoHtF"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f27ddabd-dd19-5535-bc25-ad0acbf7c02d")}catch(e){}}();
|
|
3
1
|
import log from '@apify/log';
|
|
4
2
|
import { SKYFIRE_README_CONTENT } from '../const.js';
|
|
5
3
|
export function createResourceService(options) {
|
|
6
|
-
const { skyfireMode,
|
|
4
|
+
const { skyfireMode, mode = 'default', getAvailableWidgets } = options;
|
|
7
5
|
const listResources = async () => {
|
|
8
6
|
const resources = [];
|
|
9
7
|
if (skyfireMode) {
|
|
@@ -15,7 +13,7 @@ export function createResourceService(options) {
|
|
|
15
13
|
mimeType: 'text/markdown',
|
|
16
14
|
});
|
|
17
15
|
}
|
|
18
|
-
if (
|
|
16
|
+
if (mode === 'openai') {
|
|
19
17
|
for (const widget of getAvailableWidgets().values()) {
|
|
20
18
|
if (!widget.exists) {
|
|
21
19
|
continue;
|
|
@@ -41,7 +39,7 @@ export function createResourceService(options) {
|
|
|
41
39
|
}],
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
|
-
if (
|
|
42
|
+
if (mode === 'openai' && uri.startsWith('ui://widget/')) {
|
|
45
43
|
const widget = getAvailableWidgets().get(uri);
|
|
46
44
|
if (!widget || !widget.exists) {
|
|
47
45
|
return {
|
|
@@ -107,5 +105,4 @@ export function createResourceService(options) {
|
|
|
107
105
|
listResourceTemplates,
|
|
108
106
|
};
|
|
109
107
|
}
|
|
110
|
-
//# sourceMappingURL=resource_service.js.map
|
|
111
|
-
//# debugId=f27ddabd-dd19-5535-bc25-ad0acbf7c02d
|
|
108
|
+
//# sourceMappingURL=resource_service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource_service.js","sources":["../../src/resources/resource_service.ts"],"
|
|
1
|
+
{"version":3,"file":"resource_service.js","sourceRoot":"","sources":["../../src/resources/resource_service.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAyBrD,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACjE,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,SAAS,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC;IAEvE,MAAM,aAAa,GAAG,KAAK,IAAkC,EAAE;QAC3D,MAAM,SAAS,GAAe,EAAE,CAAC;QAEjC,IAAI,WAAW,EAAE,CAAC;YACd,SAAS,CAAC,IAAI,CAAC;gBACX,GAAG,EAAE,kBAAkB;gBACvB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;sBACtF,wDAAwD;gBAC9D,QAAQ,EAAE,eAAe;aAC5B,CAAC,CAAC;QACP,CAAC;QAED,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpB,KAAK,MAAM,MAAM,IAAI,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;oBACjB,SAAS;gBACb,CAAC;gBACD,SAAS,CAAC,IAAI,CAAC;oBACX,GAAG,EAAE,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AC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEzD,MAAM,UAAU,GAAG;;;;;aAKtB,MAAM,CAAC,KAAK;;;;4BAIG,QAAQ;;QAE5B,CAAC;gBAEO,MAAM,aAAa,GAA6B;oBAC5C,GAAG;oBACH,QAAQ,EAAE,qBAAqB;oBAC/B,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,MAAM,CAAC,IAAI;iBACrB,CAAC;gBACF,OAAO;oBACH,QAAQ,EAAE,CAAC,aAAa,CAAC;iBAC5B,CAAC;YACN,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC5E,OAAO;oBACH,QAAQ,EAAE,CAAC;4BACP,GAAG;4BACH,QAAQ,EAAE,YAAY;4BACtB,IAAI,EAAE,0BAA0B,YAAY,EAAE;yBACjD,CAAC;iBACL,CAAC;YACN,CAAC;QACL,CAAC;QAED,OAAO;YACH,QAAQ,EAAE,CAAC;oBACP,GAAG;oBACH,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE,YAAY,GAAG,YAAY;iBACpC,CAAC;SACL,CAAC;IACN,CAAC,CAAC;IAEF,MAAM,qBAAqB,GAAG,KAAK,IAA0C,EAAE,CAAC,CAAC;QAC7E,iBAAiB,EAAE,EAAE;KACxB,CAAC,CAAC;IAEH,OAAO;QACH,aAAa;QACb,YAAY;QACZ,qBAAqB;KACxB,CAAC;AACN,CAAC"}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* This module manages widget configuration and validates that widget files exist
|
|
5
5
|
* at runtime.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5b5a5fbd-b765-557a-9882-ea8b94ea0efa")}catch(e){}}();
|
|
9
7
|
const OPENAI_WIDGET_CSP = {
|
|
10
8
|
connect_domains: ['https://api.apify.com'],
|
|
11
9
|
resource_domains: [
|
|
@@ -90,5 +88,4 @@ export async function resolveAvailableWidgets(baseDir) {
|
|
|
90
88
|
export function getWidgetConfig(uri) {
|
|
91
89
|
return WIDGET_REGISTRY[uri];
|
|
92
90
|
}
|
|
93
|
-
//# sourceMappingURL=widgets.js.map
|
|
94
|
-
//# debugId=5b5a5fbd-b765-557a-9882-ea8b94ea0efa
|
|
91
|
+
//# sourceMappingURL=widgets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.js","sources":["../../src/resources/widgets.ts"],"
|
|
1
|
+
{"version":3,"file":"widgets.js","sourceRoot":"","sources":["../../src/resources/widgets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,iBAAiB,GAAG;IACtB,eAAe,EAAE,CAAC,uBAAuB,CAAC;IAC1C,gBAAgB,EAAE;QACd,uBAAuB;QACvB,qCAAqC;QACrC,6DAA6D;QAC7D,mDAAmD;QACnD,mBAAmB;KACtB;CACK,CAAC;AAEX,MAAM,uBAAuB,GAAG;IAC5B,yBAAyB,EAAE,IAAI;IAC/B,+BAA+B,EAAE,IAAI;IACrC,4BAA4B,EAAE,IAAI;IAClC,qBAAqB,EAAE,mBAAmB;IAC1C,kBAAkB,EAAE,iBAAiB;CAC/B,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,aAAa,EAAE,gCAAgC;IAC/C,SAAS,EAAE,4BAA4B;CACjC,CAAC;AAwBX;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC;IACzD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QACzB,GAAG,EAAE,WAAW,CAAC,aAAa;QAC9B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AAM;YACT,MAAM;YACN,MAAM;SACT,CAAC,CAAC;IACP,CAAC;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACvC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/server_card.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9afa5329-4992-5db0-be59-bc025ea3283e")}catch(e){}}();
|
|
3
1
|
import { LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/sdk/types.js';
|
|
4
2
|
import { APIFY_DOCS_MCP_URL, APIFY_FAVICON_URL, SERVER_NAME, SERVER_TITLE, SERVER_VERSION } from './const.js';
|
|
5
3
|
import { readJsonFile } from './utils/generic.js';
|
|
@@ -32,5 +30,4 @@ export function getServerCard() {
|
|
|
32
30
|
tools: 'dynamic',
|
|
33
31
|
};
|
|
34
32
|
}
|
|
35
|
-
//# sourceMappingURL=server_card.js.map
|
|
36
|
-
//# debugId=9afa5329-4992-5db0-be59-bc025ea3283e
|
|
33
|
+
//# sourceMappingURL=server_card.js.map
|
package/dist/server_card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server_card.js","sources":["../src/server_card.ts"],"
|
|
1
|
+
{"version":3,"file":"server_card.js","sourceRoot":"","sources":["../src/server_card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9G,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,UAAU,GAAG,YAAY,CAA0B,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;AAE5F,uDAAuD;AACvD,MAAM,UAAU,aAAa;IACzB,OAAO;QACH,OAAO,EAAE,wEAAwE;QACjF,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,uBAAuB;QACxC,UAAU,EAAE;YACR,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,cAAc;SAC1B;QACD,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,OAAO,EAAE,iBAAiB;QAC1B,gBAAgB,EAAE,kBAAkB;QACpC,SAAS,EAAE;YACP,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,GAAG;SAChB;QACD,YAAY,EAAE;YACV,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;SAC/B;QACD,cAAc,EAAE;YACZ,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;SAChC;QACD,KAAK,EAAE,SAAS;KACnB,CAAC;AACN,CAAC"}
|
package/dist/state.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActorDefinitionWithInfo, ApifyDocsSearchResult } from './types.js';
|
|
2
|
-
import { TTLLRUCache } from './utils/
|
|
2
|
+
import { TTLLRUCache } from './utils/ttl_lru.js';
|
|
3
3
|
export declare const actorDefinitionPrunedCache: TTLLRUCache<ActorDefinitionWithInfo>;
|
|
4
4
|
export declare const searchApifyDocsCache: TTLLRUCache<ApifyDocsSearchResult[]>;
|
|
5
5
|
/** Stores processed Markdown content */
|
package/dist/state.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3e3220fc-32fd-5b9b-9db4-46a5bc62622d")}catch(e){}}();
|
|
3
1
|
import { ACTOR_CACHE_MAX_SIZE, ACTOR_CACHE_TTL_SECS, APIFY_DOCS_CACHE_MAX_SIZE, APIFY_DOCS_CACHE_TTL_SECS, GET_HTML_SKELETON_CACHE_MAX_SIZE, GET_HTML_SKELETON_CACHE_TTL_SECS, MCP_SERVER_CACHE_MAX_SIZE, MCP_SERVER_CACHE_TTL_SECS, } from './const.js';
|
|
4
|
-
import { TTLLRUCache } from './utils/
|
|
2
|
+
import { TTLLRUCache } from './utils/ttl_lru.js';
|
|
5
3
|
export const actorDefinitionPrunedCache = new TTLLRUCache(ACTOR_CACHE_MAX_SIZE, ACTOR_CACHE_TTL_SECS);
|
|
6
4
|
export const searchApifyDocsCache = new TTLLRUCache(APIFY_DOCS_CACHE_MAX_SIZE, APIFY_DOCS_CACHE_TTL_SECS);
|
|
7
5
|
/** Stores processed Markdown content */
|
|
@@ -14,5 +12,4 @@ export const getHtmlSkeletonCache = new TTLLRUCache(GET_HTML_SKELETON_CACHE_MAX_
|
|
|
14
12
|
* - string: MCP server URL
|
|
15
13
|
*/
|
|
16
14
|
export const mcpServerCache = new TTLLRUCache(MCP_SERVER_CACHE_MAX_SIZE, MCP_SERVER_CACHE_TTL_SECS);
|
|
17
|
-
//# sourceMappingURL=state.js.map
|
|
18
|
-
//# debugId=3e3220fc-32fd-5b9b-9db4-46a5bc62622d
|
|
15
|
+
//# sourceMappingURL=state.js.map
|
package/dist/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sources":["../src/state.ts"],"
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,WAAW,CAA0B,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;AAC/H,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,WAAW,CAA0B,yBAAyB,EAAE,yBAAyB,CAAC,CAAC;AACnI,wCAAwC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,WAAW,CAAS,yBAAyB,EAAE,yBAAyB,CAAC,CAAC;AACjH,qEAAqE;AACrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,WAAW,CAAS,gCAAgC,EAAE,gCAAgC,CAAC,CAAC;AAChI;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,WAAW,CAAmB,yBAAyB,EAAE,yBAAyB,CAAC,CAAC"}
|
package/dist/stdio.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Sentry must be imported before all other modules to ensure early initialization
|
|
3
|
-
|
|
4
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4d56db43-c144-5c49-859a-7d30fb42d259")}catch(e){}}();
|
|
5
3
|
import './instrument.js';
|
|
6
4
|
/**
|
|
7
5
|
* This script initializes and starts the Apify MCP server using the Stdio transport.
|
|
@@ -27,14 +25,14 @@ import yargs from 'yargs';
|
|
|
27
25
|
// eslint-disable-next-line import/extensions
|
|
28
26
|
import { hideBin } from 'yargs/helpers';
|
|
29
27
|
import log from '@apify/log';
|
|
30
|
-
import { ApifyClient } from './
|
|
28
|
+
import { ApifyClient } from './apify_client.js';
|
|
31
29
|
import { DEFAULT_TELEMETRY_ENV, TELEMETRY_ENV } from './const.js';
|
|
32
30
|
import { processInput } from './input.js';
|
|
33
31
|
import { ActorsMcpServer } from './mcp/server.js';
|
|
34
32
|
import { getTelemetryEnv } from './telemetry.js';
|
|
35
33
|
import { isApiTokenRequired } from './utils/auth.js';
|
|
36
34
|
import { parseCommaSeparatedList } from './utils/generic.js';
|
|
37
|
-
import { loadToolsFromInput } from './utils/
|
|
35
|
+
import { loadToolsFromInput } from './utils/tools_loader.js';
|
|
38
36
|
/**
|
|
39
37
|
* Attempts to read Apify token from ~/.apify/auth.json file
|
|
40
38
|
* Returns the token if found, undefined otherwise
|
|
@@ -142,6 +140,7 @@ if (requiresAuthentication && !apifyToken) {
|
|
|
142
140
|
process.exit(1);
|
|
143
141
|
}
|
|
144
142
|
async function main() {
|
|
143
|
+
var _a;
|
|
145
144
|
const mcpServer = new ActorsMcpServer({
|
|
146
145
|
transportType: 'stdio',
|
|
147
146
|
telemetry: {
|
|
@@ -162,7 +161,7 @@ async function main() {
|
|
|
162
161
|
const normalizedInput = processInput(input);
|
|
163
162
|
const apifyClient = new ApifyClient({ token: apifyToken });
|
|
164
163
|
// Use the shared tools loading logic
|
|
165
|
-
const tools = await loadToolsFromInput(normalizedInput, apifyClient, argv.ui);
|
|
164
|
+
const tools = await loadToolsFromInput(normalizedInput, apifyClient, (_a = argv.ui) !== null && _a !== void 0 ? _a : 'default');
|
|
166
165
|
mcpServer.upsertTools(tools);
|
|
167
166
|
// Start server
|
|
168
167
|
const transport = new StdioServerTransport();
|
|
@@ -202,5 +201,4 @@ main().catch(async (error) => {
|
|
|
202
201
|
await Sentry.flush(5000);
|
|
203
202
|
process.exit(1);
|
|
204
203
|
});
|
|
205
|
-
//# sourceMappingURL=stdio.js.map
|
|
206
|
-
//# debugId=4d56db43-c144-5c49-859a-7d30fb42d259
|
|
204
|
+
//# sourceMappingURL=stdio.js.map
|
package/dist/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"st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C/B,MAAM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
package/dist/telemetry.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="67888c7f-3923-5994-9023-9e471164f4f2")}catch(e){}}();
|
|
3
1
|
import * as crypto from 'node:crypto';
|
|
4
2
|
import { Analytics } from '@segment/analytics-node';
|
|
5
3
|
import log from '@apify/log';
|
|
@@ -70,5 +68,4 @@ export function trackToolCall(userId, telemetryEnv, properties) {
|
|
|
70
68
|
log.error('Failed to track tool call event', { error, userId, toolName: properties.tool_name });
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
//# sourceMappingURL=telemetry.js.map
|
|
74
|
-
//# debugId=67888c7f-3923-5994-9023-9e471164f4f2
|
|
71
|
+
//# sourceMappingURL=telemetry.js.map
|
package/dist/telemetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sources":["../src/telemetry.ts"],"
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EACH,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,aAAa,GAChB,MAAM,YAAY,CAAC;AAGpB,MAAM,aAAa,GAAG,kCAAkC,CAAC;AACzD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAE1D,kEAAk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AM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;YAC/D,KAAK,EAAE,cAAc,CAAC,SAAS;YAC/B,UAAU;SACb,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,GAAG,CAAC,KAAK,CAAC,iCAAiC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;IACpG,CAAC;AACL,CAAC"}
|
package/dist/tools/build.d.ts
CHANGED
package/dist/tools/build.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="64945933-ee90-51da-819d-af59d06b55a5")}catch(e){}}();
|
|
3
1
|
import { ACTOR_README_MAX_LENGTH } from '../const.js';
|
|
4
2
|
/**
|
|
5
3
|
* Get Actor input schema by Actor name.
|
|
@@ -89,5 +87,4 @@ function truncateActorReadme(readme, limit = ACTOR_README_MAX_LENGTH) {
|
|
|
89
87
|
const prunedReadme = lines.filter((line) => line.startsWith('#'));
|
|
90
88
|
return `${readmeFirst}\n\nREADME was truncated because it was too long. Remaining headers:\n${prunedReadme.join(', ')}`;
|
|
91
89
|
}
|
|
92
|
-
//# sourceMappingURL=build.js.map
|
|
93
|
-
//# debugId=64945933-ee90-51da-819d-af59d06b55a5
|
|
90
|
+
//# sourceMappingURL=build.js.map
|
package/dist/tools/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sources":["../../src/tools/build.ts"],"
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/tools/build.ts"],"names":[],"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AAiB;QAC7C,gBAAgB,EAAE,kBAAkB,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,gBAA0B,CAAC,CAAC,CAAC,SAAS;QAClG,UAAU,EAAE,YAAY,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAgC,CAAC,CAAC,CAAC,SAAS;KAC/F,CAAC;AACN,CAAC;AACD;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,MAAc,EAAE,KAAK,GAAG,uBAAuB;IACxE,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,OAAO,GAAG,WAAW,yEAAyE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5H,CAAC"}
|
|
@@ -7,16 +7,56 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The final tool ordering presented to MCP clients is determined by tools-loader.ts,
|
|
9
9
|
* which also auto-injects get-actor-run and get-actor-output right after call-actor.
|
|
10
|
+
*
|
|
11
|
+
* Each tool entry can be:
|
|
12
|
+
* - A plain ToolEntry — mode-independent, always included
|
|
13
|
+
* - A mode map (e.g. { default: ToolEntry, openai: ToolEntry }) — resolver picks entry[mode]
|
|
14
|
+
* - A partial mode map (e.g. { openai: ToolEntry }) — included only for listed modes
|
|
15
|
+
*/
|
|
16
|
+
import type { ServerMode, ToolEntry } from '../types.js';
|
|
17
|
+
/**
|
|
18
|
+
* Unified tool category definitions — single source of truth.
|
|
19
|
+
*
|
|
20
|
+
* Each entry is either a plain ToolEntry (mode-independent) or a mode map
|
|
21
|
+
* with ServerMode keys mapping to their ToolEntry variant.
|
|
22
|
+
*
|
|
23
|
+
* Use {@link getCategoryTools} to resolve entries into concrete ToolEntry arrays for a given mode.
|
|
10
24
|
*/
|
|
11
|
-
import type { ToolCategory } from '../types.js';
|
|
12
25
|
export declare const toolCategories: {
|
|
13
|
-
experimental:
|
|
14
|
-
actors:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
experimental: ToolEntry[];
|
|
27
|
+
actors: {
|
|
28
|
+
default: ToolEntry;
|
|
29
|
+
openai: ToolEntry;
|
|
30
|
+
}[];
|
|
31
|
+
ui: {
|
|
32
|
+
openai: ToolEntry;
|
|
33
|
+
}[];
|
|
34
|
+
docs: ToolEntry[];
|
|
35
|
+
runs: (import("../types.js").HelperTool | import("../types.js").ActorTool | import("../types.js").ActorMcpTool | {
|
|
36
|
+
default: ToolEntry;
|
|
37
|
+
openai: ToolEntry;
|
|
38
|
+
})[];
|
|
39
|
+
storage: ToolEntry[];
|
|
40
|
+
dev: ToolEntry[];
|
|
20
41
|
};
|
|
21
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Canonical list of all tool category names, derived from toolCategories keys.
|
|
44
|
+
*/
|
|
45
|
+
export declare const CATEGORY_NAMES: (keyof typeof toolCategories)[];
|
|
46
|
+
/** Set of known category names for O(1) membership checks. */
|
|
47
|
+
export declare const CATEGORY_NAME_SET: ReadonlySet<string>;
|
|
48
|
+
/** Map from category name to an array of resolved tool entries. */
|
|
49
|
+
export type ToolCategoryMap = Record<(typeof CATEGORY_NAMES)[number], ToolEntry[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Resolve tool categories for a given server mode.
|
|
52
|
+
*
|
|
53
|
+
* Returns mode-resolved tool variants: openai mode gets openai-specific implementations
|
|
54
|
+
* (async execution, widget metadata), default mode gets standard implementations.
|
|
55
|
+
* Openai-only tools are excluded in default mode.
|
|
56
|
+
*
|
|
57
|
+
* @param mode - Required. Use `'default'` or `'openai'`.
|
|
58
|
+
* Made explicit (no default value) to prevent accidentally serving wrong-mode tools.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getCategoryTools(mode?: ServerMode): ToolCategoryMap;
|
|
61
|
+
export declare const toolCategoriesEnabledByDefault: (typeof CATEGORY_NAMES)[number][];
|
|
22
62
|
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/tools/categories.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/tools/categories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA2CzD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;CAqCoB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAkC,CAAC,MAAM,OAAO,cAAc,CAAC,EAAE,CAAC;AAE7F,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAmC,CAAC;AAEtF,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AAwBnF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,UAAsB,GAAG,eAAe,CAI9E;AAED,eAAO,MAAM,8BAA8B,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,EAG3E,CAAC"}
|
package/dist/tools/categories.js
CHANGED
|
@@ -1,40 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { getHtmlSkeleton } from './
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { getUserRunsList } from './run_collection.js';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
1
|
+
import { abortActorRun } from './common/abort_actor_run.js';
|
|
2
|
+
import { addTool } from './common/add_actor.js';
|
|
3
|
+
import { getUserDatasetsList } from './common/dataset_collection.js';
|
|
4
|
+
import { fetchApifyDocsTool } from './common/fetch_apify_docs.js';
|
|
5
|
+
import { getActorOutput } from './common/get_actor_output.js';
|
|
6
|
+
import { getActorRunLog } from './common/get_actor_run_log.js';
|
|
7
|
+
import { getDataset } from './common/get_dataset.js';
|
|
8
|
+
import { getDatasetItems } from './common/get_dataset_items.js';
|
|
9
|
+
import { getDatasetSchema } from './common/get_dataset_schema.js';
|
|
10
|
+
import { getHtmlSkeleton } from './common/get_html_skeleton.js';
|
|
11
|
+
import { getKeyValueStore } from './common/get_key_value_store.js';
|
|
12
|
+
import { getKeyValueStoreKeys } from './common/get_key_value_store_keys.js';
|
|
13
|
+
import { getKeyValueStoreRecord } from './common/get_key_value_store_record.js';
|
|
14
|
+
import { getUserKeyValueStoresList } from './common/key_value_store_collection.js';
|
|
15
|
+
import { getUserRunsList } from './common/run_collection.js';
|
|
16
|
+
import { searchApifyDocsTool } from './common/search_apify_docs.js';
|
|
17
|
+
import { defaultCallActor } from './default/call_actor.js';
|
|
18
|
+
import { defaultFetchActorDetails } from './default/fetch_actor_details.js';
|
|
19
|
+
import { defaultGetActorRun } from './default/get_actor_run.js';
|
|
20
|
+
import { defaultSearchActors } from './default/search_actors.js';
|
|
21
|
+
import { openaiCallActor } from './openai/call_actor.js';
|
|
22
|
+
import { openaiFetchActorDetails } from './openai/fetch_actor_details.js';
|
|
23
|
+
import { fetchActorDetailsInternalTool } from './openai/fetch_actor_details_internal.js';
|
|
24
|
+
import { openaiGetActorRun } from './openai/get_actor_run.js';
|
|
25
|
+
import { openaiSearchActors } from './openai/search_actors.js';
|
|
26
|
+
import { searchActorsInternalTool } from './openai/search_actors_internal.js';
|
|
27
|
+
/** A plain ToolEntry always has a `name` property; mode maps never do. */
|
|
28
|
+
function isModeMap(entry) {
|
|
29
|
+
return !('name' in entry);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Unified tool category definitions — single source of truth.
|
|
33
|
+
*
|
|
34
|
+
* Each entry is either a plain ToolEntry (mode-independent) or a mode map
|
|
35
|
+
* with ServerMode keys mapping to their ToolEntry variant.
|
|
36
|
+
*
|
|
37
|
+
* Use {@link getCategoryTools} to resolve entries into concrete ToolEntry arrays for a given mode.
|
|
38
|
+
*/
|
|
19
39
|
export const toolCategories = {
|
|
20
40
|
experimental: [
|
|
21
41
|
addTool,
|
|
22
42
|
],
|
|
23
43
|
actors: [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
{ default: defaultSearchActors, openai: openaiSearchActors },
|
|
45
|
+
{ default: defaultFetchActorDetails, openai: openaiFetchActorDetails },
|
|
46
|
+
{ default: defaultCallActor, openai: openaiCallActor },
|
|
27
47
|
],
|
|
28
48
|
ui: [
|
|
29
|
-
searchActorsInternalTool,
|
|
30
|
-
fetchActorDetailsInternalTool,
|
|
49
|
+
{ openai: searchActorsInternalTool },
|
|
50
|
+
{ openai: fetchActorDetailsInternalTool },
|
|
31
51
|
],
|
|
32
52
|
docs: [
|
|
33
53
|
searchApifyDocsTool,
|
|
34
54
|
fetchApifyDocsTool,
|
|
35
55
|
],
|
|
36
56
|
runs: [
|
|
37
|
-
|
|
57
|
+
{ default: defaultGetActorRun, openai: openaiGetActorRun },
|
|
38
58
|
getUserRunsList,
|
|
39
59
|
getActorRunLog,
|
|
40
60
|
abortActorRun,
|
|
@@ -54,9 +74,49 @@ export const toolCategories = {
|
|
|
54
74
|
getHtmlSkeleton,
|
|
55
75
|
],
|
|
56
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Canonical list of all tool category names, derived from toolCategories keys.
|
|
79
|
+
*/
|
|
80
|
+
export const CATEGORY_NAMES = Object.keys(toolCategories);
|
|
81
|
+
/** Set of known category names for O(1) membership checks. */
|
|
82
|
+
export const CATEGORY_NAME_SET = new Set(CATEGORY_NAMES);
|
|
83
|
+
/**
|
|
84
|
+
* Resolve a single category's tool entries for the given server mode.
|
|
85
|
+
*
|
|
86
|
+
* For each entry:
|
|
87
|
+
* - Plain ToolEntry (has `name`) → always included, mode-independent
|
|
88
|
+
* - ModeMap → look up `entry[mode]`; included only if the mode key exists
|
|
89
|
+
*/
|
|
90
|
+
function resolveCategoryEntries(entries, mode) {
|
|
91
|
+
const result = [];
|
|
92
|
+
for (const entry of entries) {
|
|
93
|
+
if (isModeMap(entry)) {
|
|
94
|
+
const tool = entry[mode];
|
|
95
|
+
if (tool) {
|
|
96
|
+
result.push(tool);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
result.push(entry);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Resolve tool categories for a given server mode.
|
|
107
|
+
*
|
|
108
|
+
* Returns mode-resolved tool variants: openai mode gets openai-specific implementations
|
|
109
|
+
* (async execution, widget metadata), default mode gets standard implementations.
|
|
110
|
+
* Openai-only tools are excluded in default mode.
|
|
111
|
+
*
|
|
112
|
+
* @param mode - Required. Use `'default'` or `'openai'`.
|
|
113
|
+
* Made explicit (no default value) to prevent accidentally serving wrong-mode tools.
|
|
114
|
+
*/
|
|
115
|
+
export function getCategoryTools(mode = 'default') {
|
|
116
|
+
return Object.fromEntries(CATEGORY_NAMES.map((name) => [name, resolveCategoryEntries(toolCategories[name], mode)]));
|
|
117
|
+
}
|
|
57
118
|
export const toolCategoriesEnabledByDefault = [
|
|
58
119
|
'actors',
|
|
59
120
|
'docs',
|
|
60
121
|
];
|
|
61
|
-
//# sourceMappingURL=categories.js.map
|
|
62
|
-
//# debugId=c07a2822-5122-5433-9ef6-ef3b71c5c1f6
|
|
122
|
+
//# sourceMappingURL=categories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.js","sources":["../../src/tools/categories.ts"],"
|
|
1
|
+
{"version":3,"file":"categories.js","sourceRoot":"","sources":["../../src/tools/categories.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAA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tools/common/abort_actor_run.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAUnF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAkCjB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createApifyClientWithSkyfireSupport } from '../../apify_client.js';
|
|
3
|
+
import { HelperTools } from '../../const.js';
|
|
4
|
+
import { compileSchema } from '../../utils/ajv.js';
|
|
5
|
+
const abortRunArgs = z.object({
|
|
6
|
+
runId: z.string()
|
|
7
|
+
.min(1)
|
|
8
|
+
.describe('The ID of the Actor run to abort.'),
|
|
9
|
+
gracefully: z.boolean().optional().describe('If true, the Actor run will abort gracefully with a 30-second timeout.'),
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* https://docs.apify.com/api/v2/actor-run-abort-post
|
|
13
|
+
*/
|
|
14
|
+
export const abortActorRun = Object.freeze({
|
|
15
|
+
type: 'internal',
|
|
16
|
+
name: HelperTools.ACTOR_RUNS_ABORT,
|
|
17
|
+
description: `Abort an Actor run that is currently starting or running.
|
|
18
|
+
For runs with status FINISHED, FAILED, ABORTING, or TIMED-OUT, this call has no effect.
|
|
19
|
+
The results will include the updated run details after the abort request.
|
|
20
|
+
|
|
21
|
+
USAGE:
|
|
22
|
+
- Use when you need to stop a run that is taking too long or misconfigured.
|
|
23
|
+
|
|
24
|
+
USAGE EXAMPLES:
|
|
25
|
+
- user_input: Abort run y2h7sK3Wc
|
|
26
|
+
- user_input: Gracefully abort run y2h7sK3Wc`,
|
|
27
|
+
inputSchema: z.toJSONSchema(abortRunArgs),
|
|
28
|
+
/**
|
|
29
|
+
* Allow additional properties for Skyfire mode to pass `skyfire-pay-id`.
|
|
30
|
+
*/
|
|
31
|
+
ajvValidate: compileSchema({ ...z.toJSONSchema(abortRunArgs), additionalProperties: true }),
|
|
32
|
+
requiresSkyfirePayId: true,
|
|
33
|
+
annotations: {
|
|
34
|
+
title: 'Abort Actor run',
|
|
35
|
+
readOnlyHint: false,
|
|
36
|
+
destructiveHint: true,
|
|
37
|
+
idempotentHint: true,
|
|
38
|
+
openWorldHint: false,
|
|
39
|
+
},
|
|
40
|
+
call: async (toolArgs) => {
|
|
41
|
+
const { args, apifyToken, apifyMcpServer } = toolArgs;
|
|
42
|
+
const parsed = abortRunArgs.parse(args);
|
|
43
|
+
const client = createApifyClientWithSkyfireSupport(apifyMcpServer, args, apifyToken);
|
|
44
|
+
const v = await client.run(parsed.runId).abort({ gracefully: parsed.gracefully });
|
|
45
|
+
return { content: [{ type: 'text', text: `\`\`\`json\n${JSON.stringify(v)}\n\`\`\`` }] };
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=abort_actor_run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abort_actor_run.js","sourceRoot":"","sources":["../../../src/tools/common/abort_actor_run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;SACZ,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,mCAAmC,CAAC;IAClD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;CACxH,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAc,MAAM,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,WAAW,CAAC,gBAAgB;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