@apify/actors-mcp-server 0.9.20-beta.6 → 0.9.20-beta.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"actor_executor.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/actor_executor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA8C,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,aA2CjC,CAAC"}
1
+ {"version":3,"file":"actor_executor.d.ts","sourceRoot":"","sources":["../../../src/tools/openai/actor_executor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA8C,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGhG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAsBjC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import log from '@apify/log';
2
- import { HelperTools } from '../../const.js';
3
- import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
2
+ import { buildStartAsyncResponse } from '../core/call_actor_common.js';
4
3
  /**
5
4
  * OpenAI actor executor for UI mode.
6
5
  * Runs actors asynchronously — starts the run and returns immediately with widget metadata.
@@ -8,7 +7,7 @@ import { getWidgetConfig, WIDGET_URIS } from '../../resources/widgets.js';
8
7
  */
9
8
  export const openaiActorExecutor = {
10
9
  async executeActorTool(params) {
11
- var _a, _b;
10
+ var _a;
12
11
  if ((_a = params.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
13
12
  return null;
14
13
  }
@@ -19,31 +18,12 @@ export const openaiActorExecutor = {
19
18
  runId: actorRun.id,
20
19
  mcpSessionId: params.mcpSessionId,
21
20
  });
22
- const structuredContent = {
23
- runId: actorRun.id,
21
+ return buildStartAsyncResponse({
24
22
  actorName: params.actorFullName,
25
- status: actorRun.status,
26
- startedAt: ((_b = actorRun.startedAt) === null || _b === void 0 ? void 0 : _b.toISOString()) || '',
23
+ actorRun,
27
24
  input: params.input,
28
- };
29
- const responseText = `Started Actor "${params.actorFullName}" (Run ID: ${actorRun.id}).
30
-
31
- A live progress widget has been rendered that automatically tracks this run and refreshes status every few seconds until completion.
32
-
33
- The widget will update the context with run status and datasetId when the run completes. Once complete (or if the user requests results), use ${HelperTools.ACTOR_OUTPUT_GET} with the datasetId to retrieve the output.
34
-
35
- Do NOT proactively poll using ${HelperTools.ACTOR_RUNS_GET}. Wait for the widget state update or user instructions. Ask the user what they would like to do next.`;
36
- // _meta carries widget rendering config (not usage meta — the run is still in progress)
37
- const widgetConfig = getWidgetConfig(WIDGET_URIS.ACTOR_RUN);
38
- return {
39
- content: [{ type: 'text', text: responseText }],
40
- structuredContent,
41
- // Response-level meta; only returned in openai mode (this executor is openai-only)
42
- _meta: {
43
- ...widgetConfig === null || widgetConfig === void 0 ? void 0 : widgetConfig.meta,
44
- 'openai/widgetDescription': `Actor run progress for ${params.actorFullName}`,
45
- },
46
- };
25
+ widget: true,
26
+ });
47
27
  },
48
28
  };
49
29
  //# sourceMappingURL=actor_executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor_executor.js","sourceRoot":"","sources":["../../../src/tools/openai/actor_executor.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;AAG1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkB;IAC9C,KAAK,CAAC,gBAAgB,CAAC,MAA4B;;QAC/C,IAAI,MAAA,MAAM,CAAC,WAAW,0CAAE,OAAO,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACnE,MAAM,QAAQ,GA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