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

@@ -7,7 +7,9 @@ import time
from apps.admin_console.database.connection import db_session
def request_diagnostics(session_id: str, *, db_path=None, limit: int | None = None) -> dict:
def request_diagnostics(
session_id: str, *, db_path=None, limit: int | None = None, offset: int = 0
) -> dict:
with db_session(db_path) as conn:
session = conn.execute(
"SELECT status FROM sessions WHERE session_id = ?", (session_id,)
@@ -17,9 +19,13 @@ def request_diagnostics(session_id: str, *, db_path=None, limit: int | None = No
"ORDER BY timestamp DESC"
)
params: tuple = (session_id,)
total = conn.execute(
"SELECT count(*) FROM traces WHERE session_id=? AND type='llm_diagnostic'",
params,
).fetchone()[0]
if limit is not None:
sql += " LIMIT ?"
params += (limit,)
sql += " LIMIT ? OFFSET ?"
params += (limit, offset)
rows = conn.execute(sql, params).fetchall()
requests = []
seen = set()
@@ -34,6 +40,7 @@ def request_diagnostics(session_id: str, *, db_path=None, limit: int | None = No
request_id = value.get("request_id")
value["active"] = (
running
and offset == 0
and request_id not in seen
and value.get("phase")
in {
@@ -64,6 +71,9 @@ def request_diagnostics(session_id: str, *, db_path=None, limit: int | None = No
"session_status": session["status"] if session else "unknown",
"collected_at": time.time(),
"requests": requests,
"total": total,
"offset": offset,
"next_offset": offset + limit if limit is not None and offset + limit < total else None,
"note": "时间戳为 Unix 秒;timestamps_utc 为 UTC。HTTP 200 不代表完整输出。usage=null 表示服务未报告用量。历史任务没有记录的字段无法补推。",
}