techne-sdk 0.3.1 → 0.3.2

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 CHANGED
@@ -3,14 +3,28 @@
3
3
  `techne-sdk` on npm and the `techne-sdk` crate share a version. Each entry names what changes for an app or
4
4
  a crate user.
5
5
 
6
- ## Unreleased
6
+ ## 0.3.2 (2026-11-10)
7
+
8
+ Built on lexicons `v0.1.22-techne.63` (693f27ce) and the platform's published API at regenOS main `d3f224e6a`
9
+ (`inputs.pin.json`). The crate depends on `techne-lexicon-check` 0.3.2 from crates.io, packaged from that
10
+ lexicons tag.
7
11
 
8
12
  - **A private record must name its space.** The platform now refuses a `permissioned.putRecord(s)` write
9
13
  with no `space` (400 `InvalidRequest`; lucian 2026-11-09). `put` checks first: a record that is written
10
14
  privately (a type with no public home) and names no `space` throws `PutError` with `InvalidRequest`, and
11
15
  nothing is written. A record only the person reads goes in their own `space.personal`
12
- (`at://{did}/pub.techne.draft.space.personal/self`). Public records are unchanged. The generated types
13
- follow when the lexicons pin moves to the tag that carries the change (v0.1.22-techne.62).
16
+ (`at://{did}/pub.techne.draft.space.personal/self`). Public records are unchanged. The generated types say so too: `space` is now
17
+ required on `pub.techne.draft.permissioned.putRecord`'s input and on each `putRecords` write (a type error
18
+ for code that builds those calls by hand without one).
19
+ - **`put` knows a community draft by the registry's own rule.** A community draft is now a name the
20
+ pinned check's `community::is_community` accepts: `pub.techne.draft.c.<id>.<name>` with an id the
21
+ registry mints (6 to 26 lower-case base32, starting with a letter), in lower case. 0.3.1 matched any
22
+ name under that prefix, without case, so a malformed one (`pub.techne.draft.c.r8fd.toolListing`,
23
+ `Pub.Techne.Draft.C.…`) went to the user's public repo. Such a name is a typo under the platform's
24
+ namespace and now stays private, like any other.
25
+ - **`listPhoneHolds` holds carry `name`.** On a hold the caller asked for, the `name` of the caller's own
26
+ active contact on that number (optional `HoldView.name`). Lexicon description texts are updated
27
+ throughout (the generated doc comments and the WebAssembly's embedded lexicons follow).
14
28
 
15
29
  ## 0.3.1
16
30
 
package/README.md CHANGED
@@ -114,20 +114,10 @@ else {
114
114
 
115
115
  ## Changing it
116
116
 
117
- - **A lexicon changed:** tag the lexicons repo. Set `lexicons.tag` and `lexicons.commit` in `inputs.pin.json` and the `techne-lexicon-check` tag in `Cargo.toml`, then run `cargo update -p techne-lexicon-check` and `node scripts/inputs-sync.mjs --lexicons <lexicons checkout> --platform <platform checkout>`. Then run `npm run codegen` and commit.
118
- - **The platform's API changed:** set `platformApi.rev` (a platform tag for releases), then run the same sync and codegen.
119
- - **The Rust logic changed:** edit `crates/techne-sdk` and run `npm run codegen` (it rebuilds the WebAssembly). The fixtures must still agree.
120
-
121
- `npm run codegen` needs the pinned Rust toolchain (`rust-toolchain.toml`) with the `wasm32-unknown-unknown` target, and `npx` for binaryen. The build is reproducible, so the gate can diff it against the committed one.
122
-
123
- ## The gate
124
-
125
- ```sh
126
- bash scripts/gate.sh # inputs, codegen (no drift), typecheck, test, package, rust
127
- ```
128
-
129
- `package` builds `dist/`, then loads every subpath through `exports` in plain Node and runs the fixtures through the built WebAssembly and wasm2js modules. It also checks the `npm pack` file list with a dry run. `rust` runs the same fixtures through the crate.
117
+ Re-pinning a lexicon or platform API change, rebuilding the generated code and WebAssembly, and the gate
118
+ are in [wiki/development/inputs-and-codegen.md](https://github.com/technefoundation/sdk/blob/main/wiki/development/inputs-and-codegen.md) and
119
+ [wiki/development/gate-and-tests.md](https://github.com/technefoundation/sdk/blob/main/wiki/development/gate-and-tests.md).
130
120
 
131
121
  ## Releasing
132
122
 
133
- See [RELEASING.md](RELEASING.md).
123
+ See [RELEASING.md](https://github.com/technefoundation/sdk/blob/main/RELEASING.md).
@@ -5585,14 +5585,14 @@ export const catalog = {
5585
5585
  "name": "draft.identity.createCollective",
5586
5586
  "group": "pub.techne",
5587
5587
  "kind": "procedure",
5588
- "description": "Make a collective account: a new DID whose credential the platform holds, with a random handle and no records. Nothing is placed or published: the caller then writes as the collective (permissioned.putRecords or com.atproto.repo.applyWrites, repo = the new DID), deciding where its descriptor and memberships live. Until the collective's first record is placed in a space (and for at most a day), its creator may write as it; from then on, whoever passes the manage leg of one of its spaces may, so a creator who will manage it writes its own membership in the first batch. Any signed-in DID; one call spends one of the caller's writes. A retried call makes another, empty, collective.",
5588
+ "description": "Make a collective account: a new DID whose credential the platform holds, with a random handle and no records. Nothing is placed or published: the caller then writes as the collective (permissioned.putRecords or com.atproto.repo.applyWrites, repo = the new DID), deciding where its descriptor and memberships live. Until the collective's first record is placed in a space (and for at most a day), its creator may write as it; from then on, only whoever manages its own member space (`pub.techne.draft.space.collective.member/self`) may; managing another of its spaces (an event's invite space, say) gives no pen. So a creator who will manage it writes its own membership in the first batch. Any signed-in DID; one call spends one of the caller's writes. A retried call makes another, empty, collective.",
5589
5589
  "doc": ({
5590
5590
  "lexicon": 1,
5591
5591
  "id": "pub.techne.draft.identity.createCollective",
5592
5592
  "defs": {
5593
5593
  "main": {
5594
5594
  "type": "procedure",
5595
- "description": "Make a collective account: a new DID whose credential the platform holds, with a random handle and no records. Nothing is placed or published: the caller then writes as the collective (permissioned.putRecords or com.atproto.repo.applyWrites, repo = the new DID), deciding where its descriptor and memberships live. Until the collective's first record is placed in a space (and for at most a day), its creator may write as it; from then on, whoever passes the manage leg of one of its spaces may, so a creator who will manage it writes its own membership in the first batch. Any signed-in DID; one call spends one of the caller's writes. A retried call makes another, empty, collective.",
5595
+ "description": "Make a collective account: a new DID whose credential the platform holds, with a random handle and no records. Nothing is placed or published: the caller then writes as the collective (permissioned.putRecords or com.atproto.repo.applyWrites, repo = the new DID), deciding where its descriptor and memberships live. Until the collective's first record is placed in a space (and for at most a day), its creator may write as it; from then on, only whoever manages its own member space (`pub.techne.draft.space.collective.member/self`) may; managing another of its spaces (an event's invite space, say) gives no pen. So a creator who will manage it writes its own membership in the first batch. Any signed-in DID; one call spends one of the caller's writes. A retried call makes another, empty, collective.",
5596
5596
  "input": {
5597
5597
  "encoding": "application/json",
5598
5598
  "schema": {
@@ -6105,14 +6105,14 @@ export const catalog = {
6105
6105
  "name": "draft.identity.holdForPhone",
6106
6106
  "group": "pub.techne",
6107
6107
  "kind": "procedure",
6108
- "description": "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose space it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.",
6108
+ "description": "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.",
6109
6109
  "doc": ({
6110
6110
  "lexicon": 1,
6111
6111
  "id": "pub.techne.draft.identity.holdForPhone",
6112
6112
  "defs": {
6113
6113
  "main": {
6114
6114
  "type": "procedure",
6115
- "description": "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose space it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.",
6115
+ "description": "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.",
6116
6116
  "input": {
6117
6117
  "encoding": "application/json",
6118
6118
  "schema": {
@@ -6669,14 +6669,14 @@ export const catalog = {
6669
6669
  "name": "draft.identity.listPhoneHolds",
6670
6670
  "group": "pub.techne",
6671
6671
  "kind": "query",
6672
- "description": "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). Holds are identity state, not records, so they are listed here and not through the generic query.",
6672
+ "description": "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). A hold the caller asked for also carries `name`, the name the caller saved for the number in their own contacts, when they did. Holds are identity state, not records, so they are listed here and not through the generic query.",
6673
6673
  "doc": ({
6674
6674
  "lexicon": 1,
6675
6675
  "id": "pub.techne.draft.identity.listPhoneHolds",
6676
6676
  "defs": {
6677
6677
  "main": {
6678
6678
  "type": "query",
6679
- "description": "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). Holds are identity state, not records, so they are listed here and not through the generic query.",
6679
+ "description": "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). A hold the caller asked for also carries `name`, the name the caller saved for the number in their own contacts, when they did. Holds are identity state, not records, so they are listed here and not through the generic query.",
6680
6680
  "parameters": {
6681
6681
  "type": "params",
6682
6682
  "required": [
@@ -6770,6 +6770,10 @@ export const catalog = {
6770
6770
  "createdAt": {
6771
6771
  "type": "string",
6772
6772
  "format": "datetime"
6773
+ },
6774
+ "name": {
6775
+ "type": "string",
6776
+ "description": "On a hold the caller asked for, the name the caller saved for its number: the `name` of the caller's own active `contact` on that number (the newest, when there are several), read when the listing is made. Never on a hold someone else asked for, and nothing of it is stored on the hold."
6773
6777
  }
6774
6778
  }
6775
6779
  }
@@ -8340,15 +8344,15 @@ export const catalog = {
8340
8344
  "name": "draft.permissioned.deleteRecord",
8341
8345
  "group": "pub.techne",
8342
8346
  "kind": "procedure",
8343
- "description": "Delete one of your own permissioned records (or a collective's or circle's whose space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8347
+ "description": "Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8344
8348
  "doc": ({
8345
8349
  "lexicon": 1,
8346
8350
  "id": "pub.techne.draft.permissioned.deleteRecord",
8347
- "description": "Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose space the caller manages (it passes the space's manage leg, so it writes with the authority's pen), else Forbidden; a caller whose account is being deleted, or is deleted, is refused (AccountDeleting). The body is removed; a tombstone receipt stays in listChanges, in the space the record counted in, so readers drop their copies. Deleting a record that does not exist is a no-op unless swapCid is given (then it is InvalidSwap). A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8351
+ "description": "Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not), or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden; a caller whose account is being deleted, or is deleted, is refused (AccountDeleting). The body is removed; a tombstone receipt stays in listChanges, in the space the record counted in, so readers drop their copies. Deleting a record that does not exist is a no-op unless swapCid is given (then it is InvalidSwap). A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8348
8352
  "defs": {
8349
8353
  "main": {
8350
8354
  "type": "procedure",
8351
- "description": "Delete one of your own permissioned records (or a collective's or circle's whose space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8355
+ "description": "Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
8352
8356
  "input": {
8353
8357
  "encoding": "application/json",
8354
8358
  "schema": {
@@ -8853,15 +8857,15 @@ export const catalog = {
8853
8857
  "name": "draft.permissioned.putRecord",
8854
8858
  "group": "pub.techne",
8855
8859
  "kind": "procedure",
8856
- "description": "Write one record into your own repo (or a collective's or circle's whose space you manage) as a permissioned record, for the `space` it names. Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names; else it counts in no space. The output's `space` says where it counts. Writing the current version again is a no-op. One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
8860
+ "description": "Write one record into your own repo (or a collective's or circle's whose own member space you manage) as a permissioned record, for the `space` it names (required: no space is InvalidRequest; public records go through com.atproto.repo.putRecord, and a record only you read goes in your space.personal). Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names; else it counts in no space. The output's `space` says where it counts. Writing the current version again is a no-op. One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
8857
8861
  "doc": ({
8858
8862
  "lexicon": 1,
8859
8863
  "id": "pub.techne.draft.permissioned.putRecord",
8860
- "description": "Write a record into the caller's own repo, as a permissioned record (the generic private write). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose space the caller manages (it passes the space's manage leg, so it writes with the authority's pen), else Forbidden: a record is only ever written into its writer's repo. There is no write gate and no collection check: any collection may be written, for any space. A write is never refused for its space. One collection is refused there: one of the platform's own record types named for an app's space (pub.techne.draft.space.private) is refused as InvalidRequest, since our own types keep their declared homes (the adopted community.lexicon.calendar.event and .rsvp are not refused there: they are the app's own data, and an RSVP there projects no claim). Otherwise what it counts for is the managing app's admission of the version as it is written: the record counts in the `space` it names only when that space's write policy admits the writer and, for a collection with a published lexicon, the space type declares the collection; it is then read by whoever the space's read policy admits. A record for a pub.techne.draft.space.private space counts there only when written by the app its key names (the managing app); written by any other app it is stored and counts in no space (the output has no `space`). Otherwise it is stored in the writer's repo, counts in no space, and only its writer reads it; write it again to ask again. A write into a space whose authority's account is being deleted, or is deleted, is stored the same way and counts in no space (the space goes with that account). A caller whose own account is being deleted, or is deleted, is refused (AccountDeleting). The output's `space` says where it counts. A source keeps what it does not publish in its own pub.techne.draft.space.source (at://{source}/pub.techne.draft.space.source/self): its permissioned descriptions, the `share`s naming its readers (writing one admits its subject, who gets a 'granted' receipt; deleting the last one naming a reader gives a 'revoke-read'. A share keeps one space per key, so it is never moved out of the space: writing it for another space is refused as Conflict), and a scraper's raw payloads and crawl state. A body in a collection with a published lexicon must satisfy it (InvalidRequest otherwise); any other collection is stored as written. Writing the current version again for the same space records no new version: if it counts there it is a no-op; if it was not admitted, admission is asked again, and a version admitted now is placed in the space with a receipt. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, a write to a space they do not cover is refused 403 Forbidden. Draft tier.",
8864
+ "description": "Write a record into the caller's own repo, as a permissioned record (the generic private write). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not), or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden: a record is only ever written into its writer's repo. There is no write gate and no collection check: any collection may be written, for any space. A write is never refused for its space. One collection is refused there: one of the platform's own record types named for an app's space (pub.techne.draft.space.private) is refused as InvalidRequest, since our own types keep their declared homes (the adopted community.lexicon.calendar.event and .rsvp are not refused there: they are the app's own data, and an RSVP there projects no claim). Otherwise what it counts for is the managing app's admission of the version as it is written: the record counts in the `space` it names only when that space's write policy admits the writer and, for a collection with a published lexicon, the space type declares the collection; it is then read by whoever the space's read policy admits. A record for a pub.techne.draft.space.private space counts there only when written by the app its key names (the managing app); written by any other app it is stored and counts in no space (the output has no `space`). Otherwise it is stored in the writer's repo, counts in no space, and only its writer reads it; write it again to ask again. A write into a space whose authority's account is being deleted, or is deleted, is stored the same way and counts in no space (the space goes with that account). A caller whose own account is being deleted, or is deleted, is refused (AccountDeleting). The output's `space` says where it counts. A source keeps what it does not publish in its own pub.techne.draft.space.source (at://{source}/pub.techne.draft.space.source/self): its permissioned descriptions, the `share`s naming its readers (writing one admits its subject, who gets a 'granted' receipt; deleting the last one naming a reader gives a 'revoke-read'. A share keeps one space per key, so it is never moved out of the space: writing it for another space is refused as Conflict), and a scraper's raw payloads and crawl state. A body in a collection with a published lexicon must satisfy it (InvalidRequest otherwise); any other collection is stored as written. Writing the current version again for the same space records no new version: if it counts there it is a no-op; if it was not admitted, admission is asked again, and a version admitted now is placed in the space with a receipt. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, a write to a space they do not cover is refused 403 Forbidden. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.",
8861
8865
  "defs": {
8862
8866
  "main": {
8863
8867
  "type": "procedure",
8864
- "description": "Write one record into your own repo (or a collective's or circle's whose space you manage) as a permissioned record, for the `space` it names. Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names; else it counts in no space. The output's `space` says where it counts. Writing the current version again is a no-op. One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
8868
+ "description": "Write one record into your own repo (or a collective's or circle's whose own member space you manage) as a permissioned record, for the `space` it names (required: no space is InvalidRequest; public records go through com.atproto.repo.putRecord, and a record only you read goes in your space.personal). Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names; else it counts in no space. The output's `space` says where it counts. Writing the current version again is a no-op. One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
8865
8869
  "input": {
8866
8870
  "encoding": "application/json",
8867
8871
  "schema": {
@@ -8870,7 +8874,8 @@ export const catalog = {
8870
8874
  "repo",
8871
8875
  "collection",
8872
8876
  "rkey",
8873
- "record"
8877
+ "record",
8878
+ "space"
8874
8879
  ],
8875
8880
  "properties": {
8876
8881
  "repo": {
@@ -8900,7 +8905,7 @@ export const catalog = {
8900
8905
  "space": {
8901
8906
  "type": "string",
8902
8907
  "format": "at-uri",
8903
- "description": "The space the record is for: at://{authority}/{spaceType}/{skey} (for a source's own records, at://{repo}/pub.techne.draft.space.source/self). Absent: the record is for no space, and only its writer reads it. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again."
8908
+ "description": "The space this record is for. Public records are written with com.atproto.repo.putRecord, not here. Required: at://{authority}/{spaceType}/{skey} (a record only you read goes in your own pub.techne.draft.space.personal, at://{you}/pub.techne.draft.space.personal/self; a source's own records in at://{repo}/pub.techne.draft.space.source/self). A write naming no space is refused as InvalidRequest. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again."
8904
8909
  }
8905
8910
  }
8906
8911
  }
@@ -8941,7 +8946,7 @@ export const catalog = {
8941
8946
  "space": {
8942
8947
  "type": "string",
8943
8948
  "format": "at-uri",
8944
- "description": "The space the record counts in now. Absent when it counts in none (no space was named, or the space's write policy does not admit the writer, or a space.private space written by an app other than the one its key names)."
8949
+ "description": "The space the record counts in now. Absent when it counts in none (the space's write policy does not admit the writer, or a space.private space written by an app other than the one its key names)."
8945
8950
  }
8946
8951
  }
8947
8952
  }
@@ -8949,7 +8954,7 @@ export const catalog = {
8949
8954
  "errors": [
8950
8955
  {
8951
8956
  "name": "InvalidRequest",
8952
- "description": "HTTP 400. Malformed input (a bad DID, NSID, record key or space address, a record whose $type is not collection, or one with no DAG-CBOR form), or a body that fails its collection's published lexicon. Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description)."
8957
+ "description": "HTTP 400. Malformed input (no `space`: name one, since public records go through com.atproto.repo.putRecord; a bad DID, NSID, record key or space address, a record whose $type is not collection, or one with no DAG-CBOR form), or a body that fails its collection's published lexicon. Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description)."
8953
8958
  },
8954
8959
  {
8955
8960
  "name": "Forbidden",
@@ -8993,15 +8998,15 @@ export const catalog = {
8993
8998
  "name": "draft.permissioned.putRecords",
8994
8999
  "group": "pub.techne",
8995
9000
  "kind": "procedure",
8996
- "description": "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op. Space scopes and space.private apply to each write as in putRecord. Draft tier.",
9001
+ "description": "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op. Space scopes and space.private apply to each write as in putRecord. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.",
8997
9002
  "doc": ({
8998
9003
  "lexicon": 1,
8999
9004
  "id": "pub.techne.draft.permissioned.putRecords",
9000
- "description": "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose space the caller manages (it passes the space's manage leg, so it writes with the authority's pen), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op, and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it. Draft tier.",
9005
+ "description": "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not), or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op, and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.",
9001
9006
  "defs": {
9002
9007
  "main": {
9003
9008
  "type": "procedure",
9004
- "description": "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op. Space scopes and space.private apply to each write as in putRecord. Draft tier.",
9009
+ "description": "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op. Space scopes and space.private apply to each write as in putRecord. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.",
9005
9010
  "input": {
9006
9011
  "encoding": "application/json",
9007
9012
  "schema": {
@@ -9055,7 +9060,7 @@ export const catalog = {
9055
9060
  "errors": [
9056
9061
  {
9057
9062
  "name": "InvalidRequest",
9058
- "description": "HTTP 400. Malformed input (a bad repo DID, no writes or more than 200). Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description). A write that is malformed on its own is reported in its result instead."
9063
+ "description": "HTTP 400. Malformed input (a bad repo DID, no writes or more than 200, or a write with no `space`: name one, since public records go through com.atproto.repo.putRecord; nothing is written). Also HTTP 413, 415, 400 or 422 for a request body that is not the method's input (see the description). A write that is malformed on its own is reported in its result instead."
9059
9064
  },
9060
9065
  {
9061
9066
  "name": "Forbidden",
@@ -9081,7 +9086,8 @@ export const catalog = {
9081
9086
  "required": [
9082
9087
  "collection",
9083
9088
  "rkey",
9084
- "record"
9089
+ "record",
9090
+ "space"
9085
9091
  ],
9086
9092
  "properties": {
9087
9093
  "collection": {
@@ -9105,7 +9111,7 @@ export const catalog = {
9105
9111
  "space": {
9106
9112
  "type": "string",
9107
9113
  "format": "at-uri",
9108
- "description": "The space the record is for, as putRecord's `space`. Absent: the record is for no space, and only its writer reads it."
9114
+ "description": "The space this record is for. Public records are written with com.atproto.repo.putRecord, not here. Required: at://{authority}/{spaceType}/{skey} (a record only you read goes in your own pub.techne.draft.space.personal, at://{you}/pub.techne.draft.space.personal/self; a source's own records in at://{repo}/pub.techne.draft.space.source/self). A write naming no space refuses the whole call as InvalidRequest, and nothing is written. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again."
9109
9115
  }
9110
9116
  }
9111
9117
  },
@@ -10285,7 +10291,7 @@ export const catalog = {
10285
10291
  "group": "pub.techne",
10286
10292
  "kind": "record",
10287
10293
  "key": "any",
10288
- "description": "A query over indexed records, as data: sent inline to pub.techne.draft.query.listRecords or countRecords, or published as a record in an app's own repo and run by its URI, so what an app reads is public. The platform runs it only over what the caller may read: every query is scoped to the viewer by the platform (public records not hidden; permissioned records the caller's own, or in a space whose read policy admits the caller now and not a share the reach limit holds for its author), so there is no operator for access. Values that start with `$` are parameters: `$viewer` (the caller's DID) and `$now` (the instant of the call) are filled by the platform, any other the caller passes in `params`; a published query is a template. Each record type declares which of its fields fill the shared roles in its `{collection}.query` document; a type with none is still listable by the roles every record has (`type`, `author`, `space`, `subject`, `written`, `uri`). Before running, the platform checks that every top-level `any` branch is driven by an index and refuses, naming the branch, if not. A feed is a query plus the signals it asks for plus its `weights`, which only the client applies. Draft tier.",
10294
+ "description": "A query over indexed records, as data: sent inline to pub.techne.draft.query.listRecords or countRecords, or published as a record in an app's own repo and run by its URI, so what an app reads is public. The platform runs it only over what the caller may read: every query is scoped to the viewer by the platform (public records not hidden; permissioned records the caller's own, or in a space whose read policy admits the caller now and not an act the reach limit withholds for its author: a held share or circle add), so there is no operator for access. Values that start with `$` are parameters: `$viewer` (the caller's DID) and `$now` (the instant of the call) are filled by the platform, any other the caller passes in `params`; a published query is a template. Each record type declares which of its fields fill the shared roles in its `{collection}.query` document; a type with none is still listable by the roles every record has (`type`, `author`, `space`, `subject`, `written`, `uri`). Before running, the platform checks that every top-level `any` branch is driven by an index and refuses, naming the branch, if not. A feed is a query plus the signals it asks for plus its `weights`, which only the client applies. Draft tier.",
10289
10295
  "fields": [
10290
10296
  {
10291
10297
  "name": "where",
@@ -10326,7 +10332,7 @@ export const catalog = {
10326
10332
  "name": "held",
10327
10333
  "type": "boolean",
10328
10334
  "required": false,
10329
- "description": "Only the signed-in caller's own permissioned records that the reach limit holds back from the people they would reach (each marked `held`; a held share is answered to its author alone). No public record answers; an anonymous caller gets none."
10335
+ "description": "Only the signed-in caller's own permissioned records that the reach limit holds back from the people they would reach (each marked `held`; a held act, a share or a circle add, is answered to its author alone). No public record answers; an anonymous caller gets none."
10330
10336
  },
10331
10337
  {
10332
10338
  "name": "weights",
@@ -10343,7 +10349,7 @@ export const catalog = {
10343
10349
  "doc": ({
10344
10350
  "lexicon": 1,
10345
10351
  "id": "pub.techne.draft.query",
10346
- "description": "A query over indexed records, as data: sent inline to pub.techne.draft.query.listRecords or countRecords, or published as a record in an app's own repo and run by its URI, so what an app reads is public. The platform runs it only over what the caller may read: every query is scoped to the viewer by the platform (public records not hidden; permissioned records the caller's own, or in a space whose read policy admits the caller now and not a share the reach limit holds for its author), so there is no operator for access. Values that start with `$` are parameters: `$viewer` (the caller's DID) and `$now` (the instant of the call) are filled by the platform, any other the caller passes in `params`; a published query is a template. Each record type declares which of its fields fill the shared roles in its `{collection}.query` document; a type with none is still listable by the roles every record has (`type`, `author`, `space`, `subject`, `written`, `uri`). Before running, the platform checks that every top-level `any` branch is driven by an index and refuses, naming the branch, if not. A feed is a query plus the signals it asks for plus its `weights`, which only the client applies. Draft tier.",
10352
+ "description": "A query over indexed records, as data: sent inline to pub.techne.draft.query.listRecords or countRecords, or published as a record in an app's own repo and run by its URI, so what an app reads is public. The platform runs it only over what the caller may read: every query is scoped to the viewer by the platform (public records not hidden; permissioned records the caller's own, or in a space whose read policy admits the caller now and not an act the reach limit withholds for its author: a held share or circle add), so there is no operator for access. Values that start with `$` are parameters: `$viewer` (the caller's DID) and `$now` (the instant of the call) are filled by the platform, any other the caller passes in `params`; a published query is a template. Each record type declares which of its fields fill the shared roles in its `{collection}.query` document; a type with none is still listable by the roles every record has (`type`, `author`, `space`, `subject`, `written`, `uri`). Before running, the platform checks that every top-level `any` branch is driven by an index and refuses, naming the branch, if not. A feed is a query plus the signals it asks for plus its `weights`, which only the client applies. Draft tier.",
10347
10353
  "defs": {
10348
10354
  "main": {
10349
10355
  "type": "record",
@@ -10393,7 +10399,7 @@ export const catalog = {
10393
10399
  "held": {
10394
10400
  "type": "boolean",
10395
10401
  "default": false,
10396
- "description": "Only the signed-in caller's own permissioned records that the reach limit holds back from the people they would reach (each marked `held`; a held share is answered to its author alone). No public record answers; an anonymous caller gets none."
10402
+ "description": "Only the signed-in caller's own permissioned records that the reach limit holds back from the people they would reach (each marked `held`; a held act, a share or a circle add, is answered to its author alone). No public record answers; an anonymous caller gets none."
10397
10403
  },
10398
10404
  "weights": {
10399
10405
  "type": "array",
@@ -11059,7 +11065,7 @@ export const catalog = {
11059
11065
  },
11060
11066
  "held": {
11061
11067
  "type": "boolean",
11062
- "description": "The caller's own permissioned record that the reach limit holds back from the people it would reach: a held share, answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these."
11068
+ "description": "The caller's own permissioned record that the reach limit holds back from the people it would reach: a withheld act (a share or a circle add), answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these."
11063
11069
  },
11064
11070
  "measures": {
11065
11071
  "type": "unknown",
@@ -11546,7 +11552,7 @@ export const catalog = {
11546
11552
  },
11547
11553
  "held": {
11548
11554
  "type": "boolean",
11549
- "description": "The caller's own permissioned record that the reach limit holds back from the people it would reach: a held share, answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these."
11555
+ "description": "The caller's own permissioned record that the reach limit holds back from the people it would reach: a withheld act (a share or a circle add), answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these."
11550
11556
  },
11551
11557
  "measures": {
11552
11558
  "type": "unknown",