@notis_ai/cli 0.2.0-beta.139.1 → 0.2.0-beta.144.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 (270) hide show
  1. package/README.md +44 -20
  2. package/dist/agent-hooks/notis-agent-hook.mjs +4579 -1449
  3. package/dist/base-skills/notis-apps/SKILL.md +83 -55
  4. package/dist/base-skills/notis-cli/SKILL.md +8 -8
  5. package/package.json +2 -2
  6. package/skills/notis-apps/cli.md +38 -17
  7. package/src/command-specs/apps.js +871 -387
  8. package/src/command-specs/auth.js +47 -10
  9. package/src/command-specs/onboarding.js +11 -4
  10. package/src/runtime/app-dev-consumers.js +154 -0
  11. package/src/runtime/app-dev-host-lock.js +80 -0
  12. package/src/runtime/app-dev-roots.js +284 -0
  13. package/src/runtime/app-dev-server.js +212 -22
  14. package/src/runtime/app-dev-sessions.js +105 -145
  15. package/src/runtime/app-platform.js +1291 -165
  16. package/src/runtime/app-registry-scaffolds.js +367 -0
  17. package/src/runtime/login-listener.js +15 -0
  18. package/src/runtime/oauth.js +1506 -141
  19. package/src/runtime/output.js +7 -0
  20. package/src/runtime/ports.js +16 -0
  21. package/src/runtime/profiles.js +0 -5
  22. package/template/app/layout.tsx +5 -1
  23. package/template/notis.config.ts +1 -0
  24. package/template/packages/sdk/package.json +2 -1
  25. package/template/packages/sdk/src/components/MarkdownEditor.tsx +121 -0
  26. package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +37 -119
  27. package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +5 -1
  28. package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +1 -1
  29. package/template/packages/sdk/src/components/NotisSelectionBoundary.tsx +55 -0
  30. package/template/packages/sdk/src/components/ShortcutHints.tsx +56 -0
  31. package/template/packages/sdk/src/config.ts +19 -0
  32. package/template/packages/sdk/src/hooks/useActiveResource.ts +19 -0
  33. package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +709 -0
  34. package/template/packages/sdk/src/hooks/useHandover.ts +3 -0
  35. package/template/packages/sdk/src/hooks/useMultiSelect.ts +44 -482
  36. package/template/packages/sdk/src/hooks/useTool.ts +5 -4
  37. package/template/packages/sdk/src/index.ts +47 -2
  38. package/template/packages/sdk/src/interactions/actions.ts +46 -0
  39. package/template/packages/sdk/src/interactions/shortcuts.tsx +628 -0
  40. package/template/packages/sdk/src/interactions.ts +41 -0
  41. package/template/packages/sdk/src/provider.tsx +2 -1
  42. package/template/packages/sdk/src/runtime.ts +85 -3
  43. package/dist/scaffolds/notis-database/CHANGELOG.md +0 -5
  44. package/dist/scaffolds/notis-database/app/globals.css +0 -44
  45. package/dist/scaffolds/notis-database/app/layout.tsx +0 -6
  46. package/dist/scaffolds/notis-database/app/page.tsx +0 -1088
  47. package/dist/scaffolds/notis-database/components/ui/badge.tsx +0 -28
  48. package/dist/scaffolds/notis-database/components/ui/button.tsx +0 -53
  49. package/dist/scaffolds/notis-database/components/ui/card.tsx +0 -56
  50. package/dist/scaffolds/notis-database/components/ui/table.tsx +0 -120
  51. package/dist/scaffolds/notis-database/components.json +0 -20
  52. package/dist/scaffolds/notis-database/index.html +0 -12
  53. package/dist/scaffolds/notis-database/lib/types.ts +0 -132
  54. package/dist/scaffolds/notis-database/lib/utils.ts +0 -6
  55. package/dist/scaffolds/notis-database/metadata/screenshot-1.png +0 -0
  56. package/dist/scaffolds/notis-database/metadata/screenshot-2.png +0 -0
  57. package/dist/scaffolds/notis-database/metadata/screenshot-3.png +0 -0
  58. package/dist/scaffolds/notis-database/metadata/screenshot-4.png +0 -0
  59. package/dist/scaffolds/notis-database/metadata/screenshot-5.png +0 -0
  60. package/dist/scaffolds/notis-database/metadata/screenshot-fixtures.json +0 -1839
  61. package/dist/scaffolds/notis-database/notis.config.ts +0 -73
  62. package/dist/scaffolds/notis-database/package-lock.json +0 -3935
  63. package/dist/scaffolds/notis-database/package.json +0 -32
  64. package/dist/scaffolds/notis-database/packages/sdk/package.json +0 -36
  65. package/dist/scaffolds/notis-database/packages/sdk/src/components/DocumentEditor.tsx +0 -93
  66. package/dist/scaffolds/notis-database/packages/sdk/src/components/Markdown.tsx +0 -60
  67. package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
  68. package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
  69. package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
  70. package/dist/scaffolds/notis-database/packages/sdk/src/config.ts +0 -234
  71. package/dist/scaffolds/notis-database/packages/sdk/src/documents.ts +0 -250
  72. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useBackend.ts +0 -41
  73. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
  74. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
  75. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
  76. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocument.ts +0 -78
  77. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocuments.ts +0 -121
  78. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useHandover.ts +0 -75
  79. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
  80. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useNotis.ts +0 -34
  81. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
  82. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTool.ts +0 -64
  83. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTools.ts +0 -56
  84. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
  85. package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
  86. package/dist/scaffolds/notis-database/packages/sdk/src/index.ts +0 -100
  87. package/dist/scaffolds/notis-database/packages/sdk/src/provider.tsx +0 -43
  88. package/dist/scaffolds/notis-database/packages/sdk/src/runtime.ts +0 -351
  89. package/dist/scaffolds/notis-database/packages/sdk/src/styles.css +0 -186
  90. package/dist/scaffolds/notis-database/packages/sdk/src/ui.ts +0 -15
  91. package/dist/scaffolds/notis-database/packages/sdk/src/vite.ts +0 -56
  92. package/dist/scaffolds/notis-database/packages/sdk/tsconfig.json +0 -15
  93. package/dist/scaffolds/notis-database/postcss.config.mjs +0 -8
  94. package/dist/scaffolds/notis-database/src/dev-main.tsx +0 -23
  95. package/dist/scaffolds/notis-database/src/mock-runtime.ts +0 -561
  96. package/dist/scaffolds/notis-database/tailwind.config.ts +0 -59
  97. package/dist/scaffolds/notis-database/tsconfig.json +0 -23
  98. package/dist/scaffolds/notis-database/vite.config.ts +0 -22
  99. package/dist/scaffolds/notis-journal/CHANGELOG.md +0 -29
  100. package/dist/scaffolds/notis-journal/app/globals.css +0 -37
  101. package/dist/scaffolds/notis-journal/app/insights/page.tsx +0 -513
  102. package/dist/scaffolds/notis-journal/app/journal-core.tsx +0 -362
  103. package/dist/scaffolds/notis-journal/app/journal-ui.tsx +0 -337
  104. package/dist/scaffolds/notis-journal/app/layout.tsx +0 -6
  105. package/dist/scaffolds/notis-journal/app/page.tsx +0 -486
  106. package/dist/scaffolds/notis-journal/components/ui/badge.tsx +0 -28
  107. package/dist/scaffolds/notis-journal/components/ui/button.tsx +0 -53
  108. package/dist/scaffolds/notis-journal/components/ui/card.tsx +0 -56
  109. package/dist/scaffolds/notis-journal/components.json +0 -20
  110. package/dist/scaffolds/notis-journal/index.html +0 -12
  111. package/dist/scaffolds/notis-journal/lib/utils.ts +0 -6
  112. package/dist/scaffolds/notis-journal/metadata/screenshot-1.png +0 -0
  113. package/dist/scaffolds/notis-journal/metadata/screenshot-2.png +0 -0
  114. package/dist/scaffolds/notis-journal/metadata/screenshot-3.png +0 -0
  115. package/dist/scaffolds/notis-journal/metadata/screenshot-4.png +0 -0
  116. package/dist/scaffolds/notis-journal/metadata/screenshot-5.png +0 -0
  117. package/dist/scaffolds/notis-journal/metadata/screenshot-6.png +0 -0
  118. package/dist/scaffolds/notis-journal/metadata/screenshot-fixtures.json +0 -132
  119. package/dist/scaffolds/notis-journal/notis.config.ts +0 -93
  120. package/dist/scaffolds/notis-journal/package-lock.json +0 -4615
  121. package/dist/scaffolds/notis-journal/package.json +0 -34
  122. package/dist/scaffolds/notis-journal/packages/sdk/package.json +0 -36
  123. package/dist/scaffolds/notis-journal/packages/sdk/src/components/DocumentEditor.tsx +0 -93
  124. package/dist/scaffolds/notis-journal/packages/sdk/src/components/Markdown.tsx +0 -60
  125. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
  126. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
  127. package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
  128. package/dist/scaffolds/notis-journal/packages/sdk/src/config.ts +0 -234
  129. package/dist/scaffolds/notis-journal/packages/sdk/src/documents.ts +0 -250
  130. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useBackend.ts +0 -41
  131. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
  132. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
  133. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
  134. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocument.ts +0 -78
  135. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocuments.ts +0 -121
  136. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useHandover.ts +0 -75
  137. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
  138. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotis.ts +0 -34
  139. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
  140. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTool.ts +0 -64
  141. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTools.ts +0 -56
  142. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
  143. package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
  144. package/dist/scaffolds/notis-journal/packages/sdk/src/index.ts +0 -100
  145. package/dist/scaffolds/notis-journal/packages/sdk/src/provider.tsx +0 -43
  146. package/dist/scaffolds/notis-journal/packages/sdk/src/runtime.ts +0 -351
  147. package/dist/scaffolds/notis-journal/packages/sdk/src/styles.css +0 -186
  148. package/dist/scaffolds/notis-journal/packages/sdk/src/ui.ts +0 -15
  149. package/dist/scaffolds/notis-journal/packages/sdk/src/vite.ts +0 -56
  150. package/dist/scaffolds/notis-journal/packages/sdk/tsconfig.json +0 -15
  151. package/dist/scaffolds/notis-journal/postcss.config.mjs +0 -8
  152. package/dist/scaffolds/notis-journal/skills/journal-onboarding/SKILL.md +0 -120
  153. package/dist/scaffolds/notis-journal/src/dev-main.tsx +0 -58
  154. package/dist/scaffolds/notis-journal/src/mock-runtime.ts +0 -199
  155. package/dist/scaffolds/notis-journal/tailwind.config.ts +0 -58
  156. package/dist/scaffolds/notis-journal/tsconfig.json +0 -23
  157. package/dist/scaffolds/notis-journal/vite.config.ts +0 -10
  158. package/dist/scaffolds/notis-notes/CHANGELOG.md +0 -5
  159. package/dist/scaffolds/notis-notes/app/globals.css +0 -3
  160. package/dist/scaffolds/notis-notes/app/layout.tsx +0 -6
  161. package/dist/scaffolds/notis-notes/app/page.tsx +0 -1943
  162. package/dist/scaffolds/notis-notes/app/phosphor-icons.ts +0 -596
  163. package/dist/scaffolds/notis-notes/components/ui/badge.tsx +0 -28
  164. package/dist/scaffolds/notis-notes/components/ui/button.tsx +0 -53
  165. package/dist/scaffolds/notis-notes/components/ui/card.tsx +0 -56
  166. package/dist/scaffolds/notis-notes/components.json +0 -20
  167. package/dist/scaffolds/notis-notes/lib/utils.ts +0 -6
  168. package/dist/scaffolds/notis-notes/lib/visible-properties.ts +0 -144
  169. package/dist/scaffolds/notis-notes/metadata/screenshot-1.png +0 -0
  170. package/dist/scaffolds/notis-notes/metadata/screenshot-2.png +0 -0
  171. package/dist/scaffolds/notis-notes/metadata/screenshot-3.png +0 -0
  172. package/dist/scaffolds/notis-notes/metadata/screenshot-4.png +0 -0
  173. package/dist/scaffolds/notis-notes/metadata/screenshot-5.png +0 -0
  174. package/dist/scaffolds/notis-notes/metadata/screenshot-fixtures.json +0 -752
  175. package/dist/scaffolds/notis-notes/notis.config.ts +0 -80
  176. package/dist/scaffolds/notis-notes/package-lock.json +0 -4636
  177. package/dist/scaffolds/notis-notes/package.json +0 -35
  178. package/dist/scaffolds/notis-notes/packages/sdk/package.json +0 -36
  179. package/dist/scaffolds/notis-notes/packages/sdk/src/components/DocumentEditor.tsx +0 -93
  180. package/dist/scaffolds/notis-notes/packages/sdk/src/components/Markdown.tsx +0 -60
  181. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
  182. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
  183. package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
  184. package/dist/scaffolds/notis-notes/packages/sdk/src/config.ts +0 -234
  185. package/dist/scaffolds/notis-notes/packages/sdk/src/documents.ts +0 -250
  186. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useBackend.ts +0 -41
  187. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
  188. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
  189. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
  190. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocument.ts +0 -78
  191. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocuments.ts +0 -121
  192. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useHandover.ts +0 -75
  193. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
  194. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotis.ts +0 -34
  195. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
  196. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTool.ts +0 -64
  197. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTools.ts +0 -56
  198. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
  199. package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
  200. package/dist/scaffolds/notis-notes/packages/sdk/src/index.ts +0 -100
  201. package/dist/scaffolds/notis-notes/packages/sdk/src/provider.tsx +0 -43
  202. package/dist/scaffolds/notis-notes/packages/sdk/src/runtime.ts +0 -351
  203. package/dist/scaffolds/notis-notes/packages/sdk/src/styles.css +0 -186
  204. package/dist/scaffolds/notis-notes/packages/sdk/src/ui.ts +0 -15
  205. package/dist/scaffolds/notis-notes/packages/sdk/src/vite.ts +0 -56
  206. package/dist/scaffolds/notis-notes/packages/sdk/tsconfig.json +0 -15
  207. package/dist/scaffolds/notis-notes/postcss.config.mjs +0 -8
  208. package/dist/scaffolds/notis-notes/tailwind.config.ts +0 -58
  209. package/dist/scaffolds/notis-notes/tsconfig.json +0 -23
  210. package/dist/scaffolds/notis-notes/vite.config.ts +0 -10
  211. package/dist/scaffolds/notis-random/CHANGELOG.md +0 -15
  212. package/dist/scaffolds/notis-random/README.md +0 -33
  213. package/dist/scaffolds/notis-random/app/globals.css +0 -11
  214. package/dist/scaffolds/notis-random/app/history/page.tsx +0 -67
  215. package/dist/scaffolds/notis-random/app/layout.tsx +0 -7
  216. package/dist/scaffolds/notis-random/app/page.tsx +0 -289
  217. package/dist/scaffolds/notis-random/components/ui/button.tsx +0 -50
  218. package/dist/scaffolds/notis-random/components/ui/card.tsx +0 -16
  219. package/dist/scaffolds/notis-random/components/ui/input.tsx +0 -23
  220. package/dist/scaffolds/notis-random/components.json +0 -20
  221. package/dist/scaffolds/notis-random/index.html +0 -12
  222. package/dist/scaffolds/notis-random/lib/notis-tools.ts +0 -128
  223. package/dist/scaffolds/notis-random/lib/rng.ts +0 -202
  224. package/dist/scaffolds/notis-random/lib/roll-record.ts +0 -189
  225. package/dist/scaffolds/notis-random/lib/utils.ts +0 -25
  226. package/dist/scaffolds/notis-random/metadata/screenshot-1.png +0 -0
  227. package/dist/scaffolds/notis-random/metadata/screenshot-2.png +0 -0
  228. package/dist/scaffolds/notis-random/metadata/screenshot-3.png +0 -0
  229. package/dist/scaffolds/notis-random/metadata/screenshot-4.png +0 -0
  230. package/dist/scaffolds/notis-random/metadata/screenshot-5.png +0 -0
  231. package/dist/scaffolds/notis-random/metadata/screenshot-fixtures.json +0 -753
  232. package/dist/scaffolds/notis-random/notis.config.ts +0 -86
  233. package/dist/scaffolds/notis-random/package-lock.json +0 -4513
  234. package/dist/scaffolds/notis-random/package.json +0 -36
  235. package/dist/scaffolds/notis-random/packages/sdk/package.json +0 -36
  236. package/dist/scaffolds/notis-random/packages/sdk/src/components/DocumentEditor.tsx +0 -93
  237. package/dist/scaffolds/notis-random/packages/sdk/src/components/Markdown.tsx +0 -60
  238. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
  239. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
  240. package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
  241. package/dist/scaffolds/notis-random/packages/sdk/src/config.ts +0 -234
  242. package/dist/scaffolds/notis-random/packages/sdk/src/documents.ts +0 -250
  243. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useBackend.ts +0 -41
  244. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
  245. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
  246. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
  247. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocument.ts +0 -78
  248. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocuments.ts +0 -121
  249. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useHandover.ts +0 -75
  250. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
  251. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotis.ts +0 -34
  252. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
  253. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTool.ts +0 -64
  254. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTools.ts +0 -56
  255. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
  256. package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
  257. package/dist/scaffolds/notis-random/packages/sdk/src/index.ts +0 -100
  258. package/dist/scaffolds/notis-random/packages/sdk/src/provider.tsx +0 -43
  259. package/dist/scaffolds/notis-random/packages/sdk/src/runtime.ts +0 -351
  260. package/dist/scaffolds/notis-random/packages/sdk/src/styles.css +0 -186
  261. package/dist/scaffolds/notis-random/packages/sdk/src/ui.ts +0 -15
  262. package/dist/scaffolds/notis-random/packages/sdk/src/vite.ts +0 -56
  263. package/dist/scaffolds/notis-random/packages/sdk/tsconfig.json +0 -15
  264. package/dist/scaffolds/notis-random/postcss.config.mjs +0 -6
  265. package/dist/scaffolds/notis-random/src/dev-main.tsx +0 -70
  266. package/dist/scaffolds/notis-random/src/mock-runtime.ts +0 -129
  267. package/dist/scaffolds/notis-random/tailwind.config.ts +0 -50
  268. package/dist/scaffolds/notis-random/tsconfig.json +0 -23
  269. package/dist/scaffolds/notis-random/vite.config.ts +0 -11
  270. package/dist/scaffolds.json +0 -49
@@ -23,12 +23,15 @@ All Notis apps are built using the Notis CLI, either locally in a repo workspace
23
23
  ## App Workspace Tool Rules
24
24
 
25
25
  - Apps are the top-level packaging unit in Notis.
26
- - Use `LOCAL_NOTIS_CREATE_APP` to register a new app, then use the Notis CLI in the shell to build and deploy it.
26
+ - Use `apps dev [folder]` to register a new local app for development. After the
27
+ user tests it and explicitly asks to deploy, `apps deploy` promotes that DEV
28
+ app in place. Use `LOCAL_NOTIS_CREATE_APP` only for non-CLI administrative
29
+ flows that explicitly require a server-side app row.
27
30
  - Use `LOCAL_NOTIS_UPDATE_APP` to update app metadata.
28
31
  - Use `LOCAL_NOTIS_LIST_APPS` to discover the user's apps.
29
32
  - The full app lifecycle uses the CLI in the shell. Always run it through the registry-resolved package, for example `npx --package @notis_ai/cli@latest -- notis apps init`; use the same prefix for `build` and `deploy`. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`.
30
33
  - There are no `save_app` or `load_app` tools. Do not attempt to call them. Use only the CLI for app file operations.
31
- - Use `npx --package @notis_ai/cli@latest -- notis apps scaffolds list` to discover bundled starting points before scaffolding.
34
+ - Use `npx --package @notis_ai/cli@latest -- notis apps scaffolds list` (optionally with `--search <term>`) to discover starting points before scaffolding. Every published Store app is a scaffold; the catalog is served from the public registry, not bundled inside the CLI.
32
35
  - Use `LOCAL_NOTIS_LIST_PUBLIC_APP_STORE` only to help users choose apps to install, not as a source-clone workflow.
33
36
  - Use `LOCAL_NOTIS_INSTALL_APP` only when the user explicitly wants to install from a listing.
34
37
  - Before installing, inspect the listing's `required_capabilities`. Explain each
@@ -52,7 +55,8 @@ Notis CLI (local workspace or Vercel Sandbox)
52
55
  ### Key Components
53
56
 
54
57
  1. **@notis/sdk** (`packages/sdk/`) -- SDK for app developers
55
- - `@notis/sdk` -- NotisProvider and generic runtime hooks such as useTool and useTools
58
+ - `@notis/sdk` -- NotisProvider, runtime hooks, editors, selection helpers, and shortcut primitives
59
+ - `@notis/sdk/interactions` -- headless collection actions and interaction types
56
60
  - `@notis/sdk/config` -- `defineNotisApp()` for notis.config.ts
57
61
  - `@notis/sdk/vite` -- `notisViteConfig()` for vite.config.ts
58
62
  - `@notis/sdk/styles.css` -- shadow-safe app shell styles and base app-surface classes
@@ -93,15 +97,16 @@ App code never accesses the runtime directly -- it uses SDK hooks (`useTool`, `u
93
97
  12. **Portal-owned sidebars stay portal-owned** -- If a route uses `collection.sidebar`, treat that sidebar as platform chrome. Do not remove it, recreate it inside app JSX, or replace it with a custom in-app folder rail.
94
98
  13. **Portal globals are off-limits** -- Never use `window.__NOTIS_RUNTIME__`, query portal-owned DOM hooks, or create global DOM portals.
95
99
  14. **Prefer inline optimistic edits** -- Rename-like edits for collections, app-owned rows, and sidebar-backed entities should use inline editing with an optimistic UI update, then roll back on backend failure. Use modals only when the edit requires multiple fields or destructive confirmation.
96
- 15. **Local development first; deploy is user-gated** -- Iterate with `apps dev` and let the **user** test the app in the desktop **Local development** sidebar group. Do NOT run `apps create` or `apps deploy` on your own initiative, even after a clean build and verify. `deploy` installs the app onto the user's account and is a one-directional, outward-facing action — treat it like publishing: only run it when the user has tested the local build and **explicitly asks you to deploy**. Building a new app end-to-end without deploying is the expected, complete outcome. (See the **Local-development-first handoff** in the Workflow.)
97
- 16. **Installed app links are explicit** -- A mounted dev session updates an installed workspace app only when the local checkout is linked by app id in `.notis/state.json` and the dev-session registry mirrors that id. Name or slug matches may be suggestions, never update targets. After first install, keep that link so Portal and CLI show/update the same app instead of creating duplicates.
98
- 17. **Development identities stay separate** -- `.notis/state.json` uses `dev_app_id` for the hidden development-runtime row and `app_id` only for an accessible installed workspace app. The Electron registry mirrors the installed id as `targetAppId`. Never pass a runtime app whose manifest has `is_dev: true` to `notis apps link`; it is not an install/update target. Current CLIs reject that link and repair stale hidden, deleted, or inaccessible targets on the next `apps dev` without erasing valid state on transport or authentication failures.
99
- 18. **Mounted means Portal-acknowledged** -- A running process or HTTP 200 proves only that the app is serving. Before telling the user an app is mounted, require the current `apps dev` process to report `Mounted in <target desktop>`. The CLI selects the target from the active Notis profile: normal CLI runs target the signed-in Notis or Notis Beta desktop, while a CLI running inside an active Notis source workspace targets that workspace's matching desktop instance. The exact session/app/slug/nonce acknowledgment is accepted only from the visible target window after the app enters its final **Local development** sidebar model. Route rendering is a separate proof: when UI verification is required, also open the app and require `Rendered in <target desktop>`.
100
+ 15. **Local development first; deploy is user-gated** -- Run `apps dev [folder]` once to register the root, then let the **user** test the automatically mounted app in its Workspace entry (compact `DEV` badge). The registration and host survive the command; no terminal must remain open. Do NOT run `apps create` or `apps deploy` on your own initiative, even after a clean build and verify. Building through local testing without deploying is the expected, complete outcome.
101
+ 16. **Installed app identity is exact and profile-scoped** -- Identity precedence is: explicit persisted link for this API/user profile; one accessible non-development app with the exact canonical slug; isolated development runtime. Persist one unique exact-slug match, fail closed on ambiguity, and never infer from display name. After first install, keep the profile-scoped link so Portal and CLI update the same app instead of creating duplicates.
102
+ 17. **Development identities stay separate** -- `.notis/state.json` uses `dev_app_id` for the hidden development-runtime row and `app_id` only for an accessible installed workspace app, scoped under the authenticated environment. Never pass a runtime app whose manifest has `is_dev: true` to `notis apps link`.
103
+ 18. **Automatic mounts are multi-instance and least-authority** -- Prod, Beta, and source-development Desktop instances may mount the same source simultaneously with independent authenticated runtimes. Automatic mounting never grants capabilities: reuse existing grants and leave restricted capabilities denied until approved. Consumer leases expire after crashes so the shared host exits after the last live instance. There are no offline rows or manual start/stop controls.
100
104
  19. **Store submission is user-gated** -- Run `apps publish --confirm-ready` only after the user explicitly confirms the current App Details page and Store listing are ready. Deploy the exact approved local state first. The command must reject missing confirmation, incomplete listing media, a local/deployed version mismatch, private visibility, or an existing pending review.
101
105
  20. **Bump `notisAppVersion` for every Store update** -- `package.json` must contain a semver `notisAppVersion`. For an existing Store app, increment it beyond the currently published registry version before deploy and submission; registry CI rejects equal or lower versions.
102
106
  21. **`CHANGELOG.md` owns release history** -- Keep the complete release history in one root `CHANGELOG.md`, newest entry first. Do not add new `versionNotes` values to `notis.config.ts`. Use `## [Release title] - YYYY-MM-DD`, or `{PR_MERGE_DATE}` for an unpublished entry. App Details reads **What’s New** and **Version History** from the deployed package manifest, while the Store reads them from the latest published snapshot; unpublished workspace edits must never change the Store page. The manifest also exposes `package.json` `notisAppVersion` as the package version shown in App Details.
103
107
  22. **Database rows are private unless explicitly seeded** -- A string declaration such as `databases: ['notes']` publishes schema only and never includes the developer's rows. Use `{ slug: 'templates', seedDocuments: true }` only for small, intentional starter content that every installer should receive. Never enable it for user-created notes, history, leads, or other personal data.
104
108
  23. **Public submissions are complete, reviewable packages** -- The registry PR must contain the full editable source tree, Store assets, exact source-declared database schemas, and only explicitly seeded starter rows. Registry CI validates those boundaries before merge; do not hand-edit `notis-listing.json` or strip source files to make a check pass. Fix the app locally, redeploy, and resubmit.
109
+ 24. **New projects land in `~/.notis/apps/<slug>`, and `[dir]` overrides it** -- `apps init` and `apps pull` default to that root, the same well-known home the desktop uses for synced skills (`~/.notis/skills`), so a project nobody deliberately placed is always findable and never depends on where the shell happened to be sitting. Pass `[dir]` whenever the app belongs somewhere specific -- a git repo the user tracks, an existing monorepo's `apps/<name>/`, or a path the user named -- and tell the user which location you used. Never place a project inside the Notis source repo or a Conductor worktree: every later CLI call from that directory resolves the worktree's local dev runtime (`.context/notis-runtime.json`) instead of the user's real profile.
105
110
 
106
111
  ## Anti-patterns -- NEVER do these
107
112
 
@@ -109,7 +114,7 @@ These are the most common mistakes agents make. Each one wastes time and produce
109
114
 
110
115
  - **NEVER assume app deploys create databases for you** -- Create or update databases through native Notis database tools or the assistant first, then reference them by slug in `notis.config.ts`. Database creation requires the owning app to exist: pass its slug or id in the `app` argument of `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` (create the app first with `LOCAL_NOTIS_CREATE_APP` if needed). A database can only be referenced by the app that owns it.
111
116
  - **NEVER bypass the supported workflow by manually stitching together low-level save or lint calls from a local workspace** -- Local agents should go through the NPX Notis CLI for `apps pull`, `apps dev`, `apps build`, `apps verify`, `apps create`, `apps link`, and `apps deploy`.
112
- - **NEVER invent a Store clone path** -- `npx --package @notis_ai/cli@latest -- notis apps pull` only pulls source for an app the user can already access as an installed app. Pulling source directly from arbitrary Store listings is not supported yet.
117
+ - **NEVER use `apps pull` to clone a Store listing** -- `npx --package @notis_ai/cli@latest -- notis apps pull` only pulls source for an app the user can already access as an installed app. To fork a published Store app, run `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>` instead: it downloads that app's source from the public registry, and installing the app first is not required.
113
118
  - **NEVER deploy on your own initiative** -- A clean `apps build` + `apps verify` is NOT a signal to deploy. `apps create` / `apps deploy` install the app onto the user's account; run them only after the user has tested the local (`apps dev`) build and explicitly asked you to deploy. When you finish building, hand off for local testing and stop — do not create or deploy unprompted.
114
119
  - **NEVER submit without explicit approval** -- A deploy request alone does not authorize Store submission. Run `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready` only when the user confirms App Details is ready for Store review.
115
120
  - **NEVER write raw `views/<slug>/index.js` files** -- Write standard React pages in `app/`.
@@ -122,21 +127,21 @@ These are the most common mistakes agents make. Each one wastes time and produce
122
127
 
123
128
  ## Workflow
124
129
 
125
- **Default to the bundled scaffold catalog, not a blank project.** Most user requests overlap with one of the scaffolds shipped inside the CLI. Starting from a bundled scaffold is faster than a bare app and does not require backend Store access.
130
+ **Default to the Store scaffold catalog, not a blank project.** Every published Store app is a scaffold: `notis apps scaffolds list` reads the catalog from the public registry, and `notis apps init --from <slug>` downloads that app's source. Most user requests overlap with a published app, and starting from one is faster than a bare app.
126
131
 
127
- 1. **Find a starting point.** Run `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`. If something close matches, run `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>`. Only run plain `npx --package @notis_ai/cli@latest -- notis apps init "My App"` when no scaffold fits.
128
- 2. **Pull only installed apps.** If the user explicitly wants to fork an app they already installed, run `npx --package @notis_ai/cli@latest -- notis apps list`, then `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> ./<dir>`. To fork a Store app that is not installed, tell the user to install it from `/store` first.
132
+ 1. **Find a starting point.** Run `npx --package @notis_ai/cli@latest -- notis apps scaffolds list` (add `--search <term>` to filter) to list the published Store apps. If something close matches, run `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>` to download that app's source from the registry. Only run plain `notis apps init "My App"` when no published app fits. Either way the project lands in `~/.notis/apps/<slug>`; add a `[dir]` argument when the user wants it somewhere else (a tracked git repo, an existing monorepo), and report the path you used.
133
+ 2. **Pull your own apps; fork Store apps with `--from`.** `apps pull` is for apps the user already has installed or deployed: run `npx --package @notis_ai/cli@latest -- notis apps list`, then `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>` (lands in `~/.notis/apps/<app-slug>`; pass a `[dir]` argument to place it elsewhere). To fork a published Store app, use `apps init --from <slug>` instead -- it downloads the source from the registry and does not require installing the app first.
129
134
  3. **Edit the listing source.** Update `name` (slug), `title`, description, icon, accent, author, categories, tagline, databases, routes, and tools in `notis.config.ts`. Declare a database as a string for schema-only Store packaging; use `{ slug: 'templates', seedDocuments: true }` only when its rows are deliberate starter content for every installer. Keep the complete Store release history in the root `CHANGELOG.md`, newest entry first, using `## [Release title] - YYYY-MM-DD` (or `{PR_MERGE_DATE}` before publication). The first entry powers **What’s New** and the same file powers **Version History**. `icon` is a `phosphor:<name>` value or `metadata/icon.png`; when unset the app shows its **two-letter initials** everywhere (store, sidebar, app details). `accent` optionally pins the avatar color to one of `blue|violet|emerald|amber|rose|sky|fuchsia|teal` (default derived from the app id). Icon/accent flow through deploy onto the app row + listing and can also be set later via the `update_app` tool.
130
135
  4. **Build pages in `app/`.** Reuse scaffold code wherever it fits.
131
- 5. **Iterate live.** Run `npx --package @notis_ai/cli@latest -- notis apps dev` so the target desktop's **Local development** sidebar group discovers the app and renders the local bundle. Keep this command running for as long as the user is testing; stopping it removes the temporary Local development entry. Read the command's `Target desktop` line instead of guessing between Notis, Notis Beta, or a source-workspace desktop. Add `--live-data` to point the session at the installed app's real databases instead of its own empty dev copies -- it applies to that session only, and warns and falls back when the app has not been deployed yet.
132
- 6. **Capture listing screenshots.** Declare 3–6 screenshots in `notis.config.ts`, each with a stable `path`, descriptive `alt`, and optional `route`/`scenario`/`focus`/`theme`, then run `npx --package @notis_ai/cli@latest -- notis apps screenshot`. Use `focus` to frame a real app root without empty browser canvas; use `theme: 'light'` or `theme: 'dark'` to match both the Portal render and Store backdrop, and pair both modes when that best represents the app. It renders the configured states in a headless harness and writes exact 2000x1250 PNGs under `metadata/`, using the deterministic Store presentation by default (`--raw` is diagnostic only). Apps are icon-led like Raycast — the icon set in `notis.config.ts` represents the app, so there is no cover image, only these screenshots. Never hand-author the PNGs; regenerate them when routes or UI change.
133
- 7. **Verify locally.** Run `npm install`, then `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps verify`. Surface the verify report and fix failures.
134
- 8. **Local-development-first handoff — STOP HERE.** Keep `apps dev` running and hand off to the user: tell them the app is live in the target desktop's **Local development** sidebar group (green `DEV` badge) and ask them to test it there. Building a new app to this point, without deploying, is a **complete and expected** result. Do NOT proceed to `apps create` / `apps deploy` yet — wait for the user to test and explicitly ask to deploy. (`apps dev` is what puts the app in Local development; without a running session the app never appears there.) **Before handing off, complete all three acceptance checks:**
135
- 1. Target: capture the CLI's `Target desktop: <name>` line and make sure that exact desktop app is running and signed in.
136
- 2. Bundle: the reported loopback `/snapshot` URL responds successfully and contains the expected manifest/routes.
137
- 3. Mount and render: require `Mounted in <target desktop>: <app name>`. If the task includes UI or runtime behavior, open the default route and also require `Rendered in <target desktop>: <app name>`. If the CLI says only `Serving locally`, do not claim the app is mounted.
138
- See Troubleshooting → *App is missing from Local development* if any check fails.
139
- 9. **Deploy only when the user asks.** Once the user has tested locally and explicitly requests a deploy, run `npx --package @notis_ai/cli@latest -- notis apps create "<name>" .` (first time) then `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`, or link first with `npx --package @notis_ai/cli@latest -- notis apps link <id> .` / pass `--app-id <id>` for an existing app. Deploy installs or updates the app on the user's account (it appears under **Workspace**, not Local development). After first install, `.notis/state.json` must point at the installed app id so future local-dev actions become **Update**, not another **Install**.
136
+ 5. **Iterate live.** Run `npx --package @notis_ai/cli@latest -- notis apps dev [folder]` once. It permanently registers the root; `~/.notis/apps` is already implicit. Running Desktop instances discover the root itself, direct app children, and `apps/*`, then mount each successful build automatically in Workspace. Source edits hot-reload only that app in every instance. Add `--scratch` for isolated empty resources when the work needs fixtures or destructive experiments.
137
+ 6. **Capture listing screenshots.** Declare 3–6 screenshots in `notis.config.ts`, each with a stable `path`, descriptive `alt`, and optional `route`/`scenario`/`focus`/`theme`, then run `npx --package @notis_ai/cli@latest -- notis apps screenshot`. Use `focus` to frame a real app root without empty browser canvas; use `theme: 'light'` or `theme: 'dark'` to match both the Portal render and Store backdrop, and pair both modes when that best represents the app. It renders the configured states in a headless harness and writes exact 2000x1250 PNGs under `metadata/`, using the deterministic Store presentation by default (`--raw` is diagnostic only). Apps are icon-led like Raycast — the icon set in `notis.config.ts` represents the app, so there is no cover image, only these screenshots. Never hand-author the PNGs; regenerate them when routes or UI change. A `scenario` names an entry in `metadata/screenshot-fixtures.json`; besides `actions` it may carry its own `tools` and `requests`, shallow-merged per key over the file-level ones for that capture, which is how the same route is shown both populated and in its first-run empty state.
138
+ 7. **Verify locally.** Run `npm install`, then `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps verify`. Surface the verify report and fix failures. Incomplete listing media is only a `Store readiness:` warning there; run `notis apps verify --listing` before publish to make it a failure.
139
+ 8. **Local-development-first handoff — STOP HERE.** Hand off after the user can see and test the app in its DEV-badged Workspace row. Building a new app to this point, without deploying, is a **complete and expected** result. Do NOT proceed to `apps create` / `apps deploy` yet. **Before handing off, complete all three acceptance checks:**
140
+ 1. Root: `apps roots list` contains the intended folder (or the app is under the implicit default root).
141
+ 2. Bundle: the loopback `/snapshot` responds successfully and contains the expected manifest/routes.
142
+ 3. Mount and render: the app appears exactly once with a compact `DEV` badge and its default route renders. For multi-instance work, verify each requested Desktop independently.
143
+ See Troubleshooting → *App is missing from the sidebar* if any check fails.
144
+ 9. **Deploy only when the user asks.** Once the user has tested locally and explicitly requests a deploy, run `npx --package @notis_ai/cli@latest -- notis apps deploy`. A first deploy promotes the development app in place; do not create a second app or use `--direct`. For an existing remote app, link first with `npx --package @notis_ai/cli@latest -- notis apps link <id> .` and then deploy. After first install, `.notis/state.json` must point at that same promoted app id so future local-dev actions become **Update**, not another **Install**.
140
145
  10. **Submit only after confirmation.** When the user explicitly confirms the current App Details page is ready, ensure the approved state is deployed, then run `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`. The command submits Team apps immediately or opens the Public Store registry review PR. Without that confirmation, stop after deploy.
141
146
 
142
147
  ### Quick start
@@ -144,50 +149,54 @@ These are the most common mistakes agents make. Each one wastes time and produce
144
149
  Steps 1–3 are the agent's job on a build request. Step 4 is **user-gated** — do not run it until the user has tested the local build and asked you to deploy.
145
150
 
146
151
  ```bash
147
- # 1. Pick a scaffold and scaffold
152
+ # 1. Pick a published Store app as the scaffold (catalog comes from the public registry)
153
+ # The project lands in ~/.notis/apps/<slug>; append a directory argument when
154
+ # the user wants the app in a repo they track.
148
155
  npx --package @notis_ai/cli@latest -- notis apps scaffolds list
149
- npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <scaffold-slug>
150
- cd my-app
156
+ npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>
157
+ cd ~/.notis/apps/my-app
151
158
  npm install
152
159
 
153
160
  # 2. Develop against the Electron Portal, then HAND OFF for the user to test.
154
- # Keep this running — it is what surfaces the app in the Local development
161
+ # Keep this running — it is what substitutes the local build into the app's
155
162
  # sidebar group. This is the finish line for a build request.
156
163
  npx --package @notis_ai/cli@latest -- notis apps dev
157
- # ... iterate until the app looks right in the Local development sidebar group ...
164
+ # ... iterate until the app looks right in its Workspace entry (DEV badge) ...
158
165
 
159
166
  # 3. Build, capture listing screenshots, and verify (still local — no deploy)
160
167
  npx --package @notis_ai/cli@latest -- notis apps build
161
168
  npx --package @notis_ai/cli@latest -- notis apps screenshot
162
169
  npx --package @notis_ai/cli@latest -- notis apps verify
163
170
 
164
- # 4. ONLY after the user tested locally and asked to deploy: create + deploy.
165
- # This writes .notis/state.json so future deploys update this app.
166
- npx --package @notis_ai/cli@latest -- notis apps create "My App" .
167
- npx --package @notis_ai/cli@latest -- notis apps deploy --direct
171
+ # 4. ONLY after the user tested locally and asked to deploy. First deploy
172
+ # promotes the dev app in place and writes the installed link.
173
+ npx --package @notis_ai/cli@latest -- notis apps deploy
168
174
 
169
175
  # 5. ONLY after the user explicitly confirms App Details is ready for Store review
170
176
  npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready
171
177
  ```
172
178
 
173
- If deploying to an existing app without linking first, pass `--app-id` directly. Prefer linking when this checkout will keep being used for development:
179
+ For an existing app, link the checkout first so every later command uses the
180
+ same profile-scoped installed identity:
174
181
 
175
182
  ```bash
176
183
  npx --package @notis_ai/cli@latest -- notis apps link <app-id> .
177
- npx --package @notis_ai/cli@latest -- notis apps deploy --direct --app-id <app-id>
184
+ npx --package @notis_ai/cli@latest -- notis apps deploy
178
185
  ```
179
186
 
180
187
  Or if editing an installed app:
181
188
 
182
189
  ```bash
183
190
  npx --package @notis_ai/cli@latest -- notis apps list
184
- npx --package @notis_ai/cli@latest -- notis apps pull <installed-app-id> ./my-app
185
- cd my-app
191
+ npx --package @notis_ai/cli@latest -- notis apps pull <installed-app-id>
192
+ cd ~/.notis/apps/my-app
186
193
  npm install
187
194
  npx --package @notis_ai/cli@latest -- notis apps dev
188
195
  npx --package @notis_ai/cli@latest -- notis apps build
189
196
  npx --package @notis_ai/cli@latest -- notis apps verify
190
- npx --package @notis_ai/cli@latest -- notis apps deploy --direct --app-id <existing-app-id>
197
+ npx --package @notis_ai/cli@latest -- notis apps link <installed-app-id> .
198
+ # Only after the user explicitly asks to deploy:
199
+ npx --package @notis_ai/cli@latest -- notis apps deploy
191
200
  ```
192
201
 
193
202
  ## Building an App
@@ -310,7 +319,7 @@ Do NOT pass Notion-style wrappers (`{select: {name: "Todo"}}`) when upserting.
310
319
 
311
320
  - When a user asks for folders, sections, or hierarchy in the app sidebar, express that through `routes` and `collection.sidebar` in `notis.config.ts`.
312
321
  - Treat an existing collection-tree sidebar as a locked structural requirement unless the user explicitly asks to change navigation architecture.
313
- - If the sidebar appears missing in the Local development sidebar group or deployed portal build, do not silently redesign around it. Preserve the manifest contract, call out the discrepancy, and treat it as a portal/runtime bug.
322
+ - If the sidebar appears missing for the substituted DEV entry or deployed portal build, do not silently redesign around it. Preserve the manifest contract, call out the discrepancy, and treat it as a portal/runtime bug.
314
323
 
315
324
  ### Step 3: Root layout
316
325
 
@@ -430,19 +439,46 @@ the public `app-listing-assets` bucket before submission.
430
439
 
431
440
  ## SDK Hook Reference
432
441
 
433
- All hooks are imported from `@notis/sdk`:
442
+ All hooks and components below are imported from `@notis/sdk`. `NotisProvider`
443
+ already installs `ShortcutProvider`; app code should not add a second provider.
434
444
 
435
- | Hook | Signature | Description |
436
- |------|-----------|-------------|
445
+ | API | Signature | Description |
446
+ |-----|-----------|-------------|
437
447
  | `useNotis()` | `() => { app, route, context, ready }` | App metadata, current route, generic portal context, ready state |
438
- | `useTool<TArgs, TResult>(name)` | `(name: string) => { call, loading, error }` | Call a specific tool by name with app-defined argument and result types |
448
+ | `useTool<TArgs, TResult>(name)` | `(name: string) => { call, loading, error }` | Call a declared tool with app-defined argument/result types. Identical idempotent reads may use `call(args, { dedupe: true })`; never dedupe writes |
439
449
  | `useTools()` | `() => { tools, loading }` | List available tools |
440
450
  | `useNotisNavigation()` | `() => { toRoute, toDocument, toApp }` | Navigate between routes, documents, or the app root |
441
451
  | `useTopBarSearch(opts)` | `({ value, onChange, placeholder?, onSubmit? }) => { setLoading }` | Bind the current view to the Portal-owned top-bar search input |
442
452
  | `useBackend()` | `() => { request }` | Raw backend request proxy with JWT auth |
443
453
  | `useDatabaseSubscription(slug, opts?)` | `(slug: string, opts?) => { rows, documents, loading, error, refetch, live }` | Query a database and refetch it when its rows change. `live` is false on hosts without a change feed (dev harness, vite preview) -- keep a manual refresh for those |
444
- | `useHandover()` | `() => { handover, pending, error, available }` | Hand a prompt (optionally bound to a declared skill) to the Notis manager chat, which owns progress, billing and cancellation. `available` is false on hosts with no chat -- fall back to a copyable prompt |
454
+ | `useHandover()` | `() => { handover, pending, error, available }` | Open manager chat with app/resource context plus an optional starter prompt or declared skill. Omit `prompt` for a context-only composer. `available` is false on hosts with no chat -- fall back to a copyable prompt |
445
455
  | `useCloudComputer()` | `() => { facts, loading, error, refresh }` | Read-only cloud computer facts: sandbox existence/status and whether the GitHub CLI is signed in. Requires `capabilities.cloudComputer: 'read'` plus the user's approval; `facts.available === false` means answer from the app's own fallback |
456
+ | `useActiveResource(resource)` | `(ContextResource \| null) => void` | Publish the record currently open in the app so manager handover and context menus stay grounded |
457
+ | `useCollectionInteractions(opts)` | `(opts) => CollectionInteractionController` | Keyboard navigation, active-row state, range/toggle selection, marquee selection, and action dispatch for collection UIs |
458
+ | `useShortcuts(definitions, opts?)` | `(definitions, opts?) => void` | Register scoped keyboard shortcuts. Editable targets are ignored unless explicitly allowed; use `ShortcutHints` to display them |
459
+ | `MarkdownEditor` | `(NotisMarkdownEditorProps) => ReactElement` | Use the host editor with app-owned persistence, stable `resourceKey`, revision-aware `onSave`, and optional `onUploadFile` returning a durable URL |
460
+ | `NotisSelectionBoundary` | `(NotisSelectionBoundaryProps) => ReactElement` | Attach structured, explicitly untrusted app/resource/selection context to selected content and copy operations |
461
+ | `SelectionCheckbox` / `SelectionMarquee` | components | Standard selection controls backed by `useCollectionInteractions` |
462
+ | `MultiSelectActionBar` | component | Standard bulk actions with pending/disabled state and shortcut support |
463
+
464
+ Import headless collection action types and helpers from
465
+ `@notis/sdk/interactions`. Keep an open detail view synchronized with
466
+ `useActiveResource`, and wrap its selectable content in
467
+ `NotisSelectionBoundary` so the manager receives both the active record and the
468
+ user's exact selection. For `MarkdownEditor`, keep `resourceKey` stable per
469
+ record, pass the latest revision back from `onSave`, reject revision conflicts
470
+ instead of overwriting newer data, and implement `onUploadFile` whenever the
471
+ editor should accept media or file blocks.
472
+
473
+ ### App configuration additions
474
+
475
+ - `devSlug` is the stable local-development identity. Set it when a display
476
+ rename must not create a second DEV app; otherwise the CLI derives it from
477
+ `name`.
478
+ - `toolBindings` is only for provider-generated public tool names whose upstream
479
+ action cannot be reconstructed. Keep the exact final public `name` in
480
+ `tools`, then bind it to `providerToolName`; the public name remains the
481
+ permission boundary.
446
482
 
447
483
  ### Typed tool calls
448
484
 
@@ -473,28 +509,18 @@ const result = await queryTasks.call({ database_id: 'tasks-db-id', query: { page
473
509
  npx --package @notis_ai/cli@latest -- notis apps dev
474
510
  ```
475
511
 
476
- Runs the real desktop-local development workflow. The CLI should discover all apps in the target workspace, serve their bundles from loopback, and surface them in the Electron Portal's Local development sidebar group through the local desktop session registry.
477
-
478
- ## Deploy Without Backend Server
479
-
480
- If the live API is unreachable, use `--direct`:
481
-
482
- ```bash
483
- npx --package @notis_ai/cli@latest -- notis apps deploy --direct
484
- ```
485
-
486
- This uploads the bundle and editable source snapshot directly to Supabase storage and updates the app manifest in the database, bypassing the API server. The CLI auto-falls back to direct mode on network errors. Localhost backends are reserved for `/notis-tests` via `./dev.sh`; do not retarget the personal CLI lane at loopback from this skill.
512
+ Runs the real desktop-local development workflow. The CLI should discover all apps in the target workspace, serve their bundles from loopback, and surface them in the Electron Portal's Workspace group each substituted for its installed entry, or appended while unpublished — through the local desktop session registry.
487
513
 
488
514
  ## Testing
489
515
 
490
516
  1. **Build validation**: `npx --package @notis_ai/cli@latest -- notis apps build` must succeed without errors. Vite surfaces TypeScript and bundling errors during this step.
491
517
  2. **Headless render verification** (recommended after every build): run `npx --package @notis_ai/cli@latest -- notis apps verify`. It builds unless `--skip-build` is passed, spins up a loopback harness, drives `agent-browser` against every route, and reports per-route pass/fail with captured render errors and runtime calls.
492
- 3. **Local development acceptance**: Require the running CLI to name the intended desktop and report `Mounted in <target desktop>`, which proves the exact nonce-backed session entered that visible desktop's final `Local development` sidebar model. Bundle HTTP health alone proves only `Serving locally`. When the task includes UI, runtime behavior, or visual acceptance, open the default route and also require `Rendered in <target desktop>` before claiming the app works.
518
+ 3. **Local development acceptance**: Run `notis apps dev [folder]` once to register the root, then verify each signed-in Desktop instance independently: one DEV-badged Workspace row, the default route rendering real app content, and live edits appearing without restarting the CLI or Desktop. Use `notis apps roots list` as the persistence proof. Loopback bundle health alone does not prove that an authenticated instance mounted or rendered the app.
493
519
  4. **Post-deploy**: Verify the deployed bundle via `/portal_views/get` -> `runtime_descriptor.bundle.js_url`, then verify the app renders in the portal. The portal renders app bundles directly as React components, so the fastest verification is navigating to the app page in the portal.
494
520
 
495
521
  ### Headless harness verification
496
522
 
497
- Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --package @notis_ai/cli@latest -- notis apps build`. Use `--mode live` after deploy to exercise the real `/portal_views/runtime_query` with the CLI JWT instead of stub data. If `agent-browser` is unavailable, pass `--no-browser` to print URLs and use `--keep-open` for interactive triage with `notis-browser-control`.
523
+ Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --package @notis_ai/cli@latest -- notis apps build`. Use `--mode live` after deploy to exercise the real `/portal_views/runtime_query` with the CLI JWT instead of stub data; live mode also fails a route whose runtime calls all errored, which a well-behaved error state would otherwise hide. If `agent-browser` is unavailable, pass `--no-browser` to print URLs and use `--keep-open` for interactive triage with `notis-browser-control`.
498
524
 
499
525
  #### What the harness catches that `npx --package @notis_ai/cli@latest -- notis apps build` does not
500
526
 
@@ -514,8 +540,10 @@ Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --packa
514
540
 
515
541
  ### Common issues
516
542
 
517
- - **Deploy fails with network error**: Backend server not running. Use `npx --package @notis_ai/cli@latest -- notis apps deploy --direct` or start the server.
543
+ - **Deploy fails with network error**: Run `notis doctor`, then retry with the
544
+ authenticated API available. Do not bypass DEV-app promotion or installed-app
545
+ identity with a direct database/storage write.
518
546
  - **App shows old code after deploy**: Bundle cache is stale. Hard refresh (Cmd+Shift+R) or clear site data in DevTools.
519
- - **App is missing from Local development**: Read the `Target desktop` line from `apps dev`, then bring that exact Notis app forward and confirm it is signed into the same account reported by `npx --package @notis_ai/cli@latest -- notis whoami`. Keep `apps dev` running. If it still says only `Serving locally`, run `npx --package @notis_ai/cli@latest -- notis doctor`, restart the target desktop, and retry `apps dev`. Do not redirect internal registry files manually: the CLI selects the normal Notis/Notis Beta target from the active profile and selects a source-workspace desktop only when an active workspace runtime identifies it. Wait for `Mounted in <target desktop>` before claiming success; when validating UI or runtime behavior, open the route and wait for `Rendered in <target desktop>` too.
547
+ - **App is missing from the sidebar**: Run `apps roots list`, confirm the app is at the root, one direct child, or `apps/*`, and confirm its first build succeeds. Restarting Desktop reattaches the same persistent roots; no terminal process or manual sidebar action is required.
520
548
  - **`LOCAL_NOTIS_DATABASE_QUERY` returns empty documents**: Check that the database ID passed to the tool matches the intended database. Use `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'` to verify the ID; use the database slug only as a fallback.
521
549
  - **Properties are `undefined`**: Keep app-local result types for `useTool<TArgs, TResult>` and guard optional nested properties when reading live data.
@@ -81,8 +81,8 @@ Important: `deploy` only updates the installed app artifact for the current user
81
81
 
82
82
  ### App development workflow
83
83
 
84
- 1. Scaffold a new app:
85
- - `npx --package @notis_ai/cli@latest -- notis apps init`
84
+ 1. Scaffold a new app (every published Store app is a scaffold; `notis apps scaffolds list [--search <term>]` lists them from the public registry, and `--from <slug>` downloads that app's source):
85
+ - `npx --package @notis_ai/cli@latest -- notis apps init ["My App"] [--from <slug>]`
86
86
  2. Or pull an existing app's source to edit it locally (the project is linked automatically):
87
87
  - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>`
88
88
  - then run `npm install`, `npx --package @notis_ai/cli@latest -- notis apps dev`, edit, build, and deploy
@@ -92,9 +92,9 @@ Important: `deploy` only updates the installed app artifact for the current user
92
92
  - `npx --package @notis_ai/cli@latest -- notis apps build`
93
93
  5. Verify the built artifact headlessly:
94
94
  - `npx --package @notis_ai/cli@latest -- notis apps verify`
95
- 6. For a brand-new app, create the remote app and link the project in one step:
96
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
97
- 7. Or link the project to an existing remote app (skip if you used `pull` or `create`):
95
+ 6. For a brand-new app already run with `apps dev`, deploy to promote that development app in place:
96
+ - `npx --package @notis_ai/cli@latest -- notis apps deploy`
97
+ 7. Or link the project to an existing remote app (skip if you used `pull`):
98
98
  - `npx --package @notis_ai/cli@latest -- notis apps link`
99
99
  8. Deploy the artifact to Notis:
100
100
  - `npx --package @notis_ai/cli@latest -- notis apps deploy`
@@ -106,7 +106,7 @@ Important: `deploy` only updates the installed app artifact for the current user
106
106
  ### App development rules
107
107
 
108
108
  - Always `build` before `deploy`; run `verify` before deploy when validating an app change.
109
- - Prefer `npx --package @notis_ai/cli@latest -- notis apps create "Name" .` for the first deploy of a new app.
109
+ - Prefer `npx --package @notis_ai/cli@latest -- notis apps deploy` for the first deploy of a project already run with `apps dev`; it promotes the development app in place.
110
110
  - Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
111
111
  - Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
112
112
  - Use `npx --package @notis_ai/cli@latest -- notis apps list` to discover existing app IDs before linking.
@@ -117,8 +117,8 @@ Important: `deploy` only updates the installed app artifact for the current user
117
117
 
118
118
  - `npx --package @notis_ai/cli@latest -- notis apps list` -- list accessible apps
119
119
  - `npx --package @notis_ai/cli@latest -- notis apps init` -- scaffold a new Vite + React + `@notis/sdk` project
120
- - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir] [--force] [--version <n>]` -- download the persisted source snapshot for an installed app and link the local directory to that app/version; legacy apps must be redeployed once with the current CLI before they can be pulled
121
- - `npx --package @notis_ai/cli@latest -- notis apps dev` -- discover local apps, register desktop-local dev sessions, and load them in the Electron Portal Local development sidebar group
120
+ - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir] [--force] [--source-version <n>]` -- download the persisted source snapshot for an installed app and link the local directory to that app/version; legacy apps must be redeployed once with the current CLI before they can be pulled
121
+ - `npx --package @notis_ai/cli@latest -- notis apps dev` -- discover local apps, register desktop-local dev sessions, and load them as DEV-badged Workspace rows in the Electron Portal
122
122
  - `npx --package @notis_ai/cli@latest -- notis apps build` -- compile the production artifact
123
123
  - `npx --package @notis_ai/cli@latest -- notis apps verify` -- headless render-smoke packaged routes before deploy
124
124
  - `npx --package @notis_ai/cli@latest -- notis apps create` -- create a fresh remote app and optionally link the local project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notis_ai/cli",
3
- "version": "0.2.0-beta.139.1",
3
+ "version": "0.2.0-beta.144.1",
4
4
  "description": "Agent-first Notis CLI for apps and generic tool execution",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "release:prepare": "npm run build && node ./scripts/prepare-publish.js --apply",
25
25
  "cli:set-mode": "node ./scripts/set-cli-mode.js",
26
26
  "smoke": "node ./scripts/smoke-package.js",
27
- "test": "node --test"
27
+ "test": "node --test --test-timeout=120000"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=18.0.0"
@@ -79,26 +79,30 @@ Examples:
79
79
 
80
80
  Scaffold a new Notis app project.
81
81
 
82
- When to use: Start a new Notis app. Use --from with a bundled scaffold when one is close to the desired app; otherwise creates the bare Vite + React project.
82
+ When to use: Start a new Notis app. Use --from with a published Store app when one is close to the desired app; otherwise creates the bare Vite + React project.
83
83
 
84
84
  Options:
85
- - `--from <slug>` — Start from a bundled scaffold listed by `notis apps scaffolds list`.
85
+ - `--from <slug>` — Start from a published Store app listed by `notis apps scaffolds list`. Downloads its source from the public app registry.
86
86
 
87
87
  Examples:
88
88
  - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
89
89
  - `npx --package @notis_ai/cli@latest -- notis apps init "Mind the Flo"`
90
- - `npx --package @notis_ai/cli@latest -- notis apps init "My CRM" --from notis-database`
91
- - `npx --package @notis_ai/cli@latest -- notis apps init "My App" ./my-app`
90
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My CRM" --from databases`
91
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" ~/code/my-app`
92
92
 
93
93
  ### `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
94
94
 
95
- List bundled Notis app scaffolds.
95
+ List published Store apps available as scaffolds.
96
96
 
97
- When to use: Discover the fixed scaffold catalog shipped with the CLI before starting a new app.
97
+ When to use: Discover published Store apps to start from before creating a new app. Every app published to the public Store is automatically a scaffold; use --search to narrow the catalog.
98
+
99
+ Options:
100
+ - `--search <term>` — Filter scaffolds by name, tagline, description, or category.
98
101
 
99
102
  Examples:
100
103
  - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
101
- - `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from notis-database`
104
+ - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list --search journal`
105
+ - `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from databases`
102
106
 
103
107
  ### `npx --package @notis_ai/cli@latest -- notis apps create <name> [dir]`
104
108
 
@@ -112,21 +116,39 @@ Examples:
112
116
 
113
117
  ### `npx --package @notis_ai/cli@latest -- notis apps dev [dir]`
114
118
 
115
- Develop Notis apps inside the Electron desktop Portal with automatic local bundle reloads.
119
+ Register a development root and connect its apps to the shared local development host.
116
120
 
117
- When to use: Run this inside a single app or a monorepo root with apps/<name>/notis.config.ts. It discovers every app, starts the local bundle server, registers desktop-local dev sessions, and opens the Electron Portal to the local development app.
121
+ When to use: Run this once for any folder that should be watched permanently. The folder itself, direct child apps, and apps/* are discovered automatically by every signed-in Notis Desktop instance.
118
122
 
119
123
  Options:
120
124
  - `--port <number>` — Local bundle server port (default: 5173).
121
- - `--no-open` — Do not auto-open the desktop Portal local development app.
122
- - `--live-data` — Read and write the installed app's real databases instead of empty dev copies. Applies to this session only; warns and falls back when the app is not installed yet.
125
+ - `--scratch` — Use isolated empty databases, bundled skills, and bundled automations for this session instead of the installed app's resources. For fixture work and destructive experiments.
126
+ - `--live-data` — Deprecated: using the installed app's real resources is now the default. Accepted as a no-op; use `--scratch` for the old isolated behavior.
123
127
  - `--grant-cloud-shell` — Approve a cloudComputer: 'shell' declaration without the interactive prompt. The grant persists for this dev app; authorship alone never grants it.
124
128
 
125
129
  Examples:
126
130
  - `npx --package @notis_ai/cli@latest -- notis apps dev`
127
131
  - `npx --package @notis_ai/cli@latest -- notis apps dev ./my-app`
128
132
  - `npx --package @notis_ai/cli@latest -- notis apps dev ./workspace --port 5200`
129
- - `npx --package @notis_ai/cli@latest -- notis apps dev --live-data # iterate on a view over the installed app's real rows`
133
+ - `npx --package @notis_ai/cli@latest -- notis apps dev --scratch # isolated resources for fixture or schema experiments`
134
+
135
+ ### `npx --package @notis_ai/cli@latest -- notis apps roots list`
136
+
137
+ List persistent machine-local Notis app development roots.
138
+
139
+ When to use: See which folders every local Notis Desktop instance watches for development apps.
140
+
141
+ Examples:
142
+ - `npx --package @notis_ai/cli@latest -- notis apps roots list`
143
+
144
+ ### `npx --package @notis_ai/cli@latest -- notis apps roots remove <folder>`
145
+
146
+ Stop watching a registered Notis app development root.
147
+
148
+ When to use: Remove a persistent development root. The built-in ~/.notis/apps root cannot be removed.
149
+
150
+ Examples:
151
+ - `npx --package @notis_ai/cli@latest -- notis apps roots remove ./old-apps`
130
152
 
131
153
  ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
132
154
 
@@ -200,22 +222,22 @@ When to use: Edit an installed app locally. Pulls the persisted source, links th
200
222
 
201
223
  Options:
202
224
  - `--force` — Overwrite a non-empty target directory.
203
- - `--version <n>` — Pull a specific app source version (default: latest).
225
+ - `--source-version <n>` — Pull a specific app source version (default: latest).
204
226
 
205
227
  Examples:
206
228
  - `npx --package @notis_ai/cli@latest -- notis apps pull abc123`
207
- - `npx --package @notis_ai/cli@latest -- notis apps pull abc123 ./my-app --force`
229
+ - `npx --package @notis_ai/cli@latest -- notis apps pull abc123 ./my-app --force --source-version 3`
208
230
 
209
231
  ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
210
232
 
211
233
  Build and upload the app to the linked Notis app.
212
234
 
213
- When to use: Ship the installed app to production for the linked user/team app. Requires a linked app (notis apps link). This command does not publish to the app store.
235
+ When to use: Ship the installed app to production for the linked user/team app. A project that has only a development app is promoted in place on first deploy: same app id, same databases, dev markers removed. This command does not publish to the app store.
214
236
 
215
237
  Options:
216
238
  - `--app-id <id>` — Override linked app ID.
217
239
  - `--skip-build` — Skip the build step (use existing .notis/output/).
218
- - `--direct` — Upload directly to Supabase storage, bypassing the backend server. Auto-fallback on network errors.
240
+ - `--direct` — Explicitly upload to Supabase storage, bypassing the backend server.
219
241
 
220
242
  Examples:
221
243
  - `npx --package @notis_ai/cli@latest -- notis apps deploy`
@@ -261,4 +283,3 @@ When to use: Diagnose issues with a Notis app project.
261
283
  Examples:
262
284
  - `npx --package @notis_ai/cli@latest -- notis apps doctor`
263
285
  - `npx --package @notis_ai/cli@latest -- notis apps doctor ./my-app`
264
-