@cueloop/client 0.1.0-alpha.111 → 0.1.0-alpha.112
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueloop/client",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.112",
|
|
4
4
|
"description": "The cueloop review UI: projection renderer, keyboard grammar, review rail",
|
|
5
5
|
"homepage": "https://github.com/mmurakaru/cueloop#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cueloop/daemon": "0.1.0-alpha.
|
|
31
|
-
"@cueloop/extension-api": "0.1.0-alpha.
|
|
32
|
-
"@cueloop/integration-obsidian": "0.1.0-alpha.
|
|
33
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
30
|
+
"@cueloop/daemon": "0.1.0-alpha.112",
|
|
31
|
+
"@cueloop/extension-api": "0.1.0-alpha.112",
|
|
32
|
+
"@cueloop/integration-obsidian": "0.1.0-alpha.112",
|
|
33
|
+
"@cueloop/schema": "0.1.0-alpha.112",
|
|
34
34
|
"@opentui/core": "^0.6.8",
|
|
35
35
|
"@opentui/keymap": "0.6.8",
|
|
36
36
|
"@opentui/react": "^0.6.8",
|
package/src/terminal/pty.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface PtyForkOptions {
|
|
|
27
27
|
rows?: number;
|
|
28
28
|
cwd?: string;
|
|
29
29
|
env?: Record<string, string>;
|
|
30
|
+
readPollMaxMs?: number;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export interface ExitEvent {
|
|
@@ -127,6 +128,7 @@ class Pty implements IPty {
|
|
|
127
128
|
private processId: number;
|
|
128
129
|
private columns: number;
|
|
129
130
|
private rowCount: number;
|
|
131
|
+
private readonly readPollMaxMs: number;
|
|
130
132
|
private closing = false;
|
|
131
133
|
private reading = false;
|
|
132
134
|
private readonly decoder = new TextDecoder("utf-8");
|
|
@@ -139,6 +141,11 @@ class Pty implements IPty {
|
|
|
139
141
|
args: string[],
|
|
140
142
|
options: PtyForkOptions,
|
|
141
143
|
) {
|
|
144
|
+
this.readPollMaxMs = options.readPollMaxMs ?? READ_IDLE_MAX_MS;
|
|
145
|
+
|
|
146
|
+
if (!Number.isFinite(this.readPollMaxMs) || this.readPollMaxMs < 1)
|
|
147
|
+
throw new Error("PTY read poll limit must be at least one millisecond");
|
|
148
|
+
|
|
142
149
|
this.columns = options.cols ?? DEFAULT_COLS;
|
|
143
150
|
this.rowCount = options.rows ?? DEFAULT_ROWS;
|
|
144
151
|
const cwd = options.cwd ?? process.cwd();
|
|
@@ -236,7 +243,7 @@ class Pty implements IPty {
|
|
|
236
243
|
this.closing = true;
|
|
237
244
|
this.exitEvent.fire({ exitCode });
|
|
238
245
|
} else {
|
|
239
|
-
const delay = Math.min(
|
|
246
|
+
const delay = Math.min(this.readPollMaxMs, READ_IDLE_MS * 2 ** Math.min(idlePolls, 5));
|
|
240
247
|
|
|
241
248
|
idlePolls += 1;
|
|
242
249
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
@@ -479,6 +479,9 @@ class Controller implements ReviewController {
|
|
|
479
479
|
|
|
480
480
|
this.client = client;
|
|
481
481
|
client.onEvent((event) => {
|
|
482
|
+
// Agent transcripts have their own observer; they do not change Thread records or the inbox.
|
|
483
|
+
if (event.event === "agent.updated") return;
|
|
484
|
+
|
|
482
485
|
// another controller/observer changed state: re-fetch the active session's content
|
|
483
486
|
const session = this.snapshot.session;
|
|
484
487
|
|