agentp 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +45 -16
- package/CHANGELOG.md +10 -0
- package/README.md +65 -10
- package/bin/agentp +142 -28
- package/bin/ocmux +24 -6
- package/bin/tgagentp +364 -125
- package/debugging_tg_integration.md +5594 -0
- package/lib/opencode.js +55 -12
- package/package.json +1 -1
- package/tgagentp.log +2156 -0
- package/status_report.md +0 -85
package/status_report.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Project Status Report — June 2026
|
|
2
|
-
|
|
3
|
-
## Environment
|
|
4
|
-
|
|
5
|
-
- **Node.js:** v22.12.0
|
|
6
|
-
- **opencode:** v1.15.13 (compiled ELF binary, bun-based)
|
|
7
|
-
- **Package:** agentp v0.6.0 (just published)
|
|
8
|
-
- **Branch structure (local):**
|
|
9
|
-
- `main` — v0.6.0, published, contains all ocmux fixes
|
|
10
|
-
- `pr-2` — worktree at `wt/pr-2/`, same as main + minor divergence
|
|
11
|
-
- `feature/tgagentp-session-init` — branch with WIP session discovery work (based on old v0.5.0, needs rebase onto main)
|
|
12
|
-
|
|
13
|
-
## What's Fixed (v0.6.0)
|
|
14
|
-
|
|
15
|
-
- **tuiPaneId** rewritten to use pane index (server=0, TUI=1+) instead of process name — works with any runtime (node, bun, compiled binary)
|
|
16
|
-
- **URL polling** in `doNew()` takes the last match instead of the first — more robust with bun startup
|
|
17
|
-
- **agentp freeze** confirmed resolved — the 401/event stream issue was caused by stale opencode 0.14.39 session, not a code bug
|
|
18
|
-
|
|
19
|
-
## Known Issues (unsolved)
|
|
20
|
-
|
|
21
|
-
### 1. Session initialization — startup / server switch
|
|
22
|
-
- **Branch:** `feature/tgagentp-session-init` (1 commit, needs rebase)
|
|
23
|
-
- **Problem:** On fresh tgagentp start or `/servers switch`, `activeSessionId` is `null`. The user must manually do `/sessions switch` or `/sessions new` before session-aware messaging works.
|
|
24
|
-
- **WIP fix:** `discoverActiveSession()` helper — calls `listSessions`, sorts by `time.updated`, picks most recent. Called at startup (async `.then()`) and in `setServer()` (awaited). But startup greeting may fire before discovery completes, showing "Session: *none (TUI+SSE)*".
|
|
25
|
-
- **Next step:** Rebase branch onto main, tune timing (await discovery before greeting, or delay greeting).
|
|
26
|
-
|
|
27
|
-
### 2. /status shows session ID instead of name
|
|
28
|
-
- `/status` displays raw `ses_xxxxx` ID. Would be user-friendly to show the session title/slug (available from `listSessions`).
|
|
29
|
-
- **Fix approach:** Either fetch session name on `/status` (adds latency), or cache discovered session names.
|
|
30
|
-
|
|
31
|
-
### 3. /status shows "Agent: *default*" instead of actual agent name
|
|
32
|
-
- `activeAgentName` is never initialized on startup. The TUI has an active agent but tgagentp doesn't discover it.
|
|
33
|
-
- **Fix:** Could extend `discoverActiveSession()` to also fetch the session's agent, or query `GET /agent` for the default agent on startup.
|
|
34
|
-
|
|
35
|
-
### 4. /servers list — no active server marker
|
|
36
|
-
- Unlike `/sessions` (which marks active session with ▶), `/servers` doesn't highlight the currently selected server.
|
|
37
|
-
- **Fix:** Simple — compare each server URL against `serverBase` and prepend a bullet.
|
|
38
|
-
|
|
39
|
-
### 5. TUI navigation on session switch
|
|
40
|
-
- `/sessions switch` and `/sessions new` call `selectSession()` which tries `POST /session/:id/select` and `POST /tui/select-session`. Neither navigates the TUI pane. Message routing works correctly in background.
|
|
41
|
-
- **Status:** Known limitation — documented in AGENTS.md "With Issues." The underlying opencode API may lack the needed TUI navigation endpoints. Revisit after opencode 1.15.x API audit.
|
|
42
|
-
|
|
43
|
-
### 6. AGENTS.md docs need updating
|
|
44
|
-
- `tuiPaneId` doc still says "returns pane ID if TUI process (`node`) is running" — now uses pane index, not process name.
|
|
45
|
-
- Session discovery feature (once merged) needs documenting.
|
|
46
|
-
|
|
47
|
-
### 7. --print-logs request (low priority)
|
|
48
|
-
- User requested a `--print-logs` option for the server startup command in ocmux to aid debugging.
|
|
49
|
-
- The log file is at `/tmp/opencode-serve-<hashDir(dir)>.log` and is already captured via `tee`. Could add a flag to tail it.
|
|
50
|
-
|
|
51
|
-
## Session discovery (feature branch details)
|
|
52
|
-
|
|
53
|
-
Branch `feature/tgagentp-session-init` contains 1 commit (`6393a8f`):
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
WIP: session discovery, initialization improvements, known issues
|
|
57
|
-
- Added discoverActiveSession() helper
|
|
58
|
-
- setServer() made async
|
|
59
|
-
- Startup greeting uses st.activeSessionId
|
|
60
|
-
|
|
61
|
-
Known issues (at time of writing, with opencode v1.14.39):
|
|
62
|
-
1. Startup greeting shows "Session: *none*" due to async race
|
|
63
|
-
2. /status shows session ID not name
|
|
64
|
-
3. /status shows "Agent: *default*"
|
|
65
|
-
4. /servers list no active marker
|
|
66
|
-
5. /servers switch doesn't switch tmux window (now partially fixed in v0.6.0)
|
|
67
|
-
6. /sessions switch doesn't navigate TUI
|
|
68
|
-
7. ocmux misbehaved with opencode >= 1.15.x (now fixed in v0.6.0)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Files changed:** `bin/tgagentp`, `AGENTS.md` (+34/-5 lines)
|
|
72
|
-
|
|
73
|
-
The branch needs to be rebased onto main (v0.6.0) before further work.
|
|
74
|
-
|
|
75
|
-
## Next Steps
|
|
76
|
-
|
|
77
|
-
1. Rebase `feature/tgagentp-session-init` onto main
|
|
78
|
-
2. Continue on that branch:
|
|
79
|
-
a. Fix startup greeting race (await discovery before sending)
|
|
80
|
-
b. Add session name resolution for /status
|
|
81
|
-
c. Add agent discovery for /status
|
|
82
|
-
d. Add active server marker in /servers
|
|
83
|
-
e. Revisit TUI navigation after opencode API audit
|
|
84
|
-
3. Merge back into main when ready
|
|
85
|
-
4. Clean up: remove `pr-2` worktree and branch
|