@essentialai/cogent-bridge-bundled 3.25.2 → 3.25.3
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 +18 -3
- package/package.json +1 -1
package/cogent-bridge.mjs
CHANGED
|
@@ -648,6 +648,12 @@ async function saveCredentials(creds, credentialPath) {
|
|
|
648
648
|
);
|
|
649
649
|
await fs4.chmod(filePath, 384);
|
|
650
650
|
}
|
|
651
|
+
async function rememberIssuedPeerSecret(sessionId, peerId, peerSecret) {
|
|
652
|
+
const creds = await loadCredentials();
|
|
653
|
+
if (!creds || creds.sessionId !== sessionId) return;
|
|
654
|
+
if (creds.peerId === peerId && creds.peerSecret === peerSecret) return;
|
|
655
|
+
await saveCredentials({ ...creds, peerId, peerSecret, savedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
656
|
+
}
|
|
651
657
|
async function legacyGlobalCredentialsExist() {
|
|
652
658
|
try {
|
|
653
659
|
await fs4.access(LEGACY_GLOBAL_CREDENTIAL_PATH);
|
|
@@ -26390,8 +26396,8 @@ var init_stdio2 = __esm({
|
|
|
26390
26396
|
// src/constants.ts
|
|
26391
26397
|
import { createRequire } from "node:module";
|
|
26392
26398
|
function resolveVersion() {
|
|
26393
|
-
if ("3.25.
|
|
26394
|
-
return "3.25.
|
|
26399
|
+
if ("3.25.3") {
|
|
26400
|
+
return "3.25.3";
|
|
26395
26401
|
}
|
|
26396
26402
|
try {
|
|
26397
26403
|
const require2 = createRequire(import.meta.url);
|
|
@@ -27807,6 +27813,7 @@ var init_http_backend = __esm({
|
|
|
27807
27813
|
init_constants();
|
|
27808
27814
|
init_config();
|
|
27809
27815
|
init_relay_version_cache();
|
|
27816
|
+
init_credential_store();
|
|
27810
27817
|
MAILBOX_DEPROVISIONED_HEADER = "X-Cogent-Mailbox-Deprovisioned";
|
|
27811
27818
|
PATHS = {
|
|
27812
27819
|
peers: "/api/sessions/:sessionId/peers",
|
|
@@ -27862,7 +27869,15 @@ var init_http_backend = __esm({
|
|
|
27862
27869
|
if (peerSecret !== void 0 && await relaySupports(this.http, "peer-ownership")) {
|
|
27863
27870
|
body.peerSecret = peerSecret;
|
|
27864
27871
|
}
|
|
27865
|
-
|
|
27872
|
+
const peer = await this.http.post(path26, body);
|
|
27873
|
+
const issued = peer?.peerSecret;
|
|
27874
|
+
if (issued) {
|
|
27875
|
+
try {
|
|
27876
|
+
await rememberIssuedPeerSecret(this.sessionId, peerId, issued);
|
|
27877
|
+
} catch {
|
|
27878
|
+
}
|
|
27879
|
+
}
|
|
27880
|
+
return peer;
|
|
27866
27881
|
}
|
|
27867
27882
|
/**
|
|
27868
27883
|
* Deregister a peer from the cloud session.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@essentialai/cogent-bridge-bundled",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.3",
|
|
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": {
|