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

+28
View File
@@ -13,6 +13,7 @@
# limitations under the License.
import difflib
import hashlib
import json
import os
from pathlib import Path
@@ -181,6 +182,33 @@ def save_note_content(base_dir: str | Path, key: str, content: str) -> None:
logger.debug("Failed to publish note_saved event for key '%s': %s", key, exc)
def save_verified_note(base_dir: str | Path, key: str, content: str) -> dict:
"""Task-local text delivery using the shared note store, with a read-back receipt."""
if not key.strip(" .") or key != key.strip() or re.search(r'[<>:"/\\|?*\x00-\x1f]', key):
raise ValueError("笔记 key 必须是普通名称,不能是路径")
root = Path(base_dir).resolve()
notes = get_notes_dir(root)
path = get_note_file_path(root, key)
if (
notes.resolve().parent != root
or path.is_symlink()
or path.resolve().parent != notes.resolve()
):
raise ValueError("笔记不能通过链接写入任务目录之外")
save_note_content(root, key, content)
data = path.read_bytes()
# save_note_content uses the platform's text newline conversion.
if data != content.replace("\n", os.linesep).encode("utf-8"):
raise OSError("笔记写入后读回不一致,不能确认交付")
return {
"ok": True,
"path": path.relative_to(root).as_posix(),
"bytes": len(data),
"sha256": hashlib.sha256(data).hexdigest(),
"verified": True,
}
def append_note_content(base_dir: str | Path, key: str, content: str) -> None:
"""Appends raw content to a note, inserting a newline if the file is not empty and lacks a trailing newline."""
notes_dir = get_notes_dir(base_dir)