fix(agent): infer outputs from empty runner contract

This commit is contained in:
pewdiepie-archdaemon
2026-09-18 14:09:10 +00:00
parent dc26daadf1
commit 9e72d8ef75
2 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -1436,7 +1436,8 @@ def runtime_required_artifacts(user_text, client_runtime_context):
path = str(value or '').strip().rstrip('/')
if path and path not in paths:
paths.append(path)
return tuple(paths)
if paths:
return tuple(paths)
paths = []
for value in declared_workspace_artifacts(user_text):
path = str(value or '').strip().rstrip('/')
+7
View File
@@ -477,6 +477,13 @@ def test_prompt_output_path_is_tracked_without_its_source_path():
) == ('/workspace/output.html',)
def test_empty_runner_artifact_list_falls_back_to_prompt_output_path():
assert runtime_required_artifacts(
'Create an HTML report at /workspace/output.html from /workspace/input.csv.',
{'completion_requirements': {'required_artifacts': []}},
) == ('/workspace/output.html',)
def test_preferences_are_inputs_not_required_outputs_for_a_saved_digest():
from src.clean_agent_preview import declared_workspace_artifacts