AgoraIO-Extensions / AgoraIO-Extensions/agent-infra

feat(web): implement conversation timeline and execution controls

Đang mở
#192 10 bình luận 0 reaction 1 người được giao Được @LichKing-2234 nhận Xem trên GitHub
enhancement needs-triage ready-for-human
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
8 giờ 51 phút
Pull request đã merge (30 ngày)
99

Mô tả

> 本轮按 [M1 汇合计划](https://github.com/AgoraIO-Extensions/agent-infra/issues/150) 补充执行详情消费契约。保留 LichKing-2234 的既有主责及人工/本地受监督实现方式;新增契约待评估,Project 保持 Todo。实现前须完成适用文档评审与合入、依赖回读和本票执行准入;本次修订不代表开始开发。

## Problem

The Pilot needs a durable ChatGPT-style text experience that can submit Codex work, stream persisted events, recover from disconnects, control executions, and show GitHub results without exposing internal or cross-user data.

## Scope

- Implement Agent conversation entry, new/history navigation, text composer, model/reasoning selection, timeline, execution detail, and PR link/result summary.
- Implement SSE connection, event deduplication, cursor replay, reload signals, offline/reconnecting states, and persisted-history merge.
- Implement stop, supplemental instruction, regenerate, busy, retry, permission-lost, session-unavailable, and terminal states.
- Use generated contracts and schema-derived Mocks; do not implement file upload/download in Pilot.
- Ensure user/Owner projections cannot reveal other users' conversations, attachments, Runtime IDs, grants, or credentials.
- Add responsive component and browser consumer tests.

- 消费 [持久任务契约](https://github.com/AgoraIO-Extensions/agent-infra/issues/482) 与 [实际模型/工具事实](https://github.com/AgoraIO-Extensions/agent-infra/issues/483) 的同一公共 Schema、生成 Client 和受控业务事件,补齐本主体执行详情的受理、等待、执行、结果及失败原因。按实际操作/尝试显示开始、终态、已确认耗时和可得用量;缺失、未知、不支持分别显示,不用总任务耗时或模型自报内容代替调用事实。
- 等待、取消处理中、确认停止、等待到期和待核实均按服务端结果展示;保留现有 Web 补充指令/繁忙/重生成规则,不将新 Turn 插入已受理任务之前。重连、游标重放和重新加载不重复事件或尝试,也不自动重提有副作用的任务。
- 详情与已有输出按原任务主体和当前权限读取;应用责任人/Owner 不自动获得应用或其他用户的任务列表、结果和取消权。技术组件/主机定位留在运维后端;Connection 只展示获准且经核实的关联引用,外部效果在独立授权入口查询。[审计管理页](https://github.com/AgoraIO-Extensions/agent-infra/issues/484) 与 [评测和主动反馈](https://github.com/AgoraIO-Extensions/agent-infra/issues/485) 分别由原票交付;本票不生产 Runtime 事实、不实现任务调度或复制 Connection 记录。

## Acceptance criteria

- [ ] **AC-1:** Text submission and timeline render submitted/processing/streaming/terminal states without duplicate events across reconnect/reload.
- [ ] **AC-2:** Stop, supplemental, regenerate, busy, retry, permission loss, and unavailable states follow contract and never rebind a command to another Execution.
- [ ] **AC-3:** History and execution details enforce user-scoped projections and display trace/call/PR summaries without internal secrets or model thought.
- [ ] **AC-4:** Model/reasoning selection applies from the next message and handles removed/invalid options explicitly.
- [ ] **AC-5:** Desktop/mobile tests cover reconnect, reload-window expiry, cross-user denial, and long output without layout overlap.

- [ ] **AC-6:** 真实持久业务事件驱动的页面能串起受理、等待、执行、模型/工具和结果阶段,展示已确认耗时、状态、失败原因和可得用量;四模板消费同一 Schema,缺失/未知/不支持不填成成功或零值,合法新尝试与重放可区分。
- [ ] **AC-7:** 等待、取消处理中、确认停止、待核实及恢复均与原 Execution 一致;游标重放/重载不重复内容或触发任务,Web 补充指令/繁忙/重生成行为保持。查询错误明确呈现,不伪装空历史或成功。
- [ ] **AC-8:** 浏览器真实消费流程证明本主体权限、凭证失效/主体撤权后的访问收缩;Owner/责任人和资源 ID/游标替换不能越权。应用任务不自动对责任人可见,Connection 关联不泄漏外部对象存在性或绕过独立授权,业务正文不进入遥测。

## Validation

- Run focused Web reducer, SSE, generated-client, Mock scenario, accessibility, responsive, and consumer tests.
- Run the complete repository validation sequence in `AGENTS.md`.

- 先用公共 Schema fixture 验证页面状态,再接正式 API/Store/Worker/RuntimeHost 读取真实任务和调用事实;回读成功、等待、模型/工具失败、取消确认、unknown、断线/重载及四模板消费结果,Mock 或截图不能单独证明真实链路。
- 以两用户及独立应用验证任务/游标替换、Owner/责任人越权、凭证失效及主体撤权,保留本票既有移动端、无障碍和长输出回归;Connection 联合真实授权及外部操作验收仍由原 Pilot 入口交付。

## Blocked by

- #253
- #251
- #321
- #389
- #400
- #482
- #483

## Authority

- 本次新增范围按 [平台 PRD 候选 §§13–16](https://github.com/AgoraIO-Extensions/agent-infra/blob/2eb2762b889a27372c259039d27279cf646c5b1e/docs/prd/PRD-agent-platform-M1.md)、[工程 Spec 候选 §§18–19](https://github.com/AgoraIO-Extensions/agent-infra/blob/7f3b2083d44191ab4b280d7eb8222d7785937b8e/docs/architecture/SPEC-agent-infra-M1-engineering-architecture.md) 和 [Runtime HLD 候选](https://github.com/AgoraIO-Extensions/agent-infra/blob/5da6fff274ffc7a7ee36ae3ebd61d6100ccc9571/docs/architecture/HLD-agent-runtime-M1.md) 评审;实施前回读合入后的权威版本并复核差额,历史基础引用不能覆盖新增结论。

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.