Initial Daily Campaign Agent release
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# 架构与数据流
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
subgraph Browser
|
||||
C[assistant-ui Composer]
|
||||
T[Thread + Toolkit Tool UI]
|
||||
E[Event Timeline]
|
||||
S[HarnessClientStore]
|
||||
C --> S
|
||||
S --> T
|
||||
S --> E
|
||||
end
|
||||
subgraph Server
|
||||
F[Fastify API]
|
||||
R[SessionRegistry]
|
||||
ES[Memory EventStore]
|
||||
AB[ApprovalBroker]
|
||||
AS[AttachmentStore]
|
||||
MS[ModelConnectionStore]
|
||||
P[Pi AgentSession]
|
||||
RL[DefaultResourceLoader]
|
||||
SW[SafeWorkspace]
|
||||
F --> R --> P
|
||||
R --> ES
|
||||
R --> AB
|
||||
R --> AS
|
||||
R --> MS
|
||||
P --> RL
|
||||
P --> SW
|
||||
end
|
||||
S -->|JSON / multipart| F
|
||||
ES -->|SSE sequence| S
|
||||
```
|
||||
|
||||
每个 Web Session 有随机 ID、独立 cwd、SessionManager、事件 sequence、运行锁、AbortController、Approval、Attachment 和 ModelRuntime。Fastify 只解析协议、组合依赖并序列化错误;核心状态在 interface + memory implementation 中。
|
||||
|
||||
消息 POST 先完成模型/附件/并发校验,接受后立即返回 `202 runId`。后台 `prompt()` 的流式 Pi Event 经单一 adapter 映射为 HarnessEvent。SSE reducer 按 sequence/eventId 去重;assistant-ui External Store 只投影 reducer 结果。
|
||||
|
||||
Tool 先经过 Pi extension `tool_call`。只读工具做 workspace/Skill canonical path preflight;保存工具等待服务器 ApprovalBroker。Tool 未通过 preflight 时永不执行。
|
||||
Reference in New Issue
Block a user