@apify/actors-mcp-server 0.9.17-beta.2 → 0.9.17
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/apify_client.js +4 -1
- package/dist/apify_client.js.map +1 -1
- package/dist/const.d.ts +9 -1
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +13 -2
- package/dist/const.js.map +1 -1
- package/dist/dev_server.js +4 -1
- package/dist/dev_server.js.map +1 -1
- package/dist/errors.js +4 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index_internals.js +4 -1
- package/dist/index_internals.js.map +1 -1
- package/dist/input.js +4 -1
- package/dist/input.js.map +1 -1
- package/dist/instrument.js +4 -1
- package/dist/instrument.js.map +1 -1
- package/dist/mcp/actors.js +4 -1
- package/dist/mcp/actors.js.map +1 -1
- package/dist/mcp/client.js +4 -1
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/const.js +4 -1
- package/dist/mcp/const.js.map +1 -1
- package/dist/mcp/proxy.js +4 -1
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +302 -181
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/utils.js +4 -1
- package/dist/mcp/utils.js.map +1 -1
- package/dist/payments/helpers.d.ts +18 -13
- package/dist/payments/helpers.d.ts.map +1 -1
- package/dist/payments/helpers.js +25 -17
- package/dist/payments/helpers.js.map +1 -1
- package/dist/payments/index.d.ts +2 -2
- package/dist/payments/index.d.ts.map +1 -1
- package/dist/payments/index.js +5 -2
- package/dist/payments/index.js.map +1 -1
- package/dist/payments/resolve.js +4 -1
- package/dist/payments/resolve.js.map +1 -1
- package/dist/payments/skyfire.js +4 -1
- package/dist/payments/skyfire.js.map +1 -1
- package/dist/payments/types.js +4 -1
- package/dist/payments/types.js.map +1 -1
- package/dist/payments/x402.js +4 -1
- package/dist/payments/x402.js.map +1 -1
- package/dist/prompts/index.js +4 -1
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/latest_news_on_topic.js +4 -1
- package/dist/prompts/latest_news_on_topic.js.map +1 -1
- package/dist/resources/resource_service.js +4 -1
- package/dist/resources/resource_service.js.map +1 -1
- package/dist/resources/widgets.js +4 -1
- package/dist/resources/widgets.js.map +1 -1
- package/dist/server_card.js +4 -1
- package/dist/server_card.js.map +1 -1
- package/dist/state.js +4 -1
- package/dist/state.js.map +1 -1
- package/dist/stdio.js +4 -1
- package/dist/stdio.js.map +1 -1
- package/dist/telemetry.js +4 -1
- package/dist/telemetry.js.map +1 -1
- package/dist/tools/build.js +4 -1
- package/dist/tools/build.js.map +1 -1
- package/dist/tools/categories.js +4 -1
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/common/abort_actor_run.js +4 -1
- package/dist/tools/common/abort_actor_run.js.map +1 -1
- package/dist/tools/common/add_actor.js +4 -1
- package/dist/tools/common/add_actor.js.map +1 -1
- package/dist/tools/common/dataset_collection.js +4 -1
- package/dist/tools/common/dataset_collection.js.map +1 -1
- package/dist/tools/common/fetch_apify_docs.d.ts.map +1 -1
- package/dist/tools/common/fetch_apify_docs.js +13 -5
- package/dist/tools/common/fetch_apify_docs.js.map +1 -1
- package/dist/tools/common/get_actor_output.js +6 -3
- package/dist/tools/common/get_actor_output.js.map +1 -1
- package/dist/tools/common/get_actor_run_log.js +4 -1
- package/dist/tools/common/get_actor_run_log.js.map +1 -1
- package/dist/tools/common/get_dataset.js +6 -3
- package/dist/tools/common/get_dataset.js.map +1 -1
- package/dist/tools/common/get_dataset_items.js +5 -2
- package/dist/tools/common/get_dataset_items.js.map +1 -1
- package/dist/tools/common/get_dataset_schema.js +6 -3
- package/dist/tools/common/get_dataset_schema.js.map +1 -1
- package/dist/tools/common/get_key_value_store.js +4 -1
- package/dist/tools/common/get_key_value_store.js.map +1 -1
- package/dist/tools/common/get_key_value_store_keys.js +4 -1
- package/dist/tools/common/get_key_value_store_keys.js.map +1 -1
- package/dist/tools/common/get_key_value_store_record.js +4 -1
- package/dist/tools/common/get_key_value_store_record.js.map +1 -1
- package/dist/tools/common/key_value_store_collection.js +4 -1
- package/dist/tools/common/key_value_store_collection.js.map +1 -1
- package/dist/tools/common/run_collection.js +4 -1
- package/dist/tools/common/run_collection.js.map +1 -1
- package/dist/tools/common/search_apify_docs.js +4 -1
- package/dist/tools/common/search_apify_docs.js.map +1 -1
- package/dist/tools/core/actor_execution.js +4 -1
- package/dist/tools/core/actor_execution.js.map +1 -1
- package/dist/tools/core/actor_response.js +4 -1
- package/dist/tools/core/actor_response.js.map +1 -1
- package/dist/tools/core/actor_tools_factory.d.ts +1 -0
- package/dist/tools/core/actor_tools_factory.d.ts.map +1 -1
- package/dist/tools/core/actor_tools_factory.js +9 -2
- package/dist/tools/core/actor_tools_factory.js.map +1 -1
- package/dist/tools/core/call_actor_common.d.ts +1 -11
- package/dist/tools/core/call_actor_common.d.ts.map +1 -1
- package/dist/tools/core/call_actor_common.js +67 -19
- package/dist/tools/core/call_actor_common.js.map +1 -1
- package/dist/tools/core/fetch_actor_details_common.js +4 -1
- package/dist/tools/core/fetch_actor_details_common.js.map +1 -1
- package/dist/tools/core/get_actor_run_common.js +6 -3
- package/dist/tools/core/get_actor_run_common.js.map +1 -1
- package/dist/tools/core/search_actors_common.js +4 -1
- package/dist/tools/core/search_actors_common.js.map +1 -1
- package/dist/tools/default/actor_executor.js +4 -1
- package/dist/tools/default/actor_executor.js.map +1 -1
- package/dist/tools/default/call_actor.d.ts.map +1 -1
- package/dist/tools/default/call_actor.js +26 -5
- package/dist/tools/default/call_actor.js.map +1 -1
- package/dist/tools/default/fetch_actor_details.js +4 -1
- package/dist/tools/default/fetch_actor_details.js.map +1 -1
- package/dist/tools/default/get_actor_run.js +5 -2
- package/dist/tools/default/get_actor_run.js.map +1 -1
- package/dist/tools/default/search_actors.js +4 -1
- package/dist/tools/default/search_actors.js.map +1 -1
- package/dist/tools/index.js +4 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/openai/actor_executor.js +4 -1
- package/dist/tools/openai/actor_executor.js.map +1 -1
- package/dist/tools/openai/call_actor.d.ts.map +1 -1
- package/dist/tools/openai/call_actor.js +25 -5
- package/dist/tools/openai/call_actor.js.map +1 -1
- package/dist/tools/openai/fetch_actor_details.js +4 -1
- package/dist/tools/openai/fetch_actor_details.js.map +1 -1
- package/dist/tools/openai/fetch_actor_details_internal.js +4 -1
- package/dist/tools/openai/fetch_actor_details_internal.js.map +1 -1
- package/dist/tools/openai/get_actor_run.js +5 -2
- package/dist/tools/openai/get_actor_run.js.map +1 -1
- package/dist/tools/openai/search_actors.js +4 -1
- package/dist/tools/openai/search_actors.js.map +1 -1
- package/dist/tools/openai/search_actors_internal.js +4 -1
- package/dist/tools/openai/search_actors_internal.js.map +1 -1
- package/dist/tools/structured_output_schemas.js +4 -1
- package/dist/tools/structured_output_schemas.js.map +1 -1
- package/dist/tools/utils.js +4 -1
- package/dist/tools/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +28 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/actor.js +4 -1
- package/dist/utils/actor.js.map +1 -1
- package/dist/utils/actor_card.js +4 -1
- package/dist/utils/actor_card.js.map +1 -1
- package/dist/utils/actor_details.js +6 -3
- package/dist/utils/actor_details.js.map +1 -1
- package/dist/utils/actor_search.js +4 -1
- package/dist/utils/actor_search.js.map +1 -1
- package/dist/utils/ajv.js +4 -1
- package/dist/utils/ajv.js.map +1 -1
- package/dist/utils/apify_docs.js +4 -1
- package/dist/utils/apify_docs.js.map +1 -1
- package/dist/utils/apify_properties.js +4 -1
- package/dist/utils/apify_properties.js.map +1 -1
- package/dist/utils/auth.js +4 -1
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/generic.js +4 -1
- package/dist/utils/generic.js.map +1 -1
- package/dist/utils/logging.js +4 -1
- package/dist/utils/logging.js.map +1 -1
- package/dist/utils/mcp.d.ts +9 -18
- package/dist/utils/mcp.d.ts.map +1 -1
- package/dist/utils/mcp.js +12 -18
- package/dist/utils/mcp.js.map +1 -1
- package/dist/utils/mcp_clients.js +4 -1
- package/dist/utils/mcp_clients.js.map +1 -1
- package/dist/utils/payment_errors.d.ts +1 -1
- package/dist/utils/payment_errors.js +4 -1
- package/dist/utils/payment_errors.js.map +1 -1
- package/dist/utils/pricing_info.js +4 -1
- package/dist/utils/pricing_info.js.map +1 -1
- package/dist/utils/progress.js +4 -1
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/schema_generation.js +4 -1
- package/dist/utils/schema_generation.js.map +1 -1
- package/dist/utils/server-instructions/common.js +4 -1
- package/dist/utils/server-instructions/common.js.map +1 -1
- package/dist/utils/server-instructions/default.js +4 -1
- package/dist/utils/server-instructions/default.js.map +1 -1
- package/dist/utils/server-instructions/index.js +4 -1
- package/dist/utils/server-instructions/index.js.map +1 -1
- package/dist/utils/server-instructions/openai.js +4 -1
- package/dist/utils/server-instructions/openai.js.map +1 -1
- package/dist/utils/tool_categories_helpers.js +4 -1
- package/dist/utils/tool_categories_helpers.js.map +1 -1
- package/dist/utils/tool_status.d.ts +20 -2
- package/dist/utils/tool_status.d.ts.map +1 -1
- package/dist/utils/tool_status.js +94 -3
- package/dist/utils/tool_status.js.map +1 -1
- package/dist/utils/tools.d.ts +22 -1
- package/dist/utils/tools.d.ts.map +1 -1
- package/dist/utils/tools.js +54 -1
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools_loader.js +4 -1
- package/dist/utils/tools_loader.js.map +1 -1
- package/dist/utils/ttl_lru.js +4 -1
- package/dist/utils/ttl_lru.js.map +1 -1
- package/dist/utils/userid_cache.js +4 -1
- package/dist/utils/userid_cache.js.map +1 -1
- package/dist/utils/version.js +4 -1
- package/dist/utils/version.js.map +1 -1
- package/dist/web/dist/actor-detail-widget.js +2 -0
- package/dist/web/dist/actor-run-widget.js +2 -0
- package/dist/web/dist/search-actors-widget.js +2 -0
- package/package.json +1 -1
package/dist/utils/mcp.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* @param source.usageUsd - Breakdown of costs by resource type (optional)
|
|
7
7
|
* @returns Usage metadata object or undefined if no usage data is available
|
|
8
8
|
*/
|
|
9
|
+
|
|
10
|
+
!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]="431942e3-efe6-5746-8e9b-0161877f1b3f")}catch(e){}}();
|
|
9
11
|
export function buildUsageMeta(source) {
|
|
10
12
|
const { usageTotalUsd, usageUsd } = source;
|
|
11
13
|
return usageTotalUsd !== undefined
|
|
@@ -16,31 +18,23 @@ export function buildUsageMeta(source) {
|
|
|
16
18
|
: undefined;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
|
-
* Helper to build a response for MCP from an array of text strings.
|
|
21
|
+
* Helper to build a content response for MCP from an array of text strings.
|
|
20
22
|
*
|
|
21
|
-
* Status model
|
|
22
|
-
* - `isError` is MCP-visible
|
|
23
|
-
* - `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @param options - Object containing response configuration
|
|
28
|
-
* @param options.texts - Array of text strings to include in the response
|
|
29
|
-
* @param options.isError - Optional flag to mark the response as an error (default: false).
|
|
30
|
-
* This must remain MCP compliant: true for any tool-level error.
|
|
31
|
-
* @param options.toolStatus - Optional internal tool status used for telemetry. When provided,
|
|
32
|
-
* it is attached as `internalToolStatus` for server-side processing only.
|
|
33
|
-
* @param options.structuredContent - Optional structured content of unknown type
|
|
34
|
-
* @param options._meta - Optional metadata for widget rendering (e.g., OpenAI widget metadata)
|
|
23
|
+
* Status model:
|
|
24
|
+
* - `isError` is MCP-visible — returned to the client.
|
|
25
|
+
* - `telemetry` is server-internal — attached as `toolTelemetry` on the response,
|
|
26
|
+
* then stripped by `extractToolTelemetry()` before the response reaches the client.
|
|
27
|
+
* Contains tool outcome (toolStatus, failureCategory, etc.) used for Segment telemetry.
|
|
35
28
|
*/
|
|
36
29
|
export function buildMCPResponse(options) {
|
|
37
|
-
const { texts, isError = false,
|
|
30
|
+
const { texts, isError = false, telemetry, structuredContent, _meta } = options;
|
|
38
31
|
return {
|
|
39
32
|
content: texts.map((text) => ({ type: 'text', text })),
|
|
40
33
|
isError,
|
|
41
|
-
...(
|
|
34
|
+
...(telemetry && { toolTelemetry: telemetry }),
|
|
42
35
|
...(structuredContent !== undefined && { structuredContent }),
|
|
43
36
|
...(_meta !== undefined && { _meta }),
|
|
44
37
|
};
|
|
45
38
|
}
|
|
46
|
-
//# sourceMappingURL=mcp.js.map
|
|
39
|
+
//# sourceMappingURL=mcp.js.map
|
|
40
|
+
//# debugId=431942e3-efe6-5746-8e9b-0161877f1b3f
|
package/dist/utils/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","
|
|
1
|
+
{"version":3,"file":"mcp.js","sources":["../../src/utils/mcp.ts"],"sourceRoot":"","names":[],"mappings":"AAEA;;;;;;;GAOG;;;AACH,MAAM,UAAU,cAAc,CAAC,MAG9B;IACG,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC3C,OAAO,aAAa,KAAK,SAAS;QAC9B,CAAC,CAAC;YACE,aAAa;YACb,QAAQ;SACX;QACD,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAMhC;IACG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEhF,OAAO;QACH,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,OAAO;QACP,GAAG,CAAC,SAAS,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;QAC9C,GAAG,CAAC,iBAAiB,KAAK,SAAS,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,CAAC;KACxC,CAAC;AACN,CAAC","debugId":"431942e3-efe6-5746-8e9b-0161877f1b3f"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e5b70a4f-76da-59b0-aefa-e52b37ee065f")}catch(e){}}();
|
|
1
3
|
import { mcpClients } from 'mcp-client-capabilities';
|
|
2
4
|
/**
|
|
3
5
|
* Determines if the MCP client supports dynamic tools based on the InitializeRequest data.
|
|
@@ -18,4 +20,5 @@ export function doesMcpClientSupportDynamicTools(initializeRequestData) {
|
|
|
18
20
|
}
|
|
19
21
|
return ((_d = clientCapabilities.tools) === null || _d === void 0 ? void 0 : _d.listChanged) === true;
|
|
20
22
|
}
|
|
21
|
-
//# sourceMappingURL=mcp_clients.js.map
|
|
23
|
+
//# sourceMappingURL=mcp_clients.js.map
|
|
24
|
+
//# debugId=e5b70a4f-76da-59b0-aefa-e52b37ee065f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp_clients.js","
|
|
1
|
+
{"version":3,"file":"mcp_clients.js","sources":["../../src/utils/mcp_clients.ts"],"sourceRoot":"","names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAAC,qBAAyC;;IACtF,MAAM,UAAU,GAAG,MAAA,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,MAAM,0CAAE,UAAU,0CAAE,IAAI,CAAC;IACnE,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,kBAAkB;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,eAAe,CAAC;IACjE,MAAM,oBAAoB,GAAG,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,MAAM,0CAAE,eAAe,CAAC;IAE5E,mEAAmE;IACnE,wGAAwG;IACxG,IAAI,qBAAqB,KAAK,oBAAoB,EAAE,CAAC;QACjD,+FAA+F;QAC/F,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CAAA,MAAA,kBAAkB,CAAC,KAAK,0CAAE,WAAW,MAAK,IAAI,CAAC;AAC1D,CAAC","debugId":"e5b70a4f-76da-59b0-aefa-e52b37ee065f"}
|
|
@@ -17,7 +17,7 @@ export declare function registerPaymentRequiredInterceptor(apifyClient: ApifyCli
|
|
|
17
17
|
export declare function buildPaymentRequiredResponse(errorOrMessage: unknown, precomputedPaymentData?: unknown): {
|
|
18
18
|
_meta?: Record<string, unknown> | undefined;
|
|
19
19
|
structuredContent?: {} | null | undefined;
|
|
20
|
-
|
|
20
|
+
toolTelemetry?: import("../types.js").ToolTelemetryContext | undefined;
|
|
21
21
|
content: {
|
|
22
22
|
type: "text";
|
|
23
23
|
text: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3209d9ab-ecf3-538d-8b62-677117e9f631")}catch(e){}}();
|
|
1
3
|
import { ApifyApiError } from 'apify-client';
|
|
2
4
|
import log from '@apify/log';
|
|
3
5
|
import { HTTP_PAYMENT_REQUIRED } from '../const.js';
|
|
@@ -87,4 +89,5 @@ export function buildPaymentRequiredResponse(errorOrMessage, precomputedPaymentD
|
|
|
87
89
|
isError: true,
|
|
88
90
|
});
|
|
89
91
|
}
|
|
90
|
-
//# sourceMappingURL=payment_errors.js.map
|
|
92
|
+
//# sourceMappingURL=payment_errors.js.map
|
|
93
|
+
//# debugId=3209d9ab-ecf3-538d-8b62-677117e9f631
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment_errors.js","
|
|
1
|
+
{"version":3,"file":"payment_errors.js","sources":["../../src/utils/payment_errors.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,GAAG,MAAM,YAAY,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAYhE,SAAS,gBAAgB,CAAC,WAAwB;;IAC9C,OAAO,MAAC,WAAyE,CAAC,UAAU,0CAAE,KAAK,CAAC;AACxG,CAAC;AAED,SAAS,2BAA2B,CAAC,WAAoB;IACrD,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAClF,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAA4B,CAAC;IACvG,CAAC;IAAC,MAAM,CAAC;QACL,OAA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IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9D,yFAAyF;IACzF,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;QACjC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,IAA+B,CAAC;IAC1F,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,cAAuB,EAAE,sBAAgC;IAClG,MAAM,WAAW,GAAG,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,0BAA0B,CAAC,cAAc,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,cAAc,YAAY,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAElG,OAAO,gBAAgB,CAAC;QACpB,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5D,OAAO,EAAE,IAAI;KAChB,CAAC,CAAC;AACP,CAAC","debugId":"3209d9ab-ecf3-538d-8b62-677117e9f631"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bd019de8-7d0d-553e-af82-2d823c73075c")}catch(e){}}();
|
|
1
3
|
import { ACTOR_PRICING_MODEL } from '../const.js';
|
|
2
4
|
/**
|
|
3
5
|
* Returns the most recent valid pricing information from a list of pricing infos,
|
|
@@ -157,4 +159,5 @@ export function pricingInfoToStructured(pricingInfo) {
|
|
|
157
159
|
}
|
|
158
160
|
return structuredPricing;
|
|
159
161
|
}
|
|
160
|
-
//# sourceMappingURL=pricing_info.js.map
|
|
162
|
+
//# sourceMappingURL=pricing_info.js.map
|
|
163
|
+
//# debugId=bd019de8-7d0d-553e-af82-2d823c73075c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing_info.js","
|
|
1
|
+
{"version":3,"file":"pricing_info.js","sources":["../../src/utils/pricing_info.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA4BlD;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAA2B,EAAE,GAAS;IACxE,iEAAiE;IACjE,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACnD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO,KAAK,CAAC;QAClC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3C,OAAO,SAAS,IAAI,GAAG,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,+CAA+C;IAC/C,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,kBAAkB;IAChE,CAAC,CAAC,CAAC;IACH,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;IACvE,CAAC;IAED,OAAO,IAAI,CAAC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ANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2f98c5be-5235-52b3-8b39-68267b074868")}catch(e){}}();
|
|
1
3
|
import { PROGRESS_NOTIFICATION_INTERVAL_MS } from '../const.js';
|
|
2
4
|
export class ProgressTracker {
|
|
3
5
|
constructor(options) {
|
|
@@ -122,4 +124,5 @@ export function createProgressTracker(progressToken, sendNotification, taskId, o
|
|
|
122
124
|
}
|
|
123
125
|
return new ProgressTracker({ progressToken, sendNotification, taskId, onStatusMessage });
|
|
124
126
|
}
|
|
125
|
-
//# sourceMappingURL=progress.js.map
|
|
127
|
+
//# sourceMappingURL=progress.js.map
|
|
128
|
+
//# debugId=2f98c5be-5235-52b3-8b39-68267b074868
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","
|
|
1
|
+
{"version":3,"file":"progress.js","sources":["../../src/utils/progress.ts"],"sourceRoot":"","names":[],"mappings":";;AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,OAAO,eAAe;IAQxB,YAAY,OAKX;QAZO;;;;;WAAgC;QAChC;;;;;WAAyE;QACzE;;;;mBAAkB,CAAC;WAAC;QACpB;;;;;WAA4B;QAC5B;;;;;WAAgB;QAChB;;;;;WAAqD;QAQzD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAgB;QACjC,I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AAC","debugId":"2f98c5be-5235-52b3-8b39-68267b074868"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ebf6509d-f540-52ad-bd5b-b615c94d9916")}catch(e){}}();
|
|
1
3
|
import toJsonSchema from 'to-json-schema';
|
|
2
4
|
/**
|
|
3
5
|
* Function to recursively remove empty arrays from an object
|
|
@@ -57,4 +59,5 @@ export function generateSchemaFromItems(datasetItems, options = {}) {
|
|
|
57
59
|
// If all attempts fail, return null
|
|
58
60
|
return null;
|
|
59
61
|
}
|
|
60
|
-
//# sourceMappingURL=schema_generation.js.map
|
|
62
|
+
//# sourceMappingURL=schema_generation.js.map
|
|
63
|
+
//# debugId=ebf6509d-f540-52ad-bd5b-b615c94d9916
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema_generation.js","
|
|
1
|
+
{"version":3,"file":"schema_generation.js","sources":["../../src/utils/schema_generation.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAiC1C;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,+EAA+E;QAC/E,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC1C,2CAA2C;QAC3C,OAAO,GAAG,CAAC;IACf,CAAC;IAED,sEAAsE;IACtE,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,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,EAAE,OAAO,EAAE;SAC5B,CAAoB,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;IAExB,oCAAoC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC","debugId":"ebf6509d-f540-52ad-bd5b-b615c94d9916"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Shared server instructions — mode-independent content about Actors, discovery,
|
|
3
3
|
* execution workflow, storage, and tool disambiguation.
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
!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]="ab43c55e-a4a5-59de-9688-84bc45e20982")}catch(e){}}();
|
|
5
7
|
import { HelperTools, RAG_WEB_BROWSER } from '../../const.js';
|
|
6
8
|
/**
|
|
7
9
|
* Returns the common server instructions shared across all modes.
|
|
@@ -55,4 +57,5 @@ ${input.workflowRules}## Tool dependencies and disambiguation
|
|
|
55
57
|
Prefer dedicated tools when available; use \`${HelperTools.ACTOR_CALL}\` only when no specialized tool exists in Apify store.
|
|
56
58
|
`;
|
|
57
59
|
}
|
|
58
|
-
//# sourceMappingURL=common.js.map
|
|
60
|
+
//# sourceMappingURL=common.js.map
|
|
61
|
+
//# debugId=ab43c55e-a4a5-59de-9688-84bc45e20982
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","
|
|
1
|
+
{"version":3,"file":"common.js","sources":["../../../src/utils/server-instructions/common.ts"],"sourceRoot":"","names":[],"mappings":"AAAA;;;GAGG;;;AAEH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAW9D;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA8B;IAChE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;EAyBT,KAAK,CAAC,aAAa;;;MAGf,WAAW,CAAC,UAAU;MACtB,KAAK,CAAC,cAAc;;;;;;;;MAQpB,WAAW,CAAC,gBAAgB,OAAO,WAAW,CAAC,iBAAiB;UAC5D,WAAW,CAAC,gBAAgB,kCAAkC,WAAW,CAAC,iBAAiB;MAC/F,WAAW,CAAC,YAAY,OAAO,WAAW,CAAC,iBAAiB;MAC5D,WAAW,CAAC,YAAY,sBAAsB,WAAW,CAAC,iBAAiB,uEAAuE,KAAK,CAAC,kBAAkB;MAC1K,WAAW,CAAC,YAAY,OAAO,eAAe;MAC9C,WAAW,CAAC,YAAY,8DAA8D,eAAe;kCACzE,eAAe,QAAQ,WAAW,CAAC,UAAU;iDAC9B,WAAW,CAAC,UAAU;CACtE,CAAC;AACF,CAAC","debugId":"ab43c55e-a4a5-59de-9688-84bc45e20982"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default mode server instructions — standard tool references without UI-specific rules.
|
|
3
3
|
*/
|
|
4
|
+
|
|
5
|
+
!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]="b9cdf259-82f0-50a1-a1f7-1838c2408fd6")}catch(e){}}();
|
|
4
6
|
import { HelperTools } from '../../const.js';
|
|
5
7
|
import { getCommonInstructions } from './common.js';
|
|
6
8
|
/** Returns server instructions for default (non-UI) mode. */
|
|
@@ -11,4 +13,5 @@ export function getDefaultInstructions() {
|
|
|
11
13
|
toolDisambiguation: '',
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
|
-
//# sourceMappingURL=default.js.map
|
|
16
|
+
//# sourceMappingURL=default.js.map
|
|
17
|
+
//# debugId=b9cdf259-82f0-50a1-a1f7-1838c2408fd6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","
|
|
1
|
+
{"version":3,"file":"default.js","sources":["../../../src/utils/server-instructions/default.ts"],"sourceRoot":"","names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,6DAA6D;AAC7D,MAAM,UAAU,sBAAsB;IAClC,OAAO,qBAAqB,CAAC;QACzB,cAAc,EAAE,SAAS,WAAW,CAAC,iBAAiB,6CAA6C;QACnG,aAAa,EAAE,EAAE;QACjB,kBAAkB,EAAE,EAAE;KACzB,CAAC,CAAC;AACP,CAAC","debugId":"b9cdf259-82f0-50a1-a1f7-1838c2408fd6"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Server instructions entry point.
|
|
3
3
|
* Selects the appropriate instructions based on server mode.
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
!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]="696347bc-5901-5a24-9931-e1990a0375d8")}catch(e){}}();
|
|
5
7
|
import { getDefaultInstructions } from './default.js';
|
|
6
8
|
import { getOpenaiInstructions } from './openai.js';
|
|
7
9
|
/** Mode → instructions builder. Add new modes here. */
|
|
@@ -15,4 +17,5 @@ const instructionsByMode = {
|
|
|
15
17
|
export function getServerInstructions(mode = 'default') {
|
|
16
18
|
return instructionsByMode[mode]();
|
|
17
19
|
}
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
21
|
+
//# debugId=696347bc-5901-5a24-9931-e1990a0375d8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils/server-instructions/index.ts"],"sourceRoot":"","names":[],"mappings":"AAAA;;;GAGG;;;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,uDAAuD;AACvD,MAAM,kBAAkB,GAAqC;IACzD,OAAO,EAAE,sBAAsB;IAC/B,MAAM,EAAE,qBAAqB;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAmB,SAAS;IAC9D,OAAO,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;AACtC,CAAC","debugId":"696347bc-5901-5a24-9931-e1990a0375d8"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* OpenAI UI mode server instructions — includes widget workflow rules and
|
|
3
3
|
* internal vs public tool disambiguation.
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
!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]="4a98ca4c-fb07-5c3d-a6be-b864f20164d0")}catch(e){}}();
|
|
5
7
|
import { HelperTools } from '../../const.js';
|
|
6
8
|
import { getCommonInstructions } from './common.js';
|
|
7
9
|
const WORKFLOW_RULES = `
|
|
@@ -27,4 +29,5 @@ export function getOpenaiInstructions() {
|
|
|
27
29
|
toolDisambiguation: TOOL_DISAMBIGUATION,
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
|
-
//# sourceMappingURL=openai.js.map
|
|
32
|
+
//# sourceMappingURL=openai.js.map
|
|
33
|
+
//# debugId=4a98ca4c-fb07-5c3d-a6be-b864f20164d0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.js","
|
|
1
|
+
{"version":3,"file":"openai.js","sources":["../../../src/utils/server-instructions/openai.ts"],"sourceRoot":"","names":[],"mappings":"AAAA;;;GAGG;;;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,cAAc,GAAG;;;iBAGN,WAAW,CAAC,cAAc,cAAc,WAAW,CAAC,UAAU;;kBAE7D,WAAW,CAAC,UAAU,mIAAmI,WAAW,CAAC,cAAc;;wGAE7F,WAAW,CAAC,UAAU;;CAE7H,CAAC;AAEF,MAAM,mBAAmB,GAAG;;QAEpB,WAAW,CAAC,qBAAqB,uCAAuC,WAAW,CAAC,YAAY;QAChG,WAAW,CAAC,0BAA0B,6CAA6C,WAAW,CAAC,iBAAiB;2DAC7D,WAAW,CAAC,qBAAqB,mCAAmC,WAAW,CAAC,YAAY,IAAI,CAAC;AAE5J,sDAAsD;AACtD,MAAM,UAAU,qBAAqB;IACjC,OAAO,qBAAqB,CAAC;QACzB,cAAc,EAAE,SAAS,WAAW,CAAC,0BAA0B,6CAA6C;QAC5G,aAAa,EAAE,cAAc;QAC7B,kBAAkB,EAAE,mBAAmB;KAC1C,CAAC,CAAC;AACP,CAAC","debugId":"4a98ca4c-fb07-5c3d-a6be-b864f20164d0"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Helper functions for working with tool categories.
|
|
3
3
|
* Separated from tools.ts to break circular dependency: tools/index.ts → utils/tools.ts → tools/categories.ts → tools/index.ts
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
!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]="f6a7cf97-ec92-5eea-86ed-c569c6d7185a")}catch(e){}}();
|
|
5
7
|
import { getCategoryTools } from '../tools/categories.js';
|
|
6
8
|
/**
|
|
7
9
|
* Returns the tool objects for the given category names resolved for the specified mode.
|
|
@@ -18,4 +20,5 @@ export function getExpectedToolsByCategories(categories, mode) {
|
|
|
18
20
|
export function getExpectedToolNamesByCategories(categories) {
|
|
19
21
|
return getExpectedToolsByCategories(categories, 'default').map((tool) => tool.name);
|
|
20
22
|
}
|
|
21
|
-
//# sourceMappingURL=tool_categories_helpers.js.map
|
|
23
|
+
//# sourceMappingURL=tool_categories_helpers.js.map
|
|
24
|
+
//# debugId=f6a7cf97-ec92-5eea-86ed-c569c6d7185a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool_categories_helpers.js","
|
|
1
|
+
{"version":3,"file":"tool_categories_helpers.js","sources":["../../src/utils/tool_categories_helpers.ts"],"sourceRoot":"","names":[],"mappings":"AAAA;;;GAGG;;;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,UAA0B,EAAE,IAAgB;IACrF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACxC,OAAO,UAAU;SACZ,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAAC,UAA0B;IACvE,OAAO,4BAA4B,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxF,CAAC","debugId":"f6a7cf97-ec92-5eea-86ed-c569c6d7185a"}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ErrorObject } from 'ajv';
|
|
2
|
+
import type { AjvErrorDetails, CallDiagnostics, FailureCategory, ToolStatus } from '../types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Central helper to classify an error into a ToolStatus value.
|
|
4
5
|
*
|
|
5
|
-
* - TOOL_STATUS.ABORTED →
|
|
6
|
+
* - TOOL_STATUS.ABORTED → the client explicitly aborted Request.
|
|
6
7
|
* - TOOL_STATUS.SOFT_FAIL → User/client errors (HTTP 4xx, InvalidParams, validation issues).
|
|
7
8
|
* - TOOL_STATUS.FAILED → Server errors (HTTP 5xx, unknown, or unexpected exceptions).
|
|
8
9
|
*/
|
|
9
10
|
export declare function getToolStatusFromError(error: unknown, isAborted: boolean): ToolStatus;
|
|
11
|
+
export declare function classifyFailureCategory(error: unknown): FailureCategory;
|
|
12
|
+
export declare function extractAjvErrorDetails(errors: ErrorObject[] | null | undefined): AjvErrorDetails;
|
|
13
|
+
/**
|
|
14
|
+
* Reads `toolTelemetry` from a tool response, strips it, and returns toolStatus + callDiagnostics.
|
|
15
|
+
*
|
|
16
|
+
* toolStatus resolution:
|
|
17
|
+
* 1. `toolTelemetry.toolStatus` present → use it directly.
|
|
18
|
+
* 2. `isError` set without toolStatus → SOFT_FAIL.
|
|
19
|
+
* 3. Neither → SUCCEEDED.
|
|
20
|
+
*
|
|
21
|
+
* actorName/actorId are server-side context (from tool resolution).
|
|
22
|
+
* Tool-reported actorId (e.g. from call-actor after resolution) takes precedence.
|
|
23
|
+
*/
|
|
24
|
+
export declare function extractToolTelemetry(res: Record<string, unknown>, actorName: string | undefined, actorId: string | undefined): {
|
|
25
|
+
toolStatus: ToolStatus;
|
|
26
|
+
callDiagnostics: CallDiagnostics;
|
|
27
|
+
};
|
|
10
28
|
//# sourceMappingURL=tool_status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool_status.d.ts","sourceRoot":"","sources":["../../src/utils/tool_status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool_status.d.ts","sourceRoot":"","sources":["../../src/utils/tool_status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAIvH;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,UAAU,CAmBrF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAYvE;AASD,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GACzC,eAAe,CAgCjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC5B;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,eAAe,EAAE,eAAe,CAAA;CAAE,CA6B9D"}
|
|
@@ -1,10 +1,13 @@
|
|
|
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]="ab027376-2f14-5f85-8488-e90dbbf4c373")}catch(e){}}();
|
|
1
3
|
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
-
import { TOOL_STATUS } from '../const.js';
|
|
4
|
+
import { FAILURE_CATEGORY, HTTP_FORBIDDEN, HTTP_NOT_FOUND, HTTP_UNAUTHORIZED, TOOL_STATUS } from '../const.js';
|
|
3
5
|
import { getHttpStatusCode } from './logging.js';
|
|
6
|
+
import { buildActorFields } from './tools.js';
|
|
4
7
|
/**
|
|
5
8
|
* Central helper to classify an error into a ToolStatus value.
|
|
6
9
|
*
|
|
7
|
-
* - TOOL_STATUS.ABORTED →
|
|
10
|
+
* - TOOL_STATUS.ABORTED → the client explicitly aborted Request.
|
|
8
11
|
* - TOOL_STATUS.SOFT_FAIL → User/client errors (HTTP 4xx, InvalidParams, validation issues).
|
|
9
12
|
* - TOOL_STATUS.FAILED → Server errors (HTTP 5xx, unknown, or unexpected exceptions).
|
|
10
13
|
*/
|
|
@@ -24,4 +27,92 @@ export function getToolStatusFromError(error, isAborted) {
|
|
|
24
27
|
// Everything else is considered a server / unexpected failure
|
|
25
28
|
return TOOL_STATUS.FAILED;
|
|
26
29
|
}
|
|
27
|
-
|
|
30
|
+
export function classifyFailureCategory(error) {
|
|
31
|
+
if (error instanceof McpError && error.code === ErrorCode.InvalidParams) {
|
|
32
|
+
return FAILURE_CATEGORY.INVALID_INPUT;
|
|
33
|
+
}
|
|
34
|
+
const statusCode = getHttpStatusCode(error);
|
|
35
|
+
if (statusCode === HTTP_UNAUTHORIZED || statusCode === HTTP_FORBIDDEN)
|
|
36
|
+
return FAILURE_CATEGORY.AUTH;
|
|
37
|
+
if (statusCode === HTTP_NOT_FOUND)
|
|
38
|
+
return FAILURE_CATEGORY.INVALID_INPUT;
|
|
39
|
+
if (statusCode !== undefined && statusCode >= 400 && statusCode < 500)
|
|
40
|
+
return FAILURE_CATEGORY.INVALID_INPUT;
|
|
41
|
+
if (statusCode !== undefined && statusCode >= 500)
|
|
42
|
+
return FAILURE_CATEGORY.INTERNAL_ERROR;
|
|
43
|
+
return FAILURE_CATEGORY.INTERNAL_ERROR;
|
|
44
|
+
}
|
|
45
|
+
const MAX_VALIDATION_FIELD_LENGTH = 120;
|
|
46
|
+
function limitField(value) {
|
|
47
|
+
if (!value)
|
|
48
|
+
return undefined;
|
|
49
|
+
return value.length > MAX_VALIDATION_FIELD_LENGTH ? value.slice(0, MAX_VALIDATION_FIELD_LENGTH) : value;
|
|
50
|
+
}
|
|
51
|
+
export function extractAjvErrorDetails(errors) {
|
|
52
|
+
if (!(errors === null || errors === void 0 ? void 0 : errors.length))
|
|
53
|
+
return {};
|
|
54
|
+
const firstError = errors[0];
|
|
55
|
+
// Extracted fields use the first AJV error as the canonical summary:
|
|
56
|
+
// - validation_keyword: AJV keyword such as "required", "additionalProperties", "minimum", "type"
|
|
57
|
+
// - validation_path: AJV instancePath such as "/input/query" or "/callOptions/memory"
|
|
58
|
+
// - validation_missing_property: required-property name such as "query"
|
|
59
|
+
// - validation_additional_property: unexpected-property name such as "docSource"
|
|
60
|
+
// - validation_error_count: total number of AJV errors (signals when there's more than one)
|
|
61
|
+
const diagnostics = {
|
|
62
|
+
validation_keyword: limitField(firstError.keyword),
|
|
63
|
+
validation_path: limitField(firstError.instancePath || undefined),
|
|
64
|
+
validation_error_count: errors.length,
|
|
65
|
+
};
|
|
66
|
+
const hasParams = typeof firstError.params === 'object' && firstError.params !== null;
|
|
67
|
+
if (firstError.keyword === 'required' && hasParams && 'missingProperty' in firstError.params) {
|
|
68
|
+
const { missingProperty } = firstError.params;
|
|
69
|
+
if (typeof missingProperty === 'string') {
|
|
70
|
+
diagnostics.validation_missing_property = limitField(missingProperty);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (firstError.keyword === 'additionalProperties' && hasParams && 'additionalProperty' in firstError.params) {
|
|
74
|
+
const { additionalProperty } = firstError.params;
|
|
75
|
+
if (typeof additionalProperty === 'string') {
|
|
76
|
+
diagnostics.validation_additional_property = limitField(additionalProperty);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return diagnostics;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Reads `toolTelemetry` from a tool response, strips it, and returns toolStatus + callDiagnostics.
|
|
83
|
+
*
|
|
84
|
+
* toolStatus resolution:
|
|
85
|
+
* 1. `toolTelemetry.toolStatus` present → use it directly.
|
|
86
|
+
* 2. `isError` set without toolStatus → SOFT_FAIL.
|
|
87
|
+
* 3. Neither → SUCCEEDED.
|
|
88
|
+
*
|
|
89
|
+
* actorName/actorId are server-side context (from tool resolution).
|
|
90
|
+
* Tool-reported actorId (e.g. from call-actor after resolution) takes precedence.
|
|
91
|
+
*/
|
|
92
|
+
export function extractToolTelemetry(res, actorName, actorId) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
const telemetry = res.toolTelemetry;
|
|
95
|
+
delete res.toolTelemetry;
|
|
96
|
+
// Tool-reported actorId (e.g. from call-actor) takes precedence over server-side actorId
|
|
97
|
+
const actorFields = buildActorFields(actorName, (_a = telemetry === null || telemetry === void 0 ? void 0 : telemetry.actorId) !== null && _a !== void 0 ? _a : actorId);
|
|
98
|
+
if (!telemetry) {
|
|
99
|
+
if (res.isError) {
|
|
100
|
+
return {
|
|
101
|
+
toolStatus: TOOL_STATUS.SOFT_FAIL,
|
|
102
|
+
callDiagnostics: { failure_category: FAILURE_CATEGORY.INTERNAL_ERROR, ...actorFields },
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return { toolStatus: TOOL_STATUS.SUCCEEDED, callDiagnostics: {} };
|
|
106
|
+
}
|
|
107
|
+
const toolStatus = (_b = telemetry.toolStatus) !== null && _b !== void 0 ? _b : (res.isError ? TOOL_STATUS.SOFT_FAIL : TOOL_STATUS.SUCCEEDED);
|
|
108
|
+
const callDiagnostics = {
|
|
109
|
+
...(telemetry.failureCategory && { failure_category: telemetry.failureCategory }),
|
|
110
|
+
...(telemetry.failureHttpStatus !== undefined && { failure_http_status: telemetry.failureHttpStatus }),
|
|
111
|
+
...(telemetry.failureDetail && { failure_detail: telemetry.failureDetail }),
|
|
112
|
+
...actorFields,
|
|
113
|
+
...telemetry.ajvErrorDetails,
|
|
114
|
+
};
|
|
115
|
+
return { toolStatus, callDiagnostics };
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=tool_status.js.map
|
|
118
|
+
//# debugId=ab027376-2f14-5f85-8488-e90dbbf4c373
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool_status.js","
|
|
1
|
+
{"version":3,"file":"tool_status.js","sources":["../../src/utils/tool_status.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,cA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W,CAAC,SAAS,CAAC,CAAC;IAErE,MAAM,eAAe,GAAoB;QACrC,GAAG,CAAC,SAAS,CAAC,eAAe,IAAI,EAAE,gBAAgB,EAAE,SAAS,CAAC,eAAe,EAAE,CAAC;QACjF,GAAG,CAAC,SAAS,CAAC,iBAAiB,KAAK,SAAS,IAAI,EAAE,mBAAmB,EAAE,SAAS,CAAC,iBAAiB,EAAE,CAAC;QACtG,GAAG,CAAC,SAAS,CAAC,aAAa,IAAI,EAAE,cAAc,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC;QAC3E,GAAG,WAAW;QACd,GAAG,SAAS,CAAC,eAAe;KAC/B,CAAC;IAEF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;AAC3C,CAAC","debugId":"ab027376-2f14-5f85-8488-e90dbbf4c373"}
|
package/dist/utils/tools.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import type { ServerMode, ToolBase, ToolEntry } from '../types.js';
|
|
1
|
+
import type { CallDiagnostics, ServerMode, ToolBase, ToolEntry } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the canonical full name for a tool.
|
|
4
|
+
* For actor tools this is actorFullName (e.g. "apify/rag-web-browser"),
|
|
5
|
+
* for all others it's the tool name.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getToolFullName(tool: ToolEntry): string;
|
|
8
|
+
/**
|
|
9
|
+
* Extract stable Actor ID for telemetry.
|
|
10
|
+
* Available for actor and actor-mcp tools; undefined for internal tools.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractActorId(tool: ToolEntry): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Build actor identification fields for failure telemetry.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildActorFields(actorName?: string, actorId?: string): Pick<CallDiagnostics, 'actor_name' | 'actor_id'>;
|
|
17
|
+
/**
|
|
18
|
+
* Extract actor name for telemetry from the tool entry or call-actor args.
|
|
19
|
+
* For actor tools, read from the tool entry. For call-actor, parse from the `actor` arg.
|
|
20
|
+
* Returns undefined for other internal tools or when the arg is missing/invalid.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractActorName(tool: ToolEntry, args?: Record<string, unknown>): string | undefined;
|
|
2
23
|
type ToolPublicFieldOptions = {
|
|
3
24
|
mode?: ServerMode;
|
|
4
25
|
filterWidgetMeta?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAc,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAc,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AAGjH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAOvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAGlE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,UAAU,CAAC,CAKvH;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAUpG;AAED,KAAK,sBAAsB,GAAG;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA0BF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB1F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAkB9D;AAQD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAsBnE"}
|
package/dist/utils/tools.js
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
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]="cc98b45b-bfad-5e3e-a6bb-eef6e7885d2f")}catch(e){}}();
|
|
1
3
|
import { SKYFIRE_ENABLED_TOOLS, SKYFIRE_PAY_ID_PROPERTY_DESCRIPTION, SKYFIRE_TOOL_INSTRUCTIONS, } from '../const.js';
|
|
2
4
|
import { fixZodSchemaRequired } from './ajv.js';
|
|
5
|
+
/**
|
|
6
|
+
* Returns the canonical full name for a tool.
|
|
7
|
+
* For actor tools this is actorFullName (e.g. "apify/rag-web-browser"),
|
|
8
|
+
* for all others it's the tool name.
|
|
9
|
+
*/
|
|
10
|
+
export function getToolFullName(tool) {
|
|
11
|
+
switch (tool.type) {
|
|
12
|
+
case 'actor': return tool.actorFullName;
|
|
13
|
+
case 'internal':
|
|
14
|
+
case 'actor-mcp': return tool.name;
|
|
15
|
+
default: return tool.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Extract stable Actor ID for telemetry.
|
|
20
|
+
* Available for actor and actor-mcp tools; undefined for internal tools.
|
|
21
|
+
*/
|
|
22
|
+
export function extractActorId(tool) {
|
|
23
|
+
if (tool.type === 'actor' || tool.type === 'actor-mcp')
|
|
24
|
+
return tool.actorId;
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Build actor identification fields for failure telemetry.
|
|
29
|
+
*/
|
|
30
|
+
export function buildActorFields(actorName, actorId) {
|
|
31
|
+
return {
|
|
32
|
+
...(actorName ? { actor_name: actorName } : {}),
|
|
33
|
+
...(actorId ? { actor_id: actorId } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Extract actor name for telemetry from the tool entry or call-actor args.
|
|
38
|
+
* For actor tools, read from the tool entry. For call-actor, parse from the `actor` arg.
|
|
39
|
+
* Returns undefined for other internal tools or when the arg is missing/invalid.
|
|
40
|
+
*/
|
|
41
|
+
export function extractActorName(tool, args) {
|
|
42
|
+
var _a;
|
|
43
|
+
if (tool.type === 'actor')
|
|
44
|
+
return tool.actorFullName;
|
|
45
|
+
if (tool.type === 'actor-mcp')
|
|
46
|
+
return tool.actorId;
|
|
47
|
+
// For call-actor, the actor name is in `args.actor`.
|
|
48
|
+
// The format can be "username/name" or "username/name:toolName" (MCP server Actors).
|
|
49
|
+
// Strip the optional `:toolName` suffix to get the base actor name.
|
|
50
|
+
const actorArg = args === null || args === void 0 ? void 0 : args.actor;
|
|
51
|
+
if (typeof actorArg !== 'string')
|
|
52
|
+
return undefined;
|
|
53
|
+
return ((_a = actorArg.split(':')[0]) === null || _a === void 0 ? void 0 : _a.trim()) || undefined;
|
|
54
|
+
}
|
|
3
55
|
/**
|
|
4
56
|
* Strips widget-specific metadata (openai/* and ui keys) from tool metadata.
|
|
5
57
|
* Used to hide widget metadata in non-openai modes.
|
|
@@ -98,4 +150,5 @@ export function applySkyfireAugmentation(tool) {
|
|
|
98
150
|
}
|
|
99
151
|
return Object.freeze(cloned);
|
|
100
152
|
}
|
|
101
|
-
//# sourceMappingURL=tools.js.map
|
|
153
|
+
//# sourceMappingURL=tools.js.map
|
|
154
|
+
//# debugId=cc98b45b-bfad-5e3e-a6bb-eef6e7885d2f
|