@essentialai/cogent-bridge-bundled 3.21.6 → 3.21.8
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/cogent-bridge.mjs +15 -6
- package/package.json +1 -1
package/cogent-bridge.mjs
CHANGED
|
@@ -26389,8 +26389,8 @@ var init_stdio2 = __esm({
|
|
|
26389
26389
|
// src/constants.ts
|
|
26390
26390
|
import { createRequire } from "node:module";
|
|
26391
26391
|
function resolveVersion() {
|
|
26392
|
-
if ("3.21.
|
|
26393
|
-
return "3.21.
|
|
26392
|
+
if ("3.21.8") {
|
|
26393
|
+
return "3.21.8";
|
|
26394
26394
|
}
|
|
26395
26395
|
try {
|
|
26396
26396
|
const require2 = createRequire(import.meta.url);
|
|
@@ -27393,13 +27393,14 @@ async function execClaude(sessionId, message, cwd, timeoutMs) {
|
|
|
27393
27393
|
function parseClaudeJsonReply(raw) {
|
|
27394
27394
|
const trimmed = raw.trim();
|
|
27395
27395
|
if (!trimmed) return null;
|
|
27396
|
-
let
|
|
27396
|
+
let parsed;
|
|
27397
27397
|
try {
|
|
27398
|
-
|
|
27398
|
+
parsed = JSON.parse(trimmed);
|
|
27399
27399
|
} catch {
|
|
27400
27400
|
return null;
|
|
27401
27401
|
}
|
|
27402
|
-
|
|
27402
|
+
const env = Array.isArray(parsed) ? [...parsed].reverse().find((e) => e?.type === "result") : parsed;
|
|
27403
|
+
if (!env || env.type !== "result") return null;
|
|
27403
27404
|
const result = typeof env.result === "string" ? env.result : null;
|
|
27404
27405
|
return { result, isError: env.is_error === true || env.subtype !== "success" };
|
|
27405
27406
|
}
|
|
@@ -32626,11 +32627,19 @@ var init_codex_cli = __esm({
|
|
|
32626
32627
|
|
|
32627
32628
|
// src/services/codex-app-server.ts
|
|
32628
32629
|
import path13 from "node:path";
|
|
32630
|
+
import { statSync } from "node:fs";
|
|
32629
32631
|
import fs12 from "node:fs/promises";
|
|
32630
32632
|
import { spawn as spawn3, spawnSync } from "node:child_process";
|
|
32631
32633
|
function appServerSocketPath(codexHome = codexHomeDir()) {
|
|
32632
32634
|
return path13.join(codexHome, "app-server-control", "app-server-control.sock");
|
|
32633
32635
|
}
|
|
32636
|
+
function appServerDaemonRunning(codexHome = codexHomeDir()) {
|
|
32637
|
+
try {
|
|
32638
|
+
return statSync(appServerSocketPath(codexHome)).isSocket();
|
|
32639
|
+
} catch {
|
|
32640
|
+
return false;
|
|
32641
|
+
}
|
|
32642
|
+
}
|
|
32634
32643
|
function rpcUrl(sock) {
|
|
32635
32644
|
return `ws+unix://${sock}:/rpc`;
|
|
32636
32645
|
}
|
|
@@ -32959,7 +32968,7 @@ var init_codex_app_server = __esm({
|
|
|
32959
32968
|
// src/services/exec-remote.ts
|
|
32960
32969
|
async function execCodexWake(sessionId, message, cwd, timeoutMs, idempotencyKey) {
|
|
32961
32970
|
const wake = getConfig().COGENT_CODEX_WAKE;
|
|
32962
|
-
const useAppServer = wake === "app-server" || wake === "auto" && runningUnderAppServerDaemon();
|
|
32971
|
+
const useAppServer = wake === "app-server" || wake === "auto" && (runningUnderAppServerDaemon() || appServerDaemonRunning());
|
|
32963
32972
|
if (useAppServer) {
|
|
32964
32973
|
try {
|
|
32965
32974
|
const sock = await ensureDaemon();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@essentialai/cogent-bridge-bundled",
|
|
3
|
-
"version": "3.21.
|
|
3
|
+
"version": "3.21.8",
|
|
4
4
|
"description": "Zero-dependency, pre-bundled Cogent MCP bridge — a single self-contained file for fast cold `npx` startup (used by the Codex plugin, whose MCP startup window is short). Functionally identical to @essentialai/cogent-bridge; carries no npm dependencies so `npx` skips dependency install.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|