ai-agentmanager 1.70.0 → 1.70.1
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/public/app.js +2 -2
- package/public/groups.js +10 -1
- package/src/manager.js +5 -2
- package/src/server.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.70.1 (2026-11-24)
|
|
4
|
+
|
|
5
|
+
- **Split screen: a view no longer starts following itself.** The daemon sent a new terminal size back to every view, including the one that set it. When that view fitted itself twice in a row, the first size came back after the second, was taken for another view's, and the view shrank to follow it. The daemon no longer sends a view its own size, and a view ignores a size it sent a moment ago. Found from the sizes the split screen test now reports when it fails.
|
|
6
|
+
|
|
3
7
|
## 1.70.0 (2026-11-24)
|
|
4
8
|
|
|
5
9
|
- **Production signal: incidents from your monitoring tool.** Any tool, a script or you can report an incident (`agentmgr quality incident "<title>"`, or `POST /api/quality/incident`). It is linked to the merged pull request it belongs to: the one it names, the one that merged as the commit it was seen on, or the latest that changed a file in its stack trace. That pull request then shows **Incident in production** and counts as one that did not hold up in Quality, the track record and the weekly summary. The same id is counted once. An agent cannot report one.
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -29,7 +29,7 @@ import { initSupport } from '/support.js';
|
|
|
29
29
|
import { initCode } from '/code.js';
|
|
30
30
|
import { initMachine } from '/machine.js';
|
|
31
31
|
import { initWatch } from '/watch.js';
|
|
32
|
-
import { initGroups, followSize, scaleToFit, leadSize, ownFont, newFont } from '/groups.js';
|
|
32
|
+
import { initGroups, followSize, scaleToFit, leadSize, ownFont, newFont, sentSize } from '/groups.js';
|
|
33
33
|
import { termFont } from '/termfont.js';
|
|
34
34
|
import { initTopNav } from '/topnav.js';
|
|
35
35
|
import { initStandup } from '/standup.js';
|
|
@@ -2905,7 +2905,7 @@ const term = {
|
|
|
2905
2905
|
this.send({ t: 'i', d });
|
|
2906
2906
|
});
|
|
2907
2907
|
// Shown in a split-screen group too (or another window): the view typed in sets the size.
|
|
2908
|
-
this.xterm.onResize(({ cols, rows }) => !this.follow && this.send({ t: 'r', cols, rows }));
|
|
2908
|
+
this.xterm.onResize(({ cols, rows }) => !this.follow && (sentSize(this, cols, rows), this.send({ t: 'r', cols, rows })));
|
|
2909
2909
|
new ResizeObserver(() => (this.follow ? scaleToFit(this, $('#terminal')) : this.refit())).observe($('#terminal'));
|
|
2910
2910
|
window.addEventListener('agentmgr-termfont', () => newFont(this, () => this.refit(), $('#terminal')));
|
|
2911
2911
|
touchScroll($('#terminal'), this.xterm);
|
package/public/groups.js
CHANGED
|
@@ -20,9 +20,17 @@ const isShell = (k) => /^shell(:\d+)?$/.test(k ?? '');
|
|
|
20
20
|
// click sets the session's size; the others show it at that size, the font scaled to fit, until
|
|
21
21
|
// you type in or click one of them (a view made much smaller says so). `v` is { xterm, follow }.
|
|
22
22
|
|
|
23
|
+
/** This view sent the session a size (it leads): kept briefly, so its own size coming back is not taken for another view's. */
|
|
24
|
+
export function sentSize(v, cols, rows) {
|
|
25
|
+
const t = Date.now();
|
|
26
|
+
v.sentSizes = [...(v.sentSizes ?? []).filter((x) => t - x.at < 3000), { cols, rows, at: t }];
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
/** Another view resized the session: show it at that size. */
|
|
24
30
|
export function followSize(v, cols, rows, box) {
|
|
25
31
|
if (!(cols > 0 && rows > 0) || (cols === v.xterm.cols && rows === v.xterm.rows)) return;
|
|
32
|
+
// A size this view sent a moment ago, coming back after it fitted again: not another view's.
|
|
33
|
+
if (!v.follow && (v.sentSizes ?? []).some((x) => x.cols === cols && x.rows === rows && Date.now() - x.at < 3000)) return;
|
|
26
34
|
v.follow = true;
|
|
27
35
|
v.xterm.resize(cols, rows);
|
|
28
36
|
fitSoon(v, box);
|
|
@@ -71,6 +79,7 @@ export function leadSize(v, fit, send) {
|
|
|
71
79
|
try {
|
|
72
80
|
fit();
|
|
73
81
|
} catch {}
|
|
82
|
+
sentSize(v, v.xterm.cols, v.xterm.rows);
|
|
74
83
|
send({ t: 'r', cols: v.xterm.cols, rows: v.xterm.rows });
|
|
75
84
|
}
|
|
76
85
|
|
|
@@ -130,7 +139,7 @@ export function initGroups({ $, esc, agents, Terminal, FitAddon, openStream, api
|
|
|
130
139
|
lead(p);
|
|
131
140
|
p.conn?.send({ t: 'i', d });
|
|
132
141
|
});
|
|
133
|
-
xterm.onResize(({ cols, rows }) => !p.follow && p.conn?.send({ t: 'r', cols, rows }));
|
|
142
|
+
xterm.onResize(({ cols, rows }) => !p.follow && (sentSize(p, cols, rows), p.conn?.send({ t: 'r', cols, rows })));
|
|
134
143
|
new ResizeObserver(() => (p.follow ? scaleToFit(p, el.querySelector('.gterm')) : refit(p))).observe(el.querySelector('.gterm'));
|
|
135
144
|
panes.set(id, p);
|
|
136
145
|
if (show.agentId) load(id, show.agentId, show.kind);
|
package/src/manager.js
CHANGED
|
@@ -2087,7 +2087,8 @@ export class AgentManager extends EventEmitter {
|
|
|
2087
2087
|
this.termRuntime(id, kind)?.pty?.write(data);
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
|
-
|
|
2090
|
+
/** Resize a session. `from`: the viewer that asked, which is not sent its own size back. */
|
|
2091
|
+
resize(id, cols, rows, kind = 'claude', from = null) {
|
|
2091
2092
|
const rt = this.termRuntime(id, kind);
|
|
2092
2093
|
if (!rt || !(cols > 0 && rows > 0)) return;
|
|
2093
2094
|
const changed = rt.cols !== cols || rt.rows !== rows;
|
|
@@ -2097,7 +2098,9 @@ export class AgentManager extends EventEmitter {
|
|
|
2097
2098
|
rt.pty?.resize(cols, rows);
|
|
2098
2099
|
} catch {}
|
|
2099
2100
|
// Viewers that don't size the session follow it.
|
|
2100
|
-
|
|
2101
|
+
// (Sent back to the one that asked, a size it has since replaced with a newer one would make it
|
|
2102
|
+
// follow itself.)
|
|
2103
|
+
if (changed) for (const c of rt.clients ?? []) if (c !== from) c.send({ t: 'size', cols, rows });
|
|
2101
2104
|
}
|
|
2102
2105
|
|
|
2103
2106
|
// ------------------------------------------------------- ancillary shells
|
package/src/server.js
CHANGED
|
@@ -2089,7 +2089,7 @@ export async function startServer({ port = PORT, host = HOST, evalTimer = true }
|
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
2091
|
if (msg.t === 'i' && typeof msg.d === 'string') manager.write(agent.id, msg.d, kind);
|
|
2092
|
-
else if (msg.t === 'r') manager.resize(agent.id, msg.cols | 0, msg.rows | 0, kind);
|
|
2092
|
+
else if (msg.t === 'r') manager.resize(agent.id, msg.cols | 0, msg.rows | 0, kind, client);
|
|
2093
2093
|
});
|
|
2094
2094
|
ws.on('close', () => session.detach());
|
|
2095
2095
|
} catch (err) {
|