@nex-ai/nex 0.1.65 → 0.2.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 (529) hide show
  1. package/README.md +236 -231
  2. package/bin/nex-mcp.js +50 -0
  3. package/bin/nex.js +53 -0
  4. package/package.json +9 -36
  5. package/dist/agent/adoption.d.ts +0 -23
  6. package/dist/agent/adoption.js +0 -87
  7. package/dist/agent/adoption.js.map +0 -1
  8. package/dist/agent/gossip.d.ts +0 -17
  9. package/dist/agent/gossip.js +0 -48
  10. package/dist/agent/gossip.js.map +0 -1
  11. package/dist/agent/loop.d.ts +0 -59
  12. package/dist/agent/loop.js +0 -389
  13. package/dist/agent/loop.js.map +0 -1
  14. package/dist/agent/queues.d.ts +0 -16
  15. package/dist/agent/queues.js +0 -44
  16. package/dist/agent/queues.js.map +0 -1
  17. package/dist/agent/session-store.d.ts +0 -21
  18. package/dist/agent/session-store.js +0 -96
  19. package/dist/agent/session-store.js.map +0 -1
  20. package/dist/agent/templates.d.ts +0 -5
  21. package/dist/agent/templates.js +0 -55
  22. package/dist/agent/templates.js.map +0 -1
  23. package/dist/agent/tools.d.ts +0 -25
  24. package/dist/agent/tools.js +0 -238
  25. package/dist/agent/tools.js.map +0 -1
  26. package/dist/agent/types.d.ts +0 -59
  27. package/dist/agent/types.js +0 -5
  28. package/dist/agent/types.js.map +0 -1
  29. package/dist/calendar/scheduler.d.ts +0 -32
  30. package/dist/calendar/scheduler.js +0 -178
  31. package/dist/calendar/scheduler.js.map +0 -1
  32. package/dist/calendar/store.d.ts +0 -15
  33. package/dist/calendar/store.js +0 -50
  34. package/dist/calendar/store.js.map +0 -1
  35. package/dist/calendar/types.d.ts +0 -17
  36. package/dist/calendar/types.js +0 -5
  37. package/dist/calendar/types.js.map +0 -1
  38. package/dist/chat/channel.d.ts +0 -20
  39. package/dist/chat/channel.js +0 -84
  40. package/dist/chat/channel.js.map +0 -1
  41. package/dist/chat/message-store.d.ts +0 -18
  42. package/dist/chat/message-store.js +0 -82
  43. package/dist/chat/message-store.js.map +0 -1
  44. package/dist/chat/router.d.ts +0 -17
  45. package/dist/chat/router.js +0 -65
  46. package/dist/chat/router.js.map +0 -1
  47. package/dist/chat/suggested-responses.d.ts +0 -6
  48. package/dist/chat/suggested-responses.js +0 -99
  49. package/dist/chat/suggested-responses.js.map +0 -1
  50. package/dist/chat/types.d.ts +0 -28
  51. package/dist/chat/types.js +0 -5
  52. package/dist/chat/types.js.map +0 -1
  53. package/dist/cli.d.ts +0 -5
  54. package/dist/cli.js +0 -20
  55. package/dist/cli.js.map +0 -1
  56. package/dist/commands/attribute.d.ts +0 -4
  57. package/dist/commands/attribute.js +0 -75
  58. package/dist/commands/attribute.js.map +0 -1
  59. package/dist/commands/config-cmd.d.ts +0 -4
  60. package/dist/commands/config-cmd.js +0 -53
  61. package/dist/commands/config-cmd.js.map +0 -1
  62. package/dist/commands/context.d.ts +0 -4
  63. package/dist/commands/context.js +0 -167
  64. package/dist/commands/context.js.map +0 -1
  65. package/dist/commands/dispatch.d.ts +0 -44
  66. package/dist/commands/dispatch.js +0 -1544
  67. package/dist/commands/dispatch.js.map +0 -1
  68. package/dist/commands/graph.d.ts +0 -5
  69. package/dist/commands/graph.js +0 -77
  70. package/dist/commands/graph.js.map +0 -1
  71. package/dist/commands/init.d.ts +0 -49
  72. package/dist/commands/init.js +0 -319
  73. package/dist/commands/init.js.map +0 -1
  74. package/dist/commands/insight.d.ts +0 -4
  75. package/dist/commands/insight.js +0 -39
  76. package/dist/commands/insight.js.map +0 -1
  77. package/dist/commands/integrate.d.ts +0 -4
  78. package/dist/commands/integrate.js +0 -361
  79. package/dist/commands/integrate.js.map +0 -1
  80. package/dist/commands/list-job.d.ts +0 -4
  81. package/dist/commands/list-job.js +0 -41
  82. package/dist/commands/list-job.js.map +0 -1
  83. package/dist/commands/list.d.ts +0 -4
  84. package/dist/commands/list.js +0 -148
  85. package/dist/commands/list.js.map +0 -1
  86. package/dist/commands/note.d.ts +0 -4
  87. package/dist/commands/note.js +0 -77
  88. package/dist/commands/note.js.map +0 -1
  89. package/dist/commands/object.d.ts +0 -4
  90. package/dist/commands/object.js +0 -78
  91. package/dist/commands/object.js.map +0 -1
  92. package/dist/commands/parse-input.d.ts +0 -5
  93. package/dist/commands/parse-input.js +0 -37
  94. package/dist/commands/parse-input.js.map +0 -1
  95. package/dist/commands/record.d.ts +0 -4
  96. package/dist/commands/record.js +0 -126
  97. package/dist/commands/record.js.map +0 -1
  98. package/dist/commands/register.d.ts +0 -4
  99. package/dist/commands/register.js +0 -23
  100. package/dist/commands/register.js.map +0 -1
  101. package/dist/commands/relationship.d.ts +0 -4
  102. package/dist/commands/relationship.js +0 -80
  103. package/dist/commands/relationship.js.map +0 -1
  104. package/dist/commands/scan.d.ts +0 -4
  105. package/dist/commands/scan.js +0 -111
  106. package/dist/commands/scan.js.map +0 -1
  107. package/dist/commands/search.d.ts +0 -4
  108. package/dist/commands/search.js +0 -62
  109. package/dist/commands/search.js.map +0 -1
  110. package/dist/commands/session.d.ts +0 -4
  111. package/dist/commands/session.js +0 -31
  112. package/dist/commands/session.js.map +0 -1
  113. package/dist/commands/setup.d.ts +0 -25
  114. package/dist/commands/setup.js +0 -584
  115. package/dist/commands/setup.js.map +0 -1
  116. package/dist/commands/task.d.ts +0 -4
  117. package/dist/commands/task.js +0 -140
  118. package/dist/commands/task.js.map +0 -1
  119. package/dist/commands/workspace.d.ts +0 -8
  120. package/dist/commands/workspace.js +0 -251
  121. package/dist/commands/workspace.js.map +0 -1
  122. package/dist/index.d.ts +0 -9
  123. package/dist/index.js +0 -142
  124. package/dist/index.js.map +0 -1
  125. package/dist/lib/capture-filter.d.ts +0 -9
  126. package/dist/lib/capture-filter.js +0 -14
  127. package/dist/lib/capture-filter.js.map +0 -1
  128. package/dist/lib/client.d.ts +0 -20
  129. package/dist/lib/client.js +0 -160
  130. package/dist/lib/client.js.map +0 -1
  131. package/dist/lib/compounding-worker.d.ts +0 -2
  132. package/dist/lib/compounding-worker.js +0 -21
  133. package/dist/lib/compounding-worker.js.map +0 -1
  134. package/dist/lib/compounding.d.ts +0 -20
  135. package/dist/lib/compounding.js +0 -45
  136. package/dist/lib/compounding.js.map +0 -1
  137. package/dist/lib/config.d.ts +0 -35
  138. package/dist/lib/config.js +0 -96
  139. package/dist/lib/config.js.map +0 -1
  140. package/dist/lib/context-format.d.ts +0 -7
  141. package/dist/lib/context-format.js +0 -21
  142. package/dist/lib/context-format.js.map +0 -1
  143. package/dist/lib/errors.d.ts +0 -18
  144. package/dist/lib/errors.js +0 -30
  145. package/dist/lib/errors.js.map +0 -1
  146. package/dist/lib/file-scanner.d.ts +0 -38
  147. package/dist/lib/file-scanner.js +0 -188
  148. package/dist/lib/file-scanner.js.map +0 -1
  149. package/dist/lib/graph-html.d.ts +0 -59
  150. package/dist/lib/graph-html.js +0 -859
  151. package/dist/lib/graph-html.js.map +0 -1
  152. package/dist/lib/installers.d.ts +0 -80
  153. package/dist/lib/installers.js +0 -602
  154. package/dist/lib/installers.js.map +0 -1
  155. package/dist/lib/integrations.d.ts +0 -23
  156. package/dist/lib/integrations.js +0 -25
  157. package/dist/lib/integrations.js.map +0 -1
  158. package/dist/lib/output.d.ts +0 -7
  159. package/dist/lib/output.js +0 -70
  160. package/dist/lib/output.js.map +0 -1
  161. package/dist/lib/platform-detect.d.ts +0 -23
  162. package/dist/lib/platform-detect.js +0 -359
  163. package/dist/lib/platform-detect.js.map +0 -1
  164. package/dist/lib/project-config.d.ts +0 -53
  165. package/dist/lib/project-config.js +0 -151
  166. package/dist/lib/project-config.js.map +0 -1
  167. package/dist/lib/prompt.d.ts +0 -15
  168. package/dist/lib/prompt.js +0 -213
  169. package/dist/lib/prompt.js.map +0 -1
  170. package/dist/lib/rate-limiter.d.ts +0 -13
  171. package/dist/lib/rate-limiter.js +0 -49
  172. package/dist/lib/rate-limiter.js.map +0 -1
  173. package/dist/lib/recall-filter.d.ts +0 -5
  174. package/dist/lib/recall-filter.js +0 -24
  175. package/dist/lib/recall-filter.js.map +0 -1
  176. package/dist/lib/session-store.d.ts +0 -15
  177. package/dist/lib/session-store.js +0 -62
  178. package/dist/lib/session-store.js.map +0 -1
  179. package/dist/lib/tui.d.ts +0 -57
  180. package/dist/lib/tui.js +0 -247
  181. package/dist/lib/tui.js.map +0 -1
  182. package/dist/lib/workspace-registry.d.ts +0 -47
  183. package/dist/lib/workspace-registry.js +0 -240
  184. package/dist/lib/workspace-registry.js.map +0 -1
  185. package/dist/mcp/channel.d.ts +0 -24
  186. package/dist/mcp/channel.js +0 -198
  187. package/dist/mcp/channel.js.map +0 -1
  188. package/dist/mcp/client.d.ts +0 -20
  189. package/dist/mcp/client.js +0 -131
  190. package/dist/mcp/client.js.map +0 -1
  191. package/dist/mcp/config.d.ts +0 -19
  192. package/dist/mcp/config.js +0 -48
  193. package/dist/mcp/config.js.map +0 -1
  194. package/dist/mcp/context-files.d.ts +0 -9
  195. package/dist/mcp/context-files.js +0 -90
  196. package/dist/mcp/context-files.js.map +0 -1
  197. package/dist/mcp/file-manifest.d.ts +0 -27
  198. package/dist/mcp/file-manifest.js +0 -68
  199. package/dist/mcp/file-manifest.js.map +0 -1
  200. package/dist/mcp/file-scanner.d.ts +0 -17
  201. package/dist/mcp/file-scanner.js +0 -77
  202. package/dist/mcp/file-scanner.js.map +0 -1
  203. package/dist/mcp/index.d.ts +0 -2
  204. package/dist/mcp/index.js +0 -51
  205. package/dist/mcp/index.js.map +0 -1
  206. package/dist/mcp/rate-limiter.d.ts +0 -14
  207. package/dist/mcp/rate-limiter.js +0 -60
  208. package/dist/mcp/rate-limiter.js.map +0 -1
  209. package/dist/mcp/server.d.ts +0 -6
  210. package/dist/mcp/server.js +0 -44
  211. package/dist/mcp/server.js.map +0 -1
  212. package/dist/mcp/session-store.d.ts +0 -16
  213. package/dist/mcp/session-store.js +0 -70
  214. package/dist/mcp/session-store.js.map +0 -1
  215. package/dist/mcp/tools/context.d.ts +0 -3
  216. package/dist/mcp/tools/context.js +0 -65
  217. package/dist/mcp/tools/context.js.map +0 -1
  218. package/dist/mcp/tools/insights.d.ts +0 -3
  219. package/dist/mcp/tools/insights.js +0 -24
  220. package/dist/mcp/tools/insights.js.map +0 -1
  221. package/dist/mcp/tools/integrations.d.ts +0 -3
  222. package/dist/mcp/tools/integrations.js +0 -27
  223. package/dist/mcp/tools/integrations.js.map +0 -1
  224. package/dist/mcp/tools/lists.d.ts +0 -3
  225. package/dist/mcp/tools/lists.js +0 -101
  226. package/dist/mcp/tools/lists.js.map +0 -1
  227. package/dist/mcp/tools/notes.d.ts +0 -3
  228. package/dist/mcp/tools/notes.js +0 -52
  229. package/dist/mcp/tools/notes.js.map +0 -1
  230. package/dist/mcp/tools/notifications.d.ts +0 -3
  231. package/dist/mcp/tools/notifications.js +0 -53
  232. package/dist/mcp/tools/notifications.js.map +0 -1
  233. package/dist/mcp/tools/records.d.ts +0 -3
  234. package/dist/mcp/tools/records.js +0 -74
  235. package/dist/mcp/tools/records.js.map +0 -1
  236. package/dist/mcp/tools/register.d.ts +0 -3
  237. package/dist/mcp/tools/register.js +0 -41
  238. package/dist/mcp/tools/register.js.map +0 -1
  239. package/dist/mcp/tools/relationships.d.ts +0 -3
  240. package/dist/mcp/tools/relationships.js +0 -47
  241. package/dist/mcp/tools/relationships.js.map +0 -1
  242. package/dist/mcp/tools/scan.d.ts +0 -3
  243. package/dist/mcp/tools/scan.js +0 -37
  244. package/dist/mcp/tools/scan.js.map +0 -1
  245. package/dist/mcp/tools/schema.d.ts +0 -3
  246. package/dist/mcp/tools/schema.js +0 -108
  247. package/dist/mcp/tools/schema.js.map +0 -1
  248. package/dist/mcp/tools/search.d.ts +0 -3
  249. package/dist/mcp/tools/search.js +0 -8
  250. package/dist/mcp/tools/search.js.map +0 -1
  251. package/dist/mcp/tools/tasks.d.ts +0 -3
  252. package/dist/mcp/tools/tasks.js +0 -88
  253. package/dist/mcp/tools/tasks.js.map +0 -1
  254. package/dist/mcp/workspace-data-dir.d.ts +0 -2
  255. package/dist/mcp/workspace-data-dir.js +0 -28
  256. package/dist/mcp/workspace-data-dir.js.map +0 -1
  257. package/dist/orchestration/budget.d.ts +0 -32
  258. package/dist/orchestration/budget.js +0 -72
  259. package/dist/orchestration/budget.js.map +0 -1
  260. package/dist/orchestration/executor.d.ts +0 -59
  261. package/dist/orchestration/executor.js +0 -197
  262. package/dist/orchestration/executor.js.map +0 -1
  263. package/dist/orchestration/router.d.ts +0 -30
  264. package/dist/orchestration/router.js +0 -98
  265. package/dist/orchestration/router.js.map +0 -1
  266. package/dist/orchestration/templates.d.ts +0 -11
  267. package/dist/orchestration/templates.js +0 -99
  268. package/dist/orchestration/templates.js.map +0 -1
  269. package/dist/orchestration/types.d.ts +0 -58
  270. package/dist/orchestration/types.js +0 -7
  271. package/dist/orchestration/types.js.map +0 -1
  272. package/dist/plugin/auto-capture.d.ts +0 -11
  273. package/dist/plugin/auto-capture.js +0 -135
  274. package/dist/plugin/auto-capture.js.map +0 -1
  275. package/dist/plugin/auto-recall-worker.d.ts +0 -2
  276. package/dist/plugin/auto-recall-worker.js +0 -74
  277. package/dist/plugin/auto-recall-worker.js.map +0 -1
  278. package/dist/plugin/auto-recall.d.ts +0 -11
  279. package/dist/plugin/auto-recall.js +0 -186
  280. package/dist/plugin/auto-recall.js.map +0 -1
  281. package/dist/plugin/auto-register.d.ts +0 -10
  282. package/dist/plugin/auto-register.js +0 -81
  283. package/dist/plugin/auto-register.js.map +0 -1
  284. package/dist/plugin/auto-scan.d.ts +0 -10
  285. package/dist/plugin/auto-scan.js +0 -54
  286. package/dist/plugin/auto-scan.js.map +0 -1
  287. package/dist/plugin/auto-session-start.d.ts +0 -14
  288. package/dist/plugin/auto-session-start.js +0 -156
  289. package/dist/plugin/auto-session-start.js.map +0 -1
  290. package/dist/plugin/capture-filter.d.ts +0 -21
  291. package/dist/plugin/capture-filter.js +0 -32
  292. package/dist/plugin/capture-filter.js.map +0 -1
  293. package/dist/plugin/config.d.ts +0 -61
  294. package/dist/plugin/config.js +0 -182
  295. package/dist/plugin/config.js.map +0 -1
  296. package/dist/plugin/context-files.d.ts +0 -23
  297. package/dist/plugin/context-files.js +0 -103
  298. package/dist/plugin/context-files.js.map +0 -1
  299. package/dist/plugin/context-format.d.ts +0 -18
  300. package/dist/plugin/context-format.js +0 -34
  301. package/dist/plugin/context-format.js.map +0 -1
  302. package/dist/plugin/file-manifest.d.ts +0 -27
  303. package/dist/plugin/file-manifest.js +0 -68
  304. package/dist/plugin/file-manifest.js.map +0 -1
  305. package/dist/plugin/file-scanner.d.ts +0 -19
  306. package/dist/plugin/file-scanner.js +0 -90
  307. package/dist/plugin/file-scanner.js.map +0 -1
  308. package/dist/plugin/nex-client.d.ts +0 -50
  309. package/dist/plugin/nex-client.js +0 -129
  310. package/dist/plugin/nex-client.js.map +0 -1
  311. package/dist/plugin/rate-limiter.d.ts +0 -26
  312. package/dist/plugin/rate-limiter.js +0 -65
  313. package/dist/plugin/rate-limiter.js.map +0 -1
  314. package/dist/plugin/recall-cache.d.ts +0 -41
  315. package/dist/plugin/recall-cache.js +0 -195
  316. package/dist/plugin/recall-cache.js.map +0 -1
  317. package/dist/plugin/recall-filter.d.ts +0 -13
  318. package/dist/plugin/recall-filter.js +0 -39
  319. package/dist/plugin/recall-filter.js.map +0 -1
  320. package/dist/plugin/session-store.d.ts +0 -23
  321. package/dist/plugin/session-store.js +0 -73
  322. package/dist/plugin/session-store.js.map +0 -1
  323. package/dist/plugin/workspace-data-dir.d.ts +0 -2
  324. package/dist/plugin/workspace-data-dir.js +0 -31
  325. package/dist/plugin/workspace-data-dir.js.map +0 -1
  326. package/dist/tui/agent-colors.d.ts +0 -19
  327. package/dist/tui/agent-colors.js +0 -34
  328. package/dist/tui/agent-colors.js.map +0 -1
  329. package/dist/tui/app.d.ts +0 -14
  330. package/dist/tui/app.js +0 -181
  331. package/dist/tui/app.js.map +0 -1
  332. package/dist/tui/channel-colors.d.ts +0 -16
  333. package/dist/tui/channel-colors.js +0 -43
  334. package/dist/tui/channel-colors.js.map +0 -1
  335. package/dist/tui/components/agent-card.d.ts +0 -11
  336. package/dist/tui/components/agent-card.js +0 -40
  337. package/dist/tui/components/agent-card.js.map +0 -1
  338. package/dist/tui/components/banner.d.ts +0 -44
  339. package/dist/tui/components/banner.js +0 -130
  340. package/dist/tui/components/banner.js.map +0 -1
  341. package/dist/tui/components/channel-colors.d.ts +0 -21
  342. package/dist/tui/components/channel-colors.js +0 -53
  343. package/dist/tui/components/channel-colors.js.map +0 -1
  344. package/dist/tui/components/channel-message.d.ts +0 -53
  345. package/dist/tui/components/channel-message.js +0 -66
  346. package/dist/tui/components/channel-message.js.map +0 -1
  347. package/dist/tui/components/chat-input.d.ts +0 -11
  348. package/dist/tui/components/chat-input.js +0 -19
  349. package/dist/tui/components/chat-input.js.map +0 -1
  350. package/dist/tui/components/data-table.d.ts +0 -11
  351. package/dist/tui/components/data-table.js +0 -47
  352. package/dist/tui/components/data-table.js.map +0 -1
  353. package/dist/tui/components/error-box.d.ts +0 -11
  354. package/dist/tui/components/error-box.js +0 -59
  355. package/dist/tui/components/error-box.js.map +0 -1
  356. package/dist/tui/components/help-screen.d.ts +0 -3
  357. package/dist/tui/components/help-screen.js +0 -63
  358. package/dist/tui/components/help-screen.js.map +0 -1
  359. package/dist/tui/components/index.d.ts +0 -17
  360. package/dist/tui/components/index.js +0 -10
  361. package/dist/tui/components/index.js.map +0 -1
  362. package/dist/tui/components/inline-confirm.d.ts +0 -14
  363. package/dist/tui/components/inline-confirm.js +0 -13
  364. package/dist/tui/components/inline-confirm.js.map +0 -1
  365. package/dist/tui/components/inline-select.d.ts +0 -21
  366. package/dist/tui/components/inline-select.js +0 -20
  367. package/dist/tui/components/inline-select.js.map +0 -1
  368. package/dist/tui/components/markdown.d.ts +0 -6
  369. package/dist/tui/components/markdown.js +0 -179
  370. package/dist/tui/components/markdown.js.map +0 -1
  371. package/dist/tui/components/mention-autocomplete.d.ts +0 -79
  372. package/dist/tui/components/mention-autocomplete.js +0 -250
  373. package/dist/tui/components/mention-autocomplete.js.map +0 -1
  374. package/dist/tui/components/message-list.d.ts +0 -18
  375. package/dist/tui/components/message-list.js +0 -29
  376. package/dist/tui/components/message-list.js.map +0 -1
  377. package/dist/tui/components/picker.d.ts +0 -16
  378. package/dist/tui/components/picker.js +0 -32
  379. package/dist/tui/components/picker.js.map +0 -1
  380. package/dist/tui/components/progress-steps.d.ts +0 -13
  381. package/dist/tui/components/progress-steps.js +0 -21
  382. package/dist/tui/components/progress-steps.js.map +0 -1
  383. package/dist/tui/components/slack/compose.d.ts +0 -27
  384. package/dist/tui/components/slack/compose.js +0 -147
  385. package/dist/tui/components/slack/compose.js.map +0 -1
  386. package/dist/tui/components/slack/layout.d.ts +0 -36
  387. package/dist/tui/components/slack/layout.js +0 -96
  388. package/dist/tui/components/slack/layout.js.map +0 -1
  389. package/dist/tui/components/slack/messages.d.ts +0 -72
  390. package/dist/tui/components/slack/messages.js +0 -177
  391. package/dist/tui/components/slack/messages.js.map +0 -1
  392. package/dist/tui/components/slack/quick-switcher.d.ts +0 -33
  393. package/dist/tui/components/slack/quick-switcher.js +0 -98
  394. package/dist/tui/components/slack/quick-switcher.js.map +0 -1
  395. package/dist/tui/components/slack/sidebar-types.d.ts +0 -65
  396. package/dist/tui/components/slack/sidebar-types.js +0 -7
  397. package/dist/tui/components/slack/sidebar-types.js.map +0 -1
  398. package/dist/tui/components/slack/sidebar.d.ts +0 -46
  399. package/dist/tui/components/slack/sidebar.js +0 -52
  400. package/dist/tui/components/slack/sidebar.js.map +0 -1
  401. package/dist/tui/components/slack/thread-panel.d.ts +0 -45
  402. package/dist/tui/components/slack/thread-panel.js +0 -47
  403. package/dist/tui/components/slack/thread-panel.js.map +0 -1
  404. package/dist/tui/components/slash-autocomplete.d.ts +0 -83
  405. package/dist/tui/components/slash-autocomplete.js +0 -233
  406. package/dist/tui/components/slash-autocomplete.js.map +0 -1
  407. package/dist/tui/components/spinner.d.ts +0 -17
  408. package/dist/tui/components/spinner.js +0 -30
  409. package/dist/tui/components/spinner.js.map +0 -1
  410. package/dist/tui/components/status-bar.d.ts +0 -23
  411. package/dist/tui/components/status-bar.js +0 -55
  412. package/dist/tui/components/status-bar.js.map +0 -1
  413. package/dist/tui/components/success-box.d.ts +0 -7
  414. package/dist/tui/components/success-box.js +0 -10
  415. package/dist/tui/components/success-box.js.map +0 -1
  416. package/dist/tui/components/tool-indicator.d.ts +0 -12
  417. package/dist/tui/components/tool-indicator.js +0 -18
  418. package/dist/tui/components/tool-indicator.js.map +0 -1
  419. package/dist/tui/components/viewport.d.ts +0 -9
  420. package/dist/tui/components/viewport.js +0 -24
  421. package/dist/tui/components/viewport.js.map +0 -1
  422. package/dist/tui/generative/bindings.d.ts +0 -27
  423. package/dist/tui/generative/bindings.js +0 -152
  424. package/dist/tui/generative/bindings.js.map +0 -1
  425. package/dist/tui/generative/registry.d.ts +0 -19
  426. package/dist/tui/generative/registry.js +0 -31
  427. package/dist/tui/generative/registry.js.map +0 -1
  428. package/dist/tui/generative/renderer.d.ts +0 -24
  429. package/dist/tui/generative/renderer.js +0 -160
  430. package/dist/tui/generative/renderer.js.map +0 -1
  431. package/dist/tui/generative/types.d.ts +0 -68
  432. package/dist/tui/generative/types.js +0 -7
  433. package/dist/tui/generative/types.js.map +0 -1
  434. package/dist/tui/hooks/use-cancellable.d.ts +0 -28
  435. package/dist/tui/hooks/use-cancellable.js +0 -51
  436. package/dist/tui/hooks/use-cancellable.js.map +0 -1
  437. package/dist/tui/hooks/use-streaming.d.ts +0 -44
  438. package/dist/tui/hooks/use-streaming.js +0 -105
  439. package/dist/tui/hooks/use-streaming.js.map +0 -1
  440. package/dist/tui/index.d.ts +0 -4
  441. package/dist/tui/index.js +0 -7
  442. package/dist/tui/index.js.map +0 -1
  443. package/dist/tui/keybindings.d.ts +0 -25
  444. package/dist/tui/keybindings.js +0 -277
  445. package/dist/tui/keybindings.js.map +0 -1
  446. package/dist/tui/register-views.d.ts +0 -8
  447. package/dist/tui/register-views.js +0 -122
  448. package/dist/tui/register-views.js.map +0 -1
  449. package/dist/tui/router.d.ts +0 -29
  450. package/dist/tui/router.js +0 -87
  451. package/dist/tui/router.js.map +0 -1
  452. package/dist/tui/services/agent-service.d.ts +0 -58
  453. package/dist/tui/services/agent-service.js +0 -197
  454. package/dist/tui/services/agent-service.js.map +0 -1
  455. package/dist/tui/services/calendar-service.d.ts +0 -31
  456. package/dist/tui/services/calendar-service.js +0 -133
  457. package/dist/tui/services/calendar-service.js.map +0 -1
  458. package/dist/tui/services/chat-service.d.ts +0 -28
  459. package/dist/tui/services/chat-service.js +0 -91
  460. package/dist/tui/services/chat-service.js.map +0 -1
  461. package/dist/tui/services/orchestration-service.d.ts +0 -42
  462. package/dist/tui/services/orchestration-service.js +0 -153
  463. package/dist/tui/services/orchestration-service.js.map +0 -1
  464. package/dist/tui/slash-commands.d.ts +0 -106
  465. package/dist/tui/slash-commands.js +0 -1421
  466. package/dist/tui/slash-commands.js.map +0 -1
  467. package/dist/tui/store.d.ts +0 -96
  468. package/dist/tui/store.js +0 -120
  469. package/dist/tui/store.js.map +0 -1
  470. package/dist/tui/theme.d.ts +0 -40
  471. package/dist/tui/theme.js +0 -39
  472. package/dist/tui/theme.js.map +0 -1
  473. package/dist/tui/tui-context.d.ts +0 -22
  474. package/dist/tui/tui-context.js +0 -17
  475. package/dist/tui/tui-context.js.map +0 -1
  476. package/dist/tui/views/agent-list.d.ts +0 -8
  477. package/dist/tui/views/agent-list.js +0 -11
  478. package/dist/tui/views/agent-list.js.map +0 -1
  479. package/dist/tui/views/ask-chat.d.ts +0 -9
  480. package/dist/tui/views/ask-chat.js +0 -40
  481. package/dist/tui/views/ask-chat.js.map +0 -1
  482. package/dist/tui/views/calendar.d.ts +0 -15
  483. package/dist/tui/views/calendar.js +0 -29
  484. package/dist/tui/views/calendar.js.map +0 -1
  485. package/dist/tui/views/chat.d.ts +0 -18
  486. package/dist/tui/views/chat.js +0 -28
  487. package/dist/tui/views/chat.js.map +0 -1
  488. package/dist/tui/views/generative.d.ts +0 -14
  489. package/dist/tui/views/generative.js +0 -37
  490. package/dist/tui/views/generative.js.map +0 -1
  491. package/dist/tui/views/help.d.ts +0 -6
  492. package/dist/tui/views/help.js +0 -9
  493. package/dist/tui/views/help.js.map +0 -1
  494. package/dist/tui/views/home-screen.d.ts +0 -67
  495. package/dist/tui/views/home-screen.js +0 -192
  496. package/dist/tui/views/home-screen.js.map +0 -1
  497. package/dist/tui/views/home.d.ts +0 -33
  498. package/dist/tui/views/home.js +0 -60
  499. package/dist/tui/views/home.js.map +0 -1
  500. package/dist/tui/views/index.d.ts +0 -20
  501. package/dist/tui/views/index.js +0 -11
  502. package/dist/tui/views/index.js.map +0 -1
  503. package/dist/tui/views/insights.d.ts +0 -19
  504. package/dist/tui/views/insights.js +0 -46
  505. package/dist/tui/views/insights.js.map +0 -1
  506. package/dist/tui/views/orchestration.d.ts +0 -18
  507. package/dist/tui/views/orchestration.js +0 -73
  508. package/dist/tui/views/orchestration.js.map +0 -1
  509. package/dist/tui/views/record-detail.d.ts +0 -10
  510. package/dist/tui/views/record-detail.js +0 -22
  511. package/dist/tui/views/record-detail.js.map +0 -1
  512. package/dist/tui/views/record-list.d.ts +0 -15
  513. package/dist/tui/views/record-list.js +0 -22
  514. package/dist/tui/views/record-list.js.map +0 -1
  515. package/dist/tui/views/slack-channel-header.d.ts +0 -15
  516. package/dist/tui/views/slack-channel-header.js +0 -16
  517. package/dist/tui/views/slack-channel-header.js.map +0 -1
  518. package/dist/tui/views/slack-home.d.ts +0 -21
  519. package/dist/tui/views/slack-home.js +0 -572
  520. package/dist/tui/views/slack-home.js.map +0 -1
  521. package/dist/tui/views/stream.d.ts +0 -16
  522. package/dist/tui/views/stream.js +0 -210
  523. package/dist/tui/views/stream.js.map +0 -1
  524. package/dist/tui/views/task-board.d.ts +0 -21
  525. package/dist/tui/views/task-board.js +0 -33
  526. package/dist/tui/views/task-board.js.map +0 -1
  527. package/dist/tui/views/timeline.d.ts +0 -17
  528. package/dist/tui/views/timeline.js +0 -24
  529. package/dist/tui/views/timeline.js.map +0 -1
package/README.md CHANGED
@@ -1,44 +1,61 @@
1
1
  # Nex: Compounding Intelligence for AI agents
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@nex-ai/nex)](https://www.npmjs.com/package/@nex-ai/nex)
4
- [![GitHub](https://img.shields.io/badge/github-nex--crm%2Fnex--as--a--skill-blue)](https://github.com/nex-crm/nex-as-a-skill)
5
4
  [![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?logo=discord&logoColor=white)](https://discord.gg/gjSySC3PzV)
6
5
 
7
- Turn all your AI agent conversations into a unified knowledge graph with proactive context surfacing. Supports Claude Code, Codex, OpenClaw, Cursor, OpenCode, etc. Adds additional context from Email, Meetings, Slack, HubSpot, Salesforce.
6
+ Turn all your AI agent conversations into a unified knowledge graph. Supports Claude Code, Codex, OpenClaw, Cursor, OpenCode, etc. Adds additional context from Email, Meetings, Slack, HubSpot, Salesforce.
7
+
8
+ Tell something to OpenClaw. Ask about it in Claude Code. Reference it from Cursor. Context follows you across tools — no copy-pasting, no re-explaining, no lost context.
8
9
 
9
10
  <a href="https://discord.gg/gjSySC3PzV"><img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord" /></a>
10
11
 
11
12
  Talk to the team, share feedback, and connect with other developers building AI agents with Nex.
12
13
 
13
- **GitHub**: [github.com/nex-crm/nex-as-a-skill](https://github.com/nex-crm/nex-as-a-skill)
14
+ ## How It Works
14
15
 
15
- ## Install
16
+ ```
17
+ You → OpenClaw: "Maria Rodriguez, CTO of TechFlow, wants to expand to Europe in Q3. Budget is $2M."
16
18
 
17
- ```bash
18
- # Install globally
19
- npm install -g @nex-ai/nex
19
+ You → Claude Code: "What do you know about Maria Rodriguez?"
20
+ Claude Code: "Maria Rodriguez is the CTO of TechFlow. They're planning European expansion
21
+ in Q3 with a $2M budget."
20
22
 
21
- # Or run directly (no install)
22
- npx @nex-ai/nex ask "who is Maria?"
23
+ You Cursor: "Which companies are planning European expansion?"
24
+ Cursor: "TechFlow Maria Rodriguez (CTO) confirmed Q3 timeline, $2M budget."
23
25
  ```
24
26
 
27
+ One fact entered once. Available everywhere, instantly.
28
+
29
+ ## Integration Options
30
+
31
+ | | CLI + MCP Server | OpenClaw Plugin | Claude Code Plugin | Scripts |
32
+ |---|---|---|---|---|
33
+ | **Platforms** | Any terminal, Claude Desktop, ChatGPT, Cursor, Windsurf | OpenClaw | Claude Code CLI | OpenClaw (script-based) |
34
+ | **Auto-recall** | Via `nex recall` / MCP tool calls | Yes (smart filter) | Yes (smart filter) | No (manual) |
35
+ | **Auto-capture** | Via `nex capture` | Yes | Yes | No (manual) |
36
+ | **Notifications** | Daily digest + proactive alerts (Channels API) | No | No | No |
37
+ | **Commands** | 50+ CLI commands, 50+ MCP tools, `nex mcp` | 4 tools + 4 commands | 5 slash commands + MCP | bash scripts |
38
+ | **Setup** | `nex setup` | Copy plugin | `nex setup` | Set `NEX_API_KEY` |
39
+
25
40
  ## Quick Start (Recommended)
26
41
 
27
42
  ```bash
28
- # One command to get started registers, detects platforms, installs hooks, scans files
43
+ # Install and run setuphandles everything in one step
44
+ npm install -g @nex-ai/nex
29
45
  nex setup
30
46
  ```
31
47
 
32
- `nex setup` handles the base install flow: API key registration or re-keying, platform detection, platform installation, optional first integration connection, file scanning, and config creation.
48
+ `nex setup` registers your API key, auto-detects your AI platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and creates config. One command, fully configured.
33
49
 
34
50
  ```bash
35
- # Now query your knowledge
36
- nex ask "what's the latest on the Acme deal?"
51
+ # Now use it from any agent
52
+ nex ask "who is Maria Rodriguez?"
53
+ nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."
37
54
  ```
38
55
 
39
56
  ## Copy-Paste Prompt For Any AI Agent
40
57
 
41
- Use this when you want Claude, Codex, Cursor, OpenCode, or another terminal-capable AI agent to do the full Nex bootstrap for you.
58
+ Drop this prompt into any terminal-capable AI agent when you want it to bootstrap Nex for you end to end:
42
59
 
43
60
  ```text
44
61
  Install and fully bootstrap Nex in this project from start to finish.
@@ -62,299 +79,287 @@ Do not stop after partial setup. Only pause if you need my email for registratio
62
79
 
63
80
  This works best in agents that can run shell commands and open OAuth URLs.
64
81
 
82
+ ---
83
+
65
84
  <details>
66
- <summary>Manual setup (if you prefer step-by-step)</summary>
85
+ <summary>Manual setup per platform (if you prefer step-by-step)</summary>
86
+
87
+ ### CLI (any terminal, any AI agent)
67
88
 
68
89
  ```bash
69
- # 1. Register for an API key
70
- nex register --email you@company.com
90
+ npx @nex-ai/nex register --email you@company.com
91
+ ```
71
92
 
72
- # 2. Set up your platforms (auto-detects installed tools)
73
- nex setup
93
+ That's it. Now use it:
74
94
 
75
- # 3. Query your knowledge
76
- nex ask "what's the latest on the Acme deal?"
77
- ```
95
+ ```bash
96
+ # Ask your knowledge graph
97
+ nex ask "who is Maria Rodriguez?"
78
98
 
79
- </details>
99
+ # Ingest information
100
+ nex remember "Met with Maria Rodriguez, CTO of TechFlow. European expansion Q3, $2M budget."
101
+
102
+ # Or pipe from stdin
103
+ cat meeting-notes.txt | nex remember
104
+
105
+ # Search CRM records
106
+ nex search "TechFlow"
107
+
108
+ # CRUD operations
109
+ nex record list person --limit 10
110
+ nex task create --title "Follow up with Maria" --priority high
111
+ nex insight list --last 24h
112
+
113
+ # Build auto-recall hooks for any agent
114
+ nex recall "what do I know about TechFlow?" # Returns <nex-context> XML block
80
115
 
81
- ## Supported Platforms
116
+ # Build auto-capture hooks
117
+ nex capture "Agent conversation text..." # Rate-limited, filtered
118
+ ```
82
119
 
83
- `nex setup` auto-detects and configures these platforms with full-depth integration:
120
+ Install globally: `npm install -g @nex-ai/nex`
84
121
 
85
- | Platform | Hooks | Plugins | Agents | Workflows | Rules | MCP |
86
- |----------|-------|---------|--------|-----------|-------|-----|
87
- | **Claude Code** | SessionStart, UserPromptSubmit, Stop | — | — | 26 slash commands | — | — |
88
- | **Cursor** | sessionStart, userPromptSubmit, stop | — | — | — | `.cursor/rules/nex.md` | `~/.cursor/mcp.json` |
89
- | **Windsurf** | pre_user_prompt, post_cascade_response | — | — | /nex-ask, /nex-remember, /nex-search | `.windsurf/rules/nex.md` | `mcp_config.json` |
90
- | **Cline** | UserPromptSubmit, TaskStart, TaskComplete | — | — | — | `.clinerules/nex.md` | `cline_mcp_settings.json` |
91
- | **OpenClaw** | auto-recall, auto-capture (plugin) | `openclaw plugins install` (49 tools) | — | — | — | — |
92
- | **OpenCode** | — | `.opencode/plugins/nex.ts` | — | — | `AGENTS.md` | `opencode.json` |
93
- | **VS Code** | — | — | `.github/agents/nex.agent.md` | — | `.github/instructions/` | `.vscode/mcp.json` |
94
- | **Kilo Code** | — | — | `.kilocodemodes` | — | `.kilocode/rules/nex.md` | `.kilocode/mcp.json` |
95
- | **Continue.dev** | — | — | — | — | `.continue/rules/nex.md` | `mcp.json` |
96
- | **Zed** | — | — | — | — | `.rules` | `settings.json` |
97
- | **Claude Desktop** | — | — | — | — | — | `claude_desktop_config.json` |
98
- | **Aider** | — | — | — | — | `CONVENTIONS.md` | — |
122
+ ### MCP Server (Claude Desktop, Cursor, Windsurf)
99
123
 
100
- All MCP-based platforms use the same server entry (bundled in this package):
124
+ The MCP server is bundled inside `@nex-ai/nex`. No separate package needed.
101
125
 
102
126
  ```json
103
127
  {
104
- "nex": {
105
- "command": "nex-mcp",
106
- "env": { "NEX_API_KEY": "sk-..." }
128
+ "mcpServers": {
129
+ "nex": {
130
+ "command": "nex-mcp",
131
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
132
+ }
107
133
  }
108
134
  }
109
135
  ```
110
136
 
111
- Or without a global install: `"command": "npx", "args": ["-y", "@nex-ai/nex", "mcp"]`
112
-
113
- ## Setup Command
137
+ Or without a global install:
114
138
 
115
- ```bash
116
- nex setup # Auto-detect platforms, install full stack, scan files, create .nex.toml
117
- nex setup --platform cursor # Install for a specific platform only
118
- nex setup --no-hooks # Skip hook installation for all platforms
119
- nex setup --no-plugin # Skip hooks/commands (alias for --no-hooks)
120
- nex setup --no-rules # Skip rules/instruction file installation
121
- nex setup --no-scan # Skip file scanning during setup
122
- nex setup status # Show all platforms, install status, and connections
123
- nex graph # Open the workspace graph in your browser
139
+ ```json
140
+ {
141
+ "mcpServers": {
142
+ "nex": {
143
+ "command": "npx",
144
+ "args": ["-y", "@nex-ai/nex", "mcp"],
145
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
146
+ }
147
+ }
148
+ }
124
149
  ```
125
150
 
126
- **Default behavior** (no flags):
127
- - If no API key exists: prompts to register
128
- - If API key exists: offers to regenerate (picks up latest scopes) or change email
129
- - Installs the full 6-layer hierarchy for each detected platform: hooks → plugins → agents → workflows → rules → MCP
130
- - Scans current directory and ingests new/changed files into Nex
131
- - Creates `.nex.toml` project config with commented defaults
132
- - Stores config in `~/.nex/config.json`
151
+ No API key? The server starts in registration mode — call the `register` tool with your email.
133
152
 
134
- **Single install**: `npm install -g @nex-ai/nex` bundles everything — hooks, adapters, platform plugins, slash commands, rules, MCP server, and notification channel. No separate packages needed.
153
+ ### Proactive Notifications (Claude Code Channels)
135
154
 
136
- **Integration hierarchy** (per platform): Hooks > Custom plugins > Custom agents/modes > Workflows > Rules > MCP. Each platform gets every layer it supports.
155
+ The MCP server includes a built-in notification channel that pushes context updates directly into your Claude Code session — without you having to ask. This uses the [Claude SDK Channels API](https://code.claude.com/docs/en/channels-reference).
137
156
 
138
- ## Project Config: `.nex.toml`
157
+ **What you get:**
139
158
 
140
- Per-project settings file created by `nex setup`. All fields are optional.
159
+ | Notification | What it does | Frequency |
160
+ |---|---|---|
161
+ | **Daily digest** | Summarizes all context collected in the last 24 hours: deal updates, new relationships, upcoming events, actionable items | Once per day (on first session start after 24h) |
162
+ | **Proactive alerts** | Pushes new insights as they're discovered — deal changes, relationship shifts, risks, opportunities | Every 15 minutes (configurable) |
141
163
 
142
- ```toml
143
- [auth]
144
- # api_key = "sk-..." # Prefer NEX_API_KEY env var or ~/.nex/config.json
164
+ **How to enable:**
145
165
 
146
- [hooks]
147
- # enabled = true # Master kill switch for all hooks
166
+ 1. Install Nex globally (if not already):
167
+ ```bash
168
+ npm install -g @nex-ai/nex
169
+ ```
148
170
 
149
- [hooks.recall]
150
- # enabled = true # Proactive context on every prompt
151
- # debounce_ms = 10000
171
+ 2. Add the MCP server to your project (`.mcp.json`):
172
+ ```json
173
+ {
174
+ "mcpServers": {
175
+ "nex": {
176
+ "command": "nex-mcp",
177
+ "env": {}
178
+ }
179
+ }
180
+ }
181
+ ```
152
182
 
153
- [hooks.capture]
154
- # enabled = true # Auto-capture on conversation stop
155
- # min_length = 20
156
- # max_length = 50000
183
+ 3. Start Claude Code with channels enabled:
184
+ ```bash
185
+ claude --dangerously-load-development-channels server:nex
186
+ ```
157
187
 
158
- [hooks.session_start]
159
- # enabled = true # Load context on session start
188
+ 4. That's it. Notifications arrive as `<channel>` events in your session:
189
+ ```
190
+ ← nex: [technical_stack] MCP server utilizes experimental channel capability...
191
+ ← nex: [deal_update | high] Meridian counter-offer moved to 12% equity split...
192
+ ```
160
193
 
161
- [scan]
162
- # enabled = true
163
- # extensions = [".md", ".txt", ".csv", ".json", ".yaml", ".yml"]
164
- # ignore_dirs = ["node_modules", ".git", "dist", "build", "__pycache__"]
165
- # max_files = 1000
166
- # max_file_size = 100000
167
- # depth = 2
194
+ **Configuration:**
168
195
 
169
- [mcp]
170
- # enabled = false # Set to true when `nex setup` installs MCP for this project/platform
196
+ | Environment variable | Default | Description |
197
+ |---|---|---|
198
+ | `NEX_NOTIFY_INTERVAL_MINUTES` | `15` | How often to poll for new insights |
171
199
 
172
- [output]
173
- # format = "text" # "text" | "json"
174
- # timeout = 120000
200
+ Set it in your `.mcp.json`:
201
+ ```json
202
+ {
203
+ "mcpServers": {
204
+ "nex": {
205
+ "command": "nex-mcp",
206
+ "env": { "NEX_NOTIFY_INTERVAL_MINUTES": "5" }
207
+ }
208
+ }
209
+ }
175
210
  ```
176
211
 
177
- **Resolution order:** CLI flags > `.nex.toml` > env vars > `~/.nex/config.json` > defaults
212
+ **State persistence:** Digest and notification timestamps are stored in `~/.nex/channel-state.json`. Delete this file to force a fresh digest on next session start.
178
213
 
179
- ## Commands
214
+ **Requirements:** Claude Code v2.1.80+, claude.ai login (API keys not supported for Channels), `--dangerously-load-development-channels` flag during research preview.
180
215
 
181
- ### Knowledge Graph
216
+ ### OpenClaw Plugin (auto-recall + auto-capture)
182
217
 
183
218
  ```bash
184
- nex ask <query> # Query with natural language
185
- nex remember <content> # Ingest text (meeting notes, emails, docs)
186
- nex recall <query> # Query → XML-wrapped for agent injection
187
- nex capture [content] # Rate-limited ingestion for agent hooks
188
- nex artifact <id> # Check processing status
189
- nex search <query> # Search CRM records by name
190
- nex insight list [--last 24h] # Recent insights
191
- nex graph # Visualize your workspace graph in the browser
219
+ cp -r openclaw-plugin /path/to/openclaw/plugins/nex
220
+ cd /path/to/openclaw/plugins/nex && bun install && bun run build
192
221
  ```
193
222
 
194
- ### Integrations
223
+ Add to `openclaw.json`:
195
224
 
196
- ```bash
197
- nex integrate list # Show all integrations with connection status
198
- nex integrate connect gmail # Connect Gmail via OAuth
199
- nex integrate connect slack # Connect Slack
200
- nex integrate disconnect <id> # Disconnect by connection ID
225
+ ```json
226
+ {
227
+ "plugins": {
228
+ "load": { "paths": ["/path/to/plugins/nex"] },
229
+ "slots": { "memory": "nex" },
230
+ "entries": {
231
+ "nex": {
232
+ "enabled": true,
233
+ "config": {
234
+ "apiKey": "sk-your_key_here"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
201
240
  ```
202
241
 
203
- Available integrations: `gmail`, `google-calendar`, `outlook`, `outlook-calendar`, `slack`, `salesforce`, `hubspot`, `attio`.
204
-
205
- ### CRM Records
206
-
207
- ```bash
208
- nex object list # List object types (person, company, deal)
209
- nex record list person --limit 10
210
- nex record create person --data '{"name":"Jane Doe"}'
211
- nex record upsert person --match email --data '{"name":"Jane","email":"jane@co.com"}'
212
- nex record update <id> --data '{"phone":"+1234"}'
213
- nex record delete <id>
214
- nex record timeline <id>
215
- ```
242
+ See [`openclaw-plugin/README.md`](openclaw-plugin/README.md) for details.
216
243
 
217
- ### Tasks & Notes
244
+ ### Claude Code Plugin (auto-recall + auto-capture)
218
245
 
219
246
  ```bash
220
- nex task create --title "Follow up" --priority high --due 2026-04-01
221
- nex task list --assignee me --search "follow up"
222
- nex task update <id> --completed
223
- nex note create --title "Call notes" --content "..." --entity <record-id>
247
+ cd claude-code-plugin && bun install && bun run build
224
248
  ```
225
249
 
226
- ### Relationships & Lists
250
+ Add hooks to `~/.claude/settings.json`:
227
251
 
228
- ```bash
229
- nex rel list-defs
230
- nex rel create <record-id> --def <def-id> --entity1 <id1> --entity2 <id2>
231
- nex list list person
232
- nex list add-member <list-id> --parent <record-id>
233
- nex list-job create "enterprise contacts in EMEA"
252
+ ```json
253
+ {
254
+ "hooks": {
255
+ "UserPromptSubmit": [{
256
+ "matcher": "",
257
+ "hooks": [{
258
+ "type": "command",
259
+ "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-recall.js",
260
+ "timeout": 10000
261
+ }]
262
+ }],
263
+ "Stop": [{
264
+ "matcher": "",
265
+ "hooks": [{
266
+ "type": "command",
267
+ "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-capture.js",
268
+ "timeout": 5000,
269
+ "async": true
270
+ }]
271
+ }]
272
+ }
273
+ }
234
274
  ```
235
275
 
236
- ### File Scanning
237
-
238
- On session start, Nex automatically scans project files and ingests changed content using concurrent workers (5 parallel requests). After ingestion, compounding intelligence jobs are triggered automatically to generate patterns and playbook rules.
276
+ Slash commands and MCP server:
239
277
 
240
278
  ```bash
241
- nex scan # Scan current directory (up to 1000 files)
242
- nex scan --max-files 500 # Limit files per scan
243
- nex scan --force # Re-scan all files (ignore manifest)
244
- nex scan --dry-run # Preview what would be scanned
279
+ cp claude-code-plugin/commands/*.md ~/.claude/commands/ # /nex:recall, /nex:remember, /nex:scan, /nex:entities
280
+ claude mcp add nex -- nex-mcp # Full toolset
245
281
  ```
246
282
 
247
- **Default text-based extensions:** `.md`, `.txt`, `.csv`, `.json`, `.yaml`, `.yml`
283
+ See [`claude-code-plugin/README.md`](claude-code-plugin/README.md) for details.
248
284
 
249
- **Document formats** (handled separately): `.docx`, `.doc`, `.odt`, `.xlsx`, `.xls`, `.pptx`, `.ppt`, `.pdf`
285
+ ### Scripts (OpenClaw script-based)
250
286
 
251
- Configure via `.nex.toml` `[scan]` section or environment variables (`NEX_SCAN_ENABLED`, `NEX_SCAN_EXTENSIONS`, etc.).
252
-
253
- ### Proactive Context
254
-
255
- Nex surfaces relevant knowledge graph context on every prompt — not just questions. When you say "fix the migration script" or "deploy to staging", the system automatically injects entity insights, knowledge insights, and playbook patterns from your knowledge graph.
256
-
257
- Context is injected as `<nex-context>` blocks that AI agents use naturally without explicitly referencing the source. Only trivial inputs (yes/ok/lgtm) are skipped.
258
-
259
- ### Transcript Capture
260
-
261
- At session end, the full conversation transcript is automatically ingested into the knowledge graph. This captures complete decision trails, code discussions, and debugging sessions — not just the last message.
262
-
263
- ### MCP Server & Notifications
287
+ For OpenClaw agents without the plugin, bash scripts provide direct API access:
264
288
 
265
289
  ```bash
266
- nex mcp # Start the embedded MCP server (stdio)
267
- MCP_TRANSPORT=http nex mcp # Start with HTTP transport
268
- ```
269
-
270
- #### Proactive Notifications (Claude Code Channels)
271
-
272
- The MCP server pushes context updates directly into your Claude Code session using the [Channels API](https://code.claude.com/docs/en/channels-reference). No polling commands needed — insights arrive automatically while you work.
290
+ # Register and get API key
291
+ bash scripts/nex-openclaw-register.sh your@email.com "Your Name"
273
292
 
274
- **Two notification types:**
293
+ # Query context
294
+ printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask
275
295
 
276
- - **Daily digest** — Comprehensive summary of all context collected in the last 24 hours (deal changes, new relationships, upcoming events, actionable items). Fires once per day on session start.
277
- - **Proactive alerts** — New insights pushed every 15 minutes: relationship changes, deal updates, risks, opportunities. Configurable via `NEX_NOTIFY_INTERVAL_MINUTES`.
278
-
279
- **Quick setup:**
280
-
281
- ```bash
282
- # 1. Add MCP server to your project
283
- cat > .mcp.json << 'EOF'
284
- {
285
- "mcpServers": {
286
- "nex": { "command": "nex-mcp", "env": {} }
287
- }
288
- }
289
- EOF
296
+ # Ingest text
297
+ printf '{"content":"Meeting notes..."}' | bash scripts/nex-api.sh POST /v1/context/text
290
298
 
291
- # 2. Start Claude Code with channels
292
- claude --dangerously-load-development-channels server:nex
299
+ # Scan project files
300
+ bash scripts/nex-scan-files.sh --dir . --max-files 10
293
301
  ```
294
302
 
295
- Notifications appear as `<channel source="nex">` events in your session. Claude reads them automatically and incorporates the context.
296
-
297
- **Customize frequency:**
303
+ See the [scripts directory](scripts/) for details.
298
304
 
299
- ```json
300
- {
301
- "mcpServers": {
302
- "nex": {
303
- "command": "nex-mcp",
304
- "env": { "NEX_NOTIFY_INTERVAL_MINUTES": "5" }
305
- }
306
- }
307
- }
308
- ```
305
+ </details>
309
306
 
310
- **Force a fresh digest:** `rm ~/.nex/channel-state.json`
307
+ ## Shared Config
311
308
 
312
- **Requirements:** Claude Code v2.1.80+, claude.ai login, `--dangerously-load-development-channels` during research preview.
309
+ All surfaces share configuration for cross-tool compatibility:
313
310
 
314
- ### Config & Sessions
311
+ | File | Purpose | Shared by |
312
+ |------|---------|-----------|
313
+ | `~/.nex-mcp.json` | API key + workspace info | All surfaces |
314
+ | `~/.nex/file-scan-manifest.json` | File change tracking | All surfaces |
315
+ | `~/.nex/rate-limiter.json` | Rate limit timestamps | OC, MCP, CC |
316
+ | `~/.nex/recall-state.json` | Recall debounce state | CC |
315
317
 
316
- ```bash
317
- nex config show # Resolved config (key masked)
318
- nex config set default_format text
319
- nex config path # ~/.nex/config.json
320
- nex session list # Stored session mappings
321
- nex session clear
322
- ```
318
+ Register once via any surface → all other surfaces pick up the key automatically.
323
319
 
324
- ## Global Flags
320
+ ## Architecture
325
321
 
326
322
  ```
327
- --api-key <key> Override API key (env: NEX_API_KEY)
328
- --format <fmt> json | text (default for integrate list) | quiet
329
- --timeout <ms> Request timeout (default: 120000)
330
- --session <id> Session ID for multi-turn context
331
- --debug Debug output on stderr
323
+ ┌─────────────────────┐
324
+ │ Nex Context Graph │
325
+ │ (people, companies,
326
+ │ insights, tasks...)
327
+ └──────────┬──────────┘
328
+
329
+ ┌────────────────────────┼────────────────────────┐
330
+ │ │ │ │
331
+ ┌───▼────┐ ┌─────▼───────┐ ┌───────▼──────┐ ┌───▼──────────┐
332
+ │ CLI │ │ MCP Server │ │ OpenClaw │ │ Claude Code │
333
+ │ 50+ │ │ 50+ tools │ │ Plugin │ │ Plugin │
334
+ │ cmds │ │ + scan │ │ + recall │ │ + recall │
335
+ └───┬────┘ └─────┬───────┘ └──────┬──────┘ └──────┬───────┘
336
+ │ │ │ │
337
+ Any agent Claude Desktop OpenClaw agents Claude Code
338
+ Aider ChatGPT Clawgent Any project
339
+ Codex Cursor WhatsApp
340
+ Custom Windsurf
332
341
  ```
333
342
 
334
- ## Stdin Support
343
+ ## Environment Variables
335
344
 
336
- `ask`, `remember`, and `capture` read from stdin when no argument is provided:
345
+ | Variable | Required | Default |
346
+ |----------|----------|---------|
347
+ | `NEX_API_KEY` | Yes (or register) | — |
348
+ | `NEX_DEV_URL` | No (dev only) | `https://app.nex.ai` |
349
+ | `NEX_SCAN_ENABLED` | No | `true` |
350
+ | `NEX_SCAN_EXTENSIONS` | No | `.md,.txt,.rtf,.html,.htm,.csv,.tsv,.json,.yaml,.yml,.toml,.xml,.js,.ts,.jsx,.tsx,.py,.rb,.go,.rs,.java,.sh,.bash,.zsh,.fish,.org,.rst,.adoc,.tex,.log,.env,.ini,.cfg,.conf,.properties` |
351
+ | `NEX_SCAN_MAX_FILES` | No | `5` |
352
+ | `NEX_SCAN_DEPTH` | No | `20` |
353
+ | `NEX_SCAN_MAX_FILE_SIZE` | No | `100000` (bytes) |
354
+ | `NEX_SCAN_IGNORE_DIRS` | No | `node_modules,.git,dist,build,.next,__pycache__,vendor,.venv,.claude,coverage,.turbo,.cache` |
355
+ | `NEX_NOTIFY_INTERVAL_MINUTES` | No | `15` |
337
356
 
338
- ```bash
339
- cat meeting-notes.txt | nex remember
340
- echo "what happened today?" | nex ask
341
- git diff | nex capture
342
- ```
357
+ ## Testing
343
358
 
344
- ## Exit Codes
359
+ - **Shims**: `npm test` (syntax validation of bin/ shims)
360
+ - **OpenClaw plugin**: `cd openclaw-plugin && npx vitest run`
361
+ - **Claude Code plugin**: `cd claude-code-plugin && bun test`
345
362
 
346
- | Code | Meaning |
347
- |------|---------|
348
- | 0 | Success |
349
- | 1 | General error (server error, rate limit, invalid input) |
350
- | 2 | Auth error (no API key, invalid key, 401/403) |
363
+ ## License
351
364
 
352
- ## Development
353
-
354
- ```bash
355
- bun install
356
- bun run build # TypeScript → dist/
357
- bun run dev # Run TS directly (no build)
358
- bun test # Unit + integration tests
359
- NEX_DEV_URL=http://localhost:30000 nex ask "test" # Local API
360
- ```
365
+ MIT
package/bin/nex-mcp.js ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Thin shim for nex-mcp — delegates to nex-cli mcp.
5
+ *
6
+ * This entry point exists for MCP registry compatibility.
7
+ * Platforms like Claude Desktop install MCP servers via: npx @nex-ai/nex
8
+ * which resolves to this shim, which delegates to the nex-cli binary.
9
+ */
10
+
11
+ import { execFileSync } from "node:child_process";
12
+ import { existsSync } from "node:fs";
13
+
14
+ const args = ["mcp", ...process.argv.slice(2)];
15
+
16
+ function tryExec(command, commandArgs) {
17
+ try {
18
+ execFileSync(command, commandArgs, { stdio: "inherit" });
19
+ return true;
20
+ } catch (err) {
21
+ if (err.status !== null && err.status !== undefined) {
22
+ process.exit(err.status);
23
+ }
24
+ return false;
25
+ }
26
+ }
27
+
28
+ if (tryExec("nex-cli", args)) {
29
+ process.exit(0);
30
+ }
31
+
32
+ const commonPaths = ["/usr/local/bin/nex-cli"];
33
+ if (process.env.HOME) {
34
+ commonPaths.push(`${process.env.HOME}/.local/bin/nex-cli`);
35
+ }
36
+ for (const p of commonPaths) {
37
+ if (existsSync(p) && tryExec(p, args)) {
38
+ process.exit(0);
39
+ }
40
+ }
41
+
42
+ console.error(`
43
+ nex-cli binary not found.
44
+
45
+ Install it with:
46
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-cli/main/install.sh | sh
47
+
48
+ Then run your command again.
49
+ `);
50
+ process.exit(1);