@estiva-app/interop 0.60.0 → 0.62.0

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.
@@ -54,8 +54,9 @@ export interface SearchFileReferencesOptions extends Omit<FileCandidatesOptions,
54
54
  * it is called now matches what was typed.
55
55
  *
56
56
  * Roots and renames are asked for separately, so a burst of renames cannot
57
- * crowd every root out of the answer, and with buzz's prefix mode, so the word
58
- * being typed matches before it is finished. A relay that indexes none of these
57
+ * crowd every root out of the answer. Every typed word matches the start of a
58
+ * word (SPEC §5.2), so a word matches before it is finished; `search_mode` is
59
+ * still sent for a relay from before that rule. A relay that indexes none of these
59
60
  * kinds answers nothing, and so does this. A failed read rejects, for
60
61
  * `referenceSearch` to answer no hits for a while.
61
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAA;AAMxB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAKxE,CAAA;AA2BD,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,0FAA0F;IAC1F,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EACtD,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,EAAE,KAAK,EAAE,EAAE,EAAE,GAAE,qBAA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C;IACpF,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAWD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,EAAE,KAAU,EAAE,GAAG,OAAO,EAAE,GAAE,2BAAgC,GAC3D,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqB/B"}
@@ -111,8 +111,9 @@ const searchedChange = (field, address) => field === 'title' || (field === 'ref'
111
111
  * it is called now matches what was typed.
112
112
  *
113
113
  * Roots and renames are asked for separately, so a burst of renames cannot
114
- * crowd every root out of the answer, and with buzz's prefix mode, so the word
115
- * being typed matches before it is finished. A relay that indexes none of these
114
+ * crowd every root out of the answer. Every typed word matches the start of a
115
+ * word (SPEC §5.2), so a word matches before it is finished; `search_mode` is
116
+ * still sent for a relay from before that rule. A relay that indexes none of these
116
117
  * kinds answers nothing, and so does this. A failed read rejects, for
117
118
  * `referenceSearch` to answer no hits for a while.
118
119
  */
@@ -1 +1 @@
1
- {"version":3,"file":"references.js","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,QAAQ,GAGT,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,GAIpB,MAAM,iBAAiB,CAAA;AAExB,MAAM,YAAY,GAAG,KAAK,CAAA;AAC1B,MAAM,UAAU,GAAG,KAAK,CAAA;AACxB,MAAM,aAAa,GAAG,KAAK,CAAA;AAE3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA4C;IAC3E,CAAC,YAAY,CAAC,EAAE,SAAS;IACzB,CAAC,UAAU,CAAC,EAAE,OAAO;IACrB,CAAC,cAAc,CAAC,EAAE,OAAO;IACzB,CAAC,aAAa,CAAC,EAAE,UAAU;CAC5B,CAA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AK,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5I,OAAO,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC,CAAA;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estiva-app/interop",
3
- "version": "0.60.0",
3
+ "version": "0.62.0",
4
4
  "description": "Render and act on another app's objects from its published NIP-89 manifest. The owner defines the projection; the consumer decides how it looks.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/folders.ts CHANGED
@@ -219,13 +219,15 @@ export function planArchiveFolder(
219
219
  /**
220
220
  * A file as a move needs it. A `ForeignObject` from `resolveFolderContents` is
221
221
  * one: `ref` is its identity, `parentRef` the file it is drawn beneath, and
222
- * `folder` the `h` of its root — absent for a root placed by `buzz-channel`.
222
+ * `scopedTo` the `h` of its root — absent for a root placed by `buzz-channel`,
223
+ * which the relay stores globally. Not `folder`, which since LTX-4 also reads
224
+ * `buzz-channel`: that is where writes go, not who can read the root.
223
225
  */
224
226
  export interface MovableFile {
225
227
  ref: string
226
228
  address?: string
227
229
  parentRef?: string
228
- folder?: string
230
+ scopedTo?: string
229
231
  }
230
232
 
231
233
  /**
@@ -334,7 +336,7 @@ export function planMoveFile(
334
336
  const listed = listing?.find((candidate) => candidate.ref === file.ref || (!!file.address && candidate.address === file.address))
335
337
  const set = listing ? [...(listed ? [listed] : []), ...listedBeneath(listing, listed ?? file)] : [file]
336
338
  const moving = set.filter((candidate) => candidate.address)
337
- if (args.to.private && moving.some((candidate) => candidate.folder !== args.to.id)) return { ok: false, reason: 'target-is-private' }
339
+ if (args.to.private && moving.some((candidate) => candidate.scopedTo !== args.to.id)) return { ok: false, reason: 'target-is-private' }
338
340
  const moved = [...new Set(moving.map((candidate) => candidate.address!))]
339
341
  if (!moved.length) return { ok: true, events: [], moved }
340
342
  return {
@@ -426,7 +428,7 @@ export function planMoveFromFolders(
426
428
  }
427
429
  if (!to.hasState) return { ok: false, reason: 'target-has-no-state' }
428
430
  if (moved.size === 0) {
429
- if (to.private && file.folder !== to.id) return { ok: false, reason: 'target-is-private' }
431
+ if (to.private && file.scopedTo !== to.id) return { ok: false, reason: 'target-is-private' }
430
432
  if (!file.address) return { ok: true, removes: [], moved: [] }
431
433
  const [add] = planPlaceFile(pubkey, createdAtMs, { folder: to.id, address: file.address, hasState: true })
432
434
  return { ok: true, add, removes: [], moved: [file.address] }
package/src/objectUrl.ts CHANGED
@@ -30,9 +30,9 @@
30
30
  * That second sentence is the amended one. §7.2 used to say a consumer MUST
31
31
  * ignore *everything* before the final uuid, which contradicted the paragraph
32
32
  * above it and, read literally, resolves `evil.example.com/issue/<uuid>` as a
33
- * Ship issue. The host and the `<type>` segment are exactly what select the app
34
- * and the kind; only the slug is decoration. `matchObjectUrl` implements the
35
- * corrected rule.
33
+ * Ship issue. The `<type>` segment is what selects the kind, and the host must
34
+ * be one some app declares; only the slug is decoration. `matchObjectUrl`
35
+ * implements the corrected rule.
36
36
  */
37
37
 
38
38
  /**
@@ -139,11 +139,27 @@ export interface UrlPattern {
139
139
  kind?: number
140
140
  }
141
141
 
142
- /** The `urls` shapes a manifest event declares. */
142
+ /**
143
+ * The `urls` shapes a manifest event declares, on its own origin.
144
+ *
145
+ * **A manifest declares `urls` only on its own origin** (SPEC §7.7, LTX-6): a
146
+ * shape whose scheme, host and port are not those of one of the manifest's
147
+ * `web` templates is dropped, and a manifest with no `web` declares none.
148
+ * Every declared origin is one some manifest serves from, which is what lets
149
+ * {@link matchObjectUrl} read a path on any of them.
150
+ *
151
+ * That keeps declarations consistent; it is not authentication. A reader
152
+ * trusts a manifest's hosts as far as it trusts the manifest.
153
+ *
154
+ * why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-files-path-is-the-same-on-every-apps-host.md
155
+ */
143
156
  export function urlPatternsOf(event: { tags: string[][] }): UrlPattern[] {
157
+ const own = new Set(event.tags.filter((tag) => tag[0] === 'web' && tag[1]).map((tag) => originOfUrl(tag[1])))
144
158
  const out: UrlPattern[] = []
145
159
  for (const tag of event.tags) {
146
160
  if (tag[0] !== 'urls' || !tag[1]) continue
161
+ const origin = originOfUrl(tag[1])
162
+ if (origin === null || !own.has(origin)) continue
147
163
  const kind = tag[2] ? Number(tag[2]) : undefined
148
164
  out.push({ pattern: tag[1], ...(Number.isInteger(kind) ? { kind } : {}) })
149
165
  }
@@ -165,6 +181,13 @@ export interface MatchedObjectUrl {
165
181
  by: 'd' | 'id'
166
182
  /** Present only when the matched pattern named one. */
167
183
  kind?: number
184
+ /**
185
+ * The kinds to resolve under when shapes on other origins claim the path for
186
+ * different kinds (SPEC §7.7, LTX-6); `kind` is then absent. One author must
187
+ * hold the identity across all of them, so a second app's claim to the same
188
+ * word turns the link plain rather than taking it over.
189
+ */
190
+ kinds?: number[]
168
191
  /**
169
192
  * The object the path names, when the identity came from the query — the
170
193
  * topic a `?thread=<id>` link opens, read off `/topic/<slug>-<d>`. Absent
@@ -186,12 +209,26 @@ export interface MatchedObjectUrl {
186
209
  const BLOCK_PLACEHOLDER = '<block>'
187
210
 
188
211
  /**
189
- * Match a pasted URL against one app's declared shapes.
212
+ * Match a pasted URL against the shapes every manifest declares.
213
+ *
214
+ * **The `<type>` segment is significant; the slug is not.** That is §7.2 as
215
+ * amended: a consumer that matched on the trailing uuid alone would resolve
216
+ * any URL from anywhere as some app's object.
217
+ *
218
+ * **The path is the same on every declared host** (SPEC §7.7, LTX-6). A link
219
+ * whose origin (scheme, host and port) is one some shape is written on matches
220
+ * every path shape by its path and query, whatever origin the shape is on, so
221
+ * `leaf.estiva.app/issue/<slug>-<d>` is Ship's issue as `ship.estiva.app`'s is.
222
+ * A link on no declared origin matches nothing. A fragment route
223
+ * (`/#/issue/<d>`) matches only on its own origin, since no other app serves
224
+ * it, and so does a shape that names no kind.
225
+ * A match on the link's own origin wins whatever the specificity of others.
226
+ * On either side, when shapes claim the path for different kinds, the match
227
+ * carries all of them in `kinds`, and the reader's one-author rule decides.
228
+ * Pass the shapes of every manifest, each read through {@link urlPatternsOf}
229
+ * so that a manifest adds only its own origin.
190
230
  *
191
- * **The host and the `<type>` segment are significant; the slug is not.** That
192
- * is §7.2 as amended, and it is the whole of the security story here: a
193
- * consumer that matched on the trailing uuid alone would resolve any URL from
194
- * anywhere as that app's object.
231
+ * why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-files-path-is-the-same-on-every-apps-host.md
195
232
  *
196
233
  * **A query parameter may carry the identity too** (FOL-38). Peek opens a
197
234
  * thread as `/topic/<slug>-<d>?thread=<id>`: the path names the topic, the
@@ -211,14 +248,23 @@ const BLOCK_PLACEHOLDER = '<block>'
211
248
  export function matchObjectUrl(url: string, patterns: UrlPattern[]): MatchedObjectUrl | null {
212
249
  const target = splitUrl(url)
213
250
  if (!target) return null
214
-
215
- let best: { specificity: number; match: MatchedObjectUrl } | null = null
216
- for (const { pattern, kind } of patterns) {
251
+ const origin = `${target.scheme}://${target.host}`
252
+ const shapes = patterns.flatMap(({ pattern, kind }) => {
217
253
  const shape = splitUrl(pattern)
218
- if (!shape) continue
219
- if (shape.scheme !== target.scheme || shape.host !== target.host) continue
220
- // A fragment route and a path route are different shapes, not one.
254
+ return shape ? [{ shape, kind, own: `${shape.scheme}://${shape.host}` === origin }] : []
255
+ })
256
+ // A link on an origin no shape is written on names nothing, whatever its path.
257
+ if (!shapes.some(({ own }) => own)) return null
258
+
259
+ const onOwn: Candidate[] = []
260
+ const elsewhere: Candidate[] = []
261
+ for (const { shape, kind, own } of shapes) {
262
+ // A fragment route and a path route are different shapes, not one. Off its
263
+ // own origin a shape matches only as a path route that names its kind: no
264
+ // other app serves a fragment route, and a kindless shape would let any
265
+ // manifest turn every swapped link of its word into a bare `#d` lookup.
221
266
  if (shape.fragmented !== target.fragmented) continue
267
+ if (!own && (shape.fragmented || kind === undefined)) continue
222
268
 
223
269
  // The pattern's path up to its final segment: `/issue/` out of
224
270
  // `/issue/<slug>-<d>`. Compared literally and at equal depth, so `/issues`
@@ -267,9 +313,51 @@ export function matchObjectUrl(url: string, patterns: UrlPattern[]): MatchedObje
267
313
  // A filled `<block>` breaks a tie, so an app that declares the block shape
268
314
  // beside its older shape loses no block to declaration order.
269
315
  const specificity = declared.length * 2 + (block === undefined ? 0 : 1)
270
- if (!best || specificity > best.specificity) best = { specificity, match }
316
+ ;(own ? onOwn : elsewhere).push({ specificity, match })
271
317
  }
272
- return best?.match ?? null
318
+ return onOwn.length > 0 ? chosen(onOwn) : chosen(elsewhere)
319
+ }
320
+
321
+ interface Candidate {
322
+ specificity: number
323
+ match: MatchedObjectUrl
324
+ }
325
+
326
+ /**
327
+ * The match a link earns from the shapes that read it on one side: its own
328
+ * origin, or, when none does, the others.
329
+ *
330
+ * The most specific reading names the object. Its kind is not trusted alone:
331
+ * every shape that reads the same identity adds its kind, whatever its
332
+ * specificity and whatever order the manifests came in, so a second manifest
333
+ * that claims a word — with a `<block>` fragment the owner's shape lacks, say
334
+ * — can only widen the lookup, where the one-author rule turns the link plain.
335
+ * Two equally specific readings of different identities name nothing. A shape
336
+ * that names no kind (only ever on its own origin) leaves the kinds open.
337
+ */
338
+ function chosen(candidates: Candidate[]): MatchedObjectUrl | null {
339
+ if (candidates.length === 0) return null
340
+ const top = Math.max(...candidates.map((c) => c.specificity))
341
+ const [first, ...rest] = candidates.filter((c) => c.specificity === top).map((c) => c.match)
342
+ if (rest.some((match) => identityOf(match) !== identityOf(first))) return null
343
+
344
+ const same = candidates.map((c) => c.match).filter((match) => identityOf(match) === identityOf(first))
345
+ const named: MatchedObjectUrl = { ...first }
346
+ delete named.kind
347
+ if (same.some((match) => match.kind === undefined)) return named
348
+ const kinds = [...new Set(same.map((match) => match.kind as number))].sort((a, b) => a - b)
349
+ return kinds.length === 1 ? { ...named, kind: kinds[0] } : { ...named, kinds }
350
+ }
351
+
352
+ /** What a match names, apart from its kind and block. */
353
+ function identityOf(match: MatchedObjectUrl): string {
354
+ return [match.by, match.identifier, match.within?.by ?? '', match.within?.identifier ?? ''].join(' ')
355
+ }
356
+
357
+ /** `scheme://host[:port]` of a URL or a pattern, lowercased; null when it has none. */
358
+ function originOfUrl(raw: string): string | null {
359
+ const parts = splitUrl(raw)
360
+ return parts ? `${parts.scheme}://${parts.host}` : null
273
361
  }
274
362
 
275
363
  /**
package/src/projection.ts CHANGED
@@ -1010,13 +1010,17 @@ interface Manifest {
1010
1010
  * protocol change, and the field that tells a generic app from a specialized
1011
1011
  * one that happens to draw a card.
1012
1012
  *
1013
- * A specialized app owns kinds and says nothing here. A generic app owns no
1014
- * kinds and declares the one aspect it renders for everyone else's files:
1015
- * `conversation` (Peek) or `document` (Leaf). See {@link ASPECTS}.
1013
+ * A specialized app owns kinds and says nothing here. A generic app declares
1014
+ * the one aspect it renders for everyone else's files: `conversation` (Peek)
1015
+ * or `document` (Leaf, which writes the title, summary and text of any file
1016
+ * whose owner shares them, SPEC §7.8). It may own kinds as well, as Leaf owns
1017
+ * documents: the `k` tags say what it owns, this says what it renders.
1018
+ * See {@link ASPECTS}.
1016
1019
  *
1017
1020
  * What it is read for today: the bare file (§6.7) has no owner and so no
1018
1021
  * `web` template of its own, and the app that renders its conversation is
1019
- * where a link to it should land. Nothing else consults it yet.
1022
+ * where a link to it should land. Nothing in this package consults
1023
+ * `document` yet; Leaf reads its own role.
1020
1024
  */
1021
1025
  aspect?: string
1022
1026
  /**
@@ -1214,6 +1218,16 @@ export function folderOf(root: SignedEvent): string | null {
1214
1218
  return tagValue(root, 'h') ?? tagValue(root, 'buzz-channel') ?? null
1215
1219
  }
1216
1220
 
1221
+ /**
1222
+ * {@link ForeignObject.folder}: `h`, then `buzz-channel` (LTX-4) — where a
1223
+ * change or a comment on the file goes. Not {@link folderOf}'s `d` fallback for
1224
+ * a `kind:39000`: a Folder drawn as a file kept no `folder` before, and
1225
+ * consumers gate "start inside" and membership on it.
1226
+ */
1227
+ function writeFolderOf(root: SignedEvent): string | undefined {
1228
+ return tagValue(root, 'h') ?? tagValue(root, 'buzz-channel')
1229
+ }
1230
+
1217
1231
  /**
1218
1232
  * Does the event carry this tag with this value — on **any** of them?
1219
1233
  *
@@ -1422,13 +1436,10 @@ const BARE_FILE_MANIFEST: Manifest = {
1422
1436
  slots: {
1423
1437
  title: { tag: 'title', fold: 'title' },
1424
1438
  /*
1425
- The text is the `description` fold, seeded from `content` (SPEC §6.7,
1426
- Leaf 1): anyone in the Folder saves it with the `describe` action
1427
- below, the author included — a republished root would lose silently
1428
- to an older change. Ship's body slot is the same fold, minus the
1429
- `tag`: a `30840` carries its text in `content`, never in a tag.
1439
+ No `body`: a topic is a conversation and has no text (SPEC §6.7,
1440
+ 2026-10-19), so nothing draws one and no document app lists it.
1441
+ why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-document-app-writes-what-a-files-app-shares.md
1430
1442
  */
1431
- body: { fold: 'description', field: 'content' },
1432
1443
  // A bare file may hold bare files — a sub-topic under a topic. Children
1433
1444
  // of *other* kinds are found the other way round, by their own `a`
1434
1445
  // (`parentRefOf` below), which is FOL-4's generic direction; this slot
@@ -1480,7 +1491,8 @@ const BARE_FILE_MANIFEST: Manifest = {
1480
1491
  },
1481
1492
  /*
1482
1493
  The manifest is the only place a consumer learns of any of these actions
1483
- (FOL-33; `move` from FOL-4, `describe` from Leaf 1). A Peek page offering Rename and Delete on a bare file and
1494
+ (FOL-33; `move` from FOL-4). No `describe`: Leaf 1 added one and LTX took
1495
+ it out again, since a topic has no text (SPEC §6.7). A Peek page offering Rename and Delete on a bare file and
1484
1496
  nothing on a Ship issue does so because *this* list says `rename` and
1485
1497
  `delete` and Ship's does not — never because the kind is 30840. The rule is
1486
1498
  the one FOL-31 set for `comment`: a control is drawn from a declaration.
@@ -1517,25 +1529,6 @@ const BARE_FILE_MANIFEST: Manifest = {
1517
1529
  emits: { kind: 1851, field: 'title' },
1518
1530
  input: { type: 'string' },
1519
1531
  },
1520
- /*
1521
- `describe` replaces the file's text with a whole §13.3 block document —
1522
- a snapshot, last save wins (SPEC §6.7, decided 2026-10-13; live merging
1523
- between open windows is a later layer). The shape of Ship's
1524
- `describe-issue`, so a consumer that edits one edits both, and finds it
1525
- by `emits.field` rather than by this id. Every save is a full copy, so a
1526
- writer saves on leave, never per keystroke.
1527
- */
1528
- {
1529
- id: 'describe',
1530
- label: 'Edit',
1531
- description:
1532
- "Replace this file's text with new text. A change event, so anyone in the Folder may, and every app " +
1533
- 'reading the file folds it over the text it was made with; the later save wins.',
1534
- effect: 'writes',
1535
- appliesTo: [String(KIND_BARE_FILE)],
1536
- emits: { kind: 1851, field: 'description' },
1537
- input: { type: 'string', format: BLOCK_DOCUMENT_FORMAT },
1538
- },
1539
1532
  /*
1540
1533
  `summarize` sets the file's one-line summary (SPEC §6.12): plain text, so
1541
1534
  its input declares no `format` (§7.3), and a consumer finds it by
@@ -3233,14 +3226,25 @@ export interface ForeignObject {
3233
3226
  meta: ResolvedSlot[]
3234
3227
  comments: { id: string; author: string; body: string; createdAt: number }[]
3235
3228
  /**
3236
- * The Folder this object lives in, from the root event's `h` tag.
3229
+ * The Folder this object lives in: the root's `h`, or `buzz-channel` on a
3230
+ * record that names its Folder that way, as Ship's projects do
3231
+ * ({@link folderOf}, SPEC §7.3).
3237
3232
  *
3238
- * Needed to *write*: a change event carries the same `h`, and without it the
3239
- * relay rejects the write outright. Reading it off the object rather than
3240
- * asking the user is the difference between an action that works and a form
3241
- * with a "Folder id" box in it.
3233
+ * Needed to *write*: a change event carries it as `h` (SPEC §6.10), and
3234
+ * without it the relay rejects the write outright. Reading it off the object
3235
+ * rather than asking the user is the difference between an action that works
3236
+ * and a form with a "Folder id" box in it. Until LTX-4 it read `h` only, so a
3237
+ * Ship project had none and no other app could save or comment on it.
3242
3238
  */
3243
3239
  folder?: string
3240
+ /**
3241
+ * The channel that gates who can read the root itself: its `h`, and absent
3242
+ * for a record stored globally (a `buzz-channel` project, whose name anyone
3243
+ * can read). Not where writes go — that is {@link folder}. A move into a
3244
+ * private Folder reads this (`planMoveFile`), because a listing never changes
3245
+ * who can read a file (SPEC §3.1).
3246
+ */
3247
+ scopedTo?: string
3244
3248
  /**
3245
3249
  * Where to open this object in the app that owns it, from NIP-89's `web` tag.
3246
3250
  *
@@ -3351,7 +3355,8 @@ function buildObject(args: {
3351
3355
  listsChildren: listsChildrenOf(projection, manifest),
3352
3356
  parentRef: parentRefOf(manifest, pointer.kind, root, folded),
3353
3357
  ...parentFieldsOf(manifest, pointer.kind),
3354
- folder: tagValue(root, 'h'),
3358
+ folder: writeFolderOf(root),
3359
+ scopedTo: tagValue(root, 'h'),
3355
3360
  // Substituted here rather than in the component: `<bech32>` is a NIP-89
3356
3361
  // detail, and the widget's job is to draw a link, not to know the spec.
3357
3362
  openUrl: args.webTemplate?.replace('<bech32>', naddr),
@@ -4716,7 +4721,8 @@ function buildChildObject(args: {
4716
4721
  // should be able to trust.
4717
4722
  parentRef: parentRefOf(manifest, root.kind, root, folded),
4718
4723
  ...parentFieldsOf(manifest, root.kind),
4719
- folder: tagValue(root, 'h'),
4724
+ folder: writeFolderOf(root),
4725
+ scopedTo: tagValue(root, 'h'),
4720
4726
  /*
4721
4727
  `<bech32>` is whichever form this object actually has.
4722
4728
 
package/src/references.ts CHANGED
@@ -153,8 +153,9 @@ const searchedChange = (field: string | undefined, address: string | undefined)
153
153
  * it is called now matches what was typed.
154
154
  *
155
155
  * Roots and renames are asked for separately, so a burst of renames cannot
156
- * crowd every root out of the answer, and with buzz's prefix mode, so the word
157
- * being typed matches before it is finished. A relay that indexes none of these
156
+ * crowd every root out of the answer. Every typed word matches the start of a
157
+ * word (SPEC §5.2), so a word matches before it is finished; `search_mode` is
158
+ * still sent for a relay from before that rule. A relay that indexes none of these
158
159
  * kinds answers nothing, and so does this. A failed read rejects, for
159
160
  * `referenceSearch` to answer no hits for a while.
160
161
  */