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:
chenmingxuan committed 2026-10-18 14:18:37 +08:00
1 parent 2328a4df0c
commit e1ea099592
128 files changed
+4944 -700

No files matched your search

+9
View File
@@ -35,6 +35,8 @@ import threading
import time
from typing import Any
from artemis.llm.stream_guard import ToolArgumentOverflow
class FailureCategory(StrEnum):
RATE_LIMIT = "rate_limit"
@@ -43,6 +45,7 @@ class FailureCategory(StrEnum):
CONNECTION = "connection"
AUTHENTICATION = "authentication"
BAD_REQUEST = "bad_request"
INVALID_OUTPUT = "invalid_output"
CANCELLED = "cancelled"
UNKNOWN = "unknown"
@@ -92,6 +95,8 @@ def classify_failure(error: BaseException) -> Failure:
"""Convert a provider/transport exception into explicit recovery decisions."""
if isinstance(error, KeyboardInterrupt) or type(error).__name__ == "CancelledError":
return Failure(FailureCategory.CANCELLED, False, False)
if isinstance(error, ToolArgumentOverflow):
return Failure(FailureCategory.INVALID_OUTPUT, True, True)
code = extract_status_code(error)
message = str(error).lower()
@@ -207,6 +212,10 @@ def retry_policy_for(category: FailureCategory | str) -> RetryPolicy:
return _DEFAULT_RETRY_POLICIES[category]
from artemis.config.settings import settings
if category is FailureCategory.INVALID_OUTPUT:
return _configured_policy(
min(1, settings.OPENAI_MAX_RETRIES), settings.OPENAI_RETRY_INTERVAL_SECONDS
)
if category is FailureCategory.RATE_LIMIT:
return _configured_policy(
settings.OPENAI_MAX_RETRIES, settings.OPENAI_RATE_LIMIT_RETRY_SECONDS