@estiva-app/interop 0.14.0 → 0.16.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,121 @@ how a declaration is read, is a MAJOR — in `0.x`, a MINOR — even when no
6
6
  TypeScript signature moved. A consumer upgrading must be able to tell whether
7
7
  manifests already published still mean what they meant.
8
8
 
9
+ ## 0.16.0 — 2026-09-08
10
+
11
+ **No manifest changes meaning, and nothing already published is read
12
+ differently.** Nothing new may be declared: this is a rule about an event the
13
+ *relay* signs, so no producer writes it, reads it or can opt out of it. A
14
+ manifest published yesterday means exactly what it meant.
15
+
16
+ `folderOf` resolves a NIP-29 `kind:39000` to its own `d`. Measured on
17
+ production 2026-09-08: **0 of 40 channel records carry `h` or `buzz-channel`,
18
+ and 40 of 40 carry `d`** — so every write aimed at a topic was refused for
19
+ having nowhere to go, and Peek could declare no action on one (INT-9).
20
+
21
+ **This is the case 0.13.0 added as vocabulary and 0.14.0 withdrew.** The
22
+ withdrawal was right and is not being reversed: `records.folder: "identifier"`
23
+ asked every future producer to read a field whose only instance RFC 0.5 §1
24
+ retires. What went unnoticed is that it took a working feature with it, four
25
+ days after PRO-18 concluded a conversation had become declarable — because
26
+ nothing had declared the field yet, so nothing broke visibly.
27
+
28
+ So the same fact arrives as protocol instead, which is the distinction 0.14.0
29
+ was actually about. A `kind:39000` is relay-signed group metadata whose `d` *is*
30
+ the channel id: buzz's `NOSTR.md` §"Group metadata" states it,
31
+ `channel_info_from_event` reads it, and the relay's `h_grammar` is the same
32
+ uuid. That is the same standing `h` and `buzz-channel` already have here.
33
+
34
+ Two things keep it from growing into the rule it replaced:
35
+
36
+ - **`kind:39000` and nothing else.** Not "any addressable kind" — that would
37
+ hand every `30000`–`39999` record its own `d` as a Folder and land a
38
+ consumer's write in a channel that may not exist. A container-shaped
39
+ addressable kind that is not the relay's still answers `null`, and a test
40
+ holds it.
41
+ - **It is last in the chain, so it decays into dead code.** FOL-3 gives a topic
42
+ an `h`; from that day the first clause answers and this one is unreachable.
43
+ A shape a model change retires should stop firing, not start lying — the
44
+ test named for FOL-3 pins the order that makes it a no-op.
45
+
46
+ `KIND_CHANNEL_METADATA` is exported for the same reason `KIND_FOLDER_STATE` is:
47
+ a bare `39000` at a call site reads as an app's kind rather than the relay's.
48
+
49
+ **`buildActionEvent` no longer needs a fold rule to build a creation.** Its
50
+ first line refused any app declaring no `records`, which gated creations and
51
+ comments on a rule only a *change* uses — the change tags are the only place it
52
+ is read. PRO-12 settled this on the read side (*"SPEC mandates `records`; the
53
+ runtime correctly stopped requiring it"*) and the write side never followed.
54
+
55
+ Found against production, and findable nowhere else: every fixture in this
56
+ package's suite declares a fold rule. Peek declares none deliberately — a
57
+ topic's name is a tag the relay wrote and a message is immutable — so its
58
+ first action came back "That app does not say how its records are written",
59
+ which is true, irrelevant, and impossible to act on. A change still refuses,
60
+ and still names the rule it is missing.
61
+
62
+ **What this does not unblock.** A container-*creating* action — Ship's
63
+ `add-project`, Peek's `create-topic` — still cannot be declared. Those need a
64
+ Folder that does not exist yet, which is FOL-2, and PRO-18's steer stands: wait
65
+ for the folder model rather than invent a shape it contradicts.
66
+
67
+ ## 0.15.0 — 2026-09-08
68
+
69
+ **No manifest changes meaning, and nothing already published is read
70
+ differently.** This adds a reader. Every declaration it consumes — `projections`
71
+ for which kinds are files, `records` for the fold and for `hiddenWhen`, `widget`
72
+ for the fallback chain — is one manifests already carry, read in a new place.
73
+
74
+ The folder read model RFC 0.4 §4 and §5 specify: given a folder id, list what is
75
+ in it **across apps**, resolving each file through the manifest of whoever owns
76
+ it. Both reference apps consume this, so it belongs here rather than in either.
77
+
78
+ - **`resolveFolderContents(folder, query, lookupPeople?, cache?)`** returns the
79
+ folder's identity and its files as ordinary `ForeignObject`s — the same shape
80
+ an `naddr` in a message resolves to, carrying the same slots, actions and link
81
+ back into the owning app.
82
+ - **`listFolders(query)`** is the sidebar's half: every folder this identity can
83
+ see, named. It asks by kind rather than by walking anything, which is §4.2's
84
+ own post-mortem on REW-11 — discovering children only through their parent
85
+ loses them when the parent goes.
86
+ - **`KIND_FOLDER_STATE`** is `30890`, allocated by RFC 0.4 §12.1. Relay-signed,
87
+ addressable and **global**: §4.2 shows three of the four properties a folder
88
+ needs are impossible if its state carries an `h`.
89
+
90
+ **A topic and a project are peers because §5.2 made them peers**, not because
91
+ anything here special-cases either. A channel turned out to be addressable — the
92
+ relay emits a `kind:39000` per channel whose `d` is the channel uuid — so one
93
+ tag type, `a`, names every file, and a folder listing a topic beside a project
94
+ needs no second mechanism.
95
+
96
+ **Two rules in here are product decisions rather than mechanism**, and both are
97
+ worth reading before changing:
98
+
99
+ - **A file the reader cannot see is absent, not "unavailable".** A deliberate
100
+ divergence from upstream NIP-MP, whose fold requires the opposite for public
101
+ repositories. The count is the disclosure: a folder rendering three rows and
102
+ two placeholders has told an outsider how much they are missing. Nothing in
103
+ the return value counts what was dropped, and a test asserts that.
104
+ - **A file is anything addressable.** A `kind:9` message carries no `d`, so it
105
+ is conversation rather than contents. That is the whole discriminator, and it
106
+ needs no kind numbers.
107
+
108
+ **A folder with no state event still lists**, by containment — `h`, plus
109
+ `buzz-channel` for a record published globally, which on production today is
110
+ nine of nineteen projects. Kept because both wire shapes coexist permanently: no
111
+ migration is available, and a reader that understood only folder state would
112
+ show every folder on production as empty. It is an approximation and says so
113
+ (`source: 'channel'`), because containment by `h` **cannot list a topic** — under
114
+ `h` the topic is the container rather than something inside it.
115
+
116
+ Measured against production reading three folders through one cache: 24, 25 and
117
+ 9 files cost 5, 5 and 4 round trips warm. Flat in the number of files, linear in
118
+ the number of apps.
119
+
120
+ **0.13.0 and 0.14.0 have no entries here.** Both were published; neither
121
+ updated this file. Not reconstructed here, because their commit messages are
122
+ detailed and the person who made them should say what they meant.
123
+
9
124
  ## 0.12.0 — 2026-09-04
10
125
 
11
126
  **No manifest changes meaning, and nothing is read differently.** This adds a
package/README.md CHANGED
@@ -330,6 +330,66 @@ Six things that will bite, each of them something we got wrong first:
330
330
 
331
331
  ---
332
332
 
333
+ ## 5. Read a whole folder, across every app in it
334
+
335
+ A Folder is where the suite's navigation lives: teams you belong to, and the
336
+ files inside them. `resolveFolderContents` answers *"what is in this folder?"*
337
+ without knowing what any of the answers are.
338
+
339
+ ```ts
340
+ import { resolveFolderContents, createProjectionCache } from '@estiva-app/interop'
341
+
342
+ const cache = createProjectionCache()
343
+ const folder = await resolveFolderContents(folderId, query, undefined, cache)
344
+
345
+ folder.name // the folder names itself
346
+ folder.files // ForeignObjects, exactly as §1 draws them
347
+ folder.source // 'state' | 'channel' — see below
348
+ ```
349
+
350
+ Every file comes back as the same `ForeignObject` §1 renders, so a folder view
351
+ is §1 in a loop. **A project from one app and a topic from another sit side by
352
+ side as peers**, because RFC 0.4 §5.2 established that one tag type — `a` —
353
+ names every file, topics included. Nothing here special-cases either.
354
+
355
+ Reuse one `ProjectionCache` across folders. Round trips are flat in the number
356
+ of files and linear in the number of *apps*: 24, 25 and 9 files measured at 5, 5
357
+ and 4 requests warm.
358
+
359
+ ### A file you cannot see is absent, not greyed out
360
+
361
+ **The count is the disclosure.** A folder that renders three rows and two
362
+ placeholders has told an outsider exactly how much they are missing, which for a
363
+ folder named after a person is the sensitive part. So an address that resolves
364
+ to nothing is dropped, and nothing in the return value counts what was dropped.
365
+
366
+ This is a deliberate divergence from upstream NIP-MP, whose fold requires the
367
+ opposite for public repositories. It is also why this does not reuse
368
+ `resolveForeignObject`, which returns `unreachable: true` — right for one pasted
369
+ link, wrong for a list.
370
+
371
+ ### `source` tells you which model you are looking at
372
+
373
+ `'state'` means the relay maintains the folder's contents. `'channel'` is the
374
+ approximation available before that exists: containment read off each file's own
375
+ `h` tag. It lists an app's records perfectly well and **cannot list a topic**,
376
+ because under `h` a topic is the container rather than something inside it. A UI
377
+ explaining a short list should read this field.
378
+
379
+ ### A sidebar
380
+
381
+ ```ts
382
+ import { listFolders } from '@estiva-app/interop'
383
+
384
+ const folders = await listFolders(query) // { id, name, hasState }[]
385
+ ```
386
+
387
+ Asks for folders by kind rather than walking anything else. Discovering things
388
+ only through their parent loses them when the parent goes — the failure RFC 0.4
389
+ §4.2 records, one level up from where it was first paid for.
390
+
391
+ ---
392
+
333
393
  ## What is not in here, deliberately
334
394
 
335
395
  **No fold.** Manifest semantics are normative; an app's interpretation of its
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  * of every app that installed it, which is the objection that rules out
25
25
  * iframes.
26
26
  */
27
- export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, commentKindsOf, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, type ContentFormat, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, type PeopleCache, type PeopleCacheOptions, type ProjectionCache, type ResolvedManifest, type QueryFn, type PeopleFn, type People, type ForeignObject, type FolderProject, type ResolvedSlot, type ResolvedAction, type ActionFormField, type ManifestAction, type ActionEffect, ACTION_EFFECTS, type UnsignedActionEvent, } from './projection.js';
27
+ export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, commentKindsOf, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, type ContentFormat, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, type PeopleCache, type PeopleCacheOptions, type ProjectionCache, type ResolvedManifest, type QueryFn, type PeopleFn, type People, type ForeignObject, type FolderProject, type FolderContents, type FolderSummary, type ResolvedSlot, type ResolvedAction, type ActionFormField, type ManifestAction, type ActionEffect, ACTION_EFFECTS, type UnsignedActionEvent, } from './projection.js';
28
28
  /**
29
29
  * RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
30
30
  * a pasted link is matched back to one.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,aAAa,EAClB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,aAAa,EAClB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * of every app that installed it, which is the objection that rules out
25
25
  * iframes.
26
26
  */
27
- export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, commentKindsOf, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, ACTION_EFFECTS, } from './projection.js';
27
+ export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, commentKindsOf, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, ACTION_EFFECTS, } from './projection.js';
28
28
  /**
29
29
  * RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
30
30
  * a pasted link is matched back to one.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EAErB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAenB,cAAc,GAEf,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EAErB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAiBnB,cAAc,GAEf,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
@@ -381,6 +381,13 @@ interface Manifest {
381
381
  stage?: string;
382
382
  }[]>;
383
383
  }
384
+ /**
385
+ * NIP-29 group metadata — the relay's own record for a channel.
386
+ *
387
+ * Named here because {@link folderOf} keys on it, and a bare `39000` in that
388
+ * one comparison would read as an app's kind rather than as the relay's.
389
+ */
390
+ export declare const KIND_CHANNEL_METADATA = 39000;
384
391
  /**
385
392
  * Which Folder an object belongs to — both spellings, in one place.
386
393
  *
@@ -392,17 +399,44 @@ interface Manifest {
392
399
  * are the relay's and NIP-29's, so knowing them is not knowing what any app
393
400
  * is.
394
401
  *
395
- * **0.13.0 had a third case and 0.14.0 withdrew it.** A manifest could declare
396
- * `records.folder: "identifier"`, meaning *my objects are containers, so the
397
- * Folder is the object's own `d`*. Its only instance was a Peek topic, and
398
- * RFC 0.5 §1 retires that shape: a Folder holds several files of the same kind
399
- * — three topics and two projects — so a topic becomes a file inside a Folder
400
- * and carries an `h` like everything else. A vocabulary field whose only
401
- * instance is going away is one every future producer has to read and none can
402
- * use.
403
- *
404
- * Returns `null` when neither tag says — which is a real answer. An object with
405
- * no Folder has nowhere for a write to go, and guessing at one publishes into
402
+ * **0.13.0 had a third case as manifest vocabulary and 0.14.0 withdrew it.** A
403
+ * manifest could declare `records.folder: "identifier"`, meaning *my objects
404
+ * are containers, so the Folder is the object's own `d`*. The withdrawal was
405
+ * right and stands: its only instance was a Peek topic, RFC 0.5 §1 retires
406
+ * that shape, and a vocabulary field whose only instance is going away is one
407
+ * every future producer has to read and none can use.
408
+ *
409
+ * **What the withdrawal took with it was a working feature, and nothing
410
+ * noticed because nothing had declared the field yet** (INT-9). A channel
411
+ * record names no Folder by either tag above, so every write aimed at one is
412
+ * refused for having nowhere to go — which is why Peek can declare no action on
413
+ * a topic, four days after PRO-18 concluded a conversation had become
414
+ * declarable. Measured on production 2026-09-08: **0 of 40 `kind:39000` events
415
+ * carry `h` or `buzz-channel`, and 40 of 40 carry `d`.**
416
+ *
417
+ * So the third case comes back **as protocol rather than as vocabulary**, which
418
+ * is the distinction 0.14.0 was actually about. A `kind:39000` is NIP-29 group
419
+ * metadata, relay-signed, and its `d` *is* the channel id — buzz's `NOSTR.md`
420
+ * §"Group metadata" states it, `channel_info_from_event` reads it, and the
421
+ * relay's `h_grammar` is the same uuid. Nobody declares that and no producer
422
+ * can opt out of it, exactly like `h` and `buzz-channel` above. It asks nothing
423
+ * of any manifest, so it cannot be the field that every future producer reads
424
+ * and none can use.
425
+ *
426
+ * **It is the last of the three to fire, and it goes quiet on its own.** FOL-3
427
+ * makes a topic a file that carries an `h`; from that day the first clause
428
+ * answers and this one is unreachable. A shape retired by a model change should
429
+ * decay into dead code, not into a wrong answer — which is what the `??` order
430
+ * buys and what the "still resolves after FOL-3" test pins.
431
+ *
432
+ * Narrow on purpose: **`kind:39000` and nothing else.** Not "any addressable
433
+ * kind", which would hand every `30000`–`39999` record its own `d` as a Folder
434
+ * and put a consumer's write in a channel that may not exist. An addressable
435
+ * kind that is not the relay's channel record still answers `null` below, and a
436
+ * test holds that line.
437
+ *
438
+ * Returns `null` when nothing says — which is a real answer. An object with no
439
+ * Folder has nowhere for a write to go, and guessing at one publishes into
406
440
  * somebody else's channel.
407
441
  */
408
442
  export declare function folderOf(root: SignedEvent): string | null;
@@ -876,4 +910,123 @@ export declare function buildActionEvent(args: {
876
910
  * the one slot out of them.
877
911
  */
878
912
  export declare function resolveFolderProjectSlotsForTest(manifest: Manifest, root: SignedEvent): string | undefined;
913
+ /**
914
+ * The Folder as the relay maintains it — RFC 0.4 §12.1.
915
+ *
916
+ * Relay-signed, addressable, and **global**. §4.2 is worth reading before
917
+ * changing that last word: three of the four properties a folder must have are
918
+ * impossible if its state carries an `h`, because `h` files it under a channel
919
+ * and gates reads by access. Exploring folders you are not in, following one,
920
+ * and a file having one home while being referenced from elsewhere all need an
921
+ * address that resolves without membership. So the channel keeps doing access
922
+ * and conversation, and the folder becomes a layer above it.
923
+ *
924
+ * **Read-only here.** A client changes a folder by publishing a `kind:1852`
925
+ * command and the relay emits the new state (§4.1). A folder is not a
926
+ * user-signed event because NIP-01 addressable events are single-signer by
927
+ * construction — the address is `(pubkey, kind, d)`, so a second person adding
928
+ * a file would not replace your folder, they would create a different one.
929
+ */
930
+ export declare const KIND_FOLDER_STATE = 30890;
931
+ /** One folder, enough to draw a sidebar row. */
932
+ export interface FolderSummary {
933
+ /**
934
+ * The folder's uuid. **One uuid, three roles** — the channel id, the `h` on
935
+ * everything in it, and the `d` on both its `39000` and its `30890` (§5.2,
936
+ * measured across all of production's channels).
937
+ */
938
+ id: string;
939
+ name?: string;
940
+ /** True once the relay maintains state for it, rather than it being a bare channel. */
941
+ hasState: boolean;
942
+ }
943
+ /** A folder and everything in it, each file drawn through its owner's manifest. */
944
+ export interface FolderContents extends FolderSummary {
945
+ /** The folder state's address, absent until a state event exists. */
946
+ address?: string;
947
+ /**
948
+ * The files this folder holds.
949
+ *
950
+ * **Peers by construction, not by special case.** A Peek topic and a Ship
951
+ * project sit side by side because both are `a` tags in one list, and §5.2's
952
+ * finding is exactly that one tag type is enough to name either: a channel
953
+ * turned out to be addressable after all, so a topic needs no wrapper and no
954
+ * second mechanism. Nothing in this function knows what either app is.
955
+ *
956
+ * Ordered as the folder lists them. A file that resolved to nothing is
957
+ * **absent rather than marked** — see {@link resolveFolderContents}.
958
+ */
959
+ files: ForeignObject[];
960
+ /**
961
+ * Where the list came from, because the two are not equivalent.
962
+ *
963
+ * `state` is the model. `channel` is the approximation available before a
964
+ * folder has any state: containment inferred from `h`, which can list an
965
+ * app's records and **can never list a topic**, because under `h` the topic
966
+ * *is* the container rather than a thing inside it. A consumer that needs to
967
+ * explain a short list is reading this field.
968
+ */
969
+ source: 'state' | 'channel';
970
+ }
971
+ /**
972
+ * Every folder this identity can see, for a sidebar.
973
+ *
974
+ * Both shapes in one pass: folders the relay maintains state for, and bare
975
+ * channels that have none yet. A channel with state appears once, named by its
976
+ * state — the folder's name is the folder's to say.
977
+ *
978
+ * **A direct route, deliberately.** §4.2's post-mortem on REW-11 is that
979
+ * discovering children only through their parent loses them when the parent
980
+ * goes; a sidebar built by walking something else would inherit exactly that.
981
+ * This asks for folders by kind.
982
+ */
983
+ export declare function listFolders(query: QueryFn): Promise<FolderSummary[]>;
984
+ /**
985
+ * Everything in one folder, resolved through the manifests of the apps that own it.
986
+ *
987
+ * The cross-app read the whole model rests on: given a folder id, list its
988
+ * files whatever kind they are and whoever wrote them, so two apps drawing the
989
+ * same folder show the same things. Both apps consume this rather than either
990
+ * one owning it.
991
+ *
992
+ * ## A file the reader cannot see is absent, not "unavailable"
993
+ *
994
+ * The one rule here that is a product decision rather than a mechanism, and a
995
+ * deliberate divergence from upstream's NIP-MP, whose fold requires the
996
+ * opposite for public repositories. **The count is the disclosure**: a folder
997
+ * that renders three rows and two greyed-out placeholders has told an outsider
998
+ * how much they are missing, which for a folder named after a person is the
999
+ * sensitive part. So an address that resolves to nothing is dropped, and
1000
+ * nothing in the return value counts what was dropped.
1001
+ *
1002
+ * This is why the batch below cannot use {@link resolveForeignObject}
1003
+ * unchanged: that returns `unreachable: true` so an inline reference can say
1004
+ * "you may not have access", which is right for one pasted link and wrong for
1005
+ * a list.
1006
+ *
1007
+ * ## Round trips do not grow with the folder
1008
+ *
1009
+ * **Flat in the number of files, linear in the number of apps.** The folder
1010
+ * itself, the handler sweep, the contents, one query for every root at once
1011
+ * and every change with it, and one for the people — then two more per
1012
+ * distinct `(kind, author)` for NIP-89 discovery, which {@link ProjectionCache}
1013
+ * memoises away.
1014
+ *
1015
+ * Measured against production, reading three folders through one cache:
1016
+ *
1017
+ * | folder | files | cold | warm |
1018
+ * | --- | --- | --- | --- |
1019
+ * | Shared foundation packages | 24 | 11 | 5 |
1020
+ * | Feedback on Peek | 25 | 9 | 5 |
1021
+ * | Folders | 9 | 6 | 4 |
1022
+ *
1023
+ * Twenty-five files and nine cost the same warm, which is the property worth
1024
+ * having. A resolve per file would have been four *each* against a relay that
1025
+ * meters reads at 300 a minute — a folder of twenty-five would not have loaded.
1026
+ */
1027
+ export declare function resolveFolderContents(folder: string, query: QueryFn,
1028
+ /** Defaults to asking the relay. The browser passes a cached lookup. */
1029
+ lookupPeople?: PeopleFn,
1030
+ /** See {@link ProjectionCache}. Omitting it is exactly the old behaviour. */
1031
+ cache?: ProjectionCache): Promise<FolderContents>;
879
1032
  //# sourceMappingURL=projection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAiF,KAAK,cAAc,EAAqB,MAAM,sBAAsB,CAAA;AAC5J,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEnF,+EAA+E;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAEpF,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;IAChB,O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