@apify/actors-mcp-server 0.18.4 → 0.18.5-beta.1
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 +7 -2
- package/dist/apify_client.js +1 -4
- package/dist/apify_client.js.map +1 -1
- package/dist/const.d.ts +13 -4
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +15 -8
- package/dist/const.js.map +1 -1
- package/dist/dev_server.js +1 -4
- package/dist/dev_server.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 +4 -0
- package/dist/index_internals.d.ts.map +1 -1
- package/dist/index_internals.js +1 -4
- package/dist/index_internals.js.map +1 -1
- package/dist/index_internals_test_kit.js +1 -4
- package/dist/index_internals_test_kit.js.map +1 -1
- 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/mcp/actors.js +1 -4
- 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/client_context.js +1 -4
- package/dist/mcp/client_context.js.map +1 -1
- package/dist/mcp/const.js +1 -4
- package/dist/mcp/const.js.map +1 -1
- package/dist/mcp/errors.js +1 -4
- package/dist/mcp/errors.js.map +1 -1
- package/dist/mcp/legacy_server.js +1 -4
- package/dist/mcp/legacy_server.js.map +1 -1
- package/dist/mcp/proxy.js +1 -4
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/remote_tool_call.js +1 -4
- package/dist/mcp/remote_tool_call.js.map +1 -1
- package/dist/mcp/server.js +1 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stateless_server.js +1 -4
- package/dist/mcp/stateless_server.js.map +1 -1
- package/dist/mcp/task_execution.js +1 -4
- package/dist/mcp/task_execution.js.map +1 -1
- package/dist/mcp/tool_call_engine.js +1 -4
- package/dist/mcp/tool_call_engine.js.map +1 -1
- package/dist/mcp/tool_call_error_mapper.js +1 -4
- package/dist/mcp/tool_call_error_mapper.js.map +1 -1
- package/dist/mcp/tool_call_telemetry.js +1 -4
- package/dist/mcp/tool_call_telemetry.js.map +1 -1
- package/dist/mcp/tool_dispatch.js +1 -4
- package/dist/mcp/tool_dispatch.js.map +1 -1
- package/dist/mcp/utils.js +1 -4
- package/dist/mcp/utils.js.map +1 -1
- package/dist/payments/const.js +1 -4
- package/dist/payments/const.js.map +1 -1
- package/dist/payments/helpers.js +1 -4
- package/dist/payments/helpers.js.map +1 -1
- package/dist/payments/index.js +1 -4
- package/dist/payments/index.js.map +1 -1
- package/dist/payments/resolve.js +1 -4
- package/dist/payments/resolve.js.map +1 -1
- package/dist/payments/skyfire.js +1 -4
- package/dist/payments/skyfire.js.map +1 -1
- package/dist/payments/types.js +1 -4
- package/dist/payments/types.js.map +1 -1
- package/dist/payments/x402.js +1 -4
- package/dist/payments/x402.js.map +1 -1
- package/dist/prompts/index.js +1 -4
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/prompt_service.js +1 -4
- package/dist/prompts/prompt_service.js.map +1 -1
- package/dist/resources/api_resources.js +1 -4
- package/dist/resources/api_resources.js.map +1 -1
- package/dist/resources/resource_service.js +1 -4
- 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.js +1 -4
- package/dist/state.js.map +1 -1
- package/dist/stdio.js +1 -4
- package/dist/stdio.js.map +1 -1
- package/dist/telemetry.js +1 -4
- package/dist/telemetry.js.map +1 -1
- package/dist/test_kit/cases/actors.cases.js +1 -4
- package/dist/test_kit/cases/actors.cases.js.map +1 -1
- package/dist/test_kit/cases/apps.cases.js +1 -4
- package/dist/test_kit/cases/apps.cases.js.map +1 -1
- package/dist/test_kit/cases/payments.cases.js +1 -4
- package/dist/test_kit/cases/payments.cases.js.map +1 -1
- package/dist/test_kit/cases/registration.cases.js +1 -4
- package/dist/test_kit/cases/registration.cases.js.map +1 -1
- package/dist/test_kit/cases/schedules.cases.js +1 -4
- package/dist/test_kit/cases/schedules.cases.js.map +1 -1
- package/dist/test_kit/cases/storage.cases.js +1 -4
- package/dist/test_kit/cases/storage.cases.js.map +1 -1
- package/dist/test_kit/cases/tasks.cases.js +1 -4
- package/dist/test_kit/cases/tasks.cases.js.map +1 -1
- package/dist/test_kit/cases/tools.cases.js +1 -4
- package/dist/test_kit/cases/tools.cases.js.map +1 -1
- package/dist/test_kit/cases/versions.cases.d.ts +3 -0
- package/dist/test_kit/cases/versions.cases.d.ts.map +1 -0
- package/dist/test_kit/cases/versions.cases.js +738 -0
- package/dist/test_kit/cases/versions.cases.js.map +1 -0
- package/dist/test_kit/helpers.d.ts +1 -1
- package/dist/test_kit/helpers.d.ts.map +1 -1
- package/dist/test_kit/helpers.js +2 -5
- package/dist/test_kit/helpers.js.map +1 -1
- package/dist/test_kit/index.d.ts +1 -0
- package/dist/test_kit/index.d.ts.map +1 -1
- package/dist/test_kit/index.js +4 -4
- package/dist/test_kit/index.js.map +1 -1
- package/dist/test_kit/mcp_client.js +1 -4
- package/dist/test_kit/mcp_client.js.map +1 -1
- package/dist/test_kit/register.js +1 -4
- package/dist/test_kit/register.js.map +1 -1
- package/dist/test_kit/tsconfig.tsbuildinfo +1 -1
- package/dist/test_kit/types.js +1 -4
- package/dist/test_kit/types.js.map +1 -1
- package/dist/tools/actor_input_schema.js +1 -4
- package/dist/tools/actor_input_schema.js.map +1 -1
- package/dist/tools/actor_tool_naming.js +1 -4
- package/dist/tools/actor_tool_naming.js.map +1 -1
- package/dist/tools/actors/actor_definition.js +1 -4
- package/dist/tools/actors/actor_definition.js.map +1 -1
- package/dist/tools/actors/actor_executor.js +1 -4
- package/dist/tools/actors/actor_executor.js.map +1 -1
- package/dist/tools/actors/actor_run_response.js +1 -4
- package/dist/tools/actors/actor_run_response.js.map +1 -1
- package/dist/tools/actors/actor_tool_contract.js +1 -4
- package/dist/tools/actors/actor_tool_contract.js.map +1 -1
- package/dist/tools/actors/actor_tools_factory.js +1 -4
- package/dist/tools/actors/actor_tools_factory.js.map +1 -1
- package/dist/tools/actors/call_actor.js +1 -4
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/actors/delete_actor.js +1 -4
- package/dist/tools/actors/delete_actor.js.map +1 -1
- package/dist/tools/actors/fetch_actor_details.js +1 -4
- package/dist/tools/actors/fetch_actor_details.js.map +1 -1
- package/dist/tools/actors/get_actor_list.js +1 -4
- package/dist/tools/actors/get_actor_list.js.map +1 -1
- package/dist/tools/actors/search_actors.js +1 -4
- package/dist/tools/actors/search_actors.js.map +1 -1
- package/dist/tools/api/apify_api_blocklist.js +1 -4
- package/dist/tools/api/apify_api_blocklist.js.map +1 -1
- package/dist/tools/api/apify_api_details.js +1 -4
- package/dist/tools/api/apify_api_details.js.map +1 -1
- package/dist/tools/api/apify_api_path.js +1 -4
- package/dist/tools/api/apify_api_path.js.map +1 -1
- package/dist/tools/api/apify_api_read.js +1 -4
- package/dist/tools/api/apify_api_read.js.map +1 -1
- package/dist/tools/api/apify_api_request.js +1 -4
- package/dist/tools/api/apify_api_request.js.map +1 -1
- package/dist/tools/api/apify_api_search.js +1 -4
- package/dist/tools/api/apify_api_search.js.map +1 -1
- package/dist/tools/api/apify_api_spec.js +1 -4
- package/dist/tools/api/apify_api_spec.js.map +1 -1
- package/dist/tools/api/apify_api_write.js +1 -4
- package/dist/tools/api/apify_api_write.js.map +1 -1
- package/dist/tools/builds/build_actor.d.ts.map +1 -1
- package/dist/tools/builds/build_actor.js +10 -8
- package/dist/tools/builds/build_actor.js.map +1 -1
- package/dist/tools/builds/build_helpers.js +1 -4
- package/dist/tools/builds/build_helpers.js.map +1 -1
- package/dist/tools/builds/get_actor_build.js +1 -4
- package/dist/tools/builds/get_actor_build.js.map +1 -1
- package/dist/tools/builds/get_actor_build_list.d.ts.map +1 -1
- package/dist/tools/builds/get_actor_build_list.js +6 -7
- package/dist/tools/builds/get_actor_build_list.js.map +1 -1
- package/dist/tools/builds/get_actor_build_log.js +1 -4
- package/dist/tools/builds/get_actor_build_log.js.map +1 -1
- package/dist/tools/dev/report_problem.js +1 -4
- package/dist/tools/dev/report_problem.js.map +1 -1
- package/dist/tools/docs/fetch_apify_docs.js +1 -4
- package/dist/tools/docs/fetch_apify_docs.js.map +1 -1
- package/dist/tools/docs/search_apify_docs.js +1 -4
- package/dist/tools/docs/search_apify_docs.js.map +1 -1
- package/dist/tools/index.js +1 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +7 -6
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/runs/abort_actor_run.js +1 -4
- package/dist/tools/runs/abort_actor_run.js.map +1 -1
- package/dist/tools/runs/get_actor_run.js +1 -4
- package/dist/tools/runs/get_actor_run.js.map +1 -1
- package/dist/tools/runs/get_actor_run_list.d.ts.map +1 -1
- package/dist/tools/runs/get_actor_run_list.js +6 -7
- package/dist/tools/runs/get_actor_run_list.js.map +1 -1
- package/dist/tools/runs/get_actor_run_log.js +1 -4
- package/dist/tools/runs/get_actor_run_log.js.map +1 -1
- package/dist/tools/schedules/create_schedule.js +1 -4
- package/dist/tools/schedules/create_schedule.js.map +1 -1
- package/dist/tools/schedules/delete_schedule.js +1 -4
- package/dist/tools/schedules/delete_schedule.js.map +1 -1
- package/dist/tools/schedules/get_schedule.js +1 -4
- package/dist/tools/schedules/get_schedule.js.map +1 -1
- package/dist/tools/schedules/schedule_helpers.d.ts.map +1 -1
- package/dist/tools/schedules/schedule_helpers.js +3 -5
- package/dist/tools/schedules/schedule_helpers.js.map +1 -1
- package/dist/tools/schedules/update_schedule.js +2 -5
- package/dist/tools/schedules/update_schedule.js.map +1 -1
- package/dist/tools/storage/get_dataset.js +1 -4
- package/dist/tools/storage/get_dataset.js.map +1 -1
- package/dist/tools/storage/get_dataset_items.js +1 -4
- package/dist/tools/storage/get_dataset_items.js.map +1 -1
- package/dist/tools/storage/get_dataset_list.js +1 -4
- package/dist/tools/storage/get_dataset_list.js.map +1 -1
- package/dist/tools/storage/get_dataset_schema.js +1 -4
- package/dist/tools/storage/get_dataset_schema.js.map +1 -1
- package/dist/tools/storage/get_key_value_store.js +1 -4
- package/dist/tools/storage/get_key_value_store.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_keys.js +1 -4
- package/dist/tools/storage/get_key_value_store_keys.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_list.js +1 -4
- package/dist/tools/storage/get_key_value_store_list.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_record.js +1 -4
- package/dist/tools/storage/get_key_value_store_record.js.map +1 -1
- package/dist/tools/storage/storage_helpers.js +1 -4
- package/dist/tools/storage/storage_helpers.js.map +1 -1
- package/dist/tools/structured_output_schemas.d.ts +308 -0
- package/dist/tools/structured_output_schemas.d.ts.map +1 -1
- package/dist/tools/structured_output_schemas.js +93 -4
- package/dist/tools/structured_output_schemas.js.map +1 -1
- package/dist/tools/tasks/create_actor_task.d.ts.map +1 -1
- package/dist/tools/tasks/create_actor_task.js +3 -5
- package/dist/tools/tasks/create_actor_task.js.map +1 -1
- package/dist/tools/tasks/get_actor_task.js +1 -4
- package/dist/tools/tasks/get_actor_task.js.map +1 -1
- package/dist/tools/tasks/publish_actor_task.js +1 -4
- package/dist/tools/tasks/publish_actor_task.js.map +1 -1
- package/dist/tools/tasks/task_helpers.d.ts +0 -16
- package/dist/tools/tasks/task_helpers.d.ts.map +1 -1
- package/dist/tools/tasks/task_helpers.js +2 -35
- package/dist/tools/tasks/task_helpers.js.map +1 -1
- package/dist/tools/tasks/unpublish_actor_task.js +1 -4
- package/dist/tools/tasks/unpublish_actor_task.js.map +1 -1
- package/dist/tools/tasks/update_actor_task.d.ts.map +1 -1
- package/dist/tools/tasks/update_actor_task.js +3 -5
- package/dist/tools/tasks/update_actor_task.js.map +1 -1
- package/dist/tools/versions/create_actor.d.ts +11 -0
- package/dist/tools/versions/create_actor.d.ts.map +1 -0
- package/dist/tools/versions/create_actor.js +133 -0
- package/dist/tools/versions/create_actor.js.map +1 -0
- package/dist/tools/versions/create_actor_version.d.ts +14 -0
- package/dist/tools/versions/create_actor_version.d.ts.map +1 -0
- package/dist/tools/versions/create_actor_version.js +168 -0
- package/dist/tools/versions/create_actor_version.js.map +1 -0
- package/dist/tools/versions/delete_actor_version.d.ts +12 -0
- package/dist/tools/versions/delete_actor_version.d.ts.map +1 -0
- package/dist/tools/versions/delete_actor_version.js +121 -0
- package/dist/tools/versions/delete_actor_version.js.map +1 -0
- package/dist/tools/versions/get_actor_version.d.ts.map +1 -0
- package/dist/tools/{source → versions}/get_actor_version.js +10 -93
- package/dist/tools/versions/get_actor_version.js.map +1 -0
- package/dist/tools/{source → versions}/source_files.d.ts +6 -2
- package/dist/tools/versions/source_files.d.ts.map +1 -0
- package/dist/tools/{source → versions}/source_files.js +8 -11
- package/dist/tools/versions/source_files.js.map +1 -0
- package/dist/tools/versions/source_helpers.d.ts +154 -0
- package/dist/tools/versions/source_helpers.d.ts.map +1 -0
- package/dist/tools/versions/source_helpers.js +439 -0
- package/dist/tools/versions/source_helpers.js.map +1 -0
- package/dist/tools/versions/update_actor_version.d.ts +15 -0
- package/dist/tools/versions/update_actor_version.d.ts.map +1 -0
- package/dist/tools/versions/update_actor_version.js +447 -0
- package/dist/tools/versions/update_actor_version.js.map +1 -0
- package/dist/tools/widgets/call_actor_widget.js +1 -4
- package/dist/tools/widgets/call_actor_widget.js.map +1 -1
- package/dist/tools/widgets/fetch_actor_details_widget.js +1 -4
- package/dist/tools/widgets/fetch_actor_details_widget.js.map +1 -1
- package/dist/tools/widgets/get_actor_run_widget.js +1 -4
- package/dist/tools/widgets/get_actor_run_widget.js.map +1 -1
- package/dist/tools/widgets/search_actors_widget.js +1 -4
- package/dist/tools/widgets/search_actors_widget.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.js +1 -4
- package/dist/types.js.map +1 -1
- package/dist/utils/actor.js +1 -4
- package/dist/utils/actor.js.map +1 -1
- package/dist/utils/actor_card.js +1 -4
- package/dist/utils/actor_card.js.map +1 -1
- package/dist/utils/actor_details.js +1 -4
- package/dist/utils/actor_details.js.map +1 -1
- package/dist/utils/actor_search.js +1 -4
- package/dist/utils/actor_search.js.map +1 -1
- package/dist/utils/ajv.js +1 -4
- package/dist/utils/ajv.js.map +1 -1
- package/dist/utils/apify_docs.js +1 -4
- package/dist/utils/apify_docs.js.map +1 -1
- package/dist/utils/apify_errors.js +1 -4
- package/dist/utils/apify_errors.js.map +1 -1
- package/dist/utils/apify_properties.js +1 -4
- package/dist/utils/apify_properties.js.map +1 -1
- package/dist/utils/apify_resource_id.d.ts +18 -0
- package/dist/utils/apify_resource_id.d.ts.map +1 -0
- package/dist/utils/apify_resource_id.js +33 -0
- package/dist/utils/apify_resource_id.js.map +1 -0
- package/dist/utils/auth.js +1 -4
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/console_link.js +1 -4
- package/dist/utils/console_link.js.map +1 -1
- package/dist/utils/encode_text.js +1 -4
- package/dist/utils/encode_text.js.map +1 -1
- package/dist/utils/generic.js +1 -4
- package/dist/utils/generic.js.map +1 -1
- 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.js +1 -4
- package/dist/utils/mcp_clients.js.map +1 -1
- package/dist/utils/payment_errors.js +1 -4
- package/dist/utils/payment_errors.js.map +1 -1
- package/dist/utils/pricing_info.js +1 -4
- package/dist/utils/pricing_info.js.map +1 -1
- package/dist/utils/progress.js +1 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/schema_generation.js +1 -4
- package/dist/utils/schema_generation.js.map +1 -1
- package/dist/utils/server-instructions/index.js +1 -4
- package/dist/utils/server-instructions/index.js.map +1 -1
- package/dist/utils/server_mode.js +1 -4
- package/dist/utils/server_mode.js.map +1 -1
- package/dist/utils/tool_categories_helpers.js +1 -4
- package/dist/utils/tool_categories_helpers.js.map +1 -1
- package/dist/utils/tool_status.js +1 -4
- package/dist/utils/tool_status.js.map +1 -1
- package/dist/utils/tools.js +1 -4
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools_loader.d.ts +2 -1
- package/dist/utils/tools_loader.d.ts.map +1 -1
- package/dist/utils/tools_loader.js +4 -6
- package/dist/utils/tools_loader.js.map +1 -1
- package/dist/utils/ttl_lru.js +1 -4
- package/dist/utils/ttl_lru.js.map +1 -1
- package/dist/utils/userid_cache.js +1 -4
- package/dist/utils/userid_cache.js.map +1 -1
- package/dist/utils/version.js +1 -4
- package/dist/utils/version.js.map +1 -1
- package/dist/web/dist/actor-run-widget.js +0 -2
- package/dist/web/dist/search-actors-widget.js +0 -2
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +1 -1
- package/dist/tools/source/get_actor_version.d.ts.map +0 -1
- package/dist/tools/source/get_actor_version.js.map +0 -1
- package/dist/tools/source/source_files.d.ts.map +0 -1
- package/dist/tools/source/source_files.js.map +0 -1
- /package/dist/tools/{source → versions}/get_actor_version.d.ts +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ActorSourceType, ApifyApiError } from 'apify-client';
|
|
2
|
+
import dedent from 'dedent';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { APIFY_ERROR_TYPE_TOO_FEW_VERSIONS, HELPER_TOOLS } from '../../const.js';
|
|
5
|
+
import { UserInputError } from '../../errors.js';
|
|
6
|
+
import { TOOL_TYPE } from '../../types.js';
|
|
7
|
+
import { compileSchema } from '../../utils/ajv.js';
|
|
8
|
+
import { respondAborted, respondOk, respondUserError } from '../../utils/mcp.js';
|
|
9
|
+
import { deleteActorVersionToolOutputSchema } from '../structured_output_schemas.js';
|
|
10
|
+
import { buildFilesManifest, buildFilesRevision } from './source_files.js';
|
|
11
|
+
import { extractSourceFiles, fetchActor, resolveVersion, respondToSourceToolError } from './source_helpers.js';
|
|
12
|
+
const deleteActorVersionArgs = z.object({
|
|
13
|
+
actor: z
|
|
14
|
+
.string()
|
|
15
|
+
.min(1)
|
|
16
|
+
.describe('The Actor to delete the version from: its ID, its name (resolved against your own Actors), or its full name as username/name or username~name.'),
|
|
17
|
+
versionNumber: z.string().min(1).describe('The version to delete, in MAJOR.MINOR form, for example 0.2.'),
|
|
18
|
+
expectedRevision: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('The revision of the version when you read it. When given, the delete is refused if any file of the ' +
|
|
22
|
+
'version changed since. Only a version stored as files has a revision.'),
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Throws `UserInputError` unless the version's revision, computed as get-actor-version and the write tools compute it,
|
|
26
|
+
* is `expectedRevision`, ignoring case. A version not stored as files has no revision.
|
|
27
|
+
*/
|
|
28
|
+
function validateRevision(version, fullName, expectedRevision) {
|
|
29
|
+
if (version.sourceType !== ActorSourceType.SourceFiles) {
|
|
30
|
+
throw new UserInputError(`Nothing was deleted: version ${version.versionNumber} of ${fullName} has source type ${version.sourceType}, ` +
|
|
31
|
+
'and only a version stored as files has a revision to compare expectedRevision with.');
|
|
32
|
+
}
|
|
33
|
+
if (!version.sourceFiles) {
|
|
34
|
+
throw new UserInputError(`Nothing was deleted: version ${version.versionNumber} of ${fullName} came back without its source, so it ` +
|
|
35
|
+
'has no revision to compare expectedRevision with.');
|
|
36
|
+
}
|
|
37
|
+
const revision = buildFilesRevision(buildFilesManifest(extractSourceFiles(version, `Version ${version.versionNumber} of ${fullName}`)));
|
|
38
|
+
if (expectedRevision.toLowerCase() === revision)
|
|
39
|
+
return;
|
|
40
|
+
throw new UserInputError(`Nothing was deleted: expectedRevision failed with REVISION_MISMATCH. The version's revision is ${revision}, ` +
|
|
41
|
+
`not ${expectedRevision}.`);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* https://docs.apify.com/api/v2/actor-get
|
|
45
|
+
* /v2/actors/{actorId}
|
|
46
|
+
* https://docs.apify.com/api/v2/actor-version-delete
|
|
47
|
+
* /v2/actors/{actorId}/versions/{versionNumber}
|
|
48
|
+
*
|
|
49
|
+
* The Actor is read first: apify-client swallows a 404 on delete, so a missing version would otherwise look deleted.
|
|
50
|
+
* The platform refuses to delete the last version, and leaves the version's builds and tags in place.
|
|
51
|
+
*/
|
|
52
|
+
export const deleteActorVersion = Object.freeze({
|
|
53
|
+
type: TOOL_TYPE.INTERNAL,
|
|
54
|
+
name: HELPER_TOOLS.ACTOR_VERSION_DELETE,
|
|
55
|
+
title: 'Delete Actor version',
|
|
56
|
+
description: dedent `
|
|
57
|
+
Delete one version of an Actor, with its source and environment variables; a deleted version cannot be restored. The platform refuses to delete an Actor's last version.
|
|
58
|
+
The version's builds stay, and so do the tags that point to them: a run with such a tag still uses that build. A build of the version that is still running keeps running, and takes its tag if it succeeds.
|
|
59
|
+
|
|
60
|
+
USAGE:
|
|
61
|
+
- Use only when the user explicitly wants the version removed.
|
|
62
|
+
|
|
63
|
+
USAGE EXAMPLES:
|
|
64
|
+
- user_input: Delete version 0.2 of my Actor john/my-scraper`,
|
|
65
|
+
inputSchema: z.toJSONSchema(deleteActorVersionArgs),
|
|
66
|
+
outputSchema: deleteActorVersionToolOutputSchema,
|
|
67
|
+
ajvValidate: compileSchema(z.toJSONSchema(deleteActorVersionArgs)),
|
|
68
|
+
annotations: {
|
|
69
|
+
title: 'Delete Actor version',
|
|
70
|
+
readOnlyHint: false,
|
|
71
|
+
destructiveHint: true,
|
|
72
|
+
idempotentHint: true,
|
|
73
|
+
openWorldHint: false,
|
|
74
|
+
},
|
|
75
|
+
call: async (toolArgs) => {
|
|
76
|
+
var _a;
|
|
77
|
+
const { args, apifyClient: client, signal, loadedToolNames } = toolArgs;
|
|
78
|
+
const parsed = deleteActorVersionArgs.parse(args);
|
|
79
|
+
try {
|
|
80
|
+
const { actor, fullName } = await fetchActor(client, parsed.actor);
|
|
81
|
+
const version = resolveVersion(actor, parsed.versionNumber, parsed.actor);
|
|
82
|
+
const { versionNumber } = version;
|
|
83
|
+
// AJV turns a null expectedRevision into an empty string, which no version has, so it counts as not given.
|
|
84
|
+
if (parsed.expectedRevision)
|
|
85
|
+
validateRevision(version, fullName, parsed.expectedRevision);
|
|
86
|
+
// A cancel before the DELETE deletes nothing; per the MCP spec the cancelled request gets no response.
|
|
87
|
+
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
88
|
+
return respondAborted();
|
|
89
|
+
try {
|
|
90
|
+
await client.actor(actor.id).version(versionNumber).delete();
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof ApifyApiError && error.type === APIFY_ERROR_TYPE_TOO_FEW_VERSIONS) {
|
|
94
|
+
return respondUserError(`Version ${versionNumber} is the only version of ${fullName}, and an Actor keeps at least one version.`, { httpStatus: error.statusCode });
|
|
95
|
+
}
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
const summary = `Deleted version ${versionNumber} of ${fullName}.`;
|
|
99
|
+
const buildTool = loadedToolNames.includes(HELPER_TOOLS.ACTOR_BUILD)
|
|
100
|
+
? `${HELPER_TOOLS.ACTOR_BUILD} and `
|
|
101
|
+
: '';
|
|
102
|
+
// A tag points to the build it was last given to, which may be a build of another version than the one with
|
|
103
|
+
// that buildTag.
|
|
104
|
+
const tags = Object.entries((_a = actor.taggedBuilds) !== null && _a !== void 0 ? _a : {})
|
|
105
|
+
.filter(([, { buildNumber }]) => buildNumber === null || buildNumber === void 0 ? void 0 : buildNumber.startsWith(`${versionNumber}.`))
|
|
106
|
+
.map(([tag]) => tag);
|
|
107
|
+
const structuredContent = { actorId: actor.id, fullName, versionNumber, deleted: true, tags };
|
|
108
|
+
// build-actor takes one tag, so the text names one build per tag.
|
|
109
|
+
const text = tags.length > 0
|
|
110
|
+
? `${summary}\nRuns with tag ${tags.join(', ')} still use the deleted version's build until each tag ` +
|
|
111
|
+
`points to another build, such as one of another version made with ${buildTool}` +
|
|
112
|
+
`tag ${tags.join(', then one with tag ')}.`
|
|
113
|
+
: summary;
|
|
114
|
+
return respondOk([JSON.stringify(structuredContent), text], { structuredContent });
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
return respondToSourceToolError(error);
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=delete_actor_version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete_actor_version.js","sourceRoot":"","sources":["../../../src/tools/versions/delete_actor_version.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iCAAiC,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/G,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,CAAC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AAC;YAClB,OAAO,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACvF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_actor_version.d.ts","sourceRoot":"","sources":["../../../src/tools/versions/get_actor_version.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AA4HnF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SA6EnB,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
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]="9a02aa21-6712-56af-a634-93a1e782edda")}catch(e){}}();
|
|
3
1
|
import { posix } from 'node:path';
|
|
4
|
-
import { ActorSourceType } from 'apify-client';
|
|
5
2
|
import dedent from 'dedent';
|
|
6
3
|
import { z } from 'zod';
|
|
7
4
|
import { HELPER_TOOLS, MAX_INLINE_BYTES } from '../../const.js';
|
|
@@ -9,15 +6,15 @@ import { UserInputError } from '../../errors.js';
|
|
|
9
6
|
import { TOOL_TYPE } from '../../types.js';
|
|
10
7
|
import { compileSchema } from '../../utils/ajv.js';
|
|
11
8
|
import { respondOk, respondUserError } from '../../utils/mcp.js';
|
|
12
|
-
import { listVersionNumbers } from '../builds/build_helpers.js';
|
|
13
9
|
import { getActorVersionToolOutputSchema } from '../structured_output_schemas.js';
|
|
14
10
|
import { buildFilesManifest, buildFilesRevision } from './source_files.js';
|
|
11
|
+
import { extractSourceFiles, fetchActor, resolveVersion, respondToSourceToolError } from './source_helpers.js';
|
|
15
12
|
const INLINE_LIMIT_KIB = MAX_INLINE_BYTES / 1024;
|
|
16
13
|
const getActorVersionArgs = z.object({
|
|
17
14
|
actor: z
|
|
18
15
|
.string()
|
|
19
16
|
.min(1)
|
|
20
|
-
.describe('The Actor to read: its ID, or its full name as username/name or username~name.
|
|
17
|
+
.describe('The Actor to read: its ID, its name (resolved against your own Actors), or its full name as username/name or username~name.'),
|
|
21
18
|
// Format is not enforced by a regex: the lookup against the Actor's versions rejects anything that is not an
|
|
22
19
|
// existing version with a soft fail.
|
|
23
20
|
versionNumber: z
|
|
@@ -41,80 +38,6 @@ const getActorVersionArgs = z.object({
|
|
|
41
38
|
.optional()
|
|
42
39
|
.describe('Number of lines to return from startLine; defaults to the rest of the file. Only with exactly one path in paths.'),
|
|
43
40
|
});
|
|
44
|
-
/** The requested version, or the only one when none is requested; throws `UserInputError` otherwise. */
|
|
45
|
-
function resolveVersion(actor, requestedVersionNumber, actorSelector) {
|
|
46
|
-
const versionNumbers = listVersionNumbers(actor);
|
|
47
|
-
if (requestedVersionNumber === undefined && versionNumbers.length !== 1) {
|
|
48
|
-
// The source type and build tag tell the caller which version holds the code it is after.
|
|
49
|
-
const versions = actor.versions
|
|
50
|
-
.filter((version) => version.versionNumber !== undefined)
|
|
51
|
-
.map(({ versionNumber, sourceType, buildTag }) => {
|
|
52
|
-
const tag = buildTag ? `, build tag ${buildTag}` : '';
|
|
53
|
-
return `${versionNumber} (${sourceType}${tag})`;
|
|
54
|
-
});
|
|
55
|
-
throw new UserInputError(`Specify versionNumber; this Actor has versions: ${versions.join(', ')}.`);
|
|
56
|
-
}
|
|
57
|
-
const versionNumber = requestedVersionNumber !== null && requestedVersionNumber !== void 0 ? requestedVersionNumber : versionNumbers[0];
|
|
58
|
-
const version = actor.versions.find((candidate) => candidate.versionNumber === versionNumber);
|
|
59
|
-
if (!version) {
|
|
60
|
-
throw new UserInputError(`Actor '${actorSelector}' has no version ${versionNumber}; available versions: ${versionNumbers.join(', ')}.`);
|
|
61
|
-
}
|
|
62
|
-
return { ...version, versionNumber };
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* The URL without what can grant access to it: the query string, the password, and, for http and https, the user. An
|
|
66
|
-
* SSH user such as `git@` is not a secret and stays. A URL the parser cannot read, such as
|
|
67
|
-
* `git@github.com:user/repo.git`, loses only its query string.
|
|
68
|
-
*/
|
|
69
|
-
function formatUrlWithoutSecrets(url) {
|
|
70
|
-
if (URL.canParse(url)) {
|
|
71
|
-
const parsed = new URL(url);
|
|
72
|
-
parsed.search = '';
|
|
73
|
-
parsed.password = '';
|
|
74
|
-
if (parsed.protocol === 'http:' || parsed.protocol === 'https:') {
|
|
75
|
-
parsed.username = '';
|
|
76
|
-
}
|
|
77
|
-
return parsed.href;
|
|
78
|
-
}
|
|
79
|
-
const queryIndex = url.indexOf('?');
|
|
80
|
-
if (queryIndex === -1)
|
|
81
|
-
return url;
|
|
82
|
-
const hashIndex = url.indexOf('#', queryIndex);
|
|
83
|
-
return url.slice(0, queryIndex) + (hashIndex === -1 ? '' : url.slice(hashIndex));
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Why a version not stored as files is refused, and what to use instead. A version keeps the URL fields of a source
|
|
87
|
-
* type it used before, so only the URL of its current type is named.
|
|
88
|
-
*/
|
|
89
|
-
function formatSourceTypeRefusal(version, versionLabel) {
|
|
90
|
-
if (version.sourceType === ActorSourceType.GitRepo) {
|
|
91
|
-
const url = version.gitRepoUrl ? ` ${formatUrlWithoutSecrets(version.gitRepoUrl)}` : '';
|
|
92
|
-
return `${versionLabel} has its files in the Git repository${url}, not stored on Apify, so this tool cannot work on them; use the repository.`;
|
|
93
|
-
}
|
|
94
|
-
if (version.sourceType === ActorSourceType.GitHubGist) {
|
|
95
|
-
const url = version.gitHubGistUrl ? ` ${formatUrlWithoutSecrets(version.gitHubGistUrl)}` : '';
|
|
96
|
-
return `${versionLabel} has its files in the GitHub gist${url}, not stored on Apify, so this tool cannot work on them; use the gist.`;
|
|
97
|
-
}
|
|
98
|
-
// TODO(#1452): Read zip-stored (TARBALL) versions with adm-zip 0.6.1 or later, within the download and unpacking
|
|
99
|
-
// limits the issue lists.
|
|
100
|
-
if (version.sourceType === ActorSourceType.Tarball) {
|
|
101
|
-
return `${versionLabel} is stored as a zip archive (apify push does this for sources over 3 MiB), and this tool cannot work on zip-stored versions yet.`;
|
|
102
|
-
}
|
|
103
|
-
// The API's legacy SOURCE_CODE type and any type added later are not in apify-client's enum.
|
|
104
|
-
const { sourceType } = version;
|
|
105
|
-
return `${versionLabel} has source type ${sourceType}, which this tool cannot work on; only versions stored as files are supported.`;
|
|
106
|
-
}
|
|
107
|
-
/** Throws `UserInputError` for a version not stored as files and for one whose source the API hides. */
|
|
108
|
-
function extractVersionFiles(version, versionLabel) {
|
|
109
|
-
if (version.sourceType !== ActorSourceType.SourceFiles) {
|
|
110
|
-
throw new UserInputError(formatSourceTypeRefusal(version, versionLabel));
|
|
111
|
-
}
|
|
112
|
-
// The API returns only the number, type, and build tag of a version whose source it hides from this account.
|
|
113
|
-
if (!version.sourceFiles) {
|
|
114
|
-
throw new UserInputError(`${versionLabel} came back without its source: the API hides it from accounts that cannot modify the Actor. Ask the Actor's owner for the source.`);
|
|
115
|
-
}
|
|
116
|
-
return buildFilesManifest(version.sourceFiles);
|
|
117
|
-
}
|
|
118
41
|
/** Lines with their line endings kept, so joined back they give the exact text. */
|
|
119
42
|
function splitLines(text) {
|
|
120
43
|
if (text === '')
|
|
@@ -224,19 +147,15 @@ export const getActorVersion = Object.freeze({
|
|
|
224
147
|
}
|
|
225
148
|
try {
|
|
226
149
|
// TODO: The Actor GET returns every file of every version; read only the files asked for once the API can.
|
|
227
|
-
|
|
228
|
-
const actor = await client.actor(parsed.actor).get();
|
|
229
|
-
// Extra path segments, such as username/name/runs/last, reach a sub-resource that is not an Actor.
|
|
230
|
-
if (!actor || typeof actor.name !== 'string' || typeof actor.username !== 'string') {
|
|
231
|
-
return respondUserError(`Actor '${parsed.actor}' not found. Give its ID or its full name, username/name; a name without the username is not enough.`);
|
|
232
|
-
}
|
|
233
|
-
const fullName = `${actor.username}/${actor.name}`;
|
|
150
|
+
const { actor, fullName } = await fetchActor(client, parsed.actor);
|
|
234
151
|
const version = resolveVersion(actor, parsed.versionNumber, parsed.actor);
|
|
235
|
-
const files =
|
|
152
|
+
const files = buildFilesManifest(extractSourceFiles(version, `Version ${version.versionNumber} of ${fullName}`));
|
|
153
|
+
const { buildTag } = version;
|
|
236
154
|
const structuredContent = {
|
|
237
155
|
actorId: actor.id,
|
|
238
156
|
fullName,
|
|
239
157
|
versionNumber: version.versionNumber,
|
|
158
|
+
...(buildTag && { buildTag }),
|
|
240
159
|
revision: buildFilesRevision(files),
|
|
241
160
|
files: files.map(({ path, sizeBytes, hash }) => ({ path, sizeBytes, hash })),
|
|
242
161
|
...selectContents(files, paths, lineRange),
|
|
@@ -245,9 +164,10 @@ export const getActorVersion = Object.freeze({
|
|
|
245
164
|
const omittedHint = lineRange
|
|
246
165
|
? 'ask for fewer lines with lineCount'
|
|
247
166
|
: 'ask for a file alone, or for part of it with startLine and lineCount';
|
|
167
|
+
const tag = buildTag ? ` (build tag ${buildTag})` : '';
|
|
248
168
|
// Names the requested files that did not come back, for a caller that reads only the text.
|
|
249
169
|
const summary = [
|
|
250
|
-
`Read version ${version.versionNumber} of ${fullName}.`,
|
|
170
|
+
`Read version ${version.versionNumber}${tag} of ${fullName}.`,
|
|
251
171
|
omittedPaths &&
|
|
252
172
|
`Left out over the ${INLINE_LIMIT_KIB} KiB limit: ${omittedPaths.join(', ')}; ${omittedHint}.`,
|
|
253
173
|
notFoundPaths &&
|
|
@@ -258,11 +178,8 @@ export const getActorVersion = Object.freeze({
|
|
|
258
178
|
return respondOk([JSON.stringify(structuredContent), summary], { structuredContent });
|
|
259
179
|
}
|
|
260
180
|
catch (error) {
|
|
261
|
-
|
|
262
|
-
return respondUserError(error.message);
|
|
263
|
-
throw error;
|
|
181
|
+
return respondToSourceToolError(error);
|
|
264
182
|
}
|
|
265
183
|
},
|
|
266
184
|
});
|
|
267
|
-
//# sourceMappingURL=get_actor_version.js.map
|
|
268
|
-
//# debugId=9a02aa21-6712-56af-a634-93a1e782edda
|
|
185
|
+
//# sourceMappingURL=get_actor_version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_actor_version.js","sourceRoot":"","sources":["../../../src/tools/versions/get_actor_version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/G,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI,CAAC;AAEjD,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,KAAK,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,6HAA6H,CAChI;IACL,6GAA6G;IAC7G,qCAAqC;IACrC,aAAa,EAAE,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 for base64. */
|
|
13
13
|
content: string;
|
|
14
|
+
/** The entry as stored, which a write sends back for a file it leaves alone. */
|
|
15
|
+
entry: ActorVersionSourceFile;
|
|
14
16
|
};
|
|
15
17
|
export declare function hasBinaryExtension(path: string): boolean;
|
|
16
18
|
/** Paths in JavaScript's default string order, so the manifest and the revision do not depend on the locale. */
|
|
17
19
|
export declare function compareSourcePaths(a: string, b: string): number;
|
|
18
20
|
/**
|
|
19
|
-
* Identifies the file set:
|
|
20
|
-
* in, so
|
|
21
|
+
* Identifies the file set: the JSON array of `[path, hash]` pairs of its regular files, sorted by path. JSON quotes
|
|
22
|
+
* each path and escapes quotes and control characters in it, so two different file sets never give the same text, as
|
|
23
|
+
* a stored name with NUL and a line break once did. The stored format does not go in, so a file stored as TEXT or as
|
|
24
|
+
* BASE64 gives the same revision.
|
|
21
25
|
*/
|
|
22
26
|
export declare function buildFilesRevision(files: readonly Pick<SourceFile, 'path' | 'hash'>[]): string;
|
|
23
27
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source_files.d.ts","sourceRoot":"","sources":["../../../src/tools/versions/source_files.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AA4D3D,qCAAqC;AACrC,MAAM,MAAM,UAAU,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,2GAA2G;IAC3G,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,KAAK,EAAE,sBAAsB,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxD;AAOD,gHAAgH;AAChH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAG9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,sBAAsB,GAAG,UAAU,CAc9E;AAED,4HAA4H;AAC5H,wBAAgB,aAAa,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAEnE;AAED,mHAAmH;AACnH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,GAAG,UAAU,EAAE,CAQ3F"}
|
|
@@ -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]="4abfae6a-7ffb-53f2-a005-41621ac9f11d")}catch(e){}}();
|
|
3
1
|
import { isUtf8 } from 'node:buffer';
|
|
4
2
|
import { createHash } from 'node:crypto';
|
|
5
3
|
import { posix } from 'node:path';
|
|
@@ -73,14 +71,14 @@ export function compareSourcePaths(a, b) {
|
|
|
73
71
|
return a < b ? -1 : 1;
|
|
74
72
|
}
|
|
75
73
|
/**
|
|
76
|
-
* Identifies the file set:
|
|
77
|
-
* in, so
|
|
74
|
+
* Identifies the file set: the JSON array of `[path, hash]` pairs of its regular files, sorted by path. JSON quotes
|
|
75
|
+
* each path and escapes quotes and control characters in it, so two different file sets never give the same text, as
|
|
76
|
+
* a stored name with NUL and a line break once did. The stored format does not go in, so a file stored as TEXT or as
|
|
77
|
+
* BASE64 gives the same revision.
|
|
78
78
|
*/
|
|
79
79
|
export function buildFilesRevision(files) {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
.map(({ path, hash }) => `${path}\0${hash}\n`);
|
|
83
|
-
return getSha256Prefix(lines.join(''));
|
|
80
|
+
const pairs = [...files].sort((a, b) => compareSourcePaths(a.path, b.path)).map(({ path, hash }) => [path, hash]);
|
|
81
|
+
return getSha256Prefix(JSON.stringify(pairs));
|
|
84
82
|
}
|
|
85
83
|
/**
|
|
86
84
|
* A file stored inline in the version, read as the build worker reads it: no `format` is TEXT, no `content` is empty,
|
|
@@ -92,7 +90,7 @@ export function buildInlineSourceFile(file) {
|
|
|
92
90
|
const content = storedContent !== null && storedContent !== void 0 ? storedContent : '';
|
|
93
91
|
const path = posix.normalize(name);
|
|
94
92
|
const bytes = Buffer.from(content, format === 'BASE64' ? 'base64' : 'utf8');
|
|
95
|
-
const common = { path, sizeBytes: bytes.length, hash: getSha256Prefix(bytes) };
|
|
93
|
+
const common = { path, sizeBytes: bytes.length, hash: getSha256Prefix(bytes), entry: file };
|
|
96
94
|
if (format !== 'BASE64') {
|
|
97
95
|
return { ...common, encoding: 'utf8', contentBytes: bytes.length, content };
|
|
98
96
|
}
|
|
@@ -117,5 +115,4 @@ export function buildFilesManifest(entries) {
|
|
|
117
115
|
}
|
|
118
116
|
return [...filesByPath.values()].sort((a, b) => compareSourcePaths(a.path, b.path));
|
|
119
117
|
}
|
|
120
|
-
//# sourceMappingURL=source_files.js.map
|
|
121
|
-
//# debugId=4abfae6a-7ffb-53f2-a005-41621ac9f11d
|
|
118
|
+
//# sourceMappingURL=source_files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source_files.js","sourceRoot":"","sources":["../../../src/tools/versions/source_files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlC;;;GAGG;AACH,MAAM,iBAAiB,GAAG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@@
|
|
|
1
|
+
import type { Actor, ActorVersion, ActorVersionSourceFile } from 'apify-client';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ApifyClient } from '../../apify_client.js';
|
|
4
|
+
import type { InternalToolArgs } from '../../types.js';
|
|
5
|
+
import type { ToolResponse } from '../../utils/mcp.js';
|
|
6
|
+
/** The input shape of one file sent whole. */
|
|
7
|
+
export declare const sourceFileArgs: z.ZodObject<{
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
encoding: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
base64: "base64";
|
|
12
|
+
utf8: "utf8";
|
|
13
|
+
}>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/**
|
|
16
|
+
* The logged copy of a source tool's arguments (`redactArgs`), built as an allowlist: `keys`, and each entry of the
|
|
17
|
+
* list under `listKey` with its `entryKeys`, and with its content and its edits' oldText and newText as `REDACTED`.
|
|
18
|
+
* File content can hold secrets, such as an API key written into the code.
|
|
19
|
+
*/
|
|
20
|
+
export declare function redactSourceToolArgs(args: Record<string, unknown>, fields: {
|
|
21
|
+
keys: readonly string[];
|
|
22
|
+
listKey: string;
|
|
23
|
+
entryKeys: readonly string[];
|
|
24
|
+
}): Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* The Actor by its ID, its name (resolved against the token's own Actors), or its full name, `username/name` or
|
|
27
|
+
* `username~name` (apify-client turns username/name into the API's username~name); throws `UserInputError` when there
|
|
28
|
+
* is none.
|
|
29
|
+
*/
|
|
30
|
+
export declare function fetchActor(client: ApifyClient, actorSelector: string): Promise<{
|
|
31
|
+
actor: Actor;
|
|
32
|
+
fullName: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** The requested version, or the only one when none is requested; throws `UserInputError` otherwise. */
|
|
35
|
+
export declare function resolveVersion(actor: Pick<Actor, 'versions'>, requestedVersionNumber: string | undefined, actorSelector: string): ActorVersion & {
|
|
36
|
+
versionNumber: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The version's stored entries, folders included. Throws `UserInputError` for a version not stored as files and for
|
|
40
|
+
* one whose source the API hides.
|
|
41
|
+
*/
|
|
42
|
+
export declare function extractSourceFiles(version: ActorVersion, versionLabel: string): ActorVersionSourceFile[];
|
|
43
|
+
/**
|
|
44
|
+
* The entry to store for a file sent whole: TEXT for utf8, BASE64 for base64, where no encoding means base64 for a
|
|
45
|
+
* binary extension, the rule get-actor-version reads by. The path is normalized the way get-actor-version lists it.
|
|
46
|
+
*/
|
|
47
|
+
export declare function buildSourceFileEntry({ path, content, encoding, }: z.infer<typeof sourceFileArgs>): ActorVersionSourceFile;
|
|
48
|
+
/**
|
|
49
|
+
* Throws `UserInputError` for content the stored file would not hold as sent: base64 that does not decode without
|
|
50
|
+
* loss, and text with a lone UTF-16 surrogate, which UTF-8 stores as U+FFFD.
|
|
51
|
+
*/
|
|
52
|
+
export declare function validateFileContent({ format, content }: ActorVersionSourceFile, label: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Throws `UserInputError` for a path with a control character, U+0000 to U+001F or U+007F, or with a lone UTF-16
|
|
55
|
+
* surrogate. The build writes the files to disk, where a file name cannot hold NUL, and UTF-8 stores a lone surrogate
|
|
56
|
+
* as U+FFFD.
|
|
57
|
+
*/
|
|
58
|
+
export declare function validatePathCharacters(path: string, label: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Throws `UserInputError` for a normalized path no file can be written at. The build worker refuses a version with a
|
|
61
|
+
* path outside the Actor root, so every build of it would fail; `.` and a path ending in a slash name a folder. A
|
|
62
|
+
* backslash is refused too: the build takes it as part of the file name, so src\main.js would land in the Actor root.
|
|
63
|
+
*/
|
|
64
|
+
export declare function validateFilePath(path: string, label: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* The paths of a version's files and folder entries, to check where a new file can go: one path cannot be both a file
|
|
67
|
+
* and a folder, and the build worker fails to write such a file. Each check and change looks up only the folders of
|
|
68
|
+
* its path, since comparing each file with every other took 8 s for 20,000 files.
|
|
69
|
+
*/
|
|
70
|
+
export declare class SourcePathIndex {
|
|
71
|
+
private readonly filePaths;
|
|
72
|
+
/** The files under each folder, at any depth, in the order they were added. */
|
|
73
|
+
private readonly filePathsByFolder;
|
|
74
|
+
private readonly folderPaths;
|
|
75
|
+
constructor(filePaths: Iterable<string>, folderPaths?: readonly string[]);
|
|
76
|
+
hasFile(path: string): boolean;
|
|
77
|
+
/** A file added again keeps its place in the order. */
|
|
78
|
+
addFile(path: string): void;
|
|
79
|
+
deleteFile(path: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Throws `UserInputError` when a new file at `path` collides with another file or folder: a file at a folder of
|
|
82
|
+
* `path`, or else the first file added under `path`, or else the first folder entry at or under `path`. A file at
|
|
83
|
+
* `path` itself is for the caller to check.
|
|
84
|
+
*/
|
|
85
|
+
validateNewFilePath(path: string, label: string): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The entries to send, one per file; throws `UserInputError` for a path no file can be written at, for content the
|
|
89
|
+
* stored file would not hold as sent, and for a path given twice, which leaves the version with two entries where the
|
|
90
|
+
* build uses the last.
|
|
91
|
+
*/
|
|
92
|
+
export declare function buildSourceFileEntries(files: readonly z.infer<typeof sourceFileArgs>[]): ActorVersionSourceFile[];
|
|
93
|
+
/** The build worker skips a file whose content is empty, so the caller hears of such files. */
|
|
94
|
+
export declare function buildEmptyFilesWarnings(paths: readonly string[]): {
|
|
95
|
+
warnings?: string[];
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* The response to a committed write. With autoBuild, a build of the version starts first; a cancel that arrives before
|
|
99
|
+
* the start gets the cancelled-call response. When the build starts, `buildStartedWarnings`, if given, replaces the
|
|
100
|
+
* warnings in `structuredContent`.
|
|
101
|
+
*/
|
|
102
|
+
export declare function respondAfterWrite(params: {
|
|
103
|
+
toolArgs: Pick<InternalToolArgs, 'apifyClient' | 'apifyToken' | 'loadedToolNames' | 'signal'>;
|
|
104
|
+
autoBuild: boolean;
|
|
105
|
+
target: {
|
|
106
|
+
actorId: string;
|
|
107
|
+
versionNumber: string;
|
|
108
|
+
};
|
|
109
|
+
structuredContent: Record<string, unknown>;
|
|
110
|
+
buildStartedWarnings?: string[];
|
|
111
|
+
summary: string;
|
|
112
|
+
}): Promise<ToolResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* The response to a POST that created a version from `sourceFiles`, as `respondAfterWrite` gives it: their manifest
|
|
115
|
+
* and revision as get-actor-version gives them, and the warnings about empty files followed by
|
|
116
|
+
* `extraWarning.withoutBuild`, or by `extraWarning.withBuild` when autoBuild starts a build.
|
|
117
|
+
*/
|
|
118
|
+
export declare function respondAfterCreate(params: {
|
|
119
|
+
toolArgs: Pick<InternalToolArgs, 'apifyClient' | 'apifyToken' | 'loadedToolNames' | 'signal'>;
|
|
120
|
+
autoBuild: boolean;
|
|
121
|
+
created: {
|
|
122
|
+
actorId: string;
|
|
123
|
+
fullName: string;
|
|
124
|
+
versionNumber: string;
|
|
125
|
+
};
|
|
126
|
+
sourceFiles: readonly ActorVersionSourceFile[];
|
|
127
|
+
extraWarning?: {
|
|
128
|
+
withoutBuild: string;
|
|
129
|
+
withBuild: string;
|
|
130
|
+
};
|
|
131
|
+
summary: string;
|
|
132
|
+
}): Promise<ToolResponse>;
|
|
133
|
+
/**
|
|
134
|
+
* A `UserInputError`, or the platform's refusal of a taken version number or of a version over the limit on the
|
|
135
|
+
* number of versions or on their combined size, as a soft failure with the platform's own message; anything else is
|
|
136
|
+
* rethrown for the tool-call engine to report. The engine would add a token-access hint to these 403s, which
|
|
137
|
+
* contradicts their reason.
|
|
138
|
+
*/
|
|
139
|
+
export declare function respondToSourceToolError(error: unknown): ToolResponse;
|
|
140
|
+
/**
|
|
141
|
+
* The response to an error of a create POST. apify-client retries the POST after a network error, a timeout, a 429,
|
|
142
|
+
* or a 5xx, so when the platform refuses a retry as taken (`takenErrorType`), an attempt it saved but did not answer
|
|
143
|
+
* may have created what it refused (`refused`, such as `version 0.2`): the response says so, then adds `note` when
|
|
144
|
+
* given. Any other error goes to `respondToSourceToolError`.
|
|
145
|
+
*/
|
|
146
|
+
export declare function respondToCreateError(error: unknown, params: {
|
|
147
|
+
takenErrorType: string;
|
|
148
|
+
loadedToolNames: readonly string[];
|
|
149
|
+
refused: string;
|
|
150
|
+
created: string;
|
|
151
|
+
sentFiles: string;
|
|
152
|
+
note?: string;
|
|
153
|
+
}): ToolResponse;
|
|
154
|
+
//# sourceMappingURL=source_helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source_helpers.d.ts","sourceRoot":"","sources":["../../../src/tools/versions/source_helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAS,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AASzD,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAI3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMvD,8CAA8C;AAC9C,eAAO,MAAM,cAAc;;;;;;;iBASzB,CAAC;AA0BH;;;;GAIG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACnF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAC5B,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,QA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