Handle wp ability run missing input based on input_schema#7
Open
Copilot wants to merge 7 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error for abilities without input_schema when run via CLI
Allow Jun 12, 2026
wp ability run to execute abilities without input_schema
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Copilot
AI
changed the title
Allow
Handle Jun 12, 2026
wp ability run to execute abilities without input_schemawp ability run missing input based on input_schema
2 tasks
Member
|
@copilot fix failing test |
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
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.
wp ability runpreviously always passed an empty array when no input flags were provided, which caused abilities without aninput_schemato fail validation. This PR preserves “no input” asnullwhere appropriate, while keeping compatibility for abilities that do define an input schema.Behavior fix: preserve “no input” semantics without breaking object-schema abilities
Ability_Command::build_input_with_stdin()to returnnullwhen no--inputpayload or field args are provided.Ability_Command::run()to pass[]instead ofnullwhen no CLI input is provided and the ability defines aninput_schema.input_schemaworking as intended, while avoidinginput is not of type objecterrors for abilities that require object input.Regression coverage: ability without
input_schemafeatures/ability.featurewith a fixture ability (test-plugin/simple-no-input) that defines noinput_schema.wp ability run test-plugin/simple-no-inputreturns[].