@adhdev/daemon-standalone 0.8.14 → 0.8.15
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/index.js
CHANGED
|
@@ -28501,19 +28501,32 @@ var require_dist2 = __commonJS({
|
|
|
28501
28501
|
};
|
|
28502
28502
|
}
|
|
28503
28503
|
});
|
|
28504
|
+
var import_session_host_core2;
|
|
28505
|
+
var init_spawn_env = __esm2({
|
|
28506
|
+
"src/cli-adapters/spawn-env.ts"() {
|
|
28507
|
+
"use strict";
|
|
28508
|
+
import_session_host_core2 = require_dist();
|
|
28509
|
+
}
|
|
28510
|
+
});
|
|
28511
|
+
function loadNodePty() {
|
|
28512
|
+
if (cachedPty !== void 0) return cachedPty;
|
|
28513
|
+
try {
|
|
28514
|
+
cachedPty = require("node-pty");
|
|
28515
|
+
(0, import_session_host_core2.ensureNodePtySpawnHelperPermissions)();
|
|
28516
|
+
} catch {
|
|
28517
|
+
cachedPty = null;
|
|
28518
|
+
}
|
|
28519
|
+
return cachedPty;
|
|
28520
|
+
}
|
|
28504
28521
|
var os7;
|
|
28505
|
-
var
|
|
28522
|
+
var cachedPty;
|
|
28506
28523
|
var NodePtyRuntimeTransport;
|
|
28507
28524
|
var NodePtyTransportFactory;
|
|
28508
28525
|
var init_pty_transport = __esm2({
|
|
28509
28526
|
"src/cli-adapters/pty-transport.ts"() {
|
|
28510
28527
|
"use strict";
|
|
28511
28528
|
os7 = __toESM2(require("os"));
|
|
28512
|
-
|
|
28513
|
-
pty = require("node-pty");
|
|
28514
|
-
} catch {
|
|
28515
|
-
pty = null;
|
|
28516
|
-
}
|
|
28529
|
+
init_spawn_env();
|
|
28517
28530
|
NodePtyRuntimeTransport = class {
|
|
28518
28531
|
constructor(handle) {
|
|
28519
28532
|
this.handle = handle;
|
|
@@ -28544,6 +28557,7 @@ var require_dist2 = __commonJS({
|
|
|
28544
28557
|
};
|
|
28545
28558
|
NodePtyTransportFactory = class {
|
|
28546
28559
|
spawn(command, args, options) {
|
|
28560
|
+
const pty = loadNodePty();
|
|
28547
28561
|
if (!pty) throw new Error("node-pty is not installed");
|
|
28548
28562
|
let cwd = options.cwd;
|
|
28549
28563
|
if (cwd) {
|
|
@@ -28567,13 +28581,6 @@ var require_dist2 = __commonJS({
|
|
|
28567
28581
|
};
|
|
28568
28582
|
}
|
|
28569
28583
|
});
|
|
28570
|
-
var import_session_host_core2;
|
|
28571
|
-
var init_spawn_env = __esm2({
|
|
28572
|
-
"src/cli-adapters/spawn-env.ts"() {
|
|
28573
|
-
"use strict";
|
|
28574
|
-
import_session_host_core2 = require_dist();
|
|
28575
|
-
}
|
|
28576
|
-
});
|
|
28577
28584
|
var provider_cli_adapter_exports = {};
|
|
28578
28585
|
__export2(provider_cli_adapter_exports, {
|
|
28579
28586
|
ProviderCliAdapter: () => ProviderCliAdapter,
|
|
@@ -28719,7 +28726,6 @@ var require_dist2 = __commonJS({
|
|
|
28719
28726
|
var os8;
|
|
28720
28727
|
var path7;
|
|
28721
28728
|
var import_child_process4;
|
|
28722
|
-
var pty2;
|
|
28723
28729
|
var buildCliSpawnEnv;
|
|
28724
28730
|
var ProviderCliAdapter;
|
|
28725
28731
|
var init_provider_cli_adapter = __esm2({
|
|
@@ -28732,12 +28738,6 @@ var require_dist2 = __commonJS({
|
|
|
28732
28738
|
init_terminal_screen();
|
|
28733
28739
|
init_pty_transport();
|
|
28734
28740
|
init_spawn_env();
|
|
28735
|
-
try {
|
|
28736
|
-
pty2 = require("node-pty");
|
|
28737
|
-
(0, import_session_host_core2.ensureNodePtySpawnHelperPermissions)((msg) => LOG2.info("CLI", msg));
|
|
28738
|
-
} catch {
|
|
28739
|
-
LOG2.error("CLI", "[ProviderCliAdapter] node-pty not found. Terminal features disabled.");
|
|
28740
|
-
}
|
|
28741
28741
|
buildCliSpawnEnv = import_session_host_core2.sanitizeSpawnEnv;
|
|
28742
28742
|
ProviderCliAdapter = class _ProviderCliAdapter {
|
|
28743
28743
|
constructor(provider, workingDir, extraArgs = [], transportFactory = new NodePtyTransportFactory()) {
|
|
@@ -43744,10 +43744,10 @@ async (params) => {
|
|
|
43744
43744
|
let isPty = false;
|
|
43745
43745
|
const { spawn: spawnFn } = await import("child_process");
|
|
43746
43746
|
try {
|
|
43747
|
-
const
|
|
43747
|
+
const pty = require("node-pty");
|
|
43748
43748
|
ctx.log(`Auto-implement spawn (PTY): ${shellCmd}`);
|
|
43749
43749
|
const isWin2 = os17.platform() === "win32";
|
|
43750
|
-
child =
|
|
43750
|
+
child = pty.spawn(isWin2 ? "cmd.exe" : process.env.SHELL || "/bin/zsh", [isWin2 ? "/c" : "-c", shellCmd], {
|
|
43751
43751
|
name: "xterm-256color",
|
|
43752
43752
|
cols: 120,
|
|
43753
43753
|
rows: 40,
|
|
@@ -47479,6 +47479,14 @@ if (pkgVersion === "unknown") {
|
|
|
47479
47479
|
} catch {
|
|
47480
47480
|
}
|
|
47481
47481
|
}
|
|
47482
|
+
if (process.platform === "win32") {
|
|
47483
|
+
const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] || "0", 10);
|
|
47484
|
+
if (nodeMajor >= 24) {
|
|
47485
|
+
console.error("\n\u2717 Windows is currently unsupported on Node.js 24+ for ADHDev standalone.");
|
|
47486
|
+
console.error(" Install Node.js 22.x on Windows, then retry.\n");
|
|
47487
|
+
process.exit(1);
|
|
47488
|
+
}
|
|
47489
|
+
}
|
|
47482
47490
|
var SESSION_TARGET_COMMANDS = /* @__PURE__ */ new Set([
|
|
47483
47491
|
"send_chat",
|
|
47484
47492
|
"read_chat",
|