@essentialai/cogent-bridge
Version:
Cogent Bridge — cross-agent comms for Claude Code, OpenAI Codex and Slack. Codex users: install with `curl -fsSL https://cogent.tools/install.sh | sh`, then start with `cogent-codex` for real-time peer wake.
35 lines • 1.59 kB
JavaScript
import { createRequire } from "node:module";
function resolveVersion() {
// `typeof` on an undeclared identifier is safe (returns "undefined"); in the bundle
// esbuild replaces the identifier with a string literal so this branch wins.
if (typeof __COGENT_VERSION__ === "string" && __COGENT_VERSION__) {
return __COGENT_VERSION__;
}
try {
const require = createRequire(import.meta.url);
return require("../package.json").version;
}
catch {
return "unknown";
}
}
export const SERVER_NAME = "Cogent Bridge from Essential AI Solutions (essentialai.uk)";
/**
* cogent-bridge npm package version. Historically named SERVER_VERSION
* because cogent-bridge is the "MCP server" the user's CC instance talks to.
* Retained for backward compatibility with existing importers (logger banner,
* MCP server registration metadata, http-backend's serverVersion HTTP header --
* all of which legitimately identify cogent-bridge AS the MCP server to the
* user/CLI/CC).
*/
export const SERVER_VERSION = resolveVersion();
/**
* Alias of SERVER_VERSION for use sites where this string identifies the
* client (cogent-bridge npm package) talking to cogent-server. Audit L4:
* SERVER_VERSION is misleading when used in the clientVersion field of
* register-peer requests -- this alias makes the role explicit.
* Used by: src/tools/register-peer.ts (initial register), src/startup.ts
* (re-register after eviction in handleEvictionAndRecover).
*/
export const CLIENT_VERSION = SERVER_VERSION;
//# sourceMappingURL=constants.js.map