|
|
@@ -176,14 +176,14 @@ Todo.Info = {
|
|
|
|
|
|
```python
|
|
|
# 主 Agent
|
|
|
-Trace(trace_id="abc123", mode="agent", task="实现用户认证")
|
|
|
+Trace(trace_id="2f8d3a1c", mode="agent", task="实现用户认证")
|
|
|
|
|
|
# Sub-Agent(并行探索)
|
|
|
-Trace(trace_id="abc123.A", parent_trace_id="abc123", agent_type="explore", task="JWT 方案")
|
|
|
-Trace(trace_id="abc123.B", parent_trace_id="abc123", agent_type="explore", task="Session 方案")
|
|
|
+Trace(trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001", parent_trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d", agent_type="explore", task="JWT 方案")
|
|
|
+Trace(trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002", parent_trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d", agent_type="explore", task="Session 方案")
|
|
|
|
|
|
# Sub-Agent(单线委托)
|
|
|
-Trace(trace_id="abc123.task1", parent_trace_id="abc123", agent_type="delegate", task="实现具体功能")
|
|
|
+Trace(trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@delegate-20260204220030-001", parent_trace_id="2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d", agent_type="delegate", task="实现具体功能")
|
|
|
```
|
|
|
|
|
|
**优点**:
|
|
|
@@ -191,7 +191,7 @@ Trace(trace_id="abc123.task1", parent_trace_id="abc123", agent_type="delegate",
|
|
|
- **ID 简洁**:每个 Trace 内部独立编号(1, 2, 3),不需要前缀
|
|
|
- **完全隔离**:每个 Trace 有独立的 GoalTree、Message List、LLM Context
|
|
|
- **自然分布式**:每个 Trace 可以独立运行、迁移、存储
|
|
|
-- **层级清晰**:从 trace_id 可以直接解析出父子关系(`abc123.A` 的父是 `abc123`)
|
|
|
+- **层级清晰**:从 trace_id 可以直接解析出父子关系(`@` 前是父 ID)
|
|
|
|
|
|
### 数据结构
|
|
|
|
|
|
@@ -212,7 +212,7 @@ class Trace:
|
|
|
|
|
|
主 Agent 和 Sub-Agent 使用相同的 Trace 结构
|
|
|
"""
|
|
|
- trace_id: str # 层级化 ID:"abc123", "abc123.A", "abc123.A.1"
|
|
|
+ trace_id: str # 主 Trace: UUID,Sub-Trace: parent@mode-timestamp-seq
|
|
|
mode: Literal["call", "agent"]
|
|
|
task: Optional[str] = None
|
|
|
|
|
|
@@ -245,21 +245,88 @@ class Trace:
|
|
|
**实现**:`agent/execution/models.py:Trace`
|
|
|
|
|
|
**Trace ID 命名规则**:
|
|
|
-- **主 Trace**:短随机 ID(如 `"abc123"`)
|
|
|
-- **Sub-Trace**:`parent_id.suffix`(如 `"abc123.A"`, `"abc123.task1"`)
|
|
|
-- **嵌套 Sub-Trace**:继续追加(如 `"abc123.A.1"`, `"abc123.A.task2"`)
|
|
|
+
|
|
|
+```
|
|
|
+主 Trace(用户直接触发):
|
|
|
+ {uuid}
|
|
|
+ 例如: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d
|
|
|
+
|
|
|
+Sub-Trace(Agent 启动的子任务):
|
|
|
+ {parent_id}@{mode}-{timestamp}-{seq}
|
|
|
+ 例如: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001
|
|
|
+ 例如: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@delegate-20260204220015-002
|
|
|
+```
|
|
|
+
|
|
|
+**格式说明**:
|
|
|
+- `parent_id`:父 Trace 的**完整 UUID**(不截断,避免冲突)
|
|
|
+- `@`:父子关系分隔符
|
|
|
+- `mode`:运行模式(`explore`, `delegate`, `compaction` 等)
|
|
|
+- `timestamp`:创建时间戳(`YYYYMMDDHHmmss`)
|
|
|
+- `seq`:同一秒内的序号(`001`, `002`, ...)
|
|
|
+
|
|
|
+**优点**:
|
|
|
+1. **零碰撞风险**:使用完整 UUID,完全避免 ID 冲突
|
|
|
+2. **可精确追溯**:从 Sub-Trace ID 直接看到完整父 Trace ID
|
|
|
+3. **无需冲突检测**:实现简单,不依赖外部状态
|
|
|
+4. **信息完整**:一眼看出触发者、模式、时间
|
|
|
+5. **层级清晰**:`@` 分隔符明确表示父子关系
|
|
|
|
|
|
**从 trace_id 解析父子关系**:
|
|
|
```python
|
|
|
def parse_parent_trace_id(trace_id: str) -> Optional[str]:
|
|
|
"""从 trace_id 解析出 parent_trace_id"""
|
|
|
- parts = trace_id.rsplit('.', 1)
|
|
|
- return parts[0] if len(parts) > 1 else None
|
|
|
+ if '@' in trace_id:
|
|
|
+ return trace_id.split('@')[0]
|
|
|
+ return None
|
|
|
+
|
|
|
+# 示例
|
|
|
+parse_parent_trace_id("2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001")
|
|
|
+# → "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d"
|
|
|
+
|
|
|
+parse_parent_trace_id("2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d")
|
|
|
+# → None
|
|
|
+```
|
|
|
+
|
|
|
+**生成 Sub-Trace ID**:
|
|
|
+```python
|
|
|
+from datetime import datetime
|
|
|
+from threading import Lock
|
|
|
+from typing import Dict
|
|
|
+
|
|
|
+# 全局计数器(线程安全)
|
|
|
+_seq_lock = Lock()
|
|
|
+_seq_counter: Dict[str, int] = {} # key: "{parent_id}@{mode}-{timestamp}"
|
|
|
+
|
|
|
+def generate_sub_trace_id(parent_id: str, mode: str) -> str:
|
|
|
+ """
|
|
|
+ 生成 Sub-Trace ID
|
|
|
+
|
|
|
+ 格式: {parent_id}@{mode}-{timestamp}-{seq}
|
|
|
+
|
|
|
+ Args:
|
|
|
+ parent_id: 父 Trace ID(完整 UUID,不截断)
|
|
|
+ mode: 运行模式(explore, delegate, compaction)
|
|
|
+
|
|
|
+ Returns:
|
|
|
+ Sub-Trace ID(完整格式,无碰撞风险)
|
|
|
+ """
|
|
|
+ # 直接使用完整 UUID,不截断
|
|
|
+ timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
|
|
|
+
|
|
|
+ # 生成序号(同一秒内递增)
|
|
|
+ prefix = f"{parent_id}@{mode}-{timestamp}"
|
|
|
+ with _seq_lock:
|
|
|
+ seq = _seq_counter.get(prefix, 0) + 1
|
|
|
+ _seq_counter[prefix] = seq
|
|
|
+
|
|
|
+ return f"{prefix}-{seq:03d}"
|
|
|
|
|
|
# 示例
|
|
|
-parse_parent_trace_id("abc123.A") # → "abc123"
|
|
|
-parse_parent_trace_id("abc123.A.1") # → "abc123.A"
|
|
|
-parse_parent_trace_id("abc123") # → None
|
|
|
+generate_sub_trace_id("2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d", "explore")
|
|
|
+# → "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001"
|
|
|
+
|
|
|
+generate_sub_trace_id("2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d", "delegate")
|
|
|
+# → "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@delegate-20260204220030-001"
|
|
|
```
|
|
|
|
|
|
#### Goal
|
|
|
@@ -336,6 +403,7 @@ class Message:
|
|
|
# 元数据
|
|
|
tokens: Optional[int] = None
|
|
|
cost: Optional[float] = None
|
|
|
+ duration_ms: Optional[int] = None
|
|
|
created_at: datetime
|
|
|
```
|
|
|
|
|
|
@@ -352,10 +420,10 @@ class Message:
|
|
|
**查询 Message**:
|
|
|
```python
|
|
|
# 查询主 Trace 的 Messages
|
|
|
-GET /api/traces/abc123/messages?goal_id=2
|
|
|
+GET /api/traces/2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d/messages?goal_id=2
|
|
|
|
|
|
# 查询 Sub-Trace 的 Messages
|
|
|
-GET /api/traces/abc123.A/messages?goal_id=1
|
|
|
+GET /api/traces/2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001/messages?goal_id=1
|
|
|
```
|
|
|
|
|
|
### 工具设计
|
|
|
@@ -837,24 +905,24 @@ ws://localhost:8000/api/traces/{trace_id}/watch?since_event_id=0
|
|
|
|
|
|
```
|
|
|
.trace/
|
|
|
-├── abc123/ # 主 Trace
|
|
|
-│ ├── meta.json # Trace 元数据
|
|
|
-│ ├── goal.json # GoalTree
|
|
|
-│ ├── messages/ # Messages
|
|
|
+├── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d/ # 主 Trace
|
|
|
+│ ├── meta.json # Trace 元数据
|
|
|
+│ ├── goal.json # GoalTree
|
|
|
+│ ├── messages/ # Messages
|
|
|
│ │ ├── {message_id}.json
|
|
|
│ │ └── ...
|
|
|
-│ └── events.jsonl # 事件流
|
|
|
+│ └── events.jsonl # 事件流
|
|
|
│
|
|
|
-├── abc123.A/ # Sub-Trace A(并行探索)
|
|
|
-│ ├── meta.json # parent_trace_id: "abc123"
|
|
|
-│ ├── goal.json # 独立的 GoalTree
|
|
|
+├── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001/ # Sub-Trace A(并行探索)
|
|
|
+│ ├── meta.json # parent_trace_id: "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d"
|
|
|
+│ ├── goal.json # 独立的 GoalTree
|
|
|
│ ├── messages/
|
|
|
│ └── events.jsonl
|
|
|
│
|
|
|
-├── abc123.B/ # Sub-Trace B(并行探索)
|
|
|
+├── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002/ # Sub-Trace B(并行探索)
|
|
|
│ └── ...
|
|
|
│
|
|
|
-└── abc123.task1/ # Sub-Trace task1(单线委托)
|
|
|
+└── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@delegate-20260204220030-001/ # Sub-Trace task1(单线委托)
|
|
|
└── ...
|
|
|
```
|
|
|
|
|
|
@@ -870,18 +938,18 @@ ws://localhost:8000/api/traces/{trace_id}/watch?since_event_id=0
|
|
|
### 场景
|
|
|
|
|
|
```
|
|
|
-主 Trace (abc123):
|
|
|
+主 Trace (2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d):
|
|
|
[1] 分析问题
|
|
|
[2] 并行探索认证方案 (type=agent_call, mode=explore)
|
|
|
- → 启动 Sub-Traces: abc123.A, abc123.B
|
|
|
+ → 启动 Sub-Traces(完整 ID)
|
|
|
[3] 完善实现
|
|
|
|
|
|
-Sub-Trace A (abc123.A):
|
|
|
+Sub-Trace A (2f8d3a1c...@explore-20260204220012-001):
|
|
|
[1] JWT 设计
|
|
|
[2] JWT 实现
|
|
|
→ 返回摘要:"JWT 方案实现完成"
|
|
|
|
|
|
-Sub-Trace B (abc123.B):
|
|
|
+Sub-Trace B (2f8d3a1c...@explore-20260204220012-002):
|
|
|
[1] Session 设计
|
|
|
[2] Session 实现
|
|
|
[3] Session 测试
|
|
|
@@ -903,7 +971,7 @@ explore 工具返回:
|
|
|
**主 Trace 的 GoalTree**:
|
|
|
|
|
|
```python
|
|
|
-# Trace: abc123
|
|
|
+# Trace: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d
|
|
|
goals = [
|
|
|
Goal(id="1", type="normal", description="分析问题"),
|
|
|
Goal(
|
|
|
@@ -911,7 +979,10 @@ goals = [
|
|
|
type="agent_call",
|
|
|
description="并行探索认证方案",
|
|
|
agent_call_mode="explore",
|
|
|
- sub_trace_ids=["abc123.A", "abc123.B"],
|
|
|
+ sub_trace_ids=[
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001",
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002"
|
|
|
+ ],
|
|
|
),
|
|
|
Goal(id="3", type="normal", description="完善实现"),
|
|
|
]
|
|
|
@@ -920,7 +991,7 @@ goals = [
|
|
|
**Sub-Trace A 的 GoalTree**(独立编号):
|
|
|
|
|
|
```python
|
|
|
-# Trace: abc123.A
|
|
|
+# Trace: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001
|
|
|
goals = [
|
|
|
Goal(id="1", type="normal", description="JWT 设计"),
|
|
|
Goal(id="2", type="normal", description="JWT 实现"),
|
|
|
@@ -930,7 +1001,7 @@ goals = [
|
|
|
**Sub-Trace B 的 GoalTree**(独立编号):
|
|
|
|
|
|
```python
|
|
|
-# Trace: abc123.B
|
|
|
+# Trace: 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002
|
|
|
goals = [
|
|
|
Goal(id="1", type="normal", description="Session 设计"),
|
|
|
Goal(id="2", type="normal", description="Session 实现"),
|
|
|
@@ -942,17 +1013,17 @@ goals = [
|
|
|
|
|
|
```
|
|
|
.trace/
|
|
|
-├── abc123/ # 主 Trace
|
|
|
+├── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d/ # 主 Trace
|
|
|
│ ├── meta.json
|
|
|
│ ├── goal.json
|
|
|
│ └── messages/
|
|
|
│
|
|
|
-├── abc123.A/ # Sub-Trace A
|
|
|
-│ ├── meta.json # parent_trace_id: "abc123", parent_goal_id: "2"
|
|
|
-│ ├── goal.json # 独立的 GoalTree
|
|
|
+├── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001/ # Sub-Trace A
|
|
|
+│ ├── meta.json # parent_trace_id: "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d"
|
|
|
+│ ├── goal.json # 独立的 GoalTree
|
|
|
│ └── messages/
|
|
|
│
|
|
|
-└── abc123.B/ # Sub-Trace B
|
|
|
+└── 2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002/ # Sub-Trace B
|
|
|
└── ...
|
|
|
```
|
|
|
|
|
|
@@ -972,7 +1043,7 @@ goals = [
|
|
|
└──→ [B:Session方案] ┘
|
|
|
```
|
|
|
|
|
|
-**继续展开分支 A 内部**(加载 Sub-Trace abc123.A 的 GoalTree):
|
|
|
+**继续展开分支 A 内部**(加载 Sub-Trace 的 GoalTree):
|
|
|
```
|
|
|
┌──→ [A.1:JWT设计] → [A.2:JWT实现] ──┐
|
|
|
[1:分析] ──→ [2] ─┤ ├──→ [3:完善]
|
|
|
@@ -980,22 +1051,23 @@ goals = [
|
|
|
```
|
|
|
|
|
|
**注意**:
|
|
|
-- `[A:JWT方案]` 是折叠视图,代表整个 Sub-Trace abc123.A
|
|
|
+- `[A:JWT方案]` 是折叠视图,代表整个 Sub-Trace
|
|
|
- `[A.1]`, `[A.2]` 是展开后显示 Sub-Trace 内部的 Goals
|
|
|
-- 前端显示为 "A.1",但后端查询是 `GET /api/traces/abc123.A/messages?goal_id=1`
|
|
|
+- 前端显示为 "A.1",但后端查询使用完整 trace_id:
|
|
|
+ `GET /api/traces/2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001/messages?goal_id=1`
|
|
|
|
|
|
### 前端 API
|
|
|
|
|
|
**REST**:返回主 Trace 的 GoalTree + Sub-Trace 列表(元数据)。
|
|
|
|
|
|
```http
|
|
|
-GET /api/traces/abc123
|
|
|
+GET /api/traces/2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d
|
|
|
```
|
|
|
|
|
|
响应:
|
|
|
```json
|
|
|
{
|
|
|
- "trace_id": "abc123",
|
|
|
+ "trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d",
|
|
|
"status": "running",
|
|
|
"goal_tree": {
|
|
|
"goals": [
|
|
|
@@ -1005,15 +1077,18 @@ GET /api/traces/abc123
|
|
|
"type": "agent_call",
|
|
|
"description": "并行探索认证方案",
|
|
|
"agent_call_mode": "explore",
|
|
|
- "sub_trace_ids": ["abc123.A", "abc123.B"]
|
|
|
+ "sub_trace_ids": [
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001",
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002"
|
|
|
+ ]
|
|
|
},
|
|
|
{"id": "3", "type": "normal", "description": "完善实现"}
|
|
|
]
|
|
|
},
|
|
|
"sub_traces": {
|
|
|
- "abc123.A": {
|
|
|
- "trace_id": "abc123.A",
|
|
|
- "parent_trace_id": "abc123",
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001": {
|
|
|
+ "trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001",
|
|
|
+ "parent_trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d",
|
|
|
"parent_goal_id": "2",
|
|
|
"agent_type": "explore",
|
|
|
"task": "JWT 方案",
|
|
|
@@ -1022,8 +1097,8 @@ GET /api/traces/abc123
|
|
|
"total_tokens": 4000,
|
|
|
"total_cost": 0.05
|
|
|
},
|
|
|
- "abc123.B": {
|
|
|
- "trace_id": "abc123.B",
|
|
|
+ "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002": {
|
|
|
+ "trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-002",
|
|
|
"agent_type": "explore",
|
|
|
"task": "Session 方案",
|
|
|
"status": "completed",
|
|
|
@@ -1036,14 +1111,14 @@ GET /api/traces/abc123
|
|
|
**按需加载 Sub-Trace 详情**:
|
|
|
|
|
|
```http
|
|
|
-GET /api/traces/abc123.A
|
|
|
+GET /api/traces/2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001
|
|
|
```
|
|
|
|
|
|
响应:
|
|
|
```json
|
|
|
{
|
|
|
- "trace_id": "abc123.A",
|
|
|
- "parent_trace_id": "abc123",
|
|
|
+ "trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d@explore-20260204220012-001",
|
|
|
+ "parent_trace_id": "2f8d3a1c-4b6e-4f9a-8c2d-1e5b7a9f3c4d",
|
|
|
"parent_goal_id": "2",
|
|
|
"agent_type": "explore",
|
|
|
"task": "JWT 方案",
|
|
|
@@ -1090,9 +1165,8 @@ async def explore_tool(branches: List[str]) -> str:
|
|
|
# 2. 创建多个 Sub-Traces
|
|
|
sub_traces = []
|
|
|
for i, desc in enumerate(branches):
|
|
|
- suffix = chr(ord('A') + i)
|
|
|
sub_trace = Trace.create(
|
|
|
- trace_id=f"{current_trace_id}.{suffix}",
|
|
|
+ trace_id=generate_sub_trace_id(current_trace_id, "explore"),
|
|
|
parent_trace_id=current_trace_id,
|
|
|
parent_goal_id=current_goal_id,
|
|
|
agent_type="explore",
|
|
|
@@ -1115,10 +1189,10 @@ async def explore_tool(branches: List[str]) -> str:
|
|
|
```markdown
|
|
|
## 探索结果
|
|
|
|
|
|
-### 方案 A (abc123.A): JWT 方案
|
|
|
+### 方案 A: JWT 方案
|
|
|
实现完成。优点:无状态,易扩展。缺点:token 较大,无法主动失效。
|
|
|
|
|
|
-### 方案 B (abc123.B): Session 方案
|
|
|
+### 方案 B: Session 方案
|
|
|
实现完成。优点:token 小,可主动失效。缺点:需要 Redis 存储。
|
|
|
|
|
|
---
|
|
|
@@ -1157,14 +1231,15 @@ Sub-Trace 完成后的压缩策略:
|
|
|
|
|
|
| 功能 | 文件路径 | 状态 |
|
|
|
|------|---------|------|
|
|
|
-| Trace 数据模型 | `agent/execution/models.py` | 待调整(增加父子关系、context) |
|
|
|
-| Goal 数据模型 | `agent/goal/models.py` | 待调整(简化,移除 branch_id) |
|
|
|
+| Trace 数据模型 | `agent/execution/models.py` | 待调整(增加父子关系、移除 branch_id) |
|
|
|
+| Goal 数据模型 | `agent/goal/models.py` | 待调整(移除 branch_id、BranchContext) |
|
|
|
+| Trace ID 生成 | `agent/execution/trace_id.py` | 待实现(generate_sub_trace_id) |
|
|
|
| goal 工具 | `agent/goal/tool.py` | 待调整 |
|
|
|
| explore 工具 | `agent/goal/explore.py` | 待实现 |
|
|
|
| delegate 工具 | `agent/goal/delegate.py` | 待实现 |
|
|
|
-| Trace ID 生成 | `agent/execution/trace_id.py` | 待实现 |
|
|
|
| Context 压缩 | `agent/goal/compaction.py` | 待调整 |
|
|
|
-| TraceStore 协议 | `agent/execution/protocols.py` | 待调整(支持嵌套 Trace) |
|
|
|
+| TraceStore 协议 | `agent/execution/protocols.py` | 待调整(移除 branch 相关接口) |
|
|
|
+| FileSystem Store | `agent/execution/fs_store.py` | 待调整(移除 branches/ 目录) |
|
|
|
| DAG 可视化 API | `agent/execution/api.py` | 待调整(支持 Sub-Trace) |
|
|
|
| WebSocket 推送 | `agent/execution/websocket.py` | 待调整(统一事件格式) |
|
|
|
| Plan 注入 | `agent/core/runner.py` | 待调整 |
|