@estiva-app/interop 0.31.0 → 0.33.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,42 @@ 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.33.0 — 2026-09-29
10
+
11
+ **Manifests: nothing.** No declaration is read differently. Additive.
12
+
13
+ - **`topLevelFolders(folders)`** (FOL-5) — the folders a sidebar draws as
14
+ sections: state, and no other folder lists it. Peek and Ship each held this
15
+ line word for word; now there is one.
16
+ - **`FolderSummary.addresses`** — what a folder's state lists, unresolved and
17
+ in the state's order, present only when there is anything. `listedIn` in the
18
+ other direction, read off the states `listFolders` already holds, so it
19
+ costs no request. Ship draws a team's projects from it: its own records the
20
+ team's state lists, rather than each project's own `contentFolder`.
21
+
22
+ ## 0.32.0 — 2026-09-24
23
+
24
+ **Manifests: nothing.** No declaration is read differently. What is new is
25
+ the write side of Folders, which until now each app wrote for itself.
26
+
27
+ - **Folder write planners** (FOL-4): `planCreateFolder`, `planRenameFolder`,
28
+ `planPlaceFile`, `planUnlistFile` and `planMoveFile`. Each returns unsigned
29
+ events in publish order and does no signing, no I/O and no clock or id
30
+ generation; each app keeps its own signing and publishing (ADR 0002 §10 —
31
+ Ship is the second app to write these).
32
+ - create = `[9007, 1852 add + name]`, so a Folder has state from birth;
33
+ - rename = `[9002, 1852 add + name]`, the command only when it has state;
34
+ - place / unlist = `[1852 add]` / `[1852 remove]` only when it has state;
35
+ - move = `[add to target, remove from source]`, add first.
36
+ - **`hasState` is always the caller's**, from a read. A `kind:1852` against a
37
+ Folder with no `kind:30890` emits state listing only what the command named,
38
+ and everything filed in it by `h` stops being listed (peek#192). So **a move
39
+ into or out of a stateless Folder is refused** — `{ ok: false, reason:
40
+ 'source-has-no-state' | 'target-has-no-state' }` — where Peek's own move
41
+ sent both commands regardless.
42
+ - **Peer dependency: `@estiva-app/protocol >= 0.23.0`**, for
43
+ `buildFolderCommand`. Nothing else in this package needed it raised.
44
+
9
45
  ## 0.31.0 — 2026-09-23
10
46
 
11
47
  **Manifests: nothing.** No declaration is read differently. What is new is a
package/README.md CHANGED
@@ -479,10 +479,10 @@ explaining a short list should read this field.
479
479
  ### A sidebar
480
480
 
481
481
  ```ts
482
- import { listFolders } from '@estiva-app/interop'
482
+ import { listFolders, topLevelFolders } from '@estiva-app/interop'
483
483
 
484
- const folders = await listFolders(query) // { id, name, hasState, listedIn? }[]
485
- const topLevel = folders.filter((f) => !f.listedIn)
484
+ const folders = await listFolders(query) // { id, name, hasState, listedIn?, addresses? }[]
485
+ const teams = topLevelFolders(folders) // state, and nothing lists it
486
486
  ```
487
487
 
488
488
  Asks for folders by kind rather than walking anything else. Discovering things
@@ -492,7 +492,12 @@ only through their parent loses them when the parent goes — the failure RFC 0.
492
492
  A channel is addressable, so a folder can be a file in another folder — Peek's
493
493
  topics are, each listed by its team's state. `listedIn` names those containers,
494
494
  read off the states the call already holds, so a sidebar draws the team and
495
- not, beside it, every topic in it.
495
+ not, beside it, every topic in it. `topLevelFolders` is that choice — a folder
496
+ with state that nothing lists — so two apps draw the same sections.
497
+
498
+ `addresses` is the other direction: what a folder's state lists, unresolved
499
+ and in order. An app drawing its own records under a team intersects it with
500
+ the records it holds; one drawing another app's files resolves the folder.
496
501
 
497
502
  A record a state lists places its own channel there too: a project's
498
503
  conversation lives in the channel its `buzz-channel` (or `h`) names, and that
@@ -500,6 +505,32 @@ channel's `listedIn` is every Folder that lists the project, so an unread
500
505
  verdict on it has a team to reach. It costs one more request, for the records.
501
506
  A channel with state of its own is a Folder, and only states place it.
502
507
 
508
+ ### Changing a folder
509
+
510
+ ```ts
511
+ import { planMoveFile } from '@estiva-app/interop'
512
+
513
+ const plan = planMoveFile(me, Date.now(), {
514
+ address,
515
+ from: { id: here.id, hasState: here.hasState }, // from a read, never a guess
516
+ to: { id: there.id, hasState: there.hasState },
517
+ })
518
+ if (!plan.ok) return plan.reason // 'source-has-no-state' | 'target-has-no-state'
519
+ for (const event of plan.events) { // publish in order; stop at the first refusal
520
+ if (!(await publish(await sign(event))).ok) break
521
+ }
522
+ ```
523
+
524
+ `planCreateFolder`, `planRenameFolder`, `planPlaceFile`, `planUnlistFile` and
525
+ `planMoveFile` return **unsigned** events in publish order. Signing and
526
+ publishing stay yours.
527
+
528
+ Every one but create takes `hasState`, because the relay computes a folder's
529
+ next state from its current one and a folder with no `kind:30890` has none: a
530
+ `kind:1852` against it emits state listing only what the command named, and
531
+ everything filed in it by `h` stops being listed. So rename, place and unlist
532
+ send no command to such a folder, and a move into or out of one is refused.
533
+
503
534
  ---
504
535
 
505
536
  ## What is not in here, deliberately
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Folder writes, planned — RFC 0.4 §4, FOL-4.
3
+ *
4
+ * Every change to a Folder is one or more events published in order, and which
5
+ * events depends on one fact the relay will not check for you: **whether the
6
+ * Folder has a `kind:30890` yet.** `handle_folder_command` computes the next
7
+ * state from the existing one, and a Folder with no state has none — so any
8
+ * `kind:1852` against it emits state listing only what that command named, and
9
+ * everything filed in the Folder by `h` stops being listed on every surface
10
+ * (peek#192). Nothing fails; the Folder just looks emptied.
11
+ *
12
+ * That is why these are here rather than in each app. Peek learned it once per
13
+ * writer — rename, start a topic, delete a file — and its move never learned it
14
+ * at all. Ship is the second app to write Folder commands (ADR 0002 §10).
15
+ *
16
+ * ## Pure, and the caller says
17
+ *
18
+ * Each planner returns **unsigned** events and does nothing else: each app
19
+ * signs and publishes its own way. `hasState` is always an argument, never
20
+ * looked up, because the caller has just read the Folder and a guess here is
21
+ * silent loss. Nothing here reads the clock or makes an id — a new Folder's
22
+ * uuid is the caller's.
23
+ *
24
+ * ## Publish in order, and stop at the first refusal
25
+ *
26
+ * The array is the publish order and the order is the design: each later event
27
+ * assumes the earlier ones were accepted. What a refusal part-way through
28
+ * *means* — "created but not listed", "added but still in the old one" — is
29
+ * each app's to say, and the index of the refused event is enough to say it.
30
+ */
31
+ import { type ChannelVisibility, type UnsignedEvent } from '@estiva-app/protocol';
32
+ /** A Folder as a write needs it: which one, and whether the relay holds state for it. */
33
+ export interface FolderRef {
34
+ id: string;
35
+ /** `FolderSummary.hasState` / `FolderContents.hasState`, from a read — never a guess. */
36
+ hasState: boolean;
37
+ }
38
+ /**
39
+ * Create a Folder: `[kind:9007, kind:1852 add + name]`.
40
+ *
41
+ * The channel first, because a Folder *is* one (RFC 0.4 §4.1). Then a command
42
+ * naming it and listing nothing, so the Folder **has state from birth** — a
43
+ * listing that shows only Folders with state would otherwise never show it,
44
+ * and a stateless Folder is indistinguishable from a bare channel. Safe here
45
+ * and nowhere else without `hasState`: the channel was created by the first
46
+ * event, so nothing is filed in it to hide.
47
+ */
48
+ export declare function planCreateFolder(pubkey: string, createdAtMs: number, args: {
49
+ folder: string;
50
+ name: string;
51
+ visibility?: ChannelVisibility;
52
+ }): UnsignedEvent[];
53
+ /**
54
+ * Rename a Folder: `[kind:9002, kind:1852 add + name if it has state]`.
55
+ *
56
+ * **A Folder's name has two homes** and the state's shadows the channel's, so
57
+ * writing only the channel leaves the old name wherever the state is read. The
58
+ * command is `add` with no addresses — the contents are kept and only the name
59
+ * changes; `set` would empty it and there is no `rename` op. With no state
60
+ * there is only the channel to rename, and a command would empty the Folder.
61
+ */
62
+ export declare function planRenameFolder(pubkey: string, createdAtMs: number, args: {
63
+ folder: string;
64
+ name: string;
65
+ hasState: boolean;
66
+ }): UnsignedEvent[];
67
+ /**
68
+ * List a file that was just published into a Folder: `[kind:1852 add]` if the
69
+ * Folder has state, otherwise nothing.
70
+ *
71
+ * A Folder read by containment lists the file the moment its `h` is stored. A
72
+ * Folder with state lists only what its state names, so it needs the `add`.
73
+ * Publish the file first: a refused `add` then leaves a file that exists and
74
+ * is reachable, rather than a listing that points at nothing.
75
+ */
76
+ export declare function planPlaceFile(pubkey: string, createdAtMs: number, args: {
77
+ folder: string;
78
+ address: string;
79
+ hasState: boolean;
80
+ }): UnsignedEvent[];
81
+ /**
82
+ * Unlist a file that was just deleted from a Folder: `[kind:1852 remove]` if
83
+ * the Folder has state, otherwise nothing.
84
+ *
85
+ * {@link planPlaceFile} in reverse. A Folder with state lists what it names,
86
+ * deleted or not, so the row would stay pointing at nothing; a Folder read by
87
+ * containment stops listing the file once the relay hides it. Delete first: a
88
+ * refused `remove` then leaves a stale row, where the other order would unlist
89
+ * a file the relay kept.
90
+ */
91
+ export declare function planUnlistFile(pubkey: string, createdAtMs: number, args: {
92
+ folder: string;
93
+ address: string;
94
+ hasState: boolean;
95
+ }): UnsignedEvent[];
96
+ /**
97
+ * Why a move was refused. The source is checked first: no choice of target
98
+ * fixes it, so a consumer can stop offering Move for that file at all.
99
+ */
100
+ export type MoveRefusal = 'source-has-no-state' | 'target-has-no-state';
101
+ export type MovePlan = {
102
+ ok: true;
103
+ events: UnsignedEvent[];
104
+ } | {
105
+ ok: false;
106
+ reason: MoveRefusal;
107
+ };
108
+ /**
109
+ * Move a file between Folders: `[kind:1852 add to target, kind:1852 remove from source]`.
110
+ *
111
+ * **Add first.** There is no atomic move — state is per Folder — so something
112
+ * can fail between the two. After the add, a failure leaves the file in both
113
+ * Folders: visible, obviously wrong, fixed by moving again. Removing first and
114
+ * failing would leave it in neither, which looks like a file that never was.
115
+ *
116
+ * **Refused unless both Folders have state.** An `add` to a Folder with none
117
+ * emits state listing only the moved file, and everything already filed in it
118
+ * disappears; a `remove` from one emits state listing nothing, and the whole
119
+ * source disappears. Writing a complete state first is not offered here: what
120
+ * a stateless Folder holds is whatever its `h` implies to *this* reader, and a
121
+ * planner that enumerated it would be deciding on everyone's behalf.
122
+ *
123
+ * A move to the same Folder plans nothing.
124
+ */
125
+ export declare function planMoveFile(pubkey: string, createdAtMs: number, args: {
126
+ address: string;
127
+ from: FolderRef;
128
+ to: FolderRef;
129
+ }): MovePlan;
130
+ //# sourceMappingURL=folders.d.ts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D,aAAa,EAAE,CAGjB;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,qBAAqB,GAAG,qBAAqB,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,CAAA;AAEjG;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,SAAS,CAAA;CAAE,GACxD,QAAQ,CAWV"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Folder writes, planned — RFC 0.4 §4, FOL-4.
3
+ *
4
+ * Every change to a Folder is one or more events published in order, and which
5
+ * events depends on one fact the relay will not check for you: **whether the
6
+ * Folder has a `kind:30890` yet.** `handle_folder_command` computes the next
7
+ * state from the existing one, and a Folder with no state has none — so any
8
+ * `kind:1852` against it emits state listing only what that command named, and
9
+ * everything filed in the Folder by `h` stops being listed on every surface
10
+ * (peek#192). Nothing fails; the Folder just looks emptied.
11
+ *
12
+ * That is why these are here rather than in each app. Peek learned it once per
13
+ * writer — rename, start a topic, delete a file — and its move never learned it
14
+ * at all. Ship is the second app to write Folder commands (ADR 0002 §10).
15
+ *
16
+ * ## Pure, and the caller says
17
+ *
18
+ * Each planner returns **unsigned** events and does nothing else: each app
19
+ * signs and publishes its own way. `hasState` is always an argument, never
20
+ * looked up, because the caller has just read the Folder and a guess here is
21
+ * silent loss. Nothing here reads the clock or makes an id — a new Folder's
22
+ * uuid is the caller's.
23
+ *
24
+ * ## Publish in order, and stop at the first refusal
25
+ *
26
+ * The array is the publish order and the order is the design: each later event
27
+ * assumes the earlier ones were accepted. What a refusal part-way through
28
+ * *means* — "created but not listed", "added but still in the old one" — is
29
+ * each app's to say, and the index of the refused event is enough to say it.
30
+ */
31
+ import { buildCreateChannel, buildEditChannelMetadata, buildFolderCommand, } from '@estiva-app/protocol';
32
+ /**
33
+ * Create a Folder: `[kind:9007, kind:1852 add + name]`.
34
+ *
35
+ * The channel first, because a Folder *is* one (RFC 0.4 §4.1). Then a command
36
+ * naming it and listing nothing, so the Folder **has state from birth** — a
37
+ * listing that shows only Folders with state would otherwise never show it,
38
+ * and a stateless Folder is indistinguishable from a bare channel. Safe here
39
+ * and nowhere else without `hasState`: the channel was created by the first
40
+ * event, so nothing is filed in it to hide.
41
+ */
42
+ export function planCreateFolder(pubkey, createdAtMs, args) {
43
+ return [
44
+ buildCreateChannel(pubkey, createdAtMs, {
45
+ channelUuid: args.folder,
46
+ name: args.name,
47
+ ...(args.visibility ? { visibility: args.visibility } : {}),
48
+ }),
49
+ buildFolderCommand(pubkey, createdAtMs, { folder: args.folder, op: 'add', name: args.name }),
50
+ ];
51
+ }
52
+ /**
53
+ * Rename a Folder: `[kind:9002, kind:1852 add + name if it has state]`.
54
+ *
55
+ * **A Folder's name has two homes** and the state's shadows the channel's, so
56
+ * writing only the channel leaves the old name wherever the state is read. The
57
+ * command is `add` with no addresses — the contents are kept and only the name
58
+ * changes; `set` would empty it and there is no `rename` op. With no state
59
+ * there is only the channel to rename, and a command would empty the Folder.
60
+ */
61
+ export function planRenameFolder(pubkey, createdAtMs, args) {
62
+ const rename = buildEditChannelMetadata(pubkey, createdAtMs, { channelUuid: args.folder, name: args.name });
63
+ if (!args.hasState)
64
+ return [rename];
65
+ return [rename, buildFolderCommand(pubkey, createdAtMs, { folder: args.folder, op: 'add', name: args.name })];
66
+ }
67
+ /**
68
+ * List a file that was just published into a Folder: `[kind:1852 add]` if the
69
+ * Folder has state, otherwise nothing.
70
+ *
71
+ * A Folder read by containment lists the file the moment its `h` is stored. A
72
+ * Folder with state lists only what its state names, so it needs the `add`.
73
+ * Publish the file first: a refused `add` then leaves a file that exists and
74
+ * is reachable, rather than a listing that points at nothing.
75
+ */
76
+ export function planPlaceFile(pubkey, createdAtMs, args) {
77
+ if (!args.hasState)
78
+ return [];
79
+ return [buildFolderCommand(pubkey, createdAtMs, { folder: args.folder, op: 'add', addresses: [args.address] })];
80
+ }
81
+ /**
82
+ * Unlist a file that was just deleted from a Folder: `[kind:1852 remove]` if
83
+ * the Folder has state, otherwise nothing.
84
+ *
85
+ * {@link planPlaceFile} in reverse. A Folder with state lists what it names,
86
+ * deleted or not, so the row would stay pointing at nothing; a Folder read by
87
+ * containment stops listing the file once the relay hides it. Delete first: a
88
+ * refused `remove` then leaves a stale row, where the other order would unlist
89
+ * a file the relay kept.
90
+ */
91
+ export function planUnlistFile(pubkey, createdAtMs, args) {
92
+ if (!args.hasState)
93
+ return [];
94
+ return [buildFolderCommand(pubkey, createdAtMs, { folder: args.folder, op: 'remove', addresses: [args.address] })];
95
+ }
96
+ /**
97
+ * Move a file between Folders: `[kind:1852 add to target, kind:1852 remove from source]`.
98
+ *
99
+ * **Add first.** There is no atomic move — state is per Folder — so something
100
+ * can fail between the two. After the add, a failure leaves the file in both
101
+ * Folders: visible, obviously wrong, fixed by moving again. Removing first and
102
+ * failing would leave it in neither, which looks like a file that never was.
103
+ *
104
+ * **Refused unless both Folders have state.** An `add` to a Folder with none
105
+ * emits state listing only the moved file, and everything already filed in it
106
+ * disappears; a `remove` from one emits state listing nothing, and the whole
107
+ * source disappears. Writing a complete state first is not offered here: what
108
+ * a stateless Folder holds is whatever its `h` implies to *this* reader, and a
109
+ * planner that enumerated it would be deciding on everyone's behalf.
110
+ *
111
+ * A move to the same Folder plans nothing.
112
+ */
113
+ export function planMoveFile(pubkey, createdAtMs, args) {
114
+ if (args.from.id === args.to.id)
115
+ return { ok: true, events: [] };
116
+ if (!args.from.hasState)
117
+ return { ok: false, reason: 'source-has-no-state' };
118
+ if (!args.to.hasState)
119
+ return { ok: false, reason: 'target-has-no-state' };
120
+ return {
121
+ ok: true,
122
+ events: [
123
+ buildFolderCommand(pubkey, createdAtMs, { folder: args.to.id, op: 'add', addresses: [args.address] }),
124
+ buildFolderCommand(pubkey, createdAtMs, { folder: args.from.id, op: 'remove', addresses: [args.address] }),
125
+ ],
126
+ };
127
+ }
128
+ //# sourceMappingURL=folders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folders.js","sourceRoot":"","sources":["../src/folders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,GAGnB,MAAM,sBAAsB,CAAA;AAS7B;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,WAAmB,EACnB,IAAsE;IAEtE,OAAO;QACL,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE;YACtC,WAAW,EAAE,IAAI,CAAC,MAAM;YACxB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5D,CAAC;QACF,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;KAC7F,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,WAAmB,EACnB,IAAyD;IAEzD,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3G,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,CAAC,MA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,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC5E,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC1E,OAAO;QACL,EAAE,EAAE,IAAI;QACR,MAAM,EAAE;YACN,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACrG,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;SAC3G;KACF,CAAA;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -24,12 +24,18 @@
24
24
  * of every app that installed it, which is the objection that rules out
25
25
  * iframes.
26
26
  */
27
- export { resolveManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, type Aspect, commentKindsOf, conversationCountsOf, conversationsOf, type ConversationMessage, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, type CommentDecoration, type CommentDecorations, type CommentReaction, type CommentResolution, 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';
27
+ export { resolveManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, type Aspect, commentKindsOf, conversationCountsOf, conversationsOf, type ConversationMessage, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, type CommentDecoration, type CommentDecorations, type CommentReaction, type CommentResolution, 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
  * SPEC §6.7's nesting, drawn from one team listing: roots, children,
30
30
  * breadcrumbs and move targets, with cycles cut. No requests.
31
31
  */
32
32
  export { nestingOf, type Nestable, type Nesting } from './nesting.js';
33
+ /**
34
+ * Folder writes as unsigned events in publish order — create, rename, place,
35
+ * unlist, move. Each takes `hasState` from the caller, because a `kind:1852`
36
+ * against a Folder with no state empties it. No signing, no requests.
37
+ */
38
+ export { planCreateFolder, planRenameFolder, planPlaceFile, planUnlistFile, planMoveFile, type FolderRef, type MovePlan, type MoveRefusal, } from './folders.js';
33
39
  /**
34
40
  * RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
35
41
  * 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,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,KAAK,MAAM,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,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;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAErE;;;;;;;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,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,KAAK,MAAM,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,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;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAErE;;;;GAIG;AACH,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,cAAc,CAAA;AAErB;;;;;;;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,12 +24,18 @@
24
24
  * of every app that installed it, which is the objection that rules out
25
25
  * iframes.
26
26
  */
27
- export { resolveManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, commentKindsOf, conversationCountsOf, conversationsOf, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, 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, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, commentKindsOf, conversationCountsOf, conversationsOf, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, 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
  * SPEC §6.7's nesting, drawn from one team listing: roots, children,
30
30
  * breadcrumbs and move targets, with cycles cut. No requests.
31
31
  */
32
32
  export { nestingOf } from './nesting.js';
33
+ /**
34
+ * Folder writes as unsigned events in publish order — create, rename, place,
35
+ * unlist, move. Each takes `hasState` from the caller, because a `kind:1852`
36
+ * against a Folder with no state empties it. No signing, no requests.
37
+ */
38
+ export { planCreateFolder, planRenameFolder, planPlaceFile, planUnlistFile, planMoveFile, } from './folders.js';
33
39
  /**
34
40
  * RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
35
41
  * 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,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAKhB,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;;;GAGG;AACH,OAAO,EAAE,SAAS,EAA+B,MAAM,cAAc,CAAA;AAErE;;;;;;;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,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAKhB,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;;;GAGG;AACH,OAAO,EAAE,SAAS,EAA+B,MAAM,cAAc,CAAA;AAErE;;;;GAIG;AACH,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,YAAY,GAIb,MAAM,cAAc,CAAA;AAErB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
@@ -1335,7 +1335,35 @@ export interface FolderSummary {
1335
1335
  * `listFolders` already holds every state, so the answer is free.
1336
1336
  */
1337
1337
  listedIn?: string[];
1338
+ /**
1339
+ * The addresses this folder's state lists, in the state's order — present
1340
+ * only when there are any.
1341
+ *
1342
+ * `listedIn` in the other direction, and free for the same reason: the
1343
+ * states are already in hand. It is the unresolved list — a row that names
1344
+ * an archived or unreachable record is still here — so a consumer that
1345
+ * draws one app's own records under a folder (Ship's projects under a team,
1346
+ * FOL-5) intersects it with the records it holds, and a consumer that draws
1347
+ * another app's files resolves them with {@link resolveFolderContents}.
1348
+ */
1349
+ addresses?: string[];
1338
1350
  }
1351
+ /**
1352
+ * The folders a person navigates by: the ones with state that no other folder
1353
+ * lists (FOL-5).
1354
+ *
1355
+ * Most channels a relay answers with are nobody's folder — an app's record
1356
+ * channels, the channel a record's conversation lives in, a test topic — and
1357
+ * each is reached through the object it belongs to. Two facts the summary
1358
+ * already carries decide it, with no further read: a `kind:30890` exists once
1359
+ * somebody has sent a folder command at the channel, which a record channel
1360
+ * never gets; and a folder another one lists (`listedIn`) is a row inside
1361
+ * that one, not a section beside it.
1362
+ *
1363
+ * Not a list of ids: a new team is a folder somebody creates, not a code
1364
+ * change. Moved here from Peek and Ship, which each held the same line.
1365
+ */
1366
+ export declare function topLevelFolders<T extends Pick<FolderSummary, 'hasState' | 'listedIn'>>(folders: T[]): T[];
1339
1367
  /** A folder and everything in it, each file drawn through its owner's manifest. */
1340
1368
  export interface FolderContents extends FolderSummary {
1341
1369
  /** The folder state's address, absent until a state event exists. */
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAA0G,KAAK,cAAc,EAAqB,MAAM,sBAAsB,CAAA;AACrL,OAAO,EAAyB,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,E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+3041,24 @@ export const KIND_FOLDER_STATE = 30890;
3041
3041
  const KIND_CHANNEL = 39000;
3042
3042
  /** The `name` tag, when there is an event to read it off at all. */
3043
3043
  const nameOf = (event) => (event ? tagValue(event, 'name') : undefined);
3044
+ /**
3045
+ * The folders a person navigates by: the ones with state that no other folder
3046
+ * lists (FOL-5).
3047
+ *
3048
+ * Most channels a relay answers with are nobody's folder — an app's record
3049
+ * channels, the channel a record's conversation lives in, a test topic — and
3050
+ * each is reached through the object it belongs to. Two facts the summary
3051
+ * already carries decide it, with no further read: a `kind:30890` exists once
3052
+ * somebody has sent a folder command at the channel, which a record channel
3053
+ * never gets; and a folder another one lists (`listedIn`) is a row inside
3054
+ * that one, not a section beside it.
3055
+ *
3056
+ * Not a list of ids: a new team is a folder somebody creates, not a code
3057
+ * change. Moved here from Peek and Ship, which each held the same line.
3058
+ */
3059
+ export function topLevelFolders(folders) {
3060
+ return folders.filter((folder) => folder.hasState && !folder.listedIn?.length);
3061
+ }
3044
3062
  /**
3045
3063
  * Every folder this identity can see, for a sidebar.
3046
3064
  *
@@ -3068,10 +3086,12 @@ export async function listFolders(query) {
3068
3086
  // State wins over the channel for the name, whichever order they arrived.
3069
3087
  if (existing && !state)
3070
3088
  continue;
3089
+ const addresses = state ? event.tags.filter((tag) => tag[0] === 'a' && tag[1]).map((tag) => tag[1]) : [];
3071
3090
  byId.set(id, {
3072
3091
  id,
3073
3092
  name: tagValue(event, 'name') ?? existing?.name,
3074
3093
  hasState: state || (existing?.hasState ?? false),
3094
+ ...(addresses.length ? { addresses } : {}),
3075
3095
  });
3076
3096
  }
3077
3097
  /*