@notis_ai/cli 0.2.18 → 0.2.20

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 (395) hide show
  1. package/README.md +542 -146
  2. package/bin/check-runtime.js +15 -0
  3. package/bin/notis.js +2 -0
  4. package/config/notis_app_design_rules.json +320 -0
  5. package/config/portal-route-roots.json +45 -0
  6. package/dist/agent-hooks/notis-agent-hook.mjs +42325 -18273
  7. package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -0
  8. package/dist/base-skills/notis-cli/SKILL.md +51 -280
  9. package/dist/base-skills/notis-cli/references/app-delivery.md +17 -0
  10. package/dist/base-skills/notis-cli/references/intelligence.md +94 -0
  11. package/dist/base-skills/notis-cli/references/native-databases.md +21 -0
  12. package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
  13. package/dist/base-skills/notis-cli/references/troubleshooting.md +67 -0
  14. package/dist/base-skills/notis-query/.notis-base-skill.json +1 -0
  15. package/dist/base-skills/notis-query/SKILL.md +35 -699
  16. package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
  17. package/dist/base-skills/notis-query/references/documents.md +74 -0
  18. package/dist/base-skills/notis-query/references/query.md +76 -0
  19. package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -0
  20. package/dist/base-skills/notis-spaces/SKILL.md +218 -0
  21. package/dist/base-skills/notis-spaces/references/architecture.md +116 -0
  22. package/dist/base-skills/notis-spaces/references/context.md +81 -0
  23. package/dist/base-skills/notis-spaces/references/design.md +141 -0
  24. package/dist/base-skills/notis-spaces/references/fixtures.md +29 -0
  25. package/dist/base-skills/notis-spaces/references/memory.md +58 -0
  26. package/dist/base-skills/notis-spaces/references/reading.md +73 -0
  27. package/dist/base-skills/notis-spaces/references/release.md +120 -0
  28. package/dist/base-skills/notis-spaces/references/reports.md +77 -0
  29. package/dist/base-skills/notis-spaces/references/sdk.md +273 -0
  30. package/dist/base-skills/notis-spaces/references/store.md +118 -0
  31. package/dist/base-skills/notis-spaces/references/troubleshooting.md +28 -0
  32. package/dist/base-skills/notis-spaces/references/views.md +229 -0
  33. package/{template/packages → dist}/sdk/package.json +9 -10
  34. package/dist/sdk/src/agentContext.ts +36 -0
  35. package/dist/sdk/src/bundleModule.ts +175 -0
  36. package/dist/sdk/src/components/Dialog.tsx +103 -0
  37. package/dist/sdk/src/components/DocumentEditor.tsx +113 -0
  38. package/dist/sdk/src/components/DocumentPage.tsx +184 -0
  39. package/{template/packages → dist}/sdk/src/components/Markdown.tsx +9 -3
  40. package/{template/packages → dist}/sdk/src/components/MarkdownEditor.tsx +26 -5
  41. package/{template/packages → dist}/sdk/src/components/MultiSelectActionBar.tsx +95 -12
  42. package/{template/packages → dist}/sdk/src/components/MultiSelectCheckbox.tsx +4 -2
  43. package/dist/sdk/src/components/NotisCommentBoundary.tsx +172 -0
  44. package/{template/packages → dist}/sdk/src/components/NotisSelectionBoundary.tsx +9 -5
  45. package/dist/sdk/src/components/RecordComponents.tsx +111 -0
  46. package/dist/sdk/src/components/Skeleton.tsx +38 -0
  47. package/dist/sdk/src/config.ts +31 -0
  48. package/{template/packages → dist}/sdk/src/documents.ts +21 -6
  49. package/dist/sdk/src/hooks/useAction.ts +28 -0
  50. package/dist/sdk/src/hooks/useAgentContext.ts +23 -0
  51. package/{template/packages → dist}/sdk/src/hooks/useBackend.ts +3 -2
  52. package/dist/sdk/src/hooks/useCloudComputer.ts +94 -0
  53. package/dist/sdk/src/hooks/useCloudComputerShell.ts +114 -0
  54. package/{template/packages → dist}/sdk/src/hooks/useCollectionInteractions.ts +157 -147
  55. package/dist/sdk/src/hooks/useDatabaseSchema.ts +50 -0
  56. package/{template/packages → dist}/sdk/src/hooks/useDatabaseSubscription.ts +2 -2
  57. package/dist/sdk/src/hooks/useDocument.ts +51 -0
  58. package/{template/packages → dist}/sdk/src/hooks/useDocuments.ts +25 -59
  59. package/{template/packages → dist}/sdk/src/hooks/useHandover.ts +7 -7
  60. package/dist/sdk/src/hooks/useLongPressSelection.ts +79 -0
  61. package/dist/sdk/src/hooks/useMarqueeSelection.ts +194 -0
  62. package/{template/packages → dist}/sdk/src/hooks/useMultiSelect.ts +2 -8
  63. package/dist/sdk/src/hooks/useNativeDocumentBody.ts +50 -0
  64. package/dist/sdk/src/hooks/useNativeDocuments.ts +143 -0
  65. package/{template/packages → dist}/sdk/src/hooks/useNotis.ts +6 -1
  66. package/dist/sdk/src/hooks/useNotisNavigation.ts +70 -0
  67. package/dist/sdk/src/hooks/useQuery.ts +81 -0
  68. package/dist/sdk/src/hooks/useToolQuery.ts +12 -0
  69. package/dist/sdk/src/hooks/useTopBarSearch.ts +102 -0
  70. package/dist/sdk/src/hooks/useTopBarTitleLeaf.ts +75 -0
  71. package/{template/packages → dist}/sdk/src/hooks/useUpsertDocument.ts +1 -1
  72. package/dist/sdk/src/hooks/useViewParams.ts +195 -0
  73. package/dist/sdk/src/hooks/useViewerReads.ts +129 -0
  74. package/{template/packages → dist}/sdk/src/index.ts +64 -1
  75. package/{template/packages → dist}/sdk/src/interactions/actions.ts +14 -1
  76. package/{template/packages → dist}/sdk/src/interactions/shortcuts.tsx +129 -23
  77. package/dist/sdk/src/interactions/visibility.ts +13 -0
  78. package/{template/packages → dist}/sdk/src/interactions.ts +5 -1
  79. package/dist/sdk/src/nativeData.ts +39 -0
  80. package/{template/packages → dist}/sdk/src/provider.tsx +9 -4
  81. package/dist/sdk/src/queryCache.ts +292 -0
  82. package/dist/sdk/src/queryErrors.ts +51 -0
  83. package/dist/sdk/src/runtime.ts +675 -0
  84. package/dist/sdk/src/runtimeModules.ts +33 -0
  85. package/dist/sdk/src/space.ts +442 -0
  86. package/dist/sdk/src/standardViewParams.ts +36 -0
  87. package/{template/packages → dist}/sdk/src/styles.css +81 -16
  88. package/dist/sdk/src/tailwind.ts +66 -0
  89. package/dist/sdk/src/ui/charts/RenderChartData.tsx +25 -0
  90. package/dist/sdk/src/ui/engine/core.ts +392 -0
  91. package/dist/sdk/src/ui/engine/dom.ts +183 -0
  92. package/dist/sdk/src/ui/engine/hooks.ts +195 -0
  93. package/dist/sdk/src/ui/engine/instance.ts +63 -0
  94. package/dist/sdk/src/ui/engine/keycapContext.ts +2 -0
  95. package/dist/sdk/src/ui/engine/registry.ts +262 -0
  96. package/dist/sdk/src/ui/engine/types.ts +62 -0
  97. package/dist/sdk/src/ui/icons.tsx +91 -0
  98. package/dist/sdk/src/ui/util.ts +83 -0
  99. package/dist/sdk/src/viewPeriod.ts +26 -0
  100. package/dist/sdk/src/vite.ts +92 -0
  101. package/dist/sdk/src/words/actions.ts +295 -0
  102. package/dist/sdk/src/words/clashes.ts +158 -0
  103. package/dist/sdk/src/words/format.ts +136 -0
  104. package/dist/sdk/src/words/index.ts +13 -0
  105. package/dist/sdk/src/words/keymap.ts +72 -0
  106. package/dist/sdk/src/words/keys.ts +297 -0
  107. package/dist/sdk/src/words/shell.ts +46 -0
  108. package/dist/sdk/src/words/types.ts +65 -0
  109. package/dist/skill-sync/index.js +832 -151
  110. package/dist/skill-sync/index.js.map +4 -4
  111. package/dist/skill-sync-worker.mjs +3941 -0
  112. package/dist/space-harness/host.js +1460 -0
  113. package/dist/space-sdk/dist/chunk-ZSN57ATH.js +5 -0
  114. package/dist/space-sdk/dist/index.js +15 -0
  115. package/dist/space-sdk/dist/ui.js +18 -0
  116. package/dist/space-sdk/package.json +33 -0
  117. package/dist/space-sdk/src/agentContext.d.ts +36 -0
  118. package/dist/space-sdk/src/components/Dialog.d.ts +20 -0
  119. package/dist/space-sdk/src/components/DocumentEditor.d.ts +46 -0
  120. package/dist/space-sdk/src/components/DocumentPage.d.ts +53 -0
  121. package/dist/space-sdk/src/components/Markdown.d.ts +18 -0
  122. package/dist/space-sdk/src/components/MarkdownEditor.d.ts +11 -0
  123. package/dist/space-sdk/src/components/MultiSelectActionBar.d.ts +31 -0
  124. package/dist/space-sdk/src/components/MultiSelectCheckbox.d.ts +14 -0
  125. package/dist/space-sdk/src/components/MultiSelectDragOverlay.d.ts +8 -0
  126. package/dist/space-sdk/src/components/NotisCommentBoundary.d.ts +36 -0
  127. package/dist/space-sdk/src/components/NotisSelectionBoundary.d.ts +16 -0
  128. package/dist/space-sdk/src/components/RecordComponents.d.ts +64 -0
  129. package/dist/space-sdk/src/components/ShortcutHints.d.ts +12 -0
  130. package/dist/space-sdk/src/components/Skeleton.d.ts +23 -0
  131. package/dist/space-sdk/src/config.ts +31 -0
  132. package/dist/space-sdk/src/documents.d.ts +59 -0
  133. package/dist/space-sdk/src/hooks/useAction.d.ts +8 -0
  134. package/dist/space-sdk/src/hooks/useActiveResource.d.ts +3 -0
  135. package/dist/space-sdk/src/hooks/useAgentContext.d.ts +7 -0
  136. package/dist/space-sdk/src/hooks/useBackend.d.ts +23 -0
  137. package/dist/space-sdk/src/hooks/useCloudComputer.d.ts +45 -0
  138. package/dist/space-sdk/src/hooks/useCloudComputerShell.d.ts +49 -0
  139. package/dist/space-sdk/src/hooks/useCollectionInteractions.d.ts +118 -0
  140. package/dist/space-sdk/src/hooks/useDatabaseSchema.d.ts +14 -0
  141. package/dist/space-sdk/src/hooks/useDatabaseSubscription.d.ts +26 -0
  142. package/dist/space-sdk/src/hooks/useDocument.d.ts +22 -0
  143. package/dist/space-sdk/src/hooks/useDocuments.d.ts +31 -0
  144. package/dist/space-sdk/src/hooks/useHandover.d.ts +43 -0
  145. package/dist/space-sdk/src/hooks/useLongPressSelection.d.ts +9 -0
  146. package/dist/space-sdk/src/hooks/useMarqueeSelection.d.ts +57 -0
  147. package/dist/space-sdk/src/hooks/useMultiSelect.d.ts +51 -0
  148. package/dist/space-sdk/src/hooks/useNativeDocumentBody.d.ts +24 -0
  149. package/dist/space-sdk/src/hooks/useNativeDocuments.d.ts +55 -0
  150. package/dist/space-sdk/src/hooks/useNotis.d.ts +25 -0
  151. package/dist/space-sdk/src/hooks/useNotisNavigation.d.ts +33 -0
  152. package/dist/space-sdk/src/hooks/useQuery.d.ts +22 -0
  153. package/dist/space-sdk/src/hooks/useTool.d.ts +20 -0
  154. package/dist/space-sdk/src/hooks/useToolQuery.d.ts +3 -0
  155. package/dist/space-sdk/src/hooks/useTools.d.ts +15 -0
  156. package/dist/space-sdk/src/hooks/useTopBarSearch.d.ts +48 -0
  157. package/dist/space-sdk/src/hooks/useTopBarTitleLeaf.d.ts +24 -0
  158. package/dist/space-sdk/src/hooks/useUpsertDocument.d.ts +27 -0
  159. package/dist/space-sdk/src/hooks/useViewParams.d.ts +76 -0
  160. package/dist/space-sdk/src/hooks/useViewerReads.d.ts +38 -0
  161. package/dist/space-sdk/src/index.d.ts +98 -0
  162. package/dist/space-sdk/src/interactions/actions.d.ts +33 -0
  163. package/dist/space-sdk/src/interactions/shortcuts.d.ts +42 -0
  164. package/dist/space-sdk/src/interactions/visibility.d.ts +2 -0
  165. package/dist/space-sdk/src/nativeData.d.ts +66 -0
  166. package/dist/space-sdk/src/provider.d.ts +17 -0
  167. package/dist/space-sdk/src/queryCache.d.ts +45 -0
  168. package/dist/space-sdk/src/queryErrors.ts +51 -0
  169. package/dist/space-sdk/src/runtime.d.ts +615 -0
  170. package/dist/space-sdk/src/runtimeModules.ts +33 -0
  171. package/dist/space-sdk/src/space.ts +442 -0
  172. package/dist/space-sdk/src/standardViewParams.d.ts +15 -0
  173. package/dist/space-sdk/src/tailwind-candidates.d.ts +3418 -0
  174. package/dist/space-sdk/src/tailwind.ts +66 -0
  175. package/dist/space-sdk/src/ui/actions/ActionToast.d.ts +15 -0
  176. package/dist/space-sdk/src/ui/actions/actionWords.d.ts +16 -0
  177. package/dist/space-sdk/src/ui/actions/index.d.ts +7 -0
  178. package/dist/space-sdk/src/ui/actions/useActions.d.ts +69 -0
  179. package/dist/space-sdk/src/ui/actions/useToast.d.ts +41 -0
  180. package/dist/space-sdk/src/ui/blocks/Tabs.d.ts +139 -0
  181. package/dist/space-sdk/src/ui/blocks/blocks.d.ts +217 -0
  182. package/dist/space-sdk/src/ui/blocks/index.d.ts +4 -0
  183. package/dist/space-sdk/src/ui/board/BoardView.d.ts +36 -0
  184. package/dist/space-sdk/src/ui/board/boardModel.d.ts +46 -0
  185. package/dist/space-sdk/src/ui/board/boardWords.d.ts +9 -0
  186. package/dist/space-sdk/src/ui/board/index.d.ts +5 -0
  187. package/dist/space-sdk/src/ui/calendar/CalendarView.d.ts +49 -0
  188. package/dist/space-sdk/src/ui/calendar/DayPicker.d.ts +23 -0
  189. package/dist/space-sdk/src/ui/calendar/calendarMath.d.ts +81 -0
  190. package/dist/space-sdk/src/ui/charts/Chart.d.ts +203 -0
  191. package/dist/space-sdk/src/ui/charts/ChartTable.d.ts +37 -0
  192. package/dist/space-sdk/src/ui/charts/RenderChartData.d.ts +16 -0
  193. package/dist/space-sdk/src/ui/charts/StatRow.d.ts +59 -0
  194. package/dist/space-sdk/src/ui/charts/chartData.d.ts +84 -0
  195. package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +58 -0
  196. package/dist/space-sdk/src/ui/comments/commentModel.d.ts +157 -0
  197. package/dist/space-sdk/src/ui/comments/commentWords.d.ts +60 -0
  198. package/dist/space-sdk/src/ui/comments/index.d.ts +4 -0
  199. package/dist/space-sdk/src/ui/comments/useComments.d.ts +146 -0
  200. package/dist/space-sdk/src/ui/engine/HelpSheet.d.ts +12 -0
  201. package/dist/space-sdk/src/ui/engine/KeyboardEngine.d.ts +27 -0
  202. package/dist/space-sdk/src/ui/engine/core.d.ts +73 -0
  203. package/dist/space-sdk/src/ui/engine/hooks.d.ts +64 -0
  204. package/dist/space-sdk/src/ui/engine/index.d.ts +14 -0
  205. package/dist/space-sdk/src/ui/engine/instance.d.ts +21 -0
  206. package/dist/space-sdk/src/ui/engine/keycapContext.d.ts +2 -0
  207. package/dist/space-sdk/src/ui/engine/registry.d.ts +77 -0
  208. package/dist/space-sdk/src/ui/engine/step.d.ts +11 -0
  209. package/dist/space-sdk/src/ui/engine/types.d.ts +54 -0
  210. package/dist/space-sdk/src/ui/fields/fieldWords.d.ts +56 -0
  211. package/dist/space-sdk/src/ui/fields/fields.d.ts +162 -0
  212. package/dist/space-sdk/src/ui/fields/index.d.ts +5 -0
  213. package/dist/space-sdk/src/ui/fields/useFieldDraft.d.ts +22 -0
  214. package/dist/space-sdk/src/ui/gallery/AttachmentGallery.d.ts +53 -0
  215. package/dist/space-sdk/src/ui/gallery/ImageViewer.d.ts +27 -0
  216. package/dist/space-sdk/src/ui/gallery/galleryWords.d.ts +95 -0
  217. package/dist/space-sdk/src/ui/gallery/index.d.ts +5 -0
  218. package/dist/space-sdk/src/ui/icons.d.ts +13 -0
  219. package/dist/space-sdk/src/ui/index.d.ts +54 -0
  220. package/dist/space-sdk/src/ui/keycap/Keycap.d.ts +22 -0
  221. package/dist/space-sdk/src/ui/keycap/index.d.ts +2 -0
  222. package/dist/space-sdk/src/ui/layout/Panels.d.ts +50 -0
  223. package/dist/space-sdk/src/ui/layout/chatPanelEdge.d.ts +77 -0
  224. package/dist/space-sdk/src/ui/layout/index.d.ts +5 -0
  225. package/dist/space-sdk/src/ui/layout/panelMath.d.ts +91 -0
  226. package/dist/space-sdk/src/ui/list/ListReader.d.ts +380 -0
  227. package/dist/space-sdk/src/ui/list/Row.d.ts +145 -0
  228. package/dist/space-sdk/src/ui/list/SelectionBar.d.ts +65 -0
  229. package/dist/space-sdk/src/ui/list/index.d.ts +14 -0
  230. package/dist/space-sdk/src/ui/list/rowState.d.ts +22 -0
  231. package/dist/space-sdk/src/ui/list/useListKeys.d.ts +89 -0
  232. package/dist/space-sdk/src/ui/list/useReorder.d.ts +86 -0
  233. package/dist/space-sdk/src/ui/list/useSelection.d.ts +90 -0
  234. package/dist/space-sdk/src/ui/open/OpenAsMenu.d.ts +15 -0
  235. package/dist/space-sdk/src/ui/open/index.d.ts +6 -0
  236. package/dist/space-sdk/src/ui/open/openModeStore.d.ts +39 -0
  237. package/dist/space-sdk/src/ui/open/useOpenMode.d.ts +17 -0
  238. package/dist/space-sdk/src/ui/overlay/Menu.d.ts +88 -0
  239. package/dist/space-sdk/src/ui/overlay/Popover.d.ts +28 -0
  240. package/dist/space-sdk/src/ui/overlay/Tooltip.d.ts +19 -0
  241. package/dist/space-sdk/src/ui/overlay/index.d.ts +9 -0
  242. package/dist/space-sdk/src/ui/overlay/layerRoot.d.ts +24 -0
  243. package/dist/space-sdk/src/ui/overlay/position.d.ts +31 -0
  244. package/dist/space-sdk/src/ui/period/PeriodPicker.d.ts +30 -0
  245. package/dist/space-sdk/src/ui/period/dateFormat.d.ts +50 -0
  246. package/dist/space-sdk/src/ui/period/dateWords.d.ts +88 -0
  247. package/dist/space-sdk/src/ui/period/periods.d.ts +70 -0
  248. package/dist/space-sdk/src/ui/period/usePeriod.d.ts +23 -0
  249. package/dist/space-sdk/src/ui/present/index.d.ts +3 -0
  250. package/dist/space-sdk/src/ui/present/presentWords.d.ts +27 -0
  251. package/dist/space-sdk/src/ui/present/screens.d.ts +36 -0
  252. package/dist/space-sdk/src/ui/present/useAudienceScreen.d.ts +38 -0
  253. package/dist/space-sdk/src/ui/styles.d.ts +21 -0
  254. package/dist/space-sdk/src/ui/timeline/TimelineView.d.ts +44 -0
  255. package/dist/space-sdk/src/ui/timeline/timelineMath.d.ts +123 -0
  256. package/dist/space-sdk/src/viewPeriod.d.ts +8 -0
  257. package/dist/space-sdk/src/vite.ts +92 -0
  258. package/dist/space-sdk/src/words/actions.ts +295 -0
  259. package/dist/space-sdk/src/words/clashes.ts +158 -0
  260. package/dist/space-sdk/src/words/format.ts +136 -0
  261. package/dist/space-sdk/src/words/index.ts +13 -0
  262. package/dist/space-sdk/src/words/keymap.ts +72 -0
  263. package/dist/space-sdk/src/words/keys.ts +297 -0
  264. package/dist/space-sdk/src/words/shell.ts +46 -0
  265. package/dist/space-sdk/src/words/types.ts +65 -0
  266. package/dist/view-renderer/dist/host.css +1 -0
  267. package/dist/view-renderer/dist/host.js +2374 -0
  268. package/dist/view-renderer/dist/theme.css +73 -0
  269. package/dist/view-renderer/src/dom.js +212 -0
  270. package/dist/view-renderer/src/errors.js +8 -0
  271. package/dist/view-renderer/src/host.tsx +250 -0
  272. package/dist/view-renderer/src/index.js +4 -0
  273. package/dist/view-renderer/src/png.js +213 -0
  274. package/dist/view-renderer/src/pool.js +110 -0
  275. package/dist/view-renderer/src/remote-broker.js +59 -0
  276. package/dist/view-renderer/src/renderer.js +279 -0
  277. package/package.json +21 -11
  278. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +63 -12
  279. package/skills/notis-onboarding/BRIEF.md +14 -9
  280. package/skills/notis-query/cli.md +1 -1
  281. package/skills/notis-spaces/cli.md +540 -0
  282. package/src/cli.js +8 -8
  283. package/src/command-specs/agents.js +121 -8
  284. package/src/command-specs/auth.js +3 -3
  285. package/src/command-specs/diagnostics.js +97 -20
  286. package/src/command-specs/documents.js +158 -0
  287. package/src/command-specs/files.js +29 -0
  288. package/src/command-specs/handover.js +331 -79
  289. package/src/command-specs/helpers.js +50 -40
  290. package/src/command-specs/index.js +14 -5
  291. package/src/command-specs/meta.js +38 -9
  292. package/src/command-specs/onboarding.js +1 -1
  293. package/src/command-specs/profile.js +42 -1
  294. package/src/command-specs/skills.js +314 -9
  295. package/src/command-specs/smoke.js +16 -4
  296. package/src/command-specs/spaces.js +783 -0
  297. package/src/command-specs/tools.js +118 -21
  298. package/src/command-specs/version-history.js +20 -0
  299. package/src/command-specs/views.js +69 -0
  300. package/src/runtime/agent-browser.js +178 -267
  301. package/src/runtime/agent-setup.js +172 -13
  302. package/src/runtime/app-boundary-validator.js +338 -2
  303. package/src/runtime/app-data-literals.js +82 -0
  304. package/src/runtime/app-platform.js +750 -1570
  305. package/src/runtime/auth-recovery.js +17 -0
  306. package/src/runtime/base-skills.d.ts +11 -0
  307. package/src/runtime/base-skills.js +100 -3
  308. package/src/runtime/computer-identity.d.ts +30 -0
  309. package/src/runtime/computer-identity.js +151 -0
  310. package/src/runtime/config-lock.js +135 -0
  311. package/src/runtime/confined-space-build.js +74 -0
  312. package/src/runtime/confined-space-verify.js +49 -0
  313. package/src/runtime/delegated-context.js +5 -21
  314. package/src/runtime/native-record-files.js +47 -0
  315. package/src/runtime/oauth.js +342 -31
  316. package/src/runtime/profiles.js +19 -112
  317. package/src/runtime/retired-sdk-files.js +24 -0
  318. package/src/runtime/retry.js +150 -0
  319. package/src/runtime/skill-sync/cloud-client.ts +33 -8
  320. package/src/runtime/skill-sync/index.ts +443 -106
  321. package/src/runtime/skill-sync/local-scanner.ts +248 -32
  322. package/src/runtime/skill-sync/native-identity.ts +102 -0
  323. package/src/runtime/skill-sync/native-plan.ts +70 -0
  324. package/src/runtime/skill-sync/symlink-manager.ts +66 -16
  325. package/src/runtime/skill-sync/sync-plan.ts +34 -2
  326. package/src/runtime/skill-sync/types.ts +54 -0
  327. package/src/runtime/skill-sync/write-cloud-skill.ts +4 -4
  328. package/src/runtime/skill-sync-service.js +109 -0
  329. package/src/runtime/source-root.js +32 -0
  330. package/src/runtime/space-collection-scaffold.js +107 -0
  331. package/src/runtime/space-database-structures.js +229 -0
  332. package/src/runtime/space-fixture-broker.js +68 -0
  333. package/src/runtime/space-lock.js +337 -0
  334. package/src/runtime/space-platform.js +133 -0
  335. package/src/runtime/space-source.js +290 -0
  336. package/src/runtime/space-test-server.js +354 -0
  337. package/src/runtime/space-verification.js +94 -0
  338. package/src/runtime/space-verify-browser-worker.js +51 -0
  339. package/src/runtime/space-view-manifest.js +368 -0
  340. package/src/runtime/sync-skills.d.ts +5 -1
  341. package/src/runtime/sync-skills.js +11 -2
  342. package/src/runtime/tool-confirmation.js +138 -0
  343. package/src/runtime/transport.js +118 -24
  344. package/src/runtime/upsell.js +219 -0
  345. package/src/runtime/view-render.js +49 -0
  346. package/src/skill-sync-worker-entry.js +2 -0
  347. package/src/skill-sync-worker.js +114 -0
  348. package/src/space-harness-host.ts +122 -0
  349. package/template/.harness/index.html.tmpl +9 -352
  350. package/template/app/globals.css +29 -3
  351. package/template/app/layout.tsx +2 -6
  352. package/template/components/ui/badge.tsx +7 -4
  353. package/template/components/ui/button.tsx +1 -1
  354. package/template/components/ui/native-select.tsx +24 -0
  355. package/template/notis.config.ts +4 -36
  356. package/template/package-lock.json +1800 -1867
  357. package/template/package.json +16 -14
  358. package/template/postcss.config.mjs +1 -1
  359. package/template/tailwind.config.ts +1 -6
  360. package/template/tsconfig.json +1 -0
  361. package/template/vite.config.ts +2 -2
  362. package/dist/base-skills/notis-apps/SKILL.md +0 -613
  363. package/skills/notis-apps/cli.md +0 -285
  364. package/src/command-specs/apps.js +0 -3011
  365. package/src/runtime/app-changelog.js +0 -79
  366. package/src/runtime/app-dev-consumers.js +0 -154
  367. package/src/runtime/app-dev-host-lock.js +0 -80
  368. package/src/runtime/app-dev-process-identity.js +0 -111
  369. package/src/runtime/app-dev-roots.js +0 -284
  370. package/src/runtime/app-dev-server.js +0 -1140
  371. package/src/runtime/app-dev-sessions.js +0 -185
  372. package/src/runtime/app-registry-scaffolds.js +0 -367
  373. package/src/runtime/assets/store-screenshot-dark.png +0 -0
  374. package/src/runtime/cli-mode.generated.js +0 -5
  375. package/src/runtime/cli-mode.js +0 -34
  376. package/src/runtime/store-screenshot.js +0 -143
  377. package/template/CHANGELOG.md +0 -5
  378. package/template/app/page.tsx +0 -60
  379. package/template/components/ui/card.tsx +0 -56
  380. package/template/packages/sdk/src/components/DocumentEditor.tsx +0 -103
  381. package/template/packages/sdk/src/config.ts +0 -259
  382. package/template/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
  383. package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
  384. package/template/packages/sdk/src/hooks/useDocument.ts +0 -78
  385. package/template/packages/sdk/src/hooks/useNotisNavigation.ts +0 -52
  386. package/template/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
  387. package/template/packages/sdk/src/runtime.ts +0 -439
  388. package/template/packages/sdk/src/vite.ts +0 -56
  389. package/template/packages/sdk/tsconfig.json +0 -15
  390. /package/{template/packages → dist}/sdk/src/components/MultiSelectDragOverlay.tsx +0 -0
  391. /package/{template/packages → dist}/sdk/src/components/ShortcutHints.tsx +0 -0
  392. /package/{template/packages → dist}/sdk/src/hooks/useActiveResource.ts +0 -0
  393. /package/{template/packages → dist}/sdk/src/hooks/useTool.ts +0 -0
  394. /package/{template/packages → dist}/sdk/src/hooks/useTools.ts +0 -0
  395. /package/{template/packages → dist}/sdk/src/ui.ts +0 -0
@@ -0,0 +1 @@
1
+ {"schema":1,"stamp":1792843001,"commit":"974cae565cf52fde4d5a93fb0502c52b83e2abf9"}
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: notis-cli
3
- description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
4
- feature_flag: cli_access
3
+ description: Use when agents should work through the Notis CLI, especially to develop Notis Spaces locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
5
4
  mcp_resource: true
6
- mcp_tool_patterns: []
5
+ mcp_tool_patterns: ["LOCAL_NOTIS_GET_INTELLIGENCE_POLICY"]
6
+ mcp_references: ["references/app-delivery.md", "references/tool-examples.md", "references/native-databases.md", "references/troubleshooting.md", "references/intelligence.md"]
7
7
  ---
8
8
 
9
9
  # Notis CLI Skill
@@ -12,14 +12,13 @@ Use this skill when the user wants work done through the Notis CLI.
12
12
 
13
13
  This skill covers two main CLI workflows:
14
14
 
15
- 1. Developing Notis apps locally.
15
+ 1. Developing Notis Spaces (views, their source and linked Skills) locally.
16
16
  2. Accessing Notis, Composio, and MCP tools through the CLI.
17
-
18
17
  ## When to use this skill
19
18
 
20
19
  Activate this skill when:
21
20
 
22
- - the user wants to init, develop, build, verify, link, pull, or deploy a Notis app through the CLI
21
+ - the user wants to init, pull, build, verify, preview, deploy or promote a Notis Space through the CLI
23
22
  - the current agent does not have the tool it needs in its direct tool list
24
23
  - the user wants direct MCP access through Notis
25
24
  - the user wants to use an integration-backed capability through Notis rather than a first-class local tool
@@ -29,7 +28,7 @@ Use the registry-resolved published npm package everywhere:
29
28
 
30
29
  - `npx --package @notis_ai/cli@latest -- notis ...`
31
30
 
32
- Always use this NPX command form so the agent runs the current published CLI. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`. On a local machine the CLI holds its own OAuth grant: `notis login` authorizes one in the browser, and signing in to the Notis desktop app authorizes one automatically for that account. Either way the grant belongs to the CLI, which refreshes it without the desktop app running.
31
+ Always use this NPX command form so the agent runs the current published CLI, with one exception: on the Notis Cloud Computer (home folder `/vercel/sandbox`) the CLI is preinstalled and kept current, so run `notis ...` there with the same arguments, and use the NPX form only if `notis` is not found. Parallel NPX runs reinstall the package and can break each other. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`. On a local machine the CLI holds its own OAuth grant: `notis login` authorizes one in the browser, and signing in to the Notis desktop app authorizes one automatically for that account. Either way the grant belongs to the CLI, which refreshes it without the desktop app running.
33
32
 
34
33
  `@latest` is correct for every account, including beta ones. Each deployment reports which published build belongs to it, `notis login` pins that on the profile, and a later run that finds itself on the wrong build hands the invocation to the right one before doing anything. Never substitute a channel by hand: pinning `@beta` on a production profile is how a machine ends up running a build its API does not expect. `notis doctor` reports the active channel, and `NOTIS_CLI_AUTO_CHANNEL=0` turns the hand-off off for a run.
35
34
 
@@ -39,11 +38,13 @@ The CLI bundles this `notis-cli` base skill and refreshes its canonical copy und
39
38
 
40
39
  A profile is one account paired with one API endpoint. Profiles live side by side; switching between them never signs any of them out.
41
40
 
42
- - `npx --package @notis_ai/cli@latest -- notis profile list` — every profile on this machine, with its endpoint, user, and whether it is signed in. The active one is marked.
43
- - `npx --package @notis_ai/cli@latest -- notis profile use <name>` — change which account subsequent commands run as.
44
- - `npx --package @notis_ai/cli@latest -- notis --profile <name> <command>` — run a single command as another account without changing the active one.
45
- - `npx --package @notis_ai/cli@latest -- notis login --profile <name>` — add an account. The existing profiles keep their credentials.
46
- - `npx --package @notis_ai/cli@latest -- notis logout` — sign out of the active profile only; pass `--all-profiles` to clear every one.
41
+ Notis Desktop signs the CLI in for every account saved in the app, one profile each. `default` keeps its name; each added account gets a profile named after its email with `@` turned into `-` (for example `flo-mindtheflo.com`), and Beta Desktop adds `-beta`. Switching accounts in Desktop never changes the active profile. Only the active profile's skills are linked into Claude Code, Codex and Cursor; every other account's skills sync into their own folder. Signing an account out of Desktop signs it out of the CLI on this computer and removes the profile and skills Desktop made for it. If that was the active profile, the CLI switches to the account Desktop opens next; with no other signed-in Desktop account it stays signed out. Profiles made with `notis login` are never removed or picked automatically.
42
+
43
+ - `npx --package @notis_ai/cli@latest -- notis profile list`: every profile on this machine, with its endpoint, user, and whether it is signed in. The active one is marked.
44
+ - `npx --package @notis_ai/cli@latest -- notis profile use <name>`: change which account subsequent commands run as, and link that account's skills into the agent folders straight away.
45
+ - `npx --package @notis_ai/cli@latest -- notis --profile <name> <command>`: run a single command as another account without changing the active one.
46
+ - `npx --package @notis_ai/cli@latest -- notis login --profile <name>`: add an account. The existing profiles keep their credentials.
47
+ - `npx --package @notis_ai/cli@latest -- notis logout`: sign this computer out of the active profile only; the account stays signed in on other computers. Pass `--all-profiles` to clear every profile on this computer.
47
48
 
48
49
  Read the profile before acting on the user's data. `notis whoami` reports the account and endpoint a command will hit; if that is not the account the user meant, switch profiles rather than proceeding.
49
50
 
@@ -71,146 +72,15 @@ This is especially important when:
71
72
 
72
73
  Treat the Notis CLI the same way you would treat a Composio-style tool router flow: discover what is available first, then execute the right tool through the CLI.
73
74
 
74
- ## Section 1: Developing Notis Apps
75
-
76
- Use this section when the goal is to create or update a Notis app from a local
77
- workspace or a hosted sandbox.
78
-
79
- Notis apps are Vite + React projects using `@notis/sdk`. After init or pull and editing, choose one terminal branch: local Desktop uses `dev → build → verify → user approval → deploy`; hosted sandbox uses `build → verify → identity/schema reconciliation → deploy`; Store submission is a later, separately confirmed action.
80
-
81
- Important: `deploy` only updates the installed app artifact for the current user or team. Store submission is a separate, user-gated step. After the user explicitly confirms that the current App Details page and Store listing are ready, `apps publish --confirm-ready` submits the matching deployed version through the backend review flow.
82
-
83
- Choose the execution path before changing the app:
84
-
85
- - **Hosted sandbox**: a sandbox instruction or `/vercel/sandbox` working tree
86
- proves that Desktop cannot mount the source. Do not run `apps dev`. A create
87
- or edit request authorizes `apps deploy` after `apps build` and automated
88
- `apps verify` pass unless the user explicitly requests preview-only,
89
- read-only, or no deployment; inspection, review, and diagnosis stay
90
- read-only. `apps pull <app-id>` links an existing app. Test before any remote
91
- mutation. If an opt-out applies, stop there without create/link, database
92
- mutation, deploy, or post-deploy checks. Otherwise, for a new unlinked app,
93
- compare profile state and `apps list --json` with the canonical
94
- `notis.config.ts` `name` and intended personal/team scope: link one exact
95
- editable non-development match after a metadata-only (`include_documents:
96
- false`) detail read proves scope, fail on any ambiguity/development
97
- collision/scope mismatch, or create only on zero exact matches. Default new
98
- apps to personal scope unless the user explicitly asks for team scope. Prove
99
- canonicalizing the config title yields its name. For personal creation, run
100
- `apps create "<canonical-config-title>" . --json` exactly once. For explicit
101
- team scope, discover/describe and dry-run `LOCAL_NOTIS_CREATE_APP`, execute it
102
- exactly once with team visibility and verified current team scope, verify the
103
- returned identity/scope, and link that exact id. In a fresh sandbox, install Agent Browser with `npm exec --yes --package
104
- agent-browser@latest -- agent-browser install` and run verification through
105
- `npx --yes --package @notis_ai/cli@latest --package agent-browser@latest --
106
- notis apps verify`. Read back the exact app id/version and Portal URL with `apps list --json`, run
107
- the same combined command with `apps verify --mode live`, and return the exact
108
- Portal URL. Stop before deployment on test failure and before retry on an
109
- outcome-unknown create or deploy.
110
- - **Local computer**: run `apps dev`, let the user test the DEV-badged app, and
111
- deploy that development identity directly only after the user explicitly
112
- asks; never run `apps create` after `apps dev`.
113
-
114
- ### App development workflow
115
-
116
- 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):
117
- - `npx --package @notis_ai/cli@latest -- notis apps init ["My App"] [--from <slug>]`
118
- 2. Or pull an existing app's source to edit it (the project is linked automatically):
119
- - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>`
120
- - then run `npm install`, increment `notisAppVersion`, and edit
121
- 3. **Local Desktop branch:** run `apps dev` for live testing, confirm the DEV
122
- app and root/mount acceptance checks, then run `apps build` and `apps verify`.
123
- Let the user test the DEV app and stop for explicit user approval. When
124
- approved, run exactly one `apps deploy` to promote the existing `dev_app_id`
125
- (or update the already linked app), then read it back. Never run `apps create`
126
- after `apps dev`.
127
- 4. **Hosted sandbox branch:** bootstrap Agent Browser as described above, then
128
- run `apps build` followed by the automated hosted `apps verify`. If automatic
129
- deployment is opted out, stop after those tests with no app create/link,
130
- database mutation, deploy, or post-deploy check. Otherwise, for a new hosted
131
- app, reconcile `.notis/state.json` and `apps list --json` against
132
- the canonical config `name` and intended scope (personal by default; team
133
- only when explicitly requested). Include
134
- development rows as collision checks. Link one exact editable non-dev match
135
- only after a metadata-only (`include_documents: false`) exact app detail
136
- proves scope; fail on multiple/scope mismatch, or create only on zero. Prove
137
- canonicalize(config title) equals config name. For personal creation, run
138
- `apps create "<canonical-config-title>" . --json` exactly once and verify id,
139
- slug, edit permission, and personal scope. For explicit team scope, discover
140
- and describe `LOCAL_NOTIS_CREATE_APP`, dry-run it, then execute it exactly once
141
- with the canonical title, team visibility, and verified current team scope;
142
- verify id/slug/team scope/edit permission and `apps link` that exact id. Then
143
- compare declared databases, mutate only
144
- missing/changed backward-compatible schemas with ownership proof, run exactly
145
- one `apps deploy`, and read back id/version/Portal URL before live verify.
146
- 5. Check project health:
147
- - `npx --package @notis_ai/cli@latest -- notis apps doctor`
148
- 6. Only after the user explicitly approves the current Store preview, submit the deployed version:
149
- - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
150
-
151
- ### App development rules
152
-
153
- - Always `build` before `deploy`; run `verify` before deploy when validating an app change.
154
- - Never run `apps dev` in a hosted sandbox. Deploy every successfully verified
155
- sandbox app create or edit unless explicitly told preview-only, read-only, or
156
- no-deploy, then prove the remote id/version and live runtime. Other app tasks
157
- do not authorize mutation.
158
- - Deploy does not create databases. Compare first; materialize only missing or
159
- changed hosted-app schemas, and verify exact ownership before an update.
160
- - Build and verify before hosted app creation or database mutation. Only
161
- backward-compatible schema expansion may happen before deployment.
162
- - In hosted sandboxes, bootstrap `agent-browser` and include its package on the
163
- verification command's `PATH`; `--no-browser` is not a passing automated gate.
164
- - Never deploy a local Desktop edit until the user tests the DEV app and asks.
165
- - 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.
166
- - Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
167
- - Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
168
- - Use `npx --package @notis_ai/cli@latest -- notis apps list --json` to discover exact slugs, permissions, versions, and Portal links before linking and after deployment; use a metadata-only (`include_documents: false`) exact app-detail read to prove personal/team scope without materializing databases.
169
- - Never treat deploy approval as Store approval. Set visibility to Team or Public first, then run `apps publish --confirm-ready` only after the user explicitly confirms the current App Details page and Store listing.
170
- - `apps publish --confirm-ready` submits the deployed snapshot through the same backend review flow as App Details. It must reject missing confirmation, incomplete listing media, a local/deployed version mismatch, private visibility, or an existing pending review.
171
-
172
- ### App development command reference
173
-
174
- - `npx --package @notis_ai/cli@latest -- notis apps list` -- list accessible apps
175
- - `npx --package @notis_ai/cli@latest -- notis apps init` -- scaffold a new Vite + React + `@notis/sdk` project
176
- - `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
177
- - `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
178
- - `npx --package @notis_ai/cli@latest -- notis apps build` -- compile the production artifact
179
- - `npx --package @notis_ai/cli@latest -- notis apps verify` -- headless render-smoke packaged routes before deploy
180
- - `npx --package @notis_ai/cli@latest -- notis apps create` -- create a fresh remote app and optionally link the local project
181
- - `npx --package @notis_ai/cli@latest -- notis apps link` -- associate the project with a remote app
182
- - `npx --package @notis_ai/cli@latest -- notis apps deploy` -- upload the artifact and editable source snapshot to the linked installed app in Notis
183
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct` -- deploy directly to Supabase storage, bypassing the backend server (auto-fallback when server is down)
184
- - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready` -- submit the matching deployed version for Team or Public Store review after explicit user confirmation
185
- - `npx --package @notis_ai/cli@latest -- notis apps doctor` -- run project diagnostics
186
-
187
- App Details remains the visual review surface and offers the same Publish/Update action. The CLI command is for agents completing an already approved submission; it does not weaken the separate confirmation gate.
188
-
189
- If the task is specifically about app structure, runtime behavior, or database/view packaging, pair this skill with the `notis-apps` skill. Use `notis-cli` for the command workflow and `notis-apps` for the product/runtime contract.
190
-
191
- ## IMPORTANT: When NOT to use tool access for app development
192
-
193
- When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for app file operations:
194
-
195
- - Loading or saving app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps deploy`
196
- - Linting app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` which validates automatically
197
- - Managing app routes -- write standard Vite + React pages in `app/`, not raw JS files
198
-
199
- Database schemas are the exception: declaring a slug in `notis.config.ts` does
200
- not create it. Use the discovery-first native database tool workflow to
201
- create/update and read back each app-owned schema before deployment. Tool calls
202
- are also valid for testing runtime behavior after deployment.
203
-
204
- ## Section 2: Accessing Tools Through the Notis CLI
205
-
206
- Use this section when the current agent does not already have the right tool and needs to reach tools through Notis.
207
-
208
- This is the main escape hatch for:
209
-
210
- - direct MCP access
211
- - Composio-backed integrations
212
- - native Notis tools that are available through the generic CLI tool bridge
213
- - any task where you need to discover the canonical tool name and schema before execution
75
+ ## User and repository policy takes precedence
76
+
77
+ Default delivery below applies only when no more restrictive user or repository
78
+ instruction exists. Explicit preview-only/no-deploy requests and standing requirements
79
+ for explicit deployment consent override the default. Preserve that authority across
80
+ local and cloud runs. For local-only work, build and run stub verification; do not
81
+ create remote resources or deploy a Space. Use the CLI's documented
82
+ build/verification harness. Store publication remains
83
+ separately authorized.
214
84
 
215
85
  ### Tool access workflow
216
86
 
@@ -240,6 +110,9 @@ use `--timeout-ms 90000` for `tools toolkits`, `tools search`, `tools describe`,
240
110
  and schema-only discovery calls. If a discovery call returns `network_timeout`,
241
111
  retry that same command once with `--timeout-ms 90000`; do not start a new
242
112
  query, invent a tool name, or loop on the default 30-second command.
113
+ The CLI itself retries dropped connections and gateway errors when repeating a
114
+ call is safe, within that same budget, so never wrap a CLI call in your own
115
+ retry loop ([details](references/troubleshooting.md)).
243
116
 
244
117
  Discovery is idempotent but should be bounded: run the toolkit listing once per
245
118
  task, run one natural-language search per distinct capability, and cache the
@@ -258,131 +131,29 @@ discovery request before every connected-service action.
258
131
  - Use `--reconnect` to replace an existing connection. If multiple accounts exist, select one with `--connection-id <id>`.
259
132
  - For API keys, basic auth, or other credential JSON, prefer `--credentials -` and pipe or redirect stdin. Avoid inline secrets because they can enter shell history and process listings.
260
133
 
261
- ### Toolkit mental model
262
-
263
- Typical toolkit namespaces include:
264
-
265
- - `notis` for native Notis tools
266
- - `composio-*` for Composio-backed integrations
267
- - `mcp-*` for MCP-backed tools
268
-
269
- The pattern is:
270
-
271
- 1. discover toolkits
272
- 2. search tools
273
- 3. inspect schema if needed
274
- 4. execute the canonical tool
275
-
276
- ### Tool access examples
277
-
278
- Find a tool:
279
-
280
- ```bash
281
- npx --package @notis_ai/cli@latest -- notis tools toolkits
282
- npx --package @notis_ai/cli@latest -- notis tools search "list today's calendar events"
283
- ```
284
-
285
- Inspect a tool before execution:
286
-
287
- ```bash
288
- npx --package @notis_ai/cli@latest -- notis tools describe composio-googlecalendar-list_events
289
- npx --package @notis_ai/cli@latest -- notis tools exec composio-googlecalendar-list_events --get-schema
290
- ```
291
-
292
- Dry-run a tool call:
293
-
294
- ```bash
295
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --dry-run --arguments '{"database_slug":"tasks"}'
296
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
297
- ```
298
-
299
- Execute a tool call:
300
-
301
- ```bash
302
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"tasks"}'
303
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
304
- ```
305
-
306
- Connect a missing toolkit:
307
-
308
- ```bash
309
- npx --package @notis_ai/cli@latest -- notis tools link github
310
- ```
311
-
312
- Reconnect a credential-based toolkit without putting the secret in shell history:
313
-
314
- ```bash
315
- npx --package @notis_ai/cli@latest -- notis tools link dataforseo --reconnect --credentials - < credentials.json
316
- ```
317
-
318
- ## Native database access
319
-
320
- Native Notis databases are accessed through the generic tool workflow, not a first-class database command group. Use these canonical tool names:
321
-
322
- - `LOCAL_NOTIS_DATABASE_LIST_DATABASES` -- list databases accessible to the current profile
323
- - `LOCAL_NOTIS_DATABASE_GET_DATABASE` -- inspect read-only metadata and schema detail
324
- - `LOCAL_NOTIS_DATABASE_QUERY` -- query documents from a database
325
- - `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` -- create or update a database schema. Every database belongs to a Notis app: creation requires the owning app's slug or id in the `app` argument (create the app first with `LOCAL_NOTIS_CREATE_APP` if needed)
326
-
327
- Example workflow before building an app:
328
-
329
- ```bash
330
- npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
331
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'
332
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --get-schema
333
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"social_media_calendar"}'
334
- npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"social-media-calendar-db-id","query":{"page_size":1}}'
335
- ```
336
-
337
- When `LOCAL_NOTIS_DATABASE_LIST_DATABASES` or `LOCAL_NOTIS_DATABASE_GET_DATABASE` returns a database ID, prefer `database_id` for `LOCAL_NOTIS_DATABASE_QUERY`; `database_slug` remains supported as a fallback.
338
-
339
- ## Supporting commands
340
-
341
- - `npx --package @notis_ai/cli@latest -- notis whoami` — confirm which account and endpoint a command will target
342
- - `npx --package @notis_ai/cli@latest -- notis doctor` — verify CLI config, auth, routing, and API reachability before relying on the CLI
343
- - `npx --package @notis_ai/cli@latest -- notis describe <command...>` — get the exact command contract for first-class CLI commands
344
-
345
- ## Summary
346
-
347
- Use `notis-cli` for two things:
348
-
349
- 1. local app development through `npx --package @notis_ai/cli@latest -- notis apps ...`
350
- 2. tool discovery and execution through `npx --package @notis_ai/cli@latest -- notis tools ...`
351
-
352
- Most importantly: if you do not currently have the tool you need, especially for direct MCP or integration work, use the Notis CLI instead of treating the task as blocked.
353
-
354
- ## Troubleshooting
355
-
356
- ### CLI returns `auth_expired` or `auth_missing`
357
-
358
- The profile's browser authorization has lapsed or was never granted. Run
359
- `notis login` (add `--profile <name>` when the failing profile is not the
360
- active one) and have the user approve the browser prompt. In JSON/agent mode
361
- the first hint is the exact command to run. Do not copy refresh tokens into
362
- commands or try to mint a credential yourself.
363
-
364
- If the profile is a `dev-*` one, the fix is to restart `./dev.sh` in the
365
- workspace it belongs to, or to switch to a real account profile.
366
-
367
- ### Deploy fails with "network_error" or "fetch failed"
368
-
369
- The CLI defaults to the live Notis API (`https://api.notis.ai`, or
370
- `https://api-beta.notis.ai` when the signed-in user is on beta). Solutions:
371
-
372
- 1. Run `npx --package @notis_ai/cli@latest -- notis doctor` and confirm `api_base` is a live Notis host
373
- 2. Use `--direct` for app deploys when you only need Supabase storage upload: `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
374
- 3. If auth looks stale, run `npx --package @notis_ai/cli@latest -- notis login` and retry
375
-
376
- Localhost backends are a Notis-developer test lane only. Do not retarget the CLI at loopback from this skill — that path is owned by `./dev.sh`, which exposes its own lease-backed `dev-*` profile.
377
-
378
- ### `npx --package @notis_ai/cli@latest -- notis doctor` shows health/tool_roundtrip errors
379
-
380
- The CLI health check pings the configured live API. App development commands that are `backend_call: local` (`init`, `build`, `verify`, `link`, `doctor`) work offline. `dev`, `pull`, `create`, `list`, and normal `deploy` need the live API; `deploy --direct` can bypass it when Supabase credentials are available.
381
-
382
- ### Stale bundle in the portal after deploy
383
-
384
- The portal caches app bundles by version. If you re-deploy to the same version, the portal may serve the cached old bundle. Solutions:
385
-
386
- 1. Hard refresh the portal page (Cmd+Shift+R)
387
- 2. Open browser DevTools > Application > Storage > Clear site data
388
- 3. The bundle cache key includes version number -- incrementing the version forces a fresh load
134
+ ## Task guides
135
+
136
+ Read only the guide needed for this task. Relative links resolve in the skill bundle.
137
+ For hosted MCP, fetch the matching `notis://docs/notis-cli/references/<file>.md` URI
138
+ with resources/read or the available Notis resource-fetch tool; the root resource
139
+ also rewrites these links to their published URIs.
140
+
141
+ - [Space delivery](references/app-delivery.md)
142
+ - [Toolkit mental model](references/tool-examples.md)
143
+ - [Native database access](references/native-databases.md)
144
+ - [Supporting commands](references/troubleshooting.md)
145
+
146
+ ## Intelligence for skills and delegated work
147
+
148
+ Skills request `low`, `medium`, or `high`, never a fixed model name. Discover the
149
+ read-only `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY` tool to obtain the shared `contract`
150
+ and current mapping
151
+ for `notis`, `codex`, or `claude_code` and the requested `level`. Resolve model and
152
+ reasoning effort together at the start of each job; validate the selected options
153
+ with the executing harness. Explicit invocation overrides win. A fixed-model
154
+ harness may inherit and disclose that the level was not applied; an automated
155
+ launcher needing an exact selection stops before side effects if policy is unavailable.
156
+ Repository and installed skills consume that same response; neither needs a
157
+ checkout-relative document. Record actual execution receipts, not the level name, as model provenance. Media
158
+ engines remain separate capabilities selected by their tools. See
159
+ [the intelligence contract](references/intelligence.md) for cross-environment details.
@@ -0,0 +1,17 @@
1
+ # Space delivery
2
+
3
+ Use the canonical `notis-spaces` skill's entrypoint and [release guide](../../notis-spaces/references/release.md).
4
+ For hosted MCP fetch `notis://docs/notis-spaces` and `notis://docs/notis-spaces/references/release.md`.
5
+ User/repository no-deploy and explicit-consent policies take precedence over default delivery.
6
+
7
+ ## IMPORTANT: When NOT to use tool access for Space development
8
+
9
+ When building or deploying a Space, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for source operations:
10
+
11
+ - Loading, building or publishing source -- use `notis spaces pull`, `spaces build`, `spaces verify`, `spaces preview`, `spaces deploy` and `spaces promote` as the release guide orders them
12
+ - Validating views -- `spaces build` and `spaces verify` check declarations, fixtures and renders
13
+ - Writing pages -- write standard Vite + React views with `@notis/sdk`, not raw JS files
14
+
15
+ Database schemas have two routes: the native database tool (create with `links.add`
16
+ and `main_view`), or a `create` declaration in Space source that the deploy applies
17
+ atomically. Tool calls are also valid for testing runtime behavior after deployment.
@@ -0,0 +1,94 @@
1
+ # Agent intelligence levels
2
+
3
+ This is one shared contract for repository skills and account-installed skills.
4
+ Read it from the `contract` field returned by `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY`,
5
+ directly as a native tool or through the authenticated Notis CLI. The same response
6
+ contains current harness mappings and a `contract_revision` fingerprint. No local
7
+ repository document is a runtime prerequisite. This bundled guide is the source
8
+ served by that lookup, not a separate environment-specific contract.
9
+
10
+ Skills request **low**, **medium**, or **high**. They never maintain model names,
11
+ version pins, family aliases, effort tables, or price scorecards. The current
12
+ Notis runtime policy is the source of truth, on every operating system and host.
13
+
14
+ ## Choosing a level
15
+
16
+ | Level | Work |
17
+ | --- | --- |
18
+ | **low** | Bounded extraction, classification against a supplied rubric, formatting, and repetitive generation from complete inputs. |
19
+ | **medium** | Synthesis, writing and reviewing prose from supplied evidence, and moderately complex bounded work. |
20
+ | **high** | The skill default when unspecified: complex reasoning, investigation, coding, code review, and orchestration. |
21
+
22
+ These are skill defaults, not changes to account or product defaults. The user's
23
+ explicit instruction for this invocation wins: level, exact model, effort,
24
+ harness, or inheritance from the current session. Preserve the scope of that
25
+ override; never save a lasting preference unless asked. Maximum-depth requests
26
+ are invocation overrides, not a fourth Notis level.
27
+
28
+ ## Resolve at execution time
29
+
30
+ Discover **get current Notis intelligence policy for each harness** through the
31
+ Notis tool catalogue. The read-only tool is `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY`:
32
+
33
+ ```bash
34
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_GET_INTELLIGENCE_POLICY \
35
+ --arguments '{"harness":"codex","level":"low"}'
36
+ ```
37
+
38
+ Omit arguments to read all levels. Harness keys are `notis`, `codex`, and
39
+ `claude_code`. A local Mac, Windows host, cloud sandbox, or CI runner uses the
40
+ same contract. Cursor or another host must identify its actual execution engine;
41
+ it must not pretend to be a supported harness based on installed binaries.
42
+
43
+ The projection is generated from the backend native intelligence configuration and external-harness policy. It contains no
44
+ second mapping. Weekly policy changes therefore require no skill edits.
45
+
46
+ - Resolve **both model and reasoning effort**. Level names are not effort names.
47
+ - Resolve once per delegated job; keep its `policy_revision` and selection stable
48
+ through claim, generation, retry and completion. A new job gets a fresh policy.
49
+ - Explicit user choices override the selection; validate them with the executing
50
+ harness. Never substitute another model, buy API capacity, or change accounts
51
+ because a selection is unavailable.
52
+ - Validate the request against advertised harness capabilities. Policy is not
53
+ evidence of entitlement, quota, installed support or successful execution.
54
+ - Use native `intelligence_mode` when the Notis delegation interface supports it.
55
+ External launchers translate the returned selection into their supported options.
56
+ - Do not downgrade or restart the main session to enforce a skill default.
57
+ - A single-model harness can inherit its current configuration and disclose that
58
+ the requested level was not applied. Unknown or unavailable mappings are not
59
+ permission to guess a model. Automated launchers that require an exact selection
60
+ stop before claiming jobs or producing side effects and explain the missing policy.
61
+ - Before this lookup is deployed, use a current runtime-injected policy if present;
62
+ otherwise use the transparent inheritance behavior above. Do not copy a temporary
63
+ model table into skills as a rollout workaround.
64
+
65
+ ## Modalities, product assertions and provenance
66
+
67
+ Image, speech, video, embedding and provider-research engines are capabilities,
68
+ not interchangeable text-reasoning levels. Skills discover the current native
69
+ capability and let its backend select the engine. External scripts requiring an
70
+ exact provider-specific identifier must resolve current supported configuration
71
+ or take an explicit invocation override; they must not pass `low` as an engine ID.
72
+
73
+ Test specs assert behavior against the current backend configuration, rather than
74
+ freezing last month's model names. Preserve exact comparisons: derive the expected
75
+ identifier from the owning policy or tool configuration, then compare the receipt.
76
+ Do not weaken a routing test to merely check that some model name exists.
77
+
78
+ Persist **the actual model that ran**, not an intelligence level. Resolve before
79
+ claiming jobs when the identifier participates in a prompt hash or lease contract.
80
+ Verify execution readback before certifying provenance; aliases and requested
81
+ settings are not actual-model receipts. Preserve historical evidence and existing
82
+ records. Do not rewrite an old receipt as today's policy.
83
+
84
+ ## Subscription execution
85
+
86
+ A level chooses intelligence, not payment authority. Use the current harness's
87
+ sub-agents or the user's subscription CLI. The existing direct-provider approval
88
+ boundary remains in the workspace/account provider-approval policy.
89
+
90
+ For subscription CLI subprocesses, remove provider API-key/base-URL variables
91
+ from the child environment. Preserve native subscription credentials; never log
92
+ out or rewrite account authentication to enforce a level. Check the harness's
93
+ execution/authentication readback. Resolve only once per job, batch bounded items
94
+ where appropriate, and keep existing concurrency and usage limits.
@@ -0,0 +1,21 @@
1
+ ## Native database access
2
+
3
+ Native Notis databases are accessed through the generic tool workflow, not a first-class database command group. Use these canonical tool names:
4
+
5
+ - `LOCAL_NOTIS_DATABASE_LIST_DATABASES` -- list databases accessible to the current profile
6
+ - `LOCAL_NOTIS_DATABASE_GET_DATABASE` -- inspect read-only metadata and schema detail
7
+ - `LOCAL_NOTIS_DATABASE_QUERY` -- query documents from a database
8
+ - `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` -- create or update a database schema. A new database is linked to a Space in the same call (`links.add`) and names its main view; change a database used in Spaces through protocol 1 with its exact Space binding target
9
+ - `LOCAL_NOTIS_DATABASE_DELETE_DATABASE` -- permanently delete a database and all its rows by `database_id`. It is refused for every database a Space links (`database_linked_to_space`: move it instead; a database used only in one Space is deleted with that Space from the bin), for a legacy App database its App declares, and while another database relates to it or an automation is triggered by it; the error says what to remove first
10
+
11
+ Example workflow before building a Space view:
12
+
13
+ ```bash
14
+ npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
15
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'
16
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --get-schema
17
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_id":"<id from LIST_DATABASES>"}'
18
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","page_size":1}}'
19
+ ```
20
+
21
+ Most databases are used in Spaces. Such a database is read only through one of its links: `GET_DATABASE` with a bare `database_id` returns `resolved_target` (the main view's `{space_id, binding}`), and a bare-id `QUERY` answers `database_in_spaces` with every link. Reuse that exact target with `protocol: 1`. Every database lives in a Space; a `database_slug` resolves among every database you can reach, and a slug several of them share answers `database_slug_ambiguous` with each `database_id` and its Spaces.
@@ -0,0 +1,56 @@
1
+ ### Toolkit mental model
2
+
3
+ Typical toolkit namespaces include:
4
+
5
+ - `notis` for native Notis tools
6
+ - `composio-*` for Composio-backed integrations
7
+ - `mcp-*` for MCP-backed tools
8
+
9
+ The pattern is:
10
+
11
+ 1. discover toolkits
12
+ 2. search tools
13
+ 3. inspect schema if needed
14
+ 4. execute the canonical tool
15
+
16
+ ### Tool access examples
17
+
18
+ Find a tool:
19
+
20
+ ```bash
21
+ npx --package @notis_ai/cli@latest -- notis tools toolkits
22
+ npx --package @notis_ai/cli@latest -- notis tools search "list today's calendar events"
23
+ ```
24
+
25
+ Inspect a tool before execution:
26
+
27
+ ```bash
28
+ npx --package @notis_ai/cli@latest -- notis tools describe composio-googlecalendar-list_events
29
+ npx --package @notis_ai/cli@latest -- notis tools exec composio-googlecalendar-list_events --get-schema
30
+ ```
31
+
32
+ Dry-run a tool call:
33
+
34
+ ```bash
35
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --dry-run --arguments '{"database_id":"<tasks database id>"}'
36
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","page_size":10}}'
37
+ ```
38
+
39
+ Execute a tool call:
40
+
41
+ ```bash
42
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_id":"<tasks database id>"}'
43
+ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","page_size":10}}'
44
+ ```
45
+
46
+ Connect a missing toolkit:
47
+
48
+ ```bash
49
+ npx --package @notis_ai/cli@latest -- notis tools link github
50
+ ```
51
+
52
+ Reconnect a credential-based toolkit without putting the secret in shell history:
53
+
54
+ ```bash
55
+ npx --package @notis_ai/cli@latest -- notis tools link dataforseo --reconnect --credentials - < credentials.json
56
+ ```