LIVE 模式可直接在辦公室對專案派發任務

摘要:
與 claude-office 同功能:點選專案 agent 輸入任務,監看伺服器在該專案
cwd spawn headless session(codex exec --full-auto),過程即時可視。

根本原因:
實況模式原本只能唯讀觀察 rollout,無法從辦公室驅動真實 Codex 執行。

影響:
watcher 新增 POST /task(Origin 白名單 5173/5182、每專案排隊上限 3、
15 分鐘逾時);--full-auto 允許 AI 在專案內改檔案,僅限 localhost 使用。

修法:
- server/watch.mjs:launchTask 用 codex exec --full-auto --skip-git-repo-check -
  (prompt 走 stdin),resume 由該專案最新 rollout 檔名取 sessionId;
  新生 rollout 檔從頭 tail(born-now)
- live.ts:dispatchTask() + task_accepted/task_done;SidePanel TaskComposer

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 14:21:44 +08:00
co-authored by Claude Fable 5
parent 7d9d477166
commit 1ac46782a1
5 changed files with 320 additions and 4 deletions
+49
View File
@@ -348,6 +348,55 @@
border-color: transparent;
}
.task-composer {
margin-top: 14px;
}
.task-composer textarea {
width: 100%;
resize: vertical;
font-family: inherit;
font-size: 12px;
line-height: 1.5;
color: var(--text);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 10px;
}
.task-composer textarea:focus {
outline: none;
border-color: var(--terracotta);
}
.task-composer-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-top: 8px;
}
.task-composer-row label {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 11px;
color: var(--text-dim);
cursor: pointer;
}
.task-composer-row .assign-btn {
width: auto;
margin-top: 0;
}
.task-composer-row .assign-btn:disabled {
opacity: 0.5;
cursor: default;
}
.panel-hint {
padding: 20px 16px;
border-bottom: 1px solid var(--border);