@notis_ai/cli 0.2.27 → 0.2.29

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 (53) hide show
  1. package/README.md +2 -2
  2. package/config/notis_app_design_rules.json +5 -123
  3. package/dist/agent-hooks/notis-agent-hook.mjs +453 -109
  4. package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
  5. package/dist/base-skills/notis-spaces/SKILL.md +13 -19
  6. package/dist/base-skills/notis-spaces/references/design.md +11 -45
  7. package/dist/base-skills/notis-spaces/references/sdk.md +94 -68
  8. package/dist/base-skills/notis-spaces/references/views.md +12 -1
  9. package/dist/sdk/src/components/NotisCommentBoundary.tsx +43 -83
  10. package/dist/sdk/src/components/NotisSelectionBoundary.tsx +28 -8
  11. package/dist/sdk/src/components/SelectionActionBar.tsx +383 -0
  12. package/dist/sdk/src/components/selectionId.ts +6 -0
  13. package/dist/sdk/src/hooks/useCollectionInteractions.ts +5 -2
  14. package/dist/sdk/src/runtime.ts +5 -0
  15. package/dist/sdk/src/space.ts +4 -0
  16. package/dist/sdk/src/ui/icons.tsx +11 -2
  17. package/dist/sdk/src/words/actions.ts +9 -1
  18. package/dist/sdk/src/words/keymap.ts +3 -0
  19. package/dist/space-harness/host.js +181 -141
  20. package/dist/space-sdk/dist/{chunk-BWHAORT4.js → chunk-BFGB6XXC.js} +2 -2
  21. package/dist/space-sdk/dist/index.js +2 -2
  22. package/dist/space-sdk/dist/ui.js +14 -11
  23. package/dist/space-sdk/src/components/NotisCommentBoundary.d.ts +0 -10
  24. package/dist/space-sdk/src/components/NotisSelectionBoundary.d.ts +7 -0
  25. package/dist/space-sdk/src/runtime.d.ts +5 -0
  26. package/dist/space-sdk/src/space.ts +4 -0
  27. package/dist/space-sdk/src/tailwind-candidates.d.ts +126 -17
  28. package/dist/space-sdk/src/ui/blocks/DataTable.d.ts +86 -0
  29. package/dist/space-sdk/src/ui/blocks/InfoTip.d.ts +25 -0
  30. package/dist/space-sdk/src/ui/blocks/Meter.d.ts +39 -0
  31. package/dist/space-sdk/src/ui/blocks/blocks.d.ts +1 -1
  32. package/dist/space-sdk/src/ui/blocks/index.d.ts +6 -0
  33. package/dist/space-sdk/src/ui/charts/Chart.d.ts +15 -2
  34. package/dist/space-sdk/src/ui/charts/StatRow.d.ts +4 -3
  35. package/dist/space-sdk/src/ui/charts/chartData.d.ts +6 -0
  36. package/dist/space-sdk/src/ui/comments/useComments.d.ts +19 -1
  37. package/dist/space-sdk/src/ui/icons.d.ts +1 -1
  38. package/dist/space-sdk/src/ui/index.d.ts +2 -2
  39. package/dist/space-sdk/src/ui/list/Row.d.ts +10 -3
  40. package/dist/space-sdk/src/ui/period/dateFormat.d.ts +14 -0
  41. package/dist/space-sdk/src/words/actions.ts +9 -1
  42. package/dist/space-sdk/src/words/keymap.ts +3 -0
  43. package/dist/view-renderer/dist/host.js +253 -213
  44. package/dist/view-renderer/src/renderer.js +38 -2
  45. package/package.json +3 -3
  46. package/src/command-specs/computer.js +3 -3
  47. package/src/command-specs/spaces.js +28 -8
  48. package/src/command-specs/tools.js +1 -1
  49. package/src/runtime/app-platform.js +74 -11
  50. package/src/runtime/space-fixture-broker.js +23 -2
  51. package/src/runtime/space-verification.js +62 -10
  52. package/template/components/ui/button.tsx +1 -1
  53. package/template/components/ui/native-select.tsx +1 -1
package/README.md CHANGED
@@ -931,9 +931,9 @@ Examples:
931
931
 
932
932
  ### `npx --package @notis_ai/cli@latest -- notis computer restart`
933
933
 
934
- Restart a Cloud Computer that stopped answering. Its files are kept.
934
+ Restart your Cloud Computer, awake or not responding. Its files are kept.
935
935
 
936
- When to use: Only while notis computer status says it is not responding. Whatever was running on it stops; it answers again in 1 to 2 minutes.
936
+ When to use: When it is stuck, slow or not responding. Whatever was running on it stops; it answers again in 1 to 2 minutes. An asleep one has nothing to restart.
937
937
 
938
938
  Options:
939
939
  - `--yes` — Apply without the Continue? [y/N] question.
@@ -13,7 +13,7 @@
13
13
  "allow_reason_min_length": 12,
14
14
  "profiles": {
15
15
  "space": {
16
- "description": "Every file a Space view can draw from. Used by notis spaces build/verify/preview/deploy and by the server on source-verify, source-stage and source-publish. Rules without a profiles field run in every profile; rules with profiles run only in the listed ones. A rule's profile_messages.<profile> replaces its message and its profile_severity.<profile> its severity in that profile: Space style defaults warn, while the rules that protect the host frame, theme, keys and words still refuse. Comments are blanked before matching.",
16
+ "description": "Every file a Space view can draw from. Used by notis spaces build/verify/preview/deploy and by the server on source-verify, source-stage and source-publish. Rules without a profiles field run in every profile; rules with profiles run only in the listed ones. A rule's profile_messages.<profile> replaces its message and its profile_severity.<profile> its severity in that profile. In a Space the rules protect the host frame, theme, keys and words; the look is the Space's own. Comments are blanked before matching.",
17
17
  "include": ["app/**", "components/**", "hooks/**", "lib/**", "spaces/**", "src/**", "views/**"],
18
18
  "exclude": ["**/*.test.*", "**/*.spec.*", "**/__tests__/**", "**/fixtures/**"]
19
19
  }
@@ -21,70 +21,17 @@
21
21
  "toolkit_live_pieces": [],
22
22
  "toolkit_note": "Rules with a toolkit_piece point at a hand-rolled pattern the live Notis toolkit replaces. They stay warnings until that piece name is added to toolkit_live_pieces, then they refuse like any error.",
23
23
  "rules": [
24
- {
25
- "id": "no-border-box",
26
- "severity": "error",
27
- "profile_severity": { "space": "warn" },
28
- "pattern": "(?<![\\w-])border(?![\\w-])(?!\\s*:\\s*(?:0(?:px)?|none)\\s*(?:!important\\s*)?(?:[;}]))|(?<![\\w-])border-(?:[xy]|\\d+)(?![\\w-])",
29
- "message": "Four-side borders are banned. Use a flat tint (bg-muted / bg-background) or a single border-t / border-b hairline between sections.",
30
- "exclude": ["components/ui/badge.tsx", "components/ui/native-select.tsx"],
31
- "profile_messages": { "space": "Default look: no four-side borders; a flat tint (bg-muted / bg-background) or one border-t / border-b hairline separates sections. It warns and never blocks: depart from it when the view's own design calls for it." }
32
- },
33
24
  {
34
25
  "id": "no-side-bar",
35
26
  "severity": "error",
36
27
  "pattern": "(?<![\\w-])border-[lrtbse]-(?:[2-8](?![\\w.-])|\\[|(?:primary|destructive|foreground|muted-foreground|ring|accent|current)(?![\\w-]))|\\bshadow-\\[[^\\]\\s]*inset_(?:-?(?:[1-9]|0?\\.\\d*[1-9])|0(?:px)?_-?(?:[2-9]|[1-9]\\d))|(?:box-shadow|boxShadow)\\s*:[^;{}]*\\binset\\s+(?:-?(?:[1-9]|0?\\.\\d*[1-9])|0(?:px)?\\s+-?(?:[2-9]|[1-9]\\d))|(?<![\\w-])border-(?:left|right|top|bottom|inline-start|inline-end|block-start|block-end)(?:\\s*:(?!\\s*(?:(?:0(?:px)?|none)\\b|1px\\s+solid\\s+(?:transparent\\b|(?:hsl\\()?var\\(--[\\w-]*border)))|-width\\s*:(?!\\s*(?:0(?:px)?|1px)\\b)|-color\\s*:(?!\\s*(?:transparent\\b|(?:hsl\\()?var\\(--[\\w-]*border)))|\\bborder(?:Left|Right|Top|Bottom|InlineStart|InlineEnd|BlockStart|BlockEnd)\\s*:\\s*['\\\"`](?!(?:(?:0(?:px)?|none)\\b|1px\\s+solid\\s+(?:transparent\\b|(?:hsl\\()?var\\(--[\\w-]*border)))",
37
28
  "message": "One-side edges are banned: no thicker or coloured border and no inset shadow on a single side. Mark a selection or highlight with a background tint (bg-muted) or a 1px ring on all four sides."
38
29
  },
39
- {
40
- "id": "no-dashed-box",
41
- "severity": "error",
42
- "profile_severity": { "space": "warn" },
43
- "pattern": "\\bborder-dashed\\b",
44
- "message": "Dashed boxes are banned. Empty states are centered muted text with an optional primary button.",
45
- "profile_messages": { "space": "Default look: no dashed boxes; an empty state is centred muted text with an optional primary button. It warns and never blocks: depart from it when the view's own design calls for it." }
46
- },
47
- {
48
- "id": "no-divide",
49
- "severity": "error",
50
- "profile_severity": { "space": "warn" },
51
- "pattern": "\\bdivide-[xy]\\b|<hr\\b",
52
- "message": "Row dividers are banned. Use spacing, the Row hover from @notis/sdk/ui, or one hairline between sections.",
53
- "profile_messages": {
54
- "space": "Default look: no row dividers; Row from @notis/sdk/ui (its spacing and hover tint separate items) or one hairline between sections. It warns and never blocks: depart from it when the view's own design calls for it."
55
- }
56
- },
57
- {
58
- "id": "no-ring-box",
59
- "severity": "error",
60
- "profile_severity": { "space": "warn" },
61
- "pattern": "(?<![\\w:-])ring-(?:1|2|4|inset)\\b",
62
- "message": "Rings as a box or selection indicator are banned. Keep focus-visible:ring-2 on controls; use bg-muted for selection.",
63
- "profile_messages": { "space": "Default look: no ring as a box; selection is a bg-muted tint and focus-visible:ring-2 stays on controls. It warns and never blocks: depart from it when the view's own design calls for it." }
64
- },
65
- {
66
- "id": "no-shadow",
67
- "severity": "error",
68
- "profile_severity": { "space": "warn" },
69
- "pattern": "\\bshadow-(?:sm|md|xl|2xl)\\b",
70
- "message": "Shadows are banned on panels, cards, tiles, and bubbles. Only a floating popover or menu may use shadow-lg with bg-popover.",
71
- "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"],
72
- "profile_messages": { "space": "Default look: flat panels, cards, tiles and bubbles; only a floating popover or menu takes shadow-lg with bg-popover. It warns and never blocks: depart from it when the view's own design calls for it." }
73
- },
74
- {
75
- "id": "no-floating-shadow-without-popover",
76
- "severity": "error",
77
- "profile_severity": { "space": "warn" },
78
- "pattern": "^(?!.*bg-popover).*\\bshadow-lg\\b",
79
- "message": "shadow-lg is only allowed on a floating layer that also uses bg-popover.",
80
- "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"],
81
- "profile_messages": { "space": "Default look: shadow-lg belongs on a floating layer that also uses bg-popover. It warns and never blocks: depart from it when the view's own design calls for it." }
82
- },
83
30
  {
84
31
  "id": "no-palette-hue",
85
32
  "severity": "error",
86
33
  "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",
87
- "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."
34
+ "message": "Hardcoded Tailwind palette colors do not follow the light and dark themes. Use the theme tokens of the host and @notis/sdk/ui (toolkit.css)."
88
35
  },
89
36
  {
90
37
  "id": "no-hex-color",
@@ -92,46 +39,12 @@
92
39
  "pattern": "#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3}(?:[0-9a-fA-F]{2})?)?(?![\\w-])",
93
40
  "message": "Hex colors are banned. Use theme tokens (hsl(var(--primary)) with opacity steps for charts)."
94
41
  },
95
- {
96
- "id": "no-gradient",
97
- "severity": "error",
98
- "profile_severity": { "space": "warn" },
99
- "pattern": "\\bbg-gradient-|linear-gradient\\(|radial-gradient\\(|conic-gradient\\(",
100
- "message": "Gradients are banned.",
101
- "profile_messages": { "space": "Default look: no gradients. It warns and never blocks: depart from it when the view's own design calls for it." }
102
- },
103
- {
104
- "id": "no-backdrop-blur",
105
- "severity": "error",
106
- "profile_severity": { "space": "warn" },
107
- "pattern": "\\bbackdrop-blur",
108
- "message": "Glassmorphism is banned.",
109
- "profile_messages": { "space": "Default look: no glassmorphism. It warns and never blocks: depart from it when the view's own design calls for it." }
110
- },
111
- {
112
- "id": "no-eyebrow",
113
- "severity": "error",
114
- "profile_severity": { "space": "warn" },
115
- "pattern": "\\buppercase\\b[^\\n]{0,80}\\btracking-(?:wide|wider|widest|\\[)|\\btracking-(?:wide|wider|widest|\\[)[^\\n]{0,80}\\buppercase\\b",
116
- "message": "Uppercase tracking eyebrows are banned. Use a plain noun page title and text-xs text-muted-foreground labels.",
117
- "profile_messages": {
118
- "space": "Default look: no uppercase tracking eyebrows; labels are text-xs text-muted-foreground and the top bar crumb names the page. It warns and never blocks: depart from it when the view's own design calls for it."
119
- }
120
- },
121
42
  {
122
43
  "id": "no-tiny-text",
123
44
  "severity": "error",
124
45
  "pattern": "\\btext-\\[(?:[0-9]|1[01])(?:\\.\\d+)?px\\]",
125
46
  "message": "Text below 12px is banned. Use text-xs (12px) at minimum."
126
47
  },
127
- {
128
- "id": "no-badge-outline",
129
- "severity": "error",
130
- "profile_severity": { "space": "warn" },
131
- "pattern": "<Badge\\b[^>]*variant=[\"']outline[\"']",
132
- "message": "Badge variant=\"outline\" is banned. Use default, secondary, or destructive.",
133
- "profile_messages": { "space": "Default look: Badge variants default, secondary or destructive. It warns and never blocks: depart from it when the view's own design calls for it." }
134
- },
135
48
  {
136
49
  "id": "no-raw-select",
137
50
  "severity": "error",
@@ -148,14 +61,6 @@
148
61
  "space": "In-page search inputs are banned. Give ListReader a search prop from @notis/sdk/ui: the top bar owns the search field."
149
62
  }
150
63
  },
151
- {
152
- "id": "no-font-serif",
153
- "severity": "error",
154
- "profile_severity": { "space": "warn" },
155
- "pattern": "\\bfont-serif\\b",
156
- "message": "font-serif is banned. Apps use the portal font.",
157
- "profile_messages": { "space": "Default look: the portal font. It warns and never blocks: depart from it when the view's own design calls for it." }
158
- },
159
64
  {
160
65
  "id": "no-loading-placeholder",
161
66
  "severity": "error",
@@ -177,24 +82,8 @@
177
82
  "id": "no-page-heading",
178
83
  "severity": "error",
179
84
  "profiles": ["space"],
180
- "pattern": "\\bPageHeading\\b|(?<![\\w-])nui-heading(?:-[\\w-]+)?(?![\\w-])|\\bimport\\s+(?:type\\s+)?\\{[^}]*\\bCard\\b[^}]*\\}\\s*from\\b|<Card(?![\\w.])|['\\\"`]@/components/ui/card['\\\"`]",
181
- "message": "Spaces have no in-page title or card: the top bar shows the Space and the open record. Remove PageHeading and Card; give ListReader a title and lay blocks out with Section from @notis/sdk/ui."
182
- },
183
- {
184
- "id": "no-space-h1",
185
- "severity": "error",
186
- "profiles": ["space"],
187
- "pattern": "<h1(?![\\w-])|\\bcreateElement\\(\\s*['\\\"`]h1['\\\"`]",
188
- "message": "A Space never draws an h1: the top bar holds the title. Blocks inside the page take a Section title (an h2) from @notis/sdk/ui."
189
- },
190
- {
191
- "id": "no-centered-column",
192
- "severity": "error",
193
- "profile_severity": { "space": "warn" },
194
- "profiles": ["space"],
195
- "pattern": "(?<![\\w-])mx-auto(?![\\w-])[^\\n\\\"'`]*(?<![\\w-])(?:max-w-|container(?![\\w-]))|(?<![\\w-])(?:max-w-[\\w\\[\\]./-]+|container)(?![\\w-])[^\\n\\\"'`]*(?<![\\w-])mx-auto(?![\\w-])|(?:max-width|maxWidth)\\s*:[^{}]*\\bmargin(?:-inline|Inline)?\\s*:\\s*['\\\"`]?(?:0(?:px)?\\s+)?auto\\b|\\bmargin(?:-inline|Inline)?\\s*:\\s*['\\\"`]?(?:0(?:px)?\\s+)?auto\\b[^{}]*(?:max-width|maxWidth)\\s*:",
196
- "message": "Spaces fill their pane edge to edge. Drop the centred column (mx-auto with max-w or container, or max-width with margin auto): Section from @notis/sdk/ui keeps the 24px inset and form fields cap their own width.",
197
- "profile_messages": { "space": "Default look: a Space fills its pane edge to edge and Section keeps the 24px inset. A centred column is right for a reading, writing or focus layout; elsewhere drop it." }
85
+ "pattern": "\\bPageHeading\\b|(?<![\\w-])nui-heading(?:-[\\w-]+)?(?![\\w-])",
86
+ "message": "Spaces have no in-page page title: the top bar shows the Space and the open record. Remove PageHeading."
198
87
  },
199
88
  {
200
89
  "id": "no-app-shell",
@@ -225,13 +114,6 @@
225
114
  "pattern": "<ListReader(?![\\w.])(?:<[^<>]*>)?(?:[^{}>]|\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\})*?\\s(?:(?:toolbar|header|fill)\\s*=|divided(?![\\w-])|fill(?=[\\s/>]))",
226
115
  "message": "ListReader no longer takes toolbar, header, divided or fill. Put the bar in title, tabs, create, viewMenu, infoLine and search; the reader always fills its pane and Row owns the spacing."
227
116
  },
228
- {
229
- "id": "tiles-galleries-only",
230
- "severity": "warn",
231
- "profiles": ["space"],
232
- "pattern": "\\blayout\\s*=\\s*\\{?\\s*['\\\"`]tiles['\\\"`]|\\brenderTile\\b",
233
- "message": "Tiles suit a gallery, where each item has a picture or a mark (competitors, integrations, skills to discover). For a working list, rows usually read better; keep tiles when the view's design calls for them."
234
- },
235
117
  {
236
118
  "id": "space-no-global-key-listener",
237
119
  "severity": "error",
@@ -265,7 +147,7 @@
265
147
  "severity": "error",
266
148
  "profiles": ["space"],
267
149
  "include": ["**/*.tsx", "**/*.jsx"],
268
- "pattern": "(?:^[ \\t]*|(?<![\\s=]))>[ \\t]*(?=[^<>{}\\n]*[A-Za-z]{2})[A-Za-z][^<>{}\\n=;()&|]*(?:</|\\{)|\\b(?:placeholder|title|aria-label|alt|label)=[\"'](?=[^\"'{}\\n]*[A-Za-z]{2})[^\"'{}\\n]*[\"']",
150
+ "pattern": "(?:^[ \\t]*|(?<![\\s=]))>[ \\t]*(?=[^<>{}\\n]*[A-Za-z]{2})[A-Za-z][^<>{}\\n=;()&|]*(?:</|\\{)|\\b(?:placeholder|title|aria-label|alt|label)=[\"'](?![a-z]+[A-Z_][A-Za-z0-9_]*[\"'])(?=[^\"'{}\\n]*[A-Za-z]{2})[^\"'{}\\n]*[\"']",
269
151
  "message": "A Space keeps its visible words in its words table (or uses a toolkit piece that owns its words) and renders them from there, never as a literal in JSX."
270
152
  },
271
153
  {