@onlyworlds/sdk 4.115.0 → 4.116.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 +3 -3
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/SCHEMA.md +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +8 -6
- package/package.json +1 -1
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.33.0-dist.
|
|
3
|
+
**Current as of**: SDK **4.x** · schema-dist **v0.33.0-dist.96** (canonical 00.33.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
|
|
|
@@ -77,8 +77,8 @@ against live data). The v1 surface (`OnlyWorldsClient`, the `ElementType` enum)
|
|
|
77
77
|
world's Charter with up to five skill Objects: an agent reads `charter` first. `reading_aids`
|
|
78
78
|
(since 4.100.0, also on an agent's join) is the world's three things to read first:
|
|
79
79
|
`charter` (`{ id, name, rules, skill }`), `guide` and `domains` (`{ id, name, sentence, hubs }`);
|
|
80
|
-
`charterOf(world, reader)` reads the same packet from a snapshot or a folder. `client.members()` is the roster's rows
|
|
81
|
-
account token is a TypeError.
|
|
80
|
+
`charterOf(world, reader)` reads the same packet from a snapshot or a folder. `client.members()` is the roster's rows; an
|
|
81
|
+
account token reads it with the client's `world` set (as its grant there), and without it is a TypeError.
|
|
82
82
|
- Lenses chosen (a world key, or an account token): `worldLenses(worldId, { resolve })` lists the
|
|
83
83
|
world's lenses; `setMyLenses(lensIds)` sets the ones you start with (an account token needs the
|
|
84
84
|
client's `world`). With an account token, `setMemberLenses(worldId, memberId, lensIds)` sets a
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.116.1] - 2026-10-30
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **The schema pin moves to schema-dist serial 96** (`v0.33.0-dist.96`), which states how the lens profile's graph reads a guest's own hidden creation and cases it twice. Both cases pass as `worldGraph` already reads them, so no reader changes: with no lens the creation is not in the guest's graph, with no count and no counted cut edge, as for any hidden element below the owner; in a lens's graph that keeps it, it is a node marked `hidden`.
|
|
13
|
+
|
|
14
|
+
## [4.116.0] - 2026-10-30
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **`members()` works on an account token.** On a client holding an `ow_a_` token with `world` set (`new OwV2Client({ apiKey, world })`), it sends `GET /members/?world=<id>` with the Bearer token and no PIN, and reads the roster with the token's grant in that world: the owner's token as the owner, a member's as its own member key. A world where the token has no grant answers 404. Without `world` set it is a TypeError before anything is sent, naming the option; before, every account token was refused. A world key's call is unchanged (no `world`, no PIN on the read), and a client with no key is still refused before sending: the roster has no public reader.
|
|
19
|
+
|
|
8
20
|
## [4.115.0] - 2026-10-30
|
|
9
21
|
|
|
10
22
|
### Added
|
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ const me = await client.me(); // { world, scope, kind, role, membershi
|
|
|
177
177
|
const roster = await client.members(); // [{ id, kind, role, character, status }], the owner's id is null
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
`me.membership` is what `created_by` holds on the elements this key creates; `me.role` decides what it may change.
|
|
180
|
+
An account token reads the roster too, of the world the client's `world` names, with the token's grant there (since 4.116.0); `me()` stays a world key's. `me.membership` is what `created_by` holds on the elements this key creates; `me.role` decides what it may change.
|
|
181
181
|
|
|
182
182
|
## Sync
|
|
183
183
|
|
package/SCHEMA.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OnlyWorlds Schema Reference
|
|
2
2
|
|
|
3
|
-
**Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.33.0-dist.
|
|
3
|
+
**Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.33.0-dist.96** — canonical schema **00.33.00**, published 2026-10-30.
|
|
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
|
@@ -3498,7 +3498,8 @@ interface OwClientConfig {
|
|
|
3498
3498
|
* `get` and `getWorld` then read that world, sending `world=<id>`: an account token reads it as
|
|
3499
3499
|
* that account's own access there (the owner the whole world, a member its member key's view,
|
|
3500
3500
|
* anyone else the public view), and no key reads it as the public does. An account token also
|
|
3501
|
-
* sets its own lenses there with `setMyLenses` (`world=<id>`), the one write it names
|
|
3501
|
+
* sets its own lenses there with `setMyLenses` (`world=<id>`), the one write it names, and reads
|
|
3502
|
+
* the world's roster with `members` (`world=<id>`) as its grant there. On such a
|
|
3502
3503
|
* client every other world call is a TypeError before sending; the account calls and
|
|
3503
3504
|
* `worldLenses` (the world in its path) work as without it. Given with a world key, or as
|
|
3504
3505
|
* anything but a non-empty string, it is a TypeError when the client is constructed.
|
|
@@ -4042,7 +4043,12 @@ declare class OwV2Client {
|
|
|
4042
4043
|
/**
|
|
4043
4044
|
* GET /members -- the world's roster: each member's id (null for the owner), kind, role,
|
|
4044
4045
|
* Character and status (`removed` rows stay, so their elements keep `created_by`). Returns
|
|
4045
|
-
* the rows; keel sends them as `{ data }` with no paging. A world key's
|
|
4046
|
+
* the rows; keel sends them as `{ data }` with no paging. A world key reads its own world's
|
|
4047
|
+
* roster and sends no `world`. An account token reads the roster of the world the client's
|
|
4048
|
+
* `world` names (`world=<id>`, the Bearer token, no PIN), with the token's grant there: the
|
|
4049
|
+
* owner's token as the owner, a member's as its own member key; a world where it has none is a
|
|
4050
|
+
* 404. Without `world` set it is a TypeError before sending. A client with no key is refused
|
|
4051
|
+
* before sending: the roster has no public reader.
|
|
4046
4052
|
*/
|
|
4047
4053
|
members(): Promise<OwMember[]>;
|
|
4048
4054
|
/**
|
|
@@ -4833,7 +4839,7 @@ declare class OwV2Client {
|
|
|
4833
4839
|
worldRead?: boolean;
|
|
4834
4840
|
/**
|
|
4835
4841
|
* A route keel's document declares the account token on beside the world key (worldLenses,
|
|
4836
|
-
* setMyLenses): an account client sends it with its Bearer token. `'path'`: the path names the
|
|
4842
|
+
* setMyLenses, members): an account client sends it with its Bearer token. `'path'`: the path names the
|
|
4837
4843
|
* world, and nothing is added. `'world'`: the world is named with `world=<id>`, added from the
|
|
4838
4844
|
* client's `world`, and an account client without `world` set is a TypeError before sending.
|
|
4839
4845
|
* A world key sends as without it; a keyless client is still refused.
|
package/dist/index.js
CHANGED
|
@@ -827,13 +827,15 @@ var OwV2Client = class {
|
|
|
827
827
|
/**
|
|
828
828
|
* GET /members -- the world's roster: each member's id (null for the owner), kind, role,
|
|
829
829
|
* Character and status (`removed` rows stay, so their elements keep `created_by`). Returns
|
|
830
|
-
* the rows; keel sends them as `{ data }` with no paging. A world key's
|
|
830
|
+
* the rows; keel sends them as `{ data }` with no paging. A world key reads its own world's
|
|
831
|
+
* roster and sends no `world`. An account token reads the roster of the world the client's
|
|
832
|
+
* `world` names (`world=<id>`, the Bearer token, no PIN), with the token's grant there: the
|
|
833
|
+
* owner's token as the owner, a member's as its own member key; a world where it has none is a
|
|
834
|
+
* 404. Without `world` set it is a TypeError before sending. A client with no key is refused
|
|
835
|
+
* before sending: the roster has no public reader.
|
|
831
836
|
*/
|
|
832
837
|
async members() {
|
|
833
|
-
|
|
834
|
-
throw new TypeError("members needs a world key: an account token is not a member of one world");
|
|
835
|
-
}
|
|
836
|
-
const page = await this.request("GET", "/members/");
|
|
838
|
+
const page = await this.request("GET", "/members/", { accountToken: "world" });
|
|
837
839
|
return page.data ?? [];
|
|
838
840
|
}
|
|
839
841
|
// -- Element CRUD --------------------------------------------------------
|
|
@@ -2056,7 +2058,7 @@ var OwV2Client = class {
|
|
|
2056
2058
|
}
|
|
2057
2059
|
if (opts.auth !== false && this.keyKind === "account" && !ACCOUNT_ROUTE.test(path)) {
|
|
2058
2060
|
if (!worldRead && accountToken === void 0) {
|
|
2059
|
-
throw new TypeError(`${method} ${path} needs a world key: an account token sends the /account routes, worldLenses and
|
|
2061
|
+
throw new TypeError(`${method} ${path} needs a world key: an account token sends the /account routes, worldLenses, setMyLenses and members, and with \`world\` set reads a world through list, listAll, get and getWorld only. Nothing was sent.`);
|
|
2060
2062
|
}
|
|
2061
2063
|
if (worldRead && this.world === void 0) {
|
|
2062
2064
|
throw new TypeError(`${method} ${path}: an account token reads a world only with \`world\` set (new OwV2Client({ apiKey, world })), through list, listAll, get and getWorld. Nothing was sent.`);
|