本卡屬 FR-166(母卡 CM-3109)收尾補齊(決策者 2026-10-27:沒有下期,不太大的支線這期一起做)。批 10。repo:jedi-packages,只改 jedi-remote-agent。
這張卡做什麼(白話)
兩件小事:①Agent 清單 API 要回「本機管理員密碼設了沒」(心跳已經在收 local_admin_set,清單輸出沒宣告),前端要顯示紅字提醒;②主站「Agent 自主執行紀錄」要能按日期篩,套件的清單查詢要收起訖時間。
改哪些檔
改:jedi-remote-agent/jedi_remote_agent/api/serializers/remote_agent.py(RemoteAgentDetailResponse 加 local_admin_set)
改:jedi-remote-agent/jedi_remote_agent/infra/local_run/repository/local_run_repo_impl.py(list_page 收 started_from/started_to)
改:對應 domain/app service 與 tests/
怎麼做
- RemoteAgentDetailResponse 加 local_admin_set = fields.Boolean(allow_none=True);DB 欄已存在(P0-5/P1-6)就只補輸出,不存在就照心跳收法補欄+migration。
- local_runs list_page 加 started_from、started_to(含時區的時間,篩 started_at,沒帶不篩),沿用既有 query 寫法。
- BE venv 跑套件測試要先把 tests 指回本套件(jedi-ldap 會搶 tests 套件名,見 CM-3141 首腦復核)。
驗收
- 套件 pytest 綠;清單 dump 帶 local_admin_set、日期篩選邊界各有測試,含突變。
紀律
- 先 git status;先 git merge ws-CM-3109 把前面批次併進來;顯式 git add 檔名,禁 -am;不切 branch;push 等令;不自派 subagent;只動 DEV。
- 不重複造輪子:先按行為 grep 既有實作,reuse → extend → 確認沒有才新增;不開 V2、不複製改兩行。檔案註解只寫為什麼與陷阱。超標檔只准拆不准塞。
- 資安規範讀 BE .claude/rules/security/ 八支;動到授權/密碼學要寫測試含突變。
- 做完 commit+卡上回寫(commit hash、改了哪些檔、reuse/extend/new、測試與突變、手測清單),狀態改「修正待驗證」。
建議模型與思考強度(首腦判斷)
Stage 10/Model sonnet/Effort medium/Repo jedi-packages。兩處小補。
回寫(CM-3162)
- commit:7d95fe4e(branch ws-CM-3109-CM-3162,未 push;先 merge ws-CM-3109 已是最新)