Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7543b8d62a |
@@ -7233,7 +7233,7 @@ exports[`screen snapshots > Settings — about 1`] = `
|
||||
<p
|
||||
class="text-[10px] text-status-warning/90 mt-1"
|
||||
>
|
||||
UI build v2.5.7 (rebuild client to match)
|
||||
UI build v2.5.8 (rebuild client to match)
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Agent Dashboard for Claude Code API
|
||||
version: 2.5.7
|
||||
version: 2.5.8
|
||||
description: HTTP API for real-time Claude Code session monitoring, agent lifecycle tracking, analytics, pricing, hooks ingestion, and workflow intelligence.
|
||||
contact:
|
||||
name: Nguyễn Ngọc Trí Vĩ
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "agenthub",
|
||||
"version": "2.5.7",
|
||||
"version": "2.5.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "agenthub",
|
||||
"version": "2.5.7",
|
||||
"version": "2.5.8",
|
||||
"hasInstallScript": true,
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "agenthub",
|
||||
"version": "2.5.7",
|
||||
"version": "2.5.8",
|
||||
"bin": {
|
||||
"agenthub": "bin/agenthub.js"
|
||||
},
|
||||
|
||||
@@ -169,3 +169,17 @@ describe("pty-attach", () => {
|
||||
assert.equal(killed, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("attachBinary on Windows", () => {
|
||||
it("names tmux with its extension — node-pty there never adds `.exe`", () => {
|
||||
// A bare `tmux` made node-pty answer "File not found" on every attach, so
|
||||
// the browser's terminal opened, closed and reconnected every 1.5 s.
|
||||
const saved = process.env.PATH;
|
||||
process.env.PATH = "";
|
||||
try {
|
||||
assert.equal(ptyAttach.attachBinary("win32"), "tmux.exe");
|
||||
} finally {
|
||||
process.env.PATH = saved;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -42,9 +42,14 @@ function __setSpawnImpl(fn) {
|
||||
* file), else `tmux` on PATH. A client must match its server — tmux installed
|
||||
* in a newer version while the server runs makes PATH's client fail every
|
||||
* attach with "open terminal failed: not a terminal", though every other tmux
|
||||
* command still works. Linux only; elsewhere PATH's tmux as before.
|
||||
* command still works. Linux only; elsewhere PATH's tmux as before — on
|
||||
* Windows by its full file name: node-pty there looks the file up on PATH as
|
||||
* given, never adding `.exe`, so a bare `tmux` failed every attach with
|
||||
* "File not found" (the browser saw a socket that opened and closed, again
|
||||
* every 1.5 s).
|
||||
*/
|
||||
function attachBinary() {
|
||||
function attachBinary(platform = process.platform) {
|
||||
if (platform === "win32") return require("./ai-tools").which("tmux") || "tmux.exe";
|
||||
const pid = tmux.serverPid();
|
||||
if (!pid) return "tmux";
|
||||
const exe = `/proc/${pid}/exe`;
|
||||
@@ -153,4 +158,4 @@ function attach(ws, runId, { cols, rows }) {
|
||||
// resolves a working native binding with no compiler needed.
|
||||
__setSpawnImpl((...args) => require("@lydell/node-pty").spawn(...args));
|
||||
|
||||
module.exports = { attach, validateRunId, __setSpawnImpl };
|
||||
module.exports = { attach, attachBinary, validateRunId, __setSpawnImpl };
|
||||
|
||||
@@ -121,6 +121,9 @@ function initPtyWebSocket(server) {
|
||||
try {
|
||||
attach(ws, runId, size || { cols: 80, rows: 24 });
|
||||
} catch (err) {
|
||||
// The browser only sees a socket that closed and retries every 1.5 s;
|
||||
// this line is the one place that says why.
|
||||
console.warn(`[WS] attach ${runId} failed:`, err.message);
|
||||
try {
|
||||
ws.close(1008, err.message);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user