本卡屬 FR-192(母卡 FR-192 母案(同清單上一張)),卡 M-1,批 3。只改 BE(主 repo,Repo 欄空著)。依賴:I-1。
主系統回饋清單要能顯示「這筆從哪台 Agent 來」與「本機管理員」這個暱稱,但 jedi-issue 不該認識 Agent,所以在主系統接線層補:jedi-issue 有一個開了很久沒人接的「回應擴充」掛點,本卡第一次接它,對來源是 Agent 的列補 Agent 名稱、對建立人員是 local-admin 的列補暱稱「本機管理員」。另外補一筆功能標籤「Agent 主控台」(seed migration),Agent 來的回饋固定掛它。🔴 seed 檔寫好但 manifest.tsv 不要碰,由同批 M-3 一次登記兩支。
reuse:jedi-issue SchemaExtensions.response_enricher(空殼掛點第一次有人接);extend:core/plugins/issue.py mount() 傳 schema_extensions;seed 照 2026-05-22-seed-oscal-ssp-roles.sql 形狀 ON CONFLICT DO NOTHING
repo:~/Projects/Billows/Audit-Manager/compliance-manager-be
改既有:core/plugins/issue.py 184(mount 加 schema_extensions)
新開:core/plugins/_issue_source_enrich.py(source=agent 補 source_name=remote_agents.name;created_user=local-admin 且 source=agent 補 created_user_name=本機管理員)
新開:scripts/sql/2026-11-XX-fr192-seed-agent-console-function-label.sql(labels:scope=FUNCTION, name=Agent 主控台,uid 固定)
新開:common/code/feedback_source.py(AGENT_CONSOLE_FUNCTION_LABEL_UID、SOURCE_WEB/AGENT、LOCAL_ADMIN_LOGIN_NAME)
common/code/feedback_source.py:SOURCE_WEB="web"、SOURCE_AGENT="agent"、LOCAL_ADMIN_LOGIN_NAME="local-admin"、AGENT_CONSOLE_FUNCTION_LABEL_UID="<固定 uuid,自己產一次寫死>"、LOCAL_ADMIN_DISPLAY_NAME="本機管理員"。core/plugins/_issue_source_enrich.py:response_enricher(reply, context)——reply 是 FeedbackPageQueryResponse().dump() 後的 dict,對 data[] 每列:source==agent 且 source_ref → 補 source_name(批次查 remote_agent_domain_service.get_remote_agent_by_uid,查不到留 None);created_user==local-admin 且 source==agent → created_user_name=本機管理員。單筆端點同一支。core/plugins/issue.py 第 184 行 mount():create_blueprint(..., schema_extensions=SchemaExtensions(response_enricher=…));確認 jedi-issue 的 route 真的有呼叫 enrich(現況是空殼掛點,若 route 沒接,I-1 已合回的版本要有,沒有就回寫問,不自己在主系統繞)。scripts/sql/2026-11-XX-fr192-seed-agent-console-function-label.sql(phase=seed,照 2026-05-22-seed-oscal-ssp-roles.sql):INSERT INTO public.labels (uid, name, color, description, scope, is_deleted) VALUES ('<同①的 uuid>', 'Agent 主控台', '#006b75', NULL, 'FUNCTION', false) ON CONFLICT DO NOTHING(labels.uid 有唯一鍵才能 ON CONFLICT;沒有就用 WHERE NOT EXISTS 形式,照 jedi-issue 001 seed)。🔴 不碰 manifest.tsv(M-3 登記),但 DEV 要自己套:psql --single-transaction -v ON_ERROR_STOP=1 -f 用 cmmgr。POST /feedbacks 看 enrich 欄位。DEV 套 seed 後 select uid,name from labels where scope='FUNCTION' and name='Agent 主控台' 一列且 uid 等於常數;手動 insert 一筆 source=agent 的回饋後 POST /feedbacks 回應該列有 source_name;created_user=local-admin 那列 created_user_name 為「本機管理員」;既有 web 回饋回應不變;BE 重啟實打;回寫明講「出貨基線待重產」
~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-192-2611-agent-console-feedback/design.md §3 決策定案、§5 詳細設計(本卡那節)、§6 拆卡表本卡那列、§8 風險;討論稿 discussion.md §4 只在想知道「為什麼這樣裁」時看~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-192-2611-agent-console-feedback/prototype/index.html(純畫面,只取結構與資訊順序;文案依 i18n 重寫)guidant_agent/scan/app/local_runs.py(本機先存+同步欄位)、sync/app/outbox.py(待回傳佇列)、console/api/runs_routes.py(清單/404/resend)、files/app/blob_ops.py(附件存本機);主系統 api/source_scan/routes/agent_manual_scan_route.py(Agent 收單端點先例)、infra/upload_file/remote_agent_adapter.py(Agent 檔參照)、core/plugins/_agent_config_sections.py+_agent_config_notify.py(設定通道)、core/plugins/issue.py(jedi-issue 接線);jedi-issue app/feedback/service/feedback_service.py、api/routes/feedback_route.py、plugin/contract.py(SchemaExtensions);jedi-remote-agent app/service/local_run_service.py(ingest 形狀)、migrations/011-remote-agent-offline-operators.sql(RLS/GRANT 先例);FE src/views/feedback/system/SystemFeedbackForm.vue、console/views/Runs.vue、console/views/Logs.vue(Dialog)、src/views/source-scan/SourceFilePicker.vue(拖放)docs/system-design/system-integration/04-Agent到主系統API.md、05-主系統到Agent指令.md