@notis_ai/cli 0.2.29 → 0.2.31
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 +26 -8
- package/dist/agent-hooks/notis-agent-hook.mjs +38399 -10883
- package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-cli/SKILL.md +11 -0
- package/dist/base-skills/notis-cli/references/native-databases.md +1 -1
- package/dist/base-skills/notis-query/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-query/references/query.md +6 -4
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +8 -3
- package/dist/base-skills/notis-spaces/references/architecture.md +4 -1
- package/dist/base-skills/notis-spaces/references/design.md +7 -1
- package/dist/base-skills/notis-spaces/references/fixtures.md +27 -2
- package/dist/base-skills/notis-spaces/references/release.md +6 -5
- package/dist/base-skills/notis-spaces/references/sdk.md +172 -48
- package/dist/base-skills/notis-spaces/references/troubleshooting.md +3 -0
- package/dist/base-skills/notis-spaces/references/views.md +20 -0
- package/dist/sdk/src/hooks/useNativeDocuments.ts +50 -12
- package/dist/sdk/src/hooks/useThreadItem.ts +56 -0
- package/dist/sdk/src/index.ts +7 -2
- package/dist/sdk/src/runtime.ts +8 -1
- package/dist/sdk/src/space.ts +233 -1
- package/dist/sdk/src/tailwind.ts +53 -3
- package/dist/sdk/src/ui/icons.tsx +1 -0
- package/dist/sdk/src/words/types.ts +28 -0
- package/dist/skill-sync/index.js +10 -90
- package/dist/skill-sync-worker.mjs +232 -120
- package/dist/space-harness/host.js +309 -96
- package/dist/space-sdk/dist/chunk-3DFOGU26.js +3 -0
- package/dist/space-sdk/dist/index.js +4 -2
- package/dist/space-sdk/dist/ui.js +19 -14
- package/dist/space-sdk/src/hooks/useNativeDocuments.d.ts +23 -0
- package/dist/space-sdk/src/hooks/useThreadItem.d.ts +28 -0
- package/dist/space-sdk/src/index.d.ts +4 -2
- package/dist/space-sdk/src/runtime.d.ts +8 -1
- package/dist/space-sdk/src/space.ts +233 -1
- package/dist/space-sdk/src/tailwind-candidates.d.ts +765 -16
- package/dist/space-sdk/src/tailwind.ts +53 -3
- package/dist/space-sdk/src/ui/actions/useToast.d.ts +2 -0
- package/dist/space-sdk/src/ui/blocks/DataTable.d.ts +19 -4
- package/dist/space-sdk/src/ui/blocks/Meter.d.ts +12 -3
- package/dist/space-sdk/src/ui/blocks/Tabs.d.ts +7 -1
- package/dist/space-sdk/src/ui/blocks/index.d.ts +1 -1
- package/dist/space-sdk/src/ui/charts/CalendarHeatmap.d.ts +69 -0
- package/dist/space-sdk/src/ui/charts/Chart.d.ts +18 -3
- package/dist/space-sdk/src/ui/charts/chartData.d.ts +19 -0
- package/dist/space-sdk/src/ui/charts/heatmapData.d.ts +81 -0
- package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +56 -10
- package/dist/space-sdk/src/ui/comments/PassageComments.d.ts +16 -7
- package/dist/space-sdk/src/ui/comments/agentRuntime.d.ts +59 -0
- package/dist/space-sdk/src/ui/comments/commentFiles.d.ts +5 -2
- package/dist/space-sdk/src/ui/comments/commentModel.d.ts +103 -8
- package/dist/space-sdk/src/ui/comments/commentWords.d.ts +82 -0
- package/dist/space-sdk/src/ui/comments/hostComments.d.ts +37 -0
- package/dist/space-sdk/src/ui/comments/index.d.ts +4 -0
- package/dist/space-sdk/src/ui/comments/paneParts.d.ts +119 -0
- package/dist/space-sdk/src/ui/comments/useCommentRouting.d.ts +75 -0
- package/dist/space-sdk/src/ui/comments/useComments.d.ts +147 -15
- package/dist/space-sdk/src/ui/comments/usePassageComments.d.ts +24 -8
- package/dist/space-sdk/src/ui/index.d.ts +6 -3
- package/dist/space-sdk/src/ui/layout/SidePane.d.ts +6 -1
- package/dist/space-sdk/src/ui/list/Row.d.ts +11 -1
- package/dist/space-sdk/src/ui/overlay/Tooltip.d.ts +8 -2
- package/dist/space-sdk/src/ui/period/dateFormat.d.ts +2 -0
- package/dist/space-sdk/src/ui/period/dateWords.d.ts +9 -0
- package/dist/space-sdk/src/ui/period/periods.d.ts +15 -2
- package/dist/space-sdk/src/ui/styles.d.ts +27 -5
- package/dist/space-sdk/src/words/types.ts +28 -0
- package/dist/view-renderer/dist/host.js +379 -166
- package/dist/view-renderer/src/dom.js +3 -2
- package/dist/view-renderer/src/errors.js +9 -0
- package/dist/view-renderer/src/host.tsx +18 -8
- package/dist/view-renderer/src/remote-broker.js +3 -1
- package/dist/view-renderer/src/renderer.js +87 -17
- package/dist/view-renderer/src/skeleton.js +70 -18
- package/package.json +5 -4
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +2 -1
- package/skills/notis-query/cli.md +3 -0
- package/skills/notis-spaces/cli.md +8 -8
- package/src/cli.js +10 -2
- package/src/command-specs/computer.js +21 -1
- package/src/command-specs/profile.js +12 -5
- package/src/command-specs/spaces.js +101 -31
- package/src/command-specs/tools.js +3 -0
- package/src/runtime/agent-identity.js +187 -0
- package/src/runtime/api-hosts.generated.js +35 -0
- package/src/runtime/api-hosts.js +109 -0
- package/src/runtime/app-platform.js +68 -24
- package/src/runtime/channel.js +3 -7
- package/src/runtime/http-agent.js +53 -0
- package/src/runtime/native-record-files.js +11 -0
- package/src/runtime/oauth.js +97 -5
- package/src/runtime/profiles.js +200 -41
- package/src/runtime/skill-sync/cloud-client.ts +0 -10
- package/src/runtime/skill-sync/index.ts +13 -15
- package/src/runtime/skill-sync/local-scanner.ts +0 -67
- package/src/runtime/skill-sync/types.ts +1 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +7 -23
- package/src/runtime/skill-sync-service.js +4 -5
- package/src/runtime/space-dependencies.js +66 -0
- package/src/runtime/space-fixture-broker.js +23 -8
- package/src/runtime/space-platform.js +49 -3
- package/src/runtime/space-source.js +76 -2
- package/src/runtime/space-test-server.js +125 -10
- package/src/runtime/space-verification.js +106 -42
- package/src/runtime/space-view-manifest.js +38 -5
- package/src/runtime/telemetry.js +14 -1
- package/src/runtime/transport.js +31 -4
- package/src/runtime/upsell.js +3 -6
- package/src/runtime/view-render.js +6 -1
- package/src/skill-sync-worker.js +13 -2
- package/src/space-harness-host.ts +6 -3
- package/template/tailwind.config.ts +2 -35
- package/dist/space-sdk/dist/chunk-BFGB6XXC.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"stamp":
|
|
1
|
+
{"schema":1,"stamp":1794771946,"commit":"b5902cc7f64ba2ed2615c903c6e88a58d588bf5f"}
|
|
@@ -57,6 +57,17 @@ Two rules follow from the dev credential being scoped to that local backend:
|
|
|
57
57
|
- A `dev-*` profile only exists while its `./dev.sh` lease is running. If it is stopped, the CLI fails with `dev_runtime_unavailable` instead of sending the test user's token to the live API.
|
|
58
58
|
- To reach a real account from inside a worktree — including when the local backend is wedged — name a real profile explicitly: `notis --profile <name> ...`. That is the supported escape hatch.
|
|
59
59
|
|
|
60
|
+
## Declare who you are before writing
|
|
61
|
+
|
|
62
|
+
When you are an agent (Claude Code, Codex, a script) and not the person typing, name yourself so what you write is yours, not the person's: a comment then shows your name as its author, never counts as the person's comment and never wakes you up. Pick a fresh lowercase imaginary rock-band name (lowercase letters and digits in at least two words joined by hyphens, 3 to 60 characters, such as `fred-and-the-machine`, shown as "Fred And The Machine") and set it once per session:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export NOTIS_AGENT_NAME="fred-and-the-machine" # your band name
|
|
66
|
+
export NOTIS_AGENT_THREAD="<Notis thread id>" # optional
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
or pass `--agent-name` and `--agent-thread` on a single command (a flag wins over its variable). The CLI generates one id for each name the first time it is used on the computer and keeps sending it, so you edit or delete only your own comments; set `NOTIS_AGENT_ID` (or `--agent-id`) only to override it. Name a Notis thread only when you work for one of the person's Notis threads: replies to your comments then wake that thread; anything else is kept as a label. Declarations take effect where the person has unified comments on (being rolled out); elsewhere Notis ignores them and writes count as the person's, as before. With unified comments on, every comment written through the CLI needs the name, even one the person types: without it the write is refused (`agent_name_required`), and a name sent without an id is refused too (`agent_id_required`). Other writes with the person's own sign-in and no name are the person's. A name that breaks the rule is sent as written and the server refuses the call (`invalid_agent_identity`) where unified comments are on, reads included; elsewhere it is ignored. A declaration names you; it never gives access to anything more. The Notis assistant itself never writes comments (`orchestrator_comments_refused`): it starts a sub-agent for comment work, signed with that sub-agent's band name.
|
|
70
|
+
|
|
60
71
|
## Critical rule for missing tools
|
|
61
72
|
|
|
62
73
|
If the tool you need is not already available in your current tool surface, do not stop and do not assume the task is blocked.
|
|
@@ -18,4 +18,4 @@ npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_
|
|
|
18
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
19
|
```
|
|
20
20
|
|
|
21
|
-
Most databases are used in Spaces. Such a database is read
|
|
21
|
+
Most databases are used in Spaces. Such a database is read through one of its links: `GET_DATABASE` and `QUERY` with a bare `database_id` run through your main view and return `resolved_target` (its `{space_id, binding}`); without a main view a bare-id `QUERY` answers `database_in_spaces` with every link. Reuse that exact target with `protocol: 1`, always for writes. 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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"stamp":
|
|
1
|
+
{"schema":1,"stamp":1794771946,"commit":"b5902cc7f64ba2ed2615c903c6e88a58d588bf5f"}
|
|
@@ -20,9 +20,11 @@ The native query lives directly inside `input`, without another request/query wr
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Use the complete Space binding target returned by schema discovery. Every
|
|
23
|
-
database lives in a Space:
|
|
24
|
-
`
|
|
25
|
-
`
|
|
23
|
+
database lives in a Space: `LOCAL_NOTIS_DATABASE_GET_DATABASE` and a query with a
|
|
24
|
+
bare `{"database_id": ...}` target run through your main view of it and return
|
|
25
|
+
`resolved_target`; reuse that target next, and for every write (writes never take
|
|
26
|
+
a bare ID). Without a main view the query answers `database_in_spaces` with its
|
|
27
|
+
links. Never remove its record context or substitute
|
|
26
28
|
another database/owner after a denial. `action_id`, when present, retains the
|
|
27
29
|
saved action's narrower authority rather than granting direct Editor access.
|
|
28
30
|
|
|
@@ -43,7 +45,7 @@ must be nonempty. Invalid conditions fail—they never become an unrestricted qu
|
|
|
43
45
|
| Text/title/URL | `equals`, `not_equals`, `contains`, `not_contains`, `starts_with`, `ends_with`, empty checks |
|
|
44
46
|
| Number | `equals`, `not_equals`, `greater_than`, `less_than`, inclusive variants, empty checks |
|
|
45
47
|
| Checkbox | `equals`, `not_equals` with real booleans |
|
|
46
|
-
| Select/status | `equals`, `not_equals`, empty checks; use a current option ID or unambiguous label |
|
|
48
|
+
| Select/status | `equals`, `not_equals`, `in` (any of up to 100 options), empty checks; use a current option ID or unambiguous label |
|
|
47
49
|
| Multi-select/relation | `contains`, `does_not_contain`, empty checks |
|
|
48
50
|
| Date | `equals`, `before`, `after`, `on_or_before`, `on_or_after`, empty checks; use ISO dates/timestamps |
|
|
49
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"stamp":
|
|
1
|
+
{"schema":1,"stamp":1794771946,"commit":"b5902cc7f64ba2ed2615c903c6e88a58d588bf5f"}
|
|
@@ -87,11 +87,12 @@ user asked, and quote their words in `user_words`. The CLI equivalents are
|
|
|
87
87
|
|
|
88
88
|
| Task | Read |
|
|
89
89
|
| --- | --- |
|
|
90
|
-
| Build or change a Space | [View authoring](references/views.md), [Design](references/design.md), then [Delivery](references/release.md) |
|
|
90
|
+
| Build or change a Space | [View authoring](references/views.md), [Design](references/design.md), then [Delivery](references/release.md); list filters (`in` for several options): [Params and declared lists](references/views.md#params-and-declared-lists) |
|
|
91
|
+
| Verification fixtures, one view in several states (`contexts`) | [Fixtures](references/fixtures.md): one verify draws every state in English and French |
|
|
91
92
|
| Read a saved view, chart, report or HTML page | [Read and render](references/reading.md) |
|
|
92
93
|
| Save or revise a Notes report or interactive report | [Reports](references/reports.md) |
|
|
93
94
|
| Choose a memory policy | [Memory](references/memory.md) |
|
|
94
|
-
| Data hooks, record pages and the toolkit pieces | [SDK](references/sdk.md) |
|
|
95
|
+
| Data hooks, record pages and the toolkit pieces | [SDK](references/sdk.md); rows and counts (`useNativeDocuments`, `useNativeCount`): [Records and declared reads](references/sdk.md#records-and-declared-reads) |
|
|
95
96
|
| Explain resources, sharing and lifecycle | [Platform boundaries](references/architecture.md) |
|
|
96
97
|
| Diagnose a failed check or release | [Troubleshooting](references/troubleshooting.md) |
|
|
97
98
|
| Publish or share a Space or its update in the Store | [Store publishing](references/store.md): you only prepare the submission and send its page; the person publishes there. No tool publishes |
|
|
@@ -171,7 +172,7 @@ stops receiving that piece's fixes.
|
|
|
171
172
|
3. Declare each view ([View authoring](references/views.md)) and write it on the
|
|
172
173
|
pieces ([Design](references/design.md)).
|
|
173
174
|
4. Build and verify the selected frozen source with fictional fixtures for every
|
|
174
|
-
read. Look at EN and FR at 390 and 1440 px; fix failed reads, clipping, wrong
|
|
175
|
+
read ([Fixtures](references/fixtures.md)). Look at EN and FR at 390 and 1440 px; fix failed reads, clipping, wrong
|
|
175
176
|
data and state transitions before release.
|
|
176
177
|
5. Deploy within the user's authorization. Read back the exact published
|
|
177
178
|
revision, render its live view link and inspect the affected interaction.
|
|
@@ -196,6 +197,10 @@ tell them who gains or loses access and what happens to the data, using
|
|
|
196
197
|
[Consequences](references/architecture.md#consequences-to-explain-before-acting).
|
|
197
198
|
|
|
198
199
|
Skill content has one writer family: `notis skills list|read|create|update|links`.
|
|
200
|
+
`skills update` takes the `target` and `version` exactly as `skills read` printed
|
|
201
|
+
them, plus one of `skill_md` (replaces SKILL.md, keeps the other files) or
|
|
202
|
+
`files` (every file of the Skill, SKILL.md included, as base64 by path), and
|
|
203
|
+
optionally `name`, `description` or `links`.
|
|
199
204
|
A failed Space target never falls back to another owner or a personal resource.
|
|
200
205
|
Editing a linked Skill changes the shared resource wherever it remains reachable.
|
|
201
206
|
Personal enabled/agent settings are separate; curated content is read-only.
|
|
@@ -31,7 +31,10 @@ A failed target never falls back to a different authority.
|
|
|
31
31
|
The protected owner and Editors of a Space and its ancestors can reach it.
|
|
32
32
|
Moving a subtree changes who can reach every child/resource; report the actual
|
|
33
33
|
access delta before moving. Removing an Editor or unlinking a resource revokes
|
|
34
|
-
future reads, writes and memory access through that path.
|
|
34
|
+
future reads, writes and memory access through that path. To see who a Space is
|
|
35
|
+
shared with (owner, Editors and how each reaches it, team access, pending
|
|
36
|
+
invitations), use `LOCAL_NOTIS_MANAGE_SPACE` `list_members`; it is read-only and
|
|
37
|
+
refused inside Space views.
|
|
35
38
|
|
|
36
39
|
A Site is a scoped standalone website, not an Editor membership. Record Sites
|
|
37
40
|
stay pinned to their record, including views whose record param is not the
|
|
@@ -3,7 +3,9 @@
|
|
|
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
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.
|
|
6
|
+
theme tokens, keyboard engine and EN/FR words stay Notis's. The theme colours
|
|
7
|
+
are Tailwind colours that take any opacity (`bg-accent/10`, `bg-chart-2/40`,
|
|
8
|
+
`text-foreground/60`).
|
|
7
9
|
|
|
8
10
|
Floating UI comes from `Menu`, `Popover` and `Tooltip`; they open inside the
|
|
9
11
|
Space and pick up its theme. Open as Side, Center or Full belongs to the list
|
|
@@ -61,6 +63,10 @@ ring on all four sides. Never restyle the pieces' states.
|
|
|
61
63
|
locale (`useNotisRuntime()?.context.locale`). Format dates and numbers with
|
|
62
64
|
that locale. French runs 15 to 30 percent longer: leave room in tabs, section
|
|
63
65
|
titles, buttons, badges and table cells.
|
|
66
|
+
- A count in words takes its plural from the count, in each language:
|
|
67
|
+
`pluralWords(n, { one: { en: '{n} campaign', fr: '{n} campagne' }, other: {
|
|
68
|
+
en: '{n} campaigns', fr: '{n} campagnes' } })` from `@notis/sdk/words`
|
|
69
|
+
(French uses the singular for 0 and 1). Never write "1 campaigns" or "(s)".
|
|
64
70
|
|
|
65
71
|
## Loading, empty and error
|
|
66
72
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Offline fixtures for Space views
|
|
2
2
|
|
|
3
3
|
Declare a `verificationFixtures` JSON source with `actions` and optional `context`,
|
|
4
|
-
`shown`, `viewerReads`, `documentBodies`, `recordViews`. Cases match exact action
|
|
4
|
+
`shown`, `viewerReads`, `documentBodies`, `recordViews`, `images`. Cases match exact action
|
|
5
5
|
inputs/list params. Each `useShown` name maps to an array of `{params, result}` cases:
|
|
6
6
|
|
|
7
7
|
```json
|
|
@@ -14,7 +14,9 @@ inputs/list params. Each `useShown` name maps to an array of `{params, result}`
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Use your declared list names and exact initial params (including defaults); add a
|
|
17
|
-
case for every load-time list read.
|
|
17
|
+
case for every load-time list read. A `useNativeCount` read is an `actions` case of
|
|
18
|
+
the binding's query action: `{"inputs": {"request": {"filter": ..., "mode": "count"}},
|
|
19
|
+
"result": {"count": 3, "schema_revision": 1}}` (no `filter` key when it has none). Put fictional rows in `result.rows` to verify
|
|
18
20
|
populated states. Record views use `{operation: 'record'|'html'|'report', record_key,
|
|
19
21
|
result}`; native record snapshots require `writable: false` and no authoring target.
|
|
20
22
|
A record view fixture needs a declared native database resource; a record param is
|
|
@@ -25,5 +27,28 @@ sandbox and viewer CSP, sized by its `className` (a 1920x1080 slide box shows th
|
|
|
25
27
|
real slide in verify screenshots); popups and network stay blocked offline.
|
|
26
28
|
When a view reads a record view its fixtures lack, verify names the view, the read,
|
|
27
29
|
the record key and the missing field, and prints a valid entry to copy.
|
|
30
|
+
`context` sets how verify opens the view: `params` (the opening view params,
|
|
31
|
+
a flat object of text, numbers or true/false), `now` (an ISO time that pins the clock, so a view showing
|
|
32
|
+
how old its data is can be checked with a later `now`) and `skeletonParams`
|
|
33
|
+
(other params whose loading skeletons are measured too). Verify always draws
|
|
34
|
+
the view in English and in French, so `locale` no longer changes the
|
|
35
|
+
screenshots (still accepted). To check several states in one run, declare
|
|
36
|
+
`contexts` instead of `context`: 1 to 4 entries `{name, params, now, locale}`
|
|
37
|
+
with unique lowercase names (`a-z`, `0-9`, `-`, `_`), for example
|
|
38
|
+
`[{"name": "week", "params": {"period": "week"}}, {"name": "opened",
|
|
39
|
+
"params": {"open": "<row uuid>"}}]`. Verify renders each one at both widths
|
|
40
|
+
and languages (`.notis/view-<key>.<name>-<width>-<locale>.png`), measures the
|
|
41
|
+
loading skeleton of each, and for one whose params open a list item (`open`)
|
|
42
|
+
also saves the reader while the item loads
|
|
43
|
+
(`.notis/pending-<key>.<name>.reader-<width>-<locale>.png`); with one context
|
|
44
|
+
the names leave out `.<name>`, and a `context` whose params open an item gets the
|
|
45
|
+
reader screenshot too. The `shown`, `actions` and other cases are shared by
|
|
46
|
+
every context.
|
|
47
|
+
A photo or cover shows in verify when `images` maps the exact URL a fixture
|
|
48
|
+
row holds to a picture next to the fixtures: `{"images":
|
|
49
|
+
{"https://example.com/meal.jpg": "./photos/meal.jpg"}}` (png, jpg, webp, gif
|
|
50
|
+
or avif, at most 32 of 2 MB each and 16 MB in all); an image it cannot load
|
|
51
|
+
fails verify with its URL. These pictures are published with the Space's
|
|
52
|
+
source, so use ones you may share.
|
|
28
53
|
Keep every fixture fictional and include every load-time read. Failed or missing
|
|
29
54
|
fixtures fail verification; there is no fallback to the user's real account.
|
|
@@ -18,9 +18,11 @@ Ordinary data and resource edits apply immediately; only source needs a release.
|
|
|
18
18
|
`.notis/space-lock.json`, resources, source key and current revisions. Never
|
|
19
19
|
silently advance a stale checkout or create a duplicate to avoid a conflict.
|
|
20
20
|
2. **Build.** Edit the selected definition, its view and linked Skill files.
|
|
21
|
-
Run `spaces build <dir
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
Run `spaces build <dir>`; it freezes source and artifact bytes and validates
|
|
22
|
+
the view contract and design. A pulled folder holds one Space; a workspace
|
|
23
|
+
with several needs `--space <key>` on build, verify and deploy.
|
|
24
|
+
3. **Verify.** Run `spaces verify <dir>`. A pulled folder targets the Space it
|
|
25
|
+
was pulled from; anything else needs `--space-id <space-id>`.
|
|
24
26
|
This checks current action authorizations and renders explicit fictional
|
|
25
27
|
fixtures at 390px and 1440px with the shared read-only renderer. Provide exact
|
|
26
28
|
action/list/body/record fixtures. A denied read, write-on-load or failed width
|
|
@@ -28,8 +30,7 @@ Ordinary data and resource edits apply immediately; only source needs a release.
|
|
|
28
30
|
Missing browser tooling blocks release: install `agent-browser` and make it
|
|
29
31
|
available on PATH.
|
|
30
32
|
4. **Publish source.** Deploy the frozen, verified snapshot, not edits made after
|
|
31
|
-
verification: `spaces deploy <dir> --
|
|
32
|
-
--request-id <stable-id>`. Or `spaces preview` seals a candidate, and
|
|
33
|
+
verification: `spaces deploy <dir> --request-id <stable-id>`. Or `spaces preview` seals a candidate, and
|
|
33
34
|
`spaces promote <release-id> <dir>` publishes that exact candidate. Preview
|
|
34
35
|
authoring never silently gains live record-edit authority. Deployment updates
|
|
35
36
|
the selected Space, not siblings or the Store.
|
|
@@ -6,7 +6,7 @@ list-case format and every required initial-read fixture.
|
|
|
6
6
|
|
|
7
7
|
| Import | Holds |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| `@notis/sdk` | Data hooks, navigation, host interactions and record components |
|
|
9
|
+
| `@notis/sdk` | Data hooks (rows with `useNativeDocuments`, how many rows with `useNativeCount`, writes with `useNativeMutation`: [Records and declared reads](#records-and-declared-reads)), navigation, host interactions and record components |
|
|
10
10
|
| `@notis/sdk/ui` | The toolkit pieces and their hooks |
|
|
11
11
|
| `@notis/sdk/config` | `defineSpace` and view declarations |
|
|
12
12
|
| `@notis/sdk/words` | Pure action ids, EN and FR words and key specs |
|
|
@@ -32,10 +32,13 @@ Text a person writes and reviews:
|
|
|
32
32
|
- Comments on selected words of a text property (a Markdown body, a subject)
|
|
33
33
|
come from `@notis/sdk/ui`: `usePassageComments` with `CommentableText` around
|
|
34
34
|
an input or textarea, `CommentableRichText` around the `MarkdownEditor` or
|
|
35
|
-
rendered Markdown, and
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
rendered Markdown, and `<PassageCommentPane comments={comments} />` mounted
|
|
36
|
+
once anywhere in the view (it draws in the host Comments panel, never in a
|
|
37
|
+
`SidePane`). The Comments database needs Field, Quote, Prefix and Suffix
|
|
38
|
+
columns; a thread whose words are gone reads Passage changed and stays open.
|
|
39
|
+
It lists newest first; pass `order="reading"` to list the text's threads in
|
|
40
|
+
reading order. Do not build your own highlights. Pins on a page use
|
|
41
|
+
`useComments` with `CommentPane` (see [Comments](#comments)).
|
|
39
42
|
|
|
40
43
|
## Toolkit pieces
|
|
41
44
|
|
|
@@ -53,9 +56,13 @@ rather than from a copy.
|
|
|
53
56
|
tool such as an editor or a `CloudComputerFrame` edge to edge at full height
|
|
54
57
|
instead of the reading column), `onOpenChange(id, reason)` (`reason` is `user`,
|
|
55
58
|
`auto` for a move the list makes itself, or `url`), `renderTile` (tiles), `look` (`two-tone` keeps
|
|
56
|
-
the list tinted) and `autoOpen` (opens the first item
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
the list tinted) and `autoOpen` (opens the first item; leave it off when the
|
|
60
|
+
page has sections above the list, which the open reader would cover). It has
|
|
61
|
+
no toolbar or header slot. `Row` takes `wrap` (title lines), `now` (a fixed
|
|
62
|
+
clock for relative times), `iconSize` (a lead larger than the 20 px icon, such
|
|
63
|
+
as a 40 px photo: pass an `<img>` as `icon`) and `keepLabels` (labels that say
|
|
64
|
+
where the row stands, such as a stage, keep their width and the meta start
|
|
65
|
+
truncates first; by default the labels give way first). A `Row` drawn on its own (a short "Needs action" list)
|
|
59
66
|
takes `onPress` and `pressLabel` and opens something on press, so never wrap
|
|
60
67
|
a row in a button of your own. A `labels` entry with a tone draws as a small
|
|
61
68
|
tinted pill. Drag to select is automatic on a list that selects several
|
|
@@ -85,29 +92,8 @@ rather than from a copy.
|
|
|
85
92
|
only reads. Use it rather than columns of your own.
|
|
86
93
|
- **Time and numbers**: `PeriodPicker` with `usePeriod`, `DayPicker`,
|
|
87
94
|
`CalendarView`, `TimelineView`, `Chart`, `StatRow`, `ChartTable`,
|
|
88
|
-
`RenderChartData`, `Meter`, `DataTable`, `formatDuration
|
|
89
|
-
|
|
90
|
-
label on up to two lines before its bar in a measured axis, and its value after it; `labelFormat` gives that short
|
|
91
|
-
value ("1.2k") while `format` stays the exact tooltip and table text. Draw
|
|
92
|
-
category bars this way rather than with your own recharts. For a chart of
|
|
93
|
-
your own, `ChartContainer` takes `aspect` or `height`; `ChartTooltipContent`
|
|
94
|
-
and `ChartLegend` also work outside it; `<Bar shape={barShape}
|
|
95
|
-
label={{ content: barLabel }} />` keeps zero bars and their value labels. A
|
|
96
|
-
sparkline `null` is a gap. `domain={[min, max]}` fixes the value scale (a
|
|
97
|
-
percentage on 0 to 100) and `valueAxis` draws it on the left through
|
|
98
|
-
`labelFormat` (without a `domain` its top rises to a round quarter); x labels thin out with the room and never run off the edge. `PeriodPicker` without the `custom` preset offers
|
|
99
|
-
presets only. `Meter` is a labelled capacity bar (`label`, `value`, `max`,
|
|
100
|
-
`valueText`, `hint`); at or past `limit` (a tick named by `limitLabel`) it
|
|
101
|
-
turns destructive. Set `limit` only to a threshold the data has (a memory
|
|
102
|
-
reserve, a quota), never to `max`: a full meter is not red by itself. `DataTable` is a read-only table with the `ChartTable`
|
|
103
|
-
look for rows that are not figures: `columns` (`id`, `label`, `cell`, `align`, `width`,
|
|
104
|
-
`mono`, `primary`, `hideBelow`), `rows` or `groups` (`key`, `label`, `rows`),
|
|
105
|
-
`rowKey`, and `onRowPress` with `rowLabel` to open a row (the primary cell
|
|
106
|
-
then sits inside the row's button: text and icons only, no link). The primary
|
|
107
|
-
column never gets under its `minWidth` (120 px by default): the last
|
|
108
|
-
columns that do not fit hide on their own.
|
|
109
|
-
`formatDuration(ms, locale, { units, smallest })` writes "1 h 31 min" (FR
|
|
110
|
-
"4 j 6 h").
|
|
95
|
+
`CalendarHeatmap`, `RenderChartData`, `Meter`, `DataTable`, `formatDuration`; their options
|
|
96
|
+
are in [Charts, meters and tables](#charts-meters-and-tables).
|
|
111
97
|
- **Floating**: `Menu`, `Popover`, `Tooltip`, `InfoTip`. `InfoTip` is the
|
|
112
98
|
info button beside a label (a figure's `about`, a section heading, a meter):
|
|
113
99
|
`label` names what it explains and the children are one or two sentences
|
|
@@ -122,19 +108,8 @@ rather than from a copy.
|
|
|
122
108
|
button, `viewerActions` adds viewer buttons (class `nui-viewer-btn`) and
|
|
123
109
|
`onNotice` hears copy and download results. Use `ImageViewer` alone for a
|
|
124
110
|
picture that opens full screen. Do not build your own lightbox.
|
|
125
|
-
- **Comments**: `useComments` with `CommentPane` and `CommentPins` give
|
|
126
|
-
threads on a Comments database (
|
|
127
|
-
changes). A comment is signed with the viewer's first name; when the
|
|
128
|
-
Comments database's Author is a choice list, give it a `Person` option, which
|
|
129
|
-
signs anyone it does not name (without it the comment saves with no author).
|
|
130
|
-
Pass `me` only to sign with a fixed name. For comments on a whole record with nothing to pin on, pass no
|
|
131
|
-
`anchors` and `columns.anchor: null`: the pane offers New comment itself.
|
|
132
|
-
To let people attach pictures and files to a comment or a reply
|
|
133
|
-
(paste, drop or the paperclip), give the Comments database a files column
|
|
134
|
-
named `Attachments` (or pass `columns.attachments`); there is nothing to add
|
|
135
|
-
in the view. Without the column the pane takes text only. Files open from
|
|
136
|
-
the rows for an hour, for whoever may read the row; an agent downloads one
|
|
137
|
-
from the `url` its query returns, or queries again for a fresh one.
|
|
111
|
+
- **Comments**: `useComments` with `CommentPane` and `CommentPins` give comment
|
|
112
|
+
threads on a Comments database; see [Comments](#comments).
|
|
138
113
|
- **Presenting on a second screen**: `useAudienceScreen({ onAction, onClose,
|
|
139
114
|
title })` works like PowerPoint. `secondScreen` says whether another screen
|
|
140
115
|
is connected; call `open(anchor)` from the Present press itself. It answers
|
|
@@ -156,7 +131,12 @@ rather than from a copy.
|
|
|
156
131
|
page heading: the host top bar shows the title. One toggle is a `Button` with
|
|
157
132
|
`pressed`; several with any number on (filters, chart series) are a
|
|
158
133
|
`ToggleGroup`; tabs and filters over a whole list or section are pills
|
|
159
|
-
(`TabRow
|
|
134
|
+
(`TabRow`, which folds the pills that do not fit into More); a
|
|
135
|
+
`SegmentedControl` is only a mode switch inside a section. `Tabs` scroll
|
|
136
|
+
sideways on a phone; `wrap` puts the tabs that do not fit on a next line.
|
|
137
|
+
`Icon` draws a toolkit icon by name (`fork-knife`, `clock`, `star`...);
|
|
138
|
+
for any other, pass a `@phosphor-icons/react` element as the `icon` (the
|
|
139
|
+
template depends on it), never a second icon set.
|
|
160
140
|
A `Notice` is read politely, danger too; pass `urgent` only for a problem the
|
|
161
141
|
person must act on now (it becomes an alert that interrupts the screen reader).
|
|
162
142
|
- **Fields**: `EditableFields` (a form; Save and Cancel show once something
|
|
@@ -186,6 +166,132 @@ A status maps to one of ten groups (`backlog`, `todo`, `active`, `review`,
|
|
|
186
166
|
with its icon, words and the one status palette: pass the Space's own status to
|
|
187
167
|
`Row` or `StatusIcon` (with `label` for its own name).
|
|
188
168
|
|
|
169
|
+
## Charts, meters and tables
|
|
170
|
+
|
|
171
|
+
`Chart` stacks bars or areas (`stacked`) and runs bars left to right
|
|
172
|
+
(`horizontal`): each label on up to two lines before its bar in a measured axis,
|
|
173
|
+
and its value after it; `labelFormat` gives that short value ("1.2k") while
|
|
174
|
+
`format` stays the exact tooltip and table text. One series of bars draws the
|
|
175
|
+
bars other than the live one lighter until hovered; `dim={false}` draws every
|
|
176
|
+
bar full colour (months of a budget). `barColor(row, series, index)` colours one
|
|
177
|
+
bar by its row (a stage, over a budget); never fake it with stacked series.
|
|
178
|
+
Values under zero (no `domain`) reach below zero with a line at zero (a balance,
|
|
179
|
+
a net change); stacked values under zero stack under the axis. Series take
|
|
180
|
+
`--chart-1` to `--chart-5` in order, then again: give a sixth series its own
|
|
181
|
+
`color`. Draw category bars this way rather than with your own recharts. For a
|
|
182
|
+
chart of your own, `ChartContainer` takes `aspect` or `height`;
|
|
183
|
+
`ChartTooltipContent` and `ChartLegend` also work outside it; `<Bar
|
|
184
|
+
shape={barShape} label={{ content: barLabel }} />` keeps zero bars and their
|
|
185
|
+
value labels. A sparkline `null` is a gap. `domain={[min, max]}` fixes the value
|
|
186
|
+
scale (a percentage on 0 to 100) and `valueAxis` draws it on the left through
|
|
187
|
+
`labelFormat` (without a `domain` its top rises to a round quarter); x labels
|
|
188
|
+
thin out with the room and never run off the edge.
|
|
189
|
+
|
|
190
|
+
`PeriodPicker` without the `custom` preset offers presets only;
|
|
191
|
+
`presets={[...PRESETS.slice(0, -1), ...EXTRA_PRESETS, 'custom']}` adds Last 6
|
|
192
|
+
months and Last 12 months (this month and the 5 or 11 before it, binned by month
|
|
193
|
+
and compared with the same months before, like any range from the 1st spanning
|
|
194
|
+
six months or more).
|
|
195
|
+
|
|
196
|
+
`Meter` is a labelled capacity bar (`label`, `value`, `max`, `valueText`,
|
|
197
|
+
`hint`, `tone`: `success`, `warning`, `info` or `danger` colour the fill, such
|
|
198
|
+
as a goal met or near; `danger` looks like a reached limit, so keep it for a
|
|
199
|
+
value that is already bad); at or past `limit` (a tick named by `limitLabel`) it
|
|
200
|
+
turns destructive. Set `limit` only to a threshold the data has (a memory
|
|
201
|
+
reserve, a quota), never to `max`: a full meter is not red by itself.
|
|
202
|
+
|
|
203
|
+
`DataTable` is a read-only table with the `ChartTable` look for rows that are
|
|
204
|
+
not figures: `columns` (`id`, `label`, `cell`, `align`, `width`, `mono`,
|
|
205
|
+
`primary`, `hideBelow`, `wrap`), `rows` or `groups` (`key`, `label`, `rows`),
|
|
206
|
+
`rowKey`, and `onRowPress` with `rowLabel` to open a row (the primary cell then
|
|
207
|
+
sits inside the row's button: text and icons only, no link); `canPressRow(row)`
|
|
208
|
+
leaves a row that opens nothing plain. Cells truncate: a column with `wrap` (a
|
|
209
|
+
question, a note) wraps and its rows grow, and `wrapHeaders` puts long headers
|
|
210
|
+
(French ones over narrow figure columns) on two lines instead of an ellipsis.
|
|
211
|
+
The primary column never gets under its `minWidth` (120 px by default): the last
|
|
212
|
+
columns that do not fit hide on their own.
|
|
213
|
+
|
|
214
|
+
`formatDuration(ms, locale, { units, smallest })` writes "1 h 31 min" (FR "4 j 6
|
|
215
|
+
h").
|
|
216
|
+
|
|
217
|
+
`CalendarHeatmap` is a GitHub-style grid of days coloured by value (a habit,
|
|
218
|
+
journal entries, a mood): `data` rows with `dateKey` and `valueKey` (default
|
|
219
|
+
`date` and `value`; `valueKey={null}` counts rows), `from` and `to` (default
|
|
220
|
+
the last 12 months), `tone`, `scale="diverging"` with `domain` or `midpoint`
|
|
221
|
+
for good to bad data (`higherIsBetter={false}` swaps the colours), `levels`,
|
|
222
|
+
`format`, `onSelect(day)` (cells become buttons; `day` is `{ date, key }`
|
|
223
|
+
with `key` the ISO day, plus `value` and the day's `rows`), `title`, `legend`,
|
|
224
|
+
`weekStartsOn`. It brings its tooltips, keys and data table.
|
|
225
|
+
|
|
226
|
+
## Comments
|
|
227
|
+
|
|
228
|
+
`useComments` with `CommentPane` and `CommentPins` give comment
|
|
229
|
+
threads on a Comments database (pins, zones, replies, asks, Archive, Delete,
|
|
230
|
+
Edit, Copy changes). The pane draws in the host Comments panel beside the
|
|
231
|
+
chat, not where it is mounted: mount `<CommentPane controller={comments} />`
|
|
232
|
+
once anywhere in the view and never wrap it in `SidePane` (a `SidePane` given
|
|
233
|
+
a comment pane shows its page alone). While comments are off for the viewer,
|
|
234
|
+
or on a Site, a link or a preview, the pane, pins and tool bar render nothing:
|
|
235
|
+
never build a fallback comment list. The host owns archive (Status
|
|
236
|
+
`Resolved`, shown Done), delete with Undo, editing your own comment, the
|
|
237
|
+
Open/Done/All filter, the Goes to line and To chip that name the thread a
|
|
238
|
+
comment goes to, `comment=` links and push; the server checks who may change
|
|
239
|
+
a comment and writes `Author` itself (the person's name, or the agent's on
|
|
240
|
+
an agent's comment, adding the select choice when it is missing), so never
|
|
241
|
+
set `Author` from the view or let people pick it. On someone else's comment
|
|
242
|
+
people only archive, reopen, delete (with edit rights) or answer it: every
|
|
243
|
+
other column is its author's, and agents change only what they wrote. Every
|
|
244
|
+
Comments table is followed for waiting comments and push, with or without
|
|
245
|
+
`agents`, and a person's comments, replies and answers go to the thread they
|
|
246
|
+
name even in a Space that declares no `agents`: an answer, or a reply in a
|
|
247
|
+
thread an agent started, goes back to that agent's own thread and subagent,
|
|
248
|
+
and editing a comment wakes an agent only when it replied after the comment.
|
|
249
|
+
A reply under a deleted comment is refused (`comment_not_found`). Every
|
|
250
|
+
comment written through the Notis CLI needs the writing agent's band name
|
|
251
|
+
(`NOTIS_AGENT_NAME` or `--agent-name`, such as `fred-and-the-machine`; the
|
|
252
|
+
rule and the id the CLI keeps per name are in the notis-cli skill): the
|
|
253
|
+
comment is then that agent's, signed "Fred And The Machine", and never wakes
|
|
254
|
+
it. Without a name it is refused (`agent_name_required`), even for a person
|
|
255
|
+
typing the CLI, and a view never writes comments with a Cloud Computer
|
|
256
|
+
credential. The Notis assistant never writes comments itself
|
|
257
|
+
(`orchestrator_comments_refused`): it starts a sub-agent for comment work,
|
|
258
|
+
which signs with its own band name. On a host without the Comments panel a
|
|
259
|
+
comment is signed with the viewer's first name; when the Comments
|
|
260
|
+
database's Author is a choice list, give it a `Person` option, which signs
|
|
261
|
+
anyone it does not name (without it the comment saves with no author). Pass
|
|
262
|
+
`me` only to sign with a fixed name. For comments on a whole record with
|
|
263
|
+
nothing to pin on, pass no `anchors` and `columns.anchor: null`: the pane
|
|
264
|
+
offers New comment itself.
|
|
265
|
+
|
|
266
|
+
Options:
|
|
267
|
+
- `order` on the pane: `'newest'` (default), `'oldest'`, `'anchor'` or a
|
|
268
|
+
comparator. `groupBy`: a function returning `{ key, label }` per thread,
|
|
269
|
+
or false. A controller with no `scope` (the Space home) groups by page,
|
|
270
|
+
named by `scopeNames` on `useComments`; a scoped one is flat.
|
|
271
|
+
- `modes` on `useComments`: any of `text`, `point`, `box`, `items`, `time`,
|
|
272
|
+
`page` (listed in that order). Default: `point` (plus `box` with zone
|
|
273
|
+
columns) when there are anchors, `items` when you pass `onStartItems`,
|
|
274
|
+
`time` when you pass `currentTime`, and `page`. The pane's New comment
|
|
275
|
+
button lists them; `<CommentToolBar controller={comments} />` puts one
|
|
276
|
+
button per mode on the page, toggled with C (`toggleKey`, or `pinned` to
|
|
277
|
+
keep it shown), and Escape cancels a mode.
|
|
278
|
+
- `onStartItems()`: show your own picker (checkboxes, a selection), then call
|
|
279
|
+
`comments.startItems(anchors)`. `currentTime()`: the recording's moment in
|
|
280
|
+
seconds; name a Time column with `columns: { time: 'Time' }` to store it.
|
|
281
|
+
- `focusKey` defaults to the `comment` view param, so a link with
|
|
282
|
+
`comment=<root key>` opens that thread; null turns it off. Give the table
|
|
283
|
+
an `Edited at` date column so edited comments say edited, and an
|
|
284
|
+
`Answer to` text column so an answer to an agent's question reaches only
|
|
285
|
+
the agent that asked (the server adds it to an existing table on the first
|
|
286
|
+
answer, so there is nothing to do by hand).
|
|
287
|
+
|
|
288
|
+
To let people attach pictures and files to a comment or a reply
|
|
289
|
+
(paste, drop or the paperclip), give the Comments database a files column
|
|
290
|
+
named `Attachments` (or pass `columns.attachments`); there is nothing to add
|
|
291
|
+
in the view. Without the column the pane takes text only. Files open from
|
|
292
|
+
the rows for an hour, for whoever may read the row; an agent downloads one
|
|
293
|
+
from the `url` its query returns, or queries again for a fresh one.
|
|
294
|
+
|
|
189
295
|
## Records and declared reads
|
|
190
296
|
|
|
191
297
|
| API | Use |
|
|
@@ -195,6 +301,7 @@ with its icon, words and the one status palette: pass the Space's own status to
|
|
|
195
301
|
| `useShownAvailable(name)` | Check whether this host exposes the declared native list. A record Site can expose only its exact server-pinned row scope. |
|
|
196
302
|
| `useAction<Inputs, Result>(name)` / `useActionQuery<Result>(name, inputs, options?)` | Call a declared action (`call(inputs, options)`); read the result of a declared read action. Never call account-wide tools from a Space. When a read action answers with native rows, pass `rows: { binding, at, query? }` (`at`: the answer field holding them, `''` for a bare list; `query`: the native query it runs) so native writes to that database show in it at once too; without it the read only refreshes after the write. A failed call throws a `SpaceActionError`; its `code` is `rate_limited` when the provider refused it for sending too fast (it did not run, and Notis already waited and retried safe calls), so offer a retry after a few seconds instead of adding your own limiter, and `read_timeout` when a read took too long. |
|
|
197
303
|
| `useNativeMutation(binding, operation)` | Insert, update or delete one row of a linked database through the action that declares `LOCAL_NOTIS_DATABASE_INSERT`, `_UPDATE` or `_DELETE` on that binding with `request: { $input: 'request' }`. `mutate(input, {schemaRevision, requestId, showIn?})` returns the receipt (`record_key`, `revision`). The write shows in every list of that database at once, before the server answers: an edited row changes where it is (and moves to its sorted place, or leaves a `useNativeDocuments` read whose filter no longer keeps it), a new row joins the reads whose filter it passes and the `shows` lists named by `showIn` (by default the view's only list over that database), and a delete moves the record to the bin and leaves every list. A failed write puts the server's rows back. Do not keep your own copy of the change on top. One new request ID per effect. An insert action takes no `content_markdown`: insert, then save the body with `useNativeDocumentBody` and the record's revision. |
|
|
304
|
+
| `useNativeCount(binding, {query?, enabled?, staleTimeMs?, subscribe?})` | How many rows of a linked database match `query.filter` (and `include_archived`), through the same query action as `useNativeDocuments`, without loading any row. `count` (and `schemaRevision`) stay undefined until the first answer; `loading`, `error`, `refetch` and `live` work as in the other reads. When the filter changes it keeps the last count (`isPreviousData` true) until the new one arrives; a write refreshes it once confirmed, not optimistically. Use it for badges, tab totals and empty checks instead of reading every page. |
|
|
198
305
|
| `useNativeDelete(binding)` | Trash many rows of one linked database (a deck and its slides, a multi-select). `deleteMany(inputs, {schemaRevision, requestId})` hides every row from the lists at once, runs the writes a few at a time, each with the request ID `${requestId}:${record_key}` (a retry with the same `requestId` replays instead of trashing twice), refreshes the lists once at the end and brings back the rows whose write failed. It never throws for a failed row: it resolves to `{done, failed}`; say how many failed. Use it rather than a loop of `mutate`. |
|
|
199
306
|
| `useNativeDocumentBody(binding, recordKey, {readAction, writeAction?, enabled?})` | Markdown body adapter. Keep drafts in the view; save with the original content, record/schema revisions and stable request ID. Rich editing normally uses `DocumentEditor`. |
|
|
200
307
|
| `useNotis()` | Host resource, Space labels, route and ready state. Use `resource.id` for the current Space identity. |
|
|
@@ -209,10 +316,23 @@ measured from the view at verify time and drawn from the release; `skeletonKey`
|
|
|
209
316
|
(default `main`) names the region when a view has several separately loading
|
|
210
317
|
parts, and `variant` only draws the fallback before the first measured release.
|
|
211
318
|
A region that only shows on another tab or page is measured when the
|
|
212
|
-
verification fixtures list that tab's params in `context.skeletonParams
|
|
319
|
+
verification fixtures list that tab's params in `context.skeletonParams` or as
|
|
320
|
+
another of their `contexts` ([fixtures](fixtures.md)). A Space
|
|
213
321
|
with editor-only parts gets the skeleton of its public view, the one visitors
|
|
214
322
|
see: an editors' page that loads differently keeps a plain loading state of its own.
|
|
215
323
|
|
|
324
|
+
A PostHog read is a declared action on the connected PostHog server's EXEC
|
|
325
|
+
tool (`LOCAL_MCP_..._EXEC` or `CUSTOM_..._EXEC`) with no `inputs` and exactly
|
|
326
|
+
these `arguments`: `{project_id: <number>, query: 'SELECT ...', context: '<what
|
|
327
|
+
it answers>', llm_model: '<model name>'}`. The query is one fixed SELECT (no
|
|
328
|
+
`;`, at most 32 KB); Notis runs it read-only. Read it with `useActionQuery`.
|
|
329
|
+
|
|
330
|
+
A Supabase read is a declared action on the connected Supabase server's
|
|
331
|
+
EXECUTE_SQL tool whose only argument is `query`: the header line
|
|
332
|
+
`/* notis-postgres-read-v4 */` (30 seconds; `-v3` is 8, `-v5` admits CASE
|
|
333
|
+
indexes), then one schema-qualified SELECT, as text or `$sql` parts. Verify
|
|
334
|
+
compiles it into its guarded read and names any part the compiler refuses.
|
|
335
|
+
|
|
216
336
|
For another explicitly idempotent read use `useActionQuery`, or
|
|
217
337
|
`useQuery(keyArray, readCallback, { readOnly: true })` with every input in the
|
|
218
338
|
key. Call declared read actions inside a custom read with
|
|
@@ -251,6 +371,10 @@ in component props.
|
|
|
251
371
|
once the host has taken the navigation and rejects when the host refuses it:
|
|
252
372
|
`await` it (or `void` it in a click handler). Prefer declared portable navigation
|
|
253
373
|
aliases for sibling destinations; the host resolves them under current access.
|
|
374
|
+
Declare each alias in `navigation`, then bind it once per Space with
|
|
375
|
+
`notis spaces navigation bind <space-id> --alias <name> --target '{"space_id":"<id>"}' --revision <n>`
|
|
376
|
+
before you deploy: a binding takes effect at the next deploy, and an unbound name
|
|
377
|
+
fails verify with `navigation_unavailable`.
|
|
254
378
|
Use declared params for view state, for example `{params: {project: key, period: 'week'}}`.
|
|
255
379
|
The destination drops unknown params and authorizes referenced records. Changing
|
|
256
380
|
a slug cannot change identity. Agents cite current server-returned links.
|
|
@@ -320,8 +444,8 @@ cloud computer.
|
|
|
320
444
|
|
|
321
445
|
## Visual data and Markdown
|
|
322
446
|
|
|
323
|
-
Give a chart its numbers through `RenderChartData` (the toolkit's `Chart
|
|
324
|
-
`ChartTable` already do): it adds a semantic table without a second visible one.
|
|
447
|
+
Give a chart its numbers through `RenderChartData` (the toolkit's `Chart`,
|
|
448
|
+
`ChartTable` and `CalendarHeatmap` already do): it adds a semantic table without a second visible one.
|
|
325
449
|
The renderer never guesses exact numbers from SVG or canvas geometry; a chart
|
|
326
450
|
without it contributes only its accessible name to the Markdown.
|
|
327
451
|
|
|
@@ -11,6 +11,7 @@ revision and current target. [Delivery](release.md) owns the release sequence.
|
|
|
11
11
|
| Source creation fails | Check its canonical schema and same-view main record param. Verify creates no resource; promotion is atomic. |
|
|
12
12
|
| View-link warning after a successful write | Use `FIND_VIEWS` with the returned record key. The write is already committed; do not insert again. |
|
|
13
13
|
| Empty list or missing properties | Inspect the live schema, filter, authorized binding and returned projection. Distinguish a successful empty result from a denied/failed read. |
|
|
14
|
+
| A live read is refused: `connection_unavailable` in the page, or a render answers `render_read_unavailable` with that `reason` and the read's `action_id` | The connection the Space reads through is not usable as it was saved at publish. The Editor who published it reconnects that integration in Integrations; if it is already connected, they publish the Space again (`notis spaces deploy`) so the read is authorized with the connection as it is now. A re-render or a retry never clears it, and an agent never publishes another person's Space with its own connections. |
|
|
14
15
|
| Verification fails on a read | Add the exact fictional case to the selected fixture file. Never fill missing fixtures with live private data. |
|
|
15
16
|
| A caught write-on-load fails rendering | Remove the side effect from initial rendering. A read-only check cannot authorize writes. |
|
|
16
17
|
| Stale binding/schema/record | Read current state, preserve the original receipt/intent and merge the intended edit. Do not overwrite concurrent changes. |
|
|
@@ -19,6 +20,8 @@ revision and current target. [Delivery](release.md) owns the release sequence.
|
|
|
19
20
|
| `protocol_required`, `invalid_protocol` or another 400 naming a `field` | The call is malformed, not out of date. Fix the named field (native Space and database tools take `"protocol": 1`) and call again. |
|
|
20
21
|
| Uncertain deployment | Run `notis doctor`, read the same Space and release/request identity, then reconcile before retrying. |
|
|
21
22
|
| A tool call fails with `network_error`, `network_timeout` or a 502, 503 or 504 | The CLI already retried it where repeating is safe (`attempts` in its answer). Do not add your own retry loop: read back the same target, then run it again only if it did not happen, with the same `request_id`. |
|
|
23
|
+
| `notis spaces verify` or `deploy` fails with `network_error` or `network_timeout` | The message names the server step, the network cause (`ENOTFOUND`, `ECONNRESET`, ...) and the request. A verify published nothing: run it again. A deploy says which `--request-id` to reuse: run the same command with it, which resumes that release and never publishes it twice. A cause such as `ENOTFOUND` or `ECONNREFUSED` means this machine cannot reach Notis (a sandbox without network): run it where it can. |
|
|
24
|
+
| A render answers `render_timeout` or `render_temporarily_unavailable` | The view was slow or a read lost its connection (a busy machine or server). Its access did not change: render the same link again. Only `render_access_changed` means access changed. |
|
|
22
25
|
| Screenshot misses content | Inspect actual inner scrolling, lazy data and frame layout; keep full-height limits and treat a failed capture as unverified. |
|
|
23
26
|
| Site unexpectedly has editor controls | Recheck the anonymous scoped runtime. A Site cannot borrow an ambient signed-in session or another record's authority. |
|
|
24
27
|
| Memory hit looks current but access/freshness is unknown | Render its current link and verify the relevant value. Do not release historical content from an unverified read set. |
|
|
@@ -84,6 +84,13 @@ The saved `read` action is deliberately constrained to one native record for
|
|
|
84
84
|
body and record-Site reads; `shows.notes` owns the Editor's collection list. Keep
|
|
85
85
|
both tied to the same declared resource.
|
|
86
86
|
|
|
87
|
+
A `shows` list's `where` is a native filter: `{field: {property}, op, value}`
|
|
88
|
+
conditions in `and` / `or` groups. For several options of one select or status,
|
|
89
|
+
write one `in`, never an `or` of `equals`: `{field: {property: 'Stage'}, op:
|
|
90
|
+
'in', value: ['Lead', 'Won']}`. For "how many", use `useNativeCount` ([SDK](sdk.md#records-and-declared-reads)),
|
|
91
|
+
never a list paged to the end. Operators, limits and placeholders:
|
|
92
|
+
[Params and declared lists](#params-and-declared-lists).
|
|
93
|
+
|
|
87
94
|
## Records in the sidebar
|
|
88
95
|
|
|
89
96
|
`collection` lists the database's records as rows under the Space in the
|
|
@@ -267,6 +274,19 @@ navigation and the toolkit pieces.
|
|
|
267
274
|
- `shows` for native data is `{database, where, open?}`. `where` is the native filter
|
|
268
275
|
grammar and is what `useShown` executes, not commentary beside a different query.
|
|
269
276
|
`open` names a record param over the same database.
|
|
277
|
+
- `in` matches any of a list: up to 500 record keys on `record_key`/`id`, or up to
|
|
278
|
+
100 options (labels or IDs) of a select or status property, such as
|
|
279
|
+
`{field: {property: 'Stage'}, op: 'in', value: ['Lead', 'Won']}`. Each option must
|
|
280
|
+
exist; a row with no option matches none. A list of several values costs one
|
|
281
|
+
condition per value toward the filter's 200 (a placeholder counts once bound). In
|
|
282
|
+
`shows`, the list may mix options and placeholders: bound values naming no option
|
|
283
|
+
are dropped (a fixed one is refused), repeats count once,
|
|
284
|
+
more than 100 refuses the read, and a list left empty (an unset param, or only
|
|
285
|
+
unknown options) matches no row; it is never dropped like a single condition.
|
|
286
|
+
- A `LOCAL_NOTIS_DATABASE_QUERY` read action's `request` may add `properties:
|
|
287
|
+
[{property: 'Name'}, ...]` (1 to 100) to return only those fields. For "how many",
|
|
288
|
+
use `useNativeCount(binding, {query: {filter}})` ([SDK](sdk.md)): it sends `mode:
|
|
289
|
+
'count'` and loads no row, so never page through every row to count them.
|
|
270
290
|
- A condition may add `when: 'late'`, naming a boolean param. It is included
|
|
271
291
|
only when that setting is true; absent/false drops it before pagination.
|
|
272
292
|
This also gates `is_empty` for unplanned tasks. `tasksViewFilter` pairs with
|