@essentialai/cogent-bridge-bundled 3.21.7 → 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 +6 -5
- 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
|
}
|
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": {
|