@justanarthur/modo-ui-ai 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.fluid-functionalism +21 -0
  3. package/README.md +105 -2
  4. package/blocks/conversation/agent-prompt/examples.mdx +44 -0
  5. package/blocks/conversation/agent-prompt/index.tsx +114 -0
  6. package/blocks/conversation/composer/draft.css +25 -0
  7. package/blocks/conversation/composer/draft.tsx +589 -0
  8. package/blocks/conversation/composer/examples.mdx +164 -0
  9. package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
  10. package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
  11. package/blocks/conversation/composer/index.tsx +651 -0
  12. package/blocks/conversation/composer/queued-row.tsx +102 -0
  13. package/blocks/conversation/composer/shared.ts +38 -0
  14. package/blocks/conversation/composer/suggestion-row.tsx +64 -0
  15. package/blocks/conversation/composer/use-composer-files.ts +142 -0
  16. package/blocks/conversation/composer/use-history-nav.ts +60 -0
  17. package/blocks/conversation/composer/use-message-queue.ts +108 -0
  18. package/blocks/conversation/composer/use-region-height.ts +34 -0
  19. package/blocks/conversation/failure-states/examples.mdx +58 -0
  20. package/blocks/conversation/failure-states/index.tsx +274 -0
  21. package/blocks/conversation/transcript/examples.mdx +43 -0
  22. package/blocks/conversation/transcript/index.tsx +206 -0
  23. package/blocks/conversation/transcript-search/examples.mdx +50 -0
  24. package/blocks/conversation/transcript-search/index.tsx +469 -0
  25. package/blocks/dialogs/command-palette/examples.mdx +50 -0
  26. package/blocks/dialogs/command-palette/index.tsx +239 -0
  27. package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
  28. package/blocks/dialogs/hook-dialog/index.tsx +286 -0
  29. package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
  30. package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
  31. package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
  32. package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
  33. package/blocks/panes/artifacts-pane/examples.mdx +23 -0
  34. package/blocks/panes/artifacts-pane/index.tsx +82 -0
  35. package/blocks/panes/changes-pane/examples.mdx +23 -0
  36. package/blocks/panes/changes-pane/index.tsx +248 -0
  37. package/blocks/panes/file-pane/examples.mdx +13 -0
  38. package/blocks/panes/file-pane/index.tsx +102 -0
  39. package/blocks/panes/pr-pane/examples.mdx +13 -0
  40. package/blocks/panes/pr-pane/index.tsx +191 -0
  41. package/blocks/panes/side-pane/examples.mdx +58 -0
  42. package/blocks/panes/side-pane/index.tsx +187 -0
  43. package/blocks/panes/tasks-pane/examples.mdx +23 -0
  44. package/blocks/panes/tasks-pane/index.tsx +127 -0
  45. package/blocks/panes/terminal-pane/examples.mdx +13 -0
  46. package/blocks/panes/terminal-pane/index.tsx +99 -0
  47. package/blocks/panes/usage-pane/examples.mdx +23 -0
  48. package/blocks/panes/usage-pane/index.tsx +78 -0
  49. package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
  50. package/blocks/profiles/profile-onboarding/index.tsx +580 -0
  51. package/blocks/profiles/profile-switcher/examples.mdx +29 -0
  52. package/blocks/profiles/profile-switcher/index.tsx +212 -0
  53. package/blocks/profiles/profile-usage/examples.mdx +41 -0
  54. package/blocks/profiles/profile-usage/index.tsx +141 -0
  55. package/blocks/sessions/inbox/examples.mdx +35 -0
  56. package/blocks/sessions/inbox/index.tsx +372 -0
  57. package/blocks/sessions/session-board/examples.mdx +34 -0
  58. package/blocks/sessions/session-board/index.tsx +570 -0
  59. package/blocks/sessions/session-sidebar/examples.mdx +93 -0
  60. package/blocks/sessions/session-sidebar/index.tsx +497 -0
  61. package/blocks/settings/extensions/examples.mdx +10 -0
  62. package/blocks/settings/extensions/index.tsx +72 -0
  63. package/blocks/settings/hooks/examples.mdx +16 -0
  64. package/blocks/settings/hooks/index.tsx +127 -0
  65. package/blocks/settings/mcp-servers/examples.mdx +26 -0
  66. package/blocks/settings/mcp-servers/index.tsx +204 -0
  67. package/blocks/settings/memory/examples.mdx +22 -0
  68. package/blocks/settings/memory/index.tsx +113 -0
  69. package/blocks/settings/notifications/examples.mdx +8 -0
  70. package/blocks/settings/notifications/index.tsx +63 -0
  71. package/blocks/settings/permission-rules/examples.mdx +37 -0
  72. package/blocks/settings/permission-rules/index.tsx +317 -0
  73. package/blocks/settings/plugin-catalog/examples.mdx +52 -0
  74. package/blocks/settings/plugin-catalog/index.tsx +407 -0
  75. package/blocks/settings/plugins/examples.mdx +10 -0
  76. package/blocks/settings/plugins/index.tsx +72 -0
  77. package/blocks/settings/settings-window/examples.mdx +40 -0
  78. package/blocks/settings/settings-window/index.tsx +188 -0
  79. package/blocks/settings/worktrees/examples.mdx +17 -0
  80. package/blocks/settings/worktrees/index.tsx +145 -0
  81. package/components/conversation/agent-run/examples.mdx +38 -0
  82. package/components/conversation/agent-run/index.tsx +83 -0
  83. package/components/conversation/chapter-nav/examples.mdx +30 -0
  84. package/components/conversation/chapter-nav/index.tsx +123 -0
  85. package/components/conversation/message/examples.mdx +53 -0
  86. package/components/conversation/message/index.tsx +130 -0
  87. package/components/conversation/message/working.tsx +102 -0
  88. package/components/conversation/reasoning/examples.mdx +32 -0
  89. package/components/conversation/reasoning/index.tsx +55 -0
  90. package/components/conversation/recap/examples.mdx +21 -0
  91. package/components/conversation/recap/index.tsx +67 -0
  92. package/components/conversation/todo-list/examples.mdx +32 -0
  93. package/components/conversation/todo-list/index.tsx +106 -0
  94. package/components/conversation/tool-call/examples.mdx +48 -0
  95. package/components/conversation/tool-call/index.tsx +142 -0
  96. package/components/conversation/work-summary/examples.mdx +50 -0
  97. package/components/conversation/work-summary/index.tsx +87 -0
  98. package/components/prompts/permission-request/examples.mdx +32 -0
  99. package/components/prompts/permission-request/index.tsx +74 -0
  100. package/components/prompts/plan-approval/examples.mdx +37 -0
  101. package/components/prompts/plan-approval/index.tsx +76 -0
  102. package/components/prompts/prompt-card/examples.mdx +31 -0
  103. package/components/prompts/prompt-card/index.tsx +82 -0
  104. package/components/prompts/question-prompt/examples.mdx +46 -0
  105. package/components/prompts/question-prompt/index.tsx +118 -0
  106. package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
  107. package/dist/blocks/conversation/agent-prompt/index.js +13 -0
  108. package/dist/blocks/conversation/composer/index.d.ts +4 -0
  109. package/dist/blocks/conversation/composer/index.js +16 -0
  110. package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
  111. package/dist/blocks/conversation/failure-states/index.js +8 -0
  112. package/dist/blocks/conversation/transcript/index.d.ts +50 -0
  113. package/dist/blocks/conversation/transcript/index.js +17 -0
  114. package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
  115. package/dist/blocks/conversation/transcript-search/index.js +11 -0
  116. package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
  117. package/dist/blocks/dialogs/command-palette/index.js +20 -0
  118. package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
  119. package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
  120. package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
  121. package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
  122. package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
  123. package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
  124. package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
  125. package/dist/blocks/panes/artifacts-pane/index.js +9 -0
  126. package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
  127. package/dist/blocks/panes/changes-pane/index.js +9 -0
  128. package/dist/blocks/panes/file-pane/index.d.ts +3 -0
  129. package/dist/blocks/panes/file-pane/index.js +9 -0
  130. package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
  131. package/dist/blocks/panes/pr-pane/index.js +10 -0
  132. package/dist/blocks/panes/side-pane/index.d.ts +5 -0
  133. package/dist/blocks/panes/side-pane/index.js +21 -0
  134. package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
  135. package/dist/blocks/panes/tasks-pane/index.js +10 -0
  136. package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
  137. package/dist/blocks/panes/terminal-pane/index.js +9 -0
  138. package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
  139. package/dist/blocks/panes/usage-pane/index.js +11 -0
  140. package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
  141. package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
  142. package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
  143. package/dist/blocks/profiles/profile-switcher/index.js +12 -0
  144. package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
  145. package/dist/blocks/profiles/profile-usage/index.js +10 -0
  146. package/dist/blocks/sessions/inbox/index.d.ts +2 -0
  147. package/dist/blocks/sessions/inbox/index.js +11 -0
  148. package/dist/blocks/sessions/session-board/index.d.ts +4 -0
  149. package/dist/blocks/sessions/session-board/index.js +27 -0
  150. package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
  151. package/dist/blocks/sessions/session-sidebar/index.js +15 -0
  152. package/dist/blocks/settings/extensions/index.d.ts +2 -0
  153. package/dist/blocks/settings/extensions/index.js +9 -0
  154. package/dist/blocks/settings/hooks/index.d.ts +4 -0
  155. package/dist/blocks/settings/hooks/index.js +9 -0
  156. package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
  157. package/dist/blocks/settings/mcp-servers/index.js +9 -0
  158. package/dist/blocks/settings/memory/index.d.ts +4 -0
  159. package/dist/blocks/settings/memory/index.js +8 -0
  160. package/dist/blocks/settings/notifications/index.d.ts +2 -0
  161. package/dist/blocks/settings/notifications/index.js +8 -0
  162. package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
  163. package/dist/blocks/settings/permission-rules/index.js +10 -0
  164. package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
  165. package/dist/blocks/settings/plugin-catalog/index.js +11 -0
  166. package/dist/blocks/settings/plugins/index.d.ts +4 -0
  167. package/dist/blocks/settings/plugins/index.js +9 -0
  168. package/dist/blocks/settings/settings-window/index.d.ts +4 -0
  169. package/dist/blocks/settings/settings-window/index.js +8 -0
  170. package/dist/blocks/settings/worktrees/index.d.ts +4 -0
  171. package/dist/blocks/settings/worktrees/index.js +9 -0
  172. package/dist/components/conversation/agent-run/index.d.ts +3 -0
  173. package/dist/components/conversation/agent-run/index.js +10 -0
  174. package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
  175. package/dist/components/conversation/chapter-nav/index.js +11 -0
  176. package/dist/components/conversation/message/index.d.ts +2 -0
  177. package/dist/components/conversation/message/index.js +15 -0
  178. package/dist/components/conversation/reasoning/index.d.ts +2 -0
  179. package/dist/components/conversation/reasoning/index.js +8 -0
  180. package/dist/components/conversation/recap/index.d.ts +2 -0
  181. package/dist/components/conversation/recap/index.js +9 -0
  182. package/dist/components/conversation/todo-list/index.d.ts +2 -0
  183. package/dist/components/conversation/todo-list/index.js +9 -0
  184. package/dist/components/conversation/tool-call/index.d.ts +3 -0
  185. package/dist/components/conversation/tool-call/index.js +13 -0
  186. package/dist/components/conversation/work-summary/index.d.ts +2 -0
  187. package/dist/components/conversation/work-summary/index.js +10 -0
  188. package/dist/components/prompts/permission-request/index.d.ts +2 -0
  189. package/dist/components/prompts/permission-request/index.js +9 -0
  190. package/dist/components/prompts/plan-approval/index.d.ts +2 -0
  191. package/dist/components/prompts/plan-approval/index.js +9 -0
  192. package/dist/components/prompts/prompt-card/index.d.ts +3 -0
  193. package/dist/components/prompts/prompt-card/index.js +8 -0
  194. package/dist/components/prompts/question-prompt/index.d.ts +2 -0
  195. package/dist/components/prompts/question-prompt/index.js +9 -0
  196. package/dist/index.d.ts +50 -0
  197. package/dist/index.js +231 -0
  198. package/dist/lib/config-parts.d.ts +2 -0
  199. package/dist/lib/config-parts.js +16 -0
  200. package/dist/lib/icons.d.ts +2 -0
  201. package/dist/lib/icons.js +10 -0
  202. package/dist/lib/pace-bar.d.ts +11 -0
  203. package/dist/lib/pace-bar.js +6 -0
  204. package/dist/lib/pace.d.ts +4 -0
  205. package/dist/lib/pace.js +14 -0
  206. package/dist/lib/pane-parts.d.ts +25 -0
  207. package/dist/lib/pane-parts.js +11 -0
  208. package/dist/lib/row-trigger.d.ts +5 -0
  209. package/dist/lib/row-trigger.js +7 -0
  210. package/dist/lib/settings-parts.d.ts +70 -0
  211. package/dist/lib/settings-parts.js +24 -0
  212. package/dist/lib/side-pane-types.d.ts +2 -0
  213. package/dist/lib/side-pane-types.js +1 -0
  214. package/dist/lib/status-glyph.d.ts +8 -0
  215. package/dist/lib/status-glyph.js +12 -0
  216. package/dist/lib/types.d.ts +3 -0
  217. package/dist/lib/types.js +1 -0
  218. package/dist/shared/chunk-04a497rr.js +21 -0
  219. package/dist/shared/chunk-13yf0mza.d.ts +70 -0
  220. package/dist/shared/chunk-1hzrm8r5.d.ts +51 -0
  221. package/dist/shared/chunk-1qdwg7w5.d.ts +81 -0
  222. package/dist/shared/chunk-1yt061np.d.ts +64 -0
  223. package/dist/shared/chunk-218qabm5.js +250 -0
  224. package/dist/shared/chunk-2fk5aq60.js +313 -0
  225. package/dist/shared/chunk-3ps5h55t.d.ts +30 -0
  226. package/dist/shared/chunk-3yaftgh0.d.ts +28 -0
  227. package/dist/shared/chunk-4zvhpf2x.js +55 -0
  228. package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
  229. package/dist/shared/chunk-58jh3mje.js +46 -0
  230. package/dist/shared/chunk-58qvny6a.d.ts +29 -0
  231. package/dist/shared/chunk-5fhkkn39.js +130 -0
  232. package/dist/shared/chunk-5hw0525a.d.ts +33 -0
  233. package/dist/shared/chunk-5meda998.js +238 -0
  234. package/dist/shared/chunk-5pqksw7z.js +91 -0
  235. package/dist/shared/chunk-6220dy5n.js +70 -0
  236. package/dist/shared/chunk-64bnh22t.d.ts +59 -0
  237. package/dist/shared/chunk-66sh633m.d.ts +60 -0
  238. package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
  239. package/dist/shared/chunk-6kwk9vag.js +558 -0
  240. package/dist/shared/chunk-6rdwkymk.js +177 -0
  241. package/dist/shared/chunk-71j8qzvb.d.ts +57 -0
  242. package/dist/shared/chunk-74bvf3tw.d.ts +21 -0
  243. package/dist/shared/chunk-75zwypyr.d.ts +43 -0
  244. package/dist/shared/chunk-7mfer3tp.js +176 -0
  245. package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
  246. package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
  247. package/dist/shared/chunk-8mecznyr.js +357 -0
  248. package/dist/shared/chunk-8pag6vmd.js +255 -0
  249. package/dist/shared/chunk-94grzz9f.js +187 -0
  250. package/dist/shared/chunk-9kw6m047.d.ts +32 -0
  251. package/dist/shared/chunk-at0jje23.d.ts +110 -0
  252. package/dist/shared/chunk-awd573h9.js +34 -0
  253. package/dist/shared/chunk-b171wjge.d.ts +25 -0
  254. package/dist/shared/chunk-b4dz15em.d.ts +36 -0
  255. package/dist/shared/chunk-b5ccp5de.js +35 -0
  256. package/dist/shared/chunk-bh2b5d1z.js +98 -0
  257. package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
  258. package/dist/shared/chunk-c8wp058j.js +153 -0
  259. package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
  260. package/dist/shared/chunk-dh3qy5fj.js +49 -0
  261. package/dist/shared/chunk-dxzrtvt9.d.ts +283 -0
  262. package/dist/shared/chunk-e46apgve.d.ts +40 -0
  263. package/dist/shared/chunk-ejtknc0w.js +21 -0
  264. package/dist/shared/chunk-eqajdxn8.js +82 -0
  265. package/dist/shared/chunk-fapc805j.js +130 -0
  266. package/dist/shared/chunk-fm1qyrae.d.ts +68 -0
  267. package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
  268. package/dist/shared/chunk-g88hweqh.d.ts +70 -0
  269. package/dist/shared/chunk-gb5ee5dw.d.ts +88 -0
  270. package/dist/shared/chunk-gewnsgza.js +61 -0
  271. package/dist/shared/chunk-hxjgey30.d.ts +36 -0
  272. package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
  273. package/dist/shared/chunk-jpq101w3.js +91 -0
  274. package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
  275. package/dist/shared/chunk-kreypnzp.d.ts +34 -0
  276. package/dist/shared/chunk-mnzw0bav.js +80 -0
  277. package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
  278. package/dist/shared/chunk-n1qq2wp9.js +6 -0
  279. package/dist/shared/chunk-n31qwnj2.js +1544 -0
  280. package/dist/shared/chunk-n4742y54.js +39 -0
  281. package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
  282. package/dist/shared/chunk-njf851p1.js +245 -0
  283. package/dist/shared/chunk-nk4578dr.js +73 -0
  284. package/dist/shared/chunk-nkbgg7bw.d.ts +24 -0
  285. package/dist/shared/chunk-nvh33x9x.js +488 -0
  286. package/dist/shared/chunk-paezqfg1.js +106 -0
  287. package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
  288. package/dist/shared/chunk-qhxz1etk.js +96 -0
  289. package/dist/shared/chunk-qj5ev9ak.js +531 -0
  290. package/dist/shared/chunk-qnwggvjy.js +150 -0
  291. package/dist/shared/chunk-qt31n444.js +178 -0
  292. package/dist/shared/chunk-r5hz78pb.js +129 -0
  293. package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
  294. package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
  295. package/dist/shared/chunk-s3r759ec.js +80 -0
  296. package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
  297. package/dist/shared/chunk-skg3m9m0.js +56 -0
  298. package/dist/shared/chunk-t21t9x7e.js +188 -0
  299. package/dist/shared/chunk-tc75ng2c.js +235 -0
  300. package/dist/shared/chunk-tkx1krwc.js +88 -0
  301. package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
  302. package/dist/shared/chunk-tv9a1sek.js +137 -0
  303. package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
  304. package/dist/shared/chunk-ty2ccknv.d.ts +54 -0
  305. package/dist/shared/chunk-v6yevw62.d.ts +28 -0
  306. package/dist/shared/chunk-v9q38p0x.js +258 -0
  307. package/dist/shared/chunk-vgh4f3sv.js +118 -0
  308. package/dist/shared/chunk-vjht1zn1.js +391 -0
  309. package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
  310. package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
  311. package/dist/shared/chunk-wq9h37gy.js +86 -0
  312. package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
  313. package/dist/shared/chunk-x9jf26yb.js +318 -0
  314. package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
  315. package/dist/shared/chunk-xkchhs2z.js +129 -0
  316. package/dist/shared/chunk-xzfrskd7.js +202 -0
  317. package/dist/shared/chunk-y4cj4y54.js +423 -0
  318. package/dist/shared/chunk-y934at6m.js +7 -0
  319. package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
  320. package/dist/shared/chunk-zfhmbb7n.js +63 -0
  321. package/dist/shared/chunk-zk0t4vq5.js +71 -0
  322. package/dist/shared/chunk-znp9gna7.d.ts +23 -0
  323. package/dist/styles.css +467 -0
  324. package/index.ts +49 -0
  325. package/lib/config-parts.tsx +97 -0
  326. package/lib/icons.tsx +149 -0
  327. package/lib/pace-bar.tsx +24 -0
  328. package/lib/pace.ts +78 -0
  329. package/lib/pane-parts.tsx +76 -0
  330. package/lib/row-trigger.tsx +44 -0
  331. package/lib/settings-parts.tsx +232 -0
  332. package/lib/side-pane-types.ts +75 -0
  333. package/lib/status-glyph.tsx +25 -0
  334. package/lib/types.ts +204 -0
  335. package/mock/demo-reply.tsx +33 -0
  336. package/mock/demo-session.tsx +150 -0
  337. package/mock/mock-config.ts +173 -0
  338. package/mock/mock-extras.ts +288 -0
  339. package/mock/mock-panes.ts +190 -0
  340. package/mock/mock-settings.ts +92 -0
  341. package/mock/mock.ts +548 -0
  342. package/mock/screen-frame.tsx +49 -0
  343. package/package.json +114 -4
@@ -0,0 +1,57 @@
1
+ import { Profile2 } from "./chunk-jkkdq1mh.js";
2
+ import { JSX as JSX_1kxb } from "react";
3
+ type FailureKind2 = "cli-crashed" | "reconnecting" | "rate-limited" | "offline" | "auth-expired";
4
+ interface FailureStateProps2 {
5
+ /** Which state: the claude process exited, the connection is being retried, a limit was hit, no network, or the sign-in expired. */
6
+ kind: FailureKind2;
7
+ /** A strip over the transcript, or the whole pane's empty state. Defaults to `'banner'`. */
8
+ variant?: "banner" | "page";
9
+ /** The profile it concerns: the one rate-limited or signed out. */
10
+ profile?: Profile2;
11
+ /** For `cli-crashed`: the last lines claude printed to stderr. */
12
+ stderr?: string[];
13
+ /** For `cli-crashed`: the exit code, or the signal it died of. */
14
+ exitCode?: number | string;
15
+ /** For `reconnecting`: this attempt, counted from 1. Defaults to `1`. */
16
+ attempt?: number;
17
+ /** For `reconnecting`: how many attempts before it gives up. Defaults to `5`. */
18
+ maxAttempts?: number;
19
+ /** For `reconnecting`: the time to the next attempt, as it reads ("4s"). */
20
+ retryIn?: string;
21
+ /** For `rate-limited`: when the limit resets, as it reads ("in 1h 12m", "at 14:05"). */
22
+ resetsIn?: string;
23
+ /** For `rate-limited`: the profiles with room to move the session to, the roomiest first. */
24
+ alternatives?: Profile2[];
25
+ /** Called when Restart is pressed (`cli-crashed`). */
26
+ onRestart?: () => void;
27
+ /** Called when Retry now is pressed (`reconnecting`, `offline`). */
28
+ onRetry?: () => void;
29
+ /** Called with a profile id when the session moves to it (`rate-limited`). */
30
+ onSwitchProfile?: (profileId: string) => void;
31
+ /** Called when Sign in again is pressed (`auth-expired`). */
32
+ onLogin?: () => void;
33
+ /** Called when a banner's ✕ is pressed; without it, the banner has none. */
34
+ onDismiss?: () => void;
35
+ /** Classes for the root. */
36
+ className?: string;
37
+ }
38
+ type Element_12xgc = JSX_1kxb["Element"];
39
+ /**
40
+ * What the app shows when a session can't go on: the claude process
41
+ * crashed, the connection dropped, a profile hit its limit, the machine is
42
+ * offline, or a sign-in expired.
43
+ *
44
+ * Each state says what happened, in which profile, and the one thing that
45
+ * gets the session going again. A crash keeps the last of claude's stderr
46
+ * in a log, with Restart (the transcript is kept). Reconnecting counts its
47
+ * attempts and the time to the next one. A rate limit names the profile,
48
+ * when it resets and the profiles with room, so the session can move there
49
+ * in one press. Offline waits for the network; an expired sign-in runs
50
+ * `claude login` again. As a `banner` it sits over the transcript, which
51
+ * stays readable under it; as a `page` it fills the pane where the
52
+ * transcript would be.
53
+ *
54
+ * @example {@include ./examples.mdx}
55
+ */
56
+ declare function FailureState2({ kind, variant, profile, stderr, exitCode, attempt, maxAttempts, retryIn, resetsIn, alternatives, onRestart, onRetry, onSwitchProfile, onLogin, onDismiss, className }: FailureStateProps2): Element_12xgc;
57
+ export { FailureKind2, FailureStateProps2, FailureState2 };
@@ -0,0 +1,318 @@
1
+ "use client";
2
+
3
+ import {
4
+ useIcon2
5
+ } from "./chunk-xkchhs2z.js";
6
+
7
+ // blocks/sessions/inbox/index.tsx
8
+ import {
9
+ FluidHoverHighlight,
10
+ useFluidHover,
11
+ useRegisterFluidHoverItem
12
+ } from "@justanarthur/modo-ui";
13
+ import Button from "@justanarthur/modo-ui/components/actions/button";
14
+ import StatusDot from "@justanarthur/modo-ui/components/feedback/status-dot";
15
+ import Popover from "@justanarthur/modo-ui/components/overlays/popover";
16
+ import { useShape } from "@justanarthur/modo-ui/lib/shape-context";
17
+ import { cn } from "@justanarthur/modo-ui/lib/utils";
18
+ import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
19
+ import { SizeProvider } from "@justanarthur/modo-ui/primitives/systems/sizes";
20
+ import { useRef, useState } from "react";
21
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
22
+ /*!
23
+ * Local addition: the AI app's inbox. Everything across sessions that needs
24
+ * the user (a permission, a question or a plan waiting, a finished turn, a
25
+ * failed CI run, a limit running out) in one list grouped by recency, each
26
+ * row answered in place. The trigger is a bell with the unread count; the
27
+ * list opens in a Popover that grows out of it.
28
+ */
29
+ var KIND = {
30
+ permission: { icon: "shield", label: "Permission", tone: "text-status-warning" },
31
+ question: { icon: "message-circle", label: "Question", tone: "text-status-warning" },
32
+ plan: { icon: "list-checks", label: "Plan to review", tone: "text-status-warning" },
33
+ finished: { icon: "circle-check", label: "Finished", tone: "text-muted-foreground" },
34
+ "ci-failed": { icon: "circle-x", label: "CI failed", tone: "text-status-error" },
35
+ "rate-limit": { icon: "gauge", label: "Limit", tone: "text-status-warning" }
36
+ };
37
+ var GROUPS = [
38
+ { label: "Last hour", until: 60 },
39
+ { label: "Today", until: 60 * 24 },
40
+ { label: "Earlier", until: Number.POSITIVE_INFINITY }
41
+ ];
42
+ function ago(minutes) {
43
+ if (minutes < 1)
44
+ return "now";
45
+ if (minutes < 60)
46
+ return `${Math.round(minutes)}m`;
47
+ if (minutes < 60 * 24)
48
+ return `${Math.round(minutes / 60)}h`;
49
+ return `${Math.round(minutes / 60 / 24)}d`;
50
+ }
51
+ function Actions({ item, onAction }) {
52
+ const button = (action, label, variant = "ghost") => /* @__PURE__ */ jsx(Button, {
53
+ variant,
54
+ size: "compact",
55
+ onClick: () => onAction(action),
56
+ children: label
57
+ }, action);
58
+ if (item.kind === "permission")
59
+ return /* @__PURE__ */ jsxs(Fragment, {
60
+ children: [
61
+ button("deny", "Deny"),
62
+ button("allow", "Allow", "secondary")
63
+ ]
64
+ });
65
+ if (item.kind === "rate-limit")
66
+ return button("switch-profile", "Switch profile", "secondary");
67
+ if (item.kind === "question")
68
+ return button("open", "Answer", "secondary");
69
+ if (item.kind === "plan")
70
+ return button("open", "Review", "secondary");
71
+ if (item.kind === "ci-failed")
72
+ return button("open", "Open", "secondary");
73
+ return null;
74
+ }
75
+ function Row({
76
+ item,
77
+ index,
78
+ read,
79
+ resolved,
80
+ register,
81
+ onAction
82
+ }) {
83
+ const ref = useRef(null);
84
+ const shape = useShape();
85
+ const kind = KIND[item.kind];
86
+ const Icon = useIcon2(kind.icon);
87
+ useRegisterFluidHoverItem(register, index, ref);
88
+ return /* @__PURE__ */ jsxs("div", {
89
+ ref,
90
+ className: cn("relative z-10 flex items-start gap-[var(--space-3)] px-[var(--space-2)] py-[var(--space-2)]", shape.item),
91
+ children: [
92
+ /* @__PURE__ */ jsx(Icon, {
93
+ size: 16,
94
+ strokeWidth: 1.5,
95
+ className: cn("mt-0.5 shrink-0", kind.tone)
96
+ }),
97
+ /* @__PURE__ */ jsxs("div", {
98
+ className: "flex min-w-0 flex-1 flex-col gap-[var(--space-1)]",
99
+ children: [
100
+ /* @__PURE__ */ jsxs("button", {
101
+ type: "button",
102
+ onClick: () => onAction("open"),
103
+ className: 'flex min-w-0 cursor-pointer flex-col text-left outline-none after:absolute after:inset-0 after:rounded-box after:content-[""] focus-visible:after:ring-1 focus-visible:after:ring-focus-ring',
104
+ children: [
105
+ /* @__PURE__ */ jsxs("span", {
106
+ className: "flex min-w-0 items-baseline gap-[var(--space-2)]",
107
+ children: [
108
+ /* @__PURE__ */ jsx("span", {
109
+ className: cn("min-w-0 flex-1 truncate text-body", read ? "text-muted-foreground" : "text-foreground"),
110
+ children: item.title
111
+ }),
112
+ /* @__PURE__ */ jsx("span", {
113
+ className: "shrink-0 text-caption tabular-nums text-muted-foreground",
114
+ children: ago(item.ago)
115
+ })
116
+ ]
117
+ }),
118
+ /* @__PURE__ */ jsx("span", {
119
+ className: "min-w-0 truncate text-caption text-muted-foreground",
120
+ children: [kind.label, item.session, item.project, item.profile].filter(Boolean).join(" · ")
121
+ }),
122
+ item.detail && /* @__PURE__ */ jsx("span", {
123
+ className: "min-w-0 truncate font-mono text-caption text-muted-foreground",
124
+ children: item.detail
125
+ })
126
+ ]
127
+ }),
128
+ resolved ? /* @__PURE__ */ jsx("span", {
129
+ className: "text-caption text-muted-foreground",
130
+ children: resolved
131
+ }) : /* @__PURE__ */ jsx("span", {
132
+ className: "relative z-20 flex items-center gap-[var(--space-1)] empty:hidden",
133
+ children: /* @__PURE__ */ jsx(Actions, {
134
+ item,
135
+ onAction
136
+ })
137
+ })
138
+ ]
139
+ }),
140
+ !read && /* @__PURE__ */ jsx(StatusDot, {
141
+ status: "unread",
142
+ label: "Unread",
143
+ size: "compact",
144
+ className: "mt-0.5"
145
+ })
146
+ ]
147
+ });
148
+ }
149
+ function InboxList2({ items, onAction, onMarkAllRead, header = true, className }) {
150
+ const containerRef = useRef(null);
151
+ const hover = useFluidHover(containerRef, { axis: "y" });
152
+ const shape = useShape();
153
+ const Inbox = useIcon2("inbox");
154
+ const [allRead, setAllRead] = useState(false);
155
+ const [readIds, setReadIds] = useState([]);
156
+ const [resolved, setResolved] = useState({});
157
+ const sorted = [...items].sort((a, b) => a.ago - b.ago);
158
+ const isRead = (item) => allRead || item.read || readIds.includes(item.id);
159
+ const unread = sorted.filter((i) => !isRead(i)).length;
160
+ const act = (item, action) => {
161
+ setReadIds((ids) => [...ids, item.id]);
162
+ if (action === "allow")
163
+ setResolved((r) => ({ ...r, [item.id]: "Allowed" }));
164
+ if (action === "deny")
165
+ setResolved((r) => ({ ...r, [item.id]: "Denied" }));
166
+ onAction?.(item, action);
167
+ };
168
+ let index = 0;
169
+ let lower = 0;
170
+ const groups = [];
171
+ for (const group of GROUPS) {
172
+ const rows = sorted.filter((i) => i.ago >= lower && i.ago < group.until).map((item) => /* @__PURE__ */ jsx(Row, {
173
+ item,
174
+ index: index++,
175
+ read: isRead(item),
176
+ resolved: resolved[item.id],
177
+ register: hover.registerItem,
178
+ onAction: (action) => act(item, action)
179
+ }, item.id));
180
+ lower = group.until;
181
+ if (rows.length > 0)
182
+ groups.push({ label: group.label, rows });
183
+ }
184
+ return /* @__PURE__ */ jsxs("div", {
185
+ className: cn("flex min-h-0 flex-1 flex-col gap-[var(--space-2)]", className),
186
+ children: [
187
+ header && /* @__PURE__ */ jsxs("div", {
188
+ className: "flex items-center gap-[var(--space-2)] pl-[var(--space-2)]",
189
+ children: [
190
+ /* @__PURE__ */ jsx("span", {
191
+ className: "text-subtitle text-foreground",
192
+ children: "Inbox"
193
+ }),
194
+ unread > 0 && /* @__PURE__ */ jsxs("span", {
195
+ className: "text-caption tabular-nums text-muted-foreground",
196
+ children: [
197
+ unread,
198
+ " unread"
199
+ ]
200
+ }),
201
+ /* @__PURE__ */ jsx(Button, {
202
+ variant: "ghost",
203
+ size: "compact",
204
+ className: "ml-auto",
205
+ disabled: unread === 0,
206
+ onClick: () => {
207
+ setAllRead(true);
208
+ onMarkAllRead?.();
209
+ },
210
+ children: "Mark all read"
211
+ })
212
+ ]
213
+ }),
214
+ sorted.length === 0 ? /* @__PURE__ */ jsxs("div", {
215
+ className: "flex flex-col items-center gap-[var(--space-1)] px-[var(--space-4)] py-[var(--space-6)] text-center",
216
+ children: [
217
+ /* @__PURE__ */ jsx(Inbox, {
218
+ size: 20,
219
+ strokeWidth: 1.5,
220
+ className: "text-muted-foreground"
221
+ }),
222
+ /* @__PURE__ */ jsx("span", {
223
+ className: "text-body text-foreground",
224
+ children: "Nothing needs you"
225
+ }),
226
+ /* @__PURE__ */ jsx("span", {
227
+ className: "text-caption text-muted-foreground",
228
+ children: "Waiting sessions, finished turns and failed checks land here."
229
+ })
230
+ ]
231
+ }) : /* @__PURE__ */ jsx(ScrollArea, {
232
+ className: "min-h-0 flex-1",
233
+ viewportClassName: "scroll-fade",
234
+ children: /* @__PURE__ */ jsxs("div", {
235
+ ref: containerRef,
236
+ ...hover.handlers,
237
+ className: "@container relative flex flex-col gap-[var(--space-2)]",
238
+ children: [
239
+ /* @__PURE__ */ jsx(FluidHoverHighlight, {
240
+ hover,
241
+ className: shape.bg
242
+ }),
243
+ groups.map((group) => /* @__PURE__ */ jsxs("section", {
244
+ "aria-label": group.label,
245
+ className: "flex flex-col",
246
+ children: [
247
+ /* @__PURE__ */ jsx("span", {
248
+ className: "px-[var(--space-2)] pb-[var(--space-1)] text-caption text-muted-foreground",
249
+ children: group.label
250
+ }),
251
+ group.rows
252
+ ]
253
+ }, group.label))
254
+ ]
255
+ })
256
+ })
257
+ ]
258
+ });
259
+ }
260
+ var Inbox2 = Object.assign(function Inbox({
261
+ items,
262
+ onAction,
263
+ onMarkAllRead,
264
+ open,
265
+ defaultOpen = false,
266
+ onOpenChange,
267
+ side = "bottom",
268
+ align = "end",
269
+ trigger,
270
+ className
271
+ }) {
272
+ const Bell = useIcon2("bell");
273
+ const [cleared, setCleared] = useState(false);
274
+ const unread = cleared ? 0 : items.filter((i) => !i.read).length;
275
+ return /* @__PURE__ */ jsxs(Popover, {
276
+ open,
277
+ defaultOpen,
278
+ onOpenChange,
279
+ children: [
280
+ /* @__PURE__ */ jsx(Popover.Trigger, {
281
+ render: trigger ?? /* @__PURE__ */ jsxs(Button, {
282
+ variant: "ghost",
283
+ size: "icon-sm",
284
+ "aria-label": unread > 0 ? `Inbox, ${unread} unread` : "Inbox",
285
+ className: cn("relative", className),
286
+ children: [
287
+ /* @__PURE__ */ jsx(Bell, {}),
288
+ unread > 0 && /* @__PURE__ */ jsx("span", {
289
+ "aria-hidden": "true",
290
+ className: "absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand px-1 text-micro tabular-nums text-background",
291
+ children: unread > 9 ? "9+" : unread
292
+ })
293
+ ]
294
+ })
295
+ }),
296
+ /* @__PURE__ */ jsx(Popover.Content, {
297
+ side,
298
+ align,
299
+ sideOffset: 8,
300
+ className: "flex max-h-[520px] w-96 flex-col p-[var(--space-2)]",
301
+ children: /* @__PURE__ */ jsx(SizeProvider, {
302
+ size: "default",
303
+ children: /* @__PURE__ */ jsx(InboxList2, {
304
+ items,
305
+ onAction,
306
+ onMarkAllRead: () => {
307
+ setCleared(true);
308
+ onMarkAllRead?.();
309
+ }
310
+ })
311
+ })
312
+ })
313
+ ]
314
+ });
315
+ }, { List: InboxList2 });
316
+ var inbox_default = Inbox2;
317
+
318
+ export { InboxList2, Inbox2, inbox_default };
@@ -0,0 +1,23 @@
1
+ import { Plugin2 } from "./chunk-jkkdq1mh.js";
2
+ import { JSX as JSX_1kxb } from "react";
3
+ interface PluginsProps2 {
4
+ /** Skills and plugins together; each lands in its run by `kind`. */
5
+ plugins: Plugin2[];
6
+ /** Called when "Browse catalog" is pressed. */
7
+ onBrowse?: () => void;
8
+ /** Called when a skill's or plugin's switch flips, with its new state. */
9
+ onToggle?: (plugin: Plugin2, enabled: boolean) => void;
10
+ }
11
+ type Element_12xgc = JSX_1kxb["Element"];
12
+ /**
13
+ * What the sessions can load: skills, which come into a turn when a task
14
+ * calls for them, and plugins, which bundle commands, skills, hooks and panes.
15
+ *
16
+ * Each is a switch with its description, skills first, then plugins; the
17
+ * caption over each run counts how many are on. Optional panes such as the
18
+ * browser and the iOS simulator come in as plugins.
19
+ *
20
+ * @example {@include ./examples.mdx}
21
+ */
22
+ declare function Plugins2({ plugins, onBrowse, onToggle }: PluginsProps2): Element_12xgc;
23
+ export { PluginsProps2, Plugins2 };
@@ -0,0 +1,129 @@
1
+ "use client";
2
+
3
+ // lib/icons.tsx
4
+ import {
5
+ useIcons as useUiIcons
6
+ } from "@justanarthur/modo-ui/lib/icon-context";
7
+ import {
8
+ Archive,
9
+ ArrowUpRight,
10
+ AtSign,
11
+ Ban,
12
+ BookOpen,
13
+ Bot,
14
+ ChevronUp,
15
+ CircleDot,
16
+ CircleX,
17
+ Clipboard,
18
+ Cloud,
19
+ Columns2,
20
+ Command,
21
+ Cpu,
22
+ ExternalLink,
23
+ FilePlus,
24
+ FileText,
25
+ FolderOpen,
26
+ Gauge,
27
+ GitBranch,
28
+ GitFork,
29
+ GitPullRequest,
30
+ History,
31
+ Key,
32
+ Layers,
33
+ LayoutDashboard,
34
+ ListChecks,
35
+ ListTree,
36
+ Package,
37
+ Paperclip,
38
+ PenLine,
39
+ Pin,
40
+ Plug,
41
+ Puzzle,
42
+ RefreshCw,
43
+ Server,
44
+ ShieldCheck,
45
+ Split,
46
+ SquareKanban,
47
+ Terminal,
48
+ TextWrap,
49
+ Trash2,
50
+ TriangleAlert,
51
+ Webhook,
52
+ Wrench,
53
+ Zap
54
+ } from "lucide-react";
55
+ import { createContext, useContext, useMemo } from "react";
56
+ import { jsx } from "react/jsx-runtime";
57
+ /*!
58
+ * The kit's glyphs on top of modo-ui's icon set: tools, panes, session states
59
+ * and settings sections. modo-ui's names resolve through its IconProvider,
60
+ * the kit's own through AiIconProvider, so a host swaps either set.
61
+ */
62
+ var aiIcons = {
63
+ archive: Archive,
64
+ "arrow-up-right": ArrowUpRight,
65
+ "at-sign": AtSign,
66
+ ban: Ban,
67
+ "book-open": BookOpen,
68
+ bot: Bot,
69
+ "chevron-up": ChevronUp,
70
+ "circle-dot": CircleDot,
71
+ "circle-x": CircleX,
72
+ clipboard: Clipboard,
73
+ cloud: Cloud,
74
+ "columns-2": Columns2,
75
+ command: Command,
76
+ cpu: Cpu,
77
+ "external-link": ExternalLink,
78
+ "file-plus": FilePlus,
79
+ "file-text": FileText,
80
+ "folder-open": FolderOpen,
81
+ gauge: Gauge,
82
+ "git-branch": GitBranch,
83
+ "git-fork": GitFork,
84
+ "git-pull-request": GitPullRequest,
85
+ history: History,
86
+ key: Key,
87
+ layers: Layers,
88
+ "layout-dashboard": LayoutDashboard,
89
+ "list-checks": ListChecks,
90
+ "list-tree": ListTree,
91
+ package: Package,
92
+ paperclip: Paperclip,
93
+ "pen-line": PenLine,
94
+ pin: Pin,
95
+ plug: Plug,
96
+ puzzle: Puzzle,
97
+ "refresh-cw": RefreshCw,
98
+ server: Server,
99
+ "shield-check": ShieldCheck,
100
+ split: Split,
101
+ "square-kanban": SquareKanban,
102
+ terminal: Terminal,
103
+ "text-wrap": TextWrap,
104
+ trash: Trash2,
105
+ "triangle-alert": TriangleAlert,
106
+ webhook: Webhook,
107
+ wrench: Wrench,
108
+ zap: Zap
109
+ };
110
+ var AiIconContext = createContext(null);
111
+ function useIcons2() {
112
+ const ui = useUiIcons();
113
+ const ai = useContext(AiIconContext) ?? aiIcons;
114
+ return useMemo(() => ({ ...ui, ...ai }), [ui, ai]);
115
+ }
116
+ function useIcon2(name) {
117
+ return useIcons2()[name];
118
+ }
119
+ function AiIconProvider2({
120
+ children,
121
+ icons
122
+ }) {
123
+ const value = useMemo(() => ({ ...aiIcons, ...icons }), [icons]);
124
+ return /* @__PURE__ */ jsx(AiIconContext.Provider, {
125
+ value,
126
+ children
127
+ });
128
+ }
129
+ export { useIcons2, useIcon2, AiIconProvider2 };