You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Split get-actor-run into data + -widget tools (#734)
* feat: Split get-actor-run into data + -widget tools
Final step (6 of 6) of the #577 umbrella rollout. Mirrors the
decoupled-pattern recipe from #722 (fetch-actor-details), #723
(search-actors), and #724 (call-actor):
- get-actor-run is now mode-independent and data-only. No tool-level
widget _meta in either mode; runs category entry is a plain ToolEntry
instead of a mode map.
- New get-actor-run-widget (apps-only) renders the live progress widget.
Input is strict: { runId } only. Tool- and response-level widget _meta
(ui.resourceUri = ui://widget/actor-run.html). Reuses the shared
buildGetActorRunSuccessResponse({ widget: true }) helper.
- buildGetActorRunSuccessResponse widget branch now also sets
openai/widgetDescription on the response _meta, matching the other
three widget tools.
- Apps server instructions: added the fourth disambiguation bullet
pairing get-actor-run (silent data lookup) with get-actor-run-widget
(live progress widget), using the same vocabulary as the existing
three splits. WORKFLOW_RULES untouched — the "NEVER poll
get-actor-run after call-actor-widget" rule is orthogonal.
- Deleted src/tools/apps/get_actor_run.ts; widget rendering now lives
in the sibling tool rather than a mode toggle.
https://claude.ai/code/session_01SF9P6g91UrVMahn4bLsUNf
* chore: Address staff review findings post-split
- Drop stale rolling-rollout note from server-instructions header (split is now complete)
- Extend "no polling after widget" rule to also cover get-actor-run-widget
- Rename integration test to drop misleading "widget" label (it exercises the data tool)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: Remove paymentRequired flag from get-actor-run tools
* Update src/tools/core/get_actor_run_common.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/tools/apps/get_actor_run_widget.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* test: Add integration test for x402 _meta advertising on paid tools (#768)
Asserts that tools with paymentRequired: true advertise _meta.x402 with
the expected fields (scheme, network, asset, payTo, amount) when the
server runs in x402 payment mode, and that free tools do not.
Pins the expected paid set with a hardcoded list so silent drift (e.g.
a tool losing paymentRequired) is caught here. Tracks #766.
* feat: Add paymentRequired flag to get-actor-run tools and update documentation
* refactor: Skip tests for auto mode client capabilities and rename itemCount to totalItemCount
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Kopecký <themq37@gmail.com>
## Widget workflow (applies when tool responses include widget metadata)
53
49
Some clients render widget-backed Actor tools: the response includes a live UI that automatically polls run status. When a widget is rendered, follow-up status polling by the model is a forbidden duplicate.
54
50
55
-
- **Never call \`${HelperTools.ACTOR_RUNS_GET}\` after \`${HelperTools.ACTOR_CALL_WIDGET}\`.** The widget renders live progress and polls itself — stop after the widget response and defer to it for run status.
51
+
- **Never call \`${HelperTools.ACTOR_RUNS_GET}\` or \`${HelperTools.ACTOR_RUNS_GET_WIDGET}\` after \`${HelperTools.ACTOR_CALL_WIDGET}\` or \`${HelperTools.ACTOR_RUNS_GET_WIDGET}\`.** Both widgets render live progress and poll themselves — stop after the widget response and defer to it for run status. Re-rendering the same run via \`${HelperTools.ACTOR_RUNS_GET_WIDGET}\` is a duplicate.
56
52
- Polling \`${HelperTools.ACTOR_RUNS_GET}\` after \`${HelperTools.ACTOR_CALL}\` (the silent async variant, no widget) is fine — that tool renders no UI, so polling is expected when you need the run status.
57
53
` : ''}
58
54
## Tool dependencies and disambiguation
@@ -76,6 +72,7 @@ ${isApps ? `- **Data vs widget Actor tools (when the client supports widgets):**
76
72
- \`${HelperTools.STORE_SEARCH}\` is a silent data lookup (Actor list for name resolution) with no UI; \`${HelperTools.STORE_SEARCH_WIDGET}\` renders an interactive UI element (widget) with Actor search results for the user to browse — use it only when the user explicitly asks to search or discover Actors.
77
73
- \`${HelperTools.ACTOR_GET_DETAILS}\` is a silent data lookup (input schema, README, metadata) with no UI; \`${HelperTools.ACTOR_GET_DETAILS_WIDGET}\` renders an interactive UI element (widget) with Actor details — use it only when the user explicitly asks to see or browse the Actor.
78
74
- \`${HelperTools.ACTOR_CALL}\` is a silent async start (returns runId, no UI); \`${HelperTools.ACTOR_CALL_WIDGET}\` renders an interactive UI element (widget) that tracks live Actor run progress — use it only when the user explicitly asks to see progress.
75
+
- \`${HelperTools.ACTOR_RUNS_GET}\` is a silent data lookup (run status, dataset IDs, stats) with no UI; \`${HelperTools.ACTOR_RUNS_GET_WIDGET}\` renders an interactive UI element (widget) showing live run progress for the user — use it only when the user explicitly asks to see run progress.
79
76
- When the next step is running an Actor, prefer silent lookups (\`${HelperTools.STORE_SEARCH}\`, \`${HelperTools.ACTOR_GET_DETAILS}\`) over widget-backed variants.
80
77
` : ''}- **\`${HelperTools.STORE_SEARCH}\` vs ${RAG_WEB_BROWSER}:**
81
78
\`${HelperTools.STORE_SEARCH}\` finds robust and reliable Actors for specific websites; ${RAG_WEB_BROWSER} is a general and versatile web scraping tool.
0 commit comments