@onlyworlds/sdk 4.130.0 → 4.132.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 +18 -0
- package/dist/{chunk-EDU36RUO.js → chunk-2OHW3J42.js} +12 -3
- package/dist/index.d.ts +42 -9
- package/dist/index.js +23 -7
- package/dist/waymark.d.ts +2 -0
- package/dist/waymark.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.132.0] - 2026-11-03
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **A tool that opens one kind of element is offered only on that kind.** The tools list's `open` gains `element_types`, the element types its element door opens (type words such as `character`), or `null` for every type. On an element's menu, `openersFor` leaves out a row whose `element_types` does not hold the address's type word, whether or not the row has a world door: the tool opens other kinds, so its world is not offered from this element either. The type is read from the address, so no element body is needed; a world's menu reads no element types. `OwToolOpen.element_types` is typed. Refused by name, as a row that is not one: a word outside the 22, an empty list, a repeat, and `element_types` on a row with no element door. A list without the key reads as before.
|
|
13
|
+
- `TOOLS` repinned at the tools list's `d0e52c4`, where every row carries `element_types: null`: no menu changes. The shared openers fixture has 100 cases (from 92), the same bytes as the Python package's.
|
|
14
|
+
|
|
15
|
+
### Tests
|
|
16
|
+
|
|
17
|
+
- The shared openers fixture's 24 type refusals each name their kind beside the name: `unknown_key` (a key the object does not take, refused by name) or `bad_value` (a key it takes whose value it refuses). Each package's test tells the two apart by its own message, so a reader that refuses a known key as unknown, or the other way round, fails the case where before the name alone passed it. The same bytes in both packages; nothing shipped changes.
|
|
18
|
+
|
|
19
|
+
## [4.131.0] - 2026-11-03
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **Your own AI key.** An account can now save its own Anthropic or OpenAI key on its account page; once the day's token rating is spent, `ask` and `sort` run on that key, billed by its provider. `OwAskAnswer` and `OwSortAnswer` carry `paid_by` (`OwPaidBy`: `'rating'` or `'own_key'`), so a tool can say which paid. `OwAllowance` carries `own_key`: `{ provider: 'anthropic' | 'openai' }` when a key is saved, else `null`; the counts keep the rating's meaning.
|
|
24
|
+
- **`isOwnKeyRefused`** on `OwApiError`: 422 `own_key_refused`, the own key's provider refused it (revoked, wrong, or out of credit). Nothing was counted and the call was not retried on the platform's key: send the person to the account page, and do not retry. A 429 `quota_exceeded` now means the rating is spent and no own key is saved.
|
|
25
|
+
|
|
8
26
|
## [4.130.0] - 2026-11-02
|
|
9
27
|
|
|
10
28
|
### Changed
|
|
@@ -1358,11 +1358,17 @@ function openersFor(tools, kind, address, surface, options = {}) {
|
|
|
1358
1358
|
fail(`tool ${r.id}: open.element_skips is a list of ${ELEMENT_MARKS.join(", ")}; got ${JSON.stringify(o.element_skips)}`);
|
|
1359
1359
|
}
|
|
1360
1360
|
if (elementDoor === null && skips.length > 0) fail(`tool ${r.id}: open.element_skips names what an element door leaves out, and the row has none`);
|
|
1361
|
+
const types = o.element_types === void 0 ? null : o.element_types;
|
|
1362
|
+
if (types !== null && (!Array.isArray(types) || types.length === 0 || new Set(types).size !== types.length || types.some((t) => !ELEMENT_TYPES.includes(t)))) {
|
|
1363
|
+
fail(`tool ${r.id}: open.element_types is null or a non-empty list of distinct type words (${ELEMENT_TYPES.join(", ")}); got ${JSON.stringify(o.element_types)}`);
|
|
1364
|
+
}
|
|
1365
|
+
if (elementDoor === null && types !== null) fail(`tool ${r.id}: open.element_types names what an element door opens, and the row has none`);
|
|
1361
1366
|
if (r.rung !== "listed") continue;
|
|
1362
1367
|
if (audience === "public" && needs === "device") continue;
|
|
1363
1368
|
const template = kind === "element" ? elementDoor ?? worldDoor : worldDoor;
|
|
1364
1369
|
if (template === null) continue;
|
|
1365
1370
|
if (kind === "element" && marks.some((m) => skips.includes(m))) continue;
|
|
1371
|
+
if (kind === "element" && types !== null && !types.includes(type)) continue;
|
|
1366
1372
|
const href = fill(template);
|
|
1367
1373
|
let state = null;
|
|
1368
1374
|
if (tool !== null && r.client === tool) state = "You are here";
|
|
@@ -1389,7 +1395,8 @@ var TOOLS = [
|
|
|
1389
1395
|
"world": "https://atlas.onlyworlds.com/#/open/{world}",
|
|
1390
1396
|
"element": "https://atlas.onlyworlds.com/#/open/{world}/element/{id}",
|
|
1391
1397
|
"needs": "account",
|
|
1392
|
-
"element_skips": []
|
|
1398
|
+
"element_skips": [],
|
|
1399
|
+
"element_types": null
|
|
1393
1400
|
}
|
|
1394
1401
|
},
|
|
1395
1402
|
{
|
|
@@ -1402,7 +1409,8 @@ var TOOLS = [
|
|
|
1402
1409
|
"world": "https://lantern.onlyworlds.com/#/open/{world}",
|
|
1403
1410
|
"element": "https://lantern.onlyworlds.com/#/open/{world}/element/{id}",
|
|
1404
1411
|
"needs": "account",
|
|
1405
|
-
"element_skips": []
|
|
1412
|
+
"element_skips": [],
|
|
1413
|
+
"element_types": null
|
|
1406
1414
|
}
|
|
1407
1415
|
},
|
|
1408
1416
|
{
|
|
@@ -1420,7 +1428,8 @@ var TOOLS = [
|
|
|
1420
1428
|
"hidden",
|
|
1421
1429
|
"proposed",
|
|
1422
1430
|
"map_space"
|
|
1423
|
-
]
|
|
1431
|
+
],
|
|
1432
|
+
"element_types": null
|
|
1424
1433
|
}
|
|
1425
1434
|
},
|
|
1426
1435
|
{
|
package/dist/index.d.ts
CHANGED
|
@@ -2828,6 +2828,8 @@ interface OwRemovalTicket {
|
|
|
2828
2828
|
* is the value; "co-builder" is only its label in prose. Open, so a new role still types.
|
|
2829
2829
|
*/
|
|
2830
2830
|
type OwMemberRole = 'co_builder' | 'contributor' | 'guest' | (string & {});
|
|
2831
|
+
/** Who paid for an ask or a sort: the account's daily token rating, or its own AI key once the rating is spent. */
|
|
2832
|
+
type OwPaidBy = 'rating' | 'own_key';
|
|
2831
2833
|
/** POST /account/ask: keel's AI proxy's answer. */
|
|
2832
2834
|
interface OwAskAnswer {
|
|
2833
2835
|
/** The answer, from the context only; "The world doesn't say." when it does not hold one. */
|
|
@@ -2845,6 +2847,9 @@ interface OwAskAnswer {
|
|
|
2845
2847
|
tokens_remaining: number;
|
|
2846
2848
|
/** The account's token rating: its daily budget in tokens, one meter with the Council (since keel a6244db). */
|
|
2847
2849
|
token_rating: number;
|
|
2850
|
+
/** Who paid for this call: `rating`, the account's daily token rating; `own_key`, the account's own
|
|
2851
|
+
* AI key, once today's rating was spent (the rating's fields above are then as they were). */
|
|
2852
|
+
paid_by: OwPaidBy;
|
|
2848
2853
|
[k: string]: unknown;
|
|
2849
2854
|
}
|
|
2850
2855
|
/**
|
|
@@ -2931,6 +2936,9 @@ interface OwSortAnswer {
|
|
|
2931
2936
|
tokens_remaining: number;
|
|
2932
2937
|
/** The account's token rating: its daily budget in tokens, one meter with the Council (since keel a6244db). */
|
|
2933
2938
|
token_rating: number;
|
|
2939
|
+
/** Who paid for this call: `rating`, the account's daily token rating; `own_key`, the account's own
|
|
2940
|
+
* AI key, once today's rating was spent (the rating's fields above are then as they were). */
|
|
2941
|
+
paid_by: OwPaidBy;
|
|
2934
2942
|
[k: string]: unknown;
|
|
2935
2943
|
}
|
|
2936
2944
|
/** GET /me: who this world key is. */
|
|
@@ -3113,6 +3121,11 @@ interface OwAllowance {
|
|
|
3113
3121
|
tokens_remaining: number;
|
|
3114
3122
|
/** When the day's tokens reset: the next midnight UTC (ISO 8601). */
|
|
3115
3123
|
resets_at: string;
|
|
3124
|
+
/** The account's own AI key, saved on its account page, or null: once today's rating is spent, ask and
|
|
3125
|
+
* sort run on it, billed by its provider. Only the provider is shown; the counts above keep the rating's meaning. */
|
|
3126
|
+
own_key: {
|
|
3127
|
+
provider: 'anthropic' | 'openai';
|
|
3128
|
+
} | null;
|
|
3116
3129
|
[k: string]: unknown;
|
|
3117
3130
|
}
|
|
3118
3131
|
/** POST /join/preview: what a join code holds, read without using it. */
|
|
@@ -4087,6 +4100,13 @@ declare class OwApiError extends Error {
|
|
|
4087
4100
|
* the file's size. Remove a file, or ask the owner. Nothing was issued.
|
|
4088
4101
|
*/
|
|
4089
4102
|
get isFilesFull(): boolean;
|
|
4103
|
+
/**
|
|
4104
|
+
* ask and sort: today's token rating is spent and the call ran on the account's own AI key, which its
|
|
4105
|
+
* provider refused (422 `own_key_refused`: a key revoked, wrong or out of credit). Nothing was counted
|
|
4106
|
+
* and nothing retried on the platform's key: send the person to the account page to check or replace
|
|
4107
|
+
* the key, and do not retry.
|
|
4108
|
+
*/
|
|
4109
|
+
get isOwnKeyRefused(): boolean;
|
|
4090
4110
|
/** ask: the proxy is switched off, or paused for the day by the server-wide cap (503 `ask_unavailable`). Not counted. */
|
|
4091
4111
|
get isAskUnavailable(): boolean;
|
|
4092
4112
|
/** ask: the model gave no answer (502 `ask_failed`). Not counted; try again in a moment. */
|
|
@@ -5176,10 +5196,14 @@ declare class OwV2Client {
|
|
|
5176
5196
|
* keel's AI proxy from `context` only (build it with buildAskContext from the elements
|
|
5177
5197
|
* the user sees; it leaves proposed, hidden and room elements out unless asked). The answer is "The world doesn't say." when the context does not hold
|
|
5178
5198
|
* it. Needs the client's `ow_a_` token (a world key is a TypeError before sending).
|
|
5179
|
-
*
|
|
5180
|
-
*
|
|
5181
|
-
*
|
|
5182
|
-
*
|
|
5199
|
+
* Once the day's token rating is spent, an account that saved its own AI key on its account page is
|
|
5200
|
+
* answered on that key, billed by its provider: the answer's `paid_by` says `own_key` (else `rating`).
|
|
5201
|
+
* Refusals: 429 `quota_exceeded` (`err.isQuotaExceeded`, the account's token rating used up for the day
|
|
5202
|
+
* and no own key saved; Retry-After runs to midnight UTC), 422 `own_key_refused`
|
|
5203
|
+
* (`err.isOwnKeyRefused`: the own key's provider refused it; not retried, send the person to the
|
|
5204
|
+
* account page), 503 `ask_unavailable` (`err.isAskUnavailable`: switched off, or paused for the
|
|
5205
|
+
* day), 502 `ask_failed` (`err.isAskFailed`); none of them counts. 422 for a question over 500
|
|
5206
|
+
* characters or context past its limits.
|
|
5183
5207
|
*/
|
|
5184
5208
|
ask(req: {
|
|
5185
5209
|
worldId: string;
|
|
@@ -5192,7 +5216,8 @@ declare class OwV2Client {
|
|
|
5192
5216
|
* lookupWorld's hits), sorted by the same proxy as ask into rows to review: `make`, `add_to`,
|
|
5193
5217
|
* `link`, `ask`. Nothing is written; the app applies what the user accepts. Every id in a
|
|
5194
5218
|
* row is from the slice; keel moves any other row to `not_proposed` with its reason.
|
|
5195
|
-
* The same account token, token rating (it spends the tokens it uses)
|
|
5219
|
+
* The same account token, token rating (it spends the tokens it uses), own AI key and `paid_by`,
|
|
5220
|
+
* and refusals as ask. 422
|
|
5196
5221
|
* names the param: notes 1 to 8, each up to 4,000 characters and 16,000 in all (text
|
|
5197
5222
|
* only), at most four pictures, each uploaded into this world; slice up to 100, names up
|
|
5198
5223
|
* to 200 characters, anchors up to 120.
|
|
@@ -5205,7 +5230,9 @@ declare class OwV2Client {
|
|
|
5205
5230
|
/**
|
|
5206
5231
|
* GET /account/allowance -- the account's token rating, the one daily meter ask, sort and
|
|
5207
5232
|
* the Council spend from (keel 872431f): the rating, what is used and left today, and
|
|
5208
|
-
* when it resets (the next midnight UTC)
|
|
5233
|
+
* when it resets (the next midnight UTC), and `own_key` (`{provider}` when the account saved its own
|
|
5234
|
+
* AI key, which ask and sort use once the rating is spent; else null). Spends nothing. Needs the
|
|
5235
|
+
* client's `ow_a_` token.
|
|
5209
5236
|
*/
|
|
5210
5237
|
allowance(): Promise<OwAllowance>;
|
|
5211
5238
|
/**
|
|
@@ -5887,6 +5914,8 @@ interface OwToolOpen {
|
|
|
5887
5914
|
needs: OwToolNeeds | null;
|
|
5888
5915
|
/** What the element door does not open, in the graph section's words; [] or absent: it opens every element (a list older than the key has none). */
|
|
5889
5916
|
element_skips?: readonly OwElementMark[];
|
|
5917
|
+
/** The element types the element door opens, as type words (`character`); null or absent: every type (a list older than the key has none). */
|
|
5918
|
+
element_types?: readonly string[] | null;
|
|
5890
5919
|
}
|
|
5891
5920
|
/** The keys of one tools list row that `openersFor` reads; a row straight from `tools.json` carries more, and they are ignored. */
|
|
5892
5921
|
interface OwTool {
|
|
@@ -5943,7 +5972,10 @@ interface OwOpener {
|
|
|
5943
5972
|
* a world door is a row to its world door that says "Opens the world". On an element given as
|
|
5944
5973
|
* `options.element`, a row whose `open.element_skips` names a mark the element carries (room, hidden,
|
|
5945
5974
|
* proposed, map space, a reading aid, each read as `worldGraph` reads it) is not there: its door cannot
|
|
5946
|
-
* open it. A world door alone opens the world, so it stays.
|
|
5975
|
+
* open it. A world door alone opens the world, so it stays. On an element's menu, a row whose
|
|
5976
|
+
* `open.element_types` is a list that does not hold the address's type word is not there either, world
|
|
5977
|
+
* door or not: the tool opens other kinds of element (read from the address, so no element body is needed;
|
|
5978
|
+
* a world's menu reads no element types). For the `public` audience (the signed-out
|
|
5947
5979
|
* reader) a row whose `open.needs` is `device` is not there, since a visitor's device holds no world of
|
|
5948
5980
|
* this one's, and a row whose `needs` is `account` is there and says it needs one.
|
|
5949
5981
|
*
|
|
@@ -5965,7 +5997,8 @@ interface OwOpener {
|
|
|
5965
5997
|
* rest: a `kind` that is neither, an element's openers asked of an address with no element, an unknown
|
|
5966
5998
|
* key on the address, the surface or the options, a missing or unknown `audience`, a surface value of the
|
|
5967
5999
|
* wrong type, an element given for a world's menu or naming another element than the address, a tools row
|
|
5968
|
-
* that is not one (a `needs` or an `
|
|
6000
|
+
* that is not one (a `needs`, an `element_skips` or an `element_types` word outside the list's format, an
|
|
6001
|
+
* empty `element_types`, or `element_types` on a row with no element door, included).
|
|
5969
6002
|
*/
|
|
5970
6003
|
declare function openersFor(tools: readonly OwTool[], kind: OwOpenerKind, address: OwAddress | OwAddressReading, surface: OwOpenerSurface, options?: OwOpenersOptions): OwOpener[];
|
|
5971
6004
|
|
|
@@ -7127,4 +7160,4 @@ declare class TokenResource {
|
|
|
7127
7160
|
getEncryptionInfo(): Promise<EncryptionInfo>;
|
|
7128
7161
|
}
|
|
7129
7162
|
|
|
7130
|
-
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 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 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 OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwOpenersOptions, type OwPage, 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 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 OwUploadedFile, type OwUploadedImage, OwV2Client, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, 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, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, 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, 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, senderStatus, simpleCaseFold, strandOf, threadOf, typeWord, unreadFor, validateCalendarConfig, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
|
|
7163
|
+
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 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 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 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 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 OwUploadedFile, type OwUploadedImage, OwV2Client, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, 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, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, 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, 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, senderStatus, simpleCaseFold, strandOf, threadOf, typeWord, unreadFor, validateCalendarConfig, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
trimWhiteSpace,
|
|
43
43
|
typeWord,
|
|
44
44
|
unknownKey
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-2OHW3J42.js";
|
|
46
46
|
|
|
47
47
|
// src/v2/keyed-id.ts
|
|
48
48
|
var KEYED_IDS = "0199b6a0-6f0e-7c2a-9d1e-3b5c7a8e4f21";
|
|
@@ -322,6 +322,15 @@ var OwApiError = class extends Error {
|
|
|
322
322
|
get isFilesFull() {
|
|
323
323
|
return this.status === 403 && this.code === "files_full";
|
|
324
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* ask and sort: today's token rating is spent and the call ran on the account's own AI key, which its
|
|
327
|
+
* provider refused (422 `own_key_refused`: a key revoked, wrong or out of credit). Nothing was counted
|
|
328
|
+
* and nothing retried on the platform's key: send the person to the account page to check or replace
|
|
329
|
+
* the key, and do not retry.
|
|
330
|
+
*/
|
|
331
|
+
get isOwnKeyRefused() {
|
|
332
|
+
return this.status === 422 && this.code === "own_key_refused";
|
|
333
|
+
}
|
|
325
334
|
/** ask: the proxy is switched off, or paused for the day by the server-wide cap (503 `ask_unavailable`). Not counted. */
|
|
326
335
|
get isAskUnavailable() {
|
|
327
336
|
return this.status === 503 && this.code === "ask_unavailable";
|
|
@@ -2034,10 +2043,14 @@ var OwV2Client = class {
|
|
|
2034
2043
|
* keel's AI proxy from `context` only (build it with buildAskContext from the elements
|
|
2035
2044
|
* the user sees; it leaves proposed, hidden and room elements out unless asked). The answer is "The world doesn't say." when the context does not hold
|
|
2036
2045
|
* it. Needs the client's `ow_a_` token (a world key is a TypeError before sending).
|
|
2037
|
-
*
|
|
2038
|
-
*
|
|
2039
|
-
*
|
|
2040
|
-
*
|
|
2046
|
+
* Once the day's token rating is spent, an account that saved its own AI key on its account page is
|
|
2047
|
+
* answered on that key, billed by its provider: the answer's `paid_by` says `own_key` (else `rating`).
|
|
2048
|
+
* Refusals: 429 `quota_exceeded` (`err.isQuotaExceeded`, the account's token rating used up for the day
|
|
2049
|
+
* and no own key saved; Retry-After runs to midnight UTC), 422 `own_key_refused`
|
|
2050
|
+
* (`err.isOwnKeyRefused`: the own key's provider refused it; not retried, send the person to the
|
|
2051
|
+
* account page), 503 `ask_unavailable` (`err.isAskUnavailable`: switched off, or paused for the
|
|
2052
|
+
* day), 502 `ask_failed` (`err.isAskFailed`); none of them counts. 422 for a question over 500
|
|
2053
|
+
* characters or context past its limits.
|
|
2041
2054
|
*/
|
|
2042
2055
|
async ask(req) {
|
|
2043
2056
|
only("ask", req, ["worldId", "question", "context"]);
|
|
@@ -2054,7 +2067,8 @@ var OwV2Client = class {
|
|
|
2054
2067
|
* lookupWorld's hits), sorted by the same proxy as ask into rows to review: `make`, `add_to`,
|
|
2055
2068
|
* `link`, `ask`. Nothing is written; the app applies what the user accepts. Every id in a
|
|
2056
2069
|
* row is from the slice; keel moves any other row to `not_proposed` with its reason.
|
|
2057
|
-
* The same account token, token rating (it spends the tokens it uses)
|
|
2070
|
+
* The same account token, token rating (it spends the tokens it uses), own AI key and `paid_by`,
|
|
2071
|
+
* and refusals as ask. 422
|
|
2058
2072
|
* names the param: notes 1 to 8, each up to 4,000 characters and 16,000 in all (text
|
|
2059
2073
|
* only), at most four pictures, each uploaded into this world; slice up to 100, names up
|
|
2060
2074
|
* to 200 characters, anchors up to 120.
|
|
@@ -2071,7 +2085,9 @@ var OwV2Client = class {
|
|
|
2071
2085
|
/**
|
|
2072
2086
|
* GET /account/allowance -- the account's token rating, the one daily meter ask, sort and
|
|
2073
2087
|
* the Council spend from (keel 872431f): the rating, what is used and left today, and
|
|
2074
|
-
* when it resets (the next midnight UTC)
|
|
2088
|
+
* when it resets (the next midnight UTC), and `own_key` (`{provider}` when the account saved its own
|
|
2089
|
+
* AI key, which ask and sort use once the rating is spent; else null). Spends nothing. Needs the
|
|
2090
|
+
* client's `ow_a_` token.
|
|
2075
2091
|
*/
|
|
2076
2092
|
async allowance() {
|
|
2077
2093
|
if (this.keyKind !== "account") {
|
package/dist/waymark.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ interface OwToolOpen {
|
|
|
13
13
|
needs: OwToolNeeds | null;
|
|
14
14
|
/** What the element door does not open, in the graph section's words; [] or absent: it opens every element (a list older than the key has none). */
|
|
15
15
|
element_skips?: readonly OwElementMark[];
|
|
16
|
+
/** The element types the element door opens, as type words (`character`); null or absent: every type (a list older than the key has none). */
|
|
17
|
+
element_types?: readonly string[] | null;
|
|
16
18
|
}
|
|
17
19
|
/** The keys of one tools list row that `openersFor` reads; a row straight from `tools.json` carries more, and they are ignored. */
|
|
18
20
|
interface OwTool {
|
package/dist/waymark.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
openersFor,
|
|
7
7
|
refuseUnknownOptions,
|
|
8
8
|
typeWord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2OHW3J42.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";
|