teapot-coding-agent 0.37.134 → 0.37.136
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/dist/agent/agent.js +8 -0
- package/dist/server/terminals.js +18 -1
- package/package.json +1 -1
- package/public/assets/{index-DiDP9fbL.js → index-CRPEYcra.js} +41 -41
- package/public/assets/index-CRPEYcra.js.map +1 -0
- package/public/index.html +1 -1
- package/public/assets/index-DiDP9fbL.js.map +0 -1
package/dist/agent/agent.js
CHANGED
|
@@ -2219,6 +2219,14 @@ export class Agent {
|
|
|
2219
2219
|
this.contextClaimNudges = 0;
|
|
2220
2220
|
this.blockerAsks = 0;
|
|
2221
2221
|
this.reportedNudges = 0;
|
|
2222
|
+
/**
|
|
2223
|
+
* `reportedThisRound` deliberately SURVIVES work done after the report.
|
|
2224
|
+
*
|
|
2225
|
+
* Measured in prismrv-2 (events 1077→1087): `report_progress`, one `bash git status`, then a summary of the
|
|
2226
|
+
* finished work — and the operator's verdict on narrowing the rule to "only a stop immediately after the
|
|
2227
|
+
* report" was "これ緩めないほうがいいかも / このパターンは結構ある". A report followed by a little tidying and a
|
|
2228
|
+
* summary IS the shape that will be answered, and it is answered once per round.
|
|
2229
|
+
*/
|
|
2222
2230
|
}
|
|
2223
2231
|
this.messages.push(m);
|
|
2224
2232
|
this.turnsSinceProgress++;
|
package/dist/server/terminals.js
CHANGED
|
@@ -32,6 +32,23 @@ function append(t, chunk) {
|
|
|
32
32
|
if (t.buffer.length > BUFFER_BYTES)
|
|
33
33
|
t.buffer = t.buffer.slice(-BUFFER_BYTES);
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The environment a pty child gets.
|
|
37
|
+
*
|
|
38
|
+
* It used to carry `COLUMNS=100`/`LINES=30`, frozen at spawn. ncurses honours those variables OVER the terminal's
|
|
39
|
+
* real size (`use_env(TRUE)` is its default), so a full-screen ncurses program — `nano` — ignored every resize while
|
|
40
|
+
* a non-ncurses pager (`less`) followed the ioctl and worked. That is exactly the report: "lessで高さ調整が効いてるけど
|
|
41
|
+
* nanoでは効いてません" (#172).
|
|
42
|
+
*
|
|
43
|
+
* The pty's size is authoritative and is applied with TIOCSWINSZ on attach and on every resize, so the environment must
|
|
44
|
+
* not carry a competing copy of it.
|
|
45
|
+
*/
|
|
46
|
+
export function terminalEnv(base) {
|
|
47
|
+
const env = { ...base, TERM: "xterm-256color" };
|
|
48
|
+
delete env.COLUMNS;
|
|
49
|
+
delete env.LINES;
|
|
50
|
+
return env;
|
|
51
|
+
}
|
|
35
52
|
export function createTerminal(agentId, workspace, title) {
|
|
36
53
|
const live = [...terms.values()].filter((t) => t.agentId === agentId && !t.exited);
|
|
37
54
|
if (live.length >= MAX_PER_AGENT) {
|
|
@@ -39,7 +56,7 @@ export function createTerminal(agentId, workspace, title) {
|
|
|
39
56
|
}
|
|
40
57
|
const shell = terminalShellFor(process.platform, process.env);
|
|
41
58
|
const hasScript = process.platform !== "win32" && existsSync("/usr/bin/script");
|
|
42
|
-
const env =
|
|
59
|
+
const env = terminalEnv(process.env);
|
|
43
60
|
const child = hasScript
|
|
44
61
|
? spawn("script", ["-qec", shell, "/dev/null"], { cwd: workspace, env, detached: true })
|
|
45
62
|
: spawn(shell, [], { cwd: workspace, env: { ...env, TERM: "dumb" }, detached: true });
|