@apify/actors-mcp-server 0.9.20-beta.2 → 0.9.20-beta.4
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/tools/core/fetch_actor_details_common.d.ts +62 -1
- package/dist/tools/core/fetch_actor_details_common.d.ts.map +1 -1
- package/dist/tools/core/fetch_actor_details_common.js +161 -2
- package/dist/tools/core/fetch_actor_details_common.js.map +1 -1
- package/dist/tools/core/get_actor_run_common.d.ts +11 -0
- package/dist/tools/core/get_actor_run_common.d.ts.map +1 -1
- package/dist/tools/core/get_actor_run_common.js +40 -1
- package/dist/tools/core/get_actor_run_common.js.map +1 -1
- package/dist/tools/default/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/default/fetch_actor_details.js +3 -36
- package/dist/tools/default/fetch_actor_details.js.map +1 -1
- package/dist/tools/default/get_actor_run.d.ts.map +1 -1
- package/dist/tools/default/get_actor_run.js +3 -16
- package/dist/tools/default/get_actor_run.js.map +1 -1
- package/dist/tools/openai/fetch_actor_details.d.ts.map +1 -1
- package/dist/tools/openai/fetch_actor_details.js +12 -12
- package/dist/tools/openai/fetch_actor_details.js.map +1 -1
- package/dist/tools/openai/fetch_actor_details_internal.d.ts.map +1 -1
- package/dist/tools/openai/fetch_actor_details_internal.js +16 -51
- package/dist/tools/openai/fetch_actor_details_internal.js.map +1 -1
- package/dist/tools/openai/get_actor_run.d.ts.map +1 -1
- package/dist/tools/openai/get_actor_run.js +3 -25
- package/dist/tools/openai/get_actor_run.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/actor_details.d.ts +19 -95
- package/dist/utils/actor_details.d.ts.map +1 -1
- package/dist/utils/actor_details.js +37 -179
- package/dist/utils/actor_details.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import
|
|
2
|
+
import { HelperTools } from '../../const.js';
|
|
3
|
+
import type { HelperTool, InternalToolArgs } from '../../types.js';
|
|
4
|
+
import { type ActorDetailsResult } from '../../utils/actor_details.js';
|
|
5
|
+
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
6
|
+
/**
|
|
7
|
+
* Shared schema for actor details output options.
|
|
8
|
+
*
|
|
9
|
+
* Behavior:
|
|
10
|
+
* - If output is undefined or empty object: use defaults (all true except mcpTools and outputSchema)
|
|
11
|
+
* - If any property is explicitly set: only include sections with explicit true values
|
|
12
|
+
*/
|
|
13
|
+
export declare const actorDetailsOutputOptionsSchema: z.ZodObject<{
|
|
14
|
+
description: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
stats: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
pricing: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
rating: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
metadata: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
inputSchema: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
readme: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
outputSchema: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
mcpTools: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const actorDetailsOutputDefaults: {
|
|
25
|
+
description: boolean;
|
|
26
|
+
stats: boolean;
|
|
27
|
+
pricing: boolean;
|
|
28
|
+
rating: boolean;
|
|
29
|
+
metadata: boolean;
|
|
30
|
+
inputSchema: boolean;
|
|
31
|
+
readme: boolean;
|
|
32
|
+
outputSchema: boolean;
|
|
33
|
+
mcpTools: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type ResolvedOutputOptions = typeof actorDetailsOutputDefaults;
|
|
36
|
+
/**
|
|
37
|
+
* Resolve output options with smart defaults.
|
|
38
|
+
* If output is undefined/empty, returns defaults.
|
|
39
|
+
* If any property is explicitly set, undefined properties are treated as false.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveOutputOptions(output?: z.infer<typeof actorDetailsOutputOptionsSchema>): ResolvedOutputOptions;
|
|
3
42
|
/**
|
|
4
43
|
* Zod schema for fetch-actor-details arguments — shared between default and openai variants.
|
|
5
44
|
*/
|
|
@@ -22,4 +61,26 @@ export declare const fetchActorDetailsToolArgsSchema: z.ZodObject<{
|
|
|
22
61
|
* Used by both default and openai variants.
|
|
23
62
|
*/
|
|
24
63
|
export declare const fetchActorDetailsMetadata: Omit<HelperTool, 'call'>;
|
|
64
|
+
/**
|
|
65
|
+
* Build error response for when actor is not found.
|
|
66
|
+
*/
|
|
67
|
+
export declare function buildActorNotFoundResponse(actorName: string): ReturnType<typeof buildMCPResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Build text and structured response for actor details.
|
|
70
|
+
* Pure/sync: the caller pre-resolves `mcpToolsMessage` when `output.mcpTools` is true.
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildActorDetailsTextResponse(options: {
|
|
73
|
+
details: ActorDetailsResult;
|
|
74
|
+
output: ResolvedOutputOptions;
|
|
75
|
+
actorOutputSchema?: Record<string, unknown> | null;
|
|
76
|
+
mcpToolsMessage?: string;
|
|
77
|
+
}): {
|
|
78
|
+
texts: string[];
|
|
79
|
+
structuredContent: Record<string, unknown>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Shared handler for default and internal fetch-actor-details variants.
|
|
83
|
+
* Both return the same text + structured response; only the telemetry route differs.
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildFetchActorDetailsResult(toolArgs: InternalToolArgs, route: HelperTools.ACTOR_GET_DETAILS | HelperTools.ACTOR_GET_DETAILS_INTERNAL): Promise<ReturnType<typeof buildMCPResponse>>;
|
|
25
86
|
//# sourceMappingURL=fetch_actor_details_common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details_common.d.ts","sourceRoot":"","sources":["../../../src/tools/core/fetch_actor_details_common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file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AAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9C,CA6DA;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAC9C,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,0BAA0B,GAC9E,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAgC9C"}
|
|
@@ -1,10 +1,65 @@
|
|
|
1
1
|
var _a;
|
|
2
|
+
import dedent from 'dedent';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
+
import { ApifyClient } from '../../apify_client.js';
|
|
5
|
+
import { FAILURE_CATEGORY, HelperTools, TOOL_STATUS } from '../../const.js';
|
|
4
6
|
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
5
|
-
import {
|
|
7
|
+
import { buildCardOptions, fetchActorDetails, getMcpToolsMessage, resolveReadmeContent, typeObjectToString, } from '../../utils/actor_details.js';
|
|
6
8
|
import { compileSchema } from '../../utils/ajv.js';
|
|
9
|
+
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
7
10
|
import { actorDetailsOutputSchema } from '../structured_output_schemas.js';
|
|
11
|
+
import { fixActorNameInputAndLog } from './actor_tools_factory.js';
|
|
12
|
+
/**
|
|
13
|
+
* Shared schema for actor details output options.
|
|
14
|
+
*
|
|
15
|
+
* Behavior:
|
|
16
|
+
* - If output is undefined or empty object: use defaults (all true except mcpTools and outputSchema)
|
|
17
|
+
* - If any property is explicitly set: only include sections with explicit true values
|
|
18
|
+
*/
|
|
19
|
+
export const actorDetailsOutputOptionsSchema = z.object({
|
|
20
|
+
description: z.boolean().optional().describe('Include Actor description text only.'),
|
|
21
|
+
stats: z.boolean().optional().describe('Include usage statistics (users, runs, success rate).'),
|
|
22
|
+
pricing: z.boolean().optional().describe('Include pricing model and costs.'),
|
|
23
|
+
rating: z.boolean().optional().describe('Include user rating (out of 5 stars).'),
|
|
24
|
+
metadata: z.boolean().optional().describe('Include developer, categories, last modified date, and deprecation status.'),
|
|
25
|
+
inputSchema: z.boolean().optional().describe('Include required input parameters schema.'),
|
|
26
|
+
readme: z.boolean().optional().describe('Include Actor README documentation (summary when available, full otherwise).'),
|
|
27
|
+
outputSchema: z.boolean().optional().describe('Include inferred output schema from recent successful runs (TypeScript type).'),
|
|
28
|
+
mcpTools: z.boolean().optional().describe('List available tools (only for MCP server Actors).'),
|
|
29
|
+
});
|
|
30
|
+
export const actorDetailsOutputDefaults = {
|
|
31
|
+
description: true,
|
|
32
|
+
stats: true,
|
|
33
|
+
pricing: true,
|
|
34
|
+
rating: true,
|
|
35
|
+
metadata: true,
|
|
36
|
+
inputSchema: true,
|
|
37
|
+
readme: true,
|
|
38
|
+
outputSchema: false,
|
|
39
|
+
mcpTools: false,
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve output options with smart defaults.
|
|
43
|
+
* If output is undefined/empty, returns defaults.
|
|
44
|
+
* If any property is explicitly set, undefined properties are treated as false.
|
|
45
|
+
*/
|
|
46
|
+
export function resolveOutputOptions(output) {
|
|
47
|
+
const hasExplicitOptions = output && Object.values(output).some((v) => v !== undefined);
|
|
48
|
+
if (!hasExplicitOptions) {
|
|
49
|
+
return actorDetailsOutputDefaults;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
description: (output === null || output === void 0 ? void 0 : output.description) === true,
|
|
53
|
+
stats: (output === null || output === void 0 ? void 0 : output.stats) === true,
|
|
54
|
+
pricing: (output === null || output === void 0 ? void 0 : output.pricing) === true,
|
|
55
|
+
rating: (output === null || output === void 0 ? void 0 : output.rating) === true,
|
|
56
|
+
metadata: (output === null || output === void 0 ? void 0 : output.metadata) === true,
|
|
57
|
+
inputSchema: (output === null || output === void 0 ? void 0 : output.inputSchema) === true,
|
|
58
|
+
readme: (output === null || output === void 0 ? void 0 : output.readme) === true,
|
|
59
|
+
outputSchema: (output === null || output === void 0 ? void 0 : output.outputSchema) === true,
|
|
60
|
+
mcpTools: (output === null || output === void 0 ? void 0 : output.mcpTools) === true,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
8
63
|
/**
|
|
9
64
|
* Zod schema for fetch-actor-details arguments — shared between default and openai variants.
|
|
10
65
|
*/
|
|
@@ -52,4 +107,108 @@ export const fetchActorDetailsMetadata = {
|
|
|
52
107
|
openWorldHint: false,
|
|
53
108
|
},
|
|
54
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Build error response for when actor is not found.
|
|
112
|
+
*/
|
|
113
|
+
export function buildActorNotFoundResponse(actorName) {
|
|
114
|
+
return buildMCPResponse({
|
|
115
|
+
texts: [dedent `
|
|
116
|
+
Actor information for '${actorName}' was not found.
|
|
117
|
+
Please verify Actor ID or name format and ensure that the Actor exists.
|
|
118
|
+
You can search for available Actors using the tool: ${HelperTools.STORE_SEARCH}.
|
|
119
|
+
`],
|
|
120
|
+
isError: true,
|
|
121
|
+
telemetry: { toolStatus: TOOL_STATUS.SOFT_FAIL, failureCategory: FAILURE_CATEGORY.INVALID_INPUT },
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Build text and structured response for actor details.
|
|
126
|
+
* Pure/sync: the caller pre-resolves `mcpToolsMessage` when `output.mcpTools` is true.
|
|
127
|
+
*/
|
|
128
|
+
export function buildActorDetailsTextResponse(options) {
|
|
129
|
+
const { details, output, actorOutputSchema, mcpToolsMessage } = options;
|
|
130
|
+
const actorUrl = `https://apify.com/${details.actorInfo.username}/${details.actorInfo.name}`;
|
|
131
|
+
const texts = [];
|
|
132
|
+
const needsCard = output.description
|
|
133
|
+
|| output.stats
|
|
134
|
+
|| output.pricing
|
|
135
|
+
|| output.rating
|
|
136
|
+
|| output.metadata;
|
|
137
|
+
if (needsCard) {
|
|
138
|
+
texts.push(`# Actor information\n${details.actorCard}`);
|
|
139
|
+
}
|
|
140
|
+
const resolvedReadme = output.readme ? resolveReadmeContent(details) : undefined;
|
|
141
|
+
if (resolvedReadme) {
|
|
142
|
+
texts.push(`${resolvedReadme.heading}\n${resolvedReadme.content}`);
|
|
143
|
+
}
|
|
144
|
+
if (output.inputSchema) {
|
|
145
|
+
texts.push([
|
|
146
|
+
`# [Input schema](${actorUrl}/input)`,
|
|
147
|
+
'```json',
|
|
148
|
+
JSON.stringify(details.inputSchema),
|
|
149
|
+
'```',
|
|
150
|
+
].join('\n'));
|
|
151
|
+
}
|
|
152
|
+
if (output.outputSchema) {
|
|
153
|
+
if (actorOutputSchema && Object.keys(actorOutputSchema).length > 0) {
|
|
154
|
+
const typeString = typeObjectToString(actorOutputSchema);
|
|
155
|
+
texts.push(dedent `
|
|
156
|
+
# Output Schema (TypeScript)
|
|
157
|
+
Inferred from recent successful runs:
|
|
158
|
+
\`\`\`typescript
|
|
159
|
+
type ActorOutput = ${typeString}
|
|
160
|
+
\`\`\`
|
|
161
|
+
`);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
texts.push(dedent `
|
|
165
|
+
# Output Schema
|
|
166
|
+
No output schema available. The Actor may not have recent successful runs, or the output structure could not be determined.
|
|
167
|
+
`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (mcpToolsMessage) {
|
|
171
|
+
texts.push(mcpToolsMessage);
|
|
172
|
+
}
|
|
173
|
+
const structuredContent = {
|
|
174
|
+
actorInfo: needsCard ? details.actorCardStructured : undefined,
|
|
175
|
+
readme: resolvedReadme === null || resolvedReadme === void 0 ? void 0 : resolvedReadme.content,
|
|
176
|
+
inputSchema: output.inputSchema ? details.inputSchema : undefined,
|
|
177
|
+
outputSchema: output.outputSchema ? (actorOutputSchema !== null && actorOutputSchema !== void 0 ? actorOutputSchema : {}) : undefined,
|
|
178
|
+
};
|
|
179
|
+
return { texts, structuredContent };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Shared handler for default and internal fetch-actor-details variants.
|
|
183
|
+
* Both return the same text + structured response; only the telemetry route differs.
|
|
184
|
+
*/
|
|
185
|
+
export async function buildFetchActorDetailsResult(toolArgs, route) {
|
|
186
|
+
const { args, apifyToken, apifyMcpServer, mcpSessionId } = toolArgs;
|
|
187
|
+
const parsed = fetchActorDetailsToolArgsSchema.parse(args);
|
|
188
|
+
const actorName = fixActorNameInputAndLog(parsed.actor, { mcpSessionId, route });
|
|
189
|
+
const apifyClient = new ApifyClient({ token: apifyToken });
|
|
190
|
+
const resolvedOutput = resolveOutputOptions(parsed.output);
|
|
191
|
+
const details = await fetchActorDetails(apifyClient, actorName, buildCardOptions(resolvedOutput));
|
|
192
|
+
if (!details) {
|
|
193
|
+
return buildActorNotFoundResponse(actorName);
|
|
194
|
+
}
|
|
195
|
+
let actorOutputSchema;
|
|
196
|
+
if (resolvedOutput.outputSchema) {
|
|
197
|
+
actorOutputSchema = apifyMcpServer.actorStore
|
|
198
|
+
? await apifyMcpServer.actorStore.getActorOutputSchemaAsTypeObject(actorName).catch(() => null)
|
|
199
|
+
: null;
|
|
200
|
+
}
|
|
201
|
+
const mcpToolsMessage = resolvedOutput.mcpTools
|
|
202
|
+
? await getMcpToolsMessage(actorName, apifyClient, apifyToken, apifyMcpServer === null || apifyMcpServer === void 0 ? void 0 : apifyMcpServer.options.paymentProvider, mcpSessionId)
|
|
203
|
+
: undefined;
|
|
204
|
+
// NOTE: Data duplication between texts and structuredContent is intentional and required.
|
|
205
|
+
// Some MCP clients only read text content, while others only read structured content.
|
|
206
|
+
const { texts, structuredContent } = buildActorDetailsTextResponse({
|
|
207
|
+
details,
|
|
208
|
+
output: resolvedOutput,
|
|
209
|
+
actorOutputSchema,
|
|
210
|
+
mcpToolsMessage,
|
|
211
|
+
});
|
|
212
|
+
return buildMCPResponse({ texts, structuredContent });
|
|
213
|
+
}
|
|
55
214
|
//# sourceMappingURL=fetch_actor_details_common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details_common.js","sourceRoot":"","sources":["../../../src/tools/core/fetch_actor_details_common.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
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,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EAEH,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACpF,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC/F,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC5E,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ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,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,CAAC,eAAe,EAAE,YAAY,CAAC;QACrH,CAAC,CAAC,SAAS,CAAC;IAEhB,0FAA0F;IAC1F,sFAAsF;IACtF,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,6BAA6B,CAAC;QAC/D,OAAO;QACP,MAAM,EAAE,cAAc;QACtB,iBAAiB;QACjB,eAAe;KAClB,CAAC,CAAC;IAEH,OAAO,gBAAgB,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ApifyClient } from '../../apify_client.js';
|
|
3
3
|
import type { HelperTool } from '../../types.js';
|
|
4
|
+
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
4
5
|
/**
|
|
5
6
|
* Zod schema for get-actor-run arguments — shared between default and openai variants.
|
|
6
7
|
*/
|
|
@@ -37,6 +38,16 @@ export type FetchActorRunResult = {
|
|
|
37
38
|
run: Record<string, unknown>;
|
|
38
39
|
structuredContent: ActorRunStructuredContent;
|
|
39
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Builds the standard tool error response for get-actor-run.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildGetActorRunError(runId: string, error: unknown): ReturnType<typeof buildMCPResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Builds the tool success response for get-actor-run in default or widget mode.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildGetActorRunSuccessResponse(params: FetchActorRunResult & {
|
|
49
|
+
widget: boolean;
|
|
50
|
+
}): ReturnType<typeof buildMCPResponse>;
|
|
40
51
|
/**
|
|
41
52
|
* Fetches actor run data, resolves actor name, and fetches dataset results if completed.
|
|
42
53
|
* Shared data-fetching logic used by both default and openai variants.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run_common.d.ts","sourceRoot":"","sources":["../../../src/tools/core/get_actor_run_common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_actor_run_common.d.ts","sourceRoot":"","sources":["../../../src/tools/core/get_actor_run_common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAItE;;GAEG;AACH,eAAO,MAAM,eAAe;;iBAI1B,CAAC;AAgBH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAmBxD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,OAAO,CAAC;QAChB,YAAY,EAAE,OAAO,EAAE,CAAC;KAC3B,CAAC;CACL,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,iBAAiB,EAAE,yBAAyB,CAAC;CAChD,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CASxG;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC3C,MAAM,EAAE,mBAAmB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAClD,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAuBrC;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC,CA0D/D"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
var _a;
|
|
2
|
+
import dedent from 'dedent';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import log from '@apify/log';
|
|
4
5
|
import { FAILURE_CATEGORY, HelperTools, TOOL_STATUS } from '../../const.js';
|
|
5
6
|
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
6
7
|
import { compileSchema } from '../../utils/ajv.js';
|
|
7
|
-
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
8
|
+
import { buildMCPResponse, buildUsageMeta } from '../../utils/mcp.js';
|
|
8
9
|
import { generateSchemaFromItems } from '../../utils/schema_generation.js';
|
|
9
10
|
import { getActorRunOutputSchema } from '../structured_output_schemas.js';
|
|
10
11
|
/**
|
|
@@ -52,6 +53,44 @@ export const getActorRunMetadata = {
|
|
|
52
53
|
openWorldHint: false,
|
|
53
54
|
},
|
|
54
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Builds the standard tool error response for get-actor-run.
|
|
58
|
+
*/
|
|
59
|
+
export function buildGetActorRunError(runId, error) {
|
|
60
|
+
return buildMCPResponse({
|
|
61
|
+
texts: [dedent `
|
|
62
|
+
Failed to get Actor run '${runId}': ${error instanceof Error ? error.message : String(error)}.
|
|
63
|
+
Please verify the run ID and ensure that the run exists.
|
|
64
|
+
`],
|
|
65
|
+
isError: true,
|
|
66
|
+
telemetry: { toolStatus: TOOL_STATUS.SOFT_FAIL },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Builds the tool success response for get-actor-run in default or widget mode.
|
|
71
|
+
*/
|
|
72
|
+
export function buildGetActorRunSuccessResponse(params) {
|
|
73
|
+
var _a, _b, _c;
|
|
74
|
+
const { run, structuredContent, widget } = params;
|
|
75
|
+
if (!widget) {
|
|
76
|
+
return buildMCPResponse({
|
|
77
|
+
texts: [`# Actor Run Information\n\`\`\`json\n${JSON.stringify(run)}\n\`\`\``],
|
|
78
|
+
structuredContent,
|
|
79
|
+
_meta: buildUsageMeta(run),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const statusText = structuredContent.status === 'SUCCEEDED' && structuredContent.dataset
|
|
83
|
+
? `Actor run ${structuredContent.runId} completed successfully with ${structuredContent.dataset.totalItemCount} items. A widget has been rendered with the details.`
|
|
84
|
+
: `Actor run ${structuredContent.runId} status: ${structuredContent.status}. A progress widget has been rendered.`;
|
|
85
|
+
return buildMCPResponse({
|
|
86
|
+
texts: [statusText],
|
|
87
|
+
structuredContent,
|
|
88
|
+
_meta: {
|
|
89
|
+
...((_b = (_a = getWidgetConfig(WIDGET_URIS.ACTOR_RUN)) === null || _a === void 0 ? void 0 : _a.meta) !== null && _b !== void 0 ? _b : {}),
|
|
90
|
+
...((_c = buildUsageMeta(run)) !== null && _c !== void 0 ? _c : {}),
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
55
94
|
/**
|
|
56
95
|
* Fetches actor run data, resolves actor name, and fetches dataset results if completed.
|
|
57
96
|
* Shared data-fetching logic used by both default and openai variants.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run_common.js","sourceRoot":"","sources":["../../../src/tools/core/get_actor_run_common.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAA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E,YAAY,CAAC,KAAK,CAAC,MAAM;YAC3C,MAAM,EAAE,eAAe,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;YAC7D,YAAY,EAAE,YAAY,CAAC,KAAK;SACnC,CAAC;IACN,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAyC,EAAE,iBAAiB,EAAE,EAAE,CAAC;AAC7F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMhD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAG5B,CAAC"}
|
|
@@ -1,44 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
4
|
-
import { fixActorNameInputAndLog } from '../core/actor_tools_factory.js';
|
|
5
|
-
import { fetchActorDetailsMetadata, fetchActorDetailsToolArgsSchema, } from '../core/fetch_actor_details_common.js';
|
|
1
|
+
import { HelperTools } from '../../const.js';
|
|
2
|
+
import { buildFetchActorDetailsResult, fetchActorDetailsMetadata, } from '../core/fetch_actor_details_common.js';
|
|
6
3
|
/**
|
|
7
4
|
* Default mode fetch-actor-details tool.
|
|
8
5
|
* Returns full text response with output schema fetch.
|
|
9
6
|
*/
|
|
10
7
|
export const defaultFetchActorDetails = Object.freeze({
|
|
11
8
|
...fetchActorDetailsMetadata,
|
|
12
|
-
call: async (toolArgs) =>
|
|
13
|
-
var _a;
|
|
14
|
-
const { args, apifyToken, apifyMcpServer, mcpSessionId } = toolArgs;
|
|
15
|
-
const parsedArgs = fetchActorDetailsToolArgsSchema.parse(args);
|
|
16
|
-
const actorName = fixActorNameInputAndLog(parsedArgs.actor, { mcpSessionId, route: 'fetch-actor-details' });
|
|
17
|
-
const apifyClient = new ApifyClient({ token: apifyToken });
|
|
18
|
-
const resolvedOutput = resolveOutputOptions(parsedArgs.output);
|
|
19
|
-
const cardOptions = buildCardOptions(resolvedOutput);
|
|
20
|
-
const details = await fetchActorDetails(apifyClient, actorName, cardOptions);
|
|
21
|
-
if (!details) {
|
|
22
|
-
return buildActorNotFoundResponse(actorName);
|
|
23
|
-
}
|
|
24
|
-
// Fetch output schema from ActorStore if available and requested
|
|
25
|
-
const actorOutputSchema = resolvedOutput.outputSchema
|
|
26
|
-
? await ((_a = apifyMcpServer.actorStore) === null || _a === void 0 ? void 0 : _a.getActorOutputSchemaAsTypeObject(actorName).catch(() => null))
|
|
27
|
-
: undefined;
|
|
28
|
-
// NOTE: Data duplication between texts and structuredContent is intentional and required.
|
|
29
|
-
// Some MCP clients only read text content, while others only read structured content.
|
|
30
|
-
const { texts, structuredContent: responseStructuredContent } = await buildActorDetailsTextResponse({
|
|
31
|
-
actorName,
|
|
32
|
-
details,
|
|
33
|
-
output: resolvedOutput,
|
|
34
|
-
cardOptions,
|
|
35
|
-
apifyClient,
|
|
36
|
-
apifyToken,
|
|
37
|
-
actorOutputSchema,
|
|
38
|
-
paymentProvider: apifyMcpServer === null || apifyMcpServer === void 0 ? void 0 : apifyMcpServer.options.paymentProvider,
|
|
39
|
-
mcpSessionId,
|
|
40
|
-
});
|
|
41
|
-
return buildMCPResponse({ texts, structuredContent: responseStructuredContent });
|
|
42
|
-
},
|
|
9
|
+
call: async (toolArgs) => buildFetchActorDetailsResult(toolArgs, HelperTools.ACTOR_GET_DETAILS),
|
|
43
10
|
});
|
|
44
11
|
//# 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":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.js","sourceRoot":"","sources":["../../../src/tools/default/fetch_actor_details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,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,EAAE,WAAW,CAAC,iBAAiB,CAAC;CACzF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/default/get_actor_run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_actor_run.d.ts","sourceRoot":"","sources":["../../../src/tools/default/get_actor_run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAUlE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAuBtB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { TOOL_STATUS } from '../../const.js';
|
|
2
1
|
import { logHttpError } from '../../utils/logging.js';
|
|
3
|
-
import {
|
|
4
|
-
import { fetchActorRunData, getActorRunArgs, getActorRunMetadata, } from '../core/get_actor_run_common.js';
|
|
2
|
+
import { buildGetActorRunError, buildGetActorRunSuccessResponse, fetchActorRunData, getActorRunArgs, getActorRunMetadata, } from '../core/get_actor_run_common.js';
|
|
5
3
|
/**
|
|
6
4
|
* Default mode get-actor-run tool.
|
|
7
5
|
* Returns full JSON dump of the run without widget metadata.
|
|
@@ -20,22 +18,11 @@ export const defaultGetActorRun = Object.freeze({
|
|
|
20
18
|
if ('error' in fetchResult) {
|
|
21
19
|
return fetchResult.error;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
const texts = [`# Actor Run Information\n\`\`\`json\n${JSON.stringify(run)}\n\`\`\``];
|
|
25
|
-
return buildMCPResponse({
|
|
26
|
-
texts,
|
|
27
|
-
structuredContent,
|
|
28
|
-
_meta: buildUsageMeta(run),
|
|
29
|
-
});
|
|
21
|
+
return buildGetActorRunSuccessResponse({ ...fetchResult.result, widget: false });
|
|
30
22
|
}
|
|
31
23
|
catch (error) {
|
|
32
24
|
logHttpError(error, 'Failed to get Actor run', { runId: parsed.runId });
|
|
33
|
-
return
|
|
34
|
-
texts: [`Failed to get Actor run '${parsed.runId}': ${error instanceof Error ? error.message : String(error)}.
|
|
35
|
-
Please verify the run ID and ensure that the run exists.`],
|
|
36
|
-
isError: true,
|
|
37
|
-
telemetry: { toolStatus: TOOL_STATUS.SOFT_FAIL },
|
|
38
|
-
});
|
|
25
|
+
return buildGetActorRunError(parsed.runId, error);
|
|
39
26
|
}
|
|
40
27
|
},
|
|
41
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_actor_run.js","sourceRoot":"","sources":["../../../src/tools/default/get_actor_run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get_actor_run.js","sourceRoot":"","sources":["../../../src/tools/default/get_actor_run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACH,qBAAqB,EACrB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,GACtB,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc,MAAM,CAAC,MAAM,CAAC;IACvD,GAAG,mBAAmB;IACtB,IAAI,EAAE,KAAK,EAAE,QAA0B,EAAE,EAAE;QACvC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;QAC7D,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC;YACD,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC;gBACxC,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM;gBACN,YAAY;aACf,CAAC,CAAC;YAEH,IAAI,OAAO,IAAI,WAAW,EAAE,CAAC;gBACzB,OAAO,WAAW,CAAC,KAAK,CAAC;YAC7B,CAAC;YAED,OAAO,+BAA+B,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QACrF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,YAAY,CAAC,KAAK,EAAE,yBAAyB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACxE,OAAO,qBAAqB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;IACL,CAAC;CACK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAelE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAwC3B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
1
2
|
import { ApifyClient } from '../../apify_client.js';
|
|
2
3
|
import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
|
|
3
|
-
import {
|
|
4
|
+
import { buildActorDetailsForWidget, buildCardOptions, fetchActorDetails, } from '../../utils/actor_details.js';
|
|
4
5
|
import { buildMCPResponse } from '../../utils/mcp.js';
|
|
5
6
|
import { fixActorNameInputAndLog } from '../core/actor_tools_factory.js';
|
|
6
|
-
import { fetchActorDetailsMetadata, fetchActorDetailsToolArgsSchema, } from '../core/fetch_actor_details_common.js';
|
|
7
|
+
import { buildActorNotFoundResponse, fetchActorDetailsMetadata, fetchActorDetailsToolArgsSchema, resolveOutputOptions, } from '../core/fetch_actor_details_common.js';
|
|
7
8
|
/**
|
|
8
9
|
* OpenAI mode fetch-actor-details tool.
|
|
9
10
|
* Returns simplified structured content with interactive widget metadata.
|
|
@@ -15,25 +16,24 @@ export const openaiFetchActorDetails = Object.freeze({
|
|
|
15
16
|
const parsed = fetchActorDetailsToolArgsSchema.parse(args);
|
|
16
17
|
const actorName = fixActorNameInputAndLog(parsed.actor, { mcpSessionId, route: 'fetch-actor-details' });
|
|
17
18
|
const apifyClient = new ApifyClient({ token: apifyToken });
|
|
18
|
-
const
|
|
19
|
-
const cardOptions = buildCardOptions(resolvedOutput);
|
|
19
|
+
const cardOptions = buildCardOptions(resolveOutputOptions(parsed.output));
|
|
20
20
|
const details = await fetchActorDetails(apifyClient, actorName, cardOptions);
|
|
21
21
|
if (!details) {
|
|
22
22
|
return buildActorNotFoundResponse(actorName);
|
|
23
23
|
}
|
|
24
|
-
const {
|
|
24
|
+
const { actorUrl, actorDetails } = buildActorDetailsForWidget(details);
|
|
25
25
|
const structuredContent = {
|
|
26
26
|
actorInfo: details.actorCardStructured,
|
|
27
27
|
inputSchema: details.inputSchema,
|
|
28
|
-
actorDetails
|
|
28
|
+
actorDetails,
|
|
29
29
|
};
|
|
30
|
-
const texts = [`
|
|
31
|
-
# Actor information:
|
|
32
|
-
- **Actor:** ${actorName}
|
|
33
|
-
- **URL:** ${actorUrl}
|
|
30
|
+
const texts = [dedent `
|
|
31
|
+
# Actor information:
|
|
32
|
+
- **Actor:** ${actorName}
|
|
33
|
+
- **URL:** ${actorUrl}
|
|
34
34
|
|
|
35
|
-
An interactive widget has been rendered with detailed Actor information.
|
|
36
|
-
`];
|
|
35
|
+
An interactive widget has been rendered with detailed Actor information.
|
|
36
|
+
`];
|
|
37
37
|
const widgetConfig = getWidgetConfig(WIDGET_URIS.SEARCH_ACTORS);
|
|
38
38
|
return buildMCPResponse({
|
|
39
39
|
texts,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details.js","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EACH,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"fetch_actor_details.js","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE1E,OAAO,EACH,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACH,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,GACvB,MAAM,uCAAuC,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAc,MAAM,CAAC,MAAM,CAAC;IAC5D,GAAG,yBAAyB;IAC5B,IAAI,EAAE,KAAK,EAAE,QAA0B,EAAE,E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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_actor_details_internal.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details_internal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fetch_actor_details_internal.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/fetch_actor_details_internal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAQjE,eAAO,MAAM,6BAA6B,EAAE,SA4BjC,CAAC"}
|