clay-server 2.24.1-beta.1 → 2.24.2-beta.1
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/lib/project.js +5 -0
- package/lib/sdk-bridge.js +9 -0
- package/lib/sessions.js +10 -0
- package/package.json +1 -1
package/lib/project.js
CHANGED
|
@@ -5793,6 +5793,11 @@ function createProjectContext(opts) {
|
|
|
5793
5793
|
if (session.abortController) {
|
|
5794
5794
|
try { session.abortController.abort(); } catch (e) {}
|
|
5795
5795
|
}
|
|
5796
|
+
// Close SDK query to terminate the underlying claude child process
|
|
5797
|
+
if (session.queryInstance && typeof session.queryInstance.close === "function") {
|
|
5798
|
+
try { session.queryInstance.close(); } catch (e) {}
|
|
5799
|
+
}
|
|
5800
|
+
session.queryInstance = null;
|
|
5796
5801
|
if (session.messageQueue) {
|
|
5797
5802
|
try { session.messageQueue.end(); } catch (e) {}
|
|
5798
5803
|
}
|
package/lib/sdk-bridge.js
CHANGED
|
@@ -1742,6 +1742,15 @@ function createSDKBridge(opts) {
|
|
|
1742
1742
|
sm.broadcastSessionList();
|
|
1743
1743
|
}
|
|
1744
1744
|
} finally {
|
|
1745
|
+
// Close the SDK query to terminate the underlying claude child process.
|
|
1746
|
+
// Without this, the process stays alive indefinitely (single-user mode).
|
|
1747
|
+
if (session.queryInstance) {
|
|
1748
|
+
try {
|
|
1749
|
+
if (typeof session.queryInstance.close === "function") {
|
|
1750
|
+
session.queryInstance.close();
|
|
1751
|
+
}
|
|
1752
|
+
} catch (e) {}
|
|
1753
|
+
}
|
|
1745
1754
|
session.queryInstance = null;
|
|
1746
1755
|
session.messageQueue = null;
|
|
1747
1756
|
session.abortController = null;
|
package/lib/sessions.js
CHANGED
|
@@ -424,6 +424,11 @@ function createSessionManager(opts) {
|
|
|
424
424
|
if (session.abortController) {
|
|
425
425
|
try { session.abortController.abort(); } catch(e) {}
|
|
426
426
|
}
|
|
427
|
+
// Close SDK query to terminate the underlying claude child process
|
|
428
|
+
if (session.queryInstance && typeof session.queryInstance.close === "function") {
|
|
429
|
+
try { session.queryInstance.close(); } catch(e) {}
|
|
430
|
+
}
|
|
431
|
+
session.queryInstance = null;
|
|
427
432
|
if (session.messageQueue) {
|
|
428
433
|
try { session.messageQueue.end(); } catch(e) {}
|
|
429
434
|
}
|
|
@@ -458,6 +463,11 @@ function createSessionManager(opts) {
|
|
|
458
463
|
if (session.abortController) {
|
|
459
464
|
try { session.abortController.abort(); } catch(e) {}
|
|
460
465
|
}
|
|
466
|
+
// Close SDK query to terminate the underlying claude child process
|
|
467
|
+
if (session.queryInstance && typeof session.queryInstance.close === "function") {
|
|
468
|
+
try { session.queryInstance.close(); } catch(e) {}
|
|
469
|
+
}
|
|
470
|
+
session.queryInstance = null;
|
|
461
471
|
if (session.messageQueue) {
|
|
462
472
|
try { session.messageQueue.end(); } catch(e) {}
|
|
463
473
|
}
|