@essentialai/cogent-plugin 3.12.3 → 3.12.5
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogent",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.5",
|
|
4
4
|
"description": "Inter-session communication bridge for Claude Code with Slack integration. Enables CC agents and Slack team members to communicate in real time.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Essential AI Solutions",
|
package/bridge/cogent-bridge.mjs
CHANGED
|
@@ -613,6 +613,12 @@ function markJoinedInProcess() {
|
|
|
613
613
|
function hasJoinedInProcess() {
|
|
614
614
|
return joinedInProcessFlag;
|
|
615
615
|
}
|
|
616
|
+
function markCloudAttemptInProcess() {
|
|
617
|
+
cloudAttemptInProcessFlag = true;
|
|
618
|
+
}
|
|
619
|
+
function hasCloudAttemptInProcess() {
|
|
620
|
+
return cloudAttemptInProcessFlag;
|
|
621
|
+
}
|
|
616
622
|
async function loadCredentials(credentialPath) {
|
|
617
623
|
const filePath = resolveCredentialPath(credentialPath);
|
|
618
624
|
try {
|
|
@@ -640,7 +646,7 @@ async function legacyGlobalCredentialsExist() {
|
|
|
640
646
|
return false;
|
|
641
647
|
}
|
|
642
648
|
}
|
|
643
|
-
var LEGACY_GLOBAL_CREDENTIAL_PATH, joinedInProcessFlag;
|
|
649
|
+
var LEGACY_GLOBAL_CREDENTIAL_PATH, joinedInProcessFlag, cloudAttemptInProcessFlag;
|
|
644
650
|
var init_credential_store = __esm({
|
|
645
651
|
"src/cloud/credential-store.ts"() {
|
|
646
652
|
"use strict";
|
|
@@ -649,6 +655,7 @@ var init_credential_store = __esm({
|
|
|
649
655
|
".cogent-credentials.json"
|
|
650
656
|
);
|
|
651
657
|
joinedInProcessFlag = false;
|
|
658
|
+
cloudAttemptInProcessFlag = false;
|
|
652
659
|
}
|
|
653
660
|
});
|
|
654
661
|
|
|
@@ -22372,8 +22379,8 @@ var init_stdio2 = __esm({
|
|
|
22372
22379
|
// src/constants.ts
|
|
22373
22380
|
import { createRequire } from "node:module";
|
|
22374
22381
|
function resolveVersion() {
|
|
22375
|
-
if ("3.12.
|
|
22376
|
-
return "3.12.
|
|
22382
|
+
if ("3.12.5") {
|
|
22383
|
+
return "3.12.5";
|
|
22377
22384
|
}
|
|
22378
22385
|
try {
|
|
22379
22386
|
const require2 = createRequire(import.meta.url);
|
|
@@ -22701,6 +22708,7 @@ var init_errors4 = __esm({
|
|
|
22701
22708
|
BridgeErrorCode2["STARTUP_FAILED"] = "STARTUP_FAILED";
|
|
22702
22709
|
BridgeErrorCode2["DIR_NOT_WRITABLE"] = "DIR_NOT_WRITABLE";
|
|
22703
22710
|
BridgeErrorCode2["NETWORK_TIMEOUT"] = "NETWORK_TIMEOUT";
|
|
22711
|
+
BridgeErrorCode2["JOIN_NOT_CONFIRMED"] = "JOIN_NOT_CONFIRMED";
|
|
22704
22712
|
return BridgeErrorCode2;
|
|
22705
22713
|
})(BridgeErrorCode || {});
|
|
22706
22714
|
BridgeError = class extends Error {
|
|
@@ -29863,6 +29871,16 @@ function registerRegisterPeerTool(server) {
|
|
|
29863
29871
|
async ({ peerId, sessionId, cwd, label, mode, role }) => {
|
|
29864
29872
|
try {
|
|
29865
29873
|
const config2 = getConfig();
|
|
29874
|
+
const hasExplicitCloudSession = !!config2.COGENT_SESSION_ID || process.env.COGENT_TRUST_PERSISTED_CREDENTIALS === "1";
|
|
29875
|
+
if (!hasExplicitCloudSession && hasCloudAttemptInProcess() && !hasJoinedInProcess()) {
|
|
29876
|
+
return errorResult(
|
|
29877
|
+
new BridgeError(
|
|
29878
|
+
"JOIN_NOT_CONFIRMED" /* JOIN_NOT_CONFIRMED */,
|
|
29879
|
+
"A cogent_join_session/cogent_create_session call was attempted this session but did not succeed, so cogent_register_peer will not fall back to local mode or auto-create a new channel (that would silently put you on the WRONG channel while reporting success)",
|
|
29880
|
+
"Re-run cogent_join_session with the correct channel name + secret (+ Org_ID for Team channels) and confirm it returns success before calling cogent_register_peer"
|
|
29881
|
+
)
|
|
29882
|
+
);
|
|
29883
|
+
}
|
|
29866
29884
|
const hasCloudEndpointConfig = config2.COGENT_ENDPOINT && isCloudEndpoint(config2.COGENT_ENDPOINT);
|
|
29867
29885
|
let sessionCreated = false;
|
|
29868
29886
|
let cloudSessionId;
|
|
@@ -30624,6 +30642,7 @@ function registerCreateSessionTool(server) {
|
|
|
30624
30642
|
},
|
|
30625
30643
|
async ({ label, secret }) => {
|
|
30626
30644
|
try {
|
|
30645
|
+
markCloudAttemptInProcess();
|
|
30627
30646
|
const config2 = getConfig();
|
|
30628
30647
|
if (!config2.COGENT_ENDPOINT) {
|
|
30629
30648
|
return errorResult(
|
|
@@ -30739,6 +30758,7 @@ function registerJoinSessionTool(server) {
|
|
|
30739
30758
|
},
|
|
30740
30759
|
async ({ channel, secret, orgId }) => {
|
|
30741
30760
|
try {
|
|
30761
|
+
markCloudAttemptInProcess();
|
|
30742
30762
|
channel = channel.trim();
|
|
30743
30763
|
secret = secret.trim();
|
|
30744
30764
|
orgId = orgId?.trim() || void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@essentialai/cogent-plugin",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.5",
|
|
4
4
|
"description": "Cogent — Claude Code plugin (skills + slash-commands + MCP server) for the cross-agent comms fabric.",
|
|
5
5
|
"author": { "name": "Essential AI Solutions Ltd.", "url": "https://essentialai.uk" },
|
|
6
6
|
"homepage": "https://cogent.tools",
|