@nex-ai/nex 0.1.21 → 0.1.23

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 (295) hide show
  1. package/README.md +11 -2
  2. package/dist/agent/adoption.d.ts +23 -0
  3. package/dist/agent/adoption.js +87 -0
  4. package/dist/agent/adoption.js.map +1 -0
  5. package/dist/agent/gossip.d.ts +17 -0
  6. package/dist/agent/gossip.js +48 -0
  7. package/dist/agent/gossip.js.map +1 -0
  8. package/dist/agent/loop.d.ts +59 -0
  9. package/dist/agent/loop.js +389 -0
  10. package/dist/agent/loop.js.map +1 -0
  11. package/dist/agent/queues.d.ts +16 -0
  12. package/dist/agent/queues.js +44 -0
  13. package/dist/agent/queues.js.map +1 -0
  14. package/dist/agent/session-store.d.ts +21 -0
  15. package/dist/agent/session-store.js +96 -0
  16. package/dist/agent/session-store.js.map +1 -0
  17. package/dist/agent/templates.d.ts +5 -0
  18. package/dist/agent/templates.js +48 -0
  19. package/dist/agent/templates.js.map +1 -0
  20. package/dist/agent/tools.d.ts +25 -0
  21. package/dist/agent/tools.js +238 -0
  22. package/dist/agent/tools.js.map +1 -0
  23. package/dist/agent/types.d.ts +59 -0
  24. package/dist/agent/types.js +5 -0
  25. package/dist/agent/types.js.map +1 -0
  26. package/dist/calendar/scheduler.d.ts +32 -0
  27. package/dist/calendar/scheduler.js +178 -0
  28. package/dist/calendar/scheduler.js.map +1 -0
  29. package/dist/calendar/store.d.ts +15 -0
  30. package/dist/calendar/store.js +50 -0
  31. package/dist/calendar/store.js.map +1 -0
  32. package/dist/calendar/types.d.ts +17 -0
  33. package/dist/calendar/types.js +5 -0
  34. package/dist/calendar/types.js.map +1 -0
  35. package/dist/chat/channel.d.ts +20 -0
  36. package/dist/chat/channel.js +84 -0
  37. package/dist/chat/channel.js.map +1 -0
  38. package/dist/chat/message-store.d.ts +18 -0
  39. package/dist/chat/message-store.js +82 -0
  40. package/dist/chat/message-store.js.map +1 -0
  41. package/dist/chat/router.d.ts +17 -0
  42. package/dist/chat/router.js +65 -0
  43. package/dist/chat/router.js.map +1 -0
  44. package/dist/chat/suggested-responses.d.ts +6 -0
  45. package/dist/chat/suggested-responses.js +99 -0
  46. package/dist/chat/suggested-responses.js.map +1 -0
  47. package/dist/chat/types.d.ts +28 -0
  48. package/dist/chat/types.js +5 -0
  49. package/dist/chat/types.js.map +1 -0
  50. package/dist/cli.js +3 -1
  51. package/dist/cli.js.map +1 -1
  52. package/dist/commands/dispatch.d.ts +39 -0
  53. package/dist/commands/dispatch.js +1293 -0
  54. package/dist/commands/dispatch.js.map +1 -0
  55. package/dist/commands/init.d.ts +49 -0
  56. package/dist/commands/init.js +315 -0
  57. package/dist/commands/init.js.map +1 -0
  58. package/dist/commands/parse-input.d.ts +5 -0
  59. package/dist/commands/parse-input.js +37 -0
  60. package/dist/commands/parse-input.js.map +1 -0
  61. package/dist/index.d.ts +6 -23
  62. package/dist/index.js +118 -50
  63. package/dist/index.js.map +1 -1
  64. package/dist/lib/client.js +1 -1
  65. package/dist/lib/client.js.map +1 -1
  66. package/dist/lib/errors.js +1 -1
  67. package/dist/lib/errors.js.map +1 -1
  68. package/dist/lib/graph-html.d.ts +1 -0
  69. package/dist/lib/graph-html.js +16 -3
  70. package/dist/lib/graph-html.js.map +1 -1
  71. package/dist/lib/integrations.d.ts +23 -0
  72. package/dist/lib/integrations.js +25 -0
  73. package/dist/lib/integrations.js.map +1 -0
  74. package/dist/lib/nex-mcp-config.d.ts +14 -0
  75. package/dist/lib/nex-mcp-config.js +26 -0
  76. package/dist/lib/nex-mcp-config.js.map +1 -0
  77. package/dist/orchestration/budget.d.ts +32 -0
  78. package/dist/orchestration/budget.js +72 -0
  79. package/dist/orchestration/budget.js.map +1 -0
  80. package/dist/orchestration/executor.d.ts +59 -0
  81. package/dist/orchestration/executor.js +197 -0
  82. package/dist/orchestration/executor.js.map +1 -0
  83. package/dist/orchestration/router.d.ts +30 -0
  84. package/dist/orchestration/router.js +98 -0
  85. package/dist/orchestration/router.js.map +1 -0
  86. package/dist/orchestration/templates.d.ts +11 -0
  87. package/dist/orchestration/templates.js +99 -0
  88. package/dist/orchestration/templates.js.map +1 -0
  89. package/dist/orchestration/types.d.ts +58 -0
  90. package/dist/orchestration/types.js +7 -0
  91. package/dist/orchestration/types.js.map +1 -0
  92. package/dist/plugin/shared.js +1 -1
  93. package/dist/plugin/shared.js.map +1 -1
  94. package/dist/tui/agent-colors.d.ts +19 -0
  95. package/dist/tui/agent-colors.js +34 -0
  96. package/dist/tui/agent-colors.js.map +1 -0
  97. package/dist/tui/app.d.ts +14 -0
  98. package/dist/tui/app.js +267 -0
  99. package/dist/tui/app.js.map +1 -0
  100. package/dist/tui/channel-colors.d.ts +16 -0
  101. package/dist/tui/channel-colors.js +43 -0
  102. package/dist/tui/channel-colors.js.map +1 -0
  103. package/dist/tui/components/agent-card.d.ts +11 -0
  104. package/dist/tui/components/agent-card.js +40 -0
  105. package/dist/tui/components/agent-card.js.map +1 -0
  106. package/dist/tui/components/banner.d.ts +44 -0
  107. package/dist/tui/components/banner.js +130 -0
  108. package/dist/tui/components/banner.js.map +1 -0
  109. package/dist/tui/components/channel-colors.d.ts +21 -0
  110. package/dist/tui/components/channel-colors.js +53 -0
  111. package/dist/tui/components/channel-colors.js.map +1 -0
  112. package/dist/tui/components/channel-message.d.ts +53 -0
  113. package/dist/tui/components/channel-message.js +66 -0
  114. package/dist/tui/components/channel-message.js.map +1 -0
  115. package/dist/tui/components/chat-input.d.ts +11 -0
  116. package/dist/tui/components/chat-input.js +19 -0
  117. package/dist/tui/components/chat-input.js.map +1 -0
  118. package/dist/tui/components/data-table.d.ts +11 -0
  119. package/dist/tui/components/data-table.js +47 -0
  120. package/dist/tui/components/data-table.js.map +1 -0
  121. package/dist/tui/components/error-box.d.ts +11 -0
  122. package/dist/tui/components/error-box.js +59 -0
  123. package/dist/tui/components/error-box.js.map +1 -0
  124. package/dist/tui/components/help-screen.d.ts +3 -0
  125. package/dist/tui/components/help-screen.js +63 -0
  126. package/dist/tui/components/help-screen.js.map +1 -0
  127. package/dist/tui/components/index.d.ts +17 -0
  128. package/dist/tui/components/index.js +10 -0
  129. package/dist/tui/components/index.js.map +1 -0
  130. package/dist/tui/components/inline-confirm.d.ts +14 -0
  131. package/dist/tui/components/inline-confirm.js +13 -0
  132. package/dist/tui/components/inline-confirm.js.map +1 -0
  133. package/dist/tui/components/inline-select.d.ts +21 -0
  134. package/dist/tui/components/inline-select.js +20 -0
  135. package/dist/tui/components/inline-select.js.map +1 -0
  136. package/dist/tui/components/markdown.d.ts +6 -0
  137. package/dist/tui/components/markdown.js +179 -0
  138. package/dist/tui/components/markdown.js.map +1 -0
  139. package/dist/tui/components/mention-autocomplete.d.ts +77 -0
  140. package/dist/tui/components/mention-autocomplete.js +235 -0
  141. package/dist/tui/components/mention-autocomplete.js.map +1 -0
  142. package/dist/tui/components/message-list.d.ts +18 -0
  143. package/dist/tui/components/message-list.js +29 -0
  144. package/dist/tui/components/message-list.js.map +1 -0
  145. package/dist/tui/components/picker.d.ts +16 -0
  146. package/dist/tui/components/picker.js +32 -0
  147. package/dist/tui/components/picker.js.map +1 -0
  148. package/dist/tui/components/progress-steps.d.ts +13 -0
  149. package/dist/tui/components/progress-steps.js +21 -0
  150. package/dist/tui/components/progress-steps.js.map +1 -0
  151. package/dist/tui/components/slack/compose.d.ts +27 -0
  152. package/dist/tui/components/slack/compose.js +123 -0
  153. package/dist/tui/components/slack/compose.js.map +1 -0
  154. package/dist/tui/components/slack/layout.d.ts +36 -0
  155. package/dist/tui/components/slack/layout.js +96 -0
  156. package/dist/tui/components/slack/layout.js.map +1 -0
  157. package/dist/tui/components/slack/messages.d.ts +72 -0
  158. package/dist/tui/components/slack/messages.js +177 -0
  159. package/dist/tui/components/slack/messages.js.map +1 -0
  160. package/dist/tui/components/slack/quick-switcher.d.ts +33 -0
  161. package/dist/tui/components/slack/quick-switcher.js +98 -0
  162. package/dist/tui/components/slack/quick-switcher.js.map +1 -0
  163. package/dist/tui/components/slack/sidebar-types.d.ts +65 -0
  164. package/dist/tui/components/slack/sidebar-types.js +7 -0
  165. package/dist/tui/components/slack/sidebar-types.js.map +1 -0
  166. package/dist/tui/components/slack/sidebar.d.ts +46 -0
  167. package/dist/tui/components/slack/sidebar.js +52 -0
  168. package/dist/tui/components/slack/sidebar.js.map +1 -0
  169. package/dist/tui/components/slack/thread-panel.d.ts +45 -0
  170. package/dist/tui/components/slack/thread-panel.js +47 -0
  171. package/dist/tui/components/slack/thread-panel.js.map +1 -0
  172. package/dist/tui/components/slash-autocomplete.d.ts +81 -0
  173. package/dist/tui/components/slash-autocomplete.js +218 -0
  174. package/dist/tui/components/slash-autocomplete.js.map +1 -0
  175. package/dist/tui/components/spinner.d.ts +17 -0
  176. package/dist/tui/components/spinner.js +30 -0
  177. package/dist/tui/components/spinner.js.map +1 -0
  178. package/dist/tui/components/status-bar.d.ts +23 -0
  179. package/dist/tui/components/status-bar.js +55 -0
  180. package/dist/tui/components/status-bar.js.map +1 -0
  181. package/dist/tui/components/success-box.d.ts +7 -0
  182. package/dist/tui/components/success-box.js +10 -0
  183. package/dist/tui/components/success-box.js.map +1 -0
  184. package/dist/tui/components/tool-indicator.d.ts +12 -0
  185. package/dist/tui/components/tool-indicator.js +18 -0
  186. package/dist/tui/components/tool-indicator.js.map +1 -0
  187. package/dist/tui/components/viewport.d.ts +9 -0
  188. package/dist/tui/components/viewport.js +24 -0
  189. package/dist/tui/components/viewport.js.map +1 -0
  190. package/dist/tui/generative/bindings.d.ts +27 -0
  191. package/dist/tui/generative/bindings.js +152 -0
  192. package/dist/tui/generative/bindings.js.map +1 -0
  193. package/dist/tui/generative/registry.d.ts +19 -0
  194. package/dist/tui/generative/registry.js +31 -0
  195. package/dist/tui/generative/registry.js.map +1 -0
  196. package/dist/tui/generative/renderer.d.ts +24 -0
  197. package/dist/tui/generative/renderer.js +160 -0
  198. package/dist/tui/generative/renderer.js.map +1 -0
  199. package/dist/tui/generative/types.d.ts +68 -0
  200. package/dist/tui/generative/types.js +7 -0
  201. package/dist/tui/generative/types.js.map +1 -0
  202. package/dist/tui/hooks/use-cancellable.d.ts +28 -0
  203. package/dist/tui/hooks/use-cancellable.js +51 -0
  204. package/dist/tui/hooks/use-cancellable.js.map +1 -0
  205. package/dist/tui/hooks/use-streaming.d.ts +44 -0
  206. package/dist/tui/hooks/use-streaming.js +105 -0
  207. package/dist/tui/hooks/use-streaming.js.map +1 -0
  208. package/dist/tui/index.d.ts +4 -0
  209. package/dist/tui/index.js +7 -0
  210. package/dist/tui/index.js.map +1 -0
  211. package/dist/tui/keybindings.d.ts +25 -0
  212. package/dist/tui/keybindings.js +277 -0
  213. package/dist/tui/keybindings.js.map +1 -0
  214. package/dist/tui/register-views.d.ts +8 -0
  215. package/dist/tui/register-views.js +116 -0
  216. package/dist/tui/register-views.js.map +1 -0
  217. package/dist/tui/router.d.ts +29 -0
  218. package/dist/tui/router.js +87 -0
  219. package/dist/tui/router.js.map +1 -0
  220. package/dist/tui/services/agent-service.d.ts +58 -0
  221. package/dist/tui/services/agent-service.js +197 -0
  222. package/dist/tui/services/agent-service.js.map +1 -0
  223. package/dist/tui/services/calendar-service.d.ts +31 -0
  224. package/dist/tui/services/calendar-service.js +133 -0
  225. package/dist/tui/services/calendar-service.js.map +1 -0
  226. package/dist/tui/services/chat-service.d.ts +28 -0
  227. package/dist/tui/services/chat-service.js +91 -0
  228. package/dist/tui/services/chat-service.js.map +1 -0
  229. package/dist/tui/services/orchestration-service.d.ts +42 -0
  230. package/dist/tui/services/orchestration-service.js +153 -0
  231. package/dist/tui/services/orchestration-service.js.map +1 -0
  232. package/dist/tui/slash-commands.d.ts +106 -0
  233. package/dist/tui/slash-commands.js +1421 -0
  234. package/dist/tui/slash-commands.js.map +1 -0
  235. package/dist/tui/store.d.ts +96 -0
  236. package/dist/tui/store.js +120 -0
  237. package/dist/tui/store.js.map +1 -0
  238. package/dist/tui/theme.d.ts +40 -0
  239. package/dist/tui/theme.js +39 -0
  240. package/dist/tui/theme.js.map +1 -0
  241. package/dist/tui/tui-context.d.ts +22 -0
  242. package/dist/tui/tui-context.js +17 -0
  243. package/dist/tui/tui-context.js.map +1 -0
  244. package/dist/tui/views/agent-list.d.ts +8 -0
  245. package/dist/tui/views/agent-list.js +11 -0
  246. package/dist/tui/views/agent-list.js.map +1 -0
  247. package/dist/tui/views/ask-chat.d.ts +9 -0
  248. package/dist/tui/views/ask-chat.js +40 -0
  249. package/dist/tui/views/ask-chat.js.map +1 -0
  250. package/dist/tui/views/calendar.d.ts +15 -0
  251. package/dist/tui/views/calendar.js +29 -0
  252. package/dist/tui/views/calendar.js.map +1 -0
  253. package/dist/tui/views/chat.d.ts +18 -0
  254. package/dist/tui/views/chat.js +28 -0
  255. package/dist/tui/views/chat.js.map +1 -0
  256. package/dist/tui/views/generative.d.ts +14 -0
  257. package/dist/tui/views/generative.js +37 -0
  258. package/dist/tui/views/generative.js.map +1 -0
  259. package/dist/tui/views/help.d.ts +6 -0
  260. package/dist/tui/views/help.js +9 -0
  261. package/dist/tui/views/help.js.map +1 -0
  262. package/dist/tui/views/home-screen.d.ts +67 -0
  263. package/dist/tui/views/home-screen.js +192 -0
  264. package/dist/tui/views/home-screen.js.map +1 -0
  265. package/dist/tui/views/home.d.ts +33 -0
  266. package/dist/tui/views/home.js +60 -0
  267. package/dist/tui/views/home.js.map +1 -0
  268. package/dist/tui/views/index.d.ts +20 -0
  269. package/dist/tui/views/index.js +11 -0
  270. package/dist/tui/views/index.js.map +1 -0
  271. package/dist/tui/views/insights.d.ts +19 -0
  272. package/dist/tui/views/insights.js +46 -0
  273. package/dist/tui/views/insights.js.map +1 -0
  274. package/dist/tui/views/orchestration.d.ts +18 -0
  275. package/dist/tui/views/orchestration.js +73 -0
  276. package/dist/tui/views/orchestration.js.map +1 -0
  277. package/dist/tui/views/record-detail.d.ts +10 -0
  278. package/dist/tui/views/record-detail.js +22 -0
  279. package/dist/tui/views/record-detail.js.map +1 -0
  280. package/dist/tui/views/record-list.d.ts +15 -0
  281. package/dist/tui/views/record-list.js +22 -0
  282. package/dist/tui/views/record-list.js.map +1 -0
  283. package/dist/tui/views/slack-channel-header.d.ts +15 -0
  284. package/dist/tui/views/slack-channel-header.js +16 -0
  285. package/dist/tui/views/slack-channel-header.js.map +1 -0
  286. package/dist/tui/views/slack-home.d.ts +21 -0
  287. package/dist/tui/views/slack-home.js +572 -0
  288. package/dist/tui/views/slack-home.js.map +1 -0
  289. package/dist/tui/views/task-board.d.ts +21 -0
  290. package/dist/tui/views/task-board.js +33 -0
  291. package/dist/tui/views/task-board.js.map +1 -0
  292. package/dist/tui/views/timeline.d.ts +17 -0
  293. package/dist/tui/views/timeline.js +24 -0
  294. package/dist/tui/views/timeline.js.map +1 -0
  295. package/package.json +8 -3
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Persistent channel color assignment.
3
+ *
4
+ * Each channel name gets a stable color from a palette of terminal-safe
5
+ * colours. Well-known channels get fixed colors; others cycle through
6
+ * the palette.
7
+ *
8
+ * Pattern mirrors agent-colors.ts but for channels.
9
+ */
10
+ const CHANNEL_PALETTE = ["cyan", "green", "yellow", "magenta", "blue", "red"];
11
+ /** Well-known channel → color mapping matching the task spec. */
12
+ const WELL_KNOWN = {
13
+ general: "cyan",
14
+ leads: "green",
15
+ seo: "yellow",
16
+ support: "magenta",
17
+ research: "blue",
18
+ alerts: "red",
19
+ };
20
+ // Module-level state so colours persist across renders.
21
+ const colorMap = new Map();
22
+ let nextColorIdx = 0;
23
+ /**
24
+ * Return the colour assigned to `channelName`, assigning a new one on
25
+ * first encounter. The same name always returns the same colour.
26
+ */
27
+ export function getChannelColor(channelName) {
28
+ const normalized = channelName.toLowerCase().replace(/^#/, "");
29
+ const existing = colorMap.get(normalized);
30
+ if (existing !== undefined)
31
+ return existing;
32
+ // Check well-known mapping first
33
+ const wellKnown = WELL_KNOWN[normalized];
34
+ if (wellKnown) {
35
+ colorMap.set(normalized, wellKnown);
36
+ return wellKnown;
37
+ }
38
+ // Cycle through palette
39
+ const color = CHANNEL_PALETTE[nextColorIdx % CHANNEL_PALETTE.length];
40
+ colorMap.set(normalized, color);
41
+ nextColorIdx++;
42
+ return color;
43
+ }
44
+ /** Read-only snapshot of the current colour map. */
45
+ export function getAllChannelColors() {
46
+ return new Map(colorMap);
47
+ }
48
+ /** Reset all assignments (useful in tests). */
49
+ export function resetChannelColors() {
50
+ colorMap.clear();
51
+ nextColorIdx = 0;
52
+ }
53
+ //# sourceMappingURL=channel-colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-colors.js","sourceRoot":"","sources":["../../../src/tui/components/channel-colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAGvF,iEAAiE;AACjE,MAAM,UAAU,GAAiC;IAC/C,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,QAAQ;IACb,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,wDAAwD;AACxD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;AACjD,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,WAAmB;IACjD,MAAM,UAAU,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAE/D,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAE5C,iCAAiC;IACjC,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,SAAS,EAAE,CAAC;QACd,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,wBAAwB;IACxB,MAAM,KAAK,GAAG,eAAe,CAAC,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACrE,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAChC,YAAY,EAAE,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,kBAAkB;IAChC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACjB,YAAY,GAAG,CAAC,CAAC;AACnB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Channel-colored message components.
3
+ *
4
+ * Renders chat messages in colored bordered boxes tagged with channel name,
5
+ * matching Claude Code's TeamCreate multi-agent UI style.
6
+ *
7
+ * Each channel gets a distinct color. Agent messages within a channel show
8
+ * the agent name in the agent's own color inside the channel's colored box.
9
+ */
10
+ import React from "react";
11
+ export interface ChannelMessageData {
12
+ id: string;
13
+ channel: string;
14
+ sender: string;
15
+ senderType: "agent" | "human" | "system";
16
+ content: string;
17
+ timestamp: number;
18
+ /** Optional agent-specific color (overrides default for agent sender name) */
19
+ agentColor?: string;
20
+ }
21
+ export interface ChannelMessageProps {
22
+ message: ChannelMessageData;
23
+ }
24
+ export interface ChannelMessageListProps {
25
+ messages: ChannelMessageData[];
26
+ maxVisible?: number;
27
+ }
28
+ export interface ColoredChannelBarProps {
29
+ channels: Array<{
30
+ id: string;
31
+ name: string;
32
+ unread: number;
33
+ }>;
34
+ activeChannelId: string;
35
+ }
36
+ /**
37
+ * A single message with colored left border and channel tag.
38
+ *
39
+ * Layout:
40
+ * ▌ [#channel] sender: content
41
+ * ^--- channel color border
42
+ */
43
+ export declare function ChannelMessage({ message, }: ChannelMessageProps): React.JSX.Element;
44
+ /**
45
+ * List of channel-colored messages with auto-tail.
46
+ */
47
+ export declare function ChannelMessageList({ messages, maxVisible, }: ChannelMessageListProps): React.JSX.Element;
48
+ /**
49
+ * Horizontal channel tab bar with per-channel colors.
50
+ * Active channel is bold + full color, others are dimmed.
51
+ */
52
+ export declare function ColoredChannelBar({ channels, activeChannelId, }: ColoredChannelBarProps): React.JSX.Element;
53
+ export default ChannelMessage;
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Channel-colored message components.
4
+ *
5
+ * Renders chat messages in colored bordered boxes tagged with channel name,
6
+ * matching Claude Code's TeamCreate multi-agent UI style.
7
+ *
8
+ * Each channel gets a distinct color. Agent messages within a channel show
9
+ * the agent name in the agent's own color inside the channel's colored box.
10
+ */
11
+ import React from "react";
12
+ import { Box, Text } from "ink";
13
+ import { getChannelColor } from "./channel-colors.js";
14
+ // ── Helpers ─────────────────────────────────────────────────────────
15
+ function formatTime(ts) {
16
+ const d = new Date(ts);
17
+ const h = String(d.getHours()).padStart(2, "0");
18
+ const m = String(d.getMinutes()).padStart(2, "0");
19
+ return `${h}:${m}`;
20
+ }
21
+ // ── Single message component ────────────────────────────────────────
22
+ /**
23
+ * A single message with colored left border and channel tag.
24
+ *
25
+ * Layout:
26
+ * ▌ [#channel] sender: content
27
+ * ^--- channel color border
28
+ */
29
+ export function ChannelMessage({ message, }) {
30
+ const channelColor = getChannelColor(message.channel);
31
+ const time = formatTime(message.timestamp);
32
+ if (message.senderType === "system") {
33
+ return (_jsxs(Box, { children: [_jsx(Text, { color: channelColor, children: "▌ " }), _jsx(Text, { dimColor: true, children: time }), _jsx(Text, { children: " " }), _jsx(Text, { color: channelColor, dimColor: true, children: `[#${message.channel}]` }), _jsx(Text, { children: " " }), _jsx(Text, { color: "yellow", dimColor: true, children: message.content })] }));
34
+ }
35
+ if (message.senderType === "human") {
36
+ return (_jsxs(Box, { children: [_jsx(Text, { color: channelColor, children: "▌ " }), _jsx(Text, { dimColor: true, children: time }), _jsx(Text, { children: " " }), _jsx(Text, { color: channelColor, dimColor: true, children: `[#${message.channel}]` }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, color: "white", children: "> " }), _jsx(Text, { children: message.content })] }));
37
+ }
38
+ // Agent message — agent name in agent's own color
39
+ const senderColor = message.agentColor ?? channelColor;
40
+ return (_jsxs(Box, { children: [_jsx(Text, { color: channelColor, children: "▌ " }), _jsx(Text, { dimColor: true, children: time }), _jsx(Text, { children: " " }), _jsx(Text, { color: channelColor, dimColor: true, children: `[#${message.channel}]` }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, color: senderColor, children: `[${message.sender}]` }), _jsx(Text, { children: " " }), _jsx(Text, { children: message.content })] }));
41
+ }
42
+ // ── Message list ────────────────────────────────────────────────────
43
+ /**
44
+ * List of channel-colored messages with auto-tail.
45
+ */
46
+ export function ChannelMessageList({ messages, maxVisible = 20, }) {
47
+ const displayMessages = messages.slice(-maxVisible);
48
+ if (displayMessages.length === 0) {
49
+ return (_jsx(Box, { paddingX: 2, children: _jsx(Text, { dimColor: true, children: "No messages yet." }) }));
50
+ }
51
+ return (_jsx(Box, { flexDirection: "column", children: displayMessages.map((msg) => (_jsx(ChannelMessage, { message: msg }, msg.id))) }));
52
+ }
53
+ // ── Colored channel bar ─────────────────────────────────────────────
54
+ /**
55
+ * Horizontal channel tab bar with per-channel colors.
56
+ * Active channel is bold + full color, others are dimmed.
57
+ */
58
+ export function ColoredChannelBar({ channels, activeChannelId, }) {
59
+ return (_jsxs(Box, { paddingX: 1, children: [channels.map((ch, idx) => {
60
+ const isActive = ch.id === activeChannelId;
61
+ const color = getChannelColor(ch.name);
62
+ return (_jsxs(React.Fragment, { children: [idx > 0 && _jsx(Text, { dimColor: true, children: " " }), _jsxs(Text, { bold: isActive, color: color, dimColor: !isActive, children: ["#", ch.name] }), ch.unread > 0 && (_jsx(Text, { color: "red", bold: true, children: ` (${ch.unread})` }))] }, ch.id));
63
+ }), channels.length > 1 && (_jsx(Text, { dimColor: true, children: " [Tab=switch]" }))] }));
64
+ }
65
+ export default ChannelMessage;
66
+ //# sourceMappingURL=channel-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-message.js","sourceRoot":"","sources":["../../../src/tui/components/channel-message.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkCtD,uEAAuE;AAEvE,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAClD,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;AACrB,CAAC;AAED,uEAAuE;AAEvE;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,OAAO,GACa;IACpB,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAE3C,IAAI,OAAO,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,YAAG,IAAI,GAAQ,EACxC,KAAC,IAAI,IAAC,QAAQ,kBAAE,IAAI,GAAQ,EAC5B,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C,IAAI,IACH,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,QAAQ,aAElB,GAAG,EAAE,EAAE,CAAC,IAAI,IACR,EACN,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAChB,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,kBACnB,KAAK,EAAE,CAAC,MAAM,GAAG,GACb,CACR,KAbkB,EAAE,CAAC,EAAE,CAcT,CAClB,CAAC;YACJ,CAAC,CAAC,EACD,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,KAAC,IAAI,IAAC,QAAQ,kBAAE,gBAAgB,GAAQ,CACzC,IACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface ChatInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onSubmit: (value: string) => void;
6
+ placeholder?: string;
7
+ prefix?: string;
8
+ isActive: boolean;
9
+ }
10
+ export declare function ChatInput({ value, onChange, onSubmit, placeholder, prefix, isActive, }: ChatInputProps): React.JSX.Element;
11
+ export default ChatInput;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback } from "react";
3
+ import { Box, Text } from "ink";
4
+ import { TextInput } from "@inkjs/ui";
5
+ // --- Component ---
6
+ export function ChatInput({ value, onChange, onSubmit, placeholder = "Type a command...", prefix = "nex> ", isActive, }) {
7
+ // Counter to force TextInput remount after submit.
8
+ // @inkjs/ui TextInput manages its own internal state via useReducer;
9
+ // defaultValue is only read on initial mount. Incrementing the key
10
+ // forces React to unmount + remount with a fresh empty state.
11
+ const [submitKey, setSubmitKey] = useState(0);
12
+ const handleSubmit = useCallback((val) => {
13
+ onSubmit(val);
14
+ setSubmitKey((k) => k + 1);
15
+ }, [onSubmit]);
16
+ return (_jsxs(Box, { children: [_jsx(Text, { bold: true, color: isActive ? "cyan" : undefined, dimColor: !isActive, children: prefix }), isActive ? (_jsx(TextInput, { placeholder: placeholder, onChange: onChange, onSubmit: handleSubmit }, submitKey)) : (_jsx(Text, { dimColor: true, children: value || placeholder }))] }));
17
+ }
18
+ export default ChatInput;
19
+ //# sourceMappingURL=chat-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-input.js","sourceRoot":"","sources":["../../../src/tui/components/chat-input.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAatC,oBAAoB;AAEpB,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,mBAAmB,EACjC,MAAM,GAAG,OAAO,EAChB,QAAQ,GACO;IACf,mDAAmD;IACnD,qEAAqE;IACrE,mEAAmE;IACnE,8DAA8D;IAC9D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9C,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,GAAW,EAAE,EAAE;QACd,QAAQ,CAAC,GAAG,CAAC,CAAC;QACd,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC,QAAQ,YACjE,MAAM,GACF,EACN,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,SAAS,IAER,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,IAHjB,SAAS,CAId,CACH,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,QAAQ,kBAAE,KAAK,IAAI,WAAW,GAAQ,CAC7C,IACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface DataTableProps {
3
+ headers: string[];
4
+ rows: string[][];
5
+ /** Column indices (0-based) to right-align */
6
+ alignRight?: number[];
7
+ /** Max width for any column before truncation with "…" (default: 40) */
8
+ maxColWidth?: number;
9
+ }
10
+ export declare function DataTable({ headers, rows, alignRight, maxColWidth, }: DataTableProps): React.JSX.Element;
11
+ export default DataTable;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Box, Text } from "ink";
4
+ // --- Helpers ---
5
+ function truncate(value, max) {
6
+ if (value.length <= max)
7
+ return value;
8
+ return value.slice(0, max - 1) + "\u2026";
9
+ }
10
+ function padCell(value, width, right) {
11
+ if (right)
12
+ return value.padStart(width);
13
+ return value.padEnd(width);
14
+ }
15
+ function computeColumnWidths(headers, rows, maxColWidth) {
16
+ return headers.map((h, i) => {
17
+ let max = h.length;
18
+ for (const row of rows) {
19
+ const cell = row[i] ?? "";
20
+ if (cell.length > max)
21
+ max = cell.length;
22
+ }
23
+ return Math.min(max, maxColWidth);
24
+ });
25
+ }
26
+ // --- Component ---
27
+ export function DataTable({ headers, rows, alignRight = [], maxColWidth = 40, }) {
28
+ const rightSet = new Set(alignRight);
29
+ const widths = computeColumnWidths(headers, rows, maxColWidth);
30
+ const separator = widths.map((w) => "\u2500".repeat(w)).join("\u2500\u253C\u2500");
31
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: headers.map((h, i) => {
32
+ const truncated = truncate(h, widths[i]);
33
+ const padded = padCell(truncated, widths[i], rightSet.has(i));
34
+ const sep = i < headers.length - 1 ? " \u2502 " : "";
35
+ return (_jsxs(React.Fragment, { children: [_jsx(Text, { bold: true, color: "blue", underline: true, children: padded }), sep && _jsx(Text, { children: sep })] }, i));
36
+ }) }), _jsx(Text, { dimColor: true, children: separator }), rows.map((row, ri) => {
37
+ const dim = ri % 2 === 1;
38
+ return (_jsx(Text, { dimColor: dim, children: row.map((cell, ci) => {
39
+ const truncated = truncate(cell ?? "", widths[ci]);
40
+ const padded = padCell(truncated, widths[ci], rightSet.has(ci));
41
+ const sep = ci < headers.length - 1 ? " \u2502 " : "";
42
+ return padded + sep;
43
+ }).join("") }, ri));
44
+ }), _jsxs(Text, { dimColor: true, children: ["\n", rows.length, " row", rows.length !== 1 ? "s" : ""] })] }));
45
+ }
46
+ export default DataTable;
47
+ //# sourceMappingURL=data-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../../../src/tui/components/data-table.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAahC,kBAAkB;AAElB,SAAS,QAAQ,CAAC,KAAa,EAAE,GAAW;IAC1C,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACtC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC5C,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,KAAa,EAAE,KAAc;IAC3D,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAiB,EACjB,IAAgB,EAChB,WAAmB;IAEnB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC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ACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export type ErrorCategory = "auth" | "rate-limit" | "network" | "server" | "unknown";
3
+ export declare function categorizeError(error: Error): ErrorCategory;
4
+ export declare function getSuggestions(category: ErrorCategory): string[];
5
+ export interface ErrorBoxProps {
6
+ message: string;
7
+ category?: ErrorCategory;
8
+ suggestions?: string[];
9
+ }
10
+ export declare function ErrorBox({ message, category, suggestions, }: ErrorBoxProps): React.JSX.Element;
11
+ export default ErrorBox;
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ // --- Colors ---
4
+ const SYS_ERROR = "#e23428";
5
+ const SUGGESTIONS = {
6
+ auth: [
7
+ "Run 'nex init' to configure your API key",
8
+ "Or set NEX_API_KEY in your environment",
9
+ ],
10
+ "rate-limit": [
11
+ "Wait a moment and retry the request",
12
+ "Consider batching operations to reduce API calls",
13
+ ],
14
+ network: [
15
+ "Check your internet connection",
16
+ "Verify the API endpoint is reachable",
17
+ "Try again in a few seconds",
18
+ ],
19
+ server: [
20
+ "The server encountered an error — retry shortly",
21
+ "If the issue persists, check https://status.nex.dev",
22
+ ],
23
+ unknown: [
24
+ "Run with --verbose for more details",
25
+ "Report the issue at https://github.com/nex-crm/nex-as-a-skill/issues",
26
+ ],
27
+ };
28
+ // --- Helpers ---
29
+ export function categorizeError(error) {
30
+ const name = error.name?.toLowerCase() ?? "";
31
+ const msg = error.message?.toLowerCase() ?? "";
32
+ if (name.includes("auth") || msg.includes("api key") || msg.includes("unauthorized")) {
33
+ return "auth";
34
+ }
35
+ if (name.includes("ratelimit") || msg.includes("rate limit") || msg.includes("rate limited")) {
36
+ return "rate-limit";
37
+ }
38
+ if (msg.includes("fetch failed") ||
39
+ msg.includes("econnrefused") ||
40
+ msg.includes("enotfound") ||
41
+ msg.includes("network") ||
42
+ msg.includes("timeout")) {
43
+ return "network";
44
+ }
45
+ if (name.includes("server") || msg.includes("api error")) {
46
+ return "server";
47
+ }
48
+ return "unknown";
49
+ }
50
+ export function getSuggestions(category) {
51
+ return SUGGESTIONS[category];
52
+ }
53
+ // --- Component ---
54
+ export function ErrorBox({ message, category = "unknown", suggestions, }) {
55
+ const tips = suggestions ?? SUGGESTIONS[category];
56
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: SYS_ERROR, paddingX: 1, children: [_jsx(Box, { children: _jsx(Text, { color: SYS_ERROR, bold: true, children: "✖ Error" }) }), _jsx(Box, { marginTop: 0, children: _jsx(Text, { color: SYS_ERROR, children: message }) }), tips.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { dimColor: true, bold: true, children: "Suggestions:" }), tips.map((tip) => (_jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: " • " }), _jsx(Text, { children: tip })] }, tip)))] }))] }));
57
+ }
58
+ export default ErrorBox;
59
+ //# sourceMappingURL=error-box.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-box.js","sourceRoot":"","sources":["../../../src/tui/components/error-box.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,iBAAiB;AAEjB,MAAM,SAAS,GAAG,SAAS,CAAC;AAM5B,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE;QACJ,0CAA0C;QAC1C,wCAAwC;KACzC;IACD,YAAY,EAAE;QACZ,qCAAqC;QACrC,kDAAkD;KACnD;IACD,OAAO,EAAE;QACP,gCAAgC;QAChC,sCAAsC;QACtC,4BAA4B;KAC7B;IACD,MAAM,EAAE;QACN,iDAAiD;QACjD,qDAAqD;KACtD;IACD,OAAO,EAAE;QACP,qCAAqC;QACrC,sEAAsE;KACvE;CACF,CAAC;AAEF,kBAAkB;AAElB,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,IAAI,GAAG,KAAK,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ACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,CAAC,aAGX,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,EAAE,IAAI,kBAAE,SAAS,GAAQ,GAC3C,EAGN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,YAAG,OAAO,GAAQ,GACpC,EAGL,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAClB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aACtC,KAAC,IAAI,IAAC,QAAQ,QAAC,IAAI,kBAAE,cAAc,GAAQ,EAC1C,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,QAAQ,kBAAE,MAAM,GAAQ,EAC9B,KAAC,IAAI,cAAE,GAAG,GAAQ,KAFV,GAAG,CAGP,CACP,CAAC,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare function HelpScreen(): React.JSX.Element;
3
+ export default HelpScreen;
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Box, Text } from "ink";
4
+ // --- Constants ---
5
+ const COMMAND_GROUPS = [
6
+ {
7
+ title: "Explore",
8
+ commands: [
9
+ "object list",
10
+ "record list",
11
+ "record get",
12
+ "search",
13
+ "insight list",
14
+ ],
15
+ },
16
+ {
17
+ title: "Write",
18
+ commands: [
19
+ "record create",
20
+ "record upsert",
21
+ "record update",
22
+ "note create",
23
+ "task create",
24
+ "remember",
25
+ ],
26
+ },
27
+ {
28
+ title: "Config",
29
+ commands: [
30
+ "config show",
31
+ "config set",
32
+ "integrate list",
33
+ "integrate connect",
34
+ ],
35
+ },
36
+ {
37
+ title: "AI / Agents",
38
+ commands: [
39
+ "ask",
40
+ "recall",
41
+ "capture",
42
+ "agent list",
43
+ "agent create",
44
+ "agent start",
45
+ ],
46
+ },
47
+ ];
48
+ const KEYBINDINGS = [
49
+ { key: "i", action: "insert" },
50
+ { key: "Esc", action: "back" },
51
+ { key: "?", action: "help" },
52
+ { key: "a", action: "agents" },
53
+ { key: "c", action: "chat" },
54
+ { key: "o", action: "orchestration" },
55
+ { key: "q", action: "quit" },
56
+ { key: "j/k", action: "scroll" },
57
+ ];
58
+ // --- Component ---
59
+ export function HelpScreen() {
60
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Keybindings: " }), KEYBINDINGS.map((kb, i) => (_jsxs(React.Fragment, { children: [_jsx(Text, { bold: true, color: "yellow", children: kb.key }), _jsx(Text, { dimColor: true, children: "=" }), _jsx(Text, { children: kb.action }), i < KEYBINDINGS.length - 1 && _jsx(Text, { dimColor: true, children: " " })] }, kb.key)))] }), _jsx(Box, { children: COMMAND_GROUPS.map((group) => (_jsxs(Box, { flexDirection: "column", marginRight: 4, minWidth: 16, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, underline: true, color: "cyan", children: group.title }) }), group.commands.map((cmd) => (_jsxs(Text, { dimColor: false, children: [" ", cmd] }, cmd)))] }, group.title))) })] }));
61
+ }
62
+ export default HelpScreen;
63
+ //# sourceMappingURL=help-screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-screen.js","sourceRoot":"","sources":["../../../src/tui/components/help-screen.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAShC,oBAAoB;AAEpB,MAAM,cAAc,GAAmB;IACrC;QACE,K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AAM,YACpB,eAAe,GACX,EACN,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,MAAC,KAAK,CAAC,QAAQ,eACb,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,YACtB,EAAE,CAAC,GAAG,GACF,EACP,KAAC,IAAI,IAAC,QAAQ,kBAAE,GAAG,GAAQ,EAC3B,KAAC,IAAI,cAAE,EAAE,CAAC,MAAM,GAAQ,EACvB,CAAC,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,IAAI,IAAC,QAAQ,kBAAE,IAAI,GAAQ,KANxC,EAAE,CAAC,GAAG,CAOV,CAClB,CAAC,IACE,EAGN,KAAC,GAAG,cACD,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC7B,MAAC,GAAG,IAEF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,EAAE,aAEZ,KAAC,GAAG,IAAC,YAAY,EAAE,CAAC,YAClB,KAAC,IAAI,IAAC,IAAI,QAAC,SAAS,QAAC,KAAK,EAAC,MAAM,YAC9B,KAAK,CAAC,KAAK,GACP,GACH,EACL,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC3B,MAAC,IAAI,IAAW,QAAQ,EAAE,KAAK,aAC5B,IAAI,EACJ,GAAG,KAFK,GAAG,CAGP,CACR,CAAC,KAfG,KAAK,CAAC,KAAK,CAgBZ,CACP,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,17 @@
1
+ export { Picker } from "./picker.js";
2
+ export type { PickerProps, PickerItem } from "./picker.js";
3
+ export { Viewport } from "./viewport.js";
4
+ export type { ViewportProps } from "./viewport.js";
5
+ export { StatusBar } from "./status-bar.js";
6
+ export type { StatusBarProps, Mode } from "./status-bar.js";
7
+ export { HelpScreen } from "./help-screen.js";
8
+ export { ChatInput } from "./chat-input.js";
9
+ export type { ChatInputProps } from "./chat-input.js";
10
+ export { MessageList } from "./message-list.js";
11
+ export type { MessageListProps, Message } from "./message-list.js";
12
+ export { AgentCard } from "./agent-card.js";
13
+ export type { AgentCardProps, AgentStatus } from "./agent-card.js";
14
+ export { InlineSelect } from "./inline-select.js";
15
+ export type { InlineSelectProps, SelectOption } from "./inline-select.js";
16
+ export { InlineConfirm } from "./inline-confirm.js";
17
+ export type { InlineConfirmProps } from "./inline-confirm.js";
@@ -0,0 +1,10 @@
1
+ export { Picker } from "./picker.js";
2
+ export { Viewport } from "./viewport.js";
3
+ export { StatusBar } from "./status-bar.js";
4
+ export { HelpScreen } from "./help-screen.js";
5
+ export { ChatInput } from "./chat-input.js";
6
+ export { MessageList } from "./message-list.js";
7
+ export { AgentCard } from "./agent-card.js";
8
+ export { InlineSelect } from "./inline-select.js";
9
+ export { InlineConfirm } from "./inline-confirm.js";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Inline Confirm input for the conversation view.
3
+ *
4
+ * Wraps @inkjs/ui's ConfirmInput component to provide an inline
5
+ * y/n confirmation within the chat REPL.
6
+ * Styled to match Bubbletea UX spec colors.
7
+ */
8
+ import React from "react";
9
+ export interface InlineConfirmProps {
10
+ question: string;
11
+ onConfirm: (confirmed: boolean) => void;
12
+ }
13
+ export declare function InlineConfirm({ question, onConfirm, }: InlineConfirmProps): React.JSX.Element;
14
+ export default InlineConfirm;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { ConfirmInput } from "@inkjs/ui";
4
+ // Colors from bubbletea-ux-spec.md
5
+ const COLORS = {
6
+ brand: "#2980fb",
7
+ muted: "#838485",
8
+ };
9
+ export function InlineConfirm({ question, onConfirm, }) {
10
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 2, children: [_jsx(Text, { bold: true, color: COLORS.brand, children: question }), _jsx(Box, { marginTop: 1, children: _jsx(ConfirmInput, { onConfirm: () => onConfirm(true), onCancel: () => onConfirm(false) }) }), _jsx(Box, { marginTop: 0, children: _jsx(Text, { color: COLORS.muted, children: "y/n · enter to confirm" }) })] }));
11
+ }
12
+ export default InlineConfirm;
13
+ //# sourceMappingURL=inline-confirm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-confirm.js","sourceRoot":"","sources":["../../../src/tui/components/inline-confirm.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,mCAAmC;AACnC,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;CACR,CAAC;AAOX,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,GACU;IACnB,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACrC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YAC3B,QAAQ,GACJ,EACP,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,YAAY,IACX,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,GAChC,GACE,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YACtB,wBAAwB,GACpB,GACH,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Inline Select picker for the conversation view.
3
+ *
4
+ * Wraps @inkjs/ui's Select component to provide an arrow-key
5
+ * navigable single-select within the chat REPL.
6
+ * Styled to match Bubbletea picker: highlighted row with arrow
7
+ * marker, descriptions, brand colors.
8
+ */
9
+ import React from "react";
10
+ export interface SelectOption {
11
+ label: string;
12
+ value: string;
13
+ description?: string;
14
+ }
15
+ export interface InlineSelectProps {
16
+ title: string;
17
+ options: SelectOption[];
18
+ onSelect: (value: string) => void;
19
+ }
20
+ export declare function InlineSelect({ title, options, onSelect, }: InlineSelectProps): React.JSX.Element;
21
+ export default InlineSelect;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Select } from "@inkjs/ui";
4
+ // Colors from bubbletea-ux-spec.md
5
+ const COLORS = {
6
+ brand: "#2980fb",
7
+ info: "#4d97ff",
8
+ muted: "#838485",
9
+ label: "#999a9b",
10
+ };
11
+ export function InlineSelect({ title, options, onSelect, }) {
12
+ // Build label with description on same line (dimmed)
13
+ const selectOptions = options.map((opt) => ({
14
+ label: opt.description ? `${opt.label} ${opt.description}` : opt.label,
15
+ value: opt.value,
16
+ }));
17
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 2, children: [_jsx(Text, { bold: true, color: COLORS.brand, children: title }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: _jsx(Select, { options: selectOptions, onChange: (value) => onSelect(value) }) }), _jsx(Box, { marginTop: 0, children: _jsx(Text, { color: COLORS.muted, children: "↑/↓ navigate · enter select · esc back" }) })] }));
18
+ }
19
+ export default InlineSelect;
20
+ //# sourceMappingURL=inline-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-select.js","sourceRoot":"","sources":["../../../src/tui/components/inline-select.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,mCAAmC;AACnC,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;CACR,CAAC;AAcX,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,QAAQ,GACU;IAClB,qDAAqD;IACrD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK;QACvE,KAAK,EAAE,GAAG,CAAC,KAAK;KACjB,CAAC,CAAC,CAAC;IAEJ,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACrC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YAC3B,KAAK,GACD,EACP,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YACvC,KAAC,MAAM,IACL,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GACpC,GACE,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YACtB,wCAAwC,GACpC,GACH,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export interface MarkdownProps {
3
+ content: string;
4
+ }
5
+ export declare function Markdown({ content }: MarkdownProps): React.JSX.Element;
6
+ export default Markdown;