@apify/actors-mcp-server 0.9.21-beta.0 → 0.9.21-beta.2
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 +2 -2
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +2 -2
- package/dist/const.js.map +1 -1
- package/dist/tools/apps/call_actor.d.ts.map +1 -1
- package/dist/tools/apps/call_actor.js +2 -5
- package/dist/tools/apps/call_actor.js.map +1 -1
- package/dist/tools/apps/fetch_actor_details_widget.d.ts +3 -0
- package/dist/tools/apps/fetch_actor_details_widget.d.ts.map +1 -0
- package/dist/tools/apps/fetch_actor_details_widget.js +91 -0
- package/dist/tools/apps/fetch_actor_details_widget.js.map +1 -0
- package/dist/tools/apps/search_actors_widget.d.ts +3 -0
- package/dist/tools/apps/search_actors_widget.d.ts.map +1 -0
- package/dist/tools/apps/search_actors_widget.js +113 -0
- package/dist/tools/apps/search_actors_widget.js.map +1 -0
- package/dist/tools/categories.d.ts +2 -2
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +6 -8
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/core/call_actor_common.d.ts +2 -5
- package/dist/tools/core/call_actor_common.d.ts.map +1 -1
- package/dist/tools/core/call_actor_common.js +7 -12
- package/dist/tools/core/call_actor_common.js.map +1 -1
- package/dist/tools/core/fetch_actor_details_common.d.ts +9 -7
- package/dist/tools/core/fetch_actor_details_common.d.ts.map +1 -1
- package/dist/tools/core/fetch_actor_details_common.js +10 -13
- package/dist/tools/core/fetch_actor_details_common.js.map +1 -1
- package/dist/tools/core/search_actors_common.d.ts +5 -4
- package/dist/tools/core/search_actors_common.d.ts.map +1 -1
- package/dist/tools/core/search_actors_common.js +5 -9
- package/dist/tools/core/search_actors_common.js.map +1 -1
- package/dist/tools/default/call_actor.d.ts.map +1 -1
- package/dist/tools/default/call_actor.js +0 -3
- package/dist/tools/default/call_actor.js.map +1 -1
- package/dist/tools/default/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/default/fetch_actor_details.js +1 -2
- package/dist/tools/default/fetch_actor_details.js.map +1 -1
- package/dist/tools/structured_output_schemas.d.ts +214 -4
- package/dist/tools/structured_output_schemas.d.ts.map +1 -1
- package/dist/tools/structured_output_schemas.js +36 -15
- package/dist/tools/structured_output_schemas.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/server-instructions/index.d.ts +4 -5
- package/dist/utils/server-instructions/index.d.ts.map +1 -1
- package/dist/utils/server-instructions/index.js +9 -7
- package/dist/utils/server-instructions/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/tools/apps/fetch_actor_details.d.ts +0 -7
- package/dist/tools/apps/fetch_actor_details.d.ts.map +0 -1
- package/dist/tools/apps/fetch_actor_details.js +0 -55
- package/dist/tools/apps/fetch_actor_details.js.map +0 -1
- package/dist/tools/apps/fetch_actor_details_internal.d.ts +0 -3
- package/dist/tools/apps/fetch_actor_details_internal.d.ts.map +0 -1
- package/dist/tools/apps/fetch_actor_details_internal.js +0 -36
- package/dist/tools/apps/fetch_actor_details_internal.js.map +0 -1
- package/dist/tools/apps/search_actors.d.ts +0 -7
- package/dist/tools/apps/search_actors.d.ts.map +0 -1
- package/dist/tools/apps/search_actors.js +0 -89
- package/dist/tools/apps/search_actors.js.map +0 -1
- package/dist/tools/apps/search_actors_internal.d.ts +0 -3
- package/dist/tools/apps/search_actors_internal.d.ts.map +0 -1
- package/dist/tools/apps/search_actors_internal.js +0 -65
- package/dist/tools/apps/search_actors_internal.js.map +0 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
import dedent from 'dedent';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { FAILURE_CATEGORY, HelperTools, TOOL_STATUS } from '../../const.js';
|
|
5
|
-
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
6
4
|
import { buildCardOptions, fetchActorDetails, getMcpToolsMessage, resolveReadmeContent, typeObjectToString, } from '../../utils/actor_details.js';
|
|
7
5
|
import { compileSchema } from '../../utils/ajv.js';
|
|
8
6
|
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
@@ -61,7 +59,9 @@ export function resolveOutputOptions(output) {
|
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
|
-
* Zod schema for fetch-actor-details arguments —
|
|
62
|
+
* Zod schema for fetch-actor-details arguments — used by the mode-independent
|
|
63
|
+
* base tool. The `-widget` sibling has its own `actor`-only schema in
|
|
64
|
+
* `src/tools/apps/fetch_actor_details_widget.ts`.
|
|
65
65
|
*/
|
|
66
66
|
export const fetchActorDetailsToolArgsSchema = z.object({
|
|
67
67
|
actor: z.string()
|
|
@@ -85,8 +85,9 @@ EXAMPLES:
|
|
|
85
85
|
- What is the input schema for apify/web-scraper?
|
|
86
86
|
- What tools does apify/actors-mcp-server provide?`;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
88
|
+
* Tool metadata for the mode-independent `fetch-actor-details` — everything
|
|
89
|
+
* except the `call` handler. No widget `_meta`; the `-widget` sibling (apps-only)
|
|
90
|
+
* carries its own widget metadata.
|
|
90
91
|
*/
|
|
91
92
|
export const fetchActorDetailsMetadata = {
|
|
92
93
|
type: 'internal',
|
|
@@ -95,10 +96,6 @@ export const fetchActorDetailsMetadata = {
|
|
|
95
96
|
inputSchema: z.toJSONSchema(fetchActorDetailsToolArgsSchema),
|
|
96
97
|
outputSchema: actorDetailsOutputSchema,
|
|
97
98
|
ajvValidate: compileSchema(z.toJSONSchema(fetchActorDetailsToolArgsSchema)),
|
|
98
|
-
// openai/* and ui keys are stripped in non-apps mode by stripWidgetMeta() in src/utils/tools.ts
|
|
99
|
-
_meta: {
|
|
100
|
-
...(_a = getWidgetConfig(WIDGET_URIS.SEARCH_ACTORS)) === null || _a === void 0 ? void 0 : _a.meta,
|
|
101
|
-
},
|
|
102
99
|
annotations: {
|
|
103
100
|
title: 'Fetch Actor details',
|
|
104
101
|
readOnlyHint: true,
|
|
@@ -179,13 +176,13 @@ export function buildActorDetailsTextResponse(options) {
|
|
|
179
176
|
return { texts, structuredContent };
|
|
180
177
|
}
|
|
181
178
|
/**
|
|
182
|
-
* Shared handler for
|
|
183
|
-
*
|
|
179
|
+
* Shared handler for the base fetch-actor-details tool.
|
|
180
|
+
* Returns the same text + structured response in both modes.
|
|
184
181
|
*/
|
|
185
|
-
export async function buildFetchActorDetailsResult(toolArgs
|
|
182
|
+
export async function buildFetchActorDetailsResult(toolArgs) {
|
|
186
183
|
const { args, apifyToken, apifyClient, apifyMcpServer, mcpSessionId } = toolArgs;
|
|
187
184
|
const parsed = fetchActorDetailsToolArgsSchema.parse(args);
|
|
188
|
-
const actorName = fixActorNameInputAndLog(parsed.actor, { mcpSessionId, route });
|
|
185
|
+
const actorName = fixActorNameInputAndLog(parsed.actor, { mcpSessionId, route: HelperTools.ACTOR_GET_DETAILS });
|
|
189
186
|
const resolvedOutput = resolveOutputOptions(parsed.output);
|
|
190
187
|
// Skip the /users/me round-trip when pricing isn't rendered (e.g. inputSchema-only
|
|
191
188
|
// or mcpTools-only requests). In that case `userTier` is only used to fill the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details_common.js","sourceRoot":"","sources":["../../../src/tools/core/fetch_actor_details_common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch_actor_details_common.js","sourceRoot":"","sources":["../../../src/tools/core/fetch_actor_details_common.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAEH,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,8BAA8B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perTool, StructuredActorCard } from '../../type
|
|
|
3
3
|
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
4
4
|
import type { PricingTier } from '../../utils/pricing_info.js';
|
|
5
5
|
/**
|
|
6
|
-
* Shared base schema for search-actors arguments. Used directly by the
|
|
6
|
+
* Shared base schema for search-actors arguments. Used directly by the widget
|
|
7
7
|
* variant; extended by `searchActorsArgsSchema` with a longer `keywords` description.
|
|
8
8
|
*/
|
|
9
9
|
export declare const searchActorsBaseArgsSchema: z.ZodObject<{
|
|
@@ -12,7 +12,8 @@ export declare const searchActorsBaseArgsSchema: z.ZodObject<{
|
|
|
12
12
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
/**
|
|
15
|
-
* Zod schema for search-actors arguments
|
|
15
|
+
* Zod schema for the base search-actors tool arguments. Not used by the widget
|
|
16
|
+
* variant (which reuses the shorter-description base schema via `.strict()`).
|
|
16
17
|
*/
|
|
17
18
|
export declare const searchActorsArgsSchema: z.ZodObject<{
|
|
18
19
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -20,8 +21,8 @@ export declare const searchActorsArgsSchema: z.ZodObject<{
|
|
|
20
21
|
keywords: z.ZodDefault<z.ZodString>;
|
|
21
22
|
}, z.core.$strip>;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
* Used by both default and apps
|
|
24
|
+
* Tool metadata for the base search-actors tool — mode-independent, no widget `_meta`.
|
|
25
|
+
* Used by `defaultSearchActors` in both default and apps modes.
|
|
25
26
|
*/
|
|
26
27
|
export declare const searchActorsMetadata: Omit<HelperTool, 'call'>;
|
|
27
28
|
export type SearchActorsResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search_actors_common.d.ts","sourceRoot":"","sources":["../../../src/tools/core/search_actors_common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"search_actors_common.d.ts","sourceRoot":"","sources":["../../../src/tools/core/search_actors_common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,mBAAmB,EAAmB,MAAM,gBAAgB,CAAC;AAGvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG/D;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;iBAerC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;iBAoBjC,CAAC;AAuCH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAczD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;CAC9C,CAAC;AAEF,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,cAAc,EAAE,EACxB,QAAQ,EAAE,WAAW,GACtB,kBAAkB,CAMpB;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAQjG"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
import dedent from 'dedent';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { HelperTools } from '../../const.js';
|
|
5
|
-
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
6
4
|
import { DEFAULT_CARD_OPTIONS, formatActorToActorCard, formatActorToStructuredCard } from '../../utils/actor_card.js';
|
|
7
5
|
import { compileSchema } from '../../utils/ajv.js';
|
|
8
6
|
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
9
7
|
import { actorSearchOutputSchema } from '../structured_output_schemas.js';
|
|
10
8
|
/**
|
|
11
|
-
* Shared base schema for search-actors arguments. Used directly by the
|
|
9
|
+
* Shared base schema for search-actors arguments. Used directly by the widget
|
|
12
10
|
* variant; extended by `searchActorsArgsSchema` with a longer `keywords` description.
|
|
13
11
|
*/
|
|
14
12
|
export const searchActorsBaseArgsSchema = z.object({
|
|
@@ -28,7 +26,8 @@ export const searchActorsBaseArgsSchema = z.object({
|
|
|
28
26
|
.describe('The number of elements to skip from the start (default = 0)'),
|
|
29
27
|
});
|
|
30
28
|
/**
|
|
31
|
-
* Zod schema for search-actors arguments
|
|
29
|
+
* Zod schema for the base search-actors tool arguments. Not used by the widget
|
|
30
|
+
* variant (which reuses the shorter-description base schema via `.strict()`).
|
|
32
31
|
*/
|
|
33
32
|
export const searchActorsArgsSchema = searchActorsBaseArgsSchema.extend({
|
|
34
33
|
keywords: z.string()
|
|
@@ -54,7 +53,6 @@ export const searchActorsArgsSchema = searchActorsBaseArgsSchema.extend({
|
|
|
54
53
|
const SEARCH_ACTORS_DESCRIPTION = `
|
|
55
54
|
Search the Apify Store to FIND and DISCOVER what scraping tools/Actors exist for specific platforms or use cases.
|
|
56
55
|
This tool provides INFORMATION about available Actors - it does NOT retrieve actual data or run any scraping tasks.
|
|
57
|
-
Do NOT use this tool for helper name resolution before running an Actor; use ${HelperTools.STORE_SEARCH_INTERNAL} instead.
|
|
58
56
|
|
|
59
57
|
Apify Store contains thousands of pre-built Actors (crawlers, scrapers, AI agents, and model context protocol (MCP) servers)
|
|
60
58
|
for all platforms and services including social media, search engines, maps, e-commerce, news, real estate, travel, finance, jobs and more.
|
|
@@ -89,8 +87,8 @@ Returns list of Actor cards with the following info:
|
|
|
89
87
|
- **Rating:** Out of 5 (if available)
|
|
90
88
|
`;
|
|
91
89
|
/**
|
|
92
|
-
*
|
|
93
|
-
* Used by both default and apps
|
|
90
|
+
* Tool metadata for the base search-actors tool — mode-independent, no widget `_meta`.
|
|
91
|
+
* Used by `defaultSearchActors` in both default and apps modes.
|
|
94
92
|
*/
|
|
95
93
|
export const searchActorsMetadata = {
|
|
96
94
|
type: 'internal',
|
|
@@ -99,8 +97,6 @@ export const searchActorsMetadata = {
|
|
|
99
97
|
inputSchema: z.toJSONSchema(searchActorsArgsSchema),
|
|
100
98
|
outputSchema: actorSearchOutputSchema,
|
|
101
99
|
ajvValidate: compileSchema(z.toJSONSchema(searchActorsArgsSchema)),
|
|
102
|
-
// openai/* and ui keys are stripped in non-apps mode by stripWidgetMeta() in src/utils/tools.ts
|
|
103
|
-
_meta: { ...(_a = getWidgetConfig(WIDGET_URIS.SEARCH_ACTORS)) === null || _a === void 0 ? void 0 : _a.meta },
|
|
104
100
|
annotations: {
|
|
105
101
|
title: 'Search Actors',
|
|
106
102
|
readOnlyHint: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search_actors_common.js","sourceRoot":"","sources":["../../../src/tools/core/search_actors_common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search_actors_common.js","sourceRoot":"","sources":["../../../src/tools/core/search_actors_common.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACtH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;SACf,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,wDAAwD,CAAC;IACvE,KAAK,E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AQ,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC;IACxF,OAAO;QACH,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QACzF,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KAC1F,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,KAAa;IACxD,MAAM,YAAY,GAAG,MAAM,CAAA;qDACsB,KAAK;;;KAGrD,CAAC;IAEF,OAAO,gBAAgB,CAAC,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;AACzH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call_actor.d.ts","sourceRoot":"","sources":["../../../src/tools/default/call_actor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"call_actor.d.ts","sourceRoot":"","sources":["../../../src/tools/default/call_actor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqBlE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAqGpB,CAAC"}
|
|
@@ -10,8 +10,6 @@ import { buildCallActorDescription, buildCallActorErrorResponse, buildStartAsync
|
|
|
10
10
|
import { callActorOutputSchema } from '../structured_output_schemas.js';
|
|
11
11
|
const CALL_ACTOR_DEFAULT_DESCRIPTION = buildCallActorDescription({
|
|
12
12
|
actorGetDetailsTool: HelperTools.ACTOR_GET_DETAILS,
|
|
13
|
-
storeSearchTool: HelperTools.STORE_SEARCH,
|
|
14
|
-
useInternalSearchWarning: false,
|
|
15
13
|
alwaysAsync: false,
|
|
16
14
|
});
|
|
17
15
|
/**
|
|
@@ -110,7 +108,6 @@ export const defaultCallActor = Object.freeze({
|
|
|
110
108
|
isAsync,
|
|
111
109
|
mcpSessionId: toolArgs.mcpSessionId,
|
|
112
110
|
actorGetDetailsTool: HelperTools.ACTOR_GET_DETAILS,
|
|
113
|
-
storeSearchTool: HelperTools.STORE_SEARCH,
|
|
114
111
|
});
|
|
115
112
|
}
|
|
116
113
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call_actor.js","sourceRoot":"","sources":["../../../src/tools/default/call_actor.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACH,yBAAyB,EACzB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;IAC7D,mBAAmB,EAAE,WAAW,CAAC,iBAAiB;IAClD,
|
|
1
|
+
{"version":3,"file":"call_actor.js","sourceRoot":"","sources":["../../../src/tools/default/call_actor.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,M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AAE,KAAK;iBAChB,CAAC,CAAC;gBAEH,OAAO;oBACH,GAAG,QAAQ;oBACX,aAAa,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBAC9C,CAAC;YACN,CAAC;YAED,oDAAoD;YACpD,MAAM,UAAU,GAAG,MAAM,mBAAmB,CAAC;gBACzC,SAAS,EAAE,aAAa;gBACxB,KAAK;gBACL,WAAW;gBACX,WAAW;gBACX,eAAe,EAAE,QAAQ,CAAC,eAAe;gBACzC,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM;gBAClC,aAAa;gBACb,YAAY,EAAE,QAAQ,CAAC,YAAY;aACtC,CAAC,CAAC;YAEH,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,+FAA+F;gBAC/F,8GAA8G;gBAC9G,OAAO,EAAE,CAAC;YACd,CAAC;YAED,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,yBAAyB,CAAC,aAAa,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC3G,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;YACzC,OAAO;gBACH,OAAO;gBACP,iBAAiB;gBACjB,GAAG,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC;gBACvB,aAAa,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;aAC9C,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,2BAA2B,CAAC;gBAC/B,SAAS,EAAE,aAAa;gBACxB,KAAK;gBACL,OAAO,EAAE,eAAe;gBACxB,OAAO;gBACP,YAAY,EAAE,QAAQ,CAAC,YAAY;gBACnC,mBAAmB,EAAE,WAAW,CAAC,iBAAiB;aACrD,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMhD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAG5B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HelperTools } from '../../const.js';
|
|
2
1
|
import { buildFetchActorDetailsResult, fetchActorDetailsMetadata, } from '../core/fetch_actor_details_common.js';
|
|
3
2
|
/**
|
|
4
3
|
* Default mode fetch-actor-details tool.
|
|
@@ -6,6 +5,6 @@ import { buildFetchActorDetailsResult, fetchActorDetailsMetadata, } from '../cor
|
|
|
6
5
|
*/
|
|
7
6
|
export const defaultFetchActorDetails = Object.freeze({
|
|
8
7
|
...fetchActorDetailsMetadata,
|
|
9
|
-
call: async (toolArgs) => buildFetchActorDetailsResult(toolArgs
|
|
8
|
+
call: async (toolArgs) => buildFetchActorDetailsResult(toolArgs),
|
|
10
9
|
});
|
|
11
10
|
//# sourceMappingURL=fetch_actor_details.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details.js","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.js","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"AACA,OAAO,EACH,4BAA4B,EAC5B,yBAAyB,GAC5B,MAAM,uCAAuC,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAc,MAAM,CAAC,MAAM,CAAC;IAC7D,GAAG,yBAAyB;IAC5B,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,CAAC;CAC1D,CAAC,CAAC"}
|
|
@@ -518,6 +518,38 @@ export declare const actorDetailsOutputSchema: {
|
|
|
518
518
|
};
|
|
519
519
|
};
|
|
520
520
|
};
|
|
521
|
+
/**
|
|
522
|
+
* Schema for fetch-actor-details-widget output.
|
|
523
|
+
* Widget-only; renders as an interactive UI element in apps mode.
|
|
524
|
+
* `actorInfo` is the widget-shaped actor (from `formatActorForWidget`), kept as a loose
|
|
525
|
+
* object because it doesn't align with `actorInfoSchema` (adds `currentPricingInfo` etc.).
|
|
526
|
+
*/
|
|
527
|
+
export declare const actorDetailsWidgetOutputSchema: {
|
|
528
|
+
type: "object";
|
|
529
|
+
properties: {
|
|
530
|
+
actorDetails: {
|
|
531
|
+
type: "object";
|
|
532
|
+
properties: {
|
|
533
|
+
actorInfo: {
|
|
534
|
+
type: "object";
|
|
535
|
+
description: string;
|
|
536
|
+
};
|
|
537
|
+
actorCard: {
|
|
538
|
+
type: string;
|
|
539
|
+
description: string;
|
|
540
|
+
};
|
|
541
|
+
readme: {
|
|
542
|
+
type: string;
|
|
543
|
+
description: string;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
required: string[];
|
|
547
|
+
additionalProperties: boolean;
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
required: string[];
|
|
551
|
+
additionalProperties: boolean;
|
|
552
|
+
};
|
|
521
553
|
/**
|
|
522
554
|
* Schema for search results output (store-search tool)
|
|
523
555
|
*/
|
|
@@ -728,9 +760,12 @@ export declare const actorSearchOutputSchema: {
|
|
|
728
760
|
required: string[];
|
|
729
761
|
};
|
|
730
762
|
/**
|
|
731
|
-
* Schema for
|
|
763
|
+
* Schema for widget search results (search-actors-widget tool).
|
|
764
|
+
* `actors` mirrors the non-widget `actorSearchOutputSchema` shape (StructuredActorCard),
|
|
765
|
+
* `widgetActors` is the widget-formatted list (from `formatActorForWidget`), kept loose
|
|
766
|
+
* for the same reason `actorDetailsWidgetOutputSchema.actorInfo` is loose.
|
|
732
767
|
*/
|
|
733
|
-
export declare const
|
|
768
|
+
export declare const actorSearchWidgetOutputSchema: {
|
|
734
769
|
type: "object";
|
|
735
770
|
properties: {
|
|
736
771
|
actors: {
|
|
@@ -738,21 +773,188 @@ export declare const actorSearchInternalOutputSchema: {
|
|
|
738
773
|
items: {
|
|
739
774
|
type: "object";
|
|
740
775
|
properties: {
|
|
741
|
-
|
|
776
|
+
title: {
|
|
742
777
|
type: string;
|
|
743
778
|
description: string;
|
|
744
779
|
};
|
|
745
|
-
|
|
780
|
+
url: {
|
|
746
781
|
type: string;
|
|
747
782
|
description: string;
|
|
748
783
|
};
|
|
784
|
+
id: {
|
|
785
|
+
type: string;
|
|
786
|
+
description: string;
|
|
787
|
+
};
|
|
788
|
+
fullName: {
|
|
789
|
+
type: string;
|
|
790
|
+
description: string;
|
|
791
|
+
};
|
|
792
|
+
developer: {
|
|
793
|
+
type: "object";
|
|
794
|
+
properties: {
|
|
795
|
+
username: {
|
|
796
|
+
type: string;
|
|
797
|
+
description: string;
|
|
798
|
+
};
|
|
799
|
+
isOfficialApify: {
|
|
800
|
+
type: string;
|
|
801
|
+
description: string;
|
|
802
|
+
};
|
|
803
|
+
url: {
|
|
804
|
+
type: string;
|
|
805
|
+
description: string;
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
required: string[];
|
|
809
|
+
};
|
|
749
810
|
description: {
|
|
750
811
|
type: string;
|
|
751
812
|
description: string;
|
|
752
813
|
};
|
|
814
|
+
categories: {
|
|
815
|
+
type: "array";
|
|
816
|
+
items: {
|
|
817
|
+
type: string;
|
|
818
|
+
};
|
|
819
|
+
description: string;
|
|
820
|
+
};
|
|
821
|
+
pricing: {
|
|
822
|
+
type: "object";
|
|
823
|
+
properties: {
|
|
824
|
+
model: {
|
|
825
|
+
type: string;
|
|
826
|
+
description: string;
|
|
827
|
+
};
|
|
828
|
+
userTier: {
|
|
829
|
+
type: string;
|
|
830
|
+
enum: string[];
|
|
831
|
+
description: string;
|
|
832
|
+
};
|
|
833
|
+
pricePerUnit: {
|
|
834
|
+
type: string;
|
|
835
|
+
description: string;
|
|
836
|
+
};
|
|
837
|
+
unitName: {
|
|
838
|
+
type: string;
|
|
839
|
+
description: string;
|
|
840
|
+
};
|
|
841
|
+
trialMinutes: {
|
|
842
|
+
type: string;
|
|
843
|
+
description: string;
|
|
844
|
+
};
|
|
845
|
+
tieredPricing: {
|
|
846
|
+
type: "array";
|
|
847
|
+
items: {
|
|
848
|
+
type: "object";
|
|
849
|
+
properties: {
|
|
850
|
+
tier: {
|
|
851
|
+
type: string;
|
|
852
|
+
description: string;
|
|
853
|
+
};
|
|
854
|
+
pricePerUnit: {
|
|
855
|
+
type: string;
|
|
856
|
+
description: string;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
description: string;
|
|
861
|
+
};
|
|
862
|
+
events: {
|
|
863
|
+
type: "array";
|
|
864
|
+
items: {
|
|
865
|
+
type: "object";
|
|
866
|
+
properties: {
|
|
867
|
+
title: {
|
|
868
|
+
type: string;
|
|
869
|
+
description: string;
|
|
870
|
+
};
|
|
871
|
+
description: {
|
|
872
|
+
type: string;
|
|
873
|
+
description: string;
|
|
874
|
+
};
|
|
875
|
+
priceUsd: {
|
|
876
|
+
type: string;
|
|
877
|
+
description: string;
|
|
878
|
+
};
|
|
879
|
+
tieredPricing: {
|
|
880
|
+
type: "array";
|
|
881
|
+
items: {
|
|
882
|
+
type: "object";
|
|
883
|
+
properties: {
|
|
884
|
+
tier: {
|
|
885
|
+
type: string;
|
|
886
|
+
};
|
|
887
|
+
priceUsd: {
|
|
888
|
+
type: string;
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
description: string;
|
|
896
|
+
};
|
|
897
|
+
pricingNote: {
|
|
898
|
+
type: string;
|
|
899
|
+
description: string;
|
|
900
|
+
};
|
|
901
|
+
eventDescriptionsOmitted: {
|
|
902
|
+
type: string;
|
|
903
|
+
description: string;
|
|
904
|
+
};
|
|
905
|
+
eventDescriptionsNote: {
|
|
906
|
+
type: string;
|
|
907
|
+
description: string;
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
required: string[];
|
|
911
|
+
};
|
|
912
|
+
stats: {
|
|
913
|
+
type: "object";
|
|
914
|
+
properties: {
|
|
915
|
+
totalUsers: {
|
|
916
|
+
type: string;
|
|
917
|
+
description: string;
|
|
918
|
+
};
|
|
919
|
+
monthlyUsers: {
|
|
920
|
+
type: string;
|
|
921
|
+
description: string;
|
|
922
|
+
};
|
|
923
|
+
successRate: {
|
|
924
|
+
type: string;
|
|
925
|
+
description: string;
|
|
926
|
+
};
|
|
927
|
+
bookmarks: {
|
|
928
|
+
type: string;
|
|
929
|
+
description: string;
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
rating: {
|
|
934
|
+
type: "object";
|
|
935
|
+
properties: {
|
|
936
|
+
average: {
|
|
937
|
+
type: string;
|
|
938
|
+
description: string;
|
|
939
|
+
};
|
|
940
|
+
count: {
|
|
941
|
+
type: string;
|
|
942
|
+
description: string;
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
modifiedAt: {
|
|
947
|
+
type: string;
|
|
948
|
+
description: string;
|
|
949
|
+
};
|
|
950
|
+
isDeprecated: {
|
|
951
|
+
type: string;
|
|
952
|
+
description: string;
|
|
953
|
+
};
|
|
753
954
|
};
|
|
754
955
|
required: string[];
|
|
755
956
|
};
|
|
957
|
+
description: string;
|
|
756
958
|
};
|
|
757
959
|
query: {
|
|
758
960
|
type: string;
|
|
@@ -762,6 +964,14 @@ export declare const actorSearchInternalOutputSchema: {
|
|
|
762
964
|
type: string;
|
|
763
965
|
description: string;
|
|
764
966
|
};
|
|
967
|
+
widgetActors: {
|
|
968
|
+
type: "array";
|
|
969
|
+
items: {
|
|
970
|
+
type: "object";
|
|
971
|
+
description: string;
|
|
972
|
+
};
|
|
973
|
+
description: string;
|
|
974
|
+
};
|
|
765
975
|
};
|
|
766
976
|
required: string[];
|
|
767
977
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured_output_schemas.d.ts","sourceRoot":"","sources":["../../src/tools/structured_output_schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6DH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAQvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"structured_output_schemas.d.ts","sourceRoot":"","sources":["../../src/tools/structured_output_schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6DH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAQvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAapC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAC9C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,OAAO,qBAAqB,CAe9B"}
|
|
@@ -135,9 +135,6 @@ export const actorInfoSchema = {
|
|
|
135
135
|
modifiedAt: { type: 'string', description: 'Last modification date' },
|
|
136
136
|
isDeprecated: { type: 'boolean', description: 'Whether the Actor is deprecated' },
|
|
137
137
|
},
|
|
138
|
-
// Note: `pricing` is not required. apps/fetch-actor-details intentionally omits it from
|
|
139
|
-
// `actorInfo` so the widget's tier-aware pricing (under `actorDetails.actorInfo.currentPricingInfo`)
|
|
140
|
-
// is the single source of truth — see src/tools/apps/fetch_actor_details.ts.
|
|
141
138
|
required: ['url', 'id', 'fullName', 'developer', 'description', 'categories', 'isDeprecated'],
|
|
142
139
|
};
|
|
143
140
|
/**
|
|
@@ -158,6 +155,29 @@ export const actorDetailsOutputSchema = {
|
|
|
158
155
|
outputSchema: { type: 'object', description: 'Output schema inferred from successful runs.' },
|
|
159
156
|
},
|
|
160
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* Schema for fetch-actor-details-widget output.
|
|
160
|
+
* Widget-only; renders as an interactive UI element in apps mode.
|
|
161
|
+
* `actorInfo` is the widget-shaped actor (from `formatActorForWidget`), kept as a loose
|
|
162
|
+
* object because it doesn't align with `actorInfoSchema` (adds `currentPricingInfo` etc.).
|
|
163
|
+
*/
|
|
164
|
+
export const actorDetailsWidgetOutputSchema = {
|
|
165
|
+
type: 'object', // Literal type required for MCP SDK type compatibility
|
|
166
|
+
properties: {
|
|
167
|
+
actorDetails: {
|
|
168
|
+
type: 'object', // Literal type required for MCP SDK type compatibility
|
|
169
|
+
properties: {
|
|
170
|
+
actorInfo: { type: 'object', description: 'Widget-formatted Actor info (tier-aware pricing, widget display fields).' },
|
|
171
|
+
actorCard: { type: 'string', description: 'Rendered Actor card markdown for widget display.' },
|
|
172
|
+
readme: { type: 'string', description: 'Formatted Actor README for widget display.' },
|
|
173
|
+
},
|
|
174
|
+
required: ['actorInfo', 'actorCard', 'readme'],
|
|
175
|
+
additionalProperties: false,
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ['actorDetails'],
|
|
179
|
+
additionalProperties: false,
|
|
180
|
+
};
|
|
161
181
|
/**
|
|
162
182
|
* Schema for search results output (store-search tool)
|
|
163
183
|
*/
|
|
@@ -176,27 +196,28 @@ export const actorSearchOutputSchema = {
|
|
|
176
196
|
required: ['actors', 'query', 'count'],
|
|
177
197
|
};
|
|
178
198
|
/**
|
|
179
|
-
* Schema for
|
|
199
|
+
* Schema for widget search results (search-actors-widget tool).
|
|
200
|
+
* `actors` mirrors the non-widget `actorSearchOutputSchema` shape (StructuredActorCard),
|
|
201
|
+
* `widgetActors` is the widget-formatted list (from `formatActorForWidget`), kept loose
|
|
202
|
+
* for the same reason `actorDetailsWidgetOutputSchema.actorInfo` is loose.
|
|
180
203
|
*/
|
|
181
|
-
export const
|
|
204
|
+
export const actorSearchWidgetOutputSchema = {
|
|
182
205
|
type: 'object',
|
|
183
206
|
properties: {
|
|
184
207
|
actors: {
|
|
185
208
|
type: 'array',
|
|
186
|
-
items:
|
|
187
|
-
|
|
188
|
-
properties: {
|
|
189
|
-
fullName: { type: 'string', description: 'Full Actor name (username/name)' },
|
|
190
|
-
title: { type: 'string', description: 'Actor title' },
|
|
191
|
-
description: { type: 'string', description: 'Actor description' },
|
|
192
|
-
},
|
|
193
|
-
required: ['fullName'],
|
|
194
|
-
},
|
|
209
|
+
items: actorInfoSchema,
|
|
210
|
+
description: 'List of Actor cards matching the search query',
|
|
195
211
|
},
|
|
196
212
|
query: { type: 'string', description: 'The search query used' },
|
|
197
213
|
count: { type: 'number', description: 'Number of Actors returned' },
|
|
214
|
+
widgetActors: {
|
|
215
|
+
type: 'array',
|
|
216
|
+
items: { type: 'object', description: 'Widget-formatted Actor (tier-aware pricing, widget display fields).' },
|
|
217
|
+
description: 'Widget-formatted Actor list for UI rendering',
|
|
218
|
+
},
|
|
198
219
|
},
|
|
199
|
-
required: ['actors', 'query', 'count'],
|
|
220
|
+
required: ['actors', 'query', 'count', 'widgetActors'],
|
|
200
221
|
};
|
|
201
222
|
export const searchApifyDocsToolOutputSchema = {
|
|
202
223
|
type: 'object', // Literal type required for MCP SDK type compatibility
|