設定端點
全域設定的端點。
| Method | 路徑 | 說明 |
|---|---|---|
GET POST |
/v1/config/startup |
local — 開機自動啟動。GET 回傳 enabled(記錄的設定)與 installed(launchd agent 或 systemd user unit 是否存在)。POST {enable}(必填)寫入或移除 launchd agent(macOS)或 systemd user unit(Linux),回傳 {ok, enabled, installed, detail};不會啟動或停止執行中的 daemon,下次登入才生效 |
GET POST |
/v1/config/system |
local — 回覆語言。GET 回傳 reply_lang(預設 auto)與 languages({code, label} 選項,auto 在前)。POST {reply_lang}(必填)會正規化語言代碼,超過 64 bytes 或含換行者拒絕,並把 reply_lang 寫入 config.json |
GET |
/v1/config/reply_lang |
local — v1.0.11 新增,唯讀(對此 target 發 POST 回 404)。回傳設定中的 reply_lang、解析後的語言 name,以及注入 system prompt 的 directive 句子 —— auto 時為空字串,代表回覆跟隨每則訊息自身的語言 |
GET POST |
/v1/config/output_dir |
local — 輸出目錄。GET 回傳 output_dir(原始設定)與 resolved(實際使用的目錄;未設定且 ~/Downloads 存在時即為該目錄)。POST {output_dir}(必填)展開 ~、建立目錄後寫入 config.json;"" 還原預設 |
其他 :target 一律回 404。