@notis_ai/cli 0.2.26 → 0.2.28
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.
- package/README.md +2 -2
- package/config/notis_app_design_rules.json +5 -123
- package/dist/agent-hooks/notis-agent-hook.mjs +84 -14
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +13 -19
- package/dist/base-skills/notis-spaces/references/context.md +3 -0
- package/dist/base-skills/notis-spaces/references/design.md +11 -45
- package/dist/base-skills/notis-spaces/references/sdk.md +86 -67
- package/dist/base-skills/notis-spaces/references/views.md +12 -1
- package/dist/sdk/src/components/NotisCommentBoundary.tsx +43 -16
- package/dist/sdk/src/components/NotisSelectionBoundary.tsx +105 -26
- package/dist/sdk/src/components/SelectionActionBar.tsx +262 -0
- package/dist/sdk/src/hooks/useCollectionInteractions.ts +5 -2
- package/dist/sdk/src/space.ts +4 -0
- package/dist/sdk/src/ui/icons.tsx +11 -2
- package/dist/sdk/src/words/actions.ts +9 -1
- package/dist/sdk/src/words/keymap.ts +3 -0
- package/dist/skill-sync/index.js +81 -11
- package/dist/skill-sync-worker.mjs +87 -12
- package/dist/space-harness/host.js +172 -134
- package/dist/space-sdk/dist/{chunk-BWHAORT4.js → chunk-BFGB6XXC.js} +2 -2
- package/dist/space-sdk/dist/index.js +2 -2
- package/dist/space-sdk/dist/ui.js +14 -11
- package/dist/space-sdk/src/components/NotisSelectionBoundary.d.ts +26 -2
- package/dist/space-sdk/src/space.ts +4 -0
- package/dist/space-sdk/src/tailwind-candidates.d.ts +124 -14
- package/dist/space-sdk/src/ui/blocks/DataTable.d.ts +86 -0
- package/dist/space-sdk/src/ui/blocks/InfoTip.d.ts +25 -0
- package/dist/space-sdk/src/ui/blocks/Meter.d.ts +39 -0
- package/dist/space-sdk/src/ui/blocks/blocks.d.ts +1 -1
- package/dist/space-sdk/src/ui/blocks/index.d.ts +6 -0
- package/dist/space-sdk/src/ui/charts/Chart.d.ts +15 -2
- package/dist/space-sdk/src/ui/charts/StatRow.d.ts +4 -3
- package/dist/space-sdk/src/ui/charts/chartData.d.ts +6 -0
- package/dist/space-sdk/src/ui/icons.d.ts +1 -1
- package/dist/space-sdk/src/ui/index.d.ts +2 -2
- package/dist/space-sdk/src/ui/list/Row.d.ts +10 -3
- package/dist/space-sdk/src/ui/period/dateFormat.d.ts +14 -0
- package/dist/space-sdk/src/words/actions.ts +9 -1
- package/dist/space-sdk/src/words/keymap.ts +3 -0
- package/dist/view-renderer/dist/host.js +243 -205
- package/dist/view-renderer/src/dom.js +15 -2
- package/package.json +3 -3
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +1 -1
- package/src/command-specs/computer.js +3 -3
- package/src/runtime/skill-sync/cloud-client.ts +98 -15
- package/src/runtime/skill-sync/index.ts +22 -3
- package/src/runtime/skill-sync/types.ts +4 -0
- package/src/skill-sync-worker.js +5 -1
- package/template/components/ui/button.tsx +1 -1
- 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
|
|
934
|
+
Restart your Cloud Computer, awake or not responding. Its files are kept.
|
|
935
935
|
|
|
936
|
-
When to use:
|
|
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
|
|
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
|
|
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-])
|
|
181
|
-
"message": "Spaces have no in-page title
|
|
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
|
{
|
|
@@ -10899,6 +10899,7 @@ __export(skill_sync_exports, {
|
|
|
10899
10899
|
fetchSyncSettings: () => fetchSyncSettings,
|
|
10900
10900
|
isolatedLinkOptions: () => isolatedLinkOptions,
|
|
10901
10901
|
materializeCloudSkillsForLocalShell: () => materializeCloudSkillsForLocalShell,
|
|
10902
|
+
pushChangedSkills: () => pushChangedSkills,
|
|
10902
10903
|
runSkillSync: () => runSkillSync,
|
|
10903
10904
|
shouldWriteCloudSkill: () => shouldWriteCloudSkill
|
|
10904
10905
|
});
|
|
@@ -11934,7 +11935,11 @@ async function requestJson(url, jwt, options = {}) {
|
|
|
11934
11935
|
});
|
|
11935
11936
|
if (!response.ok) {
|
|
11936
11937
|
const text2 = await response.text();
|
|
11937
|
-
throw new
|
|
11938
|
+
throw new SkillSyncHttpError(
|
|
11939
|
+
`${options.method || "POST"} ${url} \u2192 ${response.status}: ${text2}`,
|
|
11940
|
+
response.status,
|
|
11941
|
+
response.headers.get("content-type")
|
|
11942
|
+
);
|
|
11938
11943
|
}
|
|
11939
11944
|
return response.json();
|
|
11940
11945
|
}
|
|
@@ -11948,8 +11953,8 @@ async function pullSkills(serverUrl, jwt) {
|
|
|
11948
11953
|
body: { skill_sync_protocol: 2 }
|
|
11949
11954
|
});
|
|
11950
11955
|
}
|
|
11951
|
-
async function
|
|
11952
|
-
|
|
11956
|
+
async function skillPushPayload(skill) {
|
|
11957
|
+
return {
|
|
11953
11958
|
name: skill.name,
|
|
11954
11959
|
description: skill.description,
|
|
11955
11960
|
skill_md: skill.skillMd,
|
|
@@ -11962,13 +11967,57 @@ async function pushChangedSkills(serverUrl, jwt, changedSkills) {
|
|
|
11962
11967
|
display_name: skill.displayName,
|
|
11963
11968
|
native_scope: skill.nativeScope
|
|
11964
11969
|
} : {}
|
|
11965
|
-
}
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
+
};
|
|
11971
|
+
}
|
|
11972
|
+
function pushBatches(payloads, maxBodyBytes) {
|
|
11973
|
+
const batches = [];
|
|
11974
|
+
let batch = [];
|
|
11975
|
+
let batchBytes = SYNC_PUSH_ENVELOPE_BYTES;
|
|
11976
|
+
for (const payload of payloads) {
|
|
11977
|
+
const bytes = Buffer.byteLength(JSON.stringify(payload)) + 1;
|
|
11978
|
+
if (batch.length > 0 && batchBytes + bytes > maxBodyBytes) {
|
|
11979
|
+
batches.push(batch);
|
|
11980
|
+
batch = [];
|
|
11981
|
+
batchBytes = SYNC_PUSH_ENVELOPE_BYTES;
|
|
11982
|
+
}
|
|
11983
|
+
batch.push(payload);
|
|
11984
|
+
batchBytes += bytes;
|
|
11985
|
+
}
|
|
11986
|
+
if (batch.length > 0) batches.push(batch);
|
|
11987
|
+
return batches;
|
|
11988
|
+
}
|
|
11989
|
+
function pushFailure(name, error) {
|
|
11990
|
+
if (error instanceof SkillSyncHttpError) {
|
|
11991
|
+
return {
|
|
11992
|
+
name,
|
|
11993
|
+
error: error.code === "edge_blocked" ? `Upload blocked before reaching Notis (HTTP ${error.status}); sync will retry` : `Upload failed (HTTP ${error.status}); sync will retry`,
|
|
11994
|
+
status: error.status,
|
|
11995
|
+
code: error.code
|
|
11996
|
+
};
|
|
11997
|
+
}
|
|
11998
|
+
const code = typeof error?.code === "string" ? error.code : "push_failed";
|
|
11999
|
+
return { name, error: "Upload failed; sync will retry", code };
|
|
12000
|
+
}
|
|
12001
|
+
async function pushChangedSkills(serverUrl, jwt, changedSkills, options = {}) {
|
|
12002
|
+
const payloadSkills = await Promise.all(changedSkills.map(skillPushPayload));
|
|
12003
|
+
const saved = [];
|
|
12004
|
+
const failed = [];
|
|
12005
|
+
for (const batch of pushBatches(payloadSkills, options.maxBodyBytes ?? MAX_SYNC_PUSH_BODY_BYTES)) {
|
|
12006
|
+
try {
|
|
12007
|
+
const result = await requestJson(`${serverUrl}/portal_skills/sync-push`, jwt, {
|
|
12008
|
+
body: {
|
|
12009
|
+
skill_sync_protocol: 2,
|
|
12010
|
+
skills: batch
|
|
12011
|
+
}
|
|
12012
|
+
});
|
|
12013
|
+
saved.push(...result.skills || []);
|
|
12014
|
+
if (Array.isArray(result.failed)) failed.push(...result.failed);
|
|
12015
|
+
} catch (error) {
|
|
12016
|
+
if (error instanceof SkillSyncHttpError && error.status === 401) throw error;
|
|
12017
|
+
for (const payload of batch) failed.push(pushFailure(String(payload.name), error));
|
|
11970
12018
|
}
|
|
11971
|
-
}
|
|
12019
|
+
}
|
|
12020
|
+
return { skills: saved, ...failed.length ? { failed } : {} };
|
|
11972
12021
|
}
|
|
11973
12022
|
async function downloadSkillBundle(bundleUrl) {
|
|
11974
12023
|
const response = await fetch(bundleUrl, { signal: AbortSignal.timeout(9e4) });
|
|
@@ -12546,6 +12595,15 @@ function buildSyncState(pullResponse, localSkills, lastSyncedAt, verifiedAgentLi
|
|
|
12546
12595
|
skills
|
|
12547
12596
|
});
|
|
12548
12597
|
}
|
|
12598
|
+
function keepFailedPushesPending(state, previousState, failedPushes) {
|
|
12599
|
+
for (const { name } of failedPushes) {
|
|
12600
|
+
const row = state.skills[name];
|
|
12601
|
+
const previous = previousState.skills[name];
|
|
12602
|
+
if (!row || !previous || row.nativeReference || previous.nativeReference) continue;
|
|
12603
|
+
state.skills[name] = { ...row, folderHash: previous.folderHash };
|
|
12604
|
+
}
|
|
12605
|
+
return state;
|
|
12606
|
+
}
|
|
12549
12607
|
function buildLocalSymlinkCandidates(pullResponse, localSkills, previousState) {
|
|
12550
12608
|
const cloudSkillNames = new Set(
|
|
12551
12609
|
pullResponse.skills.map((skill) => skill.name)
|
|
@@ -12970,7 +13028,7 @@ async function runSkillSync(serverUrl, jwt, dependencies = {}, options = {}) {
|
|
|
12970
13028
|
for (const failure of failedDownloads) delete verifiedLinks[failure.name];
|
|
12971
13029
|
const lastSyncedAt = pullResponse.last_synced_at || (/* @__PURE__ */ new Date()).toISOString();
|
|
12972
13030
|
await deps.writeSyncState(
|
|
12973
|
-
buildSyncState(
|
|
13031
|
+
keepFailedPushesPending(buildSyncState(
|
|
12974
13032
|
pullResponse,
|
|
12975
13033
|
finalLocalSkills,
|
|
12976
13034
|
lastSyncedAt,
|
|
@@ -12979,7 +13037,7 @@ async function runSkillSync(serverUrl, jwt, dependencies = {}, options = {}) {
|
|
|
12979
13037
|
collectAppliedCloudRevisions(pullResponse, previousState, writtenSkillNames),
|
|
12980
13038
|
collectAppliedFiles(pullResponse, previousState, appliedFilesByName),
|
|
12981
13039
|
previousState
|
|
12982
|
-
),
|
|
13040
|
+
), previousState, failedPushes),
|
|
12983
13041
|
syncPaths
|
|
12984
13042
|
);
|
|
12985
13043
|
return {
|
|
@@ -12999,7 +13057,7 @@ async function runSkillSync(serverUrl, jwt, dependencies = {}, options = {}) {
|
|
|
12999
13057
|
failedPushes
|
|
13000
13058
|
};
|
|
13001
13059
|
}
|
|
13002
|
-
var DEFAULT_AGENT_TARGETS, NATIVE_IDENTITY_FILE, UUID, HOME_DIR, execFileAsync, NativeSkillIdentityError, AGENTS_DIR, LEGACY_AGENTS_SKILLS_DIR, NOTIS_SKILL_SYNC_ROOT, LEGACY_NOTIS_SYNC_STATE_PATH, AGENTS_SKILLS_DIR, SKILL_LOCK_PATH, DEFAULT_SYNC_STATE, EXCLUDED_TOP_LEVEL_ROOT_NAMES, DEFAULT_SYNC_PATHS, IGNORED_SKILL_DIRECTORIES, HOME_DIR2, EXTERNAL_AGENT_SKILL_DIRS, EXTERNAL_AGENTS, AGENT_FAILURE_LABELS, BASE_SKILL_NAMES2, DEFAULT_RUN_SKILL_SYNC_DEPS, MIRROR_ONLY_DEPS;
|
|
13060
|
+
var DEFAULT_AGENT_TARGETS, NATIVE_IDENTITY_FILE, UUID, HOME_DIR, execFileAsync, NativeSkillIdentityError, AGENTS_DIR, LEGACY_AGENTS_SKILLS_DIR, NOTIS_SKILL_SYNC_ROOT, LEGACY_NOTIS_SYNC_STATE_PATH, AGENTS_SKILLS_DIR, SKILL_LOCK_PATH, DEFAULT_SYNC_STATE, EXCLUDED_TOP_LEVEL_ROOT_NAMES, DEFAULT_SYNC_PATHS, IGNORED_SKILL_DIRECTORIES, SkillSyncHttpError, MAX_SYNC_PUSH_BODY_BYTES, SYNC_PUSH_ENVELOPE_BYTES, HOME_DIR2, EXTERNAL_AGENT_SKILL_DIRS, EXTERNAL_AGENTS, AGENT_FAILURE_LABELS, BASE_SKILL_NAMES2, DEFAULT_RUN_SKILL_SYNC_DEPS, MIRROR_ONLY_DEPS;
|
|
13003
13061
|
var init_skill_sync = __esm({
|
|
13004
13062
|
"dist/skill-sync/index.js"() {
|
|
13005
13063
|
DEFAULT_AGENT_TARGETS = {
|
|
@@ -13056,6 +13114,18 @@ var init_skill_sync = __esm({
|
|
|
13056
13114
|
gatherMetadataPath: path2.join(NOTIS_SKILL_SYNC_ROOT, "skill-gather-metadata.json")
|
|
13057
13115
|
};
|
|
13058
13116
|
IGNORED_SKILL_DIRECTORIES = /* @__PURE__ */ new Set(["__pycache__", ".pytest_cache"]);
|
|
13117
|
+
SkillSyncHttpError = class extends Error {
|
|
13118
|
+
status;
|
|
13119
|
+
code;
|
|
13120
|
+
constructor(message, status, contentType) {
|
|
13121
|
+
super(message);
|
|
13122
|
+
this.name = "SkillSyncHttpError";
|
|
13123
|
+
this.status = status;
|
|
13124
|
+
this.code = status === 403 && /text\/html/i.test(contentType || "") ? "edge_blocked" : `http_${status}`;
|
|
13125
|
+
}
|
|
13126
|
+
};
|
|
13127
|
+
MAX_SYNC_PUSH_BODY_BYTES = 2 * 1024 * 1024;
|
|
13128
|
+
SYNC_PUSH_ENVELOPE_BYTES = Buffer.byteLength(JSON.stringify({ skill_sync_protocol: 2, skills: [] }));
|
|
13059
13129
|
HOME_DIR2 = os2.homedir();
|
|
13060
13130
|
EXTERNAL_AGENT_SKILL_DIRS = {
|
|
13061
13131
|
claude_code: path22.join(HOME_DIR2, ".claude", "skills"),
|
|
@@ -46066,8 +46136,8 @@ var computerCommandSpecs = [{
|
|
|
46066
46136
|
}
|
|
46067
46137
|
}, {
|
|
46068
46138
|
command_path: ["computer", "restart"],
|
|
46069
|
-
summary: "Restart
|
|
46070
|
-
when_to_use: "
|
|
46139
|
+
summary: "Restart your Cloud Computer, awake or not responding. Its files are kept.",
|
|
46140
|
+
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.",
|
|
46071
46141
|
args_schema: { arguments: [], options: [YES_OPTION] },
|
|
46072
46142
|
examples: ["notis computer restart", "notis computer restart --yes"],
|
|
46073
46143
|
mutates: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"stamp":
|
|
1
|
+
{"schema":1,"stamp":1794414114,"commit":"b30c41a5c3e0b065aaf9a0be08c918eea77be86d"}
|
|
@@ -128,39 +128,33 @@ with them. When it is not, write your own layout on the hooks and blocks
|
|
|
128
128
|
`EmptyState`, `Notice`): your markup, the host's keys and words
|
|
129
129
|
([the sample](references/views.md#a-view-of-your-own)). Both are normal
|
|
130
130
|
choices; do not bend a request into `ListReader` because it is the closest
|
|
131
|
-
piece, and do not hand-roll what a piece already does well.
|
|
132
|
-
|
|
133
|
-
When you start from a piece, change it as shallowly as the design allows:
|
|
134
|
-
options (`density`, `openAs`, `layout`, `look`, `autoOpen`, `search`,
|
|
135
|
-
`actions`, an action's `key`), then slots (`row`, `reader`, `tabs`, `create`,
|
|
136
|
-
`viewMenu`, `infoLine`, `readerLabel`, `readerActions`, `crumbLabel`,
|
|
137
|
-
`renderTile`, `empty`), then your own layout on the hooks. A rewrite of a piece
|
|
138
|
-
stops receiving that piece's fixes, so do it when the design needs it, not by
|
|
139
|
-
default.
|
|
131
|
+
piece, and do not hand-roll what a piece already does well. A piece you rewrite
|
|
132
|
+
stops receiving that piece's fixes.
|
|
140
133
|
|
|
141
134
|
## Rules the pieces cannot hold for you
|
|
142
135
|
|
|
136
|
+
- Sidebar children are for short lists people navigate: a few sub-Spaces, or a
|
|
137
|
+
`collection` whose records stay few (folders of notes). A database that grows
|
|
138
|
+
every week is listed in the view, never as sidebar rows
|
|
139
|
+
([Records in the sidebar](references/views.md#records-in-the-sidebar)).
|
|
143
140
|
- Standard actions (`archive`, `complete`, `star`, `delete`...) take Notis's
|
|
144
141
|
words, key and toast: give only `id` and `run`. A Space's own action, label or
|
|
145
142
|
text brings an `{ en, fr }` pair; no English literal in JSX.
|
|
146
143
|
- Never add `keydown` listeners on `window` or `document`; use `useShortcut` or
|
|
147
144
|
the hooks above. Never portal to `document.body`; use `Menu`, `Popover`,
|
|
148
145
|
`Tooltip`, or `useLayerRoot()` as the container.
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`bg-muted`), never hex, palette hues or raw rgb. A highlight is a ring on all
|
|
146
|
+
- The host top bar shows Space / view and the open item, and `ListReader`
|
|
147
|
+
`search` uses it, so a Space draws no second search field. The Space fills
|
|
148
|
+
the frame.
|
|
149
|
+
- Colours from the theme tokens of the host and `toolkit.css`, never hex,
|
|
150
|
+
palette hues or raw rgb. A highlight is a ring on all
|
|
155
151
|
four sides, never a coloured or thicker edge on one side. No fixed viewport
|
|
156
152
|
heights (`h-screen`, `vh`): use `h-full`, `flex-1`, `min-h-0`.
|
|
157
153
|
- The design check (run by every `notis spaces build`, and by the server on
|
|
158
154
|
publish) and `notis spaces verify` (390 and 1440 px, EN and FR) must pass
|
|
159
155
|
before any deploy. Its errors protect the host: frame, theme, keys, layers and
|
|
160
|
-
words. Its warnings
|
|
161
|
-
|
|
162
|
-
pieces a hand-made pattern could use; they never block. Keep a warning when
|
|
163
|
-
the view's design calls for it, and fix it when it was an accident.
|
|
156
|
+
words. Its warnings name the toolkit pieces a hand-made pattern could
|
|
157
|
+
use; they never block.
|
|
164
158
|
- A Space updates in place: pull it, change it, deploy it to the same Space ID.
|
|
165
159
|
Never ship a change as a new Space or a Store copy.
|
|
166
160
|
|
|
@@ -72,6 +72,9 @@ optional `quote`, `pending`, `error`, `className`) for image markers or custom l
|
|
|
72
72
|
Use `NotisSelectionBoundary` without the comment UI when only copy/paste provenance is
|
|
73
73
|
needed. It preserves ordinary clipboard text and source metadata so normal paste into
|
|
74
74
|
chat creates a selected-text pill. No special Paste as context action is required.
|
|
75
|
+
A `MarkdownEditor` inside the boundary is quoted the same way; inputs and textareas
|
|
76
|
+
keep plain copy. Without any boundary, copied view text still pastes as a quote
|
|
77
|
+
named after the Space; add a boundary to name the resource the text belongs to.
|
|
75
78
|
|
|
76
79
|
## Verify
|
|
77
80
|
|
|
@@ -2,47 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Decide what the view is for before choosing how to build it: what the person
|
|
4
4
|
does there, what they look at first, how dense or calm it should be. Then take
|
|
5
|
-
what fits from `@notis/sdk/ui
|
|
6
|
-
|
|
7
|
-
[SKILL.md](../SKILL.md#three-layers)). Either way the host frame, theme tokens,
|
|
8
|
-
keyboard engine and EN/FR words stay Notis's.
|
|
9
|
-
|
|
10
|
-
## Pick the piece
|
|
11
|
-
|
|
12
|
-
| The view shows | Start from |
|
|
13
|
-
| --- | --- |
|
|
14
|
-
| A list beside an open item (tickets, notes, inbox) | `ListReader` ([sample](views.md#write-the-view)) |
|
|
15
|
-
| The same records as a table | `ListReader` with `layout: 'table'` |
|
|
16
|
-
| A gallery where each item has a picture or a mark (competitors, integrations, skills to discover) | `ListReader` with `layout: 'tiles'` and `renderTile` |
|
|
17
|
-
| Items on dates | `CalendarView` (month, week, agenda) |
|
|
18
|
-
| Items over time, by lane | `TimelineView` |
|
|
19
|
-
| Items by stage, moved from one stage to the next (a sales funnel, a production pipeline) | `BoardView`: one column per stage, `onMove` to move tiles |
|
|
20
|
-
| Numbers over a period | `Section kind="bar"` with `PeriodPicker`, `StatRow`, `Section kind="chart"` with `Chart`, `Section kind="data"` with `ChartTable`, top to bottom, full width |
|
|
21
|
-
| One record as the page | `DocumentPage` (see [SDK](sdk.md#first-party-record-components)). Pick its `width` for the page: `standard` (the default) is a centred 900 px reading column for a page read as text, `wide` (1200 px) or `full` for a record that is a working surface such as a wide table or board |
|
|
22
|
-
| A form or settings page | `Section kind="form"`, `Button`, `NativeSelect`, `SegmentedControl`, `Notice`, `EmptyState` |
|
|
23
|
-
| A list on your own layout | `useListKeys`, `useSelection`, `Row`, `SelectionBar`, `Panels` |
|
|
24
|
-
| Files or pictures attached to an item, or a picture to open full screen | `AttachmentGallery` (opens `ImageViewer` on its images); `ImageViewer` alone for one picture ([SDK](sdk.md#toolkit-pieces)) |
|
|
25
|
-
| Anything none of these fit: one record at a time, a focus or practice screen, a canvas, a planner, a page laid out like a magazine, a mix of blocks | Your own layout on `useShortcut`, `Section`, `Button`, `EmptyState`, `Notice` and the hooks above ([sample](views.md#a-view-of-your-own)) |
|
|
26
|
-
|
|
27
|
-
The table is a starting point, not a menu to fit the request into. If a stock
|
|
28
|
-
piece would make the view worse for what the person does there, write your own.
|
|
5
|
+
what fits from `@notis/sdk/ui` ([SDK](sdk.md#toolkit-pieces)). The host frame,
|
|
6
|
+
theme tokens, keyboard engine and EN/FR words stay Notis's.
|
|
29
7
|
|
|
30
8
|
Floating UI comes from `Menu`, `Popover` and `Tooltip`; they open inside the
|
|
31
9
|
Space and pick up its theme. Open as Side, Center or Full belongs to the list
|
|
32
|
-
(`openAs`, `OpenAsMenu`)
|
|
10
|
+
(`openAs`, `OpenAsMenu`).
|
|
33
11
|
|
|
34
12
|
## Layout
|
|
35
13
|
|
|
36
14
|
The host top bar shows the title: Space / view with the view icon, and the
|
|
37
|
-
description as a tooltip. A Space
|
|
38
|
-
|
|
39
|
-
frame with no outer padding wrapper; a centred column (`mx-auto` with `max-w-*`)
|
|
40
|
-
is for a reading, writing or focus layout, and the reader article gets its
|
|
41
|
-
measure from the toolkit. The default look is flat: list toolbars are one 44px
|
|
42
|
-
tab row with a "+" at the right end, sections have no boxes. A view of your own
|
|
43
|
-
may depart from that look (cards, a border, a shadow, a different type scale)
|
|
44
|
-
when its design calls for it; the design check warns so you decide, and never
|
|
45
|
-
blocks it.
|
|
15
|
+
description as a tooltip. A Space does not draw its own search field; set
|
|
16
|
+
`search` on `ListReader`. The Space fills the frame.
|
|
46
17
|
|
|
47
18
|
- **Crumb.** An open item adds its name to the top bar crumb ("Product /
|
|
48
19
|
Tickets / PRO-002") in every open mode; `crumbLabel` on `ListReader` names it,
|
|
@@ -66,12 +37,6 @@ blocks it.
|
|
|
66
37
|
- **Drag to select.** A list that selects several gets the Manager's marquee
|
|
67
38
|
for free: a drag from empty space selects the rows under it. Do not build
|
|
68
39
|
your own.
|
|
69
|
-
- **Sections.** A dashboard, form or settings page is a stack of `Section`
|
|
70
|
-
kinds, full width: `bar` for the period and filters, `stats`, `chart`, `data`
|
|
71
|
-
for a table and `form`. A section title and count sit in its head; the page
|
|
72
|
-
itself has no title. Put the bar's pills and picker in its `tabs` slot as
|
|
73
|
-
they are: a `TabRow` folds what does not fit into More and other controls
|
|
74
|
-
scroll in the one row, so add no wrapper or overflow CSS of your own.
|
|
75
40
|
|
|
76
41
|
Do not rebuild what the host already shows: the sidebar, top bar, title, search
|
|
77
42
|
field, folder tree, chat, help sheet or selection bar. Let the phone layout come from
|
|
@@ -127,14 +92,15 @@ multi-field edit or a destructive confirmation.
|
|
|
127
92
|
## Look at the result
|
|
128
93
|
|
|
129
94
|
`notis spaces build` runs the design check and reports each rule broken by file
|
|
130
|
-
and line; the server runs it again on publish. Errors block; warnings
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
and line; the server runs it again on publish. Errors block; warnings name toolkit
|
|
96
|
+
pieces you could use, and they never block. Passing it does not prove the design
|
|
97
|
+
is good. Then run `notis spaces verify`, which draws every view at 390
|
|
133
98
|
and 1440 px in EN and FR, once with data and once while the reads are still
|
|
134
99
|
pending, and actually look at both images:
|
|
135
100
|
|
|
136
|
-
- Does the
|
|
137
|
-
|
|
101
|
+
- Does the first screen answer the one question the person opens the page for,
|
|
102
|
+
and does what needs action stand out?
|
|
103
|
+
- Do counts agree across sections?
|
|
138
104
|
- Does the view fill the host frame, also while loading?
|
|
139
105
|
- Does the pending image keep the final layout: same tab row and panes, a
|
|
140
106
|
skeleton where content will be, no Loading text and no empty state? Fix every
|