@nex-ai/nex 0.1.65 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (529) hide show
  1. package/README.md +190 -263
  2. package/bin/nex-mcp.js +50 -0
  3. package/bin/nex.js +53 -0
  4. package/package.json +15 -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,360 +1,287 @@
1
- # Nex: Compounding Intelligence for AI agents
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
+ Nex turns AI agent conversations into a unified knowledge graph. Tell something to one agent, recall it from any other. Context follows you across tools no copy-pasting, no re-explaining.
7
+
8
+ Supports Claude Code, OpenClaw, Cursor, Windsurf, Codex, Aider, Continue, Zed, and more. Adds context from Email, Meetings, Slack, HubSpot, Salesforce.
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
-
15
- ## Install
16
-
17
- ```bash
18
- # Install globally
19
- npm install -g @nex-ai/nex
20
-
21
- # Or run directly (no install)
22
- npx @nex-ai/nex ask "who is Maria?"
23
- ```
24
-
25
- ## Quick Start (Recommended)
14
+ ## Quick Start
26
15
 
27
- ```bash
28
- # One command to get started — registers, detects platforms, installs hooks, scans files
29
- nex setup
30
- ```
31
-
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.
16
+ ### Install
33
17
 
34
18
  ```bash
35
- # Now query your knowledge
36
- nex ask "what's the latest on the Acme deal?"
37
- ```
38
-
39
- ## Copy-Paste Prompt For Any AI Agent
19
+ # Option A: standalone binary (no Node.js required, auto-installs nex-cli)
20
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-as-a-skill/main/install.sh | sh
40
21
 
41
- Use this when you want Claude, Codex, Cursor, OpenCode, or another terminal-capable AI agent to do the full Nex bootstrap for you.
42
-
43
- ```text
44
- Install and fully bootstrap Nex in this project from start to finish.
45
-
46
- 1. If the `nex` CLI is missing, install it globally with `npm install -g @nex-ai/nex`.
47
- 2. If Nex is not authenticated yet, ask me for the email address I want to use for registration, then continue. If Nex is already authenticated, reuse the existing account and key.
48
- 3. Run `nex setup` and complete the full install flow for every detected AI coding platform in this environment.
49
- 4. After setup, inspect integrations and connect the first available unconnected integration. Prefer this order when multiple choices are available: gmail, google-calendar, slack, salesforce, hubspot, attio, outlook, outlook-calendar. If OAuth is required, open the browser flow and wait for it to complete.
50
- 5. Run a fresh file scan for the current directory so the workspace is up to date.
51
- 6. After the scan finishes, trigger Nex compounding jobs by calling the authenticated `POST https://app.nex.ai/api/developers/v1/compounding/trigger` endpoint for these job types: `consolidation`, `pattern_detection`, and `playbook_synthesis`. Use the active Nex API key from the current environment or the config written by Nex setup.
52
- 7. Fetch the last 24 hours of insights with the insights endpoint or `nex insight list --last 24h`, then give me a clean digest with sections for Highlights, Risks, Opportunities, Open Loops, and Recommended Next Actions.
53
- 8. Finish by showing me:
54
- - what Nex installed
55
- - which integration was connected
56
- - how many files were scanned and ingested
57
- - whether the compounding/playbooks trigger succeeded
58
- - the formatted 24-hour insight digest
22
+ # Option B: install the nex-cli binary directly
23
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-cli/main/install.sh | sh
59
24
 
60
- Do not stop after partial setup. Only pause if you need my email for registration or if an OAuth flow requires my interaction.
25
+ # Option C: install via npm (or bun/pnpm)
26
+ npm install -g @nex-ai/nex
61
27
  ```
62
28
 
63
- This works best in agents that can run shell commands and open OAuth URLs.
64
-
65
- <details>
66
- <summary>Manual setup (if you prefer step-by-step)</summary>
29
+ ### Sign up and configure
67
30
 
68
31
  ```bash
69
- # 1. Register for an API key
32
+ # Create an account (or log in if you already have one)
70
33
  nex register --email you@company.com
71
34
 
72
- # 2. Set up your platforms (auto-detects installed tools)
35
+ # Auto-detect your AI platforms and install hooks, MCP, slash commands
73
36
  nex setup
74
-
75
- # 3. Query your knowledge
76
- nex ask "what's the latest on the Acme deal?"
77
- ```
78
-
79
- </details>
80
-
81
- ## Supported Platforms
82
-
83
- `nex setup` auto-detects and configures these platforms with full-depth integration:
84
-
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` | — |
99
-
100
- All MCP-based platforms use the same server entry (bundled in this package):
101
-
102
- ```json
103
- {
104
- "nex": {
105
- "command": "nex-mcp",
106
- "env": { "NEX_API_KEY": "sk-..." }
107
- }
108
- }
109
37
  ```
110
38
 
111
- Or without a global install: `"command": "npx", "args": ["-y", "@nex-ai/nex", "mcp"]`
112
-
113
- ## Setup Command
39
+ `nex setup` detects your platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and writes config. After setup:
114
40
 
115
41
  ```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
42
+ nex ask "who is Maria Rodriguez?"
43
+ nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."
124
44
  ```
125
45
 
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`
133
-
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.
46
+ ## Skills & Platform Rules
135
47
 
136
- **Integration hierarchy** (per platform): Hooks > Custom plugins > Custom agents/modes > Workflows > Rules > MCP. Each platform gets every layer it supports.
48
+ The core of this repo is a set of skills, slash commands, and agent instructions that teach any AI platform how to use Nex.
137
49
 
138
- ## Project Config: `.nex.toml`
50
+ ### Slash Commands (`plugin-commands/`)
139
51
 
140
- Per-project settings file created by `nex setup`. All fields are optional.
52
+ Drop these `.md` files into your agent's commands directory to get Nex slash commands:
141
53
 
142
- ```toml
143
- [auth]
144
- # api_key = "sk-..." # Prefer NEX_API_KEY env var or ~/.nex/config.json
54
+ | Command | What it does |
55
+ |---------|-------------|
56
+ | `/nex:recall <query>` | Search your knowledge base |
57
+ | `/nex:remember <text>` | Store information for later recall |
58
+ | `/nex:entities <query>` | Find people, companies, topics |
59
+ | `/nex:scan <dir>` | Scan project files into Nex |
60
+ | `/nex:integrate <provider>` | Connect an OAuth integration |
61
+ | `/nex:register <email>` | One-time account registration |
62
+ | `/nex:notify` | Check recent notifications |
145
63
 
146
- [hooks]
147
- # enabled = true # Master kill switch for all hooks
64
+ For Claude Code: `cp plugin-commands/*.md ~/.claude/commands/`
148
65
 
149
- [hooks.recall]
150
- # enabled = true # Proactive context on every prompt
151
- # debounce_ms = 10000
66
+ ### Platform Rules (`platform-rules/`)
152
67
 
153
- [hooks.capture]
154
- # enabled = true # Auto-capture on conversation stop
155
- # min_length = 20
156
- # max_length = 50000
68
+ Pre-written agent instructions that teach each platform how to use Nex tools. Copy the relevant file into your editor's config:
157
69
 
158
- [hooks.session_start]
159
- # enabled = true # Load context on session start
70
+ | Platform | File | Destination |
71
+ |----------|------|-------------|
72
+ | Cursor | `cursor-rules.md` | `.cursor/rules/` |
73
+ | Windsurf | `windsurf-rules.md` | `.windsurf/rules/` |
74
+ | GitHub Copilot | `vscode-instructions.md` | `.github/instructions/` |
75
+ | Zed | `zed-rules.md` | `.zed/rules/` |
76
+ | Aider | `aider-conventions.md` | `.aider/conventions/` |
77
+ | Cline | `cline-rules.md` | `.cline/rules/` |
78
+ | Continue | `continue-rules.md` | `.continue/rules/` |
79
+ | KiloCode | `kilocode-rules.md` | `.kilocode/rules/` |
80
+ | Codex | `codex-agents.md` | `.codex/agents/` |
81
+ | OpenCode | `opencode-agents.md` | `.opencode/agents/` |
160
82
 
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
83
+ ### Platform Plugins (`platform-plugins/`)
168
84
 
169
- [mcp]
170
- # enabled = false # Set to true when `nex setup` installs MCP for this project/platform
85
+ Deeper integrations for editors that support plugin APIs:
171
86
 
172
- [output]
173
- # format = "text" # "text" | "json"
174
- # timeout = 120000
175
- ```
87
+ - **Continue** (`continue-provider.ts`) — Nex as a context provider for autocomplete
88
+ - **OpenCode** (`opencode-plugin.ts`) Session lifecycle hooks for context preservation
89
+ - **KiloCode** (`kilocode-modes.yaml`) — Nex memory mode definitions
90
+ - **Windsurf** (`windsurf-workflows/`) — Native workflow definitions for ask, remember, search, notify
176
91
 
177
- **Resolution order:** CLI flags > `.nex.toml` > env vars > `~/.nex/config.json` > defaults
92
+ ## Plugins
178
93
 
179
- ## Commands
94
+ ### Claude Code Plugin
180
95
 
181
- ### Knowledge Graph
96
+ Full auto-recall and auto-capture via Claude Code hooks. Queries Nex before each prompt and captures conversation facts after each response.
182
97
 
183
98
  ```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
99
+ cd claude-code-plugin && bun install && bun run build
192
100
  ```
193
101
 
194
- ### Integrations
102
+ Then add hooks to `~/.claude/settings.json` (see [`settings.json`](claude-code-plugin/settings.json) for the template) and register the MCP server:
195
103
 
196
104
  ```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
105
+ cp claude-code-plugin/commands/*.md ~/.claude/commands/
106
+ claude mcp add nex -- nex-mcp
201
107
  ```
202
108
 
203
- Available integrations: `gmail`, `google-calendar`, `outlook`, `outlook-calendar`, `slack`, `salesforce`, `hubspot`, `attio`.
109
+ The fastest path is just `nex setup` it does all of this automatically.
204
110
 
205
- ### CRM Records
111
+ See [`claude-code-plugin/README.md`](claude-code-plugin/README.md) for details.
206
112
 
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
- ```
113
+ ### OpenClaw Plugin
216
114
 
217
- ### Tasks & Notes
115
+ 15+ tools, auto-recall, and auto-capture for OpenClaw agents.
218
116
 
219
117
  ```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>
118
+ cp -r openclaw-plugin /path/to/openclaw/plugins/nex
119
+ cd /path/to/openclaw/plugins/nex && bun install && bun run build
224
120
  ```
225
121
 
226
- ### Relationships & Lists
122
+ Add to `openclaw.json`:
227
123
 
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"
124
+ ```json
125
+ {
126
+ "plugins": {
127
+ "load": { "paths": ["/path/to/plugins/nex"] },
128
+ "slots": { "memory": "nex" },
129
+ "entries": {
130
+ "nex": {
131
+ "enabled": true,
132
+ "config": { "apiKey": "sk-your_key_here" }
133
+ }
134
+ }
135
+ }
136
+ }
234
137
  ```
235
138
 
236
- ### File Scanning
139
+ See [`openclaw-plugin/README.md`](openclaw-plugin/README.md) for details.
237
140
 
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.
141
+ ### MCP Server (Claude Desktop, Cursor, Windsurf)
239
142
 
240
- ```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
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "nex": {
147
+ "command": "nex-mcp",
148
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
149
+ }
150
+ }
151
+ }
245
152
  ```
246
153
 
247
- **Default text-based extensions:** `.md`, `.txt`, `.csv`, `.json`, `.yaml`, `.yml`
154
+ Or without a global install:
248
155
 
249
- **Document formats** (handled separately): `.docx`, `.doc`, `.odt`, `.xlsx`, `.xls`, `.pptx`, `.ppt`, `.pdf`
156
+ ```json
157
+ {
158
+ "mcpServers": {
159
+ "nex": {
160
+ "command": "npx",
161
+ "args": ["-y", "@nex-ai/nex", "mcp"],
162
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
163
+ }
164
+ }
165
+ }
166
+ ```
250
167
 
251
- Configure via `.nex.toml` `[scan]` section or environment variables (`NEX_SCAN_ENABLED`, `NEX_SCAN_EXTENSIONS`, etc.).
168
+ ### Shell-only Agents (no Node.js)
252
169
 
253
- ### Proactive Context
170
+ Bash scripts for agents that can only run shell commands. Requires `curl` and `jq`.
254
171
 
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.
172
+ ```bash
173
+ bash scripts/nex-openclaw-register.sh your@email.com "Your Name"
174
+ printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask
175
+ bash scripts/nex-scan-files.sh --dir . --max-files 10
176
+ ```
256
177
 
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.
178
+ ## Copy-Paste Bootstrap Prompt
258
179
 
259
- ### Transcript Capture
180
+ Drop this into any terminal-capable AI agent to bootstrap Nex end-to-end:
260
181
 
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.
182
+ ```text
183
+ Install and fully bootstrap Nex in this project from start to finish.
262
184
 
263
- ### MCP Server & Notifications
185
+ 1. If the `nex` CLI is missing, install it globally with `npm install -g @nex-ai/nex`.
186
+ 2. If Nex is not authenticated yet, ask me for the email address I want to use for registration, then continue. If Nex is already authenticated, reuse the existing account and key.
187
+ 3. Run `nex setup` and complete the full install flow for every detected AI coding platform in this environment.
188
+ 4. After setup, inspect integrations and connect the first available unconnected integration. Prefer this order when multiple choices are available: gmail, google-calendar, slack, salesforce, hubspot, attio, outlook, outlook-calendar. If OAuth is required, open the browser flow and wait for it to complete.
189
+ 5. Run a fresh file scan for the current directory so the workspace is up to date.
190
+ 6. After the scan finishes, trigger Nex compounding jobs by calling the authenticated `POST https://app.nex.ai/api/developers/v1/compounding/trigger` endpoint for these job types: `consolidation`, `pattern_detection`, and `playbook_synthesis`. Use the active Nex API key from the current environment or the config written by Nex setup.
191
+ 7. Fetch the last 24 hours of insights with the insights endpoint or `nex insight list --last 24h`, then give me a clean digest with sections for Highlights, Risks, Opportunities, Open Loops, and Recommended Next Actions.
192
+ 8. Finish by showing me:
193
+ - what Nex installed
194
+ - which integration was connected
195
+ - how many files were scanned and ingested
196
+ - whether the compounding/playbooks trigger succeeded
197
+ - the formatted 24-hour insight digest
264
198
 
265
- ```bash
266
- nex mcp # Start the embedded MCP server (stdio)
267
- MCP_TRANSPORT=http nex mcp # Start with HTTP transport
199
+ Do not stop after partial setup. Only pause if you need my email for registration or if an OAuth flow requires my interaction.
268
200
  ```
269
201
 
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.
202
+ ## Development
273
203
 
274
- **Two notification types:**
204
+ ### Repo structure
275
205
 
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`.
206
+ ```text
207
+ src/ # Bootstrapper binary source (compiled via Bun)
208
+ bin/ # Thin Node.js shims that delegate to nex-cli (npm fallback)
209
+ install.sh # curl-pipe installer for the standalone binary
210
+ claude-code-plugin/ # Claude Code hooks (auto-recall, auto-capture)
211
+ openclaw-plugin/ # OpenClaw plugin (15+ tools, auto-recall, auto-capture)
212
+ plugin-commands/ # Slash command definitions (.md files)
213
+ platform-rules/ # Agent instructions for 10 platforms
214
+ platform-plugins/ # Editor integrations (Continue, OpenCode, KiloCode, Windsurf)
215
+ scripts/ # Bash API wrappers for shell-only agents
216
+ server.json # MCP Registry manifest
217
+ ```
278
218
 
279
- **Quick setup:**
219
+ ### Build and test
280
220
 
281
221
  ```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
290
-
291
- # 2. Start Claude Code with channels
292
- claude --dangerously-load-development-channels server:nex
293
- ```
222
+ # Standalone binary (compiles via Bun)
223
+ bun run build:binary # native platform
224
+ bun run build:all # all 4 targets (darwin/linux × arm64/x64)
294
225
 
295
- Notifications appear as `<channel source="nex">` events in your session. Claude reads them automatically and incorporates the context.
226
+ # Shims (syntax check only)
227
+ npm test
296
228
 
297
- **Customize frequency:**
229
+ # Claude Code plugin
230
+ cd claude-code-plugin && bun install && bun run build && bun test
298
231
 
299
- ```json
300
- {
301
- "mcpServers": {
302
- "nex": {
303
- "command": "nex-mcp",
304
- "env": { "NEX_NOTIFY_INTERVAL_MINUTES": "5" }
305
- }
306
- }
307
- }
232
+ # OpenClaw plugin
233
+ cd openclaw-plugin && bun install && bun run build && bun test
308
234
  ```
309
235
 
310
- **Force a fresh digest:** `rm ~/.nex/channel-state.json`
236
+ ### How it works
311
237
 
312
- **Requirements:** Claude Code v2.1.80+, claude.ai login, `--dangerously-load-development-channels` during research preview.
238
+ **Standalone binary** (`src/nex.ts`): Compiled via `bun build --compile`. Finds `nex-cli` on PATH or common locations and delegates all commands. If `nex-cli` isn't installed, auto-downloads it on first run. Detects `nex-mcp` symlink invocation to transparently prepend `mcp` to args.
313
239
 
314
- ### Config & Sessions
240
+ **npm package** (`bin/nex.js`): Thin Node.js shim with the same delegation logic, for `npx @nex-ai/nex` and MCP Registry compatibility.
315
241
 
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
- ```
242
+ ### CI/CD
323
243
 
324
- ## Global Flags
244
+ - **CI** (`ci.yml`): Validates shims, builds + tests both plugins, builds + smoke tests the binary on every PR
245
+ - **Release** (`release.yml`): Cross-compiles 4 binary targets on `v*` tags, creates GitHub Release with checksums
246
+ - **Publish** (`publish-cli.yml`): Auto-publishes to npm on push to main
247
+ - **MCP Registry** (`publish-mcp.yml`): Publishes `server.json` to the MCP Registry on version tags
325
248
 
326
- ```
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
332
- ```
249
+ ## Environment Variables
333
250
 
334
- ## Stdin Support
251
+ | Variable | Required | Default |
252
+ |----------|----------|---------|
253
+ | `NEX_API_KEY` | Yes (or register) | — |
254
+ | `NEX_DEV_URL` | No (dev only) | `https://app.nex.ai` |
255
+ | `NEX_SCAN_ENABLED` | No | `true` |
256
+ | `NEX_SCAN_MAX_FILES` | No | `5` |
257
+ | `NEX_SCAN_DEPTH` | No | `20` |
258
+ | `NEX_NOTIFY_INTERVAL_MINUTES` | No | `15` |
335
259
 
336
- `ask`, `remember`, and `capture` read from stdin when no argument is provided:
260
+ ## Architecture
337
261
 
338
- ```bash
339
- cat meeting-notes.txt | nex remember
340
- echo "what happened today?" | nex ask
341
- git diff | nex capture
342
- ```
262
+ ```mermaid
263
+ graph TD
264
+ API["Nex Context Graph<br/><i>app.nex.ai API</i>"]
265
+ CLI["nex-cli binary"]
343
266
 
344
- ## Exit Codes
267
+ API --- CLI
345
268
 
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) |
269
+ NEX["nex binary / npm shim"]
270
+ MCP["MCP Server<br/><i>nex-mcp</i>"]
271
+ OC["OpenClaw Plugin"]
272
+ CC["Claude Code Plugin"]
351
273
 
352
- ## Development
274
+ CLI --- NEX
275
+ CLI --- MCP
276
+ CLI --- OC
277
+ CLI --- CC
353
278
 
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
279
+ NEX -.- T1["Any terminal"]
280
+ MCP -.- T2["Claude Desktop · Cursor<br/>Windsurf · ChatGPT"]
281
+ OC -.- T3["OpenClaw agents"]
282
+ CC -.- T4["Claude Code"]
360
283
  ```
284
+
285
+ ## License
286
+
287
+ 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);
package/bin/nex.js ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Thin shim for @nex-ai/nex — delegates all commands to the nex-cli binary.
5
+ *
6
+ * Install the binary: curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-cli/main/install.sh | sh
7
+ */
8
+
9
+ import { execFileSync } from "node:child_process";
10
+ import { existsSync } from "node:fs";
11
+
12
+ const args = process.argv.slice(2);
13
+
14
+ // Try nex-cli on PATH first
15
+ function tryExec(command, commandArgs) {
16
+ try {
17
+ execFileSync(command, commandArgs, { stdio: "inherit" });
18
+ return true;
19
+ } catch (err) {
20
+ // If the command was found but returned non-zero, propagate the exit code
21
+ if (err.status !== null && err.status !== undefined) {
22
+ process.exit(err.status);
23
+ }
24
+ return false;
25
+ }
26
+ }
27
+
28
+ // 1. Try nex-cli directly (installed via curl | sh)
29
+ if (tryExec("nex-cli", args)) {
30
+ process.exit(0);
31
+ }
32
+
33
+ // 2. Try common install locations
34
+ const commonPaths = ["/usr/local/bin/nex-cli"];
35
+ if (process.env.HOME) {
36
+ commonPaths.push(`${process.env.HOME}/.local/bin/nex-cli`);
37
+ }
38
+ for (const p of commonPaths) {
39
+ if (existsSync(p) && tryExec(p, args)) {
40
+ process.exit(0);
41
+ }
42
+ }
43
+
44
+ // 3. Not found — show install instructions
45
+ console.error(`
46
+ nex-cli binary not found.
47
+
48
+ Install it with:
49
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-cli/main/install.sh | sh
50
+
51
+ Then run your command again.
52
+ `);
53
+ process.exit(1);