Skip to content

Commit e70ca72

Browse files
authored
Merge pull request #11 from AgentWorkforce/external-logs-for-sdk
fix for sdk logs and bump packages
2 parents 187213a + 19a8495 commit e70ca72

8 files changed

Lines changed: 667 additions & 121 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"id": "traj_zsduygra9rpy",
3+
"version": 1,
4+
"task": {
5+
"title": "Fix external worker logs visibility in dashboard",
6+
"source": {
7+
"system": "plain",
8+
"id": "external-worker-logs"
9+
}
10+
},
11+
"status": "completed",
12+
"startedAt": "2026-01-29T21:31:14.998Z",
13+
"agents": [
14+
{
15+
"name": "khaliqgant",
16+
"role": "lead",
17+
"joinedAt": "2026-01-29T21:31:14.999Z"
18+
}
19+
],
20+
"chapters": [
21+
{
22+
"id": "chap_2en9c2md03sj",
23+
"title": "Work",
24+
"agentName": "default",
25+
"startedAt": "2026-01-29T21:31:22.210Z",
26+
"events": [
27+
{
28+
"ts": 1769722282211,
29+
"type": "decision",
30+
"content": "Check workers.json for external workers to set isSpawned flag: Check workers.json for external workers to set isSpawned flag",
31+
"raw": {
32+
"question": "Check workers.json for external workers to set isSpawned flag",
33+
"chosen": "Check workers.json for external workers to set isSpawned flag",
34+
"alternatives": [],
35+
"reasoning": "Dashboard spawner only tracks workers it spawned. External spawners (agentswarm, SDK) write to workers.json with logFile paths. By checking workers.json, we can identify these and show the log button."
36+
},
37+
"significance": "high"
38+
},
39+
{
40+
"ts": 1769722289417,
41+
"type": "decision",
42+
"content": "Read logs from external worker log files with file watching: Read logs from external worker log files with file watching",
43+
"raw": {
44+
"question": "Read logs from external worker log files with file watching",
45+
"chosen": "Read logs from external worker log files with file watching",
46+
"alternatives": [],
47+
"reasoning": "External workers have log files in worker-logs/ directory. Instead of saying PTY output not available, read from these files and watch for changes to stream live updates."
48+
},
49+
"significance": "high"
50+
}
51+
],
52+
"endedAt": "2026-01-29T21:32:33.124Z"
53+
}
54+
],
55+
"commits": [],
56+
"filesChanged": [],
57+
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay-dashboard",
58+
"tags": [],
59+
"completedAt": "2026-01-29T21:32:33.124Z",
60+
"retrospective": {
61+
"summary": "Fixed external worker logs visibility: 1) Dashboard now checks workers.json to detect externally-spawned workers and sets isSpawned=true so log button appears, 2) Added fallback to read logs from worker log files when agent not in dashboard spawner, 3) Added file watching for live log streaming, 4) Added 12 unit tests covering detection, reading, and flag logic",
62+
"approach": "Standard approach",
63+
"confidence": 0.85
64+
}
65+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Trajectory: Fix external worker logs visibility in dashboard
2+
3+
> **Status:** ✅ Completed
4+
> **Task:** external-worker-logs
5+
> **Confidence:** 85%
6+
> **Started:** January 29, 2026 at 10:31 PM
7+
> **Completed:** January 29, 2026 at 10:32 PM
8+
9+
---
10+
11+
## Summary
12+
13+
Fixed external worker logs visibility: 1) Dashboard now checks workers.json to detect externally-spawned workers and sets isSpawned=true so log button appears, 2) Added fallback to read logs from worker log files when agent not in dashboard spawner, 3) Added file watching for live log streaming, 4) Added 12 unit tests covering detection, reading, and flag logic
14+
15+
**Approach:** Standard approach
16+
17+
---
18+
19+
## Key Decisions
20+
21+
### Check workers.json for external workers to set isSpawned flag
22+
- **Chose:** Check workers.json for external workers to set isSpawned flag
23+
- **Reasoning:** Dashboard spawner only tracks workers it spawned. External spawners (agentswarm, SDK) write to workers.json with logFile paths. By checking workers.json, we can identify these and show the log button.
24+
25+
### Read logs from external worker log files with file watching
26+
- **Chose:** Read logs from external worker log files with file watching
27+
- **Reasoning:** External workers have log files in worker-logs/ directory. Instead of saying PTY output not available, read from these files and watch for changes to stream live updates.
28+
29+
---
30+
31+
## Chapters
32+
33+
### 1. Work
34+
*Agent: default*
35+
36+
- Check workers.json for external workers to set isSpawned flag: Check workers.json for external workers to set isSpawned flag
37+
- Read logs from external worker log files with file watching: Read logs from external worker log files with file watching

.trajectories/index.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 1,
3-
"lastUpdated": "2026-01-29T09:46:23.022Z",
3+
"lastUpdated": "2026-01-29T21:32:33.139Z",
44
"trajectories": {
55
"traj_3q3jtxrg7enr": {
66
"title": "Refactor channel system: remove legacy general broadcast, make Activity feed show events only, #general is real channel",
@@ -29,6 +29,13 @@
2929
"startedAt": "2026-01-29T09:36:20.246Z",
3030
"completedAt": "2026-01-29T09:46:22.998Z",
3131
"path": "/Users/khaliqgant/Projects/agent-workforce/relay-dashboard/.trajectories/completed/2026-01/traj_t33n3484s84i.json"
32+
},
33+
"traj_zsduygra9rpy": {
34+
"title": "Fix external worker logs visibility in dashboard",
35+
"status": "completed",
36+
"startedAt": "2026-01-29T21:31:14.998Z",
37+
"completedAt": "2026-01-29T21:32:33.124Z",
38+
"path": "/Users/khaliqgant/Projects/agent-workforce/relay-dashboard/.trajectories/completed/2026-01/traj_zsduygra9rpy.json"
3239
}
3340
}
3441
}

0 commit comments

Comments
 (0)