@notis_ai/cli 0.2.31 → 0.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +88 -9
  2. package/config/notis_app_design_rules.json +22 -0
  3. package/dist/agent-hooks/notis-agent-hook.mjs +4677 -913
  4. package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -1
  5. package/dist/base-skills/notis-cli/SKILL.md +7 -3
  6. package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
  7. package/dist/base-skills/notis-spaces/SKILL.md +9 -4
  8. package/dist/base-skills/notis-spaces/references/comments.md +94 -0
  9. package/dist/base-skills/notis-spaces/references/context.md +20 -19
  10. package/dist/base-skills/notis-spaces/references/design.md +3 -2
  11. package/dist/base-skills/notis-spaces/references/fixtures.md +4 -2
  12. package/dist/base-skills/notis-spaces/references/reading.md +3 -1
  13. package/dist/base-skills/notis-spaces/references/release.md +3 -1
  14. package/dist/base-skills/notis-spaces/references/sdk.md +160 -88
  15. package/dist/base-skills/notis-spaces/references/store.md +24 -1
  16. package/dist/sdk/src/components/SelectionActionBar.tsx +42 -7
  17. package/dist/sdk/src/components/SpaceTextComments.tsx +284 -0
  18. package/dist/sdk/src/config.ts +3 -1
  19. package/dist/sdk/src/functions.ts +203 -0
  20. package/dist/sdk/src/hooks/useAgentQueue.ts +17 -28
  21. package/dist/sdk/src/hooks/useCollectionInteractions.ts +7 -2
  22. package/dist/sdk/src/hooks/useConnection.ts +102 -0
  23. package/dist/sdk/src/hooks/useFunction.ts +42 -0
  24. package/dist/sdk/src/hooks/useNotisSettings.ts +101 -0
  25. package/dist/sdk/src/index.ts +15 -4
  26. package/dist/sdk/src/runtime.ts +16 -1
  27. package/dist/sdk/src/space.ts +333 -33
  28. package/dist/sdk/src/ui/comments/passageModel.ts +99 -0
  29. package/dist/sdk/src/ui/comments/textHighlights.ts +33 -0
  30. package/dist/sdk/src/ui/icons.tsx +17 -1
  31. package/dist/skill-sync/index.js +239 -30
  32. package/dist/skill-sync-worker.mjs +453 -124
  33. package/dist/space-harness/host.js +218 -93
  34. package/dist/space-sdk/dist/chunk-4GWS2IFO.js +3 -0
  35. package/dist/space-sdk/dist/index.js +3 -3
  36. package/dist/space-sdk/dist/ui.js +9 -8
  37. package/dist/space-sdk/src/config.ts +3 -1
  38. package/dist/space-sdk/src/functions.ts +203 -0
  39. package/dist/space-sdk/src/hooks/useAgentQueue.d.ts +2 -13
  40. package/dist/space-sdk/src/hooks/useCollectionInteractions.d.ts +2 -0
  41. package/dist/space-sdk/src/hooks/useConnection.d.ts +42 -0
  42. package/dist/space-sdk/src/hooks/useFunction.d.ts +20 -0
  43. package/dist/space-sdk/src/hooks/useNotisSettings.d.ts +48 -0
  44. package/dist/space-sdk/src/index.d.ts +10 -4
  45. package/dist/space-sdk/src/runtime.d.ts +14 -1
  46. package/dist/space-sdk/src/space.ts +333 -33
  47. package/dist/space-sdk/src/tailwind-candidates.d.ts +227 -152
  48. package/dist/space-sdk/src/ui/blocks/blocks.d.ts +18 -0
  49. package/dist/space-sdk/src/ui/blocks/index.d.ts +2 -2
  50. package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +7 -4
  51. package/dist/space-sdk/src/ui/comments/agentRuntime.d.ts +10 -2
  52. package/dist/space-sdk/src/ui/comments/commentModel.d.ts +55 -88
  53. package/dist/space-sdk/src/ui/comments/commentWords.d.ts +9 -0
  54. package/dist/space-sdk/src/ui/comments/hostComments.d.ts +13 -9
  55. package/dist/space-sdk/src/ui/comments/index.d.ts +1 -1
  56. package/dist/space-sdk/src/ui/comments/paneParts.d.ts +27 -5
  57. package/dist/space-sdk/src/ui/comments/passageModel.d.ts +12 -36
  58. package/dist/space-sdk/src/ui/comments/useCommentRouting.d.ts +26 -4
  59. package/dist/space-sdk/src/ui/comments/useComments.d.ts +64 -74
  60. package/dist/space-sdk/src/ui/comments/usePassageComments.d.ts +8 -4
  61. package/dist/space-sdk/src/ui/icons.d.ts +6 -0
  62. package/dist/space-sdk/src/ui/index.d.ts +2 -2
  63. package/dist/space-sdk/src/ui/layout/SidePane.d.ts +3 -4
  64. package/dist/space-sdk/src/ui/list/ListReader.d.ts +8 -0
  65. package/dist/space-sdk/src/ui/period/dateFormat.d.ts +27 -8
  66. package/dist/view-renderer/dist/host.js +285 -160
  67. package/package.json +3 -3
  68. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +2 -2
  69. package/skills/notis-spaces/cli.md +17 -3
  70. package/src/cli.js +2 -1
  71. package/src/command-specs/index.js +3 -0
  72. package/src/command-specs/repository-secrets.js +171 -0
  73. package/src/command-specs/spaces.js +70 -3
  74. package/src/runtime/agent-credential.js +175 -0
  75. package/src/runtime/agent-identity.js +92 -15
  76. package/src/runtime/app-boundary-validator.js +248 -3
  77. package/src/runtime/app-data-literals.js +32 -23
  78. package/src/runtime/app-platform.js +8 -0
  79. package/src/runtime/auth-recovery.js +14 -0
  80. package/src/runtime/profiles.js +15 -0
  81. package/src/runtime/skill-sync/index.ts +3 -2
  82. package/src/runtime/skill-sync/symlink-manager.ts +354 -35
  83. package/src/runtime/skill-sync/types.ts +10 -1
  84. package/src/runtime/space-functions.js +211 -0
  85. package/src/runtime/space-platform.js +12 -3
  86. package/src/runtime/space-source.js +116 -13
  87. package/src/runtime/space-test-server.js +44 -7
  88. package/src/runtime/space-verification.js +3 -1
  89. package/src/runtime/transport.js +15 -0
  90. package/dist/sdk/src/components/NotisCommentBoundary.tsx +0 -132
  91. package/dist/space-sdk/dist/chunk-3DFOGU26.js +0 -3
  92. package/dist/space-sdk/src/components/NotisCommentBoundary.d.ts +0 -26
@@ -1 +1 @@
1
- {"schema":1,"stamp":1794771946,"commit":"b5902cc7f64ba2ed2615c903c6e88a58d588bf5f"}
1
+ {"schema":1,"stamp":1795375614,"commit":"f09e2798430a8975fc45a48f786a4c155368285f"}
@@ -59,14 +59,18 @@ Two rules follow from the dev credential being scoped to that local backend:
59
59
 
60
60
  ## Declare who you are before writing
61
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:
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 of your own (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"); every sub-agent picks its own, so the person sees which one wrote, and a harness or product name (`claude-code`, `codex`, `cursor-agent`, `notis-agent`, `t3-code`, `assistant`, `bot`...) is refused (`invalid_agent_identity`). Set it once per session with your own unique id and the name of the thread you work in:
63
63
 
64
64
  ```bash
65
65
  export NOTIS_AGENT_NAME="fred-and-the-machine" # your band name
66
- export NOTIS_AGENT_THREAD="<Notis thread id>" # optional
66
+ export NOTIS_AGENT_ID="<your session id>" # your own unique id, such as your T3 thread or Codex session id
67
+ export NOTIS_AGENT_THREAD_NAME="PR #3851" # the thread you work in, shown after your name (80 characters at most)
68
+ export NOTIS_AGENT_THREAD="<Notis thread id>" # only when you work for one of the person's Notis threads
67
69
  ```
68
70
 
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.
71
+ or pass `--agent-name`, `--agent-id`, `--agent-thread-name` and `--agent-thread` on a single command (a flag wins over its variable). Without `NOTIS_AGENT_ID` the CLI generates one id for each name the first time it is used on the computer and keeps sending it; the id is what makes your comments yours to edit or delete. The CLI also sends the harness that runs it (Claude Code, Codex, Cursor), detected from that harness's own variables, so your comments show its logo; `NOTIS_AGENT_HARNESS` overrides it. A comment thread you wrote in last is held by you: when the person replies or answers there, Notis wakes no agent of its own, so read the replies yourself when you check (`waiting`, `list` or `thread` of `LOCAL_NOTIS_SPACE_COMMENT_THREADS`); until you read them the person sees "<your name> has not read it yet". 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.
72
+
73
+ Space comments are not database rows: read and write them only with `LOCAL_NOTIS_SPACE_COMMENT_THREADS` (for example `notis tools exec LOCAL_NOTIS_SPACE_COMMENT_THREADS --arguments '{"protocol":2,"operation":"list","space":"<space id>","page":"all"}'`, then `reply` with the root's `comment_id` and a `body`), never with `LOCAL_NOTIS_DATABASE_QUERY` or an upsert. Check its schema with `--get-schema` first. Agents never archive comments.
70
74
 
71
75
  ## Critical rule for missing tools
72
76
 
@@ -1 +1 @@
1
- {"schema":1,"stamp":1794771946,"commit":"b5902cc7f64ba2ed2615c903c6e88a58d588bf5f"}
1
+ {"schema":1,"stamp":1795375614,"commit":"f09e2798430a8975fc45a48f786a4c155368285f"}
@@ -2,8 +2,8 @@
2
2
  name: notis-spaces
3
3
  description: Explain Notis Spaces, sharing, resource links and lifecycle; build or update their views and linked Skills, inspect a saved view with its current data, choose whether text, a view, a Notes page or a Space answers a request, or install or update a Space from the Store or a pasted Space share link (check it, ask, then install).
4
4
  mcp_resource: true
5
- mcp_tool_patterns: ["LOCAL_NOTIS_MANAGE_SPACE", "LOCAL_NOTIS_SPACE_VERSIONS", "LOCAL_NOTIS_DOCUMENT_VERSIONS", "LOCAL_NOTIS_FIND_VIEWS", "LOCAL_NOTIS_RENDER_VIEW"]
6
- mcp_references: ["references/release.md", "references/architecture.md", "references/design.md", "references/sdk.md", "references/fixtures.md", "references/views.md", "references/memory.md", "references/troubleshooting.md", "references/reading.md", "references/context.md", "references/reports.md", "references/store.md"]
5
+ mcp_tool_patterns: ["LOCAL_NOTIS_MANAGE_SPACE", "LOCAL_NOTIS_SPACE_VERSIONS", "LOCAL_NOTIS_DOCUMENT_VERSIONS", "LOCAL_NOTIS_FIND_VIEWS", "LOCAL_NOTIS_RENDER_VIEW", "LOCAL_NOTIS_SPACE_FUNCTIONS"]
6
+ mcp_references: ["references/release.md", "references/architecture.md", "references/design.md", "references/sdk.md", "references/comments.md", "references/fixtures.md", "references/views.md", "references/memory.md", "references/troubleshooting.md", "references/reading.md", "references/context.md", "references/reports.md", "references/store.md"]
7
7
  ---
8
8
 
9
9
  # Notis Spaces
@@ -90,9 +90,10 @@ user asked, and quote their words in `user_words`. The CLI equivalents are
90
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
91
  | Verification fixtures, one view in several states (`contexts`) | [Fixtures](references/fixtures.md): one verify draws every state in English and French |
92
92
  | Read a saved view, chart, report or HTML page | [Read and render](references/reading.md) |
93
+ | Check a view in a browser with `agent-browser` (open it, click, compare 390 and 1440 px) | The notis-browser-control skill (hosted guide: `notis://docs/notis-browser-control`): which runtime, the profile, the saved state |
93
94
  | Save or revise a Notes report or interactive report | [Reports](references/reports.md) |
94
95
  | Choose a memory policy | [Memory](references/memory.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) |
96
+ | 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); comments on a page and the agents that answer them: [Comments](references/comments.md) |
96
97
  | Explain resources, sharing and lifecycle | [Platform boundaries](references/architecture.md) |
97
98
  | Diagnose a failed check or release | [Troubleshooting](references/troubleshooting.md) |
98
99
  | 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 |
@@ -175,7 +176,9 @@ stops receiving that piece's fixes.
175
176
  read ([Fixtures](references/fixtures.md)). Look at EN and FR at 390 and 1440 px; fix failed reads, clipping, wrong
176
177
  data and state transitions before release.
177
178
  5. Deploy within the user's authorization. Read back the exact published
178
- revision, render its live view link and inspect the affected interaction.
179
+ revision, render its live view link and inspect the affected interaction
180
+ (in a browser: the notis-browser-control skill, hosted guide
181
+ `notis://docs/notis-browser-control`).
179
182
  A successful local build is not proof of deployment or live data.
180
183
  6. Return the view-qualified link and distinguish local checks, publication to
181
184
  the installed Space, and Store publication. Reconcile uncertain outcomes with
@@ -269,6 +272,8 @@ and the same shape for `install` and `update` below.
269
272
  `notis skills read --target '<onboarding_skill.target as JSON>'`. Never ask again
270
273
  for what you already know about the person. During Notis onboarding the Skill
271
274
  never asks for the basics again and never completes onboarding: Notis does.
275
+ An update never repeats the Space's setup: its `onboarding_skill` is null
276
+ unless the new version adds the Space's first onboarding Skill.
272
277
 
273
278
  If the answer is `plan_required`, installing with Notis needs a plan or the free
274
279
  trial. Offer its `subscribe_url`, or installing it with another agent through the
@@ -0,0 +1,94 @@
1
+ # Comments in Space views
2
+
3
+ The comment pieces of the SDK ([SDK reference](sdk.md)) and the agents that answer comments.
4
+
5
+ ## Comment pieces
6
+
7
+ Every Space page has comments: Notis stores them itself, one store for all
8
+ Spaces, and lists them in the host Comments panel beside the chat. Never
9
+ create, bind or declare a Comments database, never add comment columns, and
10
+ never write comment rows with native writes or `useNativeMutation`. Selected
11
+ words on any page offer Cite and Comment without any code. Comments exist on
12
+ Space pages only (Notes pages included). While comments are off for the
13
+ viewer, or on a Site, a link or a preview, every comment piece renders
14
+ nothing: never build a fallback comment list or your own comment box.
15
+
16
+ Add comment code only when comments should sit on something more than words
17
+ of the page: `useComments` with `CommentPane`, `CommentPins` and
18
+ `CommentToolBar`.
19
+
20
+ ```tsx
21
+ const comments = useComments({
22
+ anchors: slides.map(s => ({ id: s.id, recordKey: s.recordKey, order: s.order, title: s.title })),
23
+ anchorKey: slide?.recordKey ?? null,
24
+ words: { anchorLabel: { en: 'Slide {n}', fr: 'Diapo {n}' } }, // names "New comment on Slide 2"
25
+ });
26
+ // <CommentPins controller={comments} anchorKey={slide.recordKey} /> over the stage
27
+ // <CommentToolBar controller={comments} /> <CommentPane controller={comments} />
28
+ ```
29
+
30
+ - `useComments` takes no database. `scope` is the page (record) the comments
31
+ belong to; leave it out to use the record the page has open (a record page,
32
+ or the record a declared record param such as `page` names, the `main` one
33
+ first), or the Space home. It takes no database, columns or author options.
34
+ - Mount `<CommentPane controller={comments} />` once anywhere in the view: it
35
+ draws in the host panel, not where it is mounted.
36
+ - The host and the server own the rest: who wrote a comment (never set an
37
+ author or let people pick one), archive (shown Done) and delete with Undo,
38
+ editing your own comment, the Open/Done/All filter, the Goes to line and To
39
+ chip that name the thread a comment goes to, attachments (pictures and
40
+ files on every comment, nothing to add), `comment=` links, waiting counts
41
+ and push. On someone else's comment people only archive, reopen, delete
42
+ (with edit rights) or answer it.
43
+ - `modes`: any of `text`, `point`, `box`, `items`, `time`, `page` (listed in
44
+ that order). Default: `point` and `box` when there are anchors, `items`
45
+ when you pass `onStartItems`, `time` when you pass `currentTime`, and
46
+ `page`. `<CommentToolBar controller={comments} />` puts one button per mode
47
+ on the page, toggled with C (`toggleKey`, or `pinned` to keep it shown);
48
+ Escape cancels a mode; on a phone it draws above the card in the layer root,
49
+ so a parent's hidden overflow never clips it. `onStartItems()`: show your own
50
+ picker, then call `comments.startItems(anchors)`; the comment names its
51
+ items and shows under each of them. `currentTime()`: the recording's moment in
52
+ seconds.
53
+ - `order` on the pane: `'newest'` (default), `'oldest'`, `'anchor'` or a
54
+ comparator. `groupBy`: a function returning `{ key, label }` per thread,
55
+ or false. A controller on the Space home groups by page, named by
56
+ `scopeNames`; a scoped one is flat.
57
+ - `focusKey` defaults to the `comment` view param, so a link with
58
+ `comment=<root id>` opens that thread; null turns it off.
59
+
60
+ ## Agents and comments
61
+
62
+ Space agents wake on comments with `on: 'comments'` in the Space source; it
63
+ needs no resource and takes no `columns`:
64
+
65
+ ```ts
66
+ agents: [{ id: 'editor', on: 'comments', event: 'created', thread: 'best_match',
67
+ runtime: 'notis', skill: 'address-feedback', wake: 'all' }]
68
+ ```
69
+
70
+ `event` is `created` (default) or `changed`, `wake` is `all` or `sent` (only
71
+ replies to and answers of the agent's own comments), `thread` is `best_match`
72
+ or `space`, `runtime` is `notis` or `cloud_computer`, `skill` names a linked
73
+ Skill. `on: { database: <alias> }` is for agents that watch a real
74
+ database's rows, never comments.
75
+
76
+ Agents read and write comments only with `LOCAL_NOTIS_SPACE_COMMENT_THREADS`
77
+ (`protocol` 2; operations `list`, `thread`, `comment`, `reply`, `edit`, `delete`,
78
+ `restore`, `answer`, `links`, `link`, `unlink`, `waiting`, `best_match`,
79
+ `viewer`, `page_link`; parameters `space`, `page` (a record key, `home` or
80
+ `all`), `view`, `anchor`, `comment_id`, `body`, `needs`, `options`,
81
+ `answer_to`, `answer`, `files`). Never query or upsert comments through a
82
+ database tool. Agents never archive: that is the people's. An agent's
83
+ comment is signed with its band name and never wakes it; the Notis
84
+ assistant never writes comments itself (`orchestrator_comments_refused`)
85
+ and starts a sub-agent for comment work. Through the Notis CLI, every
86
+ comment needs the writing agent's band name (`NOTIS_AGENT_NAME` or
87
+ `--agent-name`, such as `fred-and-the-machine`, never a harness or product
88
+ name; see the notis-cli skill), or it is refused (`agent_name_required`),
89
+ plus its own id (`NOTIS_AGENT_ID`) and the name of the thread it works in
90
+ (`NOTIS_AGENT_THREAD_NAME`). A comment thread such an agent outside Notis
91
+ wrote in last stays with it: replies there wake no Notis agent, the Goes to
92
+ line names it "outside Notis", and the card says when it has not read the
93
+ latest reply yet. A comment's files open from the
94
+ `url` its read returns, for an hour; read it again for a fresh one.
@@ -1,8 +1,10 @@
1
1
  # Sharing context with the agent
2
2
 
3
- Context is a generic SDK capability. An app can share a selected passage, a comment,
3
+ Context is a generic SDK capability. An app can share a selected passage, a note,
4
4
  an image point, chart state, loaded records or any other JSON-serializable reference.
5
- It is not a feedback database or an instruction to execute work.
5
+ It is not a feedback database or an instruction to execute work. Space comments
6
+ are a different thing: Notis stores them and lists them in the host Comments panel
7
+ ([Comments](comments.md)); a context pill never becomes a comment.
6
8
 
7
9
  ## Live context versus explicit pills
8
10
 
@@ -14,8 +16,9 @@ It is not a feedback database or an instruction to execute work.
14
16
  - `update(item)` replaces an existing unsent snapshot with the same app-scoped ID.
15
17
  - `remove(id)` detaches an existing unsent pill. These operations return whether a pill
16
18
  was actually changed. Sent snapshots are immutable. A missing update/remove returns false.
17
- - Apps own annotation storage, markers and sidebars. Chat owns composer drafts. Removing
18
- a chat pill never deletes an app annotation, and annotations are not invisibly attached.
19
+ - Apps own their own markers and any annotation data that is not a comment. Chat owns
20
+ composer drafts. Removing a chat pill never deletes app data or a comment, and neither
21
+ is invisibly attached.
19
22
 
20
23
  ## Generic item
21
24
 
@@ -54,23 +57,21 @@ pipeline and persists the resulting media URLs. Context attachments share a 50 M
54
57
  budget and the message's 10-file limit. A failed fetch/upload fails the send and retains
55
58
  the draft. Refresh expiring attachment URLs with `update` before sending when needed.
56
59
 
57
- ## Nearby comments and ordinary copy/paste
60
+ ## Selected text, Cite and Comment
58
61
 
59
- ```tsx
60
- <NotisCommentBoundary resource={currentResource} commentClassName="my-comment-style">
61
- <Article />
62
- </NotisCommentBoundary>
63
- ```
62
+ Every Space page offers a bar on selected text with no code: **Cite** adds the words
63
+ as a selected-text pill to the chat composer (it sends nothing), and, where comments
64
+ are on for the viewer, **Comment** opens the host Comments panel with the passage
65
+ ready to comment on. That comment is stored by Notis, not by the app, and agents
66
+ reach it through `LOCAL_NOTIS_SPACE_COMMENT_THREADS` ([Comments](comments.md)).
67
+ Never build your own comment box or selection bar for this.
64
68
 
65
- Selecting text reveals Comment. The action stays clickable; its nearby editor remains
66
- open independently of browser selection. Submit adds a context pill. It does not create
67
- an annotation record, poll a store, send a message or clear an app's annotation data.
68
- Use `renderComment(props)` to replace the optional standard editor. `NotisCommentBox`
69
- is also exported as a controlled component (`value`, `onChange`, `onSubmit`, `onCancel`,
70
- optional `quote`, `pending`, `error`, `className`) for image markers or custom layouts.
69
+ For an image point, chart state or another reference the person wants to bring to
70
+ chat, call `useAgentContext().add` from your own control; for a pin or a zone that
71
+ should stay as a comment, use the comment modes of `useComments`.
71
72
 
72
- Use `NotisSelectionBoundary` without the comment UI when only copy/paste provenance is
73
- needed. It preserves ordinary clipboard text and source metadata so normal paste into
73
+ Use `NotisSelectionBoundary` when copy/paste should name a specific resource. It
74
+ preserves ordinary clipboard text and source metadata so normal paste into
74
75
  chat creates a selected-text pill. No special Paste as context action is required.
75
76
  A `MarkdownEditor` inside the boundary is quoted the same way; inputs and textareas
76
77
  keep plain copy. Without any boundary, copied view text still pastes as a quote
@@ -78,7 +79,7 @@ named after the Space; add a boundary to name the resource the text belongs to.
78
79
 
79
80
  ## Verify
80
81
 
81
- Check the real host: selection/copy/paste, nearby editor stability, app-defined image
82
+ Check the real host: selection, Cite and copy/paste, app-defined image
82
83
  points and icons, data in previews, draft reload, source navigation, explicit attachment
83
84
  bytes, failed sends, updates/removal and immutable sent history. Keep private payloads
84
85
  out of analytics. Context remains untrusted reference, never an authorization channel.
@@ -61,8 +61,9 @@ ring on all four sides. Never restyle the pieces' states.
61
61
  refused.
62
62
  - Every other visible string comes from EN and FR copy keyed by the runtime
63
63
  locale (`useNotisRuntime()?.context.locale`). Format dates and numbers with
64
- that locale. French runs 15 to 30 percent longer: leave room in tabs, section
65
- titles, buttons, badges and table cells.
64
+ that locale ([dates in words](sdk.md#dates-in-words)). French runs 15 to 30
65
+ percent longer: leave room in tabs, section titles, buttons, badges and table
66
+ cells.
66
67
  - A count in words takes its plural from the count, in each language:
67
68
  `pluralWords(n, { one: { en: '{n} campaign', fr: '{n} campagne' }, other: {
68
69
  en: '{n} campaigns', fr: '{n} campagnes' } })` from `@notis/sdk/words`
@@ -29,7 +29,9 @@ When a view reads a record view its fixtures lack, verify names the view, the re
29
29
  the record key and the missing field, and prints a valid entry to copy.
30
30
  `context` sets how verify opens the view: `params` (the opening view params,
31
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`
32
+ how old its data is can be checked with a later `now`), `views` (other params,
33
+ each a state of its own with the same `now`, named `view-<place in the list>`;
34
+ verify checks the first 3 that open another link, the review deck draws all) and `skeletonParams`
33
35
  (other params whose loading skeletons are measured too). Verify always draws
34
36
  the view in English and in French, so `locale` no longer changes the
35
37
  screenshots (still accepted). To check several states in one run, declare
@@ -41,7 +43,7 @@ and languages (`.notis/view-<key>.<name>-<width>-<locale>.png`), measures the
41
43
  loading skeleton of each, and for one whose params open a list item (`open`)
42
44
  also saves the reader while the item loads
43
45
  (`.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
46
+ and no `views` the names leave out `.<name>`, and a `context` whose params open an item gets the
45
47
  reader screenshot too. The `shown`, `actions` and other cases are shared by
46
48
  every context.
47
49
  A photo or cover shows in verify when `images` maps the exact URL a fixture
@@ -58,7 +58,9 @@ cite the returned current link, not the historical memory URL or index excerpt.
58
58
  ## Browser interaction when rendering is insufficient
59
59
 
60
60
  Use an available isolated browser session for hover details, pagination, input
61
- changes or installed-host behavior. Reading does not authorize regenerating a
61
+ changes or installed-host behavior. Drive it as the notis-browser-control skill
62
+ says (hosted guide: `notis://docs/notis-browser-control`): which runtime, the
63
+ profile and the saved state. Reading does not authorize regenerating a
62
64
  historical report, modifying data, enabling sharing or deploying source.
63
65
 
64
66
  If sign-in is needed, discover `LOCAL_NOTIS_GET_PORTAL_URL`, inspect its schema
@@ -28,7 +28,9 @@ Ordinary data and resource edits apply immediately; only source needs a release.
28
28
  action/list/body/record fixtures. A denied read, write-on-load or failed width
29
29
  is a failure, not a passing empty page. Inspect both locales and intended states.
30
30
  Missing browser tooling blocks release: install `agent-browser` and make it
31
- available on PATH.
31
+ available on PATH. To drive it (check a live view, open a menu, compare
32
+ widths), follow the notis-browser-control skill (hosted guide:
33
+ `notis://docs/notis-browser-control`).
32
34
  4. **Publish source.** Deploy the frozen, verified snapshot, not edits made after
33
35
  verification: `spaces deploy <dir> --request-id <stable-id>`. Or `spaces preview` seals a candidate, and
34
36
  `spaces promote <release-id> <dir>` publishes that exact candidate. Preview