@onlyworlds/sdk 4.175.0 → 4.177.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/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.1-dist.132** (canonical 00.34.01).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.1-dist.133** (canonical 00.34.01).
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,32 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.177.0] - 2026-11-17
9
+
10
+ ### Added
11
+
12
+ - **The charter and strand packets say each element's type** (schema-dist serial 133). `charterOf` answers `type: 'law'` on the Charter and `type: 'construct'` on the Guide and on each Domain; `strandOf` answers `type` on every filled slot (`narrative`, `event`, `location`, `character`, and `location` for `now`): the kind the slot holds, singular and lowercase, never the spelling stored. A packet is handed to a reader that may hold nothing else of the world, and an id is fetched by its type. `OwReadingAidsCharter`, `OwReadingAidsGuide`, `OwReadingAidsDomain` and `OwStrandSlot` declare the key, so `OwServedReadingAids` reads it as onlyworlds.com's `reading_aids` serves it. The schema pin moves to `v0.34.1-dist.133`; the charter fixture holds 47 cases and the strand fixture 29.
13
+
14
+ ### Fixed
15
+
16
+ - **A Domain's hub is an element of the kind its field links to, in the reader's view.** An id of another kind in a hub field, or of an element the reader does not see, names no hub. Wherever the charter and strand readers compare an element's type to a kind, the type is trimmed and compared without regard to case, as the room profile defines it.
17
+ - **`getAccessKey`'s deprecation note names `ai('ask', ...)` and `ai('sort', ...)`**, where it sent a reader to `ask()` and `sort()`, themselves deprecated since 4.139.0. The example at the head of the ask module calls `ai('ask', ...)` too. The by-links-3d frame comment says every candidate is tested, and the README names the fixtures without a case count.
18
+
19
+ ### Deprecated
20
+
21
+ - **The `version` key on `layoutByKind`'s and `layoutAround`'s answers** leaves in 5.0. It was always 1, and the layout profile's mark carries no version key: read `method`.
22
+ - **Five token types that serve only methods already deprecated** (`TokenConsumeParams`, `TokenConsumeResponse`, `AccessKeyResponse`, `RevokeSessionResponse`, `RevokeAllSessionsResponse`) are marked and leave in 5.0 with those methods.
23
+
24
+ ## [4.176.0] - 2026-11-16
25
+
26
+ ### Added
27
+
28
+ - **`front_door.charter_element` and `front_door.charter_skill_elements`**, which `GET /me`, `PUT /me/character` and an AI seat's join now serve: the Charter and its skills typed as `{type, id}`, so a reader knows which route fetches each. `OwFrontDoorCharter` (`type: 'law'`, or null where `charter` is) and `OwFrontDoorSkill` (`type: 'object'`, in `charter_skill`'s order) are exported.
29
+
30
+ ### Fixed
31
+
32
+ - **`OwSeat`'s descriptions of the Character right** follow the platform's: the owner may give a seat its Character without the right; once the right is cleared, sending the same Character again keeps it cleared, and only the owner's `may_change_character` true gives it back; and `may_change_character_note` also says why a seat can change its Character all the same (it made it, or it is a co-builder), not only why it cannot.
33
+
8
34
  ## [4.175.0] - 2026-11-16
9
35
 
10
36
  ### Added
package/README.md CHANGED
@@ -457,7 +457,7 @@ const heading = typeWord(world, 'character', { many: true }) ?? 'Characters';
457
457
  const label = typeWord(world, el.type, { supertype: el.supertype }) ?? el.type;
458
458
  ```
459
459
 
460
- The word is printed as written, never re-cased; folder names are never translated. The profile: [`profiles/names.md`](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/names.md) in the schema distribution, with its 23-case fixture, which is this function's test.
460
+ The word is printed as written, never re-cased; folder names are never translated. The profile: [`profiles/names.md`](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/names.md) in the schema distribution, with its fixture, which is this function's test.
461
461
 
462
462
  ### Addresses
463
463
 
@@ -471,7 +471,7 @@ const r = parseOwLink(text); // { form, world, worldIsSlug, type, id, lens, mome
471
471
  // a refusal throws OwAddressError: err.reason is the profile's name ('bad_id', 'uppercase', ...)
472
472
  ```
473
473
 
474
- A field that holds an address is text: never fetch or resolve it on the server, and show one wording ("private or missing") for a world you cannot read and an element that is not there. `parseOwLink` reads one string whole; finding a link inside other text is yours. The profile: [`profiles/address.md`](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/address.md), with its 133-case fixture, which is these functions' test.
474
+ A field that holds an address is text: never fetch or resolve it on the server, and show one wording ("private or missing") for a world you cannot read and an element that is not there. `parseOwLink` reads one string whole; finding a link inside other text is yours. The profile: [`profiles/address.md`](https://github.com/OnlyWorlds/schema-dist/blob/main/profiles/address.md), with its fixture, which is these functions' test.
475
475
 
476
476
  ### Open with
477
477
 
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.1-dist.132** — canonical schema **00.34.01**, published 2026-11-16.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.1-dist.133** — canonical schema **00.34.01**, published 2026-11-16.
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.
package/dist/index.d.ts CHANGED
@@ -2352,6 +2352,8 @@ interface OwStrandWorld extends OwLensWorld {
2352
2352
  /** A filled slot. */
2353
2353
  interface OwStrandSlot {
2354
2354
  id: string;
2355
+ /** The element's type: the slot's own (narrative, event, location, character; `now` a location). */
2356
+ type: 'narrative' | 'event' | 'location' | 'character';
2355
2357
  name: string;
2356
2358
  }
2357
2359
  /** A world's strand as one reader sees it: five slots and whether then and now are one place. An empty slot is null. */
@@ -3145,6 +3147,20 @@ interface OwFrontDoor {
3145
3147
  charter: string | null;
3146
3148
  /** The Objects the Charter's description names (by `ow://` link or id), in the order written, at most five; empty when none. */
3147
3149
  charter_skill: string[];
3150
+ /** `charter` typed as an element: the Charter is a Law, read with `get('law', id)`. Null where `charter` is. */
3151
+ charter_element: OwFrontDoorCharter | null;
3152
+ /** `charter_skill` typed as elements, in the same order: each an Object, read with `get('object', id)`. Empty where `charter_skill` is. */
3153
+ charter_skill_elements: OwFrontDoorSkill[];
3154
+ }
3155
+ /** The Charter in `front_door.charter_element`: a Law by its type and id. */
3156
+ interface OwFrontDoorCharter {
3157
+ type: 'law';
3158
+ id: string;
3159
+ }
3160
+ /** One skill in `front_door.charter_skill_elements`: an Object by its type and id. */
3161
+ interface OwFrontDoorSkill {
3162
+ type: 'object';
3163
+ id: string;
3148
3164
  }
3149
3165
  /** One seat you answer for, a row of `front_door.my_seats`. */
3150
3166
  interface OwMySeat {
@@ -3184,6 +3200,8 @@ interface OwServedReadingAids extends OwReadingAids {
3184
3200
  /** The Charter in `reading_aids`. */
3185
3201
  interface OwReadingAidsCharter {
3186
3202
  id: string;
3203
+ /** The Charter is a Law. */
3204
+ type: 'law';
3187
3205
  name: string;
3188
3206
  /** Its `x_checks_rules` (the checks profile) as stored; empty when it has none. */
3189
3207
  rules: unknown[];
@@ -3193,11 +3211,15 @@ interface OwReadingAidsCharter {
3193
3211
  /** The Guide in `reading_aids`. */
3194
3212
  interface OwReadingAidsGuide {
3195
3213
  id: string;
3214
+ /** The Guide is a Construct. */
3215
+ type: 'construct';
3196
3216
  name: string;
3197
3217
  }
3198
3218
  /** One Domain in `reading_aids`. */
3199
3219
  interface OwReadingAidsDomain {
3200
3220
  id: string;
3221
+ /** A Domain is a Construct. */
3222
+ type: 'construct';
3201
3223
  name: string;
3202
3224
  /** Its description up to the first line break, trimmed; empty when it has none. */
3203
3225
  sentence: string;
@@ -3886,13 +3908,19 @@ interface OwSeat {
3886
3908
  /** The latest use of the seat's key, or null. */
3887
3909
  last_active: string | null;
3888
3910
  /**
3889
- * True when the seat may change, never delete, the Character it plays: the owner gave it that Character, or its
3890
- * sponsor could change it. False says only that no such right is held: a co-builder seat changes everything and a
3891
- * seat changes what it made. On a seat a member answers for it holds only while that member could change the
3892
- * Character. False when the seat has no Character, and when its Character is kept from you (`character` null).
3911
+ * True when the seat may change, never delete, the Character it plays: the owner gave it that Character with the
3912
+ * right (the owner may also give it without, `may_change_character` false on the member's PATCH), or its sponsor
3913
+ * could change it. False says only that no such right is held: a co-builder seat changes everything and a seat
3914
+ * changes what it made. On a seat a member answers for it holds only while that member could change the
3915
+ * Character; once cleared, sending the same Character again keeps it cleared, and only the owner's
3916
+ * `may_change_character` true gives it back. False when the seat has no Character, and when its Character is kept
3917
+ * from you (`character` null).
3893
3918
  */
3894
3919
  may_change_character: boolean;
3895
- /** Why the seat may not change the Character it plays, as a sentence; null when it may, and when its Character is kept from you. */
3920
+ /**
3921
+ * A sentence: why the seat may not change the Character it plays, or, where it can change it all the same without
3922
+ * the right, why (it made it, or it is a co-builder). Null otherwise, and when its Character is kept from you.
3923
+ */
3896
3924
  may_change_character_note: string | null;
3897
3925
  /** True when its member made it for their own AI to play their own Character: it plays what its sponsor plays, and its `may_change_character` is its sponsor's, until it is handed to someone else. */
3898
3926
  follows_sponsor: boolean;
@@ -6740,7 +6768,10 @@ interface OwLayoutPoint {
6740
6768
  /** What `layoutByKind` answers: one point per node, in the graph's node order, and the method that made them. */
6741
6769
  interface OwLayoutByKind {
6742
6770
  method: 'by-kind';
6743
- /** Always 1. A method's word is its version: a method that changes takes a new word, so read `method`, never this number. */
6771
+ /**
6772
+ * Always 1. A method's word is its version: a method that changes takes a new word, so read `method`, never this number.
6773
+ * @deprecated The layout profile's mark carries no version key. Leaves in 5.0.
6774
+ */
6744
6775
  version: 1;
6745
6776
  points: OwLayoutPoint[];
6746
6777
  }
@@ -6755,7 +6786,10 @@ interface OwLayoutAroundPoint {
6755
6786
  /** What `layoutAround` answers: the focus and every element within the steps, in the graph's node order. */
6756
6787
  interface OwLayoutAround {
6757
6788
  method: 'around';
6758
- /** Always 1. A method's word is its version: a method that changes takes a new word, so read `method`, never this number. */
6789
+ /**
6790
+ * Always 1. A method's word is its version: a method that changes takes a new word, so read `method`, never this number.
6791
+ * @deprecated The layout profile's mark carries no version key. Leaves in 5.0.
6792
+ */
6759
6793
  version: 1;
6760
6794
  points: OwLayoutAroundPoint[];
6761
6795
  }
@@ -7524,7 +7558,7 @@ declare function renderElement<T extends OwLookupElement>(element: T, index: OwW
7524
7558
  *
7525
7559
  * const hits = lookupWorld(index, question).slice(0, 8); // what the screen lists
7526
7560
  * const { context, kept, leftOut } = buildAskContext(hits, index);
7527
- * const reply = await account.ask({ worldId, question, context });
7561
+ * const reply = await account.ai('ask', { world_id: worldId, question, context });
7528
7562
  *
7529
7563
  * It is a reader that hands a world on, so three published rules hold here, not only in
7530
7564
  * the caller: an element marked proposed (the review profile, rules 1 and 4: an
@@ -7985,6 +8019,9 @@ interface TokenStatus {
7985
8019
  }
7986
8020
  /**
7987
8021
  * Response from token consumption endpoint
8022
+ *
8023
+ * @deprecated Serves only a `TokenResource` method keel answers with 404 (production,
8024
+ * since 2026-10). Leaves in 5.0 with that method.
7988
8025
  */
7989
8026
  interface TokenConsumeResponse {
7990
8027
  /** Whether the consumption was successful */
@@ -8000,6 +8037,9 @@ interface TokenConsumeResponse {
8000
8037
  }
8001
8038
  /**
8002
8039
  * Parameters for consuming tokens
8040
+ *
8041
+ * @deprecated Serves only a `TokenResource` method keel answers with 404 (production,
8042
+ * since 2026-10). Leaves in 5.0 with that method.
8003
8043
  */
8004
8044
  interface TokenConsumeParams {
8005
8045
  /** Number of tokens to consume (required) */
@@ -8013,6 +8053,9 @@ interface TokenConsumeParams {
8013
8053
  }
8014
8054
  /**
8015
8055
  * Response from getting encrypted access key (advanced use case)
8056
+ *
8057
+ * @deprecated Serves only a `TokenResource` method keel answers with 404 (production,
8058
+ * since 2026-10). Leaves in 5.0 with that method.
8016
8059
  */
8017
8060
  interface AccessKeyResponse {
8018
8061
  /** Base64 encoded encrypted OpenAI key */
@@ -8047,6 +8090,9 @@ interface EncryptionInfo {
8047
8090
  }
8048
8091
  /**
8049
8092
  * Response from session revocation
8093
+ *
8094
+ * @deprecated Serves only a `TokenResource` method keel answers with 404 (production,
8095
+ * since 2026-10). Leaves in 5.0 with that method.
8050
8096
  */
8051
8097
  interface RevokeSessionResponse {
8052
8098
  /** Whether revocation was successful */
@@ -8056,6 +8102,9 @@ interface RevokeSessionResponse {
8056
8102
  }
8057
8103
  /**
8058
8104
  * Response from revoking all sessions
8105
+ *
8106
+ * @deprecated Serves only a `TokenResource` method keel answers with 404 (production,
8107
+ * since 2026-10). Leaves in 5.0 with that method.
8059
8108
  */
8060
8109
  interface RevokeAllSessionsResponse {
8061
8110
  /** Whether revocation was successful */
@@ -8187,8 +8236,8 @@ declare class TokenResource {
8187
8236
  * Get encrypted OpenAI API key (advanced use case)
8188
8237
  *
8189
8238
  * @deprecated keel serves no access-key route (404 on production since
8190
- * 2026-10). AI answers come from keel's own proxy: `OwV2Client.ask()` and
8191
- * `sort()`. Removed in 5.0.
8239
+ * 2026-10). AI answers come from keel's own proxy: `OwV2Client.ai('ask', ...)`
8240
+ * and `ai('sort', ...)`. Removed in 5.0.
8192
8241
  *
8193
8242
  * Requires minimum 100 tokens available. Creates a 1-hour session for tracking.
8194
8243
  * Returns encrypted key that must be decrypted client-side using Fernet.
@@ -8266,4 +8315,4 @@ declare class TokenResource {
8266
8315
  getEncryptionInfo(): Promise<EncryptionInfo>;
8267
8316
  }
8268
8317
 
8269
- export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, BY_LINKS_3D_REST, BY_LINKS_3D_VERSION, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, DECLARED_LINKS, 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, type OwAddressAt, OwAddressError, type OwAddressForm, type OwAddressFound, 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 OwInstant, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayout3dHow, type OwLayout3dPart, type OwLayoutAround, type OwLayoutAroundOptions, type OwLayoutAroundPoint, type OwLayoutByKind, type OwLayoutByLinks3d, type OwLayoutByLinks3dOptions, type OwLayoutGraph, type OwLayoutOf, type OwLayoutPoint, 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 OwReportLine, type OwReportLineOptions, 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, compareInstants, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, findOwLinks, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, instantOf, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutAround, layoutByKind, layoutByLinks3d, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readOwLinkAt, readReportLine, readReportLines, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, reportThreadsOf, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unplacedAround, unplacedByKind, unplacedByLinks3d, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
8318
+ export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, BY_LINKS_3D_REST, BY_LINKS_3D_VERSION, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, DECLARED_LINKS, 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, type OwAddressAt, OwAddressError, type OwAddressForm, type OwAddressFound, 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 OwFrontDoorCharter, type OwFrontDoorSkill, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwInstant, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayout3dHow, type OwLayout3dPart, type OwLayoutAround, type OwLayoutAroundOptions, type OwLayoutAroundPoint, type OwLayoutByKind, type OwLayoutByLinks3d, type OwLayoutByLinks3dOptions, type OwLayoutGraph, type OwLayoutOf, type OwLayoutPoint, 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 OwReportLine, type OwReportLineOptions, 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, compareInstants, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, findOwLinks, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, instantOf, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutAround, layoutByKind, layoutByLinks3d, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readOwLinkAt, readReportLine, readReportLines, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, reportThreadsOf, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unplacedAround, unplacedByKind, unplacedByLinks3d, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
package/dist/index.js CHANGED
@@ -3734,7 +3734,7 @@ function hubsOf(id, r) {
3734
3734
  const v = body[field];
3735
3735
  const target = schema[field]?.target ?? "";
3736
3736
  for (const t of many ? Array.isArray(v) ? v : [] : [v]) {
3737
- if (typeof t !== "string" || t === "" || r.proposed.has(t) || seen.has(`${target}/${t}`)) continue;
3737
+ if (typeof t !== "string" || t === "" || r.proposed.has(t) || !r.view.has(t) || r.typeOf.get(t) !== target || seen.has(`${target}/${t}`)) continue;
3738
3738
  seen.add(`${target}/${t}`);
3739
3739
  out.push({ type: target, id: t });
3740
3740
  }
@@ -3758,6 +3758,7 @@ function charterOf(world, reader) {
3758
3758
  const skill = idsIn(el.description).filter((id) => r.view.has(id) && r.typeOf.get(id) === "object").slice(0, SKILL_MAX);
3759
3759
  out.charter = {
3760
3760
  id: law,
3761
+ type: "law",
3761
3762
  name: typeof el.name === "string" ? el.name : "",
3762
3763
  rules: Array.isArray(rules) ? JSON.parse(JSON.stringify(rules)) : [],
3763
3764
  skill
@@ -3766,7 +3767,7 @@ function charterOf(world, reader) {
3766
3767
  const guide = newest(seen("construct/guide"), r);
3767
3768
  if (guide !== null) {
3768
3769
  const el = r.byId.get(guide);
3769
- out.guide = { id: guide, name: typeof el.name === "string" ? el.name : "" };
3770
+ out.guide = { id: guide, type: "construct", name: typeof el.name === "string" ? el.name : "" };
3770
3771
  }
3771
3772
  const domains = new Set(seen("construct/domain"));
3772
3773
  const order = [];
@@ -3781,6 +3782,7 @@ function charterOf(world, reader) {
3781
3782
  const rest = [...domains].filter((id) => !order.includes(id)).sort((a, b) => byCodePoint(fold(nameOf(a)), fold(nameOf(b))) || byCodePoint(a, b));
3782
3783
  out.domains = [...order, ...rest].map((id) => ({
3783
3784
  id,
3785
+ type: "construct",
3784
3786
  name: nameOf(id),
3785
3787
  sentence: firstLine(r.body(id).description),
3786
3788
  hubs: hubsOf(id, r)
@@ -3820,7 +3822,7 @@ function strandOf(world, reader) {
3820
3822
  const seen = (id, type) => typeof id === "string" && r.view.has(id) && r.typeOf.get(id) === type;
3821
3823
  const slot = (id) => {
3822
3824
  const name = r.body(id).name;
3823
- return { id, name: typeof name === "string" ? name : "" };
3825
+ return { id, type: r.typeOf.get(id), name: typeof name === "string" ? name : "" };
3824
3826
  };
3825
3827
  const listed = (holder, field, id) => {
3826
3828
  const v = r.body(holder)[field];
@@ -9325,8 +9327,8 @@ var TokenResource = class {
9325
9327
  * Get encrypted OpenAI API key (advanced use case)
9326
9328
  *
9327
9329
  * @deprecated keel serves no access-key route (404 on production since
9328
- * 2026-10). AI answers come from keel's own proxy: `OwV2Client.ask()` and
9329
- * `sort()`. Removed in 5.0.
9330
+ * 2026-10). AI answers come from keel's own proxy: `OwV2Client.ai('ask', ...)`
9331
+ * and `ai('sort', ...)`. Removed in 5.0.
9330
9332
  *
9331
9333
  * Requires minimum 100 tokens available. Creates a 1-hour session for tracking.
9332
9334
  * Returns encrypted key that must be decrypted client-side using Fernet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.175.0",
3
+ "version": "4.177.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {