feat: add official Codex skill and harden task execution
Install and update artemis-use with task diagnostics and plugin guidance. Preserve cross-device file receipts, review canonical reports, guard stage transitions and reduce small history summaries. Improve exploration lifecycle, request recovery and browser live connections.
This commit is contained in:
1 parent
2328a4df0c
commit
e1ea099592
128 files changed
+4944
-700
No files matched your search
@@ -0,0 +1,39 @@
|
||||
"""The default SDK path must return the answer already prepared for review."""
|
||||
|
||||
import json
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
import pytest
|
||||
|
||||
from artemis.config import OutputConfig
|
||||
from artemis.graph.state import State
|
||||
from artemis.sdk.agent import Agent
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("outputter_enabled", [True, False])
|
||||
async def test_default_output_reuses_executor_report_without_another_model(
|
||||
tmp_path, monkeypatch, outputter_enabled
|
||||
):
|
||||
synthesize = AsyncMock()
|
||||
monkeypatch.setattr("artemis.sdk.agent.outputter", synthesize)
|
||||
ctx = SimpleNamespace(
|
||||
execution_setup=SimpleNamespace(
|
||||
outputter=SimpleNamespace(enabled=outputter_enabled, force_synthesis=False),
|
||||
disable_outputter=not outputter_enabled,
|
||||
)
|
||||
)
|
||||
result_path = tmp_path / "result.json"
|
||||
body = "# 调查结果\n双端检查已完成;未测功能不能记为通过。"
|
||||
result = await Agent._extract_output(
|
||||
object.__new__(Agent),
|
||||
task_name="exploration",
|
||||
ctx=ctx,
|
||||
request=SimpleNamespace(llm_output_path=result_path),
|
||||
output_config=OutputConfig(structured_output=None, output_description=None),
|
||||
state=State(initial_goal="调查", execution_report=body),
|
||||
)
|
||||
assert result == body
|
||||
assert json.loads(result_path.read_text(encoding="utf-8")) == {"result": body}
|
||||
synthesize.assert_not_called()
|
||||
Reference in new issue
Block a user