@estiva-app/interop 0.40.0 → 0.41.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 +26 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/projection.d.ts +3 -121
- package/dist/projection.d.ts.map +1 -1
- package/dist/projection.js +16 -259
- package/dist/projection.js.map +1 -1
- package/package.json +4 -2
- package/src/index.ts +0 -7
- package/src/projection.ts +16 -316
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,32 @@ 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.41.0 — 2026-09-30
|
|
10
|
+
|
|
11
|
+
**Manifests: nothing new to declare; how a comment is read changes in two
|
|
12
|
+
cases none of production's events is in** (CON-5). The conversation rules move
|
|
13
|
+
to `@estiva-app/conversation` 0.1.0, which is now a **peer dependency**
|
|
14
|
+
alongside protocol 0.24.0.
|
|
15
|
+
|
|
16
|
+
- **Removed, moved to `@estiva-app/conversation`:** `commentDecorationsOf`
|
|
17
|
+
(now `decorationsOf`, whose `edit` is the package's `EditFold` and whose
|
|
18
|
+
reactions follow SPEC §6.6 as decided 2026-09-29 — last `e`, empty is `+`,
|
|
19
|
+
one per `(target, pubkey, emoji)` — with the event cut reported as
|
|
20
|
+
`reactionEventsCut`), `editTargetOf`, `REACTION_HORIZON`, and the types
|
|
21
|
+
`CommentDecoration`, `CommentDecorations`, `CommentReaction`,
|
|
22
|
+
`CommentResolution`.
|
|
23
|
+
- **A reply is never a root** (§6.4). `comments` and `conversationsOf` no
|
|
24
|
+
longer list an event carrying a reply `e` — a `kind:1111` whose `e` differs
|
|
25
|
+
from its `E`, or a `kind:9` with any `e` — whatever `a` it carries. 0 on
|
|
26
|
+
production (§6.9).
|
|
27
|
+
- **A `kind:9` is a comment only when the owner declares `9`** among its
|
|
28
|
+
comment kinds (`emits.kind` or `emits.alsoRead`), which is what this package
|
|
29
|
+
already queried by; the rule now lives in `isCommentOn`'s `declaredKinds`,
|
|
30
|
+
so an app reading without interop applies the same one.
|
|
31
|
+
- **`ts` is trusted only when `floor(ts / 1000) == created_at`** in every
|
|
32
|
+
change and comment fold (§6.2, clarified 2026-09-29). This package accepted
|
|
33
|
+
±1 s; all 3,470 events carrying `ts` on production agree exactly.
|
|
34
|
+
|
|
9
35
|
## 0.40.0 — 2026-09-30
|
|
10
36
|
|
|
11
37
|
**Manifests: nothing new to declare, and one declaration is read in one more
|
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, resolveActingManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, ARCHIVED_FIELD, isArchived, archiveImpact, type Archive, type ArchiveImpact, type ArchiveReadOptions, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, type Aspect, commentKindsOf, conversationCountsOf, conversationsOf, type ConversationMessage, threadsOf, type Threads, CONVERSATION_LIMIT,
|
|
27
|
+
export { resolveManifest, resolveActingManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, ARCHIVED_FIELD, isArchived, archiveImpact, type Archive, type ArchiveImpact, type ArchiveReadOptions, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, type Aspect, commentKindsOf, conversationCountsOf, conversationsOf, type ConversationMessage, threadsOf, type Threads, CONVERSATION_LIMIT, buildActionEvent, buildActionEvents, type ActionEventArgs, 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 ProseFormat, 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.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,KAAK,MAAM,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,KAAK,mBAAmB,EACxB,SAAS,EACT,KAAK,OAAO,EACZ,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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AY,EACZ,iBAAiB,EACjB,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,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, resolveActingManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, ARCHIVED_FIELD, isArchived, archiveImpact, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, commentKindsOf, conversationCountsOf, conversationsOf, threadsOf, CONVERSATION_LIMIT,
|
|
27
|
+
export { resolveManifest, resolveActingManifest, resolveForeignObject, resolveForeignObjects, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, topLevelFolders, ARCHIVED_FIELD, isArchived, archiveImpact, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, commentKindsOf, conversationCountsOf, conversationsOf, threadsOf, CONVERSATION_LIMIT, buildActionEvent, buildActionEvents, 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.
|
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,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EAIb,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,SAAS,EAET,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,EAIb,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,SAAS,EAET,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAEjB,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,EAkBnB,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,EACZ,iBAAiB,GAIlB,MAAM,cAAc,CAAA;AAErB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
|
package/dist/projection.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* thing the whole exercise argues against.
|
|
14
14
|
*/
|
|
15
15
|
import { type AddressPointer } from '@estiva-app/protocol';
|
|
16
|
-
import { type
|
|
16
|
+
import { type Profile, type SignedEvent } from '@estiva-app/protocol';
|
|
17
17
|
import { BLOCK_DOCUMENT_FORMAT } from '@estiva-app/protocol';
|
|
18
18
|
import { type FolderRef } from './folders.js';
|
|
19
19
|
/** Query the relay. Returns matching events; shape mirrors the HTTP bridge. */
|
|
@@ -201,7 +201,8 @@ export interface ConversationMessage {
|
|
|
201
201
|
* on another file, a `kind:9` whose body names this one — and those are
|
|
202
202
|
* *Mentioned in*, which §6.4 says MUST NOT be presented as the file's own
|
|
203
203
|
* discussion. A badge counting them said "3" beside an issue with one comment.
|
|
204
|
-
* See `isCommentOn` for the per-kind rule
|
|
204
|
+
* See `@estiva-app/conversation`'s `isCommentOn` for the per-kind rule, which
|
|
205
|
+
* this passes the owner's declared comment kinds (§7.3).
|
|
205
206
|
*/
|
|
206
207
|
export declare function conversationsOf(files: ForeignObject[], query: QueryFn,
|
|
207
208
|
/** Warm from the read that produced these files; see {@link ProjectionCache}. */
|
|
@@ -246,125 +247,6 @@ export declare function threadsOf(
|
|
|
246
247
|
reference: string, rootIds: readonly string[], query: QueryFn, cache?: ProjectionCache,
|
|
247
248
|
/** How many replies, across every thread, one read asks for. */
|
|
248
249
|
limit?: number): Promise<Threads>;
|
|
249
|
-
/**
|
|
250
|
-
* How many targets a reaction read asks about — SPEC §6.6, decided by CON-1.
|
|
251
|
-
*
|
|
252
|
-
* A `kind:7` carries no `h` and no `a`, so reactions are found only by asking
|
|
253
|
-
* for the ids on screen, and the number asked for is a horizon every reader
|
|
254
|
-
* shares: two apps with different N disagree about a count, legitimately and
|
|
255
|
-
* unfixably. The value is the specification's, not this package's.
|
|
256
|
-
*/
|
|
257
|
-
export declare const REACTION_HORIZON = 100;
|
|
258
|
-
/** A `kind:7` on a comment. */
|
|
259
|
-
export interface CommentReaction {
|
|
260
|
-
id: string;
|
|
261
|
-
emoji: string;
|
|
262
|
-
by: string;
|
|
263
|
-
at: number;
|
|
264
|
-
}
|
|
265
|
-
/** A `kind:9101` resolution assertion on a comment (PEEK-128). */
|
|
266
|
-
export interface CommentResolution {
|
|
267
|
-
id: string;
|
|
268
|
-
action: 'resolved' | 'reopened';
|
|
269
|
-
by: string;
|
|
270
|
-
at: number;
|
|
271
|
-
/** The assertion's free text, when it carried one. */
|
|
272
|
-
message?: string;
|
|
273
|
-
/** The reply that carried the resolution, when the writer named one. */
|
|
274
|
-
supportingEventId?: string;
|
|
275
|
-
}
|
|
276
|
-
/** What has been done to one comment since it was written. */
|
|
277
|
-
export interface CommentDecoration {
|
|
278
|
-
/**
|
|
279
|
-
* The newest `kind:40003` — the body to show, and when. RFC 0.4 §7.2.1: a
|
|
280
|
-
* reader MUST be told the body changed, so this is kept beside the original
|
|
281
|
-
* rather than folded over it; the consumer draws the marker.
|
|
282
|
-
*
|
|
283
|
-
* When the caller passes the target's `body`, `at` and `by` are those of the
|
|
284
|
-
* last edit that **changed** the body — content not byte-identical to the
|
|
285
|
-
* body it replaced — and `edit` is absent when none did (§7.2.1, amended
|
|
286
|
-
* 2026-09-23, CON-5: the mark is about the body). `body` is always the newest
|
|
287
|
-
* edit's content. Without `body` it is the newest edit, as before.
|
|
288
|
-
*/
|
|
289
|
-
edit?: {
|
|
290
|
-
body: string;
|
|
291
|
-
at: number;
|
|
292
|
-
by: string;
|
|
293
|
-
};
|
|
294
|
-
/**
|
|
295
|
-
* The `imeta` set of the newest edit that carries at least one — RFC 0.4
|
|
296
|
-
* §7.2.1 as amended 2026-09-23 (CON-5). A set replaces the target's own; it
|
|
297
|
-
* does not append. Absent when no edit carries one, in which case the
|
|
298
|
-
* target's own attachments stand: an edit with no `imeta` means "unchanged".
|
|
299
|
-
*/
|
|
300
|
-
attachments?: Imeta[];
|
|
301
|
-
/** Every reaction found, in the order the relay holds them. Empty inside the horizon means none. */
|
|
302
|
-
reactions: CommentReaction[];
|
|
303
|
-
/** Oldest first; the last one is the current state. Empty means never resolved. */
|
|
304
|
-
resolutions: CommentResolution[];
|
|
305
|
-
}
|
|
306
|
-
/** The answer of {@link commentDecorationsOf}. */
|
|
307
|
-
export interface CommentDecorations {
|
|
308
|
-
/** Keyed by comment id. A target nothing happened to is present, with nothing in it. */
|
|
309
|
-
byId: Record<string, CommentDecoration>;
|
|
310
|
-
/**
|
|
311
|
-
* How many of the targets were **not** asked about reactions, because they
|
|
312
|
-
* fell outside the horizon. SPEC §6.6 makes reporting this a MUST: a cap
|
|
313
|
-
* nobody can see is indistinguishable from "nobody reacted".
|
|
314
|
-
*/
|
|
315
|
-
reactionTargetsOmitted: number;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* The message a `kind:40003` edits: **the first `e` whose value is 64 hex,
|
|
319
|
-
* marker ignored**, lowercased (SPEC §6.8, PEE-38). That is exactly the event
|
|
320
|
-
* whose ownership the relay checked (`validate_edit_ownership`), and a reader
|
|
321
|
-
* MUST NOT apply an edit to any other `e` — nothing refuses an edit carrying a
|
|
322
|
-
* second one, so `['e', <own>, '', 'mention'], ['e', <victim>]` is accepted on
|
|
323
|
-
* the writer's own message and must not be drawn on the victim's.
|
|
324
|
-
*
|
|
325
|
-
* Undefined when there is none, which the relay refuses; a reader holding one
|
|
326
|
-
* anyway applies it nowhere.
|
|
327
|
-
*/
|
|
328
|
-
export declare function editTargetOf(event: {
|
|
329
|
-
tags: readonly (readonly string[])[];
|
|
330
|
-
}): string | undefined;
|
|
331
|
-
/**
|
|
332
|
-
* What has been done to a set of comments — edits, reactions, resolutions — in
|
|
333
|
-
* one request, read by `#e`.
|
|
334
|
-
*
|
|
335
|
-
* **A second round trip, and that is why this is a function rather than part of
|
|
336
|
-
* {@link resolveForeignObject}.** Everything that read returns is addressed by
|
|
337
|
-
* `#a`, so it arrives with the root. An edit (`kind:40003`), a reaction
|
|
338
|
-
* (`kind:7`) and a resolution (`kind:9101`) name the *comment* by `e` and not
|
|
339
|
-
* the file, so they cannot be asked for until the comment ids are known. A
|
|
340
|
-
* widget that never draws comments should not pay for that, so a consumer
|
|
341
|
-
* that draws a conversation asks here with the ids it has — the roots off the
|
|
342
|
-
* object, the replies off its thread read — and pays once for both.
|
|
343
|
-
*
|
|
344
|
-
* Three rules, each from the ticket that established it:
|
|
345
|
-
*
|
|
346
|
-
* - **Edits fold newest-wins** (CON-8). The original stays on the relay and so
|
|
347
|
-
* does every edit; the fold is the reader's, and this is it. Attachments
|
|
348
|
-
* fold separately (CON-5): the newest edit carrying `imeta` sets them.
|
|
349
|
-
* - **Reactions have a horizon of {@link REACTION_HORIZON} targets** (SPEC
|
|
350
|
-
* §6.6, CON-1) — the *newest* targets by `at`, one budget across whatever
|
|
351
|
-
* id spaces the caller mixes, and the number left out is reported. Edits
|
|
352
|
-
* and resolutions have no horizon: they are one event per change, not one
|
|
353
|
-
* per reader.
|
|
354
|
-
* - **A resolution is a `kind:9101` carrying `t=resolution`** (PEEK-128); its
|
|
355
|
-
* `action` tag is the state, its content the rationale, and a second `e`
|
|
356
|
-
* marked `support` names the reply that carried it.
|
|
357
|
-
*
|
|
358
|
-
* Nothing here checks who wrote an edit against who wrote the comment. The
|
|
359
|
-
* relay adjudicates writes; a `40003` it stored is one it accepted — **for
|
|
360
|
-
* the `e` it checked**, which is why an edit lands only on
|
|
361
|
-
* {@link editTargetOf} and never on another `e` it carries.
|
|
362
|
-
*/
|
|
363
|
-
export declare function commentDecorationsOf(targets: readonly {
|
|
364
|
-
id: string;
|
|
365
|
-
at: number;
|
|
366
|
-
body?: string;
|
|
367
|
-
}[], query: QueryFn): Promise<CommentDecorations>;
|
|
368
250
|
/** How the owning app says its records should be read. */
|
|
369
251
|
interface RecordsRule {
|
|
370
252
|
changeKind: number;
|
package/dist/projection.d.ts.map
CHANGED
|
@@ -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,EAAE,MAAM,sBAAsB,CAAA;AAExG,OAAO,EAEL,qBAAqB,EAItB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAE5E,+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,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAE7D,4DAA4D;AAC5D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,QAAc,CA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;QAAC,EAAE,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,EAAE,CAAA;CACvF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,eAAe,CAAA;CAAO,GACnE,OAAO,CAAC,aAAa,CAAC,CAoDxB;AA6LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO;AACd,wEAAwE;AACxE,YAAY,CAAC,EAAE,QAAQ;AACvB,6EAA6E;AAC7E,KAAK,CAAC,EAAE,eAAe,EACvB,OAAO,GAAE;IACP;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CACrB,GACL,OAAO,CAAC,cAAc,CAAC,CAiOzB"}
|
package/dist/projection.js
CHANGED
|
@@ -12,11 +12,19 @@
|
|
|
12
12
|
* anything: it becomes an integration written against one app, which is the
|
|
13
13
|
* thing the whole exercise argues against.
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { decodeNevent, encodeNaddr, encodeNevent, pointerToAddress, referenceToPointer } from '@estiva-app/protocol';
|
|
16
|
+
import { parseProfile } from '@estiva-app/protocol';
|
|
17
17
|
import { MAX_FILTERS_PER_QUERY, RELAY_PAGE_CEILING } from '@estiva-app/protocol';
|
|
18
18
|
import { attachmentsInDocument, BLOCK_DOCUMENT_FORMAT, CONTENT_FORMAT_TAG, imetaTag, parseBlockDocument, } from '@estiva-app/protocol';
|
|
19
19
|
import { planPlaceFile, planUnlistFile } from './folders.js';
|
|
20
|
+
/*
|
|
21
|
+
SPEC §6.4's comment strength and §6.3's ordering are the conversation
|
|
22
|
+
package's (CON-5): one copy of each rule, read here for a file's `comments`,
|
|
23
|
+
`conversationsOf` and every change fold. Its `isCommentOn` is stricter than
|
|
24
|
+
the copy that lived here — a `kind:9` is never a comment (CON-20 migrated
|
|
25
|
+
them), a reply is never a root, and `ts` is trusted only inside its own second.
|
|
26
|
+
*/
|
|
27
|
+
import { byOrder, isCommentOn, orderingMs } from '@estiva-app/conversation';
|
|
20
28
|
/** The default: one kind:0 query, straight to the relay. */
|
|
21
29
|
/**
|
|
22
30
|
* How long a *name* may be believed.
|
|
@@ -247,7 +255,8 @@ function rootOf(event) {
|
|
|
247
255
|
* on another file, a `kind:9` whose body names this one — and those are
|
|
248
256
|
* *Mentioned in*, which §6.4 says MUST NOT be presented as the file's own
|
|
249
257
|
* discussion. A badge counting them said "3" beside an issue with one comment.
|
|
250
|
-
* See `isCommentOn` for the per-kind rule
|
|
258
|
+
* See `@estiva-app/conversation`'s `isCommentOn` for the per-kind rule, which
|
|
259
|
+
* this passes the owner's declared comment kinds (§7.3).
|
|
251
260
|
*/
|
|
252
261
|
export async function conversationsOf(files, query,
|
|
253
262
|
/** Warm from the read that produced these files; see {@link ProjectionCache}. */
|
|
@@ -296,6 +305,7 @@ cache) {
|
|
|
296
305
|
if (asked.length === 0)
|
|
297
306
|
return {};
|
|
298
307
|
const refOf = new Map(asked.map((a) => [a.address, a.ref]));
|
|
308
|
+
const kindsOf = new Map(asked.map((a) => [a.address, a.filter.kinds]));
|
|
299
309
|
const conversations = {};
|
|
300
310
|
for (const a of asked)
|
|
301
311
|
conversations[a.ref] = [];
|
|
@@ -323,7 +333,7 @@ cache) {
|
|
|
323
333
|
neither when it merely mentions them. `isCommentOn` is §6.4's rule.
|
|
324
334
|
*/
|
|
325
335
|
const ref = event.tags
|
|
326
|
-
.filter((t) => t[0] === 'a' && t[1] && refOf.has(t[1]) && isCommentOn(event, t[1]))
|
|
336
|
+
.filter((t) => t[0] === 'a' && t[1] && refOf.has(t[1]) && isCommentOn(event, t[1], kindsOf.get(t[1])))
|
|
327
337
|
.map((t) => refOf.get(t[1]))
|
|
328
338
|
.find((found) => found !== undefined);
|
|
329
339
|
if (ref !== undefined) {
|
|
@@ -417,186 +427,6 @@ limit = CONVERSATION_LIMIT) {
|
|
|
417
427
|
}
|
|
418
428
|
return { roots, replies };
|
|
419
429
|
}
|
|
420
|
-
/**
|
|
421
|
-
* How many targets a reaction read asks about — SPEC §6.6, decided by CON-1.
|
|
422
|
-
*
|
|
423
|
-
* A `kind:7` carries no `h` and no `a`, so reactions are found only by asking
|
|
424
|
-
* for the ids on screen, and the number asked for is a horizon every reader
|
|
425
|
-
* shares: two apps with different N disagree about a count, legitimately and
|
|
426
|
-
* unfixably. The value is the specification's, not this package's.
|
|
427
|
-
*/
|
|
428
|
-
export const REACTION_HORIZON = 100;
|
|
429
|
-
/** The three kinds a comment's decorations come in. Numbers, and here for the same reason `KIND_BARE_FILE` is. */
|
|
430
|
-
const KIND_REACTION = 7;
|
|
431
|
-
const KIND_ASSERTION = 9101;
|
|
432
|
-
const KIND_MESSAGE_EDIT = 40003;
|
|
433
|
-
/**
|
|
434
|
-
* The message a `kind:40003` edits: **the first `e` whose value is 64 hex,
|
|
435
|
-
* marker ignored**, lowercased (SPEC §6.8, PEE-38). That is exactly the event
|
|
436
|
-
* whose ownership the relay checked (`validate_edit_ownership`), and a reader
|
|
437
|
-
* MUST NOT apply an edit to any other `e` — nothing refuses an edit carrying a
|
|
438
|
-
* second one, so `['e', <own>, '', 'mention'], ['e', <victim>]` is accepted on
|
|
439
|
-
* the writer's own message and must not be drawn on the victim's.
|
|
440
|
-
*
|
|
441
|
-
* Undefined when there is none, which the relay refuses; a reader holding one
|
|
442
|
-
* anyway applies it nowhere.
|
|
443
|
-
*/
|
|
444
|
-
export function editTargetOf(event) {
|
|
445
|
-
const tag = event.tags.find((t) => t[0] === 'e' && typeof t[1] === 'string' && /^[0-9a-fA-F]{64}$/.test(t[1]));
|
|
446
|
-
return tag?.[1].toLowerCase();
|
|
447
|
-
}
|
|
448
|
-
/** Ids per `#e` filter. A comfortable fraction of the relay's page, so one filter's answer is never cut. */
|
|
449
|
-
const DECORATION_TARGETS_PER_FILTER = 100;
|
|
450
|
-
/**
|
|
451
|
-
* What has been done to a set of comments — edits, reactions, resolutions — in
|
|
452
|
-
* one request, read by `#e`.
|
|
453
|
-
*
|
|
454
|
-
* **A second round trip, and that is why this is a function rather than part of
|
|
455
|
-
* {@link resolveForeignObject}.** Everything that read returns is addressed by
|
|
456
|
-
* `#a`, so it arrives with the root. An edit (`kind:40003`), a reaction
|
|
457
|
-
* (`kind:7`) and a resolution (`kind:9101`) name the *comment* by `e` and not
|
|
458
|
-
* the file, so they cannot be asked for until the comment ids are known. A
|
|
459
|
-
* widget that never draws comments should not pay for that, so a consumer
|
|
460
|
-
* that draws a conversation asks here with the ids it has — the roots off the
|
|
461
|
-
* object, the replies off its thread read — and pays once for both.
|
|
462
|
-
*
|
|
463
|
-
* Three rules, each from the ticket that established it:
|
|
464
|
-
*
|
|
465
|
-
* - **Edits fold newest-wins** (CON-8). The original stays on the relay and so
|
|
466
|
-
* does every edit; the fold is the reader's, and this is it. Attachments
|
|
467
|
-
* fold separately (CON-5): the newest edit carrying `imeta` sets them.
|
|
468
|
-
* - **Reactions have a horizon of {@link REACTION_HORIZON} targets** (SPEC
|
|
469
|
-
* §6.6, CON-1) — the *newest* targets by `at`, one budget across whatever
|
|
470
|
-
* id spaces the caller mixes, and the number left out is reported. Edits
|
|
471
|
-
* and resolutions have no horizon: they are one event per change, not one
|
|
472
|
-
* per reader.
|
|
473
|
-
* - **A resolution is a `kind:9101` carrying `t=resolution`** (PEEK-128); its
|
|
474
|
-
* `action` tag is the state, its content the rationale, and a second `e`
|
|
475
|
-
* marked `support` names the reply that carried it.
|
|
476
|
-
*
|
|
477
|
-
* Nothing here checks who wrote an edit against who wrote the comment. The
|
|
478
|
-
* relay adjudicates writes; a `40003` it stored is one it accepted — **for
|
|
479
|
-
* the `e` it checked**, which is why an edit lands only on
|
|
480
|
-
* {@link editTargetOf} and never on another `e` it carries.
|
|
481
|
-
*/
|
|
482
|
-
export async function commentDecorationsOf(targets, query) {
|
|
483
|
-
const byId = {};
|
|
484
|
-
const unique = new Map();
|
|
485
|
-
for (const t of targets)
|
|
486
|
-
if (!unique.has(t.id))
|
|
487
|
-
unique.set(t.id, t.at);
|
|
488
|
-
for (const id of unique.keys())
|
|
489
|
-
byId[id] = { reactions: [], resolutions: [] };
|
|
490
|
-
if (unique.size === 0)
|
|
491
|
-
return { byId, reactionTargetsOmitted: 0 };
|
|
492
|
-
const ids = [...unique.keys()];
|
|
493
|
-
// Newest first, ties on the higher id so the cut is stable between reads.
|
|
494
|
-
const forReactions = [...unique]
|
|
495
|
-
.sort((a, b) => b[1] - a[1] || (a[0] > b[0] ? -1 : 1))
|
|
496
|
-
.slice(0, REACTION_HORIZON)
|
|
497
|
-
.map(([id]) => id);
|
|
498
|
-
const filters = [];
|
|
499
|
-
const chunked = (list) => {
|
|
500
|
-
const out = [];
|
|
501
|
-
for (let i = 0; i < list.length; i += DECORATION_TARGETS_PER_FILTER) {
|
|
502
|
-
out.push(list.slice(i, i + DECORATION_TARGETS_PER_FILTER));
|
|
503
|
-
}
|
|
504
|
-
return out;
|
|
505
|
-
};
|
|
506
|
-
for (const chunk of chunked(ids)) {
|
|
507
|
-
filters.push({ kinds: [KIND_MESSAGE_EDIT, KIND_ASSERTION], '#e': chunk, limit: RELAY_PAGE_CEILING });
|
|
508
|
-
}
|
|
509
|
-
for (const chunk of chunked(forReactions)) {
|
|
510
|
-
filters.push({ kinds: [KIND_REACTION], '#e': chunk, limit: RELAY_PAGE_CEILING });
|
|
511
|
-
}
|
|
512
|
-
const seen = new Set();
|
|
513
|
-
const edits = new Map();
|
|
514
|
-
const bodies = new Map();
|
|
515
|
-
for (const t of targets)
|
|
516
|
-
if (t.body !== undefined && !bodies.has(t.id))
|
|
517
|
-
bodies.set(t.id, t.body);
|
|
518
|
-
for (let start = 0; start < filters.length; start += MAX_FILTERS_PER_QUERY) {
|
|
519
|
-
const events = await query(filters.slice(start, start + MAX_FILTERS_PER_QUERY));
|
|
520
|
-
for (const event of events) {
|
|
521
|
-
if (seen.has(event.id))
|
|
522
|
-
continue;
|
|
523
|
-
seen.add(event.id);
|
|
524
|
-
/*
|
|
525
|
-
An edit's target is the one the relay checked ownership of, and no
|
|
526
|
-
other (SPEC §6.8, PEE-38): see {@link editTargetOf}. For the rest, the
|
|
527
|
-
`e` that names one of *our* targets — a resolution carries a second `e`
|
|
528
|
-
for its supporting reply, so its first `e` is not necessarily the target.
|
|
529
|
-
`hasOwn`, not `in`: an `e` of `constructor` is anybody's to write, and
|
|
530
|
-
`in` finds it on the prototype.
|
|
531
|
-
*/
|
|
532
|
-
const ours = (id) => id !== undefined && Object.hasOwn(byId, id);
|
|
533
|
-
const target = event.kind === KIND_MESSAGE_EDIT
|
|
534
|
-
? editTargetOf(event)
|
|
535
|
-
: event.tags.find((t) => t[0] === 'e' && ours(t[1]) && !t[3])?.[1];
|
|
536
|
-
if (!ours(target))
|
|
537
|
-
continue;
|
|
538
|
-
const into = byId[target];
|
|
539
|
-
if (event.kind === KIND_MESSAGE_EDIT) {
|
|
540
|
-
edits.set(target, [...(edits.get(target) ?? []), event]);
|
|
541
|
-
}
|
|
542
|
-
else if (event.kind === KIND_REACTION) {
|
|
543
|
-
if (!forReactions.includes(target))
|
|
544
|
-
continue;
|
|
545
|
-
into.reactions.push({ id: event.id, emoji: event.content, by: event.pubkey, at: event.created_at });
|
|
546
|
-
}
|
|
547
|
-
else if (event.kind === KIND_ASSERTION) {
|
|
548
|
-
if (tagValue(event, 't') !== 'resolution')
|
|
549
|
-
continue;
|
|
550
|
-
const action = tagValue(event, 'action');
|
|
551
|
-
if (action !== 'resolved' && action !== 'reopened')
|
|
552
|
-
continue;
|
|
553
|
-
const support = event.tags.find((t) => t[0] === 'e' && t[3] === 'support')?.[1];
|
|
554
|
-
into.resolutions.push({
|
|
555
|
-
id: event.id,
|
|
556
|
-
action,
|
|
557
|
-
by: event.pubkey,
|
|
558
|
-
at: event.created_at,
|
|
559
|
-
...(event.content ? { message: event.content } : {}),
|
|
560
|
-
...(support ? { supportingEventId: support } : {}),
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
for (const [target, list] of edits) {
|
|
566
|
-
const ordered = [...list].sort(byOrder);
|
|
567
|
-
const into = byId[target];
|
|
568
|
-
const newest = ordered[ordered.length - 1];
|
|
569
|
-
let body = bodies.get(target);
|
|
570
|
-
if (body === undefined) {
|
|
571
|
-
into.edit = { body: newest.content, at: newest.created_at, by: newest.pubkey };
|
|
572
|
-
}
|
|
573
|
-
else {
|
|
574
|
-
// Replayed from the target's own body, so "byte-identical to the body it
|
|
575
|
-
// replaces" is judged against the body as it then stood.
|
|
576
|
-
let changed;
|
|
577
|
-
for (const edit of ordered) {
|
|
578
|
-
if (edit.content !== body)
|
|
579
|
-
changed = edit;
|
|
580
|
-
body = edit.content;
|
|
581
|
-
}
|
|
582
|
-
if (changed)
|
|
583
|
-
into.edit = { body: newest.content, at: changed.created_at, by: changed.pubkey };
|
|
584
|
-
}
|
|
585
|
-
for (let i = ordered.length - 1; i >= 0; i--) {
|
|
586
|
-
const set = imetaOf(ordered[i]);
|
|
587
|
-
if (set.length > 0) {
|
|
588
|
-
into.attachments = set;
|
|
589
|
-
break;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
const oldestFirst = (a, b) => a.at - b.at || (a.id < b.id ? -1 : 1);
|
|
594
|
-
for (const decoration of Object.values(byId)) {
|
|
595
|
-
decoration.reactions.sort(oldestFirst);
|
|
596
|
-
decoration.resolutions.sort(oldestFirst);
|
|
597
|
-
}
|
|
598
|
-
return { byId, reactionTargetsOmitted: ids.length - forReactions.length };
|
|
599
|
-
}
|
|
600
430
|
export const ACTION_EFFECTS = ['safe', 'writes', 'destructive'];
|
|
601
431
|
/** The declared format, when it is one this version writes. */
|
|
602
432
|
function proseFormatOf(declared) {
|
|
@@ -794,52 +624,6 @@ export function folderOf(root) {
|
|
|
794
624
|
* answered the way the relay answered it.
|
|
795
625
|
*/
|
|
796
626
|
const hasTagValue = (e, name, value) => e.tags.some((t) => t[0] === name && t[1] === value);
|
|
797
|
-
/** The addresses a body names by `nostr:naddr…`; a pointer that will not decode is prose. */
|
|
798
|
-
function namedInBody(body) {
|
|
799
|
-
const addresses = new Set();
|
|
800
|
-
for (const naddr of findNaddrs(body)) {
|
|
801
|
-
try {
|
|
802
|
-
addresses.add(pointerToAddress(decodeNaddr(naddr)));
|
|
803
|
-
}
|
|
804
|
-
catch {
|
|
805
|
-
// A malformed pointer is prose.
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
return addresses;
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
* Is this event a *comment* on the address, rather than a message elsewhere
|
|
812
|
-
* that merely names it?
|
|
813
|
-
*
|
|
814
|
-
* Both arrive by the object's `#a` read — the `a` tag is the index of every
|
|
815
|
-
* reference, whichever strength — and SPEC §6.4 says an app MUST NOT present
|
|
816
|
-
* the two as one list: a comment is the object's own discussion, a mention is
|
|
817
|
-
* *Mentioned in*. Until CON-15 this package handed the raw `#a` union to
|
|
818
|
-
* {@link resolveForeignObject}'s `comments` and {@link conversationsOf}, and
|
|
819
|
-
* a widget said "3" beside an issue with one comment and two mentions. The
|
|
820
|
-
* rule is §6.4's per-tag one, applied per kind (CON-13, CON-14):
|
|
821
|
-
*
|
|
822
|
-
* - A `kind:1111`'s uppercase `A` is the comment — NIP-22's thread root. One
|
|
823
|
-
* whose `A` is another file is that file's conversation; its `a` for this
|
|
824
|
-
* one is the index of a reference. One with no `A` at all is read by its
|
|
825
|
-
* `a`, the way §6.4 says to read it rather than drop the thread.
|
|
826
|
-
* - Any other comment kind has no `A`, so its `a` is read against its body.
|
|
827
|
-
* A `kind:9` whose body names the address is the index of that reference —
|
|
828
|
-
* what Peek writes for every `[`-menu reference in a topic message — and a
|
|
829
|
-
* mention. One whose body does not is the anchor of a comment written
|
|
830
|
-
* before REW-10 moved comments to `1111`, which is not replaceable and so
|
|
831
|
-
* reads as a comment for good.
|
|
832
|
-
*
|
|
833
|
-
* `commentDecorationsOf` is deliberately not behind this: a reaction or a
|
|
834
|
-
* status on a comment is about the *comment*, whatever that comment is about.
|
|
835
|
-
*/
|
|
836
|
-
function isCommentOn(event, address) {
|
|
837
|
-
if (event.kind === KIND_COMMENT) {
|
|
838
|
-
const roots = event.tags.filter((t) => t[0] === 'A' && t[1]);
|
|
839
|
-
return roots.length > 0 ? roots.some((t) => t[1] === address) : hasTagValue(event, 'a', address);
|
|
840
|
-
}
|
|
841
|
-
return hasTagValue(event, 'a', address) && !namedInBody(event.content).has(address);
|
|
842
|
-
}
|
|
843
627
|
/**
|
|
844
628
|
* A manifest event's `content`, or null when it is not parseable JSON.
|
|
845
629
|
*
|
|
@@ -1452,33 +1236,6 @@ export async function resolveActingManifest(pointer, declaredBy, query, cache) {
|
|
|
1452
1236
|
const creators = await creatorsOn(pointer.kind, query, cache);
|
|
1453
1237
|
return borrowedFrom(pointer.kind, owner, creators).find((creator) => creator.address === declaredBy) ?? null;
|
|
1454
1238
|
}
|
|
1455
|
-
/**
|
|
1456
|
-
* Ordering key for an append-only event, per the manifest's `records.order`.
|
|
1457
|
-
*
|
|
1458
|
-
* The manifest declares `["ts", "created_at", "id"]` and, crucially, the
|
|
1459
|
-
* condition under which `ts` may be believed: only when it agrees with
|
|
1460
|
-
* `created_at` to the second. `created_at` has one-second resolution and the
|
|
1461
|
-
* relay validates it, so a `ts` pinned inside that second inherits that
|
|
1462
|
-
* validation and can only refine ordering *within* it.
|
|
1463
|
-
*
|
|
1464
|
-
* Peek enforces that bound itself rather than trusting the writer. Under the
|
|
1465
|
-
* honour-system model nothing validates these events (RFC_UPDATES.md §3), so a
|
|
1466
|
-
* buggy or pushy client claiming a far-future `ts` would otherwise win every
|
|
1467
|
-
* fold forever — in Peek's rendering as much as in the owning app's.
|
|
1468
|
-
*/
|
|
1469
|
-
function orderingMs(event) {
|
|
1470
|
-
const raw = Number.parseInt(tagValue(event, 'ts') ?? '', 10);
|
|
1471
|
-
if (Number.isFinite(raw) && Math.abs(Math.floor(raw / 1000) - event.created_at) <= 1)
|
|
1472
|
-
return raw;
|
|
1473
|
-
return event.created_at * 1000;
|
|
1474
|
-
}
|
|
1475
|
-
/** Total order, oldest first. Ties break on the lower event id (NIP-01's rule). */
|
|
1476
|
-
function byOrder(a, b) {
|
|
1477
|
-
const [at, bt] = [orderingMs(a), orderingMs(b)];
|
|
1478
|
-
if (at !== bt)
|
|
1479
|
-
return at - bt;
|
|
1480
|
-
return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
|
|
1481
|
-
}
|
|
1482
1239
|
/** Replay change events into current field values. Last write wins per field. */
|
|
1483
1240
|
/**
|
|
1484
1241
|
* The fold rule a manifest declares, or one that folds nothing — PRO-6.
|
|
@@ -2529,10 +2286,10 @@ function assembleObject(plan, answered, childChanges = []) {
|
|
|
2529
2286
|
|
|
2530
2287
|
Then narrowed to §6.4's *comment* strength (CON-15): the `a` tag is also the
|
|
2531
2288
|
index of a mention, and a mention is not this object's discussion. See
|
|
2532
|
-
`isCommentOn` for the per-kind rule.
|
|
2289
|
+
`isCommentOn` (`@estiva-app/conversation`) for the per-kind rule.
|
|
2533
2290
|
*/
|
|
2534
2291
|
const comments = events
|
|
2535
|
-
.filter((e) => commentKinds.includes(e.kind) && isCommentOn(e, address))
|
|
2292
|
+
.filter((e) => commentKinds.includes(e.kind) && isCommentOn(e, address, commentKinds))
|
|
2536
2293
|
.sort(byOrder)
|
|
2537
2294
|
.map((e) => ({ id: e.id, author: e.pubkey, body: e.content, createdAt: e.created_at }));
|
|
2538
2295
|
const object = buildObject({
|