@apify/actors-mcp-server 0.11.5-beta.9 → 0.11.6-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/dist/const.d.ts +40 -25
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +39 -26
- package/dist/const.js.map +1 -1
- package/dist/index_internals.d.ts +30 -3
- package/dist/index_internals.d.ts.map +1 -1
- package/dist/index_internals.js +5 -3
- package/dist/index_internals.js.map +1 -1
- package/dist/mcp/proxy.js +1 -1
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +26 -22
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/utils.d.ts +2 -2
- package/dist/mcp/utils.d.ts.map +1 -1
- package/dist/mcp/utils.js +2 -2
- package/dist/mcp/utils.js.map +1 -1
- package/dist/payments/const.d.ts +2 -2
- package/dist/payments/const.d.ts.map +1 -1
- package/dist/payments/const.js +11 -11
- package/dist/payments/const.js.map +1 -1
- 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 +3 -3
- package/dist/resources/resource_service.js.map +1 -1
- package/dist/tools/{utils.d.ts → actor_input_schema.d.ts} +2 -17
- package/dist/tools/actor_input_schema.d.ts.map +1 -0
- package/dist/tools/{utils.js → actor_input_schema.js} +2 -49
- package/dist/tools/actor_input_schema.js.map +1 -0
- package/dist/tools/actor_tool_naming.d.ts +17 -0
- package/dist/tools/actor_tool_naming.d.ts.map +1 -0
- package/dist/tools/actor_tool_naming.js +49 -0
- package/dist/tools/actor_tool_naming.js.map +1 -0
- package/dist/tools/actors/actor_executor.js +1 -1
- package/dist/tools/actors/actor_executor.js.map +1 -1
- package/dist/tools/actors/actor_run_response.d.ts +2 -2
- package/dist/tools/actors/actor_run_response.d.ts.map +1 -1
- package/dist/tools/actors/actor_run_response.js +10 -15
- package/dist/tools/actors/actor_run_response.js.map +1 -1
- package/dist/tools/actors/actor_tools_factory.d.ts +1 -1
- package/dist/tools/actors/actor_tools_factory.d.ts.map +1 -1
- package/dist/tools/actors/actor_tools_factory.js +6 -5
- package/dist/tools/actors/actor_tools_factory.js.map +1 -1
- package/dist/tools/actors/add_actor.d.ts.map +1 -1
- package/dist/tools/actors/add_actor.js +8 -17
- package/dist/tools/actors/add_actor.js.map +1 -1
- package/dist/tools/actors/call_actor.d.ts +131 -1
- package/dist/tools/actors/call_actor.d.ts.map +1 -1
- package/dist/tools/actors/call_actor.js +484 -3
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/actors/fetch_actor_details.d.ts +88 -1
- package/dist/tools/actors/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/actors/fetch_actor_details.js +229 -1
- package/dist/tools/actors/fetch_actor_details.js.map +1 -1
- package/dist/tools/actors/search_actors.d.ts +22 -1
- package/dist/tools/actors/search_actors.d.ts.map +1 -1
- package/dist/tools/actors/search_actors.js +123 -8
- package/dist/tools/actors/search_actors.js.map +1 -1
- package/dist/tools/docs/fetch_apify_docs.d.ts.map +1 -1
- package/dist/tools/docs/fetch_apify_docs.js +11 -33
- package/dist/tools/docs/fetch_apify_docs.js.map +1 -1
- package/dist/tools/docs/search_apify_docs.js +6 -6
- package/dist/tools/docs/search_apify_docs.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +8 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry.d.ts +6 -6
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +9 -9
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/runs/abort_actor_run.d.ts.map +1 -1
- package/dist/tools/runs/abort_actor_run.js +4 -7
- package/dist/tools/runs/abort_actor_run.js.map +1 -1
- package/dist/tools/runs/get_actor_run.d.ts +28 -1
- package/dist/tools/runs/get_actor_run.d.ts.map +1 -1
- package/dist/tools/runs/get_actor_run.js +99 -2
- package/dist/tools/runs/get_actor_run.js.map +1 -1
- package/dist/tools/runs/get_actor_run_list.js +2 -2
- package/dist/tools/runs/get_actor_run_list.js.map +1 -1
- package/dist/tools/runs/get_actor_run_log.js +2 -2
- package/dist/tools/runs/get_actor_run_log.js.map +1 -1
- package/dist/tools/storage/get_dataset.d.ts.map +1 -1
- package/dist/tools/storage/get_dataset.js +7 -6
- package/dist/tools/storage/get_dataset.js.map +1 -1
- package/dist/tools/storage/get_dataset_items.d.ts.map +1 -1
- package/dist/tools/storage/get_dataset_items.js +6 -5
- package/dist/tools/storage/get_dataset_items.js.map +1 -1
- package/dist/tools/storage/get_dataset_list.js +4 -4
- package/dist/tools/storage/get_dataset_list.js.map +1 -1
- package/dist/tools/storage/get_dataset_schema.d.ts.map +1 -1
- package/dist/tools/storage/get_dataset_schema.js +9 -13
- package/dist/tools/storage/get_dataset_schema.js.map +1 -1
- package/dist/tools/storage/get_key_value_store.d.ts.map +1 -1
- package/dist/tools/storage/get_key_value_store.js +6 -5
- package/dist/tools/storage/get_key_value_store.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_keys.d.ts.map +1 -1
- package/dist/tools/storage/get_key_value_store_keys.js +5 -4
- package/dist/tools/storage/get_key_value_store_keys.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_list.js +4 -4
- package/dist/tools/storage/get_key_value_store_list.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_record.d.ts.map +1 -1
- package/dist/tools/storage/get_key_value_store_record.js +5 -4
- package/dist/tools/storage/get_key_value_store_record.js.map +1 -1
- package/dist/tools/storage/storage_helpers.d.ts +0 -15
- package/dist/tools/storage/storage_helpers.d.ts.map +1 -1
- package/dist/tools/storage/storage_helpers.js +9 -22
- package/dist/tools/storage/storage_helpers.js.map +1 -1
- package/dist/tools/widgets/call_actor_widget.d.ts.map +1 -1
- package/dist/tools/widgets/call_actor_widget.js +14 -17
- package/dist/tools/widgets/call_actor_widget.js.map +1 -1
- package/dist/tools/widgets/fetch_actor_details_widget.d.ts.map +1 -1
- package/dist/tools/widgets/fetch_actor_details_widget.js +8 -9
- package/dist/tools/widgets/fetch_actor_details_widget.js.map +1 -1
- package/dist/tools/widgets/get_actor_run_widget.js +4 -4
- package/dist/tools/widgets/get_actor_run_widget.js.map +1 -1
- package/dist/tools/widgets/search_actors_widget.d.ts.map +1 -1
- package/dist/tools/widgets/search_actors_widget.js +8 -10
- package/dist/tools/widgets/search_actors_widget.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/dist/utils/actor_details.js +1 -1
- package/dist/utils/actor_details.js.map +1 -1
- package/dist/utils/apify_docs.d.ts.map +1 -1
- package/dist/utils/apify_docs.js +16 -3
- package/dist/utils/apify_docs.js.map +1 -1
- package/dist/utils/mcp.d.ts +56 -9
- package/dist/utils/mcp.d.ts.map +1 -1
- package/dist/utils/mcp.js +80 -16
- package/dist/utils/mcp.js.map +1 -1
- package/dist/utils/payment_errors.js +2 -2
- package/dist/utils/payment_errors.js.map +1 -1
- package/dist/utils/server-instructions/index.d.ts +2 -2
- package/dist/utils/server-instructions/index.d.ts.map +1 -1
- package/dist/utils/server-instructions/index.js +19 -19
- package/dist/utils/server-instructions/index.js.map +1 -1
- package/dist/utils/server_mode.d.ts +5 -5
- package/dist/utils/server_mode.d.ts.map +1 -1
- package/dist/utils/server_mode.js +10 -10
- package/dist/utils/server_mode.js.map +1 -1
- package/dist/utils/tool_categories_helpers.d.ts +2 -2
- package/dist/utils/tool_categories_helpers.d.ts.map +1 -1
- package/dist/utils/tool_categories_helpers.js.map +1 -1
- package/dist/utils/tools.d.ts +2 -2
- package/dist/utils/tools.d.ts.map +1 -1
- package/dist/utils/tools.js +2 -2
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools_loader.d.ts +3 -3
- package/dist/utils/tools_loader.d.ts.map +1 -1
- package/dist/utils/tools_loader.js +12 -12
- package/dist/utils/tools_loader.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +1 -1
- package/dist/tools/actors/call_actor_common.d.ts +0 -132
- package/dist/tools/actors/call_actor_common.d.ts.map +0 -1
- package/dist/tools/actors/call_actor_common.js +0 -554
- package/dist/tools/actors/call_actor_common.js.map +0 -1
- package/dist/tools/actors/fetch_actor_details_common.d.ts +0 -89
- package/dist/tools/actors/fetch_actor_details_common.d.ts.map +0 -1
- package/dist/tools/actors/fetch_actor_details_common.js +0 -235
- package/dist/tools/actors/fetch_actor_details_common.js.map +0 -1
- package/dist/tools/actors/search_actors_common.d.ts +0 -25
- package/dist/tools/actors/search_actors_common.d.ts.map +0 -1
- package/dist/tools/actors/search_actors_common.js +0 -125
- package/dist/tools/actors/search_actors_common.js.map +0 -1
- package/dist/tools/runs/get_actor_run_common.d.ts +0 -29
- package/dist/tools/runs/get_actor_run_common.d.ts.map +0 -1
- package/dist/tools/runs/get_actor_run_common.js +0 -111
- package/dist/tools/runs/get_actor_run_common.js.map +0 -1
- package/dist/tools/utils.d.ts.map +0 -1
- package/dist/tools/utils.js.map +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import log from '@apify/log';
|
|
3
|
-
import { ALLOWED_DOC_DOMAINS,
|
|
3
|
+
import { ALLOWED_DOC_DOMAINS, HELPER_TOOLS } from '../../const.js';
|
|
4
4
|
import { fetchApifyDocsCache } from '../../state.js';
|
|
5
5
|
import { TOOL_TYPE } from '../../types.js';
|
|
6
6
|
import { compileSchema } from '../../utils/ajv.js';
|
|
7
7
|
import { logHttpError } from '../../utils/logging.js';
|
|
8
|
-
import {
|
|
9
|
-
import { classifyFailureCategory } from '../../utils/tool_status.js';
|
|
8
|
+
import { respondOk, respondServerError, respondUserError } from '../../utils/mcp.js';
|
|
10
9
|
import { fetchApifyDocsToolOutputSchema } from '../structured_output_schemas.js';
|
|
11
10
|
const fetchApifyDocsToolArgsSchema = z.object({
|
|
12
11
|
url: z
|
|
@@ -45,14 +44,14 @@ export function isAllowedDocsUrl(url) {
|
|
|
45
44
|
function buildFetchErrorMessage(url, detail) {
|
|
46
45
|
return `Failed to fetch the documentation page at "${url}". ${detail} \
|
|
47
46
|
Please verify the URL is correct and accessible. \
|
|
48
|
-
You can search for available documentation pages using the ${
|
|
47
|
+
You can search for available documentation pages using the ${HELPER_TOOLS.DOCS_SEARCH} tool.`;
|
|
49
48
|
}
|
|
50
49
|
export const fetchApifyDocs = Object.freeze({
|
|
51
50
|
type: TOOL_TYPE.INTERNAL,
|
|
52
|
-
name:
|
|
51
|
+
name: HELPER_TOOLS.DOCS_FETCH,
|
|
53
52
|
title: 'Fetch Apify docs',
|
|
54
53
|
description: `Fetch the full content of an Apify or Crawlee documentation page by its URL.
|
|
55
|
-
Use this after finding a relevant page with the ${
|
|
54
|
+
Use this after finding a relevant page with the ${HELPER_TOOLS.DOCS_SEARCH} tool.
|
|
56
55
|
|
|
57
56
|
USAGE:
|
|
58
57
|
- Use when you need the complete content of a specific docs page for detailed answers.
|
|
@@ -79,17 +78,11 @@ USAGE EXAMPLES:
|
|
|
79
78
|
const isAllowedDomain = isAllowedDocsUrl(url);
|
|
80
79
|
if (!isAllowedDomain) {
|
|
81
80
|
log.softFail(`[fetch-apify-docs] Invalid URL domain: ${url}`);
|
|
82
|
-
return
|
|
83
|
-
texts: [
|
|
84
|
-
`Invalid URL: "${url}". \
|
|
81
|
+
return respondUserError(`Invalid URL: "${url}". \
|
|
85
82
|
Only documentation URLs from Apify and Crawlee are allowed \
|
|
86
83
|
(starting with ${ALLOWED_DOC_DOMAINS.map((d) => `"${d}"`).join(' or ')}). \
|
|
87
84
|
Please provide a valid documentation URL. \
|
|
88
|
-
You can find documentation URLs using the ${
|
|
89
|
-
],
|
|
90
|
-
isError: true,
|
|
91
|
-
telemetry: { toolStatus: TOOL_STATUS.SOFT_FAIL, failureCategory: FAILURE_CATEGORY.INVALID_INPUT },
|
|
92
|
-
});
|
|
85
|
+
You can find documentation URLs using the ${HELPER_TOOLS.DOCS_SEARCH} tool.`);
|
|
93
86
|
}
|
|
94
87
|
// Cache by URL without fragment to avoid fetching the same page multiple times
|
|
95
88
|
const urlWithoutFragment = url.split('#')[0];
|
|
@@ -106,33 +99,18 @@ You can find documentation URLs using the ${HelperTools.DOCS_SEARCH} tool.`,
|
|
|
106
99
|
url: mdUrl,
|
|
107
100
|
statusText: response.statusText,
|
|
108
101
|
});
|
|
109
|
-
|
|
110
|
-
return buildMCPResponse({
|
|
111
|
-
texts: [buildFetchErrorMessage(url, `HTTP Status: ${response.status} ${response.statusText}.`)],
|
|
112
|
-
isError: true,
|
|
113
|
-
telemetry: {
|
|
114
|
-
toolStatus: isUserError ? TOOL_STATUS.SOFT_FAIL : TOOL_STATUS.FAILED,
|
|
115
|
-
failureCategory: classifyFailureCategory(error),
|
|
116
|
-
failureHttpStatus: response.status,
|
|
117
|
-
},
|
|
118
|
-
});
|
|
102
|
+
return respondServerError(buildFetchErrorMessage(url, `HTTP Status: ${response.status} ${response.statusText}.`), { error });
|
|
119
103
|
}
|
|
120
104
|
markdown = await response.text();
|
|
121
105
|
fetchApifyDocsCache.set(urlWithoutFragment, markdown);
|
|
122
106
|
}
|
|
123
107
|
catch (error) {
|
|
124
108
|
logHttpError(error, 'Failed to fetch the documentation page', { url: mdUrl });
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
buildFetchErrorMessage(url, `Error: ${error instanceof Error ? error.message : String(error)}.`),
|
|
128
|
-
],
|
|
129
|
-
isError: true,
|
|
130
|
-
telemetry: { toolStatus: TOOL_STATUS.SOFT_FAIL, failureCategory: FAILURE_CATEGORY.INTERNAL_ERROR },
|
|
131
|
-
});
|
|
109
|
+
// A thrown fetch (network/DNS, no statusCode) is a server failure, so classify it FAILED + INTERNAL_ERROR.
|
|
110
|
+
return respondServerError(buildFetchErrorMessage(url, `Error: ${error instanceof Error ? error.message : String(error)}.`), { error });
|
|
132
111
|
}
|
|
133
112
|
}
|
|
134
|
-
return
|
|
135
|
-
texts: [`Fetched content from ${url}:\n\n${markdown}`],
|
|
113
|
+
return respondOk(`Fetched content from ${url}:\n\n${markdown}`, {
|
|
136
114
|
structuredContent: { url, content: markdown },
|
|
137
115
|
});
|
|
138
116
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_apify_docs.js","sourceRoot":"","sources":["../../../src/tools/docs/fetch_apify_docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetch_apify_docs.js","sourceRoot":"","sources":["../../../src/tools/docs/fetch_apify_docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAEjF,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,CAAC;SACD,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACL,oIAAoI,CACvI;CACR,CAAC,CAAC;AAEH,MA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YAC5D,iBAAiB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE;SAChD,CAAC,CAAC;IACP,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DOCS_SOURCES,
|
|
2
|
+
import { DOCS_SOURCES, HELPER_TOOLS } from '../../const.js';
|
|
3
3
|
import { TOOL_TYPE } from '../../types.js';
|
|
4
4
|
import { compileSchema } from '../../utils/ajv.js';
|
|
5
5
|
import { searchDocsBySourceCached } from '../../utils/apify_docs.js';
|
|
6
|
-
import {
|
|
6
|
+
import { respondOk } from '../../utils/mcp.js';
|
|
7
7
|
import { searchApifyDocsToolOutputSchema } from '../structured_output_schemas.js';
|
|
8
8
|
const PLATFORM_DOCS_PREFERENCE = `When results contain both platform documentation (\`docs.apify.com/platform\`) \
|
|
9
9
|
and Academy content (\`docs.apify.com/academy\`) on the same topic, prefer the platform documentation.`;
|
|
@@ -28,7 +28,7 @@ ${sources}
|
|
|
28
28
|
The results will include the URL of the documentation page (which may include an anchor),
|
|
29
29
|
and a limited piece of content that matches the search query.
|
|
30
30
|
|
|
31
|
-
Fetch the full content of the document using the ${
|
|
31
|
+
Fetch the full content of the document using the ${HELPER_TOOLS.DOCS_FETCH} tool by providing the URL.
|
|
32
32
|
|
|
33
33
|
${PLATFORM_DOCS_PREFERENCE}`;
|
|
34
34
|
}
|
|
@@ -57,7 +57,7 @@ Use this to paginate through the search results. For example, if you want to get
|
|
|
57
57
|
const searchApifyDocsToolInputSchema = z.toJSONSchema(searchApifyDocsToolArgsSchema);
|
|
58
58
|
export const searchApifyDocs = Object.freeze({
|
|
59
59
|
type: TOOL_TYPE.INTERNAL,
|
|
60
|
-
name:
|
|
60
|
+
name: HELPER_TOOLS.DOCS_SEARCH,
|
|
61
61
|
title: 'Search Apify docs',
|
|
62
62
|
description: buildToolDescription(),
|
|
63
63
|
inputSchema: searchApifyDocsToolInputSchema,
|
|
@@ -86,7 +86,7 @@ You can also try using more specific or alternative keywords related to your sea
|
|
|
86
86
|
count: 0,
|
|
87
87
|
instructions,
|
|
88
88
|
};
|
|
89
|
-
return
|
|
89
|
+
return respondOk(instructions, { structuredContent });
|
|
90
90
|
}
|
|
91
91
|
// Instructions for LLM to use the docs fetch tool when retrieving full document content
|
|
92
92
|
const instructions = `You can use the Apify docs fetch tool to retrieve the full content of a document by its URL. ${PLATFORM_DOCS_PREFERENCE}`;
|
|
@@ -112,7 +112,7 @@ ${results
|
|
|
112
112
|
instructions,
|
|
113
113
|
};
|
|
114
114
|
// We put the instructions at the end so that they are more likely to be acknowledged by the LLM
|
|
115
|
-
return
|
|
115
|
+
return respondOk([textResult, instructions], { structuredContent });
|
|
116
116
|
},
|
|
117
117
|
});
|
|
118
118
|
//# sourceMappingURL=search_apify_docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search_apify_docs.js","sourceRoot":"","sources":["../../../src/tools/docs/search_apify_docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"search_apify_docs.js","sourceRoot":"","sources":["../../../src/tools/docs/search_apify_docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,wBAAwB,GAAG;uGACsE,CAAC;AAExG;;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AAE,CAAC;gBACR,YAAY;aACf,CAAC;YACF,OAAO,SAAS,CAAC,YAAY,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,wFAAwF;QACxF,MAAM,YAAY,GAAG,gGAAgG,wBAAwB,EAAE,CAAC;QAChJ,kCAAkC;QAClC,MAAM,UAAU,GAAG,uBAAuB,KAAK,QAAQ,MAAM,CAAC,SAAS;;EAE7E,OAAO;aACJ,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACZ,IAAI,IAAI,GAAG,mBAAmB,MAAM,CAAC,GAAG,EAAE,CAAC;YAC3C,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,IAAI,gBAAgB,MAAM,CAAC,OAAO,EAAE,CAAC;YAC7C,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;aACD,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAEZ,MAAM,iBAAiB,GAAG;YACtB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzD,CAAC,CAAC;YACH,KAAK;YACL,KAAK,EAAE,OAAO,CAAC,MAAM;YACrB,YAAY;SACf,CAAC;QACF,gGAAgG;QAChG,OAAO,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACxE,CAAC;CACK,CAAC,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToolCategory, ToolEntry } from '../types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { SERVER_MODE } from '../types.js';
|
|
3
3
|
import { getActorsAsTools } from './actors/actor_tools_factory.js';
|
|
4
4
|
import type { ActorsAsToolsResult } from './actors/actor_tools_factory.js';
|
|
5
5
|
import { CATEGORY_NAME_SET, CATEGORY_NAMES, getCategoryTools, toolCategories, toolCategoriesEnabledByDefault } from './registry.js';
|
|
@@ -9,7 +9,7 @@ export { CATEGORY_NAME_SET, CATEGORY_NAMES, getCategoryTools, toolCategories, to
|
|
|
9
9
|
* Returns the tool entries for the default-enabled categories resolved for the given mode.
|
|
10
10
|
* Computed here (not in helper file) to avoid module initialization issues.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getDefaultTools(mode?:
|
|
12
|
+
export declare function getDefaultTools(mode?: SERVER_MODE): ToolEntry[];
|
|
13
13
|
/**
|
|
14
14
|
* Returns the list of tool categories that are enabled for unauthenticated users.
|
|
15
15
|
* A category is included only if all tools in it are in the unauthEnabledTools list.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,8BAA8B,EACjC,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,kBAAkB,EAAE,MAAM,EAKtC,CAAC;AAIF,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,8BAA8B,EAAE,CAAC;AAE/G;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,WAAiC,GAAG,SAAS,EAAE,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,YAAY,EAAE,CAM/D;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { HELPER_TOOLS } from '../const.js';
|
|
2
|
+
import { SERVER_MODE } from '../types.js';
|
|
3
3
|
import { getExpectedToolsByCategories } from '../utils/tool_categories_helpers.js';
|
|
4
4
|
import { getActorsAsTools } from './actors/actor_tools_factory.js';
|
|
5
5
|
import { CATEGORY_NAME_SET, CATEGORY_NAMES, getCategoryTools, toolCategories, toolCategoriesEnabledByDefault, } from './registry.js';
|
|
6
6
|
// Use string constants instead of tool object imports to avoid circular dependencies
|
|
7
7
|
export const unauthEnabledTools = [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
HELPER_TOOLS.DOCS_SEARCH,
|
|
9
|
+
HELPER_TOOLS.DOCS_FETCH,
|
|
10
|
+
HELPER_TOOLS.STORE_SEARCH,
|
|
11
|
+
HELPER_TOOLS.ACTOR_GET_DETAILS,
|
|
12
12
|
];
|
|
13
13
|
// Re-export from registry.ts
|
|
14
14
|
// This is actually needed to avoid circular dependency issues
|
|
@@ -17,7 +17,7 @@ export { CATEGORY_NAME_SET, CATEGORY_NAMES, getCategoryTools, toolCategories, to
|
|
|
17
17
|
* Returns the tool entries for the default-enabled categories resolved for the given mode.
|
|
18
18
|
* Computed here (not in helper file) to avoid module initialization issues.
|
|
19
19
|
*/
|
|
20
|
-
export function getDefaultTools(mode =
|
|
20
|
+
export function getDefaultTools(mode = SERVER_MODE.DEFAULT) {
|
|
21
21
|
return getExpectedToolsByCategories(toolCategoriesEnabledByDefault, mode);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -27,7 +27,7 @@ export function getDefaultTools(mode = ServerMode.DEFAULT) {
|
|
|
27
27
|
*/
|
|
28
28
|
export function getUnauthEnabledToolCategories() {
|
|
29
29
|
const unauthEnabledToolsSet = new Set(unauthEnabledTools);
|
|
30
|
-
const categories = getCategoryTools(
|
|
30
|
+
const categories = getCategoryTools(SERVER_MODE.DEFAULT);
|
|
31
31
|
return Object.entries(categories)
|
|
32
32
|
.filter(([, tools]) => tools.every((tool) => unauthEnabledToolsSet.has(tool.name)))
|
|
33
33
|
.map(([category]) => category);
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,8BAA8B,GACjC,MAAM,eAAe,CAAC;AAEvB,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,YAAY,CAAC,WAAW;IACxB,YAAY,CAAC,UAAU;IACvB,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,iBAAiB;CACjC,CAAC;AAEF,6BAA6B;AAC7B,8DAA8D;AAC9D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,8BAA8B,EAAE,CAAC;AAE/G;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAAoB,WAAW,CAAC,OAAO;IACnE,OAAO,4BAA4B,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B;IAC1C,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACzD,OAAQ,MAAM,CAAC,OAAO,CAAC,UAAU,CAAmC;SAC/D,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAClF,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED,6BAA6B;AAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
* tools, `search-actors`, `fetch-actor-details`) share a single implementation across modes.
|
|
20
20
|
* Do NOT add per-mode runtime variants for non-widget tools.
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
22
|
+
import { type HelperToolName } from '../const.js';
|
|
23
23
|
import type { ToolEntry } from '../types.js';
|
|
24
|
-
import {
|
|
24
|
+
import { SERVER_MODE } from '../types.js';
|
|
25
25
|
/**
|
|
26
26
|
* Unified tool category definitions — single source of truth.
|
|
27
27
|
*
|
|
28
28
|
* Each entry is either a plain ToolEntry (mode-independent) or a mode map
|
|
29
|
-
* with
|
|
29
|
+
* with SERVER_MODE keys mapping to their ToolEntry variant.
|
|
30
30
|
*
|
|
31
31
|
* Use {@link getCategoryTools} to resolve entries into concrete ToolEntry arrays for a given mode.
|
|
32
32
|
*/
|
|
@@ -56,9 +56,9 @@ export type ToolCategoryMap = Record<(typeof CATEGORY_NAMES)[number], ToolEntry[
|
|
|
56
56
|
* (async execution, widget metadata), default mode gets standard implementations.
|
|
57
57
|
* Apps-only tools are excluded in default mode.
|
|
58
58
|
*
|
|
59
|
-
* @param mode - Optional. Use `'default'` or `'apps'`. Defaults to `
|
|
59
|
+
* @param mode - Optional. Use `'default'` or `'apps'`. Defaults to `SERVER_MODE.DEFAULT` when omitted.
|
|
60
60
|
*/
|
|
61
|
-
export declare function getCategoryTools(mode?:
|
|
61
|
+
export declare function getCategoryTools(mode?: SERVER_MODE): ToolCategoryMap;
|
|
62
62
|
export declare const toolCategoriesEnabledByDefault: (typeof CATEGORY_NAMES)[number][];
|
|
63
63
|
/**
|
|
64
64
|
* Apps-mode pairing: each base tool name maps to its widget sibling.
|
|
@@ -69,5 +69,5 @@ export declare const toolCategoriesEnabledByDefault: (typeof CATEGORY_NAMES)[num
|
|
|
69
69
|
* does NOT auto-bring its base; callers asking for widget-only get a UI without
|
|
70
70
|
* the programmatic data tool. To get both, select the base (or both explicitly).
|
|
71
71
|
*/
|
|
72
|
-
export declare const WIDGET_BY_BASE_TOOL: ReadonlyMap<
|
|
72
|
+
export declare const WIDGET_BY_BASE_TOOL: ReadonlyMap<HelperToolName, ToolEntry>;
|
|
73
73
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkC1C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAqBoB,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;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,WAAiC,GAAG,eAAe,CAIzF;AAED,eAAO,MAAM,8BAA8B,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,EAAuB,CAAC;AAEpG;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,cAAc,EAAE,SAAS,CAKrE,CAAC"}
|
package/dist/tools/registry.js
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* tools, `search-actors`, `fetch-actor-details`) share a single implementation across modes.
|
|
20
20
|
* Do NOT add per-mode runtime variants for non-widget tools.
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { HELPER_TOOLS } from '../const.js';
|
|
23
|
+
import { SERVER_MODE } from '../types.js';
|
|
24
24
|
import { addActor } from './actors/add_actor.js';
|
|
25
25
|
import { callActorApps, callActorDefault } from './actors/call_actor.js';
|
|
26
26
|
import { fetchActorDetails } from './actors/fetch_actor_details.js';
|
|
@@ -51,7 +51,7 @@ function isModeMap(entry) {
|
|
|
51
51
|
* Unified tool category definitions — single source of truth.
|
|
52
52
|
*
|
|
53
53
|
* Each entry is either a plain ToolEntry (mode-independent) or a mode map
|
|
54
|
-
* with
|
|
54
|
+
* with SERVER_MODE keys mapping to their ToolEntry variant.
|
|
55
55
|
*
|
|
56
56
|
* Use {@link getCategoryTools} to resolve entries into concrete ToolEntry arrays for a given mode.
|
|
57
57
|
*/
|
|
@@ -112,9 +112,9 @@ function resolveCategoryEntries(entries, mode) {
|
|
|
112
112
|
* (async execution, widget metadata), default mode gets standard implementations.
|
|
113
113
|
* Apps-only tools are excluded in default mode.
|
|
114
114
|
*
|
|
115
|
-
* @param mode - Optional. Use `'default'` or `'apps'`. Defaults to `
|
|
115
|
+
* @param mode - Optional. Use `'default'` or `'apps'`. Defaults to `SERVER_MODE.DEFAULT` when omitted.
|
|
116
116
|
*/
|
|
117
|
-
export function getCategoryTools(mode =
|
|
117
|
+
export function getCategoryTools(mode = SERVER_MODE.DEFAULT) {
|
|
118
118
|
return Object.fromEntries(CATEGORY_NAMES.map((name) => [name, resolveCategoryEntries(toolCategories[name], mode)]));
|
|
119
119
|
}
|
|
120
120
|
export const toolCategoriesEnabledByDefault = ['actors', 'docs'];
|
|
@@ -128,9 +128,9 @@ export const toolCategoriesEnabledByDefault = ['actors', 'docs'];
|
|
|
128
128
|
* the programmatic data tool. To get both, select the base (or both explicitly).
|
|
129
129
|
*/
|
|
130
130
|
export const WIDGET_BY_BASE_TOOL = new Map([
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
131
|
+
[HELPER_TOOLS.STORE_SEARCH, searchActorsWidget],
|
|
132
|
+
[HELPER_TOOLS.ACTOR_GET_DETAILS, fetchActorDetailsWidget],
|
|
133
|
+
[HELPER_TOOLS.ACTOR_CALL, callActorWidget],
|
|
134
|
+
[HELPER_TOOLS.ACTOR_RUNS_GET, getActorRunWidget],
|
|
135
135
|
]);
|
|
136
136
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":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AAI,CAAC,CAAC;YACzB,IAAI,IAAI,EAAE,CAAC;gBACP,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAoB,WAAW,CAAC,OAAO;IACpE,OAAO,MAAM,CAAC,WAAW,CACrB,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,sBAAsB,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CACxE,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAsC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEpG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA2C,IAAI,GAAG,CAAC;IAC/E,CAAC,YAAY,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC/C,CAAC,YAAY,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;IACzD,CAAC,YAAY,CAAC,UAAU,EAAE,eAAe,CAAC;IAC1C,CAAC,YAAY,CAAC,cAAc,EAAE,iBAAiB,CAAC;CACnD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/runs/abort_actor_run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAenF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"abort_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/runs/abort_actor_run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAenF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAoDjB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { HELPER_TOOLS } from '../../const.js';
|
|
3
3
|
import { TOOL_TYPE } from '../../types.js';
|
|
4
4
|
import { compileSchema } from '../../utils/ajv.js';
|
|
5
|
-
import {
|
|
5
|
+
import { respondOk } from '../../utils/mcp.js';
|
|
6
6
|
import { buildStats, buildStatusSummaryNextStep, toIsoString } from '../actors/actor_run_response.js';
|
|
7
7
|
import { actorRunOutputSchema } from '../structured_output_schemas.js';
|
|
8
8
|
const abortRunArgs = z.object({
|
|
@@ -17,7 +17,7 @@ const abortRunArgs = z.object({
|
|
|
17
17
|
*/
|
|
18
18
|
export const abortActorRun = Object.freeze({
|
|
19
19
|
type: TOOL_TYPE.INTERNAL,
|
|
20
|
-
name:
|
|
20
|
+
name: HELPER_TOOLS.ACTOR_RUNS_ABORT,
|
|
21
21
|
title: 'Abort Actor run',
|
|
22
22
|
description: `Abort an Actor run that is currently starting or running.
|
|
23
23
|
For runs with status FINISHED, FAILED, ABORTING, or TIMED-OUT, this call has no effect.
|
|
@@ -63,10 +63,7 @@ USAGE EXAMPLES:
|
|
|
63
63
|
summary,
|
|
64
64
|
nextStep,
|
|
65
65
|
};
|
|
66
|
-
return
|
|
67
|
-
texts: [JSON.stringify(structuredContent), `${summary}\n${nextStep}`],
|
|
68
|
-
structuredContent,
|
|
69
|
-
});
|
|
66
|
+
return respondOk([JSON.stringify(structuredContent), `${summary}\n${nextStep}`], { structuredContent });
|
|
70
67
|
},
|
|
71
68
|
});
|
|
72
69
|
//# sourceMappingURL=abort_actor_run.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort_actor_run.js","sourceRoot":"","sources":["../../../src/tools/runs/abort_actor_run.ts"],"names":[],"mappings":"AAAA,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AI,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;gBAClD,GAAG,CAAC,aAAa,IAAI,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,CAAC;aACvE;YACD,OAAO;YACP,QAAQ;SACX,CAAC;QAEF,OAAO,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,GAAG,OAAO,KAAK,QAAQ,EAAE,CAAC,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAC5G,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ConsoleLinkContext, HelperTool, ToolEntry } from '../../types.js';
|
|
3
|
+
import { type ToolResponse } from '../../utils/mcp.js';
|
|
4
|
+
import { type FetchActorRunResult } from '../actors/actor_run_response.js';
|
|
5
|
+
/** Default `waitSecs` for `get-actor-run`. Intentionally non-zero so polling callers wait briefly by default. */
|
|
6
|
+
export declare const WAIT_SECS_DEFAULT = 30;
|
|
7
|
+
/**
|
|
8
|
+
* Zod schema for `get-actor-run` arguments — shared between default and widget variants.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getActorRunArgs: z.ZodObject<{
|
|
11
|
+
runId: z.ZodString;
|
|
12
|
+
waitSecs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
/**
|
|
15
|
+
* Shared tool metadata for `get-actor-run` — everything except the `call` handler.
|
|
16
|
+
* Mode-independent. Widget `_meta` lives in the widget variant.
|
|
17
|
+
*/
|
|
18
|
+
export declare const getActorRunMetadata: Omit<HelperTool, 'call'>;
|
|
19
|
+
export declare function buildGetActorRunError(runId: string, error: unknown): ToolResponse;
|
|
20
|
+
/**
|
|
21
|
+
* Build the success response. `content[0]` is the JSON-stringified `structuredContent`
|
|
22
|
+
* mirror (per MCP spec); `content[1]` carries an LLM-readable narrative — `summary` +
|
|
23
|
+
* `nextStep` in default mode, a short pointer in widget mode.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildGetActorRunSuccessResponse(params: FetchActorRunResult & {
|
|
26
|
+
widget: boolean;
|
|
27
|
+
linkContext?: ConsoleLinkContext;
|
|
28
|
+
}): ToolResponse;
|
|
2
29
|
/**
|
|
3
30
|
* Default mode `get-actor-run` — returns without any widget metadata.
|
|
4
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAoB,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAKnH,OAAO,EAA+C,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAEH,KAAK,mBAAmB,EAI3B,MAAM,iCAAiC,CAAC;AAGzC,iHAAiH;AACjH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,eAAe;;;iBAM1B,CAAC;AAkBH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAkBxD,CAAC;AAMF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAMjF;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC3C,MAAM,EAAE,mBAAmB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,kBAAkB,CAAA;CAAE,GACpF,YAAY,CA+Bd;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,SA+Bf,CAAC"}
|
|
@@ -1,7 +1,104 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HELPER_TOOLS } from '../../const.js';
|
|
4
|
+
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
5
|
+
import { TOOL_TYPE } from '../../types.js';
|
|
6
|
+
import { compileSchema, fixZodSchemaRequired } from '../../utils/ajv.js';
|
|
1
7
|
import { getConsoleLinkContext } from '../../utils/console_link.js';
|
|
2
8
|
import { logHttpError } from '../../utils/logging.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
9
|
+
import { buildUsageMeta, respondOk, respondUserError } from '../../utils/mcp.js';
|
|
10
|
+
import { applyConsoleLinks, fetchActorRunData, WAIT_SECS_MAX, WIDGET_NO_POLL_NEXT_STEP, } from '../actors/actor_run_response.js';
|
|
11
|
+
import { actorRunOutputSchema } from '../structured_output_schemas.js';
|
|
12
|
+
/** Default `waitSecs` for `get-actor-run`. Intentionally non-zero so polling callers wait briefly by default. */
|
|
13
|
+
export const WAIT_SECS_DEFAULT = 30;
|
|
14
|
+
/**
|
|
15
|
+
* Zod schema for `get-actor-run` arguments — shared between default and widget variants.
|
|
16
|
+
*/
|
|
17
|
+
export const getActorRunArgs = z.object({
|
|
18
|
+
runId: z.string().min(1).describe('The ID of the Actor run.'),
|
|
19
|
+
waitSecs: z.number().int().min(0).max(WAIT_SECS_MAX).optional().default(WAIT_SECS_DEFAULT).describe(dedent `
|
|
20
|
+
Maximum seconds to wait for the run to reach a terminal state (SUCCEEDED, FAILED, ABORTED, TIMED-OUT).
|
|
21
|
+
0 returns immediately with the current status. Cap: ${WAIT_SECS_MAX}. Default: ${WAIT_SECS_DEFAULT}.
|
|
22
|
+
`),
|
|
23
|
+
});
|
|
24
|
+
const GET_ACTOR_RUN_DESCRIPTION = `Get detailed information about a specific Actor run.
|
|
25
|
+
|
|
26
|
+
Returns run result: status, storages (datasets/keyValueStores alias map), stats, summary, nextStep.
|
|
27
|
+
- summary describes the past (e.g. "SUCCEEDED in 22s. 47 items; 3 fields available.").
|
|
28
|
+
- nextStep prescribes one primary follow-up action with identifiers interpolated (e.g. "Use get-dataset-items with datasetId=...").
|
|
29
|
+
- waitSecs (0–${WAIT_SECS_MAX}, default ${WAIT_SECS_DEFAULT}) waits up to that many seconds for terminal status before returning.
|
|
30
|
+
|
|
31
|
+
USAGE:
|
|
32
|
+
- Use to check the status of a run started with ${HELPER_TOOLS.ACTOR_CALL}.
|
|
33
|
+
- Pass waitSecs > 0 to block until terminal (or until the cap elapses).
|
|
34
|
+
- If \`${HELPER_TOOLS.ACTOR_CALL_WIDGET}\` or \`${HELPER_TOOLS.ACTOR_RUNS_GET_WIDGET}\` rendered a widget for this run, do NOT poll here — the widget self-polls.
|
|
35
|
+
|
|
36
|
+
USAGE EXAMPLES:
|
|
37
|
+
- user_input: Show details of run y2h7sK3Wc
|
|
38
|
+
- user_input: Wait for run y2h7sK3Wc to finish`;
|
|
39
|
+
/**
|
|
40
|
+
* Shared tool metadata for `get-actor-run` — everything except the `call` handler.
|
|
41
|
+
* Mode-independent. Widget `_meta` lives in the widget variant.
|
|
42
|
+
*/
|
|
43
|
+
export const getActorRunMetadata = {
|
|
44
|
+
type: TOOL_TYPE.INTERNAL,
|
|
45
|
+
name: HELPER_TOOLS.ACTOR_RUNS_GET,
|
|
46
|
+
title: 'Get Actor run',
|
|
47
|
+
description: GET_ACTOR_RUN_DESCRIPTION,
|
|
48
|
+
// `fixZodSchemaRequired` strips fields with a real `default` from `required` so MCP clients
|
|
49
|
+
// that read `tools/list` see `waitSecs` as optional (matching its runtime behavior).
|
|
50
|
+
inputSchema: fixZodSchemaRequired(z.toJSONSchema(getActorRunArgs)),
|
|
51
|
+
outputSchema: actorRunOutputSchema,
|
|
52
|
+
ajvValidate: compileSchema(z.toJSONSchema(getActorRunArgs)),
|
|
53
|
+
paymentRequired: true,
|
|
54
|
+
annotations: {
|
|
55
|
+
title: 'Get Actor run',
|
|
56
|
+
readOnlyHint: true,
|
|
57
|
+
destructiveHint: false,
|
|
58
|
+
idempotentHint: true,
|
|
59
|
+
openWorldHint: false,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
// -----------------------------------------------------------------------------
|
|
63
|
+
// Response builders
|
|
64
|
+
// -----------------------------------------------------------------------------
|
|
65
|
+
export function buildGetActorRunError(runId, error) {
|
|
66
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
67
|
+
return respondUserError(dedent `
|
|
68
|
+
Failed to get Actor run '${runId}': ${errMsg}.
|
|
69
|
+
Please verify the run ID and ensure that the run exists.
|
|
70
|
+
`);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Build the success response. `content[0]` is the JSON-stringified `structuredContent`
|
|
74
|
+
* mirror (per MCP spec); `content[1]` carries an LLM-readable narrative — `summary` +
|
|
75
|
+
* `nextStep` in default mode, a short pointer in widget mode.
|
|
76
|
+
*/
|
|
77
|
+
export function buildGetActorRunSuccessResponse(params) {
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
const { run, structuredContent, widget, linkContext } = params;
|
|
80
|
+
if (!widget) {
|
|
81
|
+
// Mints the `apifyConsoleUrl` fields onto structuredContent and returns the narrative suffix in one pass.
|
|
82
|
+
const consoleLinks = applyConsoleLinks(structuredContent, linkContext);
|
|
83
|
+
return respondOk([
|
|
84
|
+
JSON.stringify(structuredContent),
|
|
85
|
+
`${structuredContent.summary}\n${structuredContent.nextStep}${consoleLinks}`,
|
|
86
|
+
], { structuredContent, meta: buildUsageMeta(run) });
|
|
87
|
+
}
|
|
88
|
+
// Override nextStep so the model reading structuredContent (content[0]) also sees no-poll guidance.
|
|
89
|
+
const widgetContent = { ...structuredContent, nextStep: WIDGET_NO_POLL_NEXT_STEP };
|
|
90
|
+
return respondOk([
|
|
91
|
+
JSON.stringify(widgetContent),
|
|
92
|
+
`Actor run ${structuredContent.runId} status: ${structuredContent.status}. A run widget has been rendered.`,
|
|
93
|
+
], {
|
|
94
|
+
structuredContent: widgetContent,
|
|
95
|
+
meta: {
|
|
96
|
+
...((_b = (_a = getWidgetConfig(WIDGET_URIS.ACTOR_RUN)) === null || _a === void 0 ? void 0 : _a.meta) !== null && _b !== void 0 ? _b : {}),
|
|
97
|
+
...((_c = buildUsageMeta(run)) !== null && _c !== void 0 ? _c : {}),
|
|
98
|
+
'openai/widgetDescription': `Actor run progress for ${(_d = structuredContent.actorName) !== null && _d !== void 0 ? _d : structuredContent.runId}`,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
5
102
|
/**
|
|
6
103
|
* Default mode `get-actor-run` — returns without any widget metadata.
|
|
7
104
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run.js","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_actor_run.js","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAqB,MAAM,oBAAoB,CAAC;AACpG,OAAO,EACH,iBAAiB,EAEjB,iBAAiB,EACjB,aAAa,EACb,wBAAw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AyB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACxE,OAAO,qBAAqB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;IACL,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ApifyClient } from '../../apify_client.js';
|
|
3
|
-
import {
|
|
3
|
+
import { HELPER_TOOLS } from '../../const.js';
|
|
4
4
|
import { TOOL_TYPE } from '../../types.js';
|
|
5
5
|
import { compileSchema } from '../../utils/ajv.js';
|
|
6
6
|
import { encodeToon } from '../../utils/encode_text.js';
|
|
@@ -29,7 +29,7 @@ const getUserRunsListArgs = z.object({
|
|
|
29
29
|
*/
|
|
30
30
|
export const getActorRunList = Object.freeze({
|
|
31
31
|
type: TOOL_TYPE.INTERNAL,
|
|
32
|
-
name:
|
|
32
|
+
name: HELPER_TOOLS.ACTOR_RUN_LIST_GET,
|
|
33
33
|
title: 'Get user runs list',
|
|
34
34
|
description: `List Actor runs for the authenticated user with optional filtering and sorting.
|
|
35
35
|
The results will include run details (including datasetId and keyValueStoreId) and can be filtered by status.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run_list.js","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get_actor_run_list.js","sourceRoot":"","sources":["../../../src/tools/runs/get_actor_run_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;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