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

@@ -320,6 +320,7 @@ class SessionRepository:
return 0
llm_calls = prompt = completion = total = cached = 0
by_node_model: dict[tuple[str, str], dict] = {}
operator_context: int | None = None
operator_context_at: float | None = None
with db_session(self.db_path) as conn:
@@ -348,6 +349,27 @@ class SessionRepository:
total += t
cached += _int(payload.get("cached_tokens"))
node = str(payload.get("node") or "").strip().lower()
model_name = str(payload.get("model") or "unknown")
group = by_node_model.setdefault(
(node, model_name),
{
"node": node,
"model": model_name,
"llm_calls": 0,
"prompt_tokens": 0,
"completion_tokens": 0,
"cached_tokens": 0,
},
)
group["llm_calls"] += 1
group["prompt_tokens"] += p
group["completion_tokens"] += c
group["cached_tokens"] += _int(payload.get("cached_tokens"))
group["cache_hit_rate"] = (
group["cached_tokens"] / group["prompt_tokens"]
if group["prompt_tokens"]
else None
)
if node in OPERATOR_NODE_NAMES:
operator_context = _int(payload.get("context_base_tokens")) or p
operator_context_at = row["timestamp"]
@@ -375,6 +397,7 @@ class SessionRepository:
"completion_tokens": completion,
"total_tokens": total,
"cached_tokens": cached,
"by_node_model": list(by_node_model.values()),
"operator_context_tokens": operator_context,
"operator_context_window_tokens": OPERATOR_CONTEXT_WINDOW_TOKENS,
"operator_context_updated_at": operator_context_at,