@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
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAW,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AAEjE,IAAI;KACD,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,8BAA8B,CAAC;KAC3C,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;KACxC,MAAM,CAAC,sBAAsB,EAAE,gCAAgC,CAAC;KAChE,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAAqC,EAAE,EAAE;IAC1E,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CA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AE,EAAE;IACzE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,IAAI,UAAmB,CAAC;IACxB,IAAI,CAAC;QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;IAC3C,MAAM,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAAC,CAAC;IACnE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,aAAa,kBAAkB,CAAC,MAAM,CAAC,YAAY,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IACrI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEL,IAAI;KACD,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,6BAA6B,CAAC;KAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC;KAChC,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC;KACpC,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,QAAgB,EAAE,EAAE;IACjD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,kBAAkB,CAAC,MAAM,CAAC,YAAY,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACtH,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * nex note — CRUD operations for notes.
3
- */
4
- export {};
@@ -1,77 +0,0 @@
1
- /**
2
- * nex note — CRUD operations for notes.
3
- */
4
- import { program } from "../cli.js";
5
- import { NexClient } from "../lib/client.js";
6
- import { resolveApiKey, resolveFormat, resolveTimeout } from "../lib/config.js";
7
- import { printOutput } from "../lib/output.js";
8
- function getClient() {
9
- const opts = program.opts();
10
- const client = new NexClient(resolveApiKey(opts.apiKey), resolveTimeout(opts.timeout));
11
- return { client, format: resolveFormat(opts.format) };
12
- }
13
- const note = program.command("note").description("Manage notes");
14
- note
15
- .command("list")
16
- .description("List notes")
17
- .option("--entity <id>", "Filter by entity ID")
18
- .action(async (opts) => {
19
- const { client, format } = getClient();
20
- const params = opts.entity ? `?entity_id=${encodeURIComponent(opts.entity)}` : "";
21
- const result = await client.get(`/v1/notes${params}`);
22
- printOutput(result, format);
23
- });
24
- note
25
- .command("get")
26
- .description("Get a note by ID")
27
- .argument("<id>", "Note ID")
28
- .action(async (id) => {
29
- const { client, format } = getClient();
30
- const result = await client.get(`/v1/notes/${encodeURIComponent(id)}`);
31
- printOutput(result, format);
32
- });
33
- note
34
- .command("create")
35
- .description("Create a note")
36
- .requiredOption("--title <title>", "Note title")
37
- .option("--content <content>", "Note content")
38
- .option("--entity <id>", "Entity ID to attach to")
39
- .action(async (opts) => {
40
- const { client, format } = getClient();
41
- const body = { title: opts.title };
42
- if (opts.content)
43
- body.content = opts.content;
44
- if (opts.entity)
45
- body.entity_id = opts.entity;
46
- const result = await client.post("/v1/notes", body);
47
- printOutput(result, format);
48
- });
49
- note
50
- .command("update")
51
- .description("Update a note")
52
- .argument("<id>", "Note ID")
53
- .option("--title <title>", "New title")
54
- .option("--content <content>", "New content")
55
- .option("--entity <id>", "Change associated entity")
56
- .action(async (id, opts) => {
57
- const { client, format } = getClient();
58
- const body = {};
59
- if (opts.title !== undefined)
60
- body.title = opts.title;
61
- if (opts.content !== undefined)
62
- body.content = opts.content;
63
- if (opts.entity !== undefined)
64
- body.entity_id = opts.entity;
65
- const result = await client.patch(`/v1/notes/${encodeURIComponent(id)}`, body);
66
- printOutput(result, format);
67
- });
68
- note
69
- .command("delete")
70
- .description("Delete a note")
71
- .argument("<id>", "Note ID")
72
- .action(async (id) => {
73
- const { client, format } = getClient();
74
- const result = await client.delete(`/v1/notes/${encodeURIComponent(id)}`);
75
- printOutput(result, format);
76
- });
77
- //# sourceMappingURL=note.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"note.js","sourceRoot":"","sources":["../../src/commands/note.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAW,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AAEjE,IAAI;KACD,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,YAAY,CAAC;KACzB,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,IAAyB,EAAE,EAAE;IAC1C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAClF,MAAM,MAAM,GAAG,MAA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kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1E,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * nex object — CRUD operations for object definitions.
3
- */
4
- export {};
@@ -1,78 +0,0 @@
1
- /**
2
- * nex object — CRUD operations for object definitions.
3
- */
4
- import { program } from "../cli.js";
5
- import { NexClient } from "../lib/client.js";
6
- import { resolveApiKey, resolveFormat, resolveTimeout } from "../lib/config.js";
7
- import { printOutput } from "../lib/output.js";
8
- function getClient() {
9
- const opts = program.opts();
10
- const client = new NexClient(resolveApiKey(opts.apiKey), resolveTimeout(opts.timeout));
11
- return { client, format: resolveFormat(opts.format) };
12
- }
13
- const obj = program.command("object").description("Manage object definitions");
14
- obj
15
- .command("list")
16
- .description("List all objects")
17
- .option("--include-attributes", "Include attributes in response")
18
- .action(async (opts) => {
19
- const { client, format } = getClient();
20
- const params = opts.includeAttributes ? "?include_attributes=true" : "";
21
- const result = await client.get(`/v1/objects${params}`);
22
- printOutput(result, format);
23
- });
24
- obj
25
- .command("get")
26
- .description("Get an object by slug")
27
- .argument("<slug>", "Object slug")
28
- .action(async (slug) => {
29
- const { client, format } = getClient();
30
- const result = await client.get(`/v1/objects/${encodeURIComponent(slug)}`);
31
- printOutput(result, format);
32
- });
33
- obj
34
- .command("create")
35
- .description("Create a new object")
36
- .requiredOption("--name <name>", "Object name")
37
- .requiredOption("--slug <slug>", "Object slug")
38
- .option("--type <type>", "Object type: person, company, custom, deal")
39
- .option("--description <description>", "Object description")
40
- .action(async (opts) => {
41
- const { client, format } = getClient();
42
- const body = { name: opts.name, slug: opts.slug };
43
- if (opts.type)
44
- body.type = opts.type;
45
- if (opts.description)
46
- body.description = opts.description;
47
- const result = await client.post("/v1/objects", body);
48
- printOutput(result, format);
49
- });
50
- obj
51
- .command("update")
52
- .description("Update an object")
53
- .argument("<slug>", "Object slug")
54
- .option("--name <name>", "New name")
55
- .option("--description <description>", "New description")
56
- .option("--name-plural <plural>", "New plural name")
57
- .action(async (slug, opts) => {
58
- const { client, format } = getClient();
59
- const body = {};
60
- if (opts.name !== undefined)
61
- body.name = opts.name;
62
- if (opts.namePlural !== undefined)
63
- body.name_plural = opts.namePlural;
64
- if (opts.description !== undefined)
65
- body.description = opts.description;
66
- const result = await client.patch(`/v1/objects/${encodeURIComponent(slug)}`, body);
67
- printOutput(result, format);
68
- });
69
- obj
70
- .command("delete")
71
- .description("Delete an object")
72
- .argument("<slug>", "Object slug")
73
- .action(async (slug) => {
74
- const { client, format } = getClient();
75
- const result = await client.delete(`/v1/objects/${encodeURIComponent(slug)}`);
76
- printOutput(result, format);
77
- });
78
- //# sourceMappingURL=object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/commands/object.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAW,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;AAE/E,GAAG;KACA,OAAO,CAAC,MAAM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,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACnF,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEL,GAAG;KACA,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,kBAAkB,CAAC;KAC/B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;KACjC,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE;IAC7B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,eAAe,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9E,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Parse a command input string into an array of tokens.
3
- * Handles double quotes, single quotes, and whitespace splitting.
4
- */
5
- export declare function parseInput(input: string): string[];
@@ -1,37 +0,0 @@
1
- /**
2
- * Parse a command input string into an array of tokens.
3
- * Handles double quotes, single quotes, and whitespace splitting.
4
- */
5
- export function parseInput(input) {
6
- const tokens = [];
7
- const trimmed = input.trim();
8
- if (!trimmed)
9
- return tokens;
10
- let current = "";
11
- let inDouble = false;
12
- let inSingle = false;
13
- for (let i = 0; i < trimmed.length; i++) {
14
- const ch = trimmed[i];
15
- if (ch === '"' && !inSingle) {
16
- inDouble = !inDouble;
17
- continue;
18
- }
19
- if (ch === "'" && !inDouble) {
20
- inSingle = !inSingle;
21
- continue;
22
- }
23
- if (ch === " " && !inDouble && !inSingle) {
24
- if (current.length > 0) {
25
- tokens.push(current);
26
- current = "";
27
- }
28
- continue;
29
- }
30
- current += ch;
31
- }
32
- if (current.length > 0) {
33
- tokens.push(current);
34
- }
35
- return tokens;
36
- }
37
- //# sourceMappingURL=parse-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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* nex record — CRUD operations for records.
3
- */
4
- export {};
@@ -1,126 +0,0 @@
1
- /**
2
- * nex record — CRUD operations for records.
3
- */
4
- import { program } from "../cli.js";
5
- import { NexClient } from "../lib/client.js";
6
- import { resolveApiKey, resolveFormat, resolveTimeout } from "../lib/config.js";
7
- import { printOutput } from "../lib/output.js";
8
- function getClient() {
9
- const opts = program.opts();
10
- const client = new NexClient(resolveApiKey(opts.apiKey), resolveTimeout(opts.timeout));
11
- return { client, format: resolveFormat(opts.format) };
12
- }
13
- const rec = program.command("record").description("Manage records");
14
- rec
15
- .command("list")
16
- .description("List records for an object")
17
- .argument("<object-slug>", "Object slug")
18
- .option("--limit <n>", "Max records to return")
19
- .option("--offset <n>", "Offset for pagination")
20
- .option("--attributes <level>", "Attribute detail: all, primary, none", "primary")
21
- .option("--sort <sort>", "Sort as attr:asc or attr:desc")
22
- .action(async (objectSlug, opts) => {
23
- const { client, format } = getClient();
24
- const body = { attributes: opts.attributes ?? "primary" };
25
- if (opts.limit)
26
- body.limit = parseInt(opts.limit, 10);
27
- if (opts.offset)
28
- body.offset = parseInt(opts.offset, 10);
29
- if (opts.sort) {
30
- const [attribute, direction] = opts.sort.split(":");
31
- body.sort = { attribute, direction };
32
- }
33
- const result = await client.post(`/v1/objects/${encodeURIComponent(objectSlug)}/records`, body);
34
- printOutput(result, format);
35
- });
36
- rec
37
- .command("get")
38
- .description("Get a record by ID")
39
- .argument("<id>", "Record ID")
40
- .action(async (id) => {
41
- const { client, format } = getClient();
42
- const result = await client.get(`/v1/records/${encodeURIComponent(id)}`);
43
- printOutput(result, format);
44
- });
45
- rec
46
- .command("create")
47
- .description("Create a record")
48
- .argument("<object-slug>", "Object slug")
49
- .requiredOption("--data <json>", "Attributes as JSON string")
50
- .action(async (objectSlug, opts) => {
51
- const { client, format } = getClient();
52
- let attributes;
53
- try {
54
- attributes = JSON.parse(opts.data);
55
- }
56
- catch {
57
- throw new Error(`Invalid JSON for --data: ${opts.data}`);
58
- }
59
- const result = await client.post(`/v1/objects/${encodeURIComponent(objectSlug)}`, { attributes });
60
- printOutput(result, format);
61
- });
62
- rec
63
- .command("upsert")
64
- .description("Upsert a record")
65
- .argument("<object-slug>", "Object slug")
66
- .requiredOption("--match <attr>", "Matching attribute for upsert")
67
- .requiredOption("--data <json>", "Attributes as JSON string")
68
- .action(async (objectSlug, opts) => {
69
- const { client, format } = getClient();
70
- let attributes;
71
- try {
72
- attributes = JSON.parse(opts.data);
73
- }
74
- catch {
75
- throw new Error(`Invalid JSON for --data: ${opts.data}`);
76
- }
77
- const result = await client.put(`/v1/objects/${encodeURIComponent(objectSlug)}`, {
78
- matching_attribute: opts.match,
79
- attributes,
80
- });
81
- printOutput(result, format);
82
- });
83
- rec
84
- .command("update")
85
- .description("Update a record")
86
- .argument("<id>", "Record ID")
87
- .requiredOption("--data <json>", "Attributes as JSON string")
88
- .action(async (id, opts) => {
89
- const { client, format } = getClient();
90
- let attributes;
91
- try {
92
- attributes = JSON.parse(opts.data);
93
- }
94
- catch {
95
- throw new Error(`Invalid JSON for --data: ${opts.data}`);
96
- }
97
- const result = await client.patch(`/v1/records/${encodeURIComponent(id)}`, { attributes });
98
- printOutput(result, format);
99
- });
100
- rec
101
- .command("delete")
102
- .description("Delete a record")
103
- .argument("<id>", "Record ID")
104
- .action(async (id) => {
105
- const { client, format } = getClient();
106
- const result = await client.delete(`/v1/records/${encodeURIComponent(id)}`);
107
- printOutput(result, format);
108
- });
109
- rec
110
- .command("timeline")
111
- .description("Get record timeline")
112
- .argument("<id>", "Record ID")
113
- .option("--limit <n>", "Max entries")
114
- .option("--cursor <cursor>", "Pagination cursor")
115
- .action(async (id, opts) => {
116
- const { client, format } = getClient();
117
- const params = new URLSearchParams();
118
- if (opts.limit)
119
- params.set("limit", opts.limit);
120
- if (opts.cursor)
121
- params.set("cursor", opts.cursor);
122
- const qs = params.toString();
123
- const result = await client.get(`/v1/records/${encodeURIComponent(id)}/timeline${qs ? `?${qs}` : ""}`);
124
- printOutput(result, format);
125
- });
126
- //# sourceMappingURL=record.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"record.js","sourceRoot":"","sources":["../../src/commands/record.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAW,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAEpE,GAAG;KACA,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;KACxC,MAAM,CAAC,aAAa,EAAE,uBAAuB,CAAC;KAC9C,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC;KAC/C,MAAM,CAAC,sBAAsB,EAAE,sCAAsC,EAAE,SAAS,CAAC;KACjF,MAAM,CAAC,eAAe,EAAE,+BAA+B,CAAC;KACxD,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,IAA6E,EAAE,EAAE;IAClH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,IAAI,GAA4B,EAAE,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E,CAAC,EAAE,CAAC,CAAC;IAC5E,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEL,GAAG;KACA,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,qBAAqB,CAAC;KAClC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;KACpC,MAAM,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;KAChD,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,IAAyC,EAAE,EAAE;IACtE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,IAAI,IAAI,CAAC,KAAK;QAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,IAAI,CAAC,MAAM;QAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,eAAe,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * nex register — register a new developer account.
3
- */
4
- export {};
@@ -1,23 +0,0 @@
1
- /**
2
- * nex register — register a new developer account.
3
- */
4
- import { program } from "../cli.js";
5
- import { NexClient } from "../lib/client.js";
6
- import { persistRegistration, resolveTimeout } from "../lib/config.js";
7
- import { printOutput } from "../lib/output.js";
8
- import { resolveFormat } from "../lib/config.js";
9
- program
10
- .command("register")
11
- .description("Register a new Nex workspace and get an API key")
12
- .requiredOption("--email <email>", "Email address")
13
- .option("--name <name>", "Your name")
14
- .option("--company <company>", "Company name")
15
- .action(async (opts) => {
16
- const globalOpts = program.opts();
17
- const client = new NexClient(undefined, resolveTimeout(globalOpts.timeout));
18
- const format = resolveFormat(globalOpts.format);
19
- const data = await client.register(opts.email, opts.name, opts.company);
20
- persistRegistration(data);
21
- printOutput(data, format);
22
- });
23
- //# sourceMappingURL=register.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,iDAAiD,CAAC;KAC9D,cAAc,CAAC,iBAAiB,EAAE,eAAe,CAAC;KAClD,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC;KACpC,MAAM,CAAC,qBAAqB,EAAE,cAAc,CAAC;KAC7C,MAAM,CAAC,KAAK,EAAE,IAAwD,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,CAAW,CAAC;IAE1D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxE,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * nex rel — manage relationship definitions and instances.
3
- */
4
- export {};
@@ -1,80 +0,0 @@
1
- /**
2
- * nex rel — manage relationship definitions and instances.
3
- */
4
- import { program } from "../cli.js";
5
- import { NexClient } from "../lib/client.js";
6
- import { resolveApiKey, resolveFormat, resolveTimeout } from "../lib/config.js";
7
- import { printOutput } from "../lib/output.js";
8
- function getClient() {
9
- const opts = program.opts();
10
- const client = new NexClient(resolveApiKey(opts.apiKey), resolveTimeout(opts.timeout));
11
- return { client, format: resolveFormat(opts.format) };
12
- }
13
- const rel = program.command("rel").description("Manage relationships");
14
- rel
15
- .command("list-defs")
16
- .description("List relationship definitions")
17
- .action(async () => {
18
- const { client, format } = getClient();
19
- const result = await client.get("/v1/relationships");
20
- printOutput(result, format);
21
- });
22
- rel
23
- .command("create-def")
24
- .description("Create a relationship definition")
25
- .requiredOption("--type <type>", "Relationship type: one_to_one, one_to_many, many_to_many")
26
- .requiredOption("--entity1 <id>", "Entity definition 1 ID")
27
- .requiredOption("--entity2 <id>", "Entity definition 2 ID")
28
- .option("--pred12 <predicate>", "Entity 1 to 2 predicate")
29
- .option("--pred21 <predicate>", "Entity 2 to 1 predicate")
30
- .action(async (opts) => {
31
- const { client, format } = getClient();
32
- const body = {
33
- type: opts.type,
34
- entity_definition_1_id: opts.entity1,
35
- entity_definition_2_id: opts.entity2,
36
- };
37
- if (opts.pred12)
38
- body.entity_1_to_2_predicate = opts.pred12;
39
- if (opts.pred21)
40
- body.entity_2_to_1_predicate = opts.pred21;
41
- const result = await client.post("/v1/relationships", body);
42
- printOutput(result, format);
43
- });
44
- rel
45
- .command("delete-def")
46
- .description("Delete a relationship definition")
47
- .argument("<id>", "Relationship definition ID")
48
- .action(async (id) => {
49
- const { client, format } = getClient();
50
- const result = await client.delete(`/v1/relationships/${encodeURIComponent(id)}`);
51
- printOutput(result, format);
52
- });
53
- rel
54
- .command("create")
55
- .description("Create a relationship between records")
56
- .argument("<record-id>", "Record ID")
57
- .requiredOption("--def <id>", "Relationship definition ID")
58
- .requiredOption("--entity1 <id>", "Entity 1 ID")
59
- .requiredOption("--entity2 <id>", "Entity 2 ID")
60
- .action(async (recordId, opts) => {
61
- const { client, format } = getClient();
62
- const body = {
63
- definition_id: opts.def,
64
- entity_1_id: opts.entity1,
65
- entity_2_id: opts.entity2,
66
- };
67
- const result = await client.post(`/v1/records/${encodeURIComponent(recordId)}/relationships`, body);
68
- printOutput(result, format);
69
- });
70
- rel
71
- .command("delete")
72
- .description("Delete a relationship")
73
- .argument("<record-id>", "Record ID")
74
- .argument("<rel-id>", "Relationship ID")
75
- .action(async (recordId, relId) => {
76
- const { client, format } = getClient();
77
- const result = await client.delete(`/v1/records/${encodeURIComponent(recordId)}/relationships/${encodeURIComponent(relId)}`);
78
- printOutput(result, format);
79
- });
80
- //# sourceMappingURL=relationship.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relationship.js","sourceRoot":"","sources":["../../src/commands/relationship.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,IAAI,C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C,eAAe,kBAAkB,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACpG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEL,GAAG;KACA,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,uBAAuB,CAAC;KACpC,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC;KACpC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;KACvC,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,KAAa,EAAE,EAAE;IAChD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,eAAe,kBAAkB,CAAC,QAAQ,CAAC,kBAAkB,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7H,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * nex scan [dir] — Scan directory for text files and ingest into Nex.
3
- */
4
- export {};
@@ -1,111 +0,0 @@
1
- /**
2
- * nex scan [dir] — Scan directory for text files and ingest into Nex.
3
- */
4
- import { program } from "../cli.js";
5
- import { resolveApiKey, resolveFormat, resolveTimeout } from "../lib/config.js";
6
- import { NexClient } from "../lib/client.js";
7
- import { printOutput, printError } from "../lib/output.js";
8
- import { scanFiles, loadScanConfig, isScanEnabled } from "../lib/file-scanner.js";
9
- import { launchBackgroundCompounding, shouldTriggerCompounding } from "../lib/compounding.js";
10
- import { spinner as createSpinner, table, style, sym, isTTY, exitHint } from "../lib/tui.js";
11
- function formatScanTTY(data) {
12
- const d = data;
13
- if (!d || typeof d !== "object")
14
- return undefined;
15
- const lines = [];
16
- if (d.dry_run) {
17
- lines.push(` ${sym.info} Dry run — no files ingested`);
18
- lines.push(` Would scan: ${d.would_scan ?? 0}, Would skip: ${d.would_skip ?? 0}`);
19
- }
20
- const files = d.files;
21
- if (files && Array.isArray(files) && files.length > 0) {
22
- const headers = ["FILE", "STATUS"];
23
- const rows = files.map((f) => [
24
- String(f.path ?? ""),
25
- String(f.status ?? ""),
26
- ]);
27
- lines.push(table({ headers, rows }));
28
- lines.push("");
29
- }
30
- if (!d.dry_run) {
31
- const parts = [];
32
- if (d.scanned)
33
- parts.push(`${d.scanned} ingested`);
34
- if (d.skipped)
35
- parts.push(`${d.skipped} skipped`);
36
- if (d.errors)
37
- parts.push(`${d.errors} errors`);
38
- if (parts.length > 0) {
39
- lines.push(` ${style.dim(parts.join(", "))}`);
40
- }
41
- }
42
- return lines.length > 0 ? lines.join("\n") : undefined;
43
- }
44
- program
45
- .command("scan")
46
- .description("Scan a directory for text files and ingest new/changed files into Nex")
47
- .argument("[dir]", "Directory to scan (default: current directory)", ".")
48
- .option("--extensions <exts>", "File extensions to scan (comma-separated)")
49
- .option("--max-files <n>", "Maximum files per scan run")
50
- .option("--depth <n>", "Maximum directory depth")
51
- .option("--force", "Re-scan all files (ignore manifest)")
52
- .option("--dry-run", "Show what would be scanned without ingesting")
53
- .action(async (dir, opts) => {
54
- const globalOpts = program.opts();
55
- const apiKey = resolveApiKey(globalOpts.apiKey);
56
- const format = resolveFormat(globalOpts.format);
57
- if (!opts.dryRun && !apiKey) {
58
- printError("No API key. Run 'nex register --email <email>' first or set NEX_API_KEY.");
59
- process.exit(2);
60
- }
61
- if (!isScanEnabled()) {
62
- printError("File scanning is disabled (NEX_SCAN_ENABLED=false).");
63
- process.exit(0);
64
- }
65
- const scanOpts = loadScanConfig({
66
- extensions: opts.extensions?.split(",").map((e) => e.trim()),
67
- maxFiles: opts.maxFiles ? parseInt(opts.maxFiles, 10) : undefined,
68
- depth: opts.depth ? parseInt(opts.depth, 10) : undefined,
69
- force: opts.force,
70
- dryRun: opts.dryRun,
71
- });
72
- const client = new NexClient(apiKey, resolveTimeout(globalOpts.timeout));
73
- // Show spinner for TTY text output
74
- const showSpinner = isTTY && format === "text" && !opts.dryRun;
75
- const spin = showSpinner ? createSpinner(`Scanning project files... ${exitHint}`) : null;
76
- try {
77
- const result = await scanFiles(dir, scanOpts, async (content, context) => {
78
- return client.post("/v1/context/text", { content, context });
79
- });
80
- if (apiKey && shouldTriggerCompounding(result.scanned, opts.dryRun)) {
81
- launchBackgroundCompounding(apiKey);
82
- }
83
- if (spin) {
84
- spin.succeed("Scan complete");
85
- process.stderr.write("\n");
86
- }
87
- if (opts.dryRun) {
88
- printOutput({
89
- dry_run: true,
90
- would_scan: result.scanned,
91
- would_skip: result.skipped,
92
- files: result.files,
93
- }, format, formatScanTTY);
94
- }
95
- else {
96
- printOutput({
97
- scanned: result.scanned,
98
- skipped: result.skipped,
99
- errors: result.errors,
100
- files: result.files,
101
- }, format, formatScanTTY);
102
- }
103
- }
104
- catch (err) {
105
- if (spin) {
106
- spin.fail("Scan failed");
107
- }
108
- throw err;
109
- }
110
- });
111
- //# sourceMappingURL=scan.js.map