Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
# "Unknown message type: rate_limit_event" during streaming.
"claude-agent-sdk==0.1.20",
# HITL plan-approval gate (auto-enabled when HAX_API_KEY is set).
"hax-sdk>=0.2.0",
"hax-sdk>=0.2.4",
"python-dotenv>=1.0",
]

Expand Down
2 changes: 1 addition & 1 deletion requirements-docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
agentfield>=0.1.84
pydantic>=2.0
claude-agent-sdk==0.1.20
hax-sdk>=0.2.0
hax-sdk>=0.2.4
python-dotenv>=1.0
# cryptography 48.0.0 currently crashes with SIGILL on some Linux/aarch64
# Docker hosts when AgentField imports Ed25519 for DID registration.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
agentfield>=0.1.84
pydantic>=2.0
claude-agent-sdk==0.1.20
hax-sdk>=0.2.0
hax-sdk>=0.2.4
python-dotenv>=1.0
5 changes: 5 additions & 0 deletions swe_af/execution/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
field_validator,
model_validator,
)
from swe_af.hitl.ask_user import AskUserForm
from swe_af.runtime.providers import RUNTIME_VALUES, runtime_to_harness_provider

# Global default for all agent max_turns. Change this one value to adjust everywhere.
Expand Down Expand Up @@ -214,6 +215,8 @@ class IssueAdvisorDecision(BaseModel):
# Always
downstream_impact: str = ""
summary: str = ""
# HITL — see swe_af/hitl/ for semantics
ask_user_form: AskUserForm | None = None


class IssueResult(BaseModel):
Expand Down Expand Up @@ -266,6 +269,8 @@ class ReplanDecision(BaseModel):
skipped_issue_names: list[str] = []
new_issues: list[dict] = []
summary: str = ""
# HITL — see swe_af/hitl/ for semantics
ask_user_form: AskUserForm | None = None


class DAGState(BaseModel):
Expand Down
26 changes: 26 additions & 0 deletions swe_af/hitl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""HITL (human-in-the-loop) primitives layered on the Hax SDK."""

from swe_af.hitl.ask_user import (
AskUserForm,
AskUserFormField,
AskUserResponse,
approval_webhook_url,
build_form_builder,
build_hax_client_from_env,
format_prior_user_responses,
request_user_input_and_pause,
)
from swe_af.hitl.wrapper import AskUserBudget, run_with_ask_user

__all__ = [
"AskUserForm",
"AskUserFormField",
"AskUserResponse",
"AskUserBudget",
"approval_webhook_url",
"build_form_builder",
"build_hax_client_from_env",
"format_prior_user_responses",
"request_user_input_and_pause",
"run_with_ask_user",
]
Loading
Loading