本卡屬 FR-196(母卡 FR-196 母案(同清單上一張)),卡 P-2,第一期批 2。只改 jedi-python-package。依賴:P-1。
通知中心套件的第二棒:對外的八條 REST 端點(鈴鐺紅點數、收件匣列表、最近十筆、標已讀、封存、批次、讀設定、存設定)與 register() 掛 blueprint。端點形狀照 jedi-bulletin,守門(要登入、要能力點)由主系統透過 adapters 給,套件不自己判。重點規則:別人的通知 uid 回 404 不分「不存在」與「不是你的」;必收事件的站內與 Email 不給關(回 412)。
extend(P-1 的套件):route 形狀照 jedi-bulletin api/(MethodResource+marshmallow、守門 decorator 由 adapters 給、回應走 response_builder);分頁照主系統 docs/claude/api-patterns.md(POST list 帶 page/page_size、EnvelopeSchema);settings GET 回 23 列=型錄 left join 個人設定
repo:~/Projects/Jedicogy/module/jedi-python-package
改既有:jedi-notification-center/jedi_notification_center/plugin/assembly.py(create_blueprint)
改既有:jedi-notification-center/jedi_notification_center/plugin/contract.py(CAPABILITIES 兩顆、mount_api)
改既有:jedi-notification-center/jedi_notification_center/__init__.py
新開:jedi-notification-center/jedi_notification_center/api/routes/inbox_routes.py
新開:jedi-notification-center/jedi_notification_center/api/routes/settings_routes.py
新開:jedi-notification-center/jedi_notification_center/api/serializers/
新開:jedi-notification-center/jedi_notification_center/app/service/inbox_service.py(list/recent/read/archive/batch;uid 不是本人的回 404 不分)
新開:jedi-notification-center/jedi_notification_center/app/service/settings_service.py(GET 合併預設;PUT 必收事件 inapp/email 與型錄不符回 412)
新開:jedi-notification-center/jedi_notification_center/common/error_code.py(NC_404001/NC_412001/NC_400001/NC_403001)
新開:jedi-notification-center/tests/test_api_*.py
jedi-bulletin/jedi_bulletin/api/ 形狀:MethodResource、marshmallow schema、adapters.auth_required/capability_required("notification.inbox.read") decorator、response_builder 信封。八條路徑與 body 照 design.md §5.3 的表。inbox/list 走 POST 分頁(page/page_size/state/category/keyword),回 data[]+meta;inbox/recent GET 固定 10 筆未封存。settings GET:型錄 23 列 left join 該使用者設定,沒列用 default_*;回 events[]+profile+chat_available(由 adapters 給一個 chat_available_provider,主系統查租戶有沒有設 Discord/Telegram)。PUT:全表覆寫;必收事件 inapp/email 若為 False 回 412 NC_412001;digest 值不在三個裡回 400 NC_400001。uid AND recipient_user_id=me,查無回 404 NC_404001。register(app, adapters, mount_api=True):守門四件缺一 raise,照 jedi-bulletin _assert_api_wiring。套件 tests 綠(含:未帶 token 401 不是 500;別人的 uid 404;必收事件 PUT 關 email 回 412 NC_412001;batch read_all scope=category 只標該類);harness 起來 curl 八條都回信封形狀;notification.inbox.read 在 CAPABILITIES
~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/design.md §3 決策定案、§5 詳細設計(§5.1 套件職責與 port、§5.2 資料表、§5.3 API、§5.5 前端)、§6 拆卡表本卡那列、§8 風險;討論稿(Artifact,連結在 README)只在想知道「為什麼這樣裁」時看~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/prototype/index.html(四個分頁:鈴鐺、通知中心、通知設定、系統橫幅;純畫面,只取結構與資訊順序;文案依 i18n 重寫)jedi-bulletin/jedi_bulletin/plugin/(contract/assembly/migrations)、jedi-notification/README.md;主系統接線 core/plugins/bulletin.py、core/plugins/_host.py::host_defaults、core/plugins/license.py::TenantAdminDirectory;寄信點 app/flow_engine/service/workflow_execution_service.py:1246、stage_entered_notify_service.py:117、app/task_alert/service/scan_alert_app_service.py:74;既有投遞紀錄表 infra/task_alert/model/task_alert_notification.py;鈴鐺 FE src/layout/AppTopbar.vue 484~540、TopbarStageQueue.vue;seed 先例 scripts/sql/2026-05-22-seed-oscal-ssp-roles.sql、2026-11-10-fr194-ui-routes-entry-gates.sql