@onlyworlds/sdk 4.157.2 → 4.158.1

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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # For AI agents using @onlyworlds/sdk
2
2
 
3
- **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.119** (canonical 00.34.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.120** (canonical 00.34.00).
4
4
  This line is asserted by `codegen:check` in CI — if the pin moves and this file is not
5
5
  re-read against it, the check fails rather than letting this document rot quietly.
6
6
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.158.1] - 2026-11-13
9
+
10
+ ### Changed
11
+
12
+ - **`TOOLS` carries Subs.** The tools list is repinned at `0a7539c` (from `9452529`): Subs, a convoy-escort game whose Character captains the lead escort, is a listed row with an element door for a Character (`needs: "account"`; it skips room, hidden and proposed elements), so `openersFor` offers it beside a Character, and on no other element and no world. The Python package bakes the same list.
13
+
14
+ ## [4.158.0] - 2026-11-12
15
+
16
+ ### Added
17
+
18
+ - **`reportThreadsOf(narratives)`**, the report profile's rule 9 (schema-dist serial 120): reports grouped into threads by the `parent_narrative` they name, read as written. For each report, what its parent is (`none`, `report`, `board`, `missing`, `other` or `self`; `none` when the field is absent, null, no string or empty once trimmed, and a parent with content read as written); only reports are read, so a message that names a report is in no part of the answer; one group per parent that is a report (its thread) or a board entry (the talks under it), its reports ordered by `created_at` as messages are (an instant; equal times keep the list's order; unreadable times last); and a lint on a report that names itself or whose parent names another report the reader holds (a report that names itself reads as naming no parent, so one under it is no chain). A report and a board entry are each their pair and the room's mark; the reader never walks further up a chain and never orders by id. Its types `OwReportThreads`, `OwReportGroup`, `OwReportLint` and `OwReportParentKind`. The profile's fixture, 20 thread cases, is its own test, with edges the fixture leaves out.
19
+
20
+ ### Changed
21
+
22
+ - Schema repinned to schema-dist `v0.34.0-dist.120` (canonical 00.34.00 unchanged, no schema file moved, `views.json` still version 3). The report profile: a report that continues earlier work names the first report of that work in `parent_narrative`, and rule 9 tells a report's thread from a closed talk's by the parent's kind, a report or a board entry; its first fixture holds 20 thread cases, all read by `reportThreadsOf`. The views fixture's two references into the report page move down one line; its cases are replayed as before.
23
+ - The list filter's notes name the Pin list's `element=<id>` (served since 2026-11-12): `list('pin', { filter: { element: id }, expand: ['map'] })` gives an element its maps in one call, and `element: ''` lists the Pins placing nothing. It was already sent as given; only the words are new, and the unknown-key hint names a single link and a Pin's element.
24
+
8
25
  ## [4.157.2] - 2026-11-12
9
26
 
10
27
  ### Changed
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.119** — canonical schema **00.34.00**, published 2026-11-12.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.120** — canonical schema **00.34.00**, published 2026-11-12.
4
4
 
5
5
  GENERATED from the canonical schema YAML — do not hand-edit (regenerate: `python codegen/generate_types.py`).
6
6
  Written for both humans and AI agents reading this package locally.
@@ -1573,6 +1573,26 @@ var TOOLS = [
1573
1573
  "character"
1574
1574
  ]
1575
1575
  }
1576
+ },
1577
+ {
1578
+ "id": "subs",
1579
+ "name": "Subs",
1580
+ "url": "https://subs.onlyworlds.com",
1581
+ "client": "subs",
1582
+ "rung": "listed",
1583
+ "open": {
1584
+ "world": null,
1585
+ "element": "https://subs.onlyworlds.com/#/open/{world}/element/{id}",
1586
+ "needs": "account",
1587
+ "element_skips": [
1588
+ "room",
1589
+ "hidden",
1590
+ "proposed"
1591
+ ],
1592
+ "element_types": [
1593
+ "character"
1594
+ ]
1595
+ }
1576
1596
  }
1577
1597
  ];
1578
1598
 
package/dist/index.d.ts CHANGED
@@ -2149,6 +2149,7 @@ declare function unreadFor<T extends object>(messages: readonly T[], characterId
2149
2149
  * message whose chain leaves the given list is not in the thread unless its chain reached the root
2150
2150
  * first. A Note is in no thread: it is never listed, though a chain walks through its
2151
2151
  * `parent_narrative` like any other (a reply to a Note that answers the root is in the thread).
2152
+ * It reads messages; reports group by `reportThreadsOf`, which never walks a chain.
2152
2153
  */
2153
2154
  declare function threadOf<T extends object>(messages: readonly T[], rootId: string): T[];
2154
2155
  declare function noteOf(narratives: readonly object[], characterId: string, members: Members): string | null;
@@ -4051,13 +4052,17 @@ interface ListParams {
4051
4052
  * Accepted: `name` (exact), `name__icontains`, `supertype`, `subtype`,
4052
4053
  * `characters=<id>` (contains) on every type with a `characters` link (at schema
4053
4054
  * 0.30.1: collective, construct, event, narrative, relation, title), and each single link
4054
- * of the type (`parent_location`, `birthplace`, ...: the elements linking to that id). An
4055
+ * of the type (`parent_location`, `birthplace`, ...: the elements linking to that id), and on
4056
+ * the Pin list `element=<id>` (since 2026-11-12: the Pins that place that element, of any
4057
+ * type, so `list('pin', { filter: { element: id }, expand: ['map'] })` gives an element its
4058
+ * maps in one call). An
4055
4059
  * empty value is sent as `key=`, a filter of its own: `supertype: ''` lists the elements
4056
4060
  * with none, `characters: ''` a Message to everyone, a single link's the elements linking
4057
- * to nothing (until 4.108.1 it was dropped and the list came back whole). Any other key
4061
+ * to nothing, `element: ''` the Pins placing nothing (until 4.108.1 it was dropped and the
4062
+ * list came back whole). Any other key
4058
4063
  * 422s server-side with the list of filters in the message -- the client passes keys
4059
4064
  * through unchecked and lets the platform say so. (`__in`, `__gte`, `__lte` and
4060
- * `__isnull` are designed in keel's spec but not built; `ordering` 422s too.)
4065
+ * `__isnull` are designed in the API's spec but not built; `ordering` 422s too.)
4061
4066
  */
4062
4067
  filter?: Record<string, string | number | boolean>;
4063
4068
  /**
@@ -5985,6 +5990,57 @@ declare function recordMarkOf(element: unknown): OwRecordMark | null;
5985
5990
  */
5986
5991
  declare function recordsOf(characterId: string, elements: readonly unknown[]): OwRecord[];
5987
5992
 
5993
+ /** What a report's parent is: none served, a report, a board entry, an id whose element is not held, another element, or the report itself. */
5994
+ type OwReportParentKind = 'none' | 'report' | 'board' | 'missing' | 'other' | 'self';
5995
+ /** One group: the parent's id, whether it is a report (a thread) or a board entry (the talks under it), and the reports that name it, in rule 9's order. */
5996
+ interface OwReportGroup {
5997
+ parent: string;
5998
+ kind: 'report' | 'board';
5999
+ /** The ids of the reports that name the parent, by `created_at` (equal times keep the list's order; unreadable times last). The parent is not among them. */
6000
+ reports: string[];
6001
+ }
6002
+ /** A lint: `chain` on a report whose parent is a report that itself names another report; `self` on a report that names itself. */
6003
+ interface OwReportLint {
6004
+ kind: 'chain' | 'self';
6005
+ report: string;
6006
+ }
6007
+ /** `reportThreadsOf`'s answer. */
6008
+ interface OwReportThreads {
6009
+ /** For each report given, by its id, what its parent is. */
6010
+ parents: Record<string, OwReportParentKind>;
6011
+ /** One per parent that is a report or a board entry and that some report names; in no rule order. */
6012
+ groups: OwReportGroup[];
6013
+ /** In no rule order. */
6014
+ lints: OwReportLint[];
6015
+ }
6016
+ /**
6017
+ * Reports grouped into threads (the report profile's rule 9). Give it the Narratives as the reader is served them,
6018
+ * in the order served. A report is a Narrative with supertype `Report` that carries the room's mark `x_room_of`
6019
+ * (`isRoomElement`); a board entry is one with supertype `Board` and the mark. Without the mark either is lore.
6020
+ *
6021
+ * Only reports are read as children: a message or any other element that names a report is in no part of the answer.
6022
+ *
6023
+ * `parents`: for each report, what its `parent_narrative` names: `none` (absent, null, not a string, or empty once
6024
+ * trimmed of White_Space, as the room profile trims; a parent with content is read as written, never trimmed),
6025
+ * `self`, `missing` (an id whose element is not in the list: a folder or an export without it, an id that dangles),
6026
+ * `report`, `board`, or `other` (any other element, a Narrative with supertype `Report` or `Board` and no mark
6027
+ * included; a stub is read as it is served: one without the mark reads `other`). `groups`: one per parent that is
6028
+ * a report or a board entry, the reports that name it ordered by `created_at` as an instant (equal times keep the
6029
+ * list's order; one that cannot be read as a date and time after every one that can), never by id or by the text
6030
+ * of the time. A report with no parent, or whose parent is missing, other or itself, is a thread of one and in no
6031
+ * group.
6032
+ * `lints`: `self` on a report that names itself; `chain` on a report whose parent is a report that itself names
6033
+ * another report the reader holds (with the mark). A report that names itself reads as naming no parent: it still
6034
+ * heads the group of the reports that name it, and none of them is a chain; nor is a report whose parent names an
6035
+ * id not held, or a Narrative with supertype `Report` and no mark. The reader never walks further up a chain:
6036
+ * such a report is shown under the parent it names. It never guesses a thread from names, days or text.
6037
+ *
6038
+ * Groups and lints come in no rule order (compare them as sets); the order inside a group is the rule's. Elements
6039
+ * that are not objects, or carry no non-empty string `id`, are skipped; of two with one id, the first is read.
6040
+ * A thread takes nothing away from where a report hangs: its `relations` and `events` still hold it. Pure.
6041
+ */
6042
+ declare function reportThreadsOf(narratives: readonly object[]): OwReportThreads;
6043
+
5988
6044
  /**
5989
6045
  * The review profile's proposed mark (schema-dist profiles/review.md): an element whose
5990
6046
  * `x_review_proposed` is an object was written as proposed (an AI seat's new element on a world
@@ -7793,4 +7849,4 @@ declare class TokenResource {
7793
7849
  getEncryptionInfo(): Promise<EncryptionInfo>;
7794
7850
  }
7795
7851
 
7796
- export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountToken, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAiAskAnswer, type OwAiAskBody, type OwAiMeter, type OwAiRefusal, type OwAiSortAnswer, type OwAiSortBody, type OwAiToken, type OwAiUse, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwElementMark, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayoutOf, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMapSpace, type OwMapSpaceMap, type OwMapSpaceOutReason, type OwMapSpaceOutline, type OwMapSpacePin, type OwMapSpacePoint, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedAiToken, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwOpenersOptions, type OwPage, type OwPaidBy, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRecord, type OwRecordMark, type OwRecordStory, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSearchResult, type OwSearchResults, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwTrailGround, type OwTrailHanger, type OwTrailInput, type OwTrailLayout, type OwTrailPin, type OwTrailPlace, type OwTrailSettings, type OwTrailSpiral, type OwTrailTier, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwView, type OwViewRow, type OwViewsTable, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldKeyMember, type OwWorldKeyRow, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, RECORD_FIELD, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, TRAIL_TIERS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, VIEWS, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
7852
+ export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountToken, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAiAskAnswer, type OwAiAskBody, type OwAiMeter, type OwAiRefusal, type OwAiSortAnswer, type OwAiSortBody, type OwAiToken, type OwAiUse, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwElementMark, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayoutOf, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMapSpace, type OwMapSpaceMap, type OwMapSpaceOutReason, type OwMapSpaceOutline, type OwMapSpacePin, type OwMapSpacePoint, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedAiToken, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwOpenersOptions, type OwPage, type OwPaidBy, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRecord, type OwRecordMark, type OwRecordStory, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwReportGroup, type OwReportLint, type OwReportParentKind, type OwReportThreads, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSearchResult, type OwSearchResults, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwTrailGround, type OwTrailHanger, type OwTrailInput, type OwTrailLayout, type OwTrailPin, type OwTrailPlace, type OwTrailSettings, type OwTrailSpiral, type OwTrailTier, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwView, type OwViewRow, type OwViewsTable, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldKeyMember, type OwWorldKeyRow, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, RECORD_FIELD, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, TRAIL_TIERS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, VIEWS, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, reportThreadsOf, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  trimWhiteSpace,
46
46
  typeWord,
47
47
  unknownKey
48
- } from "./chunk-XWEJ2X4I.js";
48
+ } from "./chunk-STITE4FQ.js";
49
49
 
50
50
  // src/v2/keyed-id.ts
51
51
  var KEYED_IDS = "0199b6a0-6f0e-7c2a-9d1e-3b5c7a8e4f21";
@@ -2610,7 +2610,7 @@ function withSignal(signal) {
2610
2610
  return signal === void 0 ? {} : { signal };
2611
2611
  }
2612
2612
  var LIST_ALL_PARAM_KEYS = LIST_PARAM_KEYS.filter((k) => k !== "cursor");
2613
- var LIST_FILTER_HINT = "A wire filter (name, name__icontains, supertype, subtype, characters) goes under filter: { ... }.";
2613
+ var LIST_FILTER_HINT = "A wire filter (name, name__icontains, supertype, subtype, characters, a single link, a Pin's element) goes under filter: { ... }.";
2614
2614
  var REQUEST_OPTION_KEYS = [
2615
2615
  "query",
2616
2616
  "body",
@@ -3873,6 +3873,66 @@ function recordsOf(characterId, elements) {
3873
3873
  return out;
3874
3874
  }
3875
3875
 
3876
+ // src/report.ts
3877
+ var REPORT_PAIR = { type: "narrative", supertype: "Report" };
3878
+ var BOARD_PAIR = { type: "narrative", supertype: "Board" };
3879
+ var isBody3 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3880
+ function roomKindOf(el) {
3881
+ if (el === void 0 || !isRoomElement(el)) return null;
3882
+ const type = fold(el.type);
3883
+ const supertype = fold(el.supertype);
3884
+ if (type === fold(REPORT_PAIR.type) && supertype === fold(REPORT_PAIR.supertype)) return "report";
3885
+ if (type === fold(BOARD_PAIR.type) && supertype === fold(BOARD_PAIR.supertype)) return "board";
3886
+ return null;
3887
+ }
3888
+ function parentOf(el) {
3889
+ const parent = el.parent_narrative;
3890
+ return typeof parent === "string" && trimWhiteSpace(parent) !== "" ? parent : null;
3891
+ }
3892
+ function reportThreadsOf(narratives) {
3893
+ const parents = {};
3894
+ const groups = [];
3895
+ const lints = [];
3896
+ if (!Array.isArray(narratives)) return { parents, groups, lints };
3897
+ const byId2 = /* @__PURE__ */ new Map();
3898
+ for (const el of narratives) {
3899
+ if (isBody3(el) && typeof el.id === "string" && el.id !== "" && !byId2.has(el.id)) byId2.set(el.id, el);
3900
+ }
3901
+ const reports = [...byId2.values()].filter((el) => roomKindOf(el) === "report");
3902
+ const kindOf2 = (report) => {
3903
+ const parent = parentOf(report);
3904
+ if (parent === null) return "none";
3905
+ if (parent === report.id) return "self";
3906
+ const target = byId2.get(parent);
3907
+ if (target === void 0) return "missing";
3908
+ return roomKindOf(target) ?? "other";
3909
+ };
3910
+ const members = /* @__PURE__ */ new Map();
3911
+ for (const report of reports) {
3912
+ const id = report.id;
3913
+ const kind = kindOf2(report);
3914
+ Object.defineProperty(parents, id, { value: kind, enumerable: true, writable: true, configurable: true });
3915
+ if (kind === "report" || kind === "board") {
3916
+ const parent = parentOf(report);
3917
+ const list2 = members.get(parent);
3918
+ if (list2) list2.push(report);
3919
+ else members.set(parent, [report]);
3920
+ }
3921
+ if (kind === "self") lints.push({ kind: "self", report: id });
3922
+ if (kind === "report" && kindOf2(byId2.get(parentOf(report))) === "report") {
3923
+ lints.push({ kind: "chain", report: id });
3924
+ }
3925
+ }
3926
+ for (const [parent, list2] of members) {
3927
+ groups.push({
3928
+ parent,
3929
+ kind: roomKindOf(byId2.get(parent)),
3930
+ reports: inCreatedOrder(list2).map((r) => r.id)
3931
+ });
3932
+ }
3933
+ return { parents, groups, lints };
3934
+ }
3935
+
3876
3936
  // src/graph.ts
3877
3937
  var GRAPH_OPTION_KEYS = ["lens", "asOf", "clock", "rooms", "hidden", "proposed", "mapSpace", "readingAids"];
3878
3938
  var DECLARED_LINKS = ["x_lens_leads_to", "x_spine_depends_on"];
@@ -6907,6 +6967,7 @@ export {
6907
6967
  recordMarkOf,
6908
6968
  recordsOf,
6909
6969
  renderElement,
6970
+ reportThreadsOf,
6910
6971
  resolveCalendar,
6911
6972
  resolveCalendarLens,
6912
6973
  resolveEraDomains,
package/dist/waymark.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  openersFor,
7
7
  refuseUnknownOptions,
8
8
  typeWord
9
- } from "./chunk-XWEJ2X4I.js";
9
+ } from "./chunk-STITE4FQ.js";
10
10
 
11
11
  // src/waymark/glyphs.ts
12
12
  var MARK_PATH = "M48.8 0.0 43.8 0.4 39.0 1.2 36.0 2.0 33.2 2.9 29.3 4.5 24.8 6.8 20.6 9.5 17.0 12.4 13.6 15.7 10.4 19.4 7.8 23.1 5.8 26.6 4.5 29.3 3.3 32.1 1.8 36.8 0.8 41.2 0.1 46.3 0.0 51.1 0.4 56.2 1.2 61.0 2.0 63.9 2.9 66.8 4.5 70.7 6.8 75.2 9.5 79.4 12.4 82.9 15.7 86.3 19.4 89.5 23.1 92.1 26.6 94.2 29.3 95.5 32.1 96.7 36.8 98.2 41.2 99.2 46.3 99.8 51.1 100.0 56.2 99.6 61.0 98.8 63.9 98.0 66.8 97.1 70.7 95.5 75.2 93.2 79.4 90.4 82.9 87.6 86.3 84.3 89.5 80.5 92.1 76.9 94.2 73.4 95.5 70.7 96.7 67.9 98.2 63.2 99.2 58.7 99.8 53.7 100.0 48.8 99.6 43.8 98.6 38.4 97.1 33.2 95.5 29.3 93.2 24.8 90.4 20.6 87.6 17.0 84.3 13.6 80.5 10.4 76.9 7.8 73.4 5.8 70.7 4.5 67.9 3.3 63.2 1.8 58.7 0.8 53.7 0.1ZM77.5 80.7 74.1 83.4 70.7 85.7 67.0 87.5 64.5 88.6 64.1 88.7 65.7 86.3 67.1 83.9 68.7 80.7 69.9 77.6 72.7 78.5 73.0 78.4ZM22.5 80.7 25.6 79.0 27.3 78.3 30.0 77.6 31.3 80.7 32.8 83.9 34.2 86.3 35.9 88.7 32.9 87.5 29.3 85.7 25.8 83.4ZM51.2 74.5 55.1 74.7 59.9 75.2 64.2 76.0 67.5 76.9 66.0 80.5 64.2 84.0 62.0 87.4 59.6 90.1 55.1 90.9 52.2 91.2 51.2 91.1ZM48.7 74.5 48.8 91.1 47.7 91.2 44.9 90.9 40.3 90.1 38.2 87.8 36.3 85.0 34.2 81.2 32.5 77.0 35.8 76.0 40.5 75.2 44.5 74.7ZM91.1 51.2 91.1 52.9 90.8 56.3 90.1 59.7 89.3 62.5 88.5 64.8 87.2 67.7 85.7 70.7 83.9 73.4 82.0 75.9 79.4 78.9 76.3 77.2 73.8 76.1 76.2 68.8 77.8 62.7 78.7 56.8 79.0 51.2ZM55.8 51.2 67.7 51.2 67.6 55.1 67.2 59.0 66.7 61.5 65.7 65.0 61.0 64.2 55.7 63.6ZM32.5 51.2 44.5 51.2 44.4 63.6 39.7 64.1 34.5 65.0 33.5 61.3 32.9 58.1 32.5 54.2ZM8.8 51.2 21.0 51.2 21.0 53.3 21.4 56.6 22.7 64.0 23.8 68.4 25.0 72.1 26.6 75.9 23.7 77.2 20.6 78.9 18.5 76.7 16.5 74.1 14.8 71.5 13.4 69.1 12.1 66.3 11.0 63.6 10.1 60.5 9.4 57.3 8.9 53.5 8.8 51.3ZM36.2 27.0 39.5 27.5 44.5 28.2 44.4 48.8 32.4 48.7 32.8 44.5 33.6 39.1 35.0 32.0ZM63.9 26.9 65.2 32.1 66.6 39.2 67.4 44.8 67.7 48.7 55.8 48.8 55.7 28.1 60.5 27.5ZM74.8 23.4 76.9 22.5 79.4 21.1 82.0 24.0 84.8 27.8 86.2 30.3 87.5 32.9 88.6 35.4 89.5 38.1 90.3 41.2 90.8 44.0 91.1 47.0 91.1 48.8 79.0 48.7 78.7 44.6 78.0 39.3 76.5 31.2 74.7 23.5ZM25.5 23.5 25.5 23.7 24.5 26.8 23.7 30.2 22.4 36.6 21.5 42.5 21.1 48.7 8.8 48.8 8.8 47.0 9.2 43.7 9.8 40.8 10.5 38.1 11.5 35.2 12.4 32.9 13.8 30.2 15.2 27.8 17.9 24.0 20.6 21.1 23.1 22.5ZM64.1 11.3 67.0 12.4 70.7 14.3 74.1 16.5 77.5 19.3 75.6 20.3 73.2 21.5 70.0 22.6 68.7 19.2 67.1 16.1 65.7 13.6ZM35.9 11.3 34.2 13.6 32.8 16.1 31.3 19.2 30.0 22.5 27.9 21.9 26.4 21.3 22.5 19.3 25.8 16.5 29.3 14.3 32.9 12.4 35.4 11.4ZM51.2 8.8 52.2 8.8 55.1 9.0 59.6 9.9 61.7 12.2 64.2 16.0 66.0 19.5 67.6 23.3 64.3 24.3 59.4 25.2 56.2 25.6 51.2 25.5ZM48.8 8.8 48.7 25.5 44.2 25.6 40.6 25.2 36.4 24.5 32.4 23.2 33.9 19.5 35.7 16.0 38.2 12.2 40.3 9.9 44.9 9.0 47.7 8.8Z";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.157.2",
3
+ "version": "4.158.1",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {