@apify/actors-mcp-server 0.11.7-beta.1 → 0.11.7-beta.10
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/index_internals.d.ts +7 -12
- package/dist/index_internals.d.ts.map +1 -1
- package/dist/index_internals.js +6 -11
- package/dist/index_internals.js.map +1 -1
- package/dist/mcp/actors.d.ts +0 -4
- package/dist/mcp/actors.d.ts.map +1 -1
- package/dist/mcp/actors.js +0 -13
- package/dist/mcp/actors.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -17
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +184 -435
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool_call_error_mapper.d.ts +45 -0
- package/dist/mcp/tool_call_error_mapper.d.ts.map +1 -0
- package/dist/mcp/tool_call_error_mapper.js +59 -0
- package/dist/mcp/tool_call_error_mapper.js.map +1 -0
- package/dist/mcp/tool_call_telemetry.d.ts +37 -0
- package/dist/mcp/tool_call_telemetry.d.ts.map +1 -0
- package/dist/mcp/tool_call_telemetry.js +85 -0
- package/dist/mcp/tool_call_telemetry.js.map +1 -0
- package/dist/mcp/tool_dispatch.d.ts +49 -0
- package/dist/mcp/tool_dispatch.d.ts.map +1 -0
- package/dist/mcp/tool_dispatch.js +208 -0
- package/dist/mcp/tool_dispatch.js.map +1 -0
- package/dist/payments/const.d.ts +1 -0
- package/dist/payments/const.d.ts.map +1 -1
- package/dist/payments/const.js +1 -0
- package/dist/payments/const.js.map +1 -1
- package/dist/payments/skyfire.d.ts.map +1 -1
- package/dist/payments/skyfire.js +5 -6
- package/dist/payments/skyfire.js.map +1 -1
- package/dist/tools/actors/call_actor.d.ts +0 -3
- package/dist/tools/actors/call_actor.d.ts.map +1 -1
- package/dist/tools/actors/call_actor.js +2 -11
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/actors/fetch_actor_details.d.ts +1 -7
- package/dist/tools/actors/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/actors/fetch_actor_details.js +14 -22
- package/dist/tools/actors/fetch_actor_details.js.map +1 -1
- package/dist/tools/actors/search_actors.d.ts +1 -6
- package/dist/tools/actors/search_actors.d.ts.map +1 -1
- package/dist/tools/actors/search_actors.js +17 -24
- package/dist/tools/actors/search_actors.js.map +1 -1
- package/dist/tools/dev/report_problem.d.ts +13 -0
- package/dist/tools/dev/report_problem.d.ts.map +1 -1
- package/dist/tools/dev/report_problem.js +14 -0
- package/dist/tools/dev/report_problem.js.map +1 -1
- package/dist/tools/docs/search_apify_docs.d.ts.map +1 -1
- package/dist/tools/docs/search_apify_docs.js +1 -0
- package/dist/tools/docs/search_apify_docs.js.map +1 -1
- package/dist/tools/runs/get_actor_run.d.ts +1 -6
- package/dist/tools/runs/get_actor_run.d.ts.map +1 -1
- package/dist/tools/runs/get_actor_run.js +17 -24
- package/dist/tools/runs/get_actor_run.js.map +1 -1
- package/dist/tools/storage/get_dataset.d.ts.map +1 -1
- package/dist/tools/storage/get_dataset.js +6 -5
- 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 -8
- package/dist/tools/storage/get_dataset_items.js.map +1 -1
- package/dist/tools/storage/get_dataset_list.d.ts.map +1 -1
- package/dist/tools/storage/get_dataset_list.js +8 -9
- 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 +6 -4
- package/dist/tools/storage/get_dataset_schema.js.map +1 -1
- package/dist/tools/storage/get_key_value_store.js +3 -3
- package/dist/tools/storage/get_key_value_store.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_keys.js +4 -4
- package/dist/tools/storage/get_key_value_store_keys.js.map +1 -1
- package/dist/tools/storage/get_key_value_store_list.d.ts.map +1 -1
- package/dist/tools/storage/get_key_value_store_list.js +8 -9
- 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 +3 -2
- package/dist/tools/storage/get_key_value_store_record.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +0 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/actor_details.d.ts.map +1 -1
- package/dist/utils/actor_details.js +10 -3
- package/dist/utils/actor_details.js.map +1 -1
- package/dist/utils/logging.d.ts +2 -0
- package/dist/utils/logging.d.ts.map +1 -1
- package/dist/utils/logging.js +45 -1
- package/dist/utils/logging.js.map +1 -1
- package/dist/utils/payment_errors.d.ts +7 -1
- package/dist/utils/payment_errors.d.ts.map +1 -1
- package/dist/utils/payment_errors.js +10 -0
- package/dist/utils/payment_errors.js.map +1 -1
- package/dist/web/dist/actor-run-widget.js +0 -3
- package/dist/web/dist/search-actors-widget.js +0 -3
- package/package.json +2 -2
- package/dist/web/dist/actor-detail-widget.js +0 -4551
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { ApifyClient } from './apify_client.js';
|
|
2
|
-
import {
|
|
2
|
+
import { defaults, type HelperToolName } from './const.js';
|
|
3
3
|
import { processParamsGetTools } from './mcp/utils.js';
|
|
4
4
|
import { resolvePaymentProvider } from './payments/index.js';
|
|
5
5
|
import type { PaymentProvider } from './payments/types.js';
|
|
6
6
|
import { getServerCard } from './server_card.js';
|
|
7
7
|
import { actorNameToToolName } from './tools/actor_tool_naming.js';
|
|
8
8
|
import { addActor } from './tools/actors/add_actor.js';
|
|
9
|
-
import {
|
|
10
|
-
import type { ActorStore,
|
|
11
|
-
import {
|
|
12
|
-
import { redactSkyfirePayId } from './utils/logging.js';
|
|
9
|
+
import { getCategoryTools, getDefaultTools, getUnauthEnabledToolCategories, unauthEnabledTools } from './tools/index.js';
|
|
10
|
+
import type { ActorStore, ToolCategory } from './types.js';
|
|
11
|
+
import { parseQueryParamList } from './utils/generic.js';
|
|
13
12
|
import { getExpectedToolNamesByCategories } from './utils/tool_categories_helpers.js';
|
|
14
13
|
import { getToolPublicFieldOnly } from './utils/tools.js';
|
|
15
14
|
import { TTLLRUCache } from './utils/ttl_lru.js';
|
|
16
|
-
export {
|
|
15
|
+
export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools,
|
|
17
16
|
/**
|
|
18
|
-
* @deprecated
|
|
17
|
+
* @deprecated Backward-compat alias for the `addActor` tool entry. Kept for the apify-mcp-server-internal migration; remove once it no longer imports `addTool`.
|
|
19
18
|
*/
|
|
20
|
-
addActor as addTool, getCategoryTools,
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated Use the server's paymentProvider.redactForLogging instead. This will be removed in a future release.
|
|
23
|
-
*/
|
|
24
|
-
redactSkyfirePayId, };
|
|
19
|
+
addActor as addTool, getCategoryTools, type ActorStore, type ToolCategory, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, type PaymentProvider, };
|
|
25
20
|
/** @deprecated Use HELPER_TOOLS / HelperToolName. Kept for backward compatibility with apify-mcp-server-internal. */
|
|
26
21
|
export declare const HelperTools: {
|
|
27
22
|
readonly ACTOR_ADD: "add-actor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index_internals.d.ts","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index_internals.d.ts","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAgB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACH,WAAW,EACX,gCAAgC,EAChC,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,eAAe;AACf;;GAEG;AACH,QAAQ,IAAI,OAAO,EACnB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,eAAe,GACvB,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;CAAe,CAAC;AACxC,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC"}
|
package/dist/index_internals.js
CHANGED
|
@@ -2,27 +2,22 @@
|
|
|
2
2
|
This file provides essential internal functions for Apify MCP servers, serving as an internal library.
|
|
3
3
|
*/
|
|
4
4
|
import { ApifyClient } from './apify_client.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defaults, HELPER_TOOLS } from './const.js';
|
|
6
6
|
import { processParamsGetTools } from './mcp/utils.js';
|
|
7
7
|
import { resolvePaymentProvider } from './payments/index.js';
|
|
8
8
|
import { getServerCard } from './server_card.js';
|
|
9
9
|
import { actorNameToToolName } from './tools/actor_tool_naming.js';
|
|
10
10
|
import { addActor } from './tools/actors/add_actor.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { redactSkyfirePayId } from './utils/logging.js';
|
|
11
|
+
import { getCategoryTools, getDefaultTools, getUnauthEnabledToolCategories, unauthEnabledTools, } from './tools/index.js';
|
|
12
|
+
import { parseQueryParamList } from './utils/generic.js';
|
|
14
13
|
import { getExpectedToolNamesByCategories } from './utils/tool_categories_helpers.js';
|
|
15
14
|
import { getToolPublicFieldOnly } from './utils/tools.js';
|
|
16
15
|
import { TTLLRUCache } from './utils/ttl_lru.js';
|
|
17
|
-
export {
|
|
16
|
+
export { ApifyClient, getExpectedToolNamesByCategories, getServerCard, TTLLRUCache, actorNameToToolName, defaults, getDefaultTools,
|
|
18
17
|
/**
|
|
19
|
-
* @deprecated
|
|
18
|
+
* @deprecated Backward-compat alias for the `addActor` tool entry. Kept for the apify-mcp-server-internal migration; remove once it no longer imports `addTool`.
|
|
20
19
|
*/
|
|
21
|
-
addActor as addTool, getCategoryTools,
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Use the server's paymentProvider.redactForLogging instead. This will be removed in a future release.
|
|
24
|
-
*/
|
|
25
|
-
redactSkyfirePayId, };
|
|
20
|
+
addActor as addTool, getCategoryTools, processParamsGetTools, getToolPublicFieldOnly, getUnauthEnabledToolCategories, unauthEnabledTools, parseQueryParamList, resolvePaymentProvider, };
|
|
26
21
|
/** @deprecated Use HELPER_TOOLS / HelperToolName. Kept for backward compatibility with apify-mcp-server-internal. */
|
|
27
22
|
export const HelperTools = HELPER_TOOLS;
|
|
28
23
|
//# sourceMappingURL=index_internals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index_internals.js","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAAA;;EAEE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index_internals.js","sourceRoot":"","sources":["../src/index_internals.ts"],"names":[],"mappings":"AAAA;;EAEE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACH,WAAW,EACX,gCAAgC,EAChC,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,eAAe;AACf;;GAEG;AACH,QAAQ,IAAI,OAAO,EACnB,gBAAgB,EAGhB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GAEzB,CAAC;AAEF,qHAAqH;AACrH,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
|
package/dist/mcp/actors.d.ts
CHANGED
|
@@ -16,8 +16,4 @@ export declare function getActorMCPServerPath(actorDefinition: ActorDefinition |
|
|
|
16
16
|
* the MCP client — and the caller's Apify token — to a third-party host.
|
|
17
17
|
*/
|
|
18
18
|
export declare function getActorMCPServerURL(realActorId: string, mcpServerPath: string): Promise<string>;
|
|
19
|
-
/**
|
|
20
|
-
* Gets Actor ID from the Actor object.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getRealActorID(actorIdOrName: string, apifyToken: string): Promise<string>;
|
|
23
19
|
//# sourceMappingURL=actors.d.ts.map
|
package/dist/mcp/actors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../../src/mcp/actors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../../src/mcp/actors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIzD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,qBAAqB,GAAG,MAAM,GAAG,IAAI,CAqB7G;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBtG"}
|
package/dist/mcp/actors.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ApifyClient } from '../apify_client.js';
|
|
2
1
|
import { parseCommaSeparatedList } from '../utils/generic.js';
|
|
3
2
|
import { MCP_STREAMABLE_ENDPOINT } from './const.js';
|
|
4
3
|
/**
|
|
@@ -52,16 +51,4 @@ export async function getActorMCPServerURL(realActorId, mcpServerPath) {
|
|
|
52
51
|
resolved.password = '';
|
|
53
52
|
return resolved.toString();
|
|
54
53
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Gets Actor ID from the Actor object.
|
|
57
|
-
*/
|
|
58
|
-
export async function getRealActorID(actorIdOrName, apifyToken) {
|
|
59
|
-
const apifyClient = new ApifyClient({ token: apifyToken });
|
|
60
|
-
const actor = apifyClient.actor(actorIdOrName);
|
|
61
|
-
const info = await actor.get();
|
|
62
|
-
if (!info) {
|
|
63
|
-
throw new Error(`Actor ${actorIdOrName} not found`);
|
|
64
|
-
}
|
|
65
|
-
return info.id;
|
|
66
|
-
}
|
|
67
54
|
//# sourceMappingURL=actors.js.map
|
package/dist/mcp/actors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actors.js","sourceRoot":"","sources":["../../src/mcp/actors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actors.js","sourceRoot":"","sources":["../../src/mcp/actors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,eAAwD;IAC1F,IAAI,kBAAkB,IAAI,eAAe,IAAI,OAAO,eAAe,CAAC,gBAAgB,KAAK,QAAQ,EAAE,CAAC;QAChG,MAAM,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;QAEjE,MAAM,KAAK,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;QACxD,gDAAgD;QAChD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QAED,wEAAwE;QACxE,kCAAkC;QAClC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,uBAAuB,CAAC,CAAC;QAC9E,IAAI,cAAc,EAAE,CAAC;YACjB,OAAO,cAAc,CAAC;QAC1B,CAAC;QACD,mCAAmC;QACnC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,WAAmB,EAAE,aAAqB;IACjF,6BAA6B;IAC7B,MAAM,cAAc,GAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,mCAAmC;QACxD,CAAC,CAAC,iCAAiC;QACnC,CAAC,CAAC,aAAa,CAAC;IACxB,+EAA+E;IAC/E,gFAAgF;IAChF,qFAAqF;IACrF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,WAAW,WAAW,IAAI,cAAc,GAAG,CAAC,CAAC;IAErE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,QAAQ,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,SAAS,WAAW,uEAAuE,CAAC,CAAC;IACjH,CAAC;IACD,4GAA4G;IAC5G,QAAQ,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,QAAQ,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
6
6
|
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
7
7
|
import { ApifyClient } from '../apify_client.js';
|
|
8
8
|
import type { ActorsAsToolsResult } from '../tools/index.js';
|
|
9
|
-
import type { ActorsMcpServerOptions, ActorStore, Input, ToolEntry } from '../types.js';
|
|
9
|
+
import type { ActorsMcpServerOptions, ActorStore, Input, TelemetryEnv, ToolEntry } from '../types.js';
|
|
10
10
|
import { SERVER_MODE } from '../types.js';
|
|
11
11
|
/** Send notifications/tasks/status for taskId. Routes via session transport (no relatedRequestId).
|
|
12
12
|
* Swallows errors — notifications are advisory. */
|
|
@@ -48,8 +48,8 @@ export declare class ActorsMcpServer {
|
|
|
48
48
|
* entry against *its own* actor list rather than the accumulated union across unrelated requests.
|
|
49
49
|
*/
|
|
50
50
|
private pendingToolsUntilClientKnown;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
readonly telemetryEnabled: boolean;
|
|
52
|
+
readonly telemetryEnv: TelemetryEnv;
|
|
53
53
|
private availableWidgets;
|
|
54
54
|
/** Set in the initialize handler once client capabilities are known. */
|
|
55
55
|
clientSupportsUi: boolean;
|
|
@@ -93,12 +93,6 @@ export declare class ActorsMcpServer {
|
|
|
93
93
|
* survive a load that never sees an initialize.
|
|
94
94
|
*/
|
|
95
95
|
private isReportProblemServable;
|
|
96
|
-
/**
|
|
97
|
-
* Append the report-problem nudge to a failed tool result. Thin wrapper over
|
|
98
|
-
* {@link appendReportProblemNudge} that fills in whether report-problem is served on this
|
|
99
|
-
* connection; suppression by category/402 is handled inside the helper.
|
|
100
|
-
*/
|
|
101
|
-
private withReportProblemNudge;
|
|
102
96
|
private composePendingToolsForClient;
|
|
103
97
|
/**
|
|
104
98
|
* Returns an array of tool names.
|
|
@@ -221,13 +215,6 @@ export declare class ActorsMcpServer {
|
|
|
221
215
|
*/
|
|
222
216
|
private setupTaskHandlers;
|
|
223
217
|
private setupToolHandlers;
|
|
224
|
-
/**
|
|
225
|
-
* Logs tool call completion at INFO level and tracks telemetry.
|
|
226
|
-
* Computes duration once so both the log line and telemetry event use the same value.
|
|
227
|
-
* Response bytes and resource ids are derived here from the raw `result` (+ `args`) so every
|
|
228
|
-
* call site stays a plain hand-off — no path can forget to compute or strip them.
|
|
229
|
-
*/
|
|
230
|
-
private logToolCallAndTelemetry;
|
|
231
218
|
/**
|
|
232
219
|
* Executes a tool asynchronously for a long-running task and updates task status.
|
|
233
220
|
*
|
|
@@ -241,7 +228,6 @@ export declare class ActorsMcpServer {
|
|
|
241
228
|
* @param params.mcpSessionId - MCP session ID for telemetry
|
|
242
229
|
*/
|
|
243
230
|
private executeToolAndUpdateTask;
|
|
244
|
-
private prepareTelemetryData;
|
|
245
231
|
/**
|
|
246
232
|
* Resolves widgets and determines which ones are ready to be served.
|
|
247
233
|
*/
|
package/dist/mcp/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAiC/E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAqBjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EACR,sBAAsB,EACtB,UAAU,EAGV,KAAK,EAEL,YAAY,EACZ,SAAS,EAEZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AA4CrD;oDACoD;AACpD,wBAAsB,0BAA0B,CAC5C,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAsBf;AA8BD;;GAEG;AACH,qBAAa,eAAe;IACxB,SAAg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