# 設定端點

全域設定的端點。

| 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` 時為空字串；v1.2.0 起 system prompt 此時改用內建預設（跟隨使用者語言，否則英文；中文一律繁體中文（台灣用語）） |
| `GET` `POST` | `/v1/config/output_dir` | **local** — 輸出目錄。`GET` 回傳 `output_dir`（原始設定）與 `resolved`（實際使用的目錄；未設定且 `~/Downloads` 存在時即為該目錄）。`POST` `{output_dir}`（必填）展開 `~`、建立目錄後寫入 `config.json`；`""` 還原預設 |
| `GET` `POST` | `/v1/config/official_guide` | **local** — v1.2.0 新增。各模型官方指引的注入開關。`GET` 回傳 `{enabled}`；`POST` `{enable}`（必填）把 `official_guide_disabled` 寫入 `config.json`，回傳 `{ok, enabled}` |
| `GET` `POST` | `/v1/config/skill_source` | **local** — v1.2.0 新增。skill 來源開關。`GET` 回傳 `sources`（`claude`、`codex`、`copilot`、`opencode`、`agents`；`openai` 來源移除於 v1.2.1）與 `disabled`；`POST` `{disabled}`（必填，每個名稱都必須屬於 `sources`，否則 400）把 `skill_source_disabled` 寫入 `config.json`、重新掃描 skill，回傳 `{ok, disabled}` |

其他 `:target` 一律回 404。
