@ai-setting/roy-plugin-task-show 2.4.1 → 2.5.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/dist/chat-output-parser.d.ts +26 -0
- package/dist/chat-output-parser.d.ts.map +1 -0
- package/dist/chat-output-parser.js +36 -0
- package/dist/chat-output-parser.js.map +1 -0
- package/dist/chat-process-manager.d.ts +93 -0
- package/dist/chat-process-manager.d.ts.map +1 -0
- package/dist/chat-process-manager.js +197 -0
- package/dist/chat-process-manager.js.map +1 -0
- package/dist/server.d.ts +31 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +228 -4
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/public/chat-panel.js +260 -0
- package/public/mermaid-renderer.js +81 -26
- package/public/style.css +141 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Output parser for `roy-agent act` subprocess stdout.
|
|
3
|
+
*
|
|
4
|
+
* `roy-agent act -s <sessionId> <message>` writes human-friendly text to
|
|
5
|
+
* stdout with a leading/trailing sentinel pair:
|
|
6
|
+
*
|
|
7
|
+
* [TaskEventHandler] Started
|
|
8
|
+
* ... LLM streaming text ...
|
|
9
|
+
* [TaskEventHandler] Stopped
|
|
10
|
+
*
|
|
11
|
+
* We do not want the sentinel lines to leak into the chat UI, and we want
|
|
12
|
+
* to strip ANSI colour codes that the CLI uses to highlight text. This
|
|
13
|
+
* module is the single place that knows about that format — every other
|
|
14
|
+
* layer treats output as an opaque byte stream.
|
|
15
|
+
*
|
|
16
|
+
* v2.5.0: kept tiny so we can unit-test the contract in isolation.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SENTINEL_START = "[TaskEventHandler] Started";
|
|
19
|
+
export declare const SENTINEL_STOP = "[TaskEventHandler] Stopped";
|
|
20
|
+
/** Strip CSI / SGR ANSI colour codes from a chunk of stdout. */
|
|
21
|
+
export declare function stripAnsi(input: string): string;
|
|
22
|
+
/** Strip the literal sentinel lines (start + stop). Case-sensitive. */
|
|
23
|
+
export declare function stripSentinels(input: string): string;
|
|
24
|
+
/** Convenience: strip ANSI + sentinels + trim trailing newline. */
|
|
25
|
+
export declare function cleanStdout(raw: string): string;
|
|
26
|
+
//# sourceMappingURL=chat-output-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-output-parser.d.ts","sourceRoot":"","sources":["../src/chat-output-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAC3D,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Output parser for `roy-agent act` subprocess stdout.
|
|
3
|
+
*
|
|
4
|
+
* `roy-agent act -s <sessionId> <message>` writes human-friendly text to
|
|
5
|
+
* stdout with a leading/trailing sentinel pair:
|
|
6
|
+
*
|
|
7
|
+
* [TaskEventHandler] Started
|
|
8
|
+
* ... LLM streaming text ...
|
|
9
|
+
* [TaskEventHandler] Stopped
|
|
10
|
+
*
|
|
11
|
+
* We do not want the sentinel lines to leak into the chat UI, and we want
|
|
12
|
+
* to strip ANSI colour codes that the CLI uses to highlight text. This
|
|
13
|
+
* module is the single place that knows about that format — every other
|
|
14
|
+
* layer treats output as an opaque byte stream.
|
|
15
|
+
*
|
|
16
|
+
* v2.5.0: kept tiny so we can unit-test the contract in isolation.
|
|
17
|
+
*/
|
|
18
|
+
const ANSI_RE = /\x1B\[[0-9;?]*[A-Za-z]/g;
|
|
19
|
+
export const SENTINEL_START = "[TaskEventHandler] Started";
|
|
20
|
+
export const SENTINEL_STOP = "[TaskEventHandler] Stopped";
|
|
21
|
+
/** Strip CSI / SGR ANSI colour codes from a chunk of stdout. */
|
|
22
|
+
export function stripAnsi(input) {
|
|
23
|
+
return input.replace(ANSI_RE, "");
|
|
24
|
+
}
|
|
25
|
+
/** Strip the literal sentinel lines (start + stop). Case-sensitive. */
|
|
26
|
+
export function stripSentinels(input) {
|
|
27
|
+
return input
|
|
28
|
+
.split(/\r?\n/)
|
|
29
|
+
.filter((line) => line.trim() !== SENTINEL_START && line.trim() !== SENTINEL_STOP)
|
|
30
|
+
.join("\n");
|
|
31
|
+
}
|
|
32
|
+
/** Convenience: strip ANSI + sentinels + trim trailing newline. */
|
|
33
|
+
export function cleanStdout(raw) {
|
|
34
|
+
return stripSentinels(stripAnsi(raw)).replace(/\n+$/, "");
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=chat-output-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-output-parser.js","sourceRoot":"","sources":["../src/chat-output-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,gEAAgE;AAChE,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK;SACT,KAAK,CAAC,OAAO,CAAC;SACd,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,cAAc,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,aAAa,CAAC;SACjF,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ChatProcessManager — spawn wrapper for `roy-agent act`.
|
|
3
|
+
*
|
|
4
|
+
* v2.5.0: encapsulates the user-decided integration strategy documented in
|
|
5
|
+
* /tmp/task-show-v2.5-spawn-plan.md. We do NOT depend on the roy-agent
|
|
6
|
+
* SDK; instead we shell out to `node <roy-agent.js> act -s <sessionId>
|
|
7
|
+
<message>` per query and stream the subprocess stdout back to the
|
|
8
|
+
* consumer.
|
|
9
|
+
*
|
|
10
|
+
* Concurrency: a FIFO queue caps the number of in-flight subprocesses at
|
|
11
|
+
* `maxConcurrent`. Excess calls `await` until a slot frees up.
|
|
12
|
+
*
|
|
13
|
+
* Lifecycle: every `sendStream` call spawns exactly ONE short-lived
|
|
14
|
+
* subprocess. The subprocess is SIGTERM'd (then SIGKILL after 5s) on
|
|
15
|
+
* `abort()`. The slot is released in the `exit` handler so a failure
|
|
16
|
+
* cannot leak concurrency.
|
|
17
|
+
*
|
|
18
|
+
* Output parsing: each line written by the subprocess is classified into
|
|
19
|
+
* a `ChatChunk` (see type below). Sentinels and ANSI codes are stripped
|
|
20
|
+
* before classification — see `chat-output-parser.ts`.
|
|
21
|
+
*/
|
|
22
|
+
/** One unit of output emitted by `roy-agent act`. */
|
|
23
|
+
export type ChatChunkType = "start" | "text" | "reasoning" | "done" | "error";
|
|
24
|
+
export interface ChatChunk {
|
|
25
|
+
type: ChatChunkType;
|
|
26
|
+
/** Plain text payload (already ANSI-stripped). */
|
|
27
|
+
text?: string;
|
|
28
|
+
/** Final metadata attached to start/done chunks. */
|
|
29
|
+
meta?: {
|
|
30
|
+
sessionId: string;
|
|
31
|
+
latencyMs?: number;
|
|
32
|
+
exitCode?: number;
|
|
33
|
+
};
|
|
34
|
+
/** Error info attached to error chunks. */
|
|
35
|
+
error?: {
|
|
36
|
+
message: string;
|
|
37
|
+
code?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface SendOptions {
|
|
41
|
+
/** Hard timeout (default = constructor `defaultTimeoutMs`). */
|
|
42
|
+
timeoutMs?: number;
|
|
43
|
+
/** Working dir for the subprocess (default = process.cwd()). */
|
|
44
|
+
cwd?: string;
|
|
45
|
+
/** Extra args appended AFTER `--tool-calls=false`. Used by tests. */
|
|
46
|
+
extraArgs?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface ChatProcessManagerOptions {
|
|
49
|
+
/** Absolute path to the roy-agent CLI entry. */
|
|
50
|
+
cliPath: string;
|
|
51
|
+
/** Maximum concurrent subprocesses (default 4). */
|
|
52
|
+
maxConcurrent?: number;
|
|
53
|
+
/** Default timeout per query (default 300_000 ms). */
|
|
54
|
+
defaultTimeoutMs?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface SendResult {
|
|
57
|
+
exitCode: number;
|
|
58
|
+
durationMs: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Manager — single instance per task-show process. Stateless beyond the
|
|
62
|
+
* concurrency queue + abort map.
|
|
63
|
+
*/
|
|
64
|
+
export declare class ChatProcessManager {
|
|
65
|
+
private readonly cliPath;
|
|
66
|
+
private readonly maxConcurrent;
|
|
67
|
+
private readonly defaultTimeoutMs;
|
|
68
|
+
private active;
|
|
69
|
+
private queue;
|
|
70
|
+
private abortFlags;
|
|
71
|
+
private totalCompleted;
|
|
72
|
+
constructor(opts: ChatProcessManagerOptions);
|
|
73
|
+
/** Block until a concurrency slot is available. */
|
|
74
|
+
private acquire;
|
|
75
|
+
/** Release a slot; wake the next waiter if any. */
|
|
76
|
+
private release;
|
|
77
|
+
/**
|
|
78
|
+
* Stream a chat turn. The callback receives ChatChunk objects in the
|
|
79
|
+
* order they are classified; the returned promise resolves with the
|
|
80
|
+
* subprocess exit metadata.
|
|
81
|
+
*/
|
|
82
|
+
sendStream(sessionId: string, message: string, onChunk: (chunk: ChatChunk) => void, opts?: SendOptions): Promise<SendResult>;
|
|
83
|
+
private emitLine;
|
|
84
|
+
/** Abort an in-flight query (best-effort SIGTERM). */
|
|
85
|
+
abort(sessionId: string): void;
|
|
86
|
+
/** Stats for monitoring / health endpoints. */
|
|
87
|
+
stats(): {
|
|
88
|
+
active: number;
|
|
89
|
+
queued: number;
|
|
90
|
+
totalCompleted: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=chat-process-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-process-manager.d.ts","sourceRoot":"","sources":["../src/chat-process-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,qDAAqD;AACrD,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,MAAM,GACN,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AAEZ,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,CAAC,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,2CAA2C;IAC3C,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,G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ager — spawn wrapper for `roy-agent act`.
|
|
3
|
+
*
|
|
4
|
+
* v2.5.0: encapsulates the user-decided integration strategy documented in
|
|
5
|
+
* /tmp/task-show-v2.5-spawn-plan.md. We do NOT depend on the roy-agent
|
|
6
|
+
* SDK; instead we shell out to `node <roy-agent.js> act -s <sessionId>
|
|
7
|
+
<message>` per query and stream the subprocess stdout back to the
|
|
8
|
+
* consumer.
|
|
9
|
+
*
|
|
10
|
+
* Concurrency: a FIFO queue caps the number of in-flight subprocesses at
|
|
11
|
+
* `maxConcurrent`. Excess calls `await` until a slot frees up.
|
|
12
|
+
*
|
|
13
|
+
* Lifecycle: every `sendStream` call spawns exactly ONE short-lived
|
|
14
|
+
* subprocess. The subprocess is SIGTERM'd (then SIGKILL after 5s) on
|
|
15
|
+
* `abort()`. The slot is released in the `exit` handler so a failure
|
|
16
|
+
* cannot leak concurrency.
|
|
17
|
+
*
|
|
18
|
+
* Output parsing: each line written by the subprocess is classified into
|
|
19
|
+
* a `ChatChunk` (see type below). Sentinels and ANSI codes are stripped
|
|
20
|
+
* before classification — see `chat-output-parser.ts`.
|
|
21
|
+
*/
|
|
22
|
+
import { spawn } from "node:child_process";
|
|
23
|
+
import { stripAnsi } from "./chat-output-parser.js";
|
|
24
|
+
const REASONING_OPEN = "<think>";
|
|
25
|
+
/**
|
|
26
|
+
* Manager — single instance per task-show process. Stateless beyond the
|
|
27
|
+
* concurrency queue + abort map.
|
|
28
|
+
*/
|
|
29
|
+
export class ChatProcessManager {
|
|
30
|
+
cliPath;
|
|
31
|
+
maxConcurrent;
|
|
32
|
+
defaultTimeoutMs;
|
|
33
|
+
active = 0;
|
|
34
|
+
queue = [];
|
|
35
|
+
abortFlags = new Map();
|
|
36
|
+
totalCompleted = 0;
|
|
37
|
+
constructor(opts) {
|
|
38
|
+
if (!opts || typeof opts.cliPath !== "string" || opts.cliPath.length === 0) {
|
|
39
|
+
throw new Error("ChatProcessManager: cliPath is required");
|
|
40
|
+
}
|
|
41
|
+
this.cliPath = opts.cliPath;
|
|
42
|
+
this.maxConcurrent = Math.max(1, opts.maxConcurrent ?? 4);
|
|
43
|
+
this.defaultTimeoutMs = opts.defaultTimeoutMs ?? 300_000;
|
|
44
|
+
}
|
|
45
|
+
/** Block until a concurrency slot is available. */
|
|
46
|
+
async acquire() {
|
|
47
|
+
if (this.active < this.maxConcurrent) {
|
|
48
|
+
this.active++;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
await new Promise((resolve) => this.queue.push(resolve));
|
|
52
|
+
this.active++;
|
|
53
|
+
}
|
|
54
|
+
/** Release a slot; wake the next waiter if any. */
|
|
55
|
+
release() {
|
|
56
|
+
this.active = Math.max(0, this.active - 1);
|
|
57
|
+
const next = this.queue.shift();
|
|
58
|
+
if (next)
|
|
59
|
+
next();
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Stream a chat turn. The callback receives ChatChunk objects in the
|
|
63
|
+
* order they are classified; the returned promise resolves with the
|
|
64
|
+
* subprocess exit metadata.
|
|
65
|
+
*/
|
|
66
|
+
async sendStream(sessionId, message, onChunk, opts = {}) {
|
|
67
|
+
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
68
|
+
throw new Error("ChatProcessManager: sessionId is required");
|
|
69
|
+
}
|
|
70
|
+
if (typeof message !== "string") {
|
|
71
|
+
throw new Error("ChatProcessManager: message must be a string");
|
|
72
|
+
}
|
|
73
|
+
await this.acquire();
|
|
74
|
+
const ctrl = new AbortController();
|
|
75
|
+
this.abortFlags.set(sessionId, ctrl);
|
|
76
|
+
const args = [
|
|
77
|
+
this.cliPath,
|
|
78
|
+
"act",
|
|
79
|
+
"-s",
|
|
80
|
+
sessionId,
|
|
81
|
+
message,
|
|
82
|
+
"--reasoning=false",
|
|
83
|
+
"--tool-calls=false",
|
|
84
|
+
...(opts.extraArgs ?? []),
|
|
85
|
+
];
|
|
86
|
+
const startedAt = Date.now();
|
|
87
|
+
const timeoutMs = opts.timeoutMs ?? this.defaultTimeoutMs;
|
|
88
|
+
let proc;
|
|
89
|
+
try {
|
|
90
|
+
proc = spawn("node", args, {
|
|
91
|
+
cwd: opts.cwd ?? process.cwd(),
|
|
92
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
93
|
+
signal: ctrl.signal,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
this.abortFlags.delete(sessionId);
|
|
98
|
+
this.release();
|
|
99
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
100
|
+
onChunk({ type: "error", error: { message: msg, code: "spawn_failed" } });
|
|
101
|
+
onChunk({
|
|
102
|
+
type: "done",
|
|
103
|
+
meta: { sessionId, exitCode: -1, latencyMs: Date.now() - startedAt },
|
|
104
|
+
});
|
|
105
|
+
return { exitCode: -1, durationMs: Date.now() - startedAt };
|
|
106
|
+
}
|
|
107
|
+
onChunk({ type: "start", meta: { sessionId } });
|
|
108
|
+
// Force-kill watchdog so a stuck subprocess cannot pin a slot.
|
|
109
|
+
const killTimer = setTimeout(() => {
|
|
110
|
+
try {
|
|
111
|
+
proc.kill("SIGKILL");
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
/* ignore */
|
|
115
|
+
}
|
|
116
|
+
}, timeoutMs);
|
|
117
|
+
killTimer.unref?.();
|
|
118
|
+
let stdoutBuf = "";
|
|
119
|
+
proc.stdout.setEncoding("utf-8");
|
|
120
|
+
proc.stdout.on("data", (raw) => {
|
|
121
|
+
stdoutBuf += typeof raw === "string" ? raw : raw.toString("utf-8");
|
|
122
|
+
let nlIdx = stdoutBuf.indexOf("\n");
|
|
123
|
+
while (nlIdx >= 0) {
|
|
124
|
+
const lineRaw = stdoutBuf.slice(0, nlIdx);
|
|
125
|
+
stdoutBuf = stdoutBuf.slice(nlIdx + 1);
|
|
126
|
+
this.emitLine(lineRaw, sessionId, onChunk);
|
|
127
|
+
nlIdx = stdoutBuf.indexOf("\n");
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
proc.stdout.on("end", () => {
|
|
131
|
+
if (stdoutBuf.length > 0) {
|
|
132
|
+
this.emitLine(stdoutBuf, sessionId, onChunk);
|
|
133
|
+
stdoutBuf = "";
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
// stderr is best-effort diagnostics; we surface it as a single error
|
|
137
|
+
// chunk only if the process exits non-zero.
|
|
138
|
+
let stderrBuf = "";
|
|
139
|
+
proc.stderr.setEncoding("utf-8");
|
|
140
|
+
proc.stderr.on("data", (raw) => {
|
|
141
|
+
stderrBuf += typeof raw === "string" ? raw : raw.toString("utf-8");
|
|
142
|
+
});
|
|
143
|
+
const exitCode = await new Promise((resolve) => {
|
|
144
|
+
proc.on("exit", (code) => resolve(typeof code === "number" ? code : -1));
|
|
145
|
+
proc.on("error", () => resolve(-1));
|
|
146
|
+
});
|
|
147
|
+
clearTimeout(killTimer);
|
|
148
|
+
const durationMs = Date.now() - startedAt;
|
|
149
|
+
this.abortFlags.delete(sessionId);
|
|
150
|
+
this.release();
|
|
151
|
+
this.totalCompleted++;
|
|
152
|
+
if (exitCode === 0) {
|
|
153
|
+
onChunk({ type: "done", meta: { sessionId, exitCode, latencyMs: durationMs } });
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
const tail = stderrBuf.trim().split(/\r?\n/).slice(-3).join(" | ");
|
|
157
|
+
onChunk({
|
|
158
|
+
type: "error",
|
|
159
|
+
error: {
|
|
160
|
+
message: tail || `roy-agent act exited with code ${exitCode}`,
|
|
161
|
+
code: `exit_${exitCode}`,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
onChunk({ type: "done", meta: { sessionId, exitCode, latencyMs: durationMs } });
|
|
165
|
+
}
|
|
166
|
+
return { exitCode, durationMs };
|
|
167
|
+
}
|
|
168
|
+
emitLine(line, _sessionId, onChunk) {
|
|
169
|
+
const trimmed = stripAnsi(line).replace(/\s+$/, "");
|
|
170
|
+
if (trimmed.length === 0)
|
|
171
|
+
return;
|
|
172
|
+
if (trimmed === "[TaskEventHandler] Started" ||
|
|
173
|
+
trimmed === "[TaskEventHandler] Stopped") {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (trimmed.startsWith(REASONING_OPEN)) {
|
|
177
|
+
onChunk({ type: "reasoning", text: trimmed });
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
onChunk({ type: "text", text: trimmed });
|
|
181
|
+
}
|
|
182
|
+
/** Abort an in-flight query (best-effort SIGTERM). */
|
|
183
|
+
abort(sessionId) {
|
|
184
|
+
const ctrl = this.abortFlags.get(sessionId);
|
|
185
|
+
if (ctrl)
|
|
186
|
+
ctrl.abort();
|
|
187
|
+
}
|
|
188
|
+
/** Stats for monitoring / health endpoints. */
|
|
189
|
+
stats() {
|
|
190
|
+
return {
|
|
191
|
+
active: this.active,
|
|
192
|
+
queued: this.queue.length,
|
|
193
|
+
totalCompleted: this.totalCompleted,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=chat-process-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-process-manager.js","sourceRoot":"","sources":["../src/chat-process-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA+CpD,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAAS;IAChB,aAAa,CAAS;IACtB,gBAAgB,CAAS;IAClC,MAAM,GAAG,CAAC,CAAC;IACX,KAAK,GAAsB,EAAE,CAAC;IAC9B,UAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;IAChD,cAAc,GAAG,CAAC,CAAC;IAE3B,YAAY,IAA+B;QACzC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC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D,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,SAAiB;QACrB,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,IAAI;YAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,+CAA+C;IAC/C,KAAK;QACH,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF"}
|
package/dist/server.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export declare class TaskShowServer {
|
|
|
94
94
|
/** v0.9.0+: optional session-scoped task store. When set, GET / renders the
|
|
95
95
|
* session forest; otherwise the legacy cross-host tree view is used. */
|
|
96
96
|
private readonly sessionStore;
|
|
97
|
+
/** v2.5.0+: ChatProcessManager singleton (null when chat is disabled). */
|
|
98
|
+
private readonly chatManager;
|
|
97
99
|
constructor(opts: {
|
|
98
100
|
cfg: TaskShowConfig;
|
|
99
101
|
collector: ToolCallCollector;
|
|
@@ -115,6 +117,19 @@ export declare class TaskShowServer {
|
|
|
115
117
|
sessionStore?: TaskSessionStore;
|
|
116
118
|
/** v1.1.0+: plugin version stamped on every SSE event we broadcast. */
|
|
117
119
|
pluginVersion?: string;
|
|
120
|
+
/**
|
|
121
|
+
* v2.5.0+: chat feature config. When `chatOptions.enabled` is true
|
|
122
|
+
* (default), the server mounts `/api/chat/*` routes and renders the
|
|
123
|
+
* home chat panel. When false, the chat UI is hidden and the API
|
|
124
|
+
* endpoints return 503 — useful for environments without a built
|
|
125
|
+
* `roy-agent` CLI on disk.
|
|
126
|
+
*/
|
|
127
|
+
chatOptions?: {
|
|
128
|
+
cliPath: string;
|
|
129
|
+
maxConcurrent?: number;
|
|
130
|
+
defaultTimeoutMs?: number;
|
|
131
|
+
enabled?: boolean;
|
|
132
|
+
};
|
|
118
133
|
});
|
|
119
134
|
/**
|
|
120
135
|
* Get the SSE event bus (for tests / health checks).
|
|
@@ -171,6 +186,22 @@ export declare class TaskShowServer {
|
|
|
171
186
|
* directories (defaults to cwd + $HOME; configurable via
|
|
172
187
|
* `ts.config.fileSandboxPaths`).
|
|
173
188
|
*/
|
|
189
|
+
/**
|
|
190
|
+
* Allocate a fresh chat sessionId. The id is just a string — the
|
|
191
|
+
* underlying SQLite store lives inside the `roy-agent act` subprocess
|
|
192
|
+
* (we never persist anything ourselves; on the next `act -s <id>` call
|
|
193
|
+
* the CLI resurrects the session from disk if it still exists).
|
|
194
|
+
*/
|
|
195
|
+
private handleChatStart;
|
|
196
|
+
/**
|
|
197
|
+
* SSE endpoint. Accepts `application/json` POST body and emits a series
|
|
198
|
+
* of SSE frames: `event: chunk` for every ChatChunk, then
|
|
199
|
+
* `event: done` once the subprocess exits (or `event: error` on
|
|
200
|
+
* failure).
|
|
201
|
+
*/
|
|
202
|
+
private handleChatMessage;
|
|
203
|
+
/** Abort an in-flight chat query for the given session. */
|
|
204
|
+
private handleChatAbort;
|
|
174
205
|
private handleFileContent;
|
|
175
206
|
/**
|
|
176
207
|
* v2.0.0: GET /api/task/:id/file-tree — returns the git-tracked
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,KAAK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