Repository navigation
fix(hello-world-automation): use script runner so plugin-spec curl works without a pre-provisioned agent profile - #798
Closed
juanmichelini wants to merge 1 commit into
Conversation
…rks without a pre-provisioned agent profile The conversation-runner manifest declared a required runtime.agent_profile with default_name "hello-world-agent" and allowed_tools ["terminal"]. The automation service resolves that profile against the caller's org at plugin-spec creation time, so POST /api/automation/v1/plugin-spec fails with 422 "Agent profile 'hello-world-agent' not found" on any org that hasn't pre-provisioned a profile with that exact name and tool set. Switch the entrypoint to the script runner (runner: "script", command: "python3 scripts/main.py") and drop the runtime.agent_profile requirement. The script runner packages a deterministic entrypoint with no conversation and no LLM, so no agent/LLM profile needs to exist for the curl to succeed and a dispatched run to produce output. Add scripts/main.py: reads AUTOMATION_CONFIG_PATH for the greeting, echoes injected profile/env context, notes any event payload, and fires the completion callback (COMPLETED/FAILED) via AUTOMATION_CALLBACK_URL. Update README and marketplace/catalog description to match. Co-authored-by: openhands <openhands@all-hands.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #767. Switches the
hello-world-automationplugin from the conversation runner to thescriptrunner so thatPOST /api/automation/v1/plugin-specsucceeds on a fresh org without a pre-provisioned agent profile.Why
The manifest on this branch declares a required
runtime.agent_profilewithdefault_name: "hello-world-agent"andallowed_tools: ["terminal"]. The automation service resolves that profile against the caller's org at plugin-spec creation time (_resolve_plugin_spec_runtime_fields->validate_agent_profile_allowlists), so creating the automation fails with:on any org that hasn't pre-provisioned a profile with that exact name and tool set. That makes the example impossible to try out of the box.
The
scriptrunner needs no agent/LLM profile at all — it packages a deterministic entrypoint with no conversation and no LLM. Withrunner: "script"and noruntime.agent_profile, the profile lookup is skipped (validate_agent_profile_allowlists_with_clientreturns early when both id and name are empty), so thecurlreturns201and a dispatched run produces output immediately.Changes
.plugin/plugin.json:entrypoint.runner->"script",entrypoint.command->"python3 scripts/main.py"; removedruntime.agent_profile.scripts/main.py(new): readsAUTOMATION_CONFIG_PATHfor the greeting, echoes injected profile/env context, notes anyAUTOMATION_EVENT_PAYLOAD, and fires the completion callback (COMPLETED/FAILED) viaAUTOMATION_CALLBACK_URL.README.md: rewritten to describe the script runner and explain why it's used instead of the conversation runner.marketplaces/openhands-extensions.json+ rootREADME.mdcatalog: description synced.Verification
Validated the manifest against the merged automation-service schema (
AutomationPluginManifest.model_validate) and built the execution payload locally:Ran the entrypoint locally:
Repo checks pass:
python scripts/sync_extensions.py --checkandpython scripts/check_plugin_resources.pyboth exit 0.Trade-off
This changes what the example demonstrates: it no longer shows the conversation/stock runner +
agent_profile.allowed_toolsallowlist. A conversation-runner example fundamentally can't be created on a fresh org without first provisioning the named profile, so it can't be the "try it with one curl" example. If a conversation-runner example is still wanted, it could live in a separate plugin that documents the profile provisioning as a prerequisite.This PR was created by an AI agent (OpenHands) on behalf of @juanmichelini.