WIP: Large refactor checkpoint

- Refactored daemon client and RPC layer
- Added new client package structure in server
- Removed legacy hooks (use-daemon-request, use-session-rpc, use-websocket)
- Added use-daemon-client hook
- Added e2e test infrastructure with Playwright
- Updated agent providers and session handling
- Removed codex-sdk patches
This commit is contained in:
Mohamed Boudra
2026-01-12 13:30:20 +07:00
parent 7c2e959c19
commit 868f9fb571
64 changed files with 5773 additions and 4741 deletions

View File

@@ -1,22 +0,0 @@
diff --git a/node_modules/@openai/codex-sdk/dist/index.js b/node_modules/@openai/codex-sdk/dist/index.js
index 12a2975..99f61c1 100644
--- a/node_modules/@openai/codex-sdk/dist/index.js
+++ b/node_modules/@openai/codex-sdk/dist/index.js
@@ -238,7 +238,16 @@ var CodexExec = class {
rl.close();
child.removeAllListeners();
try {
- if (!child.killed) child.kill();
+ // Use SIGINT to request a graceful shutdown and fall back to SIGKILL if it hangs.
+ if (child.exitCode === null && !child.killed) {
+ const forceKillTimer = setTimeout(() => {
+ if (child.exitCode === null && !child.killed) {
+ child.kill("SIGKILL");
+ }
+ }, 3e3);
+ child.once("exit", () => clearTimeout(forceKillTimer));
+ child.kill("SIGINT");
+ }
} catch {
}
}

View File

@@ -1,22 +0,0 @@
diff --git a/node_modules/@openai/codex-sdk/dist/index.js b/node_modules/@openai/codex-sdk/dist/index.js
index c7b7f30..be7300c 100644
--- a/node_modules/@openai/codex-sdk/dist/index.js
+++ b/node_modules/@openai/codex-sdk/dist/index.js
@@ -258,7 +258,16 @@ var CodexExec = class {
rl.close();
child.removeAllListeners();
try {
- if (!child.killed) child.kill();
+ // Use SIGINT to request a graceful shutdown and fall back to SIGKILL if it hangs.
+ if (child.exitCode === null && !child.killed) {
+ const forceKillTimer = setTimeout(() => {
+ if (child.exitCode === null && !child.killed) {
+ child.kill("SIGKILL");
+ }
+ }, 3e3);
+ child.once("exit", () => clearTimeout(forceKillTimer));
+ child.kill("SIGINT");
+ }
} catch {
}
}