@essentialai/cogent-server 3.4.2 → 3.5.0

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.
Files changed (110) hide show
  1. package/dist/__tests__/helpers.d.ts +5 -2
  2. package/dist/__tests__/helpers.d.ts.map +1 -1
  3. package/dist/__tests__/helpers.js +11 -4
  4. package/dist/__tests__/helpers.js.map +1 -1
  5. package/dist/__tests__/services/session-store-contract.d.ts +17 -0
  6. package/dist/__tests__/services/session-store-contract.d.ts.map +1 -0
  7. package/dist/__tests__/services/session-store-contract.js +186 -0
  8. package/dist/__tests__/services/session-store-contract.js.map +1 -0
  9. package/dist/app.d.ts +9 -0
  10. package/dist/app.d.ts.map +1 -1
  11. package/dist/app.js +18 -2
  12. package/dist/app.js.map +1 -1
  13. package/dist/config.d.ts +14 -0
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +44 -0
  16. package/dist/config.js.map +1 -1
  17. package/dist/contract/control-plane-contract.d.ts +93 -0
  18. package/dist/contract/control-plane-contract.d.ts.map +1 -0
  19. package/dist/contract/control-plane-contract.js +72 -0
  20. package/dist/contract/control-plane-contract.js.map +1 -0
  21. package/dist/db/index.d.ts +5 -0
  22. package/dist/db/index.d.ts.map +1 -0
  23. package/dist/db/index.js +3 -0
  24. package/dist/db/index.js.map +1 -0
  25. package/dist/db/migrate-cli.d.ts +2 -0
  26. package/dist/db/migrate-cli.d.ts.map +1 -0
  27. package/dist/db/migrate-cli.js +54 -0
  28. package/dist/db/migrate-cli.js.map +1 -0
  29. package/dist/db/migrate.d.ts +31 -0
  30. package/dist/db/migrate.d.ts.map +1 -0
  31. package/dist/db/migrate.js +98 -0
  32. package/dist/db/migrate.js.map +1 -0
  33. package/dist/db/migrations/0001_init_sessions.down.sql +4 -0
  34. package/dist/db/migrations/0001_init_sessions.up.sql +46 -0
  35. package/dist/db/migrations/0002_org_quotas.down.sql +2 -0
  36. package/dist/db/migrations/0002_org_quotas.up.sql +13 -0
  37. package/dist/db/pool.d.ts +39 -0
  38. package/dist/db/pool.d.ts.map +1 -0
  39. package/dist/db/pool.js +72 -0
  40. package/dist/db/pool.js.map +1 -0
  41. package/dist/index.js +33 -3
  42. package/dist/index.js.map +1 -1
  43. package/dist/middleware/auth.d.ts.map +1 -1
  44. package/dist/middleware/auth.js +32 -0
  45. package/dist/middleware/auth.js.map +1 -1
  46. package/dist/middleware/control-plane-auth.d.ts +17 -0
  47. package/dist/middleware/control-plane-auth.d.ts.map +1 -0
  48. package/dist/middleware/control-plane-auth.js +35 -0
  49. package/dist/middleware/control-plane-auth.js.map +1 -0
  50. package/dist/routes/control-plane.d.ts +20 -0
  51. package/dist/routes/control-plane.d.ts.map +1 -0
  52. package/dist/routes/control-plane.js +122 -0
  53. package/dist/routes/control-plane.js.map +1 -0
  54. package/dist/routes/messages.d.ts.map +1 -1
  55. package/dist/routes/messages.js +18 -0
  56. package/dist/routes/messages.js.map +1 -1
  57. package/dist/routes/poll.js +2 -2
  58. package/dist/routes/poll.js.map +1 -1
  59. package/dist/routes/sessions.d.ts +24 -1
  60. package/dist/routes/sessions.d.ts.map +1 -1
  61. package/dist/routes/sessions.js +135 -14
  62. package/dist/routes/sessions.js.map +1 -1
  63. package/dist/routes/validation-hook.d.ts +31 -0
  64. package/dist/routes/validation-hook.d.ts.map +1 -1
  65. package/dist/routes/validation-hook.js +3 -0
  66. package/dist/routes/validation-hook.js.map +1 -1
  67. package/dist/services/auth-service.d.ts +5 -45
  68. package/dist/services/auth-service.d.ts.map +1 -1
  69. package/dist/services/auth-service.js +5 -60
  70. package/dist/services/auth-service.js.map +1 -1
  71. package/dist/services/connection-manager.d.ts +15 -0
  72. package/dist/services/connection-manager.d.ts.map +1 -1
  73. package/dist/services/connection-manager.js +29 -0
  74. package/dist/services/connection-manager.js.map +1 -1
  75. package/dist/services/join-rate-limiter.d.ts +50 -0
  76. package/dist/services/join-rate-limiter.d.ts.map +1 -0
  77. package/dist/services/join-rate-limiter.js +89 -0
  78. package/dist/services/join-rate-limiter.js.map +1 -0
  79. package/dist/services/obs-log.d.ts +51 -0
  80. package/dist/services/obs-log.d.ts.map +1 -0
  81. package/dist/services/obs-log.js +93 -0
  82. package/dist/services/obs-log.js.map +1 -0
  83. package/dist/services/session-store-memory.d.ts +60 -0
  84. package/dist/services/session-store-memory.d.ts.map +1 -0
  85. package/dist/services/session-store-memory.js +189 -0
  86. package/dist/services/session-store-memory.js.map +1 -0
  87. package/dist/services/session-store-postgres.d.ts +60 -0
  88. package/dist/services/session-store-postgres.d.ts.map +1 -0
  89. package/dist/services/session-store-postgres.js +393 -0
  90. package/dist/services/session-store-postgres.js.map +1 -0
  91. package/dist/services/session-store.d.ts +73 -5
  92. package/dist/services/session-store.d.ts.map +1 -1
  93. package/dist/services/session-store.js +62 -16
  94. package/dist/services/session-store.js.map +1 -1
  95. package/dist/types.d.ts +13 -0
  96. package/dist/types.d.ts.map +1 -1
  97. package/dist/ui/components/Layout.d.ts.map +1 -1
  98. package/dist/ui/components/Layout.js +1 -1
  99. package/dist/ui/components/Layout.js.map +1 -1
  100. package/dist/ui/components/Terminal.js +1 -1
  101. package/dist/ui/components/Terminal.js.map +1 -1
  102. package/dist/ui/pages/LandingPage.d.ts +2 -2
  103. package/dist/ui/pages/LandingPage.d.ts.map +1 -1
  104. package/dist/ui/pages/LandingPage.js +103 -66
  105. package/dist/ui/pages/LandingPage.js.map +1 -1
  106. package/dist/ui/styles/theme.d.ts +35 -22
  107. package/dist/ui/styles/theme.d.ts.map +1 -1
  108. package/dist/ui/styles/theme.js +57 -28
  109. package/dist/ui/styles/theme.js.map +1 -1
  110. package/package.json +11 -6
@@ -1,15 +1,26 @@
1
1
  import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { BridgeError, ErrorCode } from "@essentialai/cogent";
4
+ /**
5
+ * Compute the label-index key. Free channels (no orgScope) use the BARE label
6
+ * so global free-channel uniqueness and resolution are unchanged (NFR6).
7
+ * Business channels namespace the label by their org scope, so two orgs can
8
+ * both hold `sprint-42` (Map keys compare by strict ===, so distinct strings
9
+ * are distinct keys).
10
+ */
11
+ export function labelIndexKey(label, orgScope) {
12
+ return orgScope === undefined ? label : `${orgScope}::${label}`;
13
+ }
4
14
  /**
5
15
  * Per-session JSON file store with in-memory locking and atomic writes.
16
+ * The single-tenant (free relay) implementation of {@link SessionStore}.
6
17
  *
7
18
  * Each session is stored as `{sessionId}.json` in the state directory.
8
19
  * A per-session promise-chain mutex prevents lost updates from concurrent
9
20
  * requests targeting the same session. An in-memory Map provides O(1)
10
21
  * token-to-session lookup, rebuilt from disk on startup.
11
22
  */
12
- export class SessionStore {
23
+ export class FileSessionStore {
13
24
  stateDir;
14
25
  maxMessagesPerSession;
15
26
  /** Per-session promise-chain mutex. */
@@ -57,7 +68,7 @@ export class SessionStore {
57
68
  * Create a new session with the given ID, label, secret hash, and initial token.
58
69
  * Throws INVALID_INPUT if a session file already exists for this ID.
59
70
  */
60
- async createSession(sessionId, label, secretHash, tokenEntry, creatorIp) {
71
+ async createSession(sessionId, label, secretHash, tokenEntry, creatorIp, org) {
61
72
  return this._withLock(sessionId, async () => {
62
73
  const filePath = this._filePath(sessionId);
63
74
  // Check if session file already exists
@@ -71,14 +82,15 @@ export class SessionStore {
71
82
  throw err;
72
83
  // Otherwise, file doesn't exist -- proceed
73
84
  }
74
- // Enforce label uniqueness before creating
75
- if (label !== undefined && this.isLabelTaken(label)) {
85
+ // Enforce label uniqueness within the org scope before creating
86
+ if (label !== undefined && this.isLabelTaken(label, org?.scope)) {
76
87
  throw new BridgeError(ErrorCode.INVALID_INPUT, `Label "${label}" already in use`, "Choose a different label");
77
88
  }
78
89
  const state = {
79
90
  sessionId,
80
91
  ...(label !== undefined ? { label } : {}),
81
92
  secretHash,
93
+ ...(org !== undefined ? { orgIdHash: org.idHash, orgScope: org.scope } : {}),
82
94
  tokens: [tokenEntry],
83
95
  createdAt: new Date().toISOString(),
84
96
  ...(creatorIp ? { creatorIp } : {}),
@@ -167,9 +179,9 @@ export class SessionStore {
167
179
  for (const token of state.tokens) {
168
180
  this.tokenIndex.delete(token.tokenHash);
169
181
  }
170
- // Remove label from the label index
182
+ // Remove label from the label index (scoped key)
171
183
  if (state.label) {
172
- this.labelIndex.delete(state.label);
184
+ this.labelIndex.delete(labelIndexKey(state.label, state.orgScope));
173
185
  }
174
186
  }
175
187
  catch {
@@ -189,8 +201,9 @@ export class SessionStore {
189
201
  }
190
202
  }
191
203
  });
192
- // Clean up the lock entry after completion
193
- this.locks.delete(sessionId);
204
+ // Note: the lock entry is pruned inside _withLock's finally (prune-if-mine),
205
+ // never deleted out-of-band here -- doing so could evict a queued waiter's
206
+ // promise and let a later op start an unsynchronized parallel chain.
194
207
  }
195
208
  /**
196
209
  * List all session IDs by scanning .json files in the state directory.
@@ -201,6 +214,24 @@ export class SessionStore {
201
214
  .filter((f) => f.endsWith(".json") && f !== "global-stats.json" && f !== "platform-stats.json")
202
215
  .map((f) => f.slice(0, -5));
203
216
  }
217
+ async countAgentsByOrgScope(orgScope) {
218
+ // The file store is the FREE single-tenant relay, where sessions carry no
219
+ // orgScope — so this is effectively always 0. Implemented faithfully anyway
220
+ // (iterate + sum matching peers) so the interface contract holds everywhere.
221
+ const ids = await this.listSessions();
222
+ let total = 0;
223
+ for (const id of ids) {
224
+ const state = await this.getSession(id);
225
+ if (state && state.orgScope === orgScope) {
226
+ total += Object.keys(state.peers).length;
227
+ }
228
+ }
229
+ return total;
230
+ }
231
+ async setOrgQuota(_orgScope, _tier, _maxChannels, _maxAgents) {
232
+ // No-op: the free single-tenant relay has no per-org quotas to enforce. The
233
+ // Business Edition uses PostgresSessionStore, which persists the org_quotas row.
234
+ }
204
235
  /**
205
236
  * Return the token-to-session index (read-only) for auth middleware.
206
237
  */
@@ -211,14 +242,14 @@ export class SessionStore {
211
242
  * Look up a session ID by its human-readable label.
212
243
  * Returns null if no session has the given label.
213
244
  */
214
- getSessionIdByLabel(label) {
215
- return this.labelIndex.get(label) ?? null;
245
+ getSessionIdByLabel(label, orgScope) {
246
+ return this.labelIndex.get(labelIndexKey(label, orgScope)) ?? null;
216
247
  }
217
248
  /**
218
- * Check whether a label is already in use by an existing session.
249
+ * Check whether a label is already in use within the given org scope.
219
250
  */
220
- isLabelTaken(label) {
221
- return this.labelIndex.has(label);
251
+ isLabelTaken(label, orgScope) {
252
+ return this.labelIndex.has(labelIndexKey(label, orgScope));
222
253
  }
223
254
  // --- Private methods ---
224
255
  /**
@@ -275,6 +306,13 @@ export class SessionStore {
275
306
  }
276
307
  finally {
277
308
  release();
309
+ // Prune the lock entry only if it is still the one WE installed (no later
310
+ // caller has chained onto it). This bounds the map's growth without ever
311
+ // evicting an in-flight waiter's promise -- the reason deleteSession must
312
+ // NOT delete the key out-of-band.
313
+ if (this.locks.get(sessionId) === next) {
314
+ this.locks.delete(sessionId);
315
+ }
278
316
  }
279
317
  }
280
318
  /**
@@ -287,11 +325,19 @@ export class SessionStore {
287
325
  }
288
326
  /**
289
327
  * Rebuild the label index entry for a single session.
328
+ *
329
+ * Fail-closed migration guard: a legacy business session (orgIdHash set but no
330
+ * orgScope — e.g. created before per-org scoping) must NOT be indexed under the
331
+ * public bare key, or its label would become cross-org enumerable via the
332
+ * public resolve endpoint. We cannot backfill orgScope (orgId is only stored
333
+ * hashed), so we skip indexing it; the channel remains usable by sessionId.
290
334
  */
291
335
  _rebuildLabelIndex(state) {
292
- if (state.label) {
293
- this.labelIndex.set(state.label, state.sessionId);
294
- }
336
+ if (!state.label)
337
+ return;
338
+ if (state.orgIdHash !== undefined && state.orgScope === undefined)
339
+ return;
340
+ this.labelIndex.set(labelIndexKey(state.label, state.orgScope), state.sessionId);
295
341
  }
296
342
  /** Compute the file path for a session ID. */
297
343
  _filePath(sessionId) {
@@ -1 +1 @@
1
- {"version":3,"file":"session-store.js","sourceRoot":"","sources":["../../src/services/session-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAA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C;IAEzB,gBAAgB;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,qBAAqB;QACzB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;YAChE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,2BAA2B;QAC/B,MAAM,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAClD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACjD,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,aAAqB;QACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;QACjD,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QACxE,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;CACF"}
package/dist/types.d.ts CHANGED
@@ -40,6 +40,19 @@ export interface SessionFileState {
40
40
  label?: string;
41
41
  /** bcrypt hash of the plaintext secret -- never stored in plaintext. */
42
42
  secretHash: string;
43
+ /**
44
+ * bcrypt hash of the Org_ID (Business Edition 3rd join credential).
45
+ * Presence marks this as an Org_ID-gated business channel; absent on free
46
+ * channels. Optional so existing/free session files parse unchanged.
47
+ */
48
+ orgIdHash?: string;
49
+ /**
50
+ * Stable, non-secret per-org grouping key (SHA-256 of the Org_ID) used to
51
+ * scope channel labels so two orgs can share a label without collision.
52
+ * Deterministic (unlike the salted orgIdHash) — used ONLY for label scoping,
53
+ * never for auth. Absent on free channels.
54
+ */
55
+ orgScope?: string;
43
56
  /** Active bearer tokens for this session. */
44
57
  tokens: TokenEntry[];
45
58
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE9E;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,EAAE,aAAa,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,UAAU,E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;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAsBlC,CAAC"}
1
+ {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAInC,sCAAsC;AACtC,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAwBlC,CAAC"}
@@ -5,7 +5,7 @@ import { globalStyles } from "../styles/theme.js";
5
5
  * Base HTML shell with head, meta tags, Google Fonts, and global styles.
6
6
  * Wraps every page with consistent document structure.
7
7
  */
8
- export const Layout = ({ title, children }) => (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charset: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsxs("title", { children: [title, " | COGENT"] }), _jsx(Style, {}), _jsx("link", { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap" }), _jsx("link", { rel: "icon", href: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='2' fill='%230d1117'/><path d='M12 3H5a2 2 0 00-2 2v6a2 2 0 002 2h7v-2H5V5h7V3z' fill='%2300ff41'/></svg>" }), _jsx("script", { async: true, src: "https://www.googletagmanager.com/gtag/js?id=G-6DKTK06CZT" }), _jsx("script", { dangerouslySetInnerHTML: {
8
+ export const Layout = ({ title, children }) => (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charset: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsxs("title", { children: [title, " \u00B7 Cogent"] }), _jsx(Style, {}), _jsx("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), _jsx("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" }), _jsx("link", { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap" }), _jsx("link", { rel: "icon", href: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='3' fill='%230a0c0f'/><circle cx='8' cy='8' r='3.4' fill='%23c9f24e'/></svg>" }), _jsx("script", { async: true, src: "https://www.googletagmanager.com/gtag/js?id=G-6DKTK06CZT" }), _jsx("script", { dangerouslySetInnerHTML: {
9
9
  __html: `window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-6DKTK06CZT');`
10
10
  } })] }), _jsx("body", { class: globalStyles, children: children })] }));
11
11
  //# sourceMappingURL=Layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/ui/components/Layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQlD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9D,gBAAM,IAAI,EAAC,IAAI,aACb,2BACE,eAAM,OAAO,EAAC,OAAO,GAAG,EACxB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACtE,4BAAQ,KAAK,iBAAkB,EAC/B,KAAC,KAAK,KAAG,EACT,eACE,GAAG,EAAC,YAAY,EAChB,IAAI,EAAC,mFAAmF,GACxF,EACF,eACE,GAAG,EAAC,MAAM,EACV,IAAI,EAAC,0NAA0N,GAC/N,EACF,iBAAQ,KAAK,QAAC,GAAG,EAAC,0DAA0D,GAAG,EAC/E,iBAAQ,uBAAuB,EAAE;wBAC/B,MAAM,EAAE,uIAAuI;qBAChJ,GAAI,IACA,EACP,eAAM,KAAK,EAAE,YAAY,YAAG,QAAQ,GAAQ,IACvC,CACR,CAAC"}
1
+ {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/ui/components/Layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQlD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC9D,gBAAM,IAAI,EAAC,IAAI,aACb,2BACE,eAAM,OAAO,EAAC,OAAO,GAAG,EACxB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACtE,4BAAQ,KAAK,sBAAkB,EAC/B,KAAC,KAAK,KAAG,EACT,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAC,8BAA8B,GAAG,EAC7D,eAAM,GAAG,EAAC,YAAY,EAAC,IAAI,EAAC,2BAA2B,EAAC,WAAW,EAAC,EAAE,GAAG,EACzE,eACE,GAAG,EAAC,YAAY,EAChB,IAAI,EAAC,gLAAgL,GACrL,EACF,eACE,GAAG,EAAC,MAAM,EACV,IAAI,EAAC,6LAA6L,GAClM,EACF,iBAAQ,KAAK,QAAC,GAAG,EAAC,0DAA0D,GAAG,EAC/E,iBAAQ,uBAAuB,EAAE;wBAC/B,MAAM,EAAE,uIAAuI;qBAChJ,GAAI,IACA,EACP,eAAM,KAAK,EAAE,YAAY,YAAG,QAAQ,GAAQ,IACvC,CACR,CAAC"}
@@ -33,5 +33,5 @@ const contentArea = css `
33
33
  * Terminal-styled container with optional header bar (colored dots + title)
34
34
  * and padded content area. Used to wrap code blocks and guide sections.
35
35
  */
36
- export const Terminal = ({ title, children }) => (_jsxs("div", { class: terminalWrapper, children: [title && (_jsxs("div", { class: headerBar, children: [_jsx("span", { class: dot, style: "background: #f85149;" }), _jsx("span", { class: dot, style: "background: #e3b341;" }), _jsx("span", { class: dot, style: "background: #00ff41;" }), _jsx("span", { class: titleText, children: title })] })), _jsx("div", { class: contentArea, children: children })] }));
36
+ export const Terminal = ({ title, children }) => (_jsxs("div", { class: terminalWrapper, children: [title && (_jsxs("div", { class: headerBar, children: [_jsx("span", { class: dot, style: `background: ${colors.red};` }), _jsx("span", { class: dot, style: `background: ${colors.amber};` }), _jsx("span", { class: dot, style: `background: ${colors.green};` }), _jsx("span", { class: titleText, children: title })] })), _jsx("div", { class: contentArea, children: children })] }));
37
37
  //# sourceMappingURL=Terminal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Terminal.js","sourceRoot":"","sources":["../../../src/ui/components/Terminal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ5C,MAAM,eAAe,GAA2B,GAAG,CAAA;gBACnC,MAAM,CAAC,UAAU;sBACX,MAAM,CAAC,MAAM;;;CAGlC,CAAC;AAEF,MAAM,SAAS,GAA2B,GAAG,CAAA;;;6BAGhB,MAAM,CAAC,MAAM;;;;CAIzC,CAAC;AAEF,MAAM,GAAG,GAA2B,GAAG,CAAA;;;;;CAKtC,CAAC;AAEF,MAAM,SAAS,GAA2B,GAAG,CAAA;WAClC,MAAM,CAAC,SAAS;;;CAG1B,CAAC;AAEF,MAAM,WAAW,GAA2B,GAAG,CAAA;;CAE9C,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAClE,eAAK,KAAK,EAAE,eAAe,aACxB,KAAK,IAAI,CACR,eAAK,KAAK,EAAE,SAAS,aACnB,eAAM,K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G,EAAE,KAAK,EAAE,eAAe,MAAM,CAAC,KAAK,GAAG,GAAI,EAC3D,eAAM,KAAK,EAAE,SAAS,YAAG,KAAK,GAAQ,IAClC,CACP,EACD,cAAK,KAAK,EAAE,WAAW,YAAG,QAAQ,GAAO,IACrC,CACP,CAAC"}
@@ -5,8 +5,8 @@ interface LandingPageProps {
5
5
  stats: ServerStats;
6
6
  }
7
7
  /**
8
- * Full landing page with hero, live stats, installation instructions,
9
- * connection guide, and SSE script for real-time stat updates.
8
+ * Full landing page with editorial hero + CTA, live stats, installation
9
+ * instructions, connection guide, and SSE script for real-time stat updates.
10
10
  */
11
11
  export declare const LandingPage: FC<LandingPageProps>;
12
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"LandingPage.d.ts","sourceRoot":"","sources":["../../../src/ui/pages/LandingPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAMnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,2CAA2C;AAC3C,UAAU,gBAAgB;IACxB,KAAK,EAAE,WAAW,CAAC;CACpB;AAsMD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsQ5C,CAAC"}
1
+ {"version":3,"file":"LandingPage.d.ts","sourceRoot":"","sources":["../../../src/ui/pages/LandingPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAMnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,2CAA2C;AAC3C,UAAU,gBAAgB;IACxB,KAAK,EAAE,WAAW,CAAC;CACpB;AAmPD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAyP5C,CAAC"}
@@ -3,7 +3,7 @@ import { css } from "hono/css";
3
3
  import { Layout } from "../components/Layout.js";
4
4
  import { StatCard } from "../components/StatCard.js";
5
5
  import { Terminal } from "../components/Terminal.js";
6
- import { colors, cursorBlink } from "../styles/theme.js";
6
+ import { colors } from "../styles/theme.js";
7
7
  // --- Styles ---
8
8
  const container = css `
9
9
  max-width: 960px;
@@ -12,67 +12,119 @@ const container = css `
12
12
  `;
13
13
  const heroSection = css `
14
14
  text-align: center;
15
- padding: 3rem 0 2rem;
16
- `;
17
- const heroTitle = css `
18
- font-size: 2.5rem;
19
- font-weight: 700;
15
+ padding: 4rem 0 2.5rem;
16
+ background: radial-gradient(ellipse 60% 60% at 50% 0%, ${colors.accentSoft}, transparent 70%);
17
+ `;
18
+ const kicker = css `
19
+ font-family: ${"'Geist Mono', ui-monospace, monospace"};
20
+ font-size: 0.72rem;
21
+ letter-spacing: 0.18em;
22
+ text-transform: uppercase;
20
23
  color: ${colors.green};
21
- margin: 0 0 0.75rem 0;
24
+ margin: 0 0 1.1rem 0;
22
25
  `;
23
- const asciiLogo = css `
24
- font-size: 0.45rem;
25
- line-height: 1.15;
26
- margin: 0;
27
- color: ${colors.green};
28
- font-family: inherit;
29
- display: inline-block;
30
- text-align: left;
26
+ const heroTitle = css `
27
+ font-size: clamp(2.3rem, 5.2vw, 3.6rem);
28
+ color: ${colors.text};
29
+ margin: 0 auto 1rem;
30
+ max-width: 18ch;
31
31
  `;
32
32
  const heroSubtitle = css `
33
- font-size: 1rem;
33
+ font-size: 1.05rem;
34
34
  color: ${colors.textMuted};
35
- margin: 0;
35
+ margin: 0 auto;
36
+ max-width: 46ch;
37
+ line-height: 1.6;
36
38
  `;
37
- const cursor = css `
38
- display: inline-block;
39
- width: 3px;
40
- height: 2.85rem;
39
+ const ctaRow = css `
40
+ display: flex;
41
+ gap: 0.85rem;
42
+ flex-wrap: wrap;
43
+ justify-content: center;
44
+ margin: 2.2rem 0 1.1rem;
45
+ `;
46
+ const ctaPrimary = css `
47
+ display: inline-flex;
48
+ align-items: center;
41
49
  background: ${colors.green};
42
- margin-left: 4px;
43
- vertical-align: bottom;
44
- animation: ${cursorBlink} 1s step-end infinite;
50
+ color: ${colors.textOnAccent};
51
+ font-weight: 600;
52
+ font-size: 0.95rem;
53
+ padding: 0.8rem 1.6rem;
54
+ border-radius: 999px;
55
+ box-shadow: 0 0 0 1px ${colors.borderGlow}, 0 10px 44px -14px rgba(201, 242, 78, 0.28);
56
+ transition: background 0.2s, transform 0.2s;
57
+ &:hover {
58
+ background: ${colors.greenHover};
59
+ text-decoration: none;
60
+ transform: translateY(-1px);
61
+ }
62
+ `;
63
+ const ctaSecondary = css `
64
+ display: inline-flex;
65
+ align-items: center;
66
+ color: ${colors.text};
67
+ font-weight: 500;
68
+ font-size: 0.95rem;
69
+ padding: 0.8rem 1.5rem;
70
+ border: 1px solid ${colors.border};
71
+ border-radius: 999px;
72
+ transition: border-color 0.2s, color 0.2s;
73
+ &:hover {
74
+ border-color: ${colors.green};
75
+ color: ${colors.text};
76
+ text-decoration: none;
77
+ }
78
+ `;
79
+ const teamUpsell = css `
80
+ margin: 1.4rem 0 0;
81
+ font-size: 0.88rem;
82
+ color: ${colors.textMuted};
83
+ & a {
84
+ color: ${colors.green};
85
+ font-weight: 600;
86
+ }
87
+ `;
88
+ const byline = css `
89
+ margin: 0.6rem 0 0;
90
+ font-size: 0.8rem;
91
+ color: ${colors.textFaint};
92
+ & a {
93
+ color: inherit;
94
+ }
45
95
  `;
46
96
  const statsRow = css `
47
97
  display: flex;
48
98
  gap: 1.5rem;
49
99
  flex-wrap: wrap;
50
100
  justify-content: center;
51
- margin: 2rem 0 3rem;
101
+ margin: 1.5rem 0 3.5rem;
52
102
  `;
53
103
  const section = css `
54
104
  margin-bottom: 2.5rem;
55
105
  `;
56
106
  const sectionTitle = css `
57
- font-size: 1.1rem;
107
+ font-size: 1.4rem;
58
108
  color: ${colors.text};
59
109
  margin: 0 0 1rem 0;
60
- font-weight: 700;
110
+ font-weight: 600;
61
111
  `;
62
112
  const codeBlock = css `
63
113
  background: ${colors.bg};
64
114
  border: 1px solid ${colors.border};
65
- border-radius: 4px;
115
+ border-radius: 8px;
66
116
  padding: 1rem;
67
117
  color: ${colors.green};
68
- font-size: 0.9rem;
118
+ font-family: ${"'Geist Mono', ui-monospace, monospace"};
119
+ font-size: 0.88rem;
69
120
  overflow-x: auto;
70
121
  white-space: pre;
71
122
  margin: 0.75rem 0;
72
123
  `;
73
124
  const noteText = css `
74
125
  color: ${colors.textMuted};
75
- font-size: 0.85rem;
126
+ font-size: 0.9rem;
127
+ line-height: 1.6;
76
128
  margin: 0.75rem 0;
77
129
  `;
78
130
  const stepNumber = css `
@@ -81,6 +133,7 @@ const stepNumber = css `
81
133
  `;
82
134
  const stepCommand = css `
83
135
  color: ${colors.green};
136
+ font-family: ${"'Geist Mono', ui-monospace, monospace"};
84
137
  `;
85
138
  const stepLine = css `
86
139
  margin: 0.75rem 0;
@@ -88,41 +141,43 @@ const stepLine = css `
88
141
  `;
89
142
  const promptChar = css `
90
143
  color: ${colors.textMuted};
144
+ font-family: ${"'Geist Mono', ui-monospace, monospace"};
91
145
  margin-right: 0.5rem;
92
146
  `;
93
147
  const howToLink = css `
94
148
  display: block;
95
149
  background: ${colors.bgCard};
96
150
  border: 1px solid ${colors.border};
97
- border-radius: 8px;
151
+ border-radius: 12px;
98
152
  padding: 1.5rem 2rem;
99
153
  text-align: center;
100
154
  text-decoration: none;
101
155
  transition: border-color 0.2s;
102
- margin-bottom: 2.5rem;
156
+ margin-bottom: 1.25rem;
103
157
  &:hover {
104
158
  border-color: ${colors.green};
105
159
  text-decoration: none;
106
160
  }
107
161
  `;
108
162
  const howToTitle = css `
109
- font-size: 1.1rem;
163
+ font-size: 1.05rem;
110
164
  color: ${colors.green};
111
- font-weight: 700;
165
+ font-weight: 600;
112
166
  margin: 0 0 0.5rem 0;
113
167
  `;
114
168
  const howToDesc = css `
115
- font-size: 0.85rem;
169
+ font-size: 0.88rem;
116
170
  color: ${colors.textMuted};
117
171
  margin: 0;
172
+ line-height: 1.6;
118
173
  `;
119
174
  const footer = css `
120
175
  text-align: center;
121
- padding: 2rem 0;
122
- color: ${colors.textMuted};
123
- font-size: 0.8rem;
176
+ padding: 2.5rem 0 2rem;
177
+ color: ${colors.textFaint};
178
+ font-size: 0.82rem;
124
179
  border-top: 1px solid ${colors.border};
125
- margin-top: 2rem;
180
+ margin-top: 3rem;
126
181
  `;
127
182
  const platformGrid = css `
128
183
  display: grid;
@@ -133,7 +188,7 @@ const platformGrid = css `
133
188
  const platformCard = css `
134
189
  background: ${colors.bgCard};
135
190
  border: 1px solid ${colors.border};
136
- border-radius: 8px;
191
+ border-radius: 12px;
137
192
  padding: 1.25rem 1.5rem;
138
193
  transition: border-color 0.2s;
139
194
  &:hover {
@@ -141,30 +196,17 @@ const platformCard = css `
141
196
  }
142
197
  & h3 {
143
198
  font-size: 1rem;
144
- font-weight: 700;
145
- color: ${colors.green};
199
+ font-weight: 600;
200
+ color: ${colors.text};
146
201
  margin: 0 0 0.5rem 0;
147
- font-family: inherit;
148
202
  }
149
203
  & p {
150
- font-size: 0.85rem;
204
+ font-size: 0.88rem;
151
205
  color: ${colors.textMuted};
152
206
  margin: 0;
153
- line-height: 1.5;
207
+ line-height: 1.55;
154
208
  }
155
209
  `;
156
- // --- JSON config snippet for manual setup ---
157
- const mcpConfigSnippet = `{
158
- "mcpServers": {
159
- "cogent-bridge": {
160
- "command": "npx",
161
- "args": ["-y", "@essentialai/cogent-bridge"],
162
- "env": {
163
- "COGENT_ENDPOINT": "https://cogent.tools"
164
- }
165
- }
166
- }
167
- }`;
168
210
  // --- SSE inline script ---
169
211
  const sseScript = `
170
212
  const es = new EventSource('/ui/stats/stream');
@@ -177,16 +219,11 @@ const sseScript = `
177
219
  });
178
220
  `;
179
221
  /**
180
- * Full landing page with hero, live stats, installation instructions,
181
- * connection guide, and SSE script for real-time stat updates.
222
+ * Full landing page with editorial hero + CTA, live stats, installation
223
+ * instructions, connection guide, and SSE script for real-time stat updates.
182
224
  */
183
- export const LandingPage = ({ stats }) => (_jsx(Layout, { title: "COGENT", children: _jsxs("div", { class: container, children: [_jsxs("div", { class: heroSection, children: [_jsxs("h1", { class: heroTitle, children: [_jsx("pre", { class: asciiLogo, children: ` ██████╗ ██████╗ ██████╗ ███████╗███╗ ██╗████████╗
184
- ██╔════╝██╔═══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
185
- ██║ ██║ ██║██║ ███╗█████╗ ██╔██╗ ██║ ██║
186
- ██║ ██║ ██║██║ ██║██╔══╝ ██║╚██╗██║ ██║
187
- ╚██████╗╚██████╔╝╚██████╔╝███████╗██║ ╚████║ ██║
188
- ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝` }), _jsx("span", { class: cursor })] }), _jsx("p", { class: heroSubtitle, children: "Real-time relay for AI coding agents \u2014 Claude Code, OpenAI Codex, and Slack" }), _jsxs("p", { class: heroSubtitle, style: "margin-top: 0.5rem; font-size: 0.8rem;", children: ["by ", _jsx("a", { href: "https://essentialai.uk", style: "color: inherit; text-decoration: none;", children: "Essential AI Solutions" })] }), _jsx("p", { class: heroSubtitle, style: "margin-top: 1rem;", children: _jsx("a", { href: "/how-to", style: `color: ${colors.green}; font-weight: 700;`, children: "How-To Guide \u2192" }) })] }), _jsxs("div", { class: statsRow, children: [_jsx(StatCard, { id: "stat-sessions", value: stats.activeSessions, label: "Active Sessions" }), _jsx(StatCard, { id: "stat-agents", value: stats.connectedAgents, label: "Connected Agents" }), _jsx(StatCard, { id: "stat-messages", value: stats.totalMessagesRelayed, label: "Messages Relayed" })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Install via Plugin Marketplace (Recommended)" }), _jsxs(Terminal, { title: "Two Commands \u2014 Full Setup", children: [_jsx("p", { class: noteText, children: "Install the plugin with slash commands, auto-discovery, and cloud relay:" }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin marketplace add https://github.com/eaisdevelopment/cogent.git" })] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin install cogent@cogent" })] }), _jsxs("p", { class: noteText, children: ["Restart Claude Code. Use ", _jsx("span", { class: stepCommand, children: "/cogent:register" }), " to join the bridge \u2014 session discovery, registration, and message protocol are handled automatically."] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Alternative: Manual MCP Setup" }), _jsxs(Terminal, { title: "MCP Tools Only (No Slash Commands)", children: [_jsx("p", { class: noteText, children: "Or use a single command to register the MCP server directly:" }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude mcp add cogent -e COGENT_ENDPOINT=https://cogent.tools -s user -- npx -y @essentialai/cogent-bridge" })] }), _jsxs("p", { class: noteText, children: ["This gives you the six ", _jsx("span", { class: stepCommand, children: "cogent_" }), " MCP tools. For slash commands (", _jsx("span", { class: stepCommand, children: "/cogent:register" }), ", etc.), use the Plugin Marketplace above."] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "OpenAI Codex" }), _jsxs(Terminal, { title: "Add COGENT to Codex", children: [_jsx("p", { class: noteText, children: "Register the Cogent MCP server (works on all Codex CLI versions):" }), _jsx("pre", { class: codeBlock, children: `codex mcp add cogent \\
225
+ export const LandingPage = ({ stats }) => (_jsx(Layout, { title: "Real-time relay for AI coding agents", children: _jsxs("div", { class: container, children: [_jsxs("div", { class: heroSection, children: [_jsx("p", { class: kicker, children: "Free \u00B7 Open Relay" }), _jsx("h1", { class: heroTitle, children: "Real-time relay for your AI coding agents" }), _jsx("p", { class: heroSubtitle, children: "Claude Code, OpenAI Codex, and Slack \u2014 one shared channel, instant messages. Free and open-source." }), _jsxs("div", { class: ctaRow, children: [_jsx("a", { href: "#install", class: ctaPrimary, children: "Get started \u2014 free \u2192" }), _jsx("a", { href: "/how-to", class: ctaSecondary, children: "Read the How-To" })] }), _jsxs("p", { class: teamUpsell, children: ["Running a team?", " ", _jsx("a", { href: "https://portal.cogent.tools", children: "Cogent Team" }), " adds organizations, SSO & billing \u2192"] }), _jsxs("p", { class: byline, children: ["by ", _jsx("a", { href: "https://essentialai.uk", children: "Essential AI Solutions" })] })] }), _jsxs("div", { class: statsRow, children: [_jsx(StatCard, { id: "stat-sessions", value: stats.activeSessions, label: "Active Sessions" }), _jsx(StatCard, { id: "stat-agents", value: stats.connectedAgents, label: "Connected Agents" }), _jsx(StatCard, { id: "stat-messages", value: stats.totalMessagesRelayed, label: "Messages Relayed" })] }), _jsxs("div", { class: section, id: "install", children: [_jsx("h2", { class: sectionTitle, children: "Install via Plugin Marketplace (Recommended)" }), _jsxs(Terminal, { title: "Two Commands \u2014 Full Setup", children: [_jsx("p", { class: noteText, children: "Install the plugin with slash commands, auto-discovery, and cloud relay:" }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin marketplace add https://github.com/eaisdevelopment/cogent.git" })] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin install cogent@cogent" })] }), _jsxs("p", { class: noteText, children: ["Restart Claude Code. Use ", _jsx("span", { class: stepCommand, children: "/cogent:register" }), " to join the bridge \u2014 session discovery, registration, and message protocol are handled automatically."] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Alternative: Manual MCP Setup" }), _jsxs(Terminal, { title: "MCP Tools Only (No Slash Commands)", children: [_jsx("p", { class: noteText, children: "Or use a single command to register the MCP server directly:" }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude mcp add cogent -e COGENT_ENDPOINT=https://cogent.tools -s user -- npx -y @essentialai/cogent-bridge" })] }), _jsxs("p", { class: noteText, children: ["This gives you the six ", _jsx("span", { class: stepCommand, children: "cogent_" }), " MCP tools. For slash commands (", _jsx("span", { class: stepCommand, children: "/cogent:register" }), ", etc.), use the Plugin Marketplace above."] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "OpenAI Codex" }), _jsxs(Terminal, { title: "Add Cogent to Codex", children: [_jsx("p", { class: noteText, children: "Register the Cogent MCP server (works on all Codex CLI versions):" }), _jsx("pre", { class: codeBlock, children: `codex mcp add cogent \\
189
226
  --env COGENT_ENDPOINT=https://cogent.tools \\
190
227
  --env COGENT_PLATFORM=codex \\
191
- -- npx -y @essentialai/cogent-bridge` }), _jsxs("p", { class: noteText, children: ["Restart Codex. This gives you the six ", _jsx("span", { class: stepCommand, children: "cogent_" }), " MCP tools. Use ", _jsx("span", { class: stepCommand, children: "cogent_register_peer" }), " to join the bridge."] }), _jsxs("details", { style: "margin-top: 1rem;", children: [_jsx("summary", { style: `cursor: pointer; color: ${colors.textMuted}; font-size: 0.85rem;`, children: "Plugin Marketplace (Codex CLI 0.133.0+)" }), _jsxs("div", { style: "margin-top: 0.75rem;", children: [_jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "codex plugin marketplace add eaisdevelopment/cogent" })] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "codex plugin add cogent@cogent" })] }), _jsx("p", { class: noteText, children: "Adds skills + MCP tools in one step. Requires Codex CLI 0.133.0 or newer." })] })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Updating to the Latest Version" }), _jsxs(Terminal, { title: "Stay Up to Date", children: [_jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Plugin Marketplace:" }), " Re-run the install command to pull the latest version:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin marketplace add https://github.com/eaisdevelopment/cogent.git" })] }), _jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Manual MCP / Claude Desktop:" }), " If you used ", _jsx("span", { class: stepCommand, children: "npx -y @essentialai/cogent-bridge" }), ", you already get the latest version automatically on each restart. No action needed."] }), _jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Global install:" }), " If you installed globally with npm, update explicitly:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "npm update -g @essentialai/cogent-bridge" })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Quick Start" }), _jsxs(Terminal, { title: "Quick Start", children: [_jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "1." }), " Create a channel with a friendly name"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Create a Cogent channel called "my-project" with secret "team-secret"` })] }), _jsxs("p", { class: noteText, children: ["Returns a channel name (e.g., ", _jsx("span", { class: stepCommand, children: "my-project" }), ") and a secret to share. Omit the name to auto-generate one (e.g., ", _jsx("span", { class: stepCommand, children: "swift-fox-a3f1" }), ")."] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "2." }), " Join from another Claude Code instance using the channel name"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Join Cogent channel "my-project" with secret "team-secret"` })] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "3." }), " Start communicating"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Register as "backend" and send a message to "frontend"` })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Supported Platforms" }), _jsxs("div", { class: platformGrid, children: [_jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\u26A1 Claude Code" }), _jsx("p", { children: "Full auto-relay \u2014 Claude sessions respond automatically to inbound messages." })] }), _jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\uD83E\uDD16 OpenAI Codex" }), _jsx("p", { children: "Channel messaging \u2014 Codex agents send and receive via MCP tools. Auto-relay via plugin (v3.4+)." })] }), _jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\uD83D\uDCAC Slack" }), _jsx("p", { children: "Bridge human conversations \u2014 Slack users talk to AI agents via the Slack adapter." })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Slack Integration (NEW)" }), _jsxs(Terminal, { title: "Bridge Slack Channels to COGENT", children: [_jsx("p", { class: noteText, children: "Connect your Slack workspace to COGENT so humans and AI agents communicate in the same channel." }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "1." }), " Install the Cogent Bridge Slack app in your workspace"] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "2." }), " In any Slack channel, run:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "/" }), _jsx("span", { class: stepCommand, children: "cogent map <sessionId> <secret>" })] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "3." }), " Messages flow bidirectionally \u2014 Slack users and CC agents share the same conversation"] }), _jsxs("p", { class: noteText, children: ["Slash commands: ", _jsx("span", { class: stepCommand, children: "/cogent peers" }), " (list all peers), ", _jsx("span", { class: stepCommand, children: "/cogent send @backend msg" }), " (targeted message), ", _jsx("span", { class: stepCommand, children: "/cogent status" }), " (session health)"] })] })] }), _jsxs("a", { href: "/how-to", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "How Teams Deliver Faster with Cogent \u2192" }), _jsx("p", { class: howToDesc, children: "Real-world use cases, command examples, and best practices for parallel development, cross-team bug fixes, API contract negotiation, and more." })] }), _jsxs("a", { href: "/faq", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "FAQ & Troubleshooting \u2192" }), _jsx("p", { class: howToDesc, children: "Common setup issues, message flow troubleshooting, version compatibility, and solutions for Slack bridge configuration." })] }), _jsxs("a", { href: "/update", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "Update & Upgrade Guide \u2192" }), _jsx("p", { class: howToDesc, children: "Step-by-step upgrade instructions, breaking change notes, troubleshooting common update issues, and rollback procedures." })] }), _jsxs("div", { class: footer, children: ["COGENT \u2014 Powered by ", _jsx("a", { href: "https://essentialai.uk", style: "color: inherit;", children: "Essential AI Solutions Ltd." }), " \u2014 ", _jsx("a", { href: "/", style: "color: inherit;", children: "cogent.tools" })] }), _jsx("script", { dangerouslySetInnerHTML: { __html: sseScript } })] }) }));
228
+ -- npx -y @essentialai/cogent-bridge` }), _jsxs("p", { class: noteText, children: ["Restart Codex. This gives you the six ", _jsx("span", { class: stepCommand, children: "cogent_" }), " MCP tools. Use ", _jsx("span", { class: stepCommand, children: "cogent_register_peer" }), " to join the bridge."] }), _jsxs("details", { style: "margin-top: 1rem;", children: [_jsx("summary", { style: `cursor: pointer; color: ${colors.textMuted}; font-size: 0.85rem;`, children: "Plugin Marketplace (Codex CLI 0.133.0+)" }), _jsxs("div", { style: "margin-top: 0.75rem;", children: [_jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "codex plugin marketplace add eaisdevelopment/cogent" })] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "codex plugin add cogent@cogent" })] }), _jsx("p", { class: noteText, children: "Adds skills + MCP tools in one step. Requires Codex CLI 0.133.0 or newer." })] })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Updating to the Latest Version" }), _jsxs(Terminal, { title: "Stay Up to Date", children: [_jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Plugin Marketplace:" }), " Re-run the install command to pull the latest version:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "claude plugin marketplace add https://github.com/eaisdevelopment/cogent.git" })] }), _jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Manual MCP / Claude Desktop:" }), " If you used ", _jsx("span", { class: stepCommand, children: "npx -y @essentialai/cogent-bridge" }), ", you already get the latest version automatically on each restart. No action needed."] }), _jsxs("p", { class: noteText, children: [_jsx("span", { class: stepNumber, children: "Global install:" }), " If you installed globally with npm, update explicitly:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "$" }), _jsx("span", { class: stepCommand, children: "npm update -g @essentialai/cogent-bridge" })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Quick Start" }), _jsxs(Terminal, { title: "Quick Start", children: [_jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "1." }), " Create a channel with a friendly name"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Create a Cogent channel called "my-project" with secret "team-secret"` })] }), _jsxs("p", { class: noteText, children: ["Returns a channel name (e.g., ", _jsx("span", { class: stepCommand, children: "my-project" }), ") and a secret to share. Omit the name to auto-generate one (e.g., ", _jsx("span", { class: stepCommand, children: "swift-fox-a3f1" }), ")."] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "2." }), " Join from another Claude Code instance using the channel name"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Join Cogent channel "my-project" with secret "team-secret"` })] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "3." }), " Start communicating"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: ">" }), _jsx("span", { class: stepCommand, children: ` Register as "backend" and send a message to "frontend"` })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Supported Platforms" }), _jsxs("div", { class: platformGrid, children: [_jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\u26A1 Claude Code" }), _jsx("p", { children: "Full auto-relay \u2014 Claude sessions respond automatically to inbound messages." })] }), _jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\uD83E\uDD16 OpenAI Codex" }), _jsx("p", { children: "Channel messaging \u2014 Codex agents send and receive via MCP tools. Auto-relay via plugin (v3.4+)." })] }), _jsxs("div", { class: platformCard, children: [_jsx("h3", { children: "\uD83D\uDCAC Slack" }), _jsx("p", { children: "Bridge human conversations \u2014 Slack users talk to AI agents via the Slack adapter." })] })] })] }), _jsxs("div", { class: section, children: [_jsx("h2", { class: sectionTitle, children: "Slack Integration (NEW)" }), _jsxs(Terminal, { title: "Bridge Slack Channels to Cogent", children: [_jsx("p", { class: noteText, children: "Connect your Slack workspace to Cogent so humans and AI agents communicate in the same channel." }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "1." }), " Install the Cogent Bridge Slack app in your workspace"] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "2." }), " In any Slack channel, run:"] }), _jsxs("div", { class: codeBlock, children: [_jsx("span", { class: promptChar, children: "/" }), _jsx("span", { class: stepCommand, children: "cogent map <sessionId> <secret>" })] }), _jsxs("div", { class: stepLine, children: [_jsx("span", { class: stepNumber, children: "3." }), " Messages flow bidirectionally \u2014 Slack users and CC agents share the same conversation"] }), _jsxs("p", { class: noteText, children: ["Slash commands: ", _jsx("span", { class: stepCommand, children: "/cogent peers" }), " (list all peers), ", _jsx("span", { class: stepCommand, children: "/cogent send @backend msg" }), " (targeted message), ", _jsx("span", { class: stepCommand, children: "/cogent status" }), " (session health)"] })] })] }), _jsxs("a", { href: "/how-to", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "How Teams Deliver Faster with Cogent \u2192" }), _jsx("p", { class: howToDesc, children: "Real-world use cases, command examples, and best practices for parallel development, cross-team bug fixes, API contract negotiation, and more." })] }), _jsxs("a", { href: "/faq", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "FAQ & Troubleshooting \u2192" }), _jsx("p", { class: howToDesc, children: "Common setup issues, message flow troubleshooting, version compatibility, and solutions for Slack bridge configuration." })] }), _jsxs("a", { href: "/update", class: howToLink, children: [_jsx("div", { class: howToTitle, children: "Update & Upgrade Guide \u2192" }), _jsx("p", { class: howToDesc, children: "Step-by-step upgrade instructions, breaking change notes, troubleshooting common update issues, and rollback procedures." })] }), _jsxs("div", { class: footer, children: ["Cogent \u2014 by ", _jsx("a", { href: "https://essentialai.uk", style: "color: inherit;", children: "Essential AI Solutions Ltd." }), " \u2014 ", _jsx("a", { href: "/", style: "color: inherit;", children: "cogent.tools" })] }), _jsx("script", { dangerouslySetInnerHTML: { __html: sseScript } })] }) }));
192
229
  //# sourceMappingURL=LandingPage.js.map