@estiva-app/conversation 0.23.1 → 0.25.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 +56 -0
- package/README.md +3 -2
- package/dist/boxCard.d.ts +25 -6
- package/dist/boxCard.d.ts.map +1 -1
- package/dist/boxCard.js +27 -9
- package/dist/boxCard.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/openingWords.d.ts +45 -1
- package/dist/openingWords.d.ts.map +1 -1
- package/dist/openingWords.js +83 -17
- package/dist/openingWords.js.map +1 -1
- package/dist/references.d.ts +36 -1
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +39 -2
- package/dist/references.js.map +1 -1
- package/dist/streamUnread.d.ts +102 -0
- package/dist/streamUnread.d.ts.map +1 -0
- package/dist/streamUnread.js +133 -0
- package/dist/streamUnread.js.map +1 -0
- package/package.json +1 -1
- package/src/boxCard.ts +38 -9
- package/src/index.ts +21 -2
- package/src/openingWords.ts +109 -17
- package/src/references.ts +69 -3
- package/src/streamUnread.ts +185 -0
package/dist/references.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AA2BA,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAExF,+FAA+F;AAC/F,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAElF,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,gGAAgG;IAChG,EAAE,EAAE,MAAM,CAAA;IACV,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,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AE,MAAM,GAAG,SAAS,kBAAkB,EAAE,CAAA;IAClD,4DAA4D;IAC5D,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;IAC3C;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,MAAM,EAAE,iBAAiB,CAAA;IACzB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAa,EAAE,OAAc,EAAE,SAAa,EAAE,EAAE,sBAAsB,GAAG,eAAe,CAgFjI"}
|
package/dist/references.js
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* What `[` offers, and in what order — CON-26's ranking (Miky, 2026-10-02),
|
|
3
3
|
* in one place for every app (PEE-21).
|
|
4
4
|
*
|
|
5
|
-
* Two capped sections,
|
|
5
|
+
* Two capped sections, Files above Messages ({@link referenceSectionsOf};
|
|
6
|
+
* Katerina, 2026-10-30, widget review item 19 — Messages led until then, and
|
|
7
|
+
* typing a file's word picked a message):
|
|
6
8
|
*
|
|
7
|
-
* - **Messages:** this thread or file first, then the parent file's.
|
|
8
9
|
* - **Files:** this Folder first, then files you read recently (your §11 read
|
|
9
10
|
* markers), then everything else, which you reach only by typing (relay
|
|
10
11
|
* search).
|
|
12
|
+
* - **Messages:** this thread or file first, then the parent file's. A message
|
|
13
|
+
* is found by its own words ({@link messageWords}), never by a link's raw
|
|
14
|
+
* text: a row built by {@link messageCandidate} carries them.
|
|
11
15
|
*
|
|
12
16
|
* With nothing typed the tiers set the order. Once you type, a better title
|
|
13
17
|
* match beats a higher tier; an open issue goes before a done or cancelled
|
|
@@ -20,12 +24,45 @@
|
|
|
20
24
|
* markers, a relay search — is the app's: each app holds them differently.
|
|
21
25
|
*/
|
|
22
26
|
import { addrToNaddr } from '@estiva-app/protocol';
|
|
27
|
+
import { messageReference } from './compose.js';
|
|
28
|
+
import { messageWords, openingWords } from './openingWords.js';
|
|
23
29
|
/** Where a message sits relative to the box you are writing in. */
|
|
24
30
|
export const MESSAGE_TIER = { here: 0, parent: 1 };
|
|
25
31
|
/** Where a file sits relative to you. `search` only ever comes from typing. */
|
|
26
32
|
export const FILE_TIER = { folder: 0, recent: 1, search: 2 };
|
|
27
33
|
/** How many rows each section shows (Miky, 2026-10-03): the box stays at the old list's height. */
|
|
28
34
|
export const REFERENCE_CAPS = { messages: 4, files: 6 };
|
|
35
|
+
/**
|
|
36
|
+
* {@link rankReferences}' sections in the order `[` draws them: Files, then
|
|
37
|
+
* Messages (Katerina, 2026-10-30), in every app. An empty one is kept: the
|
|
38
|
+
* menu draws no heading for it.
|
|
39
|
+
*/
|
|
40
|
+
export function referenceSectionsOf(ranked) {
|
|
41
|
+
return [
|
|
42
|
+
{ name: 'files', items: ranked.files },
|
|
43
|
+
{ name: 'messages', items: ranked.messages },
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A message as `[`'s row offers it, the same in every app: its reference
|
|
48
|
+
* (`messageReference`), its author as the title, its opening words as the
|
|
49
|
+
* caption ({@link openingWords}, an app link read as what it names when
|
|
50
|
+
* `resolveLink` has answered for it), and its own words to be found by
|
|
51
|
+
* ({@link messageWords}) — not the raw text of a link in it.
|
|
52
|
+
*/
|
|
53
|
+
export function messageCandidate(message, tier, nameOf, options = {}) {
|
|
54
|
+
return {
|
|
55
|
+
id: message.id,
|
|
56
|
+
uri: messageReference(message.id, message.kind),
|
|
57
|
+
type: 'message',
|
|
58
|
+
kind: message.kind,
|
|
59
|
+
title: message.author,
|
|
60
|
+
caption: openingWords(message.body, nameOf, options),
|
|
61
|
+
search: messageWords(message.body, nameOf),
|
|
62
|
+
tier,
|
|
63
|
+
...(message.at === undefined ? {} : { at: message.at }),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
29
66
|
const normalize = (text) => text.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
30
67
|
const isWordStart = (text, at) => at === 0 || !/[\p{L}\p{N}]/u.test(text[at - 1]);
|
|
31
68
|
/** The words of `text`: its runs of letters and digits, so `SUM-7.` is `sum`, `7`. */
|
package/dist/references.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.js","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAsClD,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAA;AAE3D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAA;AAErE,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAW,CAAA;AAsBhE,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AAElF,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAE,CAAC,CAAA;AAElG,sFAAsF;AACtF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAY,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,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;YAC5B,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;gBAC7B,MAAM,EAAE,CAAA;gBACR,OAAO,EAAE,CAAA;YACX,CAAC;YACD,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YACjC,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAA;YACvB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,MAAM,EAAE,CAAA;gBACR,OAAO,EAAE,CAAA;YACX,CAAC;YACD,IAAI,MAAM,EAAE,KAAK,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;gBAAE,GAAG,CAAC,KAAK,CAAC,CAAA;YAC7D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;gBACnD,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;gBACtD,IAAI,OAAO;oBAAE,OAAO,OAAO,CAAA;YAC7B,CAAC;YACD,OAAO,EAAE,CAAA;QACX,CAAC;QACD,SAAS,CAAC,QAAQ;YAChB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YACvB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QACzC,CAAC;QACD,KAAK;YACH,MAAM,EAAE,CAAA;YACR,MAAM,CAAC,KAAK,EAAE,CAAA;YACd,QAAQ,CAAC,KAAK,EAAE,CAAA;QAClB,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list row's dot — SPEC §11.8 over a stream's messages, for a reader that
|
|
3
|
+
* holds only who said what and when, never the bodies.
|
|
4
|
+
*
|
|
5
|
+
* Moved here from Peek (SHIPS-2) so Peek's Topics and Ship's Topics judge a
|
|
6
|
+
* topic's dot by one rule: which files the viewer is a member of, read from
|
|
7
|
+
* the relay and folded ({@link membershipQueries}, {@link foldMemberships}),
|
|
8
|
+
* the terms that fold gives a stream ({@link streamTermsOf}), and whether any
|
|
9
|
+
* of the stream's messages is unread on them ({@link streamHasUnread}).
|
|
10
|
+
*
|
|
11
|
+
* The read state and the muted list are encrypted (NIP-44), so nothing here
|
|
12
|
+
* reads them: the app hands in the merged markers and the muted set it holds.
|
|
13
|
+
*/
|
|
14
|
+
import { type SignedEvent } from '@estiva-app/protocol';
|
|
15
|
+
import { type Membership } from './membership.js';
|
|
16
|
+
/** What a list holds of a message: no body. `root` is the thread root's id, the message's own when it is one. */
|
|
17
|
+
export interface StreamMessage {
|
|
18
|
+
id: string;
|
|
19
|
+
/** Unix seconds. */
|
|
20
|
+
at: number;
|
|
21
|
+
/** Author pubkey. */
|
|
22
|
+
by: string;
|
|
23
|
+
root: string;
|
|
24
|
+
}
|
|
25
|
+
/** What a stream is judged against besides its messages. */
|
|
26
|
+
export interface StreamFrontier {
|
|
27
|
+
/** The merged read state: context → unix seconds. */
|
|
28
|
+
merged: Readonly<Record<string, number>>;
|
|
29
|
+
/** The viewer's pubkey; their own messages do not count. */
|
|
30
|
+
me: string | undefined;
|
|
31
|
+
/** Now, unix seconds. */
|
|
32
|
+
nowSeconds: number;
|
|
33
|
+
horizonSeconds: number;
|
|
34
|
+
}
|
|
35
|
+
/** The terms a stream is told about on: SPEC §11.8's membership, join time and mute. */
|
|
36
|
+
export interface StreamTerms {
|
|
37
|
+
member: boolean;
|
|
38
|
+
since?: number;
|
|
39
|
+
muted: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Is anything in this stream unread for the viewer — SPEC §11.8's four
|
|
43
|
+
* conditions over §11.3's markers, judged by {@link isUnread}.
|
|
44
|
+
*
|
|
45
|
+
* `context` is the stream's read-state context (§11.1): `fileContext(address)`
|
|
46
|
+
* for a file, `channelContext(uuid)` for a Folder's general stream. A message is
|
|
47
|
+
* judged against its thread's marker as well as the stream's (§11.3).
|
|
48
|
+
*
|
|
49
|
+
* The messages carry no body, so whether one *names the viewer* comes from
|
|
50
|
+
* `isMentioned` (the ids the membership read's `#p` filter returned) and is
|
|
51
|
+
* handed to the judge as the body it would have had. Without a marker, a file
|
|
52
|
+
* member is told from the second they joined; a Folder's own chat has no
|
|
53
|
+
* members here and lights only for a message that names the viewer, so
|
|
54
|
+
* absence there is the horizon (§11.6).
|
|
55
|
+
*/
|
|
56
|
+
export declare function streamHasUnread(messages: readonly StreamMessage[], context: string, terms: StreamTerms, frontier: StreamFrontier, isMentioned: (messageId: string) => boolean): boolean;
|
|
57
|
+
/** Per filter. Measured on production as the agent, the most-named identity there: 700 events in 90 days. */
|
|
58
|
+
export declare const MEMBERSHIP_LIMIT = 1000;
|
|
59
|
+
/** The read horizon, in seconds: nothing before it can light a dot. */
|
|
60
|
+
export declare const HORIZON_SECONDS: number;
|
|
61
|
+
/** The three filters that find every file the viewer may be a member of (§11.8), bounded by the horizon. */
|
|
62
|
+
export declare function membershipQueries(pubkey: string, nowSeconds: number, limit?: number): Record<string, unknown>[];
|
|
63
|
+
/** What the relay says the viewer is a member of, within the horizon. */
|
|
64
|
+
export interface MembershipRead {
|
|
65
|
+
/** Every candidate file, folded: the ones the viewer is in and the ones they left. */
|
|
66
|
+
files: ReadonlyMap<string, Membership>;
|
|
67
|
+
/** Ids of the messages whose content names the viewer. */
|
|
68
|
+
mentioned: ReadonlySet<string>;
|
|
69
|
+
/** Unix seconds a created file's membership starts at — the horizon's start. */
|
|
70
|
+
floor: number;
|
|
71
|
+
}
|
|
72
|
+
/** The address's author, or undefined when it is not a file address. */
|
|
73
|
+
export declare function authorOfAddress(address: string): string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Fold what {@link membershipQueries} returned. Pure: the clock is `nowSeconds`.
|
|
76
|
+
*
|
|
77
|
+
* A file's address names its author, so a file the viewer created needs no
|
|
78
|
+
* query: a candidate whose address is theirs is folded with its root added,
|
|
79
|
+
* dated to the horizon's start — the earliest the viewer could be told about —
|
|
80
|
+
* and a leave of theirs among the changes still takes them off. Membership the
|
|
81
|
+
* horizon hides lapses for this reader and comes back with the next event
|
|
82
|
+
* naming the viewer (§11.8 *The fold*).
|
|
83
|
+
*/
|
|
84
|
+
export declare function foldMemberships(pubkey: string, events: readonly SignedEvent[], nowSeconds: number): MembershipRead;
|
|
85
|
+
/**
|
|
86
|
+
* The terms a stream is judged on, from the membership read and the muted set.
|
|
87
|
+
*
|
|
88
|
+
* A file is a member by the fold, else by authorship (a file the viewer
|
|
89
|
+
* created is theirs unless a leave of theirs says otherwise, and a leave is
|
|
90
|
+
* among the files read). Anything that is not a file address — a Folder's
|
|
91
|
+
* general stream — has nothing to read (Miky, 2026-10-01): nobody is a member
|
|
92
|
+
* of it, so it lights only for a message that names the viewer.
|
|
93
|
+
*/
|
|
94
|
+
export declare function streamTermsOf(key: string, read: Pick<MembershipRead, 'files' | 'floor'>, me: string | undefined, muted: ReadonlySet<string>): StreamTerms;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the horizon's read has a word on the viewer in this file: an event
|
|
97
|
+
* naming them within it, or the file is theirs. Without one, "not a member"
|
|
98
|
+
* may only mean they joined before the horizon; a list that must say whose a
|
|
99
|
+
* file is reads those over all history.
|
|
100
|
+
*/
|
|
101
|
+
export declare function membershipJudges(key: string, read: Pick<MembershipRead, 'files'>, me: string | undefined): boolean;
|
|
102
|
+
//# sourceMappingURL=streamUnread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamUnread.d.ts","sourceRoot":"","sources":["../src/streamUnread.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAA+D,KAAK,UAAU,EAAE,MAAM,i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DAA0D;IAC1D,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC9B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGnE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,WAAW,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAqBlH;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,EAC7C,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,WAAW,CAOb;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAElH"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list row's dot — SPEC §11.8 over a stream's messages, for a reader that
|
|
3
|
+
* holds only who said what and when, never the bodies.
|
|
4
|
+
*
|
|
5
|
+
* Moved here from Peek (SHIPS-2) so Peek's Topics and Ship's Topics judge a
|
|
6
|
+
* topic's dot by one rule: which files the viewer is a member of, read from
|
|
7
|
+
* the relay and folded ({@link membershipQueries}, {@link foldMemberships}),
|
|
8
|
+
* the terms that fold gives a stream ({@link streamTermsOf}), and whether any
|
|
9
|
+
* of the stream's messages is unread on them ({@link streamHasUnread}).
|
|
10
|
+
*
|
|
11
|
+
* The read state and the muted list are encrypted (NIP-44), so nothing here
|
|
12
|
+
* reads them: the app hands in the merged markers and the muted set it holds.
|
|
13
|
+
*/
|
|
14
|
+
import { encodeNpub } from '@estiva-app/protocol';
|
|
15
|
+
import { candidateFilesOf, membershipFilters, membershipOf, mentions } from './membership.js';
|
|
16
|
+
import { READ_STATE_HORIZON_DAYS, fileContext } from './readState.js';
|
|
17
|
+
import { isUnread } from './unread.js';
|
|
18
|
+
/**
|
|
19
|
+
* Is anything in this stream unread for the viewer — SPEC §11.8's four
|
|
20
|
+
* conditions over §11.3's markers, judged by {@link isUnread}.
|
|
21
|
+
*
|
|
22
|
+
* `context` is the stream's read-state context (§11.1): `fileContext(address)`
|
|
23
|
+
* for a file, `channelContext(uuid)` for a Folder's general stream. A message is
|
|
24
|
+
* judged against its thread's marker as well as the stream's (§11.3).
|
|
25
|
+
*
|
|
26
|
+
* The messages carry no body, so whether one *names the viewer* comes from
|
|
27
|
+
* `isMentioned` (the ids the membership read's `#p` filter returned) and is
|
|
28
|
+
* handed to the judge as the body it would have had. Without a marker, a file
|
|
29
|
+
* member is told from the second they joined; a Folder's own chat has no
|
|
30
|
+
* members here and lights only for a message that names the viewer, so
|
|
31
|
+
* absence there is the horizon (§11.6).
|
|
32
|
+
*/
|
|
33
|
+
export function streamHasUnread(messages, context, terms, frontier, isMentioned) {
|
|
34
|
+
const { me } = frontier;
|
|
35
|
+
if (!me)
|
|
36
|
+
return false;
|
|
37
|
+
// Only for a message that names the viewer, so a viewer without a hex key judges the rest.
|
|
38
|
+
const named = () => `nostr:${encodeNpub(me)}`;
|
|
39
|
+
const judge = {
|
|
40
|
+
stream: context,
|
|
41
|
+
me,
|
|
42
|
+
member: terms.member,
|
|
43
|
+
since: terms.since,
|
|
44
|
+
muted: terms.muted,
|
|
45
|
+
floor: frontier.nowSeconds - frontier.horizonSeconds,
|
|
46
|
+
};
|
|
47
|
+
for (const message of messages) {
|
|
48
|
+
const root = message.root === message.id ? undefined : message.root;
|
|
49
|
+
const unread = isUnread({ id: message.id, pubkey: message.by, kind: 1111, created_at: message.at, tags: [], content: isMentioned(message.id) ? named() : '' }, root, frontier.merged, judge);
|
|
50
|
+
if (unread)
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
/** Per filter. Measured on production as the agent, the most-named identity there: 700 events in 90 days. */
|
|
56
|
+
export const MEMBERSHIP_LIMIT = 1000;
|
|
57
|
+
/** The read horizon, in seconds: nothing before it can light a dot. */
|
|
58
|
+
export const HORIZON_SECONDS = READ_STATE_HORIZON_DAYS * 24 * 60 * 60;
|
|
59
|
+
/** The three filters that find every file the viewer may be a member of (§11.8), bounded by the horizon. */
|
|
60
|
+
export function membershipQueries(pubkey, nowSeconds, limit = MEMBERSHIP_LIMIT) {
|
|
61
|
+
return membershipFilters(pubkey, nowSeconds - HORIZON_SECONDS).map((filter) => ({ ...filter, limit }));
|
|
62
|
+
}
|
|
63
|
+
/** The address's author, or undefined when it is not a file address. */
|
|
64
|
+
export function authorOfAddress(address) {
|
|
65
|
+
if (fileContext(address) === undefined)
|
|
66
|
+
return undefined;
|
|
67
|
+
return address.split(':')[1];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Fold what {@link membershipQueries} returned. Pure: the clock is `nowSeconds`.
|
|
71
|
+
*
|
|
72
|
+
* A file's address names its author, so a file the viewer created needs no
|
|
73
|
+
* query: a candidate whose address is theirs is folded with its root added,
|
|
74
|
+
* dated to the horizon's start — the earliest the viewer could be told about —
|
|
75
|
+
* and a leave of theirs among the changes still takes them off. Membership the
|
|
76
|
+
* horizon hides lapses for this reader and comes back with the next event
|
|
77
|
+
* naming the viewer (§11.8 *The fold*).
|
|
78
|
+
*/
|
|
79
|
+
export function foldMemberships(pubkey, events, nowSeconds) {
|
|
80
|
+
const floor = nowSeconds - HORIZON_SECONDS;
|
|
81
|
+
const byFile = new Map();
|
|
82
|
+
const mentioned = new Set();
|
|
83
|
+
for (const event of events) {
|
|
84
|
+
if (mentions(event, pubkey))
|
|
85
|
+
mentioned.add(event.id);
|
|
86
|
+
for (const file of candidateFilesOf(event)) {
|
|
87
|
+
const list = byFile.get(file);
|
|
88
|
+
if (list)
|
|
89
|
+
list.push(event);
|
|
90
|
+
else
|
|
91
|
+
byFile.set(file, [event]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const files = new Map();
|
|
95
|
+
for (const [file, held] of byFile) {
|
|
96
|
+
const [kind, , d] = file.split(':');
|
|
97
|
+
const own = authorOfAddress(file) === pubkey;
|
|
98
|
+
// The root the viewer created, when they did — ordered before everything else for the file.
|
|
99
|
+
const root = own ? [{ id: '', pubkey, kind: Number(kind), created_at: floor, tags: [['d', d ?? '']], content: '', sig: '' }] : [];
|
|
100
|
+
files.set(file, membershipOf(file, pubkey, [...root, ...held]));
|
|
101
|
+
}
|
|
102
|
+
return { files, mentioned, floor };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The terms a stream is judged on, from the membership read and the muted set.
|
|
106
|
+
*
|
|
107
|
+
* A file is a member by the fold, else by authorship (a file the viewer
|
|
108
|
+
* created is theirs unless a leave of theirs says otherwise, and a leave is
|
|
109
|
+
* among the files read). Anything that is not a file address — a Folder's
|
|
110
|
+
* general stream — has nothing to read (Miky, 2026-10-01): nobody is a member
|
|
111
|
+
* of it, so it lights only for a message that names the viewer.
|
|
112
|
+
*/
|
|
113
|
+
export function streamTermsOf(key, read, me, muted) {
|
|
114
|
+
const isMuted = muted.has(key);
|
|
115
|
+
if (fileContext(key) === undefined)
|
|
116
|
+
return { member: false, muted: isMuted };
|
|
117
|
+
const folded = read.files.get(key);
|
|
118
|
+
if (folded)
|
|
119
|
+
return { member: folded.member, since: folded.since, muted: isMuted };
|
|
120
|
+
if (me && authorOfAddress(key) === me)
|
|
121
|
+
return { member: true, since: read.floor, muted: isMuted };
|
|
122
|
+
return { member: false, muted: isMuted };
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Whether the horizon's read has a word on the viewer in this file: an event
|
|
126
|
+
* naming them within it, or the file is theirs. Without one, "not a member"
|
|
127
|
+
* may only mean they joined before the horizon; a list that must say whose a
|
|
128
|
+
* file is reads those over all history.
|
|
129
|
+
*/
|
|
130
|
+
export function membershipJudges(key, read, me) {
|
|
131
|
+
return read.files.has(key) || (!!me && authorOfAddress(key) === me);
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=streamUnread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamUnread.js","sourceRoot":"","sources":["../src/streamUnread.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAoB,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AAC9G,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AA8BtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAkC,EAClC,OAAe,EACf,KAAkB,EAClB,QAAwB,EACxB,WAA2C;IAE3C,MAAM,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAA;IACvB,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,2FAA2F;IAC3F,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,SAAS,UAAU,CAAC,EAAE,CAAC,EAAE,CAAA;IAC7C,MAAM,KAAK,GAAG;QACZ,MAAM,EAAE,OAAO;QACf,EAAE;QACF,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,cAAc;KACrD,CAAA;IACD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,OAAO,CA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AC,KAAK,EAAE,CAAC,CAAA;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@estiva-app/conversation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "The conversation rules of the Estiva SPEC (§6.2–§6.8, §11): comment and mention strengths, threading, the edit, reaction and attachment folds, NIP-22 comment and reply builders, drafts, NIP-RS read state, membership and unread. A convenience an app adopts, never a requirement.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/boxCard.ts
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
* a Folder, a person, a message and the file the conversation is on do not
|
|
10
10
|
* count, a link on words counts by its target, and a plain web link counts
|
|
11
11
|
* for nothing. ✕ takes it off (the box's to keep).
|
|
12
|
+
* - **An edit's card.** The message's own card while the edit still names its
|
|
13
|
+
* file, with its ✕, so it can be seen and taken off there; otherwise the
|
|
14
|
+
* default for a file the edit names first. A card taken off before, with ✕
|
|
15
|
+
* on the sent message, never comes back in an edit (Katerina, 2026-10-30,
|
|
16
|
+
* widget review item 36).
|
|
12
17
|
* - **The live part of each block link**, as the `part` the message will
|
|
13
18
|
* carry, one per file. A part counts as its file and draws instead of a card,
|
|
14
19
|
* so linking an issue and a block of a page shows the block and no card. A
|
|
@@ -21,6 +26,7 @@
|
|
|
21
26
|
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-link-on-words-counts-toward-the-card.md
|
|
22
27
|
*/
|
|
23
28
|
import {
|
|
29
|
+
cardsIn,
|
|
24
30
|
defaultCardOf,
|
|
25
31
|
toRenderTree,
|
|
26
32
|
valuesIn,
|
|
@@ -41,7 +47,12 @@ export interface BoxLinks {
|
|
|
41
47
|
values: string[]
|
|
42
48
|
/** The block links' parts, one per file, the first link's; none of the conversation's own file. */
|
|
43
49
|
parts: PartPointer[]
|
|
44
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The card under the box, before any ✕: for a new message, the file that
|
|
52
|
+
* gets the default card; for an edit (`folded` given), the message's own
|
|
53
|
+
* card while the edit still names it, else the default for a file the edit
|
|
54
|
+
* names first.
|
|
55
|
+
*/
|
|
45
56
|
card?: string
|
|
46
57
|
/**
|
|
47
58
|
* Every URL the text names, bare or as a link's target, once each: what the
|
|
@@ -59,6 +70,13 @@ export interface BoxLinkContext {
|
|
|
59
70
|
here?: string
|
|
60
71
|
/** An edit's: the values the message named before it, which get no default again. */
|
|
61
72
|
previous?: readonly string[]
|
|
73
|
+
/**
|
|
74
|
+
* An edit's: the message's folded `embed` set (`foldEmbeds`). Its card shows
|
|
75
|
+
* under the box while the edit names its file, and a value it holds as
|
|
76
|
+
* `none` — a card taken off with ✕ after sending — gets no default again,
|
|
77
|
+
* even named afresh.
|
|
78
|
+
*/
|
|
79
|
+
folded?: readonly Embed[]
|
|
62
80
|
}
|
|
63
81
|
|
|
64
82
|
/**
|
|
@@ -70,13 +88,14 @@ export function linkTargetOf(url: string, context: Pick<BoxLinkContext, 'resolve
|
|
|
70
88
|
return context.resolveLink(url) ?? context.blockOf(url)?.address
|
|
71
89
|
}
|
|
72
90
|
|
|
73
|
-
/** What a marker text names, and the one
|
|
91
|
+
/** What a marker text names, and the one card it shows under the box. */
|
|
74
92
|
export function boxLinksOf(text: string, context: BoxLinkContext): BoxLinks {
|
|
75
93
|
// valuesIn asks the resolver about exactly the URLs a reader counts (not one
|
|
76
94
|
// in a code span, nor one in a link's words), so recording its questions
|
|
77
95
|
// gives the URLs without a second URL finder.
|
|
78
96
|
const urls: string[] = []
|
|
79
|
-
const
|
|
97
|
+
const tree = text ? toRenderTree(text, 'marker') : []
|
|
98
|
+
const values = valuesIn(tree, (url) => {
|
|
80
99
|
if (!urls.includes(url)) urls.push(url)
|
|
81
100
|
return context.resolveLink(url)
|
|
82
101
|
})
|
|
@@ -86,7 +105,12 @@ export function boxLinksOf(text: string, context: BoxLinkContext): BoxLinks {
|
|
|
86
105
|
if (part && part.address !== context.here && !parts.has(part.address)) parts.set(part.address, part)
|
|
87
106
|
}
|
|
88
107
|
const kept = [...parts.values()].slice(0, MAX_PARTS)
|
|
89
|
-
const
|
|
108
|
+
const folded = context.folded ?? []
|
|
109
|
+
// The card a reader draws under the message once the edit is saved: the first its folded set holds for what the edit names.
|
|
110
|
+
const current = cardsIn(folded, tree, kept, context.resolveLink).find((embed) => embed.layout !== 'none')?.value
|
|
111
|
+
const takenOff = folded.filter((embed) => embed.layout === 'none').map((embed) => embed.value)
|
|
112
|
+
const previous = takenOff.length > 0 ? [...(context.previous ?? []), ...takenOff] : context.previous
|
|
113
|
+
const card = current ?? defaultCardOf(values, kept, { here: context.here, previous })
|
|
90
114
|
return { values, parts: kept, card, urls }
|
|
91
115
|
}
|
|
92
116
|
|
|
@@ -112,13 +136,18 @@ export function embedsToSend(links: Pick<BoxLinks, 'card'>, removed: ReadonlySet
|
|
|
112
136
|
|
|
113
137
|
/**
|
|
114
138
|
* The `embed` set an edit sends, or undefined to leave the message's as it
|
|
115
|
-
* was.
|
|
116
|
-
*
|
|
117
|
-
* set
|
|
118
|
-
*
|
|
139
|
+
* was. `links` is read with `previous` and `folded`, so its card is the
|
|
140
|
+
* message's own or the default for a file the edit names first. The message's
|
|
141
|
+
* own card, kept, leaves the set as it was; taken off with ✕ in the edit box,
|
|
142
|
+
* it is set `none`. A file named first adds its default; ✕ on that one writes
|
|
143
|
+
* nothing. Either way the whole folded set goes with it, since a set replaces
|
|
144
|
+
* (§13.6.2), and a card removed with ✕, before sending or after, stays removed.
|
|
119
145
|
*/
|
|
120
146
|
export function embedsToEdit(links: Pick<BoxLinks, 'card'>, removed: ReadonlySet<string>, folded: readonly Embed[] | undefined): Embed[] | undefined {
|
|
121
|
-
|
|
147
|
+
if (!links.card) return undefined
|
|
148
|
+
const own = (folded ?? []).some((embed) => embed.value === links.card && embed.layout !== 'none')
|
|
149
|
+
if (removed.has(links.card)) return own ? withCard(folded ?? [], links.card, 'none') : undefined
|
|
150
|
+
return own ? undefined : withCard(folded ?? [], links.card, 'detailed')
|
|
122
151
|
}
|
|
123
152
|
|
|
124
153
|
/** ✕ on a sent message's card: the folded set, with that card `none` and every other kept. */
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* apps: it imports no app's data layer, opens no socket, and takes every
|
|
13
13
|
* environment touch — the relay read, the clock, storage — as a parameter.
|
|
14
14
|
*/
|
|
15
|
-
export const CONVERSATION_VERSION = '0.
|
|
15
|
+
export const CONVERSATION_VERSION = '0.25.0'
|
|
16
16
|
|
|
17
17
|
export {
|
|
18
18
|
KIND_MESSAGE,
|
|
@@ -93,13 +93,17 @@ export {
|
|
|
93
93
|
FILE_TIER,
|
|
94
94
|
fileReference,
|
|
95
95
|
MESSAGE_TIER,
|
|
96
|
+
messageCandidate,
|
|
96
97
|
rankReferences,
|
|
97
98
|
REFERENCE_CAPS,
|
|
98
99
|
referenceMatch,
|
|
99
100
|
referenceSearch,
|
|
101
|
+
referenceSectionsOf,
|
|
100
102
|
refMatch,
|
|
101
103
|
type RankedReferences,
|
|
104
|
+
type RankedSection,
|
|
102
105
|
type RankReferencesInput,
|
|
106
|
+
type ReferableMessage,
|
|
103
107
|
type ReferenceCandidate,
|
|
104
108
|
type ReferenceSearch,
|
|
105
109
|
type ReferenceSearchFn,
|
|
@@ -181,11 +185,26 @@ export {
|
|
|
181
185
|
|
|
182
186
|
export { unreadIn, isUnread, type StreamJudge } from './unread.js'
|
|
183
187
|
|
|
188
|
+
export {
|
|
189
|
+
streamHasUnread,
|
|
190
|
+
MEMBERSHIP_LIMIT,
|
|
191
|
+
HORIZON_SECONDS,
|
|
192
|
+
membershipQueries,
|
|
193
|
+
authorOfAddress,
|
|
194
|
+
foldMemberships,
|
|
195
|
+
streamTermsOf,
|
|
196
|
+
membershipJudges,
|
|
197
|
+
type StreamMessage,
|
|
198
|
+
type StreamFrontier,
|
|
199
|
+
type StreamTerms,
|
|
200
|
+
type MembershipRead,
|
|
201
|
+
} from './streamUnread.js'
|
|
202
|
+
|
|
184
203
|
export { peopleNamedInText, newlyNamedPeople, mentionAddsFor, type FileText } from './textMentions.js'
|
|
185
204
|
|
|
186
205
|
export { KIND_MEMBERSHIP_LIST, namedProfilesOf, rosterOf, byName, mentionablePeople, type NamedProfile } from './people.js'
|
|
187
206
|
|
|
188
|
-
export { openingWords, referenceWord } from './openingWords.js'
|
|
207
|
+
export { messageWords, openingWords, referenceWord, type OpeningWordsOptions } from './openingWords.js'
|
|
189
208
|
|
|
190
209
|
export { archivedLine } from './archivedLine.js'
|
|
191
210
|
|