{"version":"2.1.284","anchor":"artifact-database-new-read-only-view-level-for-as-level","canonical_anchor":"artifact-database-new-read-only-view-level-for-as-level","heading":"Artifact database tools gain a view level, required if_version and clearer access messages","tier":"notice","area":"Artifacts","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284\/e\/artifact-database-new-read-only-view-level-for-as-level","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284","markdown":"### Artifact database tools gain a view level, required if_version and clearer access messages\n\nArtifact read_db and write_db add a view access level, require if_version on existing documents, cap batches at 1 MiB and explain who can read what\n\n**What**\n\nPublished artifacts, shareable pages or apps Claude can create, can keep a small database that Claude reads and writes with the `read_db` and `write_db` actions. Several things about those actions change.\n\n- `as_level`, which lets Claude act as a certain kind of user, now accepts \"view\" for someone who can only view the artifact, alongside \"interact\" (a signed-in viewer who can use it) and \"admin\" (someone who can edit it). A `write_db` at \"view\" is refused before anything is sent, even for your own data\/users subtree.\n\n- `if_version`, a version number that stops a write from overwriting changes made since you read the document, is now required for any write to a document that already exists. It used to be described as optional. Without it the write is refused until the document is read.\n\n- In a batch, `if_version` is required for every entry whose document already exists. A batch missing one writes nothing, and the whole batch body is capped at 1 MiB.\n\n- `read_db` results now include a `meId` value and note when `me` in a path was resolved to the caller's user id.\n\n- Write results now say who can read the change: this differs for 'private' collections and for pages with access rules. Before, they always said every viewer sees it. By default, rows in a data\/users subtree are readable only by that one user, not even by the artifact's owner, unless the page's access rules say otherwise.\n\n- When the server confirms the requested `as_level` was applied (`levelConfirmed`), a not-found result is described as what a user at that level really sees, and other results drop the \"unconfirmed\" caveat.\n\n- Write and batch-write errors now include the server's reason, including when a request fails with invalid_argument (\"the server could not accept the request as shaped\").\n\n- Saved-document listings name extra ids more compactly and explain that '~' in an id is spelled '@' in the file name.\n\n**Why**\n\nClaude can now check what a view-only visitor sees and gets more definite answers about access. Writes that skip `if_version` on existing documents, and batches that used to succeed without it, will now be refused.\n\n- Area: Artifacts\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 3\/5"}