mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-08-17 10:18:34 +00:00
* feat(artifacts): inline editing for text artifacts in the panel
Add a PUT /api/threads/{id}/artifacts/{path} endpoint that atomically
replaces an existing UTF-8 text file under /mnt/user-data/outputs after
verifying its SHA-256 revision. Active runs conflict (409); binary,
symlink, oversized, and non-output paths are rejected.
Frontend: edit/save/discard buttons, draft state with conflict detection,
CodeEditor onChange/onSave, loader SHA-256 from ETag, i18n, beforeunload guard.
Backend: PUT endpoint with thread reservation, atomic temp-file replacement,
sandbox sync for non-mounted providers, rollback on failure, ETag on GET.
Tests: 8 backend + 1 blocking-IO + 3 frontend test files.
* fix(artifacts): scope replacement permissions and release sandboxes
---------
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
30 lines
634 B
Python
30 lines
634 B
Python
"""Run status and disconnect mode enums."""
|
|
|
|
from enum import StrEnum
|
|
|
|
|
|
class ThreadOperationKind(StrEnum):
|
|
"""Kind of operation holding exclusive admission for a thread."""
|
|
|
|
run = "run"
|
|
checkpoint_write = "checkpoint_write"
|
|
artifact_write = "artifact_write"
|
|
|
|
|
|
class RunStatus(StrEnum):
|
|
"""Lifecycle status of a single run."""
|
|
|
|
pending = "pending"
|
|
running = "running"
|
|
success = "success"
|
|
error = "error"
|
|
timeout = "timeout"
|
|
interrupted = "interrupted"
|
|
|
|
|
|
class DisconnectMode(StrEnum):
|
|
"""Behaviour when the SSE consumer disconnects."""
|
|
|
|
cancel = "cancel"
|
|
continue_ = "continue"
|