diff --git a/contract/stability.json b/contract/stability.json index 59c04ce3..60fcaac3 100644 --- a/contract/stability.json +++ b/contract/stability.json @@ -1,7 +1,7 @@ { "source": "https://www.onlyworlds.com/api/v2/openapi.json: what it says about change, as served", - "read_at": "2026-11-23", - "policy": "The path carries the API's version: `/api/v2` is current. The old `/api/worldapi` (v1) keeps answering for the tools built on it; it is frozen, not developed. New fields and routes arrive without notice and never change what existing fields mean. A field, route or behaviour is removed only after it has been announced on the feedback page's changelog and in this document, at least six months ahead. The `X-OW-Schema-Version` header says which version of the standard shapes a reply.", + "read_at": "2026-12-01", + "policy": "The path carries the API's version: `/api/v2` is current. The old `/api/worldapi` (v1) keeps answering for the tools built on it; it is frozen, not developed. New fields and routes arrive without notice and never change what existing fields mean. A field, route or behaviour is removed only after it has been announced on the feedback page's changelog and in this document, at least six months ahead. Until OnlyWorlds 1.0, a change that closes a security hole may ship without that notice; it is said in the changelog the day it ships. The `X-OW-Schema-Version` header says which version of the standard shapes a reply.", "announced": [ { "where": "GET /api/v2/character/{id}/context, parameter compact", diff --git a/package-lock.json b/package-lock.json index 2491bab5..c9a9319c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "starlight-page-actions": "0.7.1" }, "devDependencies": { - "@onlyworlds/sdk": "4.227.1", + "@onlyworlds/sdk": "4.228.0", "typescript": "5.9.3" } }, @@ -1685,9 +1685,9 @@ } }, "node_modules/@onlyworlds/sdk": { - "version": "4.227.1", - "resolved": "https://registry.npmjs.org/@onlyworlds/sdk/-/sdk-4.227.1.tgz", - "integrity": "sha512-h2jQ0xtqrExy46Kya3wm+d2up7iAGjobM+hyOZOUpLBvQfVzIAs0v01SBkP3k3/i64tJkbAU1JQ6XQe4GAX7Tw==", + "version": "4.228.0", + "resolved": "https://registry.npmjs.org/@onlyworlds/sdk/-/sdk-4.228.0.tgz", + "integrity": "sha512-iIKvY6z+Jytut8Vf3HSkVAmFMsXMhPsJmfeY35uY8NoZ6i7HK+hJTSyEBjUM66E5szbGmMZYFMIiHlTZoAAcSQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index adb1c7a1..88cbb272 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "starlight-page-actions": "0.7.1" }, "devDependencies": { - "@onlyworlds/sdk": "4.227.1", + "@onlyworlds/sdk": "4.228.0", "typescript": "5.9.3" }, "overrides": { diff --git a/scripts/mutants-stability.mjs b/scripts/mutants-stability.mjs index 1294aa8b..4116bf81 100644 --- a/scripts/mutants-stability.mjs +++ b/scripts/mutants-stability.mjs @@ -45,7 +45,7 @@ const onSnap = (more, known) => checkPage(page, { ...snap, ...more }, known).fai const later = (date) => `${Number(date.slice(0, 4)) + 3}${date.slice(4)}`; const PAGE_MUTANTS = [ - ['the policy reworded on the page', () => onPage((p) => swap(p, 'at least six months ahead. The', 'at least three months ahead. The')), 'word for word'], + ['the policy reworded on the page', () => onPage((p) => swap(p, 'at least six months ahead. Until', 'at least three months ahead. Until')), 'word for word'], ['a second blockquote', () => onPage((p) => swap(p, HEADING, `\n> A second quotation.\n${HEADING}`)), 'blockquotes'], ['the row\'s second date moved', () => onPage((p) => swap(p, ROW_OPEN, `| ${first.announced} | ${later(first.from)} |`)), 'matches no announcement'], ['the row removed', () => onPage((p) => swap(p, `${rowOf(p)}\n`, '')), 'has no row for'], diff --git a/src/content/docs/docs/changelog.md b/src/content/docs/docs/changelog.md index c667f286..32b6e524 100644 --- a/src/content/docs/docs/changelog.md +++ b/src/content/docs/docs/changelog.md @@ -7,6 +7,12 @@ What changed for developers, newest first: the API on onlyworlds.com, the client What changed on onlyworlds.com for everyone is on its own [Changelog](https://www.onlyworlds.com/changelog); this page stays the developer log. +## 2026-12-01 + +- **[Sign in with OnlyWorlds](/docs/development/api/signin#ai-assistants): a client that registered itself reads worlds only.** Its account token, from `POST /api/v2/auth/token`, says `scope: "world:read"` and ends 720 hours after the exchange. `GET /api/v2/account/worlds` lists its worlds with no `keys` on any row. In a world it names, it reads the world, an element type's list, one element, search and metadata, and it may revoke itself; every other route answers `403` `permission_error`. A tool on the list of registered tools signs in as before. +- **[Stability and deprecation](/docs/development/api/stability): until OnlyWorlds 1.0, a security fix can ship without the six months' notice.** The API document's policy gained that sentence, and the page quotes it. Such a change is said in the changelog the day it ships. +- **[TypeScript](/docs/development/typescript) [4.228.0](https://www.npmjs.com/package/@onlyworlds/sdk): `OwAccountWorld.keys` is optional.** A caller that reads `keys` from a `listAccountWorlds()` row reads it as possibly absent; TypeScript says so at the next build. + ## 2026-11-30 - **[Account tokens](/docs/getting-started/keys#account-tokens): an app's session ends when the password changes.** An `X-Session-Token` answers on the account routes only while it matches the account's stored password: after a password change or reset it is a `401` `invalid_credentials`, and the app signs in again. An account token (`ow_a_`) is not affected. diff --git a/src/content/docs/docs/development/api/signin.mdx b/src/content/docs/docs/development/api/signin.mdx index 08df52c5..f118a9cc 100644 --- a/src/content/docs/docs/development/api/signin.mdx +++ b/src/content/docs/docs/development/api/signin.mdx @@ -91,7 +91,7 @@ curl -s -X POST "https://www.onlyworlds.com/api/v2/auth/token" \ { "token": "ow_a_…", "token_id": "…", "token_type": "bearer", "expires_at": null, "account": { "id": "…", "username": "…" } } ``` -The answer is sent `Cache-Control: no-store`. `expires_at` is when the token stops working, for a tool whose registration asks for a lifetime (1 to 720 hours; Little Lens's tokens last six); null for one with none, whose token works until it is revoked. An expired token is refused as a revoked one is, the same 401. `token` is shown only here: the tool keeps it and sends it as `Authorization: Bearer ow_a_…` on the [account routes](/docs/getting-started/keys#account-tokens), such as [managing members](/docs/development/api/members#managing-members), and to [read a world's elements](/docs/getting-started/keys#reading-a-world-with-an-account-token) as the person's own access there, with no key minted. On the person's account page, under Account tokens, it is listed by the tool's name and the browser (`Atlas on Firefox`), and they can revoke it there. `token_id` (since 2026-10-25) is the token's id: a tool done with the token revokes it with `DELETE /api/v2/account/tokens/{token_id}`, sending the token itself as the bearer. That revoke ends the tool's consent only when it was the tool's last live token for the person, or for a tool that asks each time ([Consent and revoking](#consent-and-revoking)). {/* limit: signin_token_lifetime_max_hours */} +The answer is sent `Cache-Control: no-store`. `expires_at` is when the token stops working, for a tool whose registration asks for a lifetime (1 to 720 hours; Little Lens's tokens last six), and 720 hours for [a client that registered itself](#ai-assistants); null for a listed tool with none, whose token works until it is revoked. An expired token is refused as a revoked one is, the same 401. `token` is shown only here: the tool keeps it and sends it as `Authorization: Bearer ow_a_…` on the [account routes](/docs/getting-started/keys#account-tokens), such as [managing members](/docs/development/api/members#managing-members), and to [read a world's elements](/docs/getting-started/keys#reading-a-world-with-an-account-token) as the person's own access there, with no key minted. On the person's account page, under Account tokens, it is listed by the tool's name and the browser (`Atlas on Firefox`), and they can revoke it there. `token_id` (since 2026-10-25) is the token's id: a tool done with the token revokes it with `DELETE /api/v2/account/tokens/{token_id}`, sending the token itself as the bearer. That revoke ends the tool's consent only when it was the tool's last live token for the person, or for a tool that asks each time ([Consent and revoking](#consent-and-revoking)). {/* limit: signin_token_lifetime_max_hours */} **A code lives 60 seconds and is spent by its first exchange,** whether that succeeds or fails. A code sent again is refused and also revokes the token its first exchange minted: a replayed code is treated as a stolen one. So take `code` out of the address bar before the exchange, and send the exchange before any other request: a reload would spend the code on a refusal. {/* limit: signin_code_seconds */} @@ -185,6 +185,8 @@ An AI assistant's connector, such as claude.ai's or ChatGPT's, signs a person in The access token is an account token like any other: the [account page](https://www.onlyworlds.com/account/) lists it, and Revoke and Disconnect there end the chain. +**A registered client at the API's own exchange** (since 2026-12-01). A client that registered itself (its `client_id` starts `dyn-`) and trades its code at [`POST /api/v2/auth/token`](#trading-the-code) gets an account token that reads worlds only. The answer says `scope: "world:read"`, and `expires_at` is 720 hours after the exchange. `GET /api/v2/account/worlds` lists its worlds with no `keys` on any row (the field is absent, never an empty list). In a world it names with `world`, it reads the world, an element type's list, one element, search and metadata. It may revoke itself. Every other route that takes an account token answers it `403` [`permission_error`](/api/errors/#permission_error). A tool on [the list above](#registered-tools) signs in as before, a read-only one included. + ## In the SDK The [TypeScript SDK](/docs/development/typescript) has both halves, from 4.46.0, on a client with no key (`new OwV2Client()`): diff --git a/src/content/docs/docs/development/api/stability.md b/src/content/docs/docs/development/api/stability.md index 51b7f682..9efc2787 100644 --- a/src/content/docs/docs/development/api/stability.md +++ b/src/content/docs/docs/development/api/stability.md @@ -9,12 +9,13 @@ A tool built on the API needs to know what can change under it. This page gives The [API document](https://www.onlyworlds.com/api/v2/openapi.json) states it under "Versions and deprecation": -> The path carries the API's version: `/api/v2` is current. The old `/api/worldapi` (v1) keeps answering for the tools built on it; it is frozen, not developed. New fields and routes arrive without notice and never change what existing fields mean. A field, route or behaviour is removed only after it has been announced on the feedback page's changelog and in this document, at least six months ahead. The `X-OW-Schema-Version` header says which version of the standard shapes a reply. +> The path carries the API's version: `/api/v2` is current. The old `/api/worldapi` (v1) keeps answering for the tools built on it; it is frozen, not developed. New fields and routes arrive without notice and never change what existing fields mean. A field, route or behaviour is removed only after it has been announced on the feedback page's changelog and in this document, at least six months ahead. Until OnlyWorlds 1.0, a change that closes a security hole may ship without that notice; it is said in the changelog the day it ships. The `X-OW-Schema-Version` header says which version of the standard shapes a reply. Read as a client: - **Additions come without notice.** A new field can appear in any answer, and a new route beside any other. Read the fields you use and pass over the rest. - **A removal comes with at least six months' notice.** The one change announced so far is a default that changes, and it was announced six months ahead. +- **A security fix can come without notice, until 1.0.** The [changelog](https://www.onlyworlds.com/changelog) says so the day it ships. - **No end date is announced for the old API.** The [Classic API](/docs/development/api/classic) is frozen and keeps answering; a removal would get the same notice. What a client may branch on, error codes and field names but never error messages, is under [Stability](/docs/development/api-reference#stability) on the API overview. diff --git a/src/content/docs/docs/development/typescript-accounts.md b/src/content/docs/docs/development/typescript-accounts.md index 5f9ac24a..e95b2363 100644 --- a/src/content/docs/docs/development/typescript-accounts.md +++ b/src/content/docs/docs/development/typescript-accounts.md @@ -145,7 +145,7 @@ None of these sends an `Idempotency-Key`, so a key is never stored for a replay: ## A world on the account -An account token makes a world: `createAccountWorld({ name, pin, keyName, source, producer })` (since 4.66.0) answers the world and its one write key, shown once. `listAccountWorlds()` lists every world the account owns or is a member of, with its keys by name and last four, and `mintWorldKey(worldId, { scope, name })` mints a key for one: `scope` `'write'` (the default) or `'read'`, `name` as the key list shows it. +An account token makes a world: `createAccountWorld({ name, pin, keyName, source, producer })` (since 4.66.0) answers the world and its one write key, shown once. `listAccountWorlds()` lists every world the account owns or is a member of, with its keys by name and last four (`keys` is absent on every row for the token of a client that registered itself, and optional in the type since 4.228.0), and `mintWorldKey(worldId, { scope, name })` mints a key for one: `scope` `'write'` (the default) or `'read'`, `name` as the key list shows it. `pin` is the account's PIN. A fresh account has no PIN yet, so send four digits as `pin` on the first create, and they become the account's PIN; without it, the first create answers `422` with `err.param === 'pin'`. An account that has one may send it too, and the server checks it before it makes the world: a wrong one is a `401` with `err.param === 'pin'`, and nothing is made. Left out, the world takes the account's PIN, so a tool that holds the person's PIN can always send it. diff --git a/src/content/docs/docs/development/typescript.md b/src/content/docs/docs/development/typescript.md index 3d80ae5b..d09b5f77 100644 --- a/src/content/docs/docs/development/typescript.md +++ b/src/content/docs/docs/development/typescript.md @@ -480,7 +480,7 @@ The package also ships `SCHEMA.md` (every field and its meaning, generated) and ## Reference -Generated from the types of `@onlyworlds/sdk` 4.227.1, the version these docs pin. The full declarations ship in the package (`dist/index.d.ts`), with `SCHEMA.md` and `AGENTS.md` beside them. +Generated from the types of `@onlyworlds/sdk` 4.228.0, the version these docs pin. The full declarations ship in the package (`dist/index.d.ts`), with `SCHEMA.md` and `AGENTS.md` beside them. ### Client options @@ -576,7 +576,7 @@ Generated from the types of `@onlyworlds/sdk` 4.227.1, the version these docs pi ### Deprecated names -Every name the package's declarations mark `@deprecated`, read from the same files as the tables above: 22 in 4.227.1. Each row is the mark's own comment, to the sentence that names the version the name leaves in. How much notice a change to the API itself gets: [Stability and deprecation](/docs/development/api/stability). +Every name the package's declarations mark `@deprecated`, read from the same files as the tables above: 22 in 4.228.0. Each row is the mark's own comment, to the sentence that names the version the name leaves in. How much notice a change to the API itself gets: [Stability and deprecation](/docs/development/api/stability). | Name | Deprecated since | Leaves in | What its comment says | |---|---|---|---|