Skip to content

Commit 0151d23

Browse files
jawwad-aliclaude
andauthored
fix(integrations): agy honors SPECKIT_INTEGRATION_AGY_EXTRA_ARGS (#3347)
AgyIntegration.build_exec_args returned [exe, '--print', prompt] without calling _apply_extra_args_env_var(), so the documented per-integration extra-args env hook was silently dropped for agy — same class as the cursor-agent fix #3265. Append the hook after the positional prompt, matching the devin integration's shape. agy still ignores model/output as before. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent f764270 commit 0151d23

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

src/specify_cli/integrations/agy/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ def build_exec_args(
8989
output_json: bool = True,
9090
) -> list[str] | None:
9191
# agy does not support --model or JSON output; both params are ignored
92-
return [self._resolve_executable(), "--print", prompt]
92+
args = [self._resolve_executable(), "--print", prompt]
93+
# Honor SPECKIT_INTEGRATION_AGY_EXTRA_ARGS (operator-supplied flags),
94+
# appended after the positional prompt like the devin integration.
95+
self._apply_extra_args_env_var(args)
96+
return args
9397

9498
def setup(
9599
self,

tests/integrations/test_integration_agy.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ def test_build_exec_args_ignores_output_json(self):
8181
result = i.build_exec_args("my prompt", output_json=False)
8282
assert result == ["agy", "--print", "my prompt"]
8383

84+
def test_build_exec_args_honors_extra_args(self, monkeypatch):
85+
"""SPECKIT_INTEGRATION_AGY_EXTRA_ARGS must be appended after the prompt.
86+
87+
agy previously skipped _apply_extra_args_env_var entirely, so the
88+
documented per-integration extra-args hook was silently ignored
89+
(same class as the merged cursor-agent fix #3265).
90+
"""
91+
from specify_cli.integrations import get_integration
92+
monkeypatch.setenv("SPECKIT_INTEGRATION_AGY_EXTRA_ARGS", "--verbose")
93+
i = get_integration("agy")
94+
assert i.build_exec_args("my prompt") == [
95+
"agy", "--print", "my prompt", "--verbose",
96+
]
97+
98+
def test_build_exec_args_honors_executable_override(self, monkeypatch):
99+
from specify_cli.integrations import get_integration
100+
monkeypatch.setenv("SPECKIT_INTEGRATION_AGY_EXECUTABLE", "/custom/agy")
101+
i = get_integration("agy")
102+
assert i.build_exec_args("my prompt")[0] == "/custom/agy"
103+
84104

85105
class TestAgyHookCommandNote:
86106
"""Verify dot-to-hyphen normalization note is injected into hook sections."""

0 commit comments

Comments
 (0)