运营工作区
路由:/operations。角色:独立运营人员。范围:现有辅助入口。依据:当前页面和调用组件(代码基线 67df5ab1,本轮仅修复根元素 hydration 并移除无调用旧 header 插槽)。以下数量是现有读取策略,不是实际业务记录数,也不是容量或服务承诺。
源码入口:page.tsx · notification-workspace.tsx · operations-workspace.tsx · relation-bench.tsx · selectbench-reading.tsx 。
用户任务与当前操作
作为独立运营人员,我需要处理运行问题并保留可审计证据。当前操作围绕下表的数据完成;不从旧表和旧接口的存在反推新增产品需求。页面存在不等于来源、模型、送达或长期运行已通过真实验收。
页面需要的数据
| 区域/操作 | 实际展示或输入字段 | 展示数量/读取方式 | 是否持久化及最小存储 |
|---|---|---|---|
| 健康与维护 | 组件状态、预算used/reserved/remaining/version、维护受理、字典版本 | 按当前API聚合 | 现有budget/audit/heartbeat/dictionary |
| 反馈与审计 | id/status/revision、内容/附件、操作人/原因/时间 | 反馈和审计20条/页 | operations_feedback/attachments/audit |
| 通知与评测 | 目标/启用状态、投递attempt/error;样本gold/result/版本 | 通知50条/页;评测明细50条/页 | 现有notification与selectbench记录 |
接口与业务落点
下列为本页业务读取/提交入口。全局会话、头像、站点元信息和共享组件中未在本页触发的导出函数不算新增页面能力。请求类型、响应与错误以生成客户端和后端为准。
| 页面调用 | 方法和路径 | 请求 → 响应合同 | 实现依据 |
|---|---|---|---|
getOperationsHealth | GET /api/operations/health | 无业务入参 → OperationsHealthView | 客户端 · 后端 |
getOperatorFeedbackAttachment | GET /api/operations/feedback-attachments/{attachment_id} | getOperatorFeedbackAttachmentParams → { id?: number } | 客户端 · 后端 |
getOperatorMaintenance | GET /api/operations/maintenance | 无业务入参 → MaintenanceStateView | 客户端 · 后端 |
getOperatorRelationBench | GET /api/operations/selectbench/{run_id}/relations | getOperatorRelationBenchParams → RelationBenchCasesView | 客户端 · 后端 |
getOperatorSelectBench | GET /api/operations/selectbench/{run_id} | getOperatorSelectBenchParams → SelectBenchCasesView | 客户端 · 后端 |
importOperatorRelationBench | POST /api/operations/selectbench-relations | RelationBenchImportInput → SelectBenchRunView | 客户端 · 后端 |
importOperatorSelectBench | POST /api/operations/selectbench | SelectBenchImportInput → SelectBenchRunView | 客户端 · 后端 |
listEventAttentionSources | GET /api/events/attention-sources | 无业务入参 → AttentionSourceView[] | 客户端 · 后端 |
listOperatorAudit | GET /api/operations/audit | listOperatorAuditParams → PageViewOperatorAuditView_ | 客户端 · 后端 |
listOperatorDictionaries | GET /api/operations/dictionaries | 无业务入参 → DictionaryView[] | 客户端 · 后端 |
listOperatorFeedback | GET /api/operations/feedback | listOperatorFeedbackParams → PageViewFeedbackView_ | 客户端 · 后端 |
listOperatorNotificationDeliveries | GET /api/operations/notification-deliveries | listOperatorNotificationDeliveriesParams → PageViewNotificationDeliveryView_ | 客户端 · 后端 |
listOperatorNotificationTargets | GET /api/operations/notification-targets | 无业务入参 → TargetView[] | 客户端 · 后端 |
listOperatorSelectBench | GET /api/operations/selectbench | 无业务入参 → SelectBenchRunView[] | 客户端 · 后端 |
resolveOperatorDelivery | POST /api/operations/audit/{audit_id}/resolve-delivery | resolveOperatorDeliveryParams, AuditResolutionInput → OperatorAuditView | 客户端 · 后端 |
resolveOperatorNotificationDelivery | POST /api/operations/notification-deliveries/{delivery_id}/resolve | resolveOperatorNotificationDeliveryParams, DeliveryResolutionInput → NotificationDeliveryView | 客户端 · 后端 |
runOperatorMaintenance | POST /api/operations/maintenance | MaintenanceInput → MaintenanceAcceptedView | 客户端 · 后端 |
runOperatorRelationBench | POST /api/operations/selectbench-relation-runs | RelationBenchGoldInput → SelectBenchAcceptedView | 客户端 · 后端 |
runOperatorSelectBench | POST /api/operations/selectbench-runs | SelectBenchGoldInput → SelectBenchAcceptedView | 客户端 · 后端 |
saveOperatorDictionary | PUT /api/operations/dictionaries | DictionaryInput → DictionaryView | 客户端 · 后端 |
saveOperatorNotificationTarget | PUT /api/operations/notification-targets | TargetSaveInput → TargetView | 客户端 · 后端 |
updateOperatorBudget | PUT /api/operations/budgets | BudgetUpdateInput → BudgetPolicyView | 客户端 · 后端 |
updateOperatorFeedback | PATCH /api/operations/feedback/{feedback_id} | updateOperatorFeedbackParams, FeedbackUpdateInput → FeedbackUpdateView | 客户端 · 后端 |
upsertEventAttentionSource | PUT /api/events/attention-sources | AttentionSourceInput → AttentionSourceView | 客户端 · 后端 |
数据落点:operations_process_heartbeats、operations_feedback、operations_feedback_attachments、operations_audit_operations、operations_dictionary_versions、resource_budget_policies、notification_targets、notification_deliveries。这是当前依赖定位,不代表这些表均为重新设计时必须新建;详细字段/键/关系及保留原因见页面数据库设计。
收敛与替换
这是一组维护工具,不是主阅读页面要求的全功能运营平台;保留调用,暂停扩展评测门户。
实现时先复用上述合同。确有缺口须描述具体控件、输入、输出、当前失败和最小修复,不能直接把历史扩展方案列为前置。公开分发、付费供应商、海外新来源与 Flutter 继续受冻结范围和其他生效决策约束。
验收与非功能要求
- 主路径:独立运营令牌只在内存;未知送达不能自动重发;跨账户明细拒绝。
- 数据边界:上表数量、字段和统计范围要能从响应核对;未知、未分析、无权限和真实零值不同。筛选、页签与选择不创建持久业务副本。
- 状态:有远程读取的区域分别验证正常、零数据、加载、失败和撤权;静态说明的业务空态/无权限写不适用,不伪造验收。
- 写入:有保存/运行/发布时保留可恢复输入,版本冲突先重读;请求结果未知按现有接口查询或复用原幂等键,不新增全局操作账本。
- 交互:1440px与390px下主动作可见;Tab/Enter/Escape和适用的方向键可操作,弹层关闭返回触发点。凭据只按现有认证流程传递,不进入日志/URL/本机持久存储。