19 lines
557 B
Markdown
19 lines
557 B
Markdown
# 架构
|
|
|
|
```mermaid
|
|
sequenceDiagram
|
|
participant U as assistant-ui
|
|
participant H as Fastify/Harness
|
|
participant P as Pi AgentSession
|
|
U->>H: POST message (202)
|
|
H->>P: prompt(text,{images})
|
|
P-->>H: session events
|
|
H-->>U: ordered SSE events
|
|
P->>H: save_report_draft
|
|
H-->>U: approval.required
|
|
U->>H: approve/deny
|
|
H-->>P: resume/block
|
|
```
|
|
|
|
`packages/shared` 是无 Node 依赖协议;`packages/harness` 是无 React/Fastify 的核心;Fastify 只组合协议;Web 的 Store reducer 按 sequence 投影消息、Run、Tool 与 Approval。
|