agentp 0.5.0 → 0.6.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 CHANGED
@@ -109,6 +109,8 @@ These endpoints are consumed but not documented elsewhere in the repo:
109
109
  - Fix: /sessions switch and /sessions new call selectSession (TUI navigation doesn't work — see With Issues)
110
110
  - Fix: active session highlighted with ▶ bullet in session list
111
111
  - Message splitting (>4096 chars, breaks at newlines)
112
+ - Fix: tuiPaneId detects 'bun' (opencode 1.15.x) in addition to 'node'
113
+ - Fix: URL polling in ocmux doNew takes last match, not first (more robust with bun startup)
112
114
  - lib/ocmux.js shared session discovery, refactor ocmux + tgagentp
113
115
  - /cancel with true server-side SSE abort via cancelRef
114
116
  - /shutdown (--dev mode) with Telegram offset acknowledgment
package/bin/ocmux CHANGED
@@ -346,13 +346,15 @@ function doNew(targetDir, longMode) {
346
346
  tmux(['send-keys', '-t', `${SESSION}:${winIdx}.0`,
347
347
  `opencode serve --port 0 2>&1 | tee '${lf}'`, 'Enter']);
348
348
 
349
- // Wait up to 10s for the URL in the logfile
349
+ // Wait up to 10s for the URL in the logfile.
350
+ // Don't break on first match — keep polling so url ends up holding the
351
+ // final URL in case the server prints multiple URLs during startup.
350
352
  let url = null;
351
353
  for (let i = 0; i < 50; i++) {
352
354
  sleep(0.2);
353
355
  const log = (() => { try { return fs.readFileSync(lf, 'utf8'); } catch { return ''; } })();
354
356
  const m = log.match(URL_RE);
355
- if (m) { url = m[1]; break; }
357
+ if (m) url = m[1];
356
358
  }
357
359
 
358
360
  if (!url) {
package/lib/ocmux.js CHANGED
@@ -27,11 +27,12 @@ function statefileFor(dir) {
27
27
  }
28
28
 
29
29
  function tuiPaneId(windowIndex) {
30
- const r = _tmux(['list-panes', '-t', `${SESSION}:${windowIndex}`, '-F', '#{pane_id}\t#{pane_current_command}']);
30
+ const r = _tmux(['list-panes', '-t', `${SESSION}:${windowIndex}`, '-F', '#{pane_id}\t#{pane_index}']);
31
31
  if (r.status !== 0) return null;
32
32
  for (const line of r.stdout.trim().split('\n').filter(Boolean)) {
33
- const [paneId, cmd] = line.split('\t');
34
- if (cmd === 'node') return paneId;
33
+ const [paneId, idx] = line.split('\t');
34
+ // Server is always pane 0, TUI is pane 1+
35
+ if (idx !== '0') return paneId;
35
36
  }
36
37
  return null;
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentp",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Pipe prompts into a running OpenCode TUI session and stream the final answer",
5
5
  "bin": {
6
6
  "agentp": "bin/agentp",