refactor: extract NextActions into reusable workflow-surface models
Move wrapper-draft next_actions from handler-local dict helpers into typed models in workflow_surface/next_actions.py. Adds NextActionTool enum, NextActionPatchExample, and NextActions.from_wrapper_hints() constructor. Replaces private _wrapper_draft_next_actions and _wrapper_draft_patch_examples helpers. Adds can_continue as additive advisory field. Keeps backward-compatible aliases in models.py.
This commit is contained in:
@@ -116,6 +116,11 @@ def test_server_exposes_upstream_admin_and_workflow_tools() -> None:
|
||||
next_actions_schema = from_capability_output["properties"]["next_actions"]
|
||||
assert "recommended_next_tool" in next_actions_schema["properties"]
|
||||
assert "patch_examples" in next_actions_schema["properties"]
|
||||
assert "can_continue" in next_actions_schema["properties"]
|
||||
assert (
|
||||
"Advisory"
|
||||
in next_actions_schema["properties"]["can_continue"]["description"]
|
||||
)
|
||||
assert (
|
||||
"Advisory"
|
||||
in next_actions_schema["properties"]["can_save_now"]["description"]
|
||||
|
||||
Reference in New Issue
Block a user