@essentialai/cogent-plugin 3.14.0 → 3.14.1

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.14.0",
3
+ "version": "3.14.1",
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",
@@ -152,31 +152,33 @@ var init_detect = __esm({
152
152
  });
153
153
 
154
154
  // src/wizard/templates.ts
155
- function mcpJsonContent(npxPath) {
155
+ function cogentEnv(mode) {
156
+ const env = {
157
+ COGENT_LOG_LEVEL: "info",
158
+ COGENT_TIMEOUT_MS: "300000"
159
+ };
160
+ if (mode === "local") env.COGENT_LOCAL = "1";
161
+ return env;
162
+ }
163
+ function mcpJsonContent(npxPath, mode = "cloud") {
156
164
  const config2 = {
157
165
  mcpServers: {
158
166
  "cogent": {
159
167
  command: npxPath,
160
168
  args: ["-y", "@essentialai/cogent-bridge"],
161
- env: {
162
- COGENT_LOG_LEVEL: "info",
163
- COGENT_TIMEOUT_MS: "300000"
164
- }
169
+ env: cogentEnv(mode)
165
170
  }
166
171
  }
167
172
  };
168
173
  return JSON.stringify(config2, null, 2) + "\n";
169
174
  }
170
- function mcpJsonMerge(existing, npxPath) {
175
+ function mcpJsonMerge(existing, npxPath, mode = "cloud") {
171
176
  const parsed = JSON.parse(existing);
172
177
  if (!parsed.mcpServers) parsed.mcpServers = {};
173
178
  parsed.mcpServers["cogent"] = {
174
179
  command: npxPath,
175
180
  args: ["-y", "@essentialai/cogent-bridge"],
176
- env: {
177
- COGENT_LOG_LEVEL: "info",
178
- COGENT_TIMEOUT_MS: "300000"
179
- }
181
+ env: cogentEnv(mode)
180
182
  };
181
183
  return JSON.stringify(parsed, null, 2) + "\n";
182
184
  }
@@ -380,14 +382,14 @@ var init_scaffold_demo = __esm({
380
382
  // src/wizard/scaffold-real.ts
381
383
  import fs2 from "node:fs";
382
384
  import path2 from "node:path";
383
- function writeMcpJson(projectPath, npxPath) {
385
+ function writeMcpJson(projectPath, npxPath, mode) {
384
386
  const filePath = path2.join(projectPath, ".mcp.json");
385
387
  if (fs2.existsSync(filePath)) {
386
388
  const existing = fs2.readFileSync(filePath, "utf-8");
387
- fs2.writeFileSync(filePath, mcpJsonMerge(existing, npxPath), "utf-8");
389
+ fs2.writeFileSync(filePath, mcpJsonMerge(existing, npxPath, mode), "utf-8");
388
390
  return "modified";
389
391
  }
390
- fs2.writeFileSync(filePath, mcpJsonContent(npxPath), "utf-8");
392
+ fs2.writeFileSync(filePath, mcpJsonContent(npxPath, mode), "utf-8");
391
393
  return "created";
392
394
  }
393
395
  function writeClaudeMd(projectPath, peerId, label, otherPeerId) {
@@ -408,7 +410,8 @@ function scaffoldReal(config2) {
408
410
  const created = [];
409
411
  const modified = [];
410
412
  const skipped = [];
411
- const mcpA = writeMcpJson(config2.projectAPath, config2.npxPath);
413
+ const mode = config2.mode ?? "cloud";
414
+ const mcpA = writeMcpJson(config2.projectAPath, config2.npxPath, mode);
412
415
  const mcpAPath = path2.join(config2.projectAPath, ".mcp.json");
413
416
  if (mcpA === "created") created.push(mcpAPath);
414
417
  else modified.push(mcpAPath);
@@ -422,7 +425,7 @@ function scaffoldReal(config2) {
422
425
  if (claudeA === "created") created.push(claudeAPath);
423
426
  else if (claudeA === "modified") modified.push(claudeAPath);
424
427
  else skipped.push(claudeAPath);
425
- const mcpB = writeMcpJson(config2.projectBPath, config2.npxPath);
428
+ const mcpB = writeMcpJson(config2.projectBPath, config2.npxPath, mode);
426
429
  const mcpBPath = path2.join(config2.projectBPath, ".mcp.json");
427
430
  if (mcpB === "created") created.push(mcpBPath);
428
431
  else modified.push(mcpBPath);
@@ -565,6 +568,11 @@ async function runWizard() {
565
568
  const idB = await ask(rl, "Peer ID for Project B:", defaultIdB);
566
569
  const defaultLabelB = "CC_" + path3.basename(pathB).replace(/[^a-zA-Z0-9]/g, "_");
567
570
  const labelB = await ask(rl, "Label for Project B:", defaultLabelB);
571
+ const modeIdx = await choose(rl, "How should these agents connect?", [
572
+ "Cloud \u2014 collaborate with remote agents over cogent.tools (recommended)",
573
+ "Local \u2014 offline, this machine only (self-hosted / local-LLM / air-gapped)"
574
+ ]);
575
+ const mode2 = modeIdx === 1 ? "local" : "cloud";
568
576
  heading("Configuring projects");
569
577
  const result = scaffoldReal({
570
578
  projectAPath: path3.resolve(pathA),
@@ -573,7 +581,8 @@ async function runWizard() {
573
581
  projectBPath: path3.resolve(pathB),
574
582
  projectBId: idB,
575
583
  projectBLabel: labelB,
576
- npxPath
584
+ npxPath,
585
+ mode: mode2
577
586
  });
578
587
  printRealNextSteps(path3.resolve(pathA), idA, labelA, path3.resolve(pathB), idB, labelB, result);
579
588
  }
@@ -26380,8 +26389,8 @@ var init_stdio2 = __esm({
26380
26389
  // src/constants.ts
26381
26390
  import { createRequire } from "node:module";
26382
26391
  function resolveVersion() {
26383
- if ("3.14.0") {
26384
- return "3.14.0";
26392
+ if ("3.14.1") {
26393
+ return "3.14.1";
26385
26394
  }
26386
26395
  try {
26387
26396
  const require2 = createRequire(import.meta.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@essentialai/cogent-plugin",
3
- "version": "3.14.0",
3
+ "version": "3.14.1",
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",