@notis_ai/cli 0.2.0-beta.156.1 → 0.2.0-beta.158.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 (69) hide show
  1. package/README.md +11 -45
  2. package/config/notis_app_design_rules.json +135 -0
  3. package/dist/agent-hooks/notis-agent-hook.mjs +8893 -10612
  4. package/dist/base-skills/notis-apps/SKILL.md +25 -573
  5. package/dist/base-skills/notis-apps/references/architecture.md +147 -0
  6. package/dist/base-skills/notis-apps/references/design.md +154 -0
  7. package/dist/base-skills/notis-apps/references/release.md +93 -0
  8. package/dist/base-skills/notis-apps/references/sdk.md +60 -0
  9. package/dist/base-skills/notis-apps/references/troubleshooting.md +26 -0
  10. package/dist/base-skills/notis-cli/SKILL.md +19 -267
  11. package/dist/base-skills/notis-cli/references/app-delivery.md +18 -0
  12. package/dist/base-skills/notis-cli/references/native-databases.md +20 -0
  13. package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
  14. package/dist/base-skills/notis-cli/references/troubleshooting.md +39 -0
  15. package/dist/base-skills/notis-query/SKILL.md +13 -651
  16. package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
  17. package/dist/base-skills/notis-query/references/documents.md +50 -0
  18. package/dist/base-skills/notis-query/references/query.md +543 -0
  19. package/dist/skill-sync/index.js +24 -7
  20. package/dist/skill-sync/index.js.map +4 -4
  21. package/dist/skill-sync-worker.mjs +2989 -0
  22. package/package.json +1 -2
  23. package/skills/notis-apps/cli.md +34 -95
  24. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +1 -1
  25. package/src/cli.js +4 -0
  26. package/src/command-specs/apps.js +322 -1560
  27. package/src/command-specs/diagnostics.js +37 -0
  28. package/src/command-specs/skills.js +23 -5
  29. package/src/runtime/agent-browser.js +169 -1
  30. package/src/runtime/app-boundary-validator.js +221 -0
  31. package/src/runtime/app-platform.js +359 -233
  32. package/src/runtime/app-test-server.js +292 -0
  33. package/src/runtime/profiles.js +5 -2
  34. package/src/runtime/skill-sync/cloud-client.ts +2 -1
  35. package/src/runtime/skill-sync/index.ts +24 -6
  36. package/src/runtime/skill-sync/types.ts +2 -0
  37. package/src/runtime/skill-sync-service.js +109 -0
  38. package/src/skill-sync-worker-entry.js +2 -0
  39. package/src/skill-sync-worker.js +50 -0
  40. package/template/app/page.tsx +45 -44
  41. package/template/components/page-heading.tsx +23 -0
  42. package/template/components/ui/badge.tsx +7 -4
  43. package/template/components/ui/card.tsx +24 -11
  44. package/template/components/ui/native-select.tsx +24 -0
  45. package/template/notis.config.ts +0 -1
  46. package/template/package.json +2 -2
  47. package/template/packages/sdk/package.json +1 -2
  48. package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +55 -13
  49. package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +3 -1
  50. package/template/packages/sdk/src/config.ts +0 -2
  51. package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +138 -28
  52. package/template/packages/sdk/src/hooks/useLongPressSelection.ts +79 -0
  53. package/template/packages/sdk/src/hooks/useMultiSelect.ts +2 -8
  54. package/template/packages/sdk/src/index.ts +3 -0
  55. package/template/packages/sdk/src/interactions/actions.ts +14 -1
  56. package/template/packages/sdk/src/interactions/shortcuts.tsx +79 -19
  57. package/template/packages/sdk/src/interactions/visibility.ts +13 -0
  58. package/template/packages/sdk/src/interactions.ts +5 -1
  59. package/template/packages/sdk/src/styles.css +28 -1
  60. package/src/runtime/app-dev-build-supervisor.js +0 -47
  61. package/src/runtime/app-dev-build.js +0 -41
  62. package/src/runtime/app-dev-consumers.js +0 -154
  63. package/src/runtime/app-dev-host-lock.js +0 -80
  64. package/src/runtime/app-dev-process-identity.js +0 -111
  65. package/src/runtime/app-dev-roots.js +0 -284
  66. package/src/runtime/app-dev-server.js +0 -1136
  67. package/src/runtime/app-dev-sessions.js +0 -185
  68. package/src/runtime/cli-mode.generated.js +0 -5
  69. package/src/runtime/cli-mode.js +0 -34
package/README.md CHANGED
@@ -186,45 +186,12 @@ Create a new remote Notis app and optionally link a local project to it.
186
186
 
187
187
  When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
188
188
 
189
- Examples:
190
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
191
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
192
-
193
- ### `npx --package @notis_ai/cli@latest -- notis apps dev [dir]`
194
-
195
- Register a development root and connect its apps to the shared local development host.
196
-
197
- 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. A linked app substitutes its online bundle only when local notisAppVersion is strictly greater than the installed release.
198
-
199
189
  Options:
200
- - `--port <number>` — Local bundle server port (default: 5173).
201
- - `--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.
202
- - `--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.
203
- - `--grant-cloud-shell` — Approve a cloudComputer: 'shell' declaration without the interactive prompt. The grant persists for this dev app; authorship alone never grants it.
190
+ - `--team-id <id>` — Create or reuse the exact team-scoped app (default: personal).
204
191
 
205
192
  Examples:
206
- - `npx --package @notis_ai/cli@latest -- notis apps dev`
207
- - `npx --package @notis_ai/cli@latest -- notis apps dev ./my-app`
208
- - `npx --package @notis_ai/cli@latest -- notis apps dev ./workspace --port 5200`
209
- - `npx --package @notis_ai/cli@latest -- notis apps dev --scratch # isolated resources for fixture or schema experiments`
210
-
211
- ### `npx --package @notis_ai/cli@latest -- notis apps roots list`
212
-
213
- List persistent machine-local Notis app development roots.
214
-
215
- When to use: See which folders every local Notis Desktop instance watches for development apps.
216
-
217
- Examples:
218
- - `npx --package @notis_ai/cli@latest -- notis apps roots list`
219
-
220
- ### `npx --package @notis_ai/cli@latest -- notis apps roots remove <folder>`
221
-
222
- Stop watching a registered Notis app development root.
223
-
224
- When to use: Remove a persistent development root. The built-in ~/.notis/apps root cannot be removed.
225
-
226
- Examples:
227
- - `npx --package @notis_ai/cli@latest -- notis apps roots remove ./old-apps`
193
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
194
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
228
195
 
229
196
  ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
230
197
 
@@ -286,15 +253,19 @@ Link a local project to a remote Notis app.
286
253
 
287
254
  When to use: Connect a local project to an existing app for deployment.
288
255
 
256
+ Options:
257
+ - `--expected-version <version>` — Link only if the remote deployment version still matches this non-negative integer.
258
+
289
259
  Examples:
290
260
  - `npx --package @notis_ai/cli@latest -- notis apps link abc123`
291
261
  - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./my-app`
262
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./recovered-app --expected-version 0`
292
263
 
293
264
  ### `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir]`
294
265
 
295
266
  Download a Notis app source snapshot into a local project folder.
296
267
 
297
- When to use: Edit an installed app locally. Preserve any local edits, pull and link the latest persisted source, then increment package.json notisAppVersion above that release before notis apps dev; continue with build and deploy.
268
+ When to use: Edit an installed app. Preserve local edits, pull and link its persisted source, then build, verify and deploy.
298
269
 
299
270
  Options:
300
271
  - `--force` — Overwrite a non-empty target directory.
@@ -306,20 +277,15 @@ Examples:
306
277
 
307
278
  ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
308
279
 
309
- Build and upload the app to the linked Notis app.
280
+ Build, verify and release the linked Workspace app.
310
281
 
311
- 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.
282
+ When to use: Build, verify and release the linked personal or team Workspace app. This command does not publish to the Store.
312
283
 
313
284
  Options:
314
285
  - `--app-id <id>` — Override linked app ID.
315
- - `--skip-build` — Skip the build step (use existing .notis/output/).
316
- - `--direct` — Explicitly upload to Supabase storage, bypassing the backend server.
286
+ - `--skip-build` — Reuse unchanged build output; automated verification still runs.
317
287
 
318
288
  Examples:
319
- - `npx --package @notis_ai/cli@latest -- notis apps deploy`
320
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --skip-build`
321
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --app-id abc123`
322
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
323
289
 
324
290
  ### `npx --package @notis_ai/cli@latest -- notis apps publish [dir]`
325
291
 
@@ -0,0 +1,135 @@
1
+ {
2
+ "version": 1,
3
+ "include": ["app/**", "components/**"],
4
+ "exclude": [
5
+ "components/ui/input.tsx",
6
+ "components/ui/textarea.tsx",
7
+ "components/ui/checkbox.tsx",
8
+ "components/ui/switch.tsx",
9
+ "components/ui/button.tsx"
10
+ ],
11
+ "extensions": [".js", ".jsx", ".ts", ".tsx", ".css"],
12
+ "allow_directive": "notis-design-allow",
13
+ "allow_reason_min_length": 12,
14
+ "rules": [
15
+ {
16
+ "id": "no-border-box",
17
+ "severity": "error",
18
+ "pattern": "(?<![\\w-])border(?![\\w-])|(?<![\\w-])border-(?:[xy]|\\d+)(?![\\w-])",
19
+ "message": "Four-side borders are banned. Use a flat Card (bg-muted / bg-background) or a single border-t / border-b hairline between sections.",
20
+ "exclude": ["components/ui/badge.tsx", "components/ui/card.tsx", "components/ui/native-select.tsx"]
21
+ },
22
+ {
23
+ "id": "no-side-bar",
24
+ "severity": "error",
25
+ "pattern": "\\bborder-[lr]-[248]\\b",
26
+ "message": "Thick left or right border bars are banned. Indicate selection with a background tint (bg-muted)."
27
+ },
28
+ {
29
+ "id": "no-dashed-box",
30
+ "severity": "error",
31
+ "pattern": "\\bborder-dashed\\b",
32
+ "message": "Dashed boxes are banned. Empty states are centered muted text with an optional primary button."
33
+ },
34
+ {
35
+ "id": "no-divide",
36
+ "severity": "error",
37
+ "pattern": "\\bdivide-[xy]\\b|<hr\\b",
38
+ "message": "Row dividers are banned. Use spacing, .list-row hover tint, or one hairline between sections."
39
+ },
40
+ {
41
+ "id": "no-ring-box",
42
+ "severity": "error",
43
+ "pattern": "(?<![\\w:-])ring-(?:1|2|4|inset)\\b",
44
+ "message": "Rings as a box or selection indicator are banned. Keep focus-visible:ring-2 on controls; use bg-muted for selection."
45
+ },
46
+ {
47
+ "id": "no-shadow",
48
+ "severity": "error",
49
+ "pattern": "\\bshadow-(?:sm|md|xl|2xl)\\b",
50
+ "message": "Shadows are banned on panels, cards, tiles, and bubbles. Only a floating popover or menu may use shadow-lg with bg-popover.",
51
+ "exclude": ["components/ui/popover.tsx", "components/ui/dropdown-menu.tsx", "components/ui/tooltip.tsx", "components/ui/select.tsx", "components/ui/dialog.tsx", "components/ui/sheet.tsx"]
52
+ },
53
+ {
54
+ "id": "no-floating-shadow-without-popover",
55
+ "severity": "error",
56
+ "pattern": "^(?!.*bg-popover).*\\bshadow-lg\\b",
57
+ "message": "shadow-lg is only allowed on a floating layer that also uses bg-popover.",
58
+ "exclude": ["components/ui/popover.tsx", "components/ui/dropdown-menu.tsx", "components/ui/tooltip.tsx", "components/ui/select.tsx", "components/ui/dialog.tsx", "components/ui/sheet.tsx"]
59
+ },
60
+ {
61
+ "id": "no-palette-hue",
62
+ "severity": "error",
63
+ "pattern": "\\b(?:bg|text|border|ring|from|via|to|fill|stroke|outline|decoration|accent|caret|divide|shadow|placeholder)-(?:red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone)-\\d{2,3}\\b",
64
+ "message": "Hardcoded Tailwind palette colors are banned. Use tokens: text-foreground, text-muted-foreground, text-primary, bg-muted, bg-primary/10, text-destructive, bg-destructive/10."
65
+ },
66
+ {
67
+ "id": "no-hex-color",
68
+ "severity": "error",
69
+ "pattern": "#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3}(?:[0-9a-fA-F]{2})?)?(?![\\w-])",
70
+ "message": "Hex colors are banned. Use theme tokens (hsl(var(--primary)) with opacity steps for charts)."
71
+ },
72
+ {
73
+ "id": "no-gradient",
74
+ "severity": "error",
75
+ "pattern": "\\bbg-gradient-|linear-gradient\\(|radial-gradient\\(|conic-gradient\\(",
76
+ "message": "Gradients are banned."
77
+ },
78
+ {
79
+ "id": "no-backdrop-blur",
80
+ "severity": "error",
81
+ "pattern": "\\bbackdrop-blur",
82
+ "message": "Glassmorphism is banned."
83
+ },
84
+ {
85
+ "id": "no-eyebrow",
86
+ "severity": "error",
87
+ "pattern": "\\buppercase\\b[^\\n]{0,80}\\btracking-(?:wide|wider|widest|\\[)|\\btracking-(?:wide|wider|widest|\\[)[^\\n]{0,80}\\buppercase\\b",
88
+ "message": "Uppercase tracking eyebrows are banned. Use a plain noun page title and text-xs text-muted-foreground labels."
89
+ },
90
+ {
91
+ "id": "no-tiny-text",
92
+ "severity": "error",
93
+ "pattern": "\\btext-\\[(?:[0-9]|1[01])(?:\\.\\d+)?px\\]",
94
+ "message": "Text below 12px is banned. Use text-xs (12px) at minimum."
95
+ },
96
+ {
97
+ "id": "no-badge-outline",
98
+ "severity": "error",
99
+ "pattern": "<Badge\\b[^>]*variant=[\"']outline[\"']",
100
+ "message": "Badge variant=\"outline\" is banned. Use default, secondary, or destructive."
101
+ },
102
+ {
103
+ "id": "no-raw-select",
104
+ "severity": "error",
105
+ "pattern": "<select\\b",
106
+ "message": "Raw <select> is banned. Use NativeSelect from @/components/ui/native-select.",
107
+ "exclude": ["components/ui/native-select.tsx"]
108
+ },
109
+ {
110
+ "id": "no-search-input",
111
+ "severity": "error",
112
+ "pattern": "<input\\b[^>]*type=[\"']search[\"']|<[Ii]nput\\b[^>]*placeholder=[\"'][^\"']*\\b[Ss]earch",
113
+ "message": "In-app search inputs are banned. The portal owns search: wire useTopBarSearch from @notis/sdk."
114
+ },
115
+ {
116
+ "id": "no-font-serif",
117
+ "severity": "error",
118
+ "pattern": "\\bfont-serif\\b",
119
+ "message": "font-serif is banned. Apps use the portal font."
120
+ },
121
+ {
122
+ "id": "no-loading-placeholder",
123
+ "severity": "error",
124
+ "pattern": ">\\s*Loading(?:\\.{3}|…)?(?:\\s[^<]{0,40})?<|[\"'`]Loading(?:\\.{3}|…)",
125
+ "message": "Loading text is banned. Keep headings visible and render Skeleton / ViewSkeleton from @notis/sdk in the missing region only."
126
+ },
127
+ {
128
+ "id": "no-app-shell-split",
129
+ "severity": "error",
130
+ "scope": "file",
131
+ "pattern": "notis-app-shell[\\s\\S]*<aside\\b|<aside\\b[\\s\\S]*notis-app-shell",
132
+ "message": "A list-plus-detail page must be full-bleed. Replace notis-app-shell with notis-app-split and the notis-app-pane-list / notis-app-pane-detail panes."
133
+ }
134
+ ]
135
+ }