Skip to content

Make execute_command service response optional#48

Merged
gensyn merged 2 commits intomainfrom
copilot/make-response-variable-optional
Mar 28, 2026
Merged

Make execute_command service response optional#48
gensyn merged 2 commits intomainfrom
copilot/make-response-variable-optional

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

execute_command was registered with SupportsResponse.ONLY, forcing all callers to use return_response=True. This prevents fire-and-forget usage from automations or scripts that don't need the output.

Changes

  • __init__.py: SupportsResponse.ONLYSupportsResponse.OPTIONAL for execute_command service registration
  • tests/integration_tests/test_integration.py: Added test_execute_command_without_response to verify the service executes correctly when called without requesting a response

Usage

Callers can now omit return_response:

service: ssh_docker.execute_command
data:
  entity_id: sensor.my_container
  command: "touch /tmp/healthcheck"

While response-consuming callers remain unaffected.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Make response variable optional for command execution in container Make execute_command service response optional Mar 28, 2026
Copilot AI requested a review from gensyn March 28, 2026 14:07
@gensyn gensyn marked this pull request as ready for review March 28, 2026 14:09
@gensyn gensyn merged commit 94f627b into main Mar 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants