techne-sdk 0.1.0 → 0.3.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +48 -2
  3. package/dist/auth/app-key.d.ts +8 -0
  4. package/dist/auth/app-key.js +95 -0
  5. package/dist/auth/index.d.ts +192 -0
  6. package/dist/auth/index.js +230 -0
  7. package/dist/auth/placement.gen.d.ts +1 -0
  8. package/dist/auth/placement.gen.js +50 -0
  9. package/dist/catalog/catalog.gen.js +2161 -681
  10. package/dist/connect.js +2 -1
  11. package/dist/generated/index.d.ts +61 -0
  12. package/dist/generated/index.js +116 -0
  13. package/dist/generated/lexicons.d.ts +3689 -1449
  14. package/dist/generated/lexicons.js +1237 -42
  15. package/dist/generated/nsid.d.ts +23 -1
  16. package/dist/generated/nsid.js +23 -19
  17. package/dist/generated/nsid.json +23 -19
  18. package/dist/generated/records.d.ts +28 -26
  19. package/dist/generated/types/pub/techne/draft/commons/getVersions.d.ts +3 -3
  20. package/dist/generated/types/pub/techne/draft/commons/runChain.d.ts +1 -1
  21. package/dist/generated/types/pub/techne/draft/credential.d.ts +1 -1
  22. package/dist/generated/types/pub/techne/draft/credentialRevocation.d.ts +1 -1
  23. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.d.ts +5 -0
  24. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.js +7 -0
  25. package/dist/generated/types/pub/techne/draft/permissioned/getRecord.d.ts +2 -1
  26. package/dist/generated/types/pub/techne/draft/permissioned/listChanges.d.ts +1 -1
  27. package/dist/generated/types/pub/techne/draft/permissioned/putRecord.d.ts +2 -2
  28. package/dist/generated/types/pub/techne/draft/provenance.d.ts +1 -1
  29. package/dist/generated/types/pub/techne/draft/publisher.d.ts +1 -1
  30. package/dist/generated/types/pub/techne/draft/query/composeRecords.d.ts +152 -0
  31. package/dist/generated/types/pub/techne/draft/query/composeRecords.js +55 -0
  32. package/dist/generated/types/pub/techne/draft/query/getRecords.d.ts +1 -1
  33. package/dist/generated/types/pub/techne/draft/query/listRecords.d.ts +0 -4
  34. package/dist/generated/types/pub/techne/draft/query/listRejections.d.ts +2 -2
  35. package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +42 -0
  36. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +34 -0
  37. package/dist/generated/types/pub/techne/draft/registry/defs.d.ts +112 -0
  38. package/dist/generated/types/pub/techne/draft/registry/defs.js +32 -0
  39. package/dist/generated/types/pub/techne/draft/registry/getType.d.ts +23 -0
  40. package/dist/generated/types/pub/techne/draft/registry/getType.js +20 -0
  41. package/dist/generated/types/pub/techne/draft/registry/getTypeRequest.d.ts +23 -0
  42. package/dist/generated/types/pub/techne/draft/registry/getTypeRequest.js +20 -0
  43. package/dist/generated/types/pub/techne/draft/registry/listTypeRequests.d.ts +27 -0
  44. package/dist/generated/types/pub/techne/draft/registry/listTypeRequests.js +7 -0
  45. package/dist/generated/types/pub/techne/draft/registry/listTypes.d.ts +34 -0
  46. package/dist/generated/types/pub/techne/draft/registry/listTypes.js +7 -0
  47. package/dist/generated/types/pub/techne/draft/registry/publishType.d.ts +77 -0
  48. package/dist/generated/types/pub/techne/draft/registry/publishType.js +83 -0
  49. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +39 -0
  50. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +34 -0
  51. package/dist/generated/types/pub/techne/draft/registry/requestType.d.ts +53 -0
  52. package/dist/generated/types/pub/techne/draft/registry/requestType.js +76 -0
  53. package/dist/generated/types/pub/techne/draft/registry/typeRequest.d.ts +22 -0
  54. package/dist/generated/types/pub/techne/draft/registry/typeRequest.js +12 -0
  55. package/dist/generated/types/pub/techne/draft/sync/indexRecord.d.ts +1 -1
  56. package/dist/generated/types/pub/techne/draft/verdict.d.ts +2 -2
  57. package/dist/platform.d.ts +14 -0
  58. package/dist/platform.js +16 -0
  59. package/dist/put/index.js +17 -7
  60. package/dist/query/index.d.ts +1 -10
  61. package/dist/query/index.js +1 -1
  62. package/dist/types-cli/emit.d.ts +20 -0
  63. package/dist/types-cli/emit.js +217 -0
  64. package/dist/types-cli/main.d.ts +5 -0
  65. package/dist/types-cli/main.js +63 -0
  66. package/dist/types-cli/resolve.d.ts +26 -0
  67. package/dist/types-cli/resolve.js +99 -0
  68. package/dist/wasm/index.d.ts +20 -3
  69. package/dist/wasm/index.js +6 -1
  70. package/dist/wasm/techne-wasm.gen.js +1 -1
  71. package/dist/wasm/techne-wasm2js.gen.js +26425 -25985
  72. package/package.json +23 -6
@@ -2976,14 +2976,14 @@ export const catalog = {
2976
2976
  "name": "draft.commons.getVersions",
2977
2977
  "group": "pub.techne",
2978
2978
  "kind": "query",
2979
- "description": "One public event or place as its versions: the record `uri` resolves to (the curated record of its cluster when there is one, else the record itself), how the curator composed it (its provenance `composition`, read only when the record is a live curated record by a curator the commons root endorses), and each version (each source of the curated record; a source by a retired identity is not a version and gets no rank) with its body, its rank, and the verdict and verification records about it. Versions carrying a verdict with a value in `leaveOut` from a labeler the commons root endorses for that value are left out (counted in `leftOut`). Anyone may call it, signed in or not.",
2979
+ "description": "One public event or place as its versions: the record `uri` resolves to (the curated record of its cluster when there is one, else the record itself), how the curator composed it (its provenance `composition`, read only when the record is a live curated record by a curator an admin writer vouches for), and each version (each source of the curated record; a source by a retired identity is not a version and gets no rank) with its body, its rank, and the verdict and verification records about it. Versions carrying a verdict with a value in `leaveOut` from a verdict writer an admin writer (the commons root, or an operator the root names) vouches for with that value are left out (counted in `leftOut`). Anyone may call it, signed in or not.",
2980
2980
  "doc": ({
2981
2981
  "lexicon": 1,
2982
2982
  "id": "pub.techne.draft.commons.getVersions",
2983
2983
  "defs": {
2984
2984
  "main": {
2985
2985
  "type": "query",
2986
- "description": "One public event or place as its versions: the record `uri` resolves to (the curated record of its cluster when there is one, else the record itself), how the curator composed it (its provenance `composition`, read only when the record is a live curated record by a curator the commons root endorses), and each version (each source of the curated record; a source by a retired identity is not a version and gets no rank) with its body, its rank, and the verdict and verification records about it. Versions carrying a verdict with a value in `leaveOut` from a labeler the commons root endorses for that value are left out (counted in `leftOut`). Anyone may call it, signed in or not.",
2986
+ "description": "One public event or place as its versions: the record `uri` resolves to (the curated record of its cluster when there is one, else the record itself), how the curator composed it (its provenance `composition`, read only when the record is a live curated record by a curator an admin writer vouches for), and each version (each source of the curated record; a source by a retired identity is not a version and gets no rank) with its body, its rank, and the verdict and verification records about it. Versions carrying a verdict with a value in `leaveOut` from a verdict writer an admin writer (the commons root, or an operator the root names) vouches for with that value are left out (counted in `leftOut`). Anyone may call it, signed in or not.",
2987
2987
  "parameters": {
2988
2988
  "type": "params",
2989
2989
  "required": [
@@ -3103,7 +3103,7 @@ export const catalog = {
3103
3103
  },
3104
3104
  "mirror": {
3105
3105
  "type": "boolean",
3106
- "description": "A mirror's copy of an upstream listing: its author wrote a pub.techne.draft.source or pub.techne.draft.sourceRef sidecar about it, and the commons root endorses that author as a source for the record's collection (a sidecar alone is the author's own claim and tags nothing)."
3106
+ "description": "A mirror's copy of an upstream listing: its author wrote a pub.techne.draft.source or pub.techne.draft.sourceRef sidecar about it, and an admin writer vouches for that author as a writer of the record's collection (a sidecar alone is the author's own claim and tags nothing)."
3107
3107
  },
3108
3108
  "verdicts": {
3109
3109
  "type": "array",
@@ -3111,7 +3111,7 @@ export const catalog = {
3111
3111
  "type": "ref",
3112
3112
  "ref": "#verdictView"
3113
3113
  },
3114
- "description": "Verdict records about this version (its CID), from labelers the root endorses for their values."
3114
+ "description": "Verdict records about this version (its CID), from verdict writers an admin writer vouches for with their values."
3115
3115
  },
3116
3116
  "verification": {
3117
3117
  "type": "ref",
@@ -3153,7 +3153,7 @@ export const catalog = {
3153
3153
  "uri": {
3154
3154
  "type": "string",
3155
3155
  "format": "at-uri",
3156
- "description": "The pub.techne.draft.verification record about the author, by an issuer the root endorses for it."
3156
+ "description": "The pub.techne.draft.verification record about the author, by an author an admin writer vouches for as a writer of pub.techne.draft.verification."
3157
3157
  }
3158
3158
  }
3159
3159
  }
@@ -3307,7 +3307,7 @@ export const catalog = {
3307
3307
  "type": "ref",
3308
3308
  "ref": "com.atproto.repo.strongRef"
3309
3309
  },
3310
- "description": "Pointers to the pub.techne.draft.receipt records the runner's curated-stage rules wrote for the canonical record at its current CID (the moderation verdict). A reader lists a curated record only with a receipt for its current CID from every rule the commons root endorses at stage `curated`, so the caller fetches each from its author's PDS, checks its CID and that its subject is the canonical record at the answered CID, and indexes it with the curated record. Absent or empty while none is written yet."
3310
+ "description": "Pointers to the pub.techne.draft.receipt records the runner's curated-stage rules wrote for the canonical record at its current CID (the moderation verdict). A reader lists a curated record only with a receipt for its current CID from every rule at stage `curated` that an admin writer (the commons root, or an operator the root names) vouches for, so the caller fetches each from its author's PDS, checks its CID and that its subject is the canonical record at the answered CID, and indexes it with the curated record. Absent or empty while none is written yet."
3311
3311
  },
3312
3312
  "pending": {
3313
3313
  "type": "boolean",
@@ -3813,13 +3813,13 @@ export const catalog = {
3813
3813
  "name": "revocation",
3814
3814
  "type": "string<at-uri>",
3815
3815
  "required": true,
3816
- "description": "Where the issuer publishes a pub.techne.draft.credentialRevocation if it withdraws this credential (and every re-issue at the same binding id). Absent there = not revoked."
3816
+ "description": "Where the issuer publishes a pub.techne.draft.credentialRevocation if it withdraws this credential (and every re-issue at the same binding id). Absent there = not revoked by the issuer. The commons root can also revoke a commons credential an operator issued, with its own credentialRevocation at the same rkey in the root's repo; a reader counts either."
3817
3817
  },
3818
3818
  {
3819
3819
  "name": "signature",
3820
3820
  "type": "→ #signature",
3821
3821
  "required": false,
3822
- "description": "Present exactly when the credential is stored by its subject; absent only when the commons root publishes it in its own repo (the commit is the proof)."
3822
+ "description": "Present exactly when the credential is stored by its subject; absent only for a commons credential, which its issuer (the commons root, or an operator the root names) publishes in its own repo (the commit is the proof)."
3823
3823
  },
3824
3824
  {
3825
3825
  "name": "createdAt",
@@ -3830,7 +3830,7 @@ export const catalog = {
3830
3830
  "doc": ({
3831
3831
  "lexicon": 1,
3832
3832
  "id": "pub.techne.draft.credential",
3833
- "description": "A verifiable credential: an issuer's statement about one record in its subject's repo (for example a contactChannel the issuer saw the subject prove by a one-time code, or a pub.techne.draft.publisher declaration the commons vouches for: its root, or an operator the root names). Field names follow community.lexicon.attestation and badge.blue: `subject`, `record`, `issuer`, `notBefore`, `notAfter`, `signature`. There is no `kind` field: the attested record's collection is the kind. With `fields`, `digest` is the CID of the canonical DAG-CBOR map of exactly those fields of the attested record, so an edit to any other field (a label) leaves the credential valid; without `fields`, `cid` pins the whole record. It binds in exactly two forms. Stored by its subject and signed (author = `subject`, author ≠ signer): it must carry `signature`, which covers `dagcbor({$type, issuer, subject, record, fields?, digest?, cid?, notBefore, notAfter, revocation})` (ES256K, low-S, over sha256, 64-byte r||s, base64url without padding), never `createdAt` or where the credential is stored, and verifies under `signature.key` in the issuer's DID document; it counts only when the issuer's pub.techne.draft.publisher `issues` covers the attested record's collection and `fields` and a live commons credential (the root's, or an operator's within its period) vouches for that declaration, no record exists at `revocation`, and digest or cid match the attested record now; it is placed only in its subject's pub.techne.draft.space.credential at skey = the record key. A commons credential, published by its issuer in its own repo and unsigned (author = `issuer`; the repo commit is the proof), where the issuer is the commons root (COMMONS_ROOT_DID) or an operator the root names (pub.techne.draft.operator) whose period held when the reader first saw this version of the credential: `record` is an account's pub.techne.draft.publisher at rkey `self` and `cid` that record's current CID; `revocation` must be an address in the issuer's own repo under pub.techne.draft.credentialRevocation, and it counts while no record exists there; it is PUBLIC. Nothing else binds: an unsigned credential from any other issuer, or a copy in any other repo, counts for nothing. `notAfter` is metadata: a credential past it is not void by that alone. An issuer's own identity index is its operational binding ledger, kept from its issuance log; it is not derived from wallet records.",
3833
+ "description": "A verifiable credential: an issuer's statement about one record in its subject's repo (for example a contactChannel the issuer saw the subject prove by a one-time code, or a pub.techne.draft.publisher declaration the commons vouches for: its root, or an operator the root names). Field names follow community.lexicon.attestation and badge.blue: `subject`, `record`, `issuer`, `notBefore`, `notAfter`, `signature`. There is no `kind` field: the attested record's collection is the kind. With `fields`, `digest` is the CID of the canonical DAG-CBOR map of exactly those fields of the attested record, so an edit to any other field (a label) leaves the credential valid; without `fields`, `cid` pins the whole record. It binds in exactly two forms. Stored by its subject and signed (author = `subject`, author ≠ signer): it must carry `signature`, which covers `dagcbor({$type, issuer, subject, record, fields?, digest?, cid?, notBefore, notAfter, revocation})` (ES256K, low-S, over sha256, 64-byte r||s, base64url without padding), never `createdAt` or where the credential is stored, and verifies under `signature.key` in the issuer's DID document; it counts only when the issuer's pub.techne.draft.publisher `issues` covers the attested record's collection and `fields` and a live commons credential (the root's, or an operator's within its period) vouches for that declaration, no record exists at `revocation`, and digest or cid match the attested record now; it is placed only in its subject's pub.techne.draft.space.credential at skey = the record key. A commons credential, published by its issuer in its own repo and unsigned (author = `issuer`; the repo commit is the proof), where the issuer is the commons root (COMMONS_ROOT_DID) or an operator the root names (pub.techne.draft.operator) whose period held when the reader first saw this version of the credential: `record` is an account's pub.techne.draft.publisher at rkey `self` and `cid` that record's current CID; `revocation` must be an address in the issuer's own repo under pub.techne.draft.credentialRevocation, and it counts while no record exists there; it is PUBLIC. The same commons credential approves a request to index a foreign type: `subject` is the registry's DID, `record` a pub.techne.draft.registry.typeRequest in the registry's repo and `cid` that request's CID. Nothing else binds: an unsigned credential from any other issuer, or a copy in any other repo, counts for nothing. `notAfter` is metadata: a credential past it is not void by that alone. An issuer's own identity index is its operational binding ledger, kept from its issuance log; it is not derived from wallet records.",
3834
3834
  "defs": {
3835
3835
  "main": {
3836
3836
  "type": "record",
@@ -3895,12 +3895,12 @@ export const catalog = {
3895
3895
  "revocation": {
3896
3896
  "type": "string",
3897
3897
  "format": "at-uri",
3898
- "description": "Where the issuer publishes a pub.techne.draft.credentialRevocation if it withdraws this credential (and every re-issue at the same binding id). Absent there = not revoked."
3898
+ "description": "Where the issuer publishes a pub.techne.draft.credentialRevocation if it withdraws this credential (and every re-issue at the same binding id). Absent there = not revoked by the issuer. The commons root can also revoke a commons credential an operator issued, with its own credentialRevocation at the same rkey in the root's repo; a reader counts either."
3899
3899
  },
3900
3900
  "signature": {
3901
3901
  "type": "ref",
3902
3902
  "ref": "#signature",
3903
- "description": "Present exactly when the credential is stored by its subject; absent only when the commons root publishes it in its own repo (the commit is the proof)."
3903
+ "description": "Present exactly when the credential is stored by its subject; absent only for a commons credential, which its issuer (the commons root, or an operator the root names) publishes in its own repo (the commit is the proof)."
3904
3904
  },
3905
3905
  "createdAt": {
3906
3906
  "type": "string",
@@ -3971,13 +3971,13 @@ export const catalog = {
3971
3971
  "group": "pub.techne",
3972
3972
  "kind": "record",
3973
3973
  "key": "any",
3974
- "description": "An issuer's withdrawal of a pub.techne.draft.credential: present at the address the credential names in `revocation` = that credential and every re-issue at the same binding id are revoked. Absent = not revoked. Names no subject. PUBLIC, in the issuer's repo; the record key is the binding id (random, so a revocation address is not guessable from the channel or the holder).",
3974
+ "description": "An issuer's withdrawal of a pub.techne.draft.credential: present at the address the credential names in `revocation` = that credential and every re-issue at the same binding id are revoked. Absent = not revoked, unless it is a commons credential and the commons root holds a revocation at the same rkey in its own repo (the root can revoke an operator's credential). Names no subject. PUBLIC, in the issuer's repo; the record key is the binding id (random, so a revocation address is not guessable from the channel or the holder).",
3975
3975
  "fields": [
3976
3976
  {
3977
3977
  "name": "reason",
3978
3978
  "type": "string (enum)",
3979
3979
  "required": true,
3980
- "description": "`unlinked`: the holder removed the method; `deleted`: the holder's account was deleted; `folded`: the method moved to the holder's other account; `superseded`: replaced by a newer binding; `compromised`: the key or the binding was compromised; `withdrawn`: the issuer no longer vouches for it (the commons root revoking a publisher declaration).",
3980
+ "description": "`unlinked`: the holder removed the method; `deleted`: the holder's account was deleted; `folded`: the method moved to the holder's other account; `superseded`: replaced by a newer binding; `compromised`: the key or the binding was compromised; `withdrawn`: the issuer no longer vouches for it (a commons admin writer, the root or an operator, withdrawing its vouching for a publisher declaration).",
3981
3981
  "knownValues": [
3982
3982
  "unlinked",
3983
3983
  "deleted",
@@ -3996,7 +3996,7 @@ export const catalog = {
3996
3996
  "doc": ({
3997
3997
  "lexicon": 1,
3998
3998
  "id": "pub.techne.draft.credentialRevocation",
3999
- "description": "An issuer's withdrawal of a pub.techne.draft.credential: present at the address the credential names in `revocation` = that credential and every re-issue at the same binding id are revoked. Absent = not revoked. Names no subject. PUBLIC, in the issuer's repo; the record key is the binding id (random, so a revocation address is not guessable from the channel or the holder).",
3999
+ "description": "An issuer's withdrawal of a pub.techne.draft.credential: present at the address the credential names in `revocation` = that credential and every re-issue at the same binding id are revoked. Absent = not revoked, unless it is a commons credential and the commons root holds a revocation at the same rkey in its own repo (the root can revoke an operator's credential). Names no subject. PUBLIC, in the issuer's repo; the record key is the binding id (random, so a revocation address is not guessable from the channel or the holder).",
4000
4000
  "defs": {
4001
4001
  "main": {
4002
4002
  "type": "record",
@@ -4019,7 +4019,7 @@ export const catalog = {
4019
4019
  "compromised",
4020
4020
  "withdrawn"
4021
4021
  ],
4022
- "description": "`unlinked`: the holder removed the method; `deleted`: the holder's account was deleted; `folded`: the method moved to the holder's other account; `superseded`: replaced by a newer binding; `compromised`: the key or the binding was compromised; `withdrawn`: the issuer no longer vouches for it (the commons root revoking a publisher declaration)."
4022
+ "description": "`unlinked`: the holder removed the method; `deleted`: the holder's account was deleted; `folded`: the method moved to the holder's other account; `superseded`: replaced by a newer binding; `compromised`: the key or the binding was compromised; `withdrawn`: the issuer no longer vouches for it (a commons admin writer, the root or an operator, withdrawing its vouching for a publisher declaration)."
4023
4023
  },
4024
4024
  "createdAt": {
4025
4025
  "type": "string",
@@ -7919,7 +7919,7 @@ export const catalog = {
7919
7919
  "doc": ({
7920
7920
  "lexicon": 1,
7921
7921
  "id": "pub.techne.draft.operator",
7922
- "description": "The commons root's statement that an account is an operator of the commons for a period. An operator may call the commons' operator methods (rerun jobs, adjudicate pairs, take records down, record releases, and the admin writes the commons makes in the root's repo for it: endorse and revoke rules, retire and un-retire identities, grant and revoke operators) with an atproto service-auth JWT it signs itself, and writes the commons' admin records (credentials that endorse a rule and their revocations, retirements) in its OWN repo, under its own account: a reader counts such a record when its writer is the root, or an operator a record here names whose period held when the reader first saw that version of the record. So an operator's acts stay counted after the period ends, and acts first seen after it do not. Only the root's own operator records count. An operator is cut off by ending the period (`validUntil`, which may be earlier than the edit, back to a compromise), never by deleting the record, which would erase the period the operator's past acts hang on. PUBLIC. Written in the commons root's repo only: by the commons' grantOperator (a new period at `{did}-{millis}` after an ended one) and revokeOperator (sets `validUntil`), which write as the root, or by the root signed in as itself. Each operator ends only its own acts (a revocation at its credential's address, deleting its own retirement). Read by the commons, the AppView and the rules runner.",
7922
+ "description": "The commons root's statement that an account is an operator of the commons for a period. An operator may call the commons' operator methods (rerun jobs and rules, pause rules, index a record, grant provider allowances, record releases, register and run scrapers, and the operator-only lists) with an atproto service-auth JWT it signs itself, and writes in its OWN repo, under its own account, the commons' admin records (credentials that endorse a rule and their revocations, retirements), which a reader counts when its writer is the root, or an operator a record here names whose period held when the reader first saw that version of the record. An operator's pair decisions and `!takedown` verdicts are ordinary records of its own: they count only while a live commons credential vouches for its declaration (provenancePolicy#vouchedWriter). So an operator's acts stay counted after the period ends, and acts first seen after it do not. Only the root's own operator records count. An operator is cut off by ending the period (`validUntil`, which may be earlier than the edit, back to a compromise), never by deleting the record, which would erase the period the operator's past acts hang on. PUBLIC. Written in the commons root's repo only, by the root signed in as itself (the commons' web app: granting writes a new period, at `{did}-{millis}` after an ended one; revoking sets `validUntil`). Each operator ends only its own acts (a revocation at its credential's address, deleting its own retirement); the root can also revoke an operator's credential, at the same rkey in the root's repo, but never ends an operator's retirement. Read by the commons, the AppView and the rules runner.",
7923
7923
  "defs": {
7924
7924
  "main": {
7925
7925
  "type": "record",
@@ -8340,14 +8340,15 @@ export const catalog = {
8340
8340
  "name": "draft.permissioned.deleteRecord",
8341
8341
  "group": "pub.techne",
8342
8342
  "kind": "procedure",
8343
- "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). Draft tier.",
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.",
8344
8344
  "doc": ({
8345
8345
  "lexicon": 1,
8346
8346
  "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). Draft tier.",
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.",
8348
8348
  "defs": {
8349
8349
  "main": {
8350
8350
  "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.",
8351
8352
  "input": {
8352
8353
  "encoding": "application/json",
8353
8354
  "schema": {
@@ -8376,6 +8377,11 @@ export const catalog = {
8376
8377
  "type": "string",
8377
8378
  "format": "cid",
8378
8379
  "description": "Delete only if the record's current CID is this one."
8380
+ },
8381
+ "space": {
8382
+ "type": "string",
8383
+ "format": "at-uri",
8384
+ "description": "The space the record was written for (its putRecord space). One key holds one record per space (the 0016 record address), so this names which one goes. Absent: the record at the key whatever its space, refused as Conflict when the key holds records for more than one space."
8379
8385
  }
8380
8386
  }
8381
8387
  }
@@ -8410,6 +8416,10 @@ export const catalog = {
8410
8416
  "name": "InvalidSwap",
8411
8417
  "description": "HTTP 409. swapCid did not match the current version."
8412
8418
  },
8419
+ {
8420
+ "name": "Conflict",
8421
+ "description": "HTTP 409. No space was given and the key holds records for more than one space."
8422
+ },
8413
8423
  {
8414
8424
  "name": "AuthenticationRequired",
8415
8425
  "description": "HTTP 401. No credential, or one that fails verification (for a service-auth JWT: wrong aud or lxm, expired, replayed, or an issuer whose key does not resolve right now; retry later in that case)."
@@ -8428,11 +8438,11 @@ export const catalog = {
8428
8438
  "name": "draft.permissioned.getGrants",
8429
8439
  "group": "pub.techne",
8430
8440
  "kind": "query",
8431
- "description": "Who may read an owner's source space (pub.techne.draft.space.source) beside the owner: the DIDs named by the `share` records the owner placed there, so a source can see its audience before it writes (putRecord echoes it too). The owner sets its audience itself, by writing and deleting shares; nothing else adds a reader. 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). Callable by the owner itself; anyone else is Forbidden. Draft tier.",
8441
+ "description": "Who may read an owner's source space (pub.techne.draft.space.source) beside the owner: the DIDs named by the `share` records the owner placed there, so a source can see its audience before it writes (putRecord echoes it too). The owner sets its audience itself, by writing and deleting shares; nothing else adds a reader. 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). Callable by the owner itself; anyone else is Forbidden. When the call's token carries space scopes from Techne's ePDS, they must cover reading the owner's source space (403 Forbidden otherwise). Draft tier.",
8432
8442
  "doc": ({
8433
8443
  "lexicon": 1,
8434
8444
  "id": "pub.techne.draft.permissioned.getGrants",
8435
- "description": "Who may read an owner's source space (pub.techne.draft.space.source) beside the owner: the DIDs named by the `share` records the owner placed there, so a source can see its audience before it writes (putRecord echoes it too). The owner sets its audience itself, by writing and deleting shares; nothing else adds a reader. 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). Callable by the owner itself; anyone else is Forbidden. Draft tier.",
8445
+ "description": "Who may read an owner's source space (pub.techne.draft.space.source) beside the owner: the DIDs named by the `share` records the owner placed there, so a source can see its audience before it writes (putRecord echoes it too). The owner sets its audience itself, by writing and deleting shares; nothing else adds a reader. 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). Callable by the owner itself; anyone else is Forbidden. When the call's token carries space scopes from Techne's ePDS, they must cover reading the owner's source space (403 Forbidden otherwise). Draft tier.",
8436
8446
  "defs": {
8437
8447
  "main": {
8438
8448
  "type": "query",
@@ -8491,11 +8501,11 @@ export const catalog = {
8491
8501
  "name": "draft.permissioned.getRecord",
8492
8502
  "group": "pub.techne",
8493
8503
  "kind": "query",
8494
- "description": "Read one permissioned record. 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). The caller reads its own records, and a record that counts in a space whose read policy admits the caller (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants). Anything else is RecordNotFound, exactly like a record that does not exist, so an unshared space is not revealed. Read access is use access. Draft tier.",
8504
+ "description": "Read one permissioned record. 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). The caller reads its own records, and a record that counts in a space whose read policy admits the caller (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants). Anything else is RecordNotFound, exactly like a record that does not exist, so an unshared space is not revealed. Read access is use access. When the call's token carries space scopes from Techne's ePDS, only records in spaces the scopes cover are returned. Draft tier.",
8495
8505
  "doc": ({
8496
8506
  "lexicon": 1,
8497
8507
  "id": "pub.techne.draft.permissioned.getRecord",
8498
- "description": "Read one permissioned record. 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). The caller reads its own records, and a record that counts in a space whose read policy admits the caller (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants). Anything else is RecordNotFound, exactly like a record that does not exist, so an unshared space is not revealed. Read access is use access. Draft tier.",
8508
+ "description": "Read one permissioned record. 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). The caller reads its own records, and a record that counts in a space whose read policy admits the caller (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants). Anything else is RecordNotFound, exactly like a record that does not exist, so an unshared space is not revealed. Read access is use access. When the call's token carries space scopes from Techne's ePDS, only records in spaces the scopes cover are returned. Draft tier.",
8499
8509
  "defs": {
8500
8510
  "main": {
8501
8511
  "type": "query",
@@ -8508,7 +8518,7 @@ export const catalog = {
8508
8518
  "uri": {
8509
8519
  "type": "string",
8510
8520
  "format": "at-uri",
8511
- "description": "at://{did}/{collection}/{rkey}, with a DID authority. (Native 0016 spaces address a permissioned record by its space URI instead.)"
8521
+ "description": "The record's address, with DID authorities: the 0016 space record address at://{spaceAuthority}/space/{spaceType}/{skey}/{did}/{collection}/{rkey} names the record written for that space; the 3-part at://{did}/{collection}/{rkey} names none, and answers only when exactly one record at that key may be read by the caller (one key may hold one record per space)."
8512
8522
  }
8513
8523
  }
8514
8524
  },
@@ -8525,7 +8535,8 @@ export const catalog = {
8525
8535
  "properties": {
8526
8536
  "uri": {
8527
8537
  "type": "string",
8528
- "format": "at-uri"
8538
+ "format": "at-uri",
8539
+ "description": "The address the record was asked for by: a 0016 read is answered under its 0016 address."
8529
8540
  },
8530
8541
  "cid": {
8531
8542
  "type": "string",
@@ -8564,11 +8575,11 @@ export const catalog = {
8564
8575
  "name": "draft.permissioned.listChanges",
8565
8576
  "group": "pub.techne",
8566
8577
  "kind": "query",
8567
- "description": "The ordered receipts of every generic private write and delete the caller may read: its own; and of others' records, those counting in a space whose read policy admits the caller now, as far as the caller would have been told them had it been reading all along: an upsert of the version that is current there; in an owner's source space, anything after the latest receipt of a share that admits the caller now (and not from before that share's validFrom), tombstones and superseded versions included; and, in the live feed (no did), a tombstone once the caller's cursor has passed the first receipt of the versions it retracts from that space, so a reader new to the feed is told no delete written before it read, which in a source space must also come after the caller's latest grant receipt from that owner ('granted' or 'revoke-read'): a delete written during a gap that ends in 'granted' is not told, and a share renewed, replaced under another key, or outlived by an overlapping one writes no grant receipt and hides no delete. Plus the caller's grant receipts (an owner's source space shared with it, or no longer). When an account is deleted its readers are told first: a tombstone for each of its records counting in someone else's space, and a 'revoke-read' to each reader of its source space. Known limit: the cursor is global, so a reader that kept polling while a space admitting it by claim was closed to it can later be told a tombstone (no body) of a record from before its admission there; likewise in a source space whose share lapsed by time (its validUntil passed) and was later rewritten or followed by another: a lapse leaves no receipt, so the caller may be told a tombstone it does not need. Both err toward showing a delete, never toward hiding one. Known limit: an account deletion tells nothing to the readers of the deleted account's own spaces other than its source space (those admitting readers by claim): the space and every record in it, its own and other writers', go with the account, and a reader keeps the copies it has. 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). Page forward with the returned cursor; an empty page returns the cursor it was given. seq is global, so a reader told 'granted' backfills that owner by paging with did set to the owner from cursor 0. Draft tier.",
8578
+ "description": "The ordered receipts of every generic private write and delete the caller may read: its own; and of others' records, those counting in a space whose read policy admits the caller now, as far as the caller would have been told them had it been reading all along: an upsert of the version that is current there; in an owner's source space, anything after the latest receipt of a share that admits the caller now (and not from before that share's validFrom), tombstones and superseded versions included; and, in the live feed (no did), a tombstone once the caller's cursor has passed the first receipt of the versions it retracts from that space, so a reader new to the feed is told no delete written before it read, which in a source space must also come after the caller's latest grant receipt from that owner ('granted' or 'revoke-read'): a delete written during a gap that ends in 'granted' is not told, and a share renewed, replaced under another key, or outlived by an overlapping one writes no grant receipt and hides no delete. Plus the caller's grant receipts (an owner's source space shared with it, or no longer). When an account is deleted its readers are told first: a tombstone for each of its records counting in someone else's space, and a 'revoke-read' to each reader of its source space. Known limit: the cursor is global, so a reader that kept polling while a space admitting it by claim was closed to it can later be told a tombstone (no body) of a record from before its admission there; likewise in a source space whose share lapsed by time (its validUntil passed) and was later rewritten or followed by another: a lapse leaves no receipt, so the caller may be told a tombstone it does not need. Both err toward showing a delete, never toward hiding one. Known limit: an account deletion tells nothing to the readers of the deleted account's own spaces other than its source space (those admitting readers by claim): the space and every record in it, its own and other writers', go with the account, and a reader keeps the copies it has. 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). Page forward with the returned cursor; an empty page returns the cursor it was given. seq is global, so a reader told 'granted' backfills that owner by paging with did set to the owner from cursor 0. When the call's token carries space scopes from Techne's ePDS, only receipts for records in spaces the scopes cover are returned, and no grant receipts unless a scope covers every space. Draft tier.",
8568
8579
  "doc": ({
8569
8580
  "lexicon": 1,
8570
8581
  "id": "pub.techne.draft.permissioned.listChanges",
8571
- "description": "The ordered receipts of every generic private write and delete the caller may read: its own; and of others' records, those counting in a space whose read policy admits the caller now, as far as the caller would have been told them had it been reading all along: an upsert of the version that is current there; in an owner's source space, anything after the latest receipt of a share that admits the caller now (and not from before that share's validFrom), tombstones and superseded versions included; and, in the live feed (no did), a tombstone once the caller's cursor has passed the first receipt of the versions it retracts from that space, so a reader new to the feed is told no delete written before it read, which in a source space must also come after the caller's latest grant receipt from that owner ('granted' or 'revoke-read'): a delete written during a gap that ends in 'granted' is not told, and a share renewed, replaced under another key, or outlived by an overlapping one writes no grant receipt and hides no delete. Plus the caller's grant receipts (an owner's source space shared with it, or no longer). When an account is deleted its readers are told first: a tombstone for each of its records counting in someone else's space, and a 'revoke-read' to each reader of its source space. Known limit: the cursor is global, so a reader that kept polling while a space admitting it by claim was closed to it can later be told a tombstone (no body) of a record from before its admission there; likewise in a source space whose share lapsed by time (its validUntil passed) and was later rewritten or followed by another: a lapse leaves no receipt, so the caller may be told a tombstone it does not need. Both err toward showing a delete, never toward hiding one. Known limit: an account deletion tells nothing to the readers of the deleted account's own spaces other than its source space (those admitting readers by claim): the space and every record in it, its own and other writers', go with the account, and a reader keeps the copies it has. 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). Page forward with the returned cursor; an empty page returns the cursor it was given. seq is global, so a reader told 'granted' backfills that owner by paging with did set to the owner from cursor 0. Draft tier.",
8582
+ "description": "The ordered receipts of every generic private write and delete the caller may read: its own; and of others' records, those counting in a space whose read policy admits the caller now, as far as the caller would have been told them had it been reading all along: an upsert of the version that is current there; in an owner's source space, anything after the latest receipt of a share that admits the caller now (and not from before that share's validFrom), tombstones and superseded versions included; and, in the live feed (no did), a tombstone once the caller's cursor has passed the first receipt of the versions it retracts from that space, so a reader new to the feed is told no delete written before it read, which in a source space must also come after the caller's latest grant receipt from that owner ('granted' or 'revoke-read'): a delete written during a gap that ends in 'granted' is not told, and a share renewed, replaced under another key, or outlived by an overlapping one writes no grant receipt and hides no delete. Plus the caller's grant receipts (an owner's source space shared with it, or no longer). When an account is deleted its readers are told first: a tombstone for each of its records counting in someone else's space, and a 'revoke-read' to each reader of its source space. Known limit: the cursor is global, so a reader that kept polling while a space admitting it by claim was closed to it can later be told a tombstone (no body) of a record from before its admission there; likewise in a source space whose share lapsed by time (its validUntil passed) and was later rewritten or followed by another: a lapse leaves no receipt, so the caller may be told a tombstone it does not need. Both err toward showing a delete, never toward hiding one. Known limit: an account deletion tells nothing to the readers of the deleted account's own spaces other than its source space (those admitting readers by claim): the space and every record in it, its own and other writers', go with the account, and a reader keeps the copies it has. 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). Page forward with the returned cursor; an empty page returns the cursor it was given. seq is global, so a reader told 'granted' backfills that owner by paging with did set to the owner from cursor 0. When the call's token carries space scopes from Techne's ePDS, only receipts for records in spaces the scopes cover are returned, and no grant receipts unless a scope covers every space. Draft tier.",
8572
8583
  "defs": {
8573
8584
  "main": {
8574
8585
  "type": "query",
@@ -8633,7 +8644,7 @@ export const catalog = {
8633
8644
  },
8634
8645
  "recordChange": {
8635
8646
  "type": "object",
8636
- "description": "A write or delete in an owner's repo. A delete's receipt is its tombstone.",
8647
+ "description": "A write or delete in an owner's repo. A delete's receipt is its tombstone. One key (did, collection, rkey) may hold one record per space (the 0016 record address), so a reader keys its copies by (did, collection, rkey, space): a tombstone retracts only the copy with its space, never another space's record at the same key.",
8637
8648
  "required": [
8638
8649
  "seq",
8639
8650
  "did",
@@ -8726,11 +8737,11 @@ export const catalog = {
8726
8737
  "name": "draft.permissioned.listRecords",
8727
8738
  "group": "pub.techne",
8728
8739
  "kind": "query",
8729
- "description": "List one repo's current permissioned records in one collection that the caller may read, in ascending record key order (there is no reverse): the caller's own records, and those counting in a space whose read policy admits the caller now (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants), not taken down. A record the caller may not read is left out, exactly like one that does not exist, so a repo with nothing the caller may read returns an empty page and an unshared space is not revealed. Deleted records are not listed (their tombstones are in listChanges). Use it to learn what a repo holds now without replaying its receipts; use listChanges to follow what changes. A caller reading another owner's records should pass space, the space it reads them in: at atproto's permissioned data (proposal 0016) a permissioned listing is per space, under that space's credential, and a record's address there names its space, so a listing across spaces has no counterpart to move to. 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). Read access is use access. Draft tier.",
8740
+ "description": "List one repo's current permissioned records in one collection that the caller may read, in ascending record key order (there is no reverse): the caller's own records, and those counting in a space whose read policy admits the caller now (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants), not taken down. A record the caller may not read is left out, exactly like one that does not exist, so a repo with nothing the caller may read returns an empty page and an unshared space is not revealed. Deleted records are not listed (their tombstones are in listChanges). Use it to learn what a repo holds now without replaying its receipts; use listChanges to follow what changes. A caller reading another owner's records should pass space, the space it reads them in: at atproto's permissioned data (proposal 0016) a permissioned listing is per space, under that space's credential, and a record's address there names its space, so a listing across spaces has no counterpart to move to. 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). Read access is use access. When the call's token carries space scopes from Techne's ePDS, only records in spaces the scopes cover are returned. Draft tier.",
8730
8741
  "doc": ({
8731
8742
  "lexicon": 1,
8732
8743
  "id": "pub.techne.draft.permissioned.listRecords",
8733
- "description": "List one repo's current permissioned records in one collection that the caller may read, in ascending record key order (there is no reverse): the caller's own records, and those counting in a space whose read policy admits the caller now (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants), not taken down. A record the caller may not read is left out, exactly like one that does not exist, so a repo with nothing the caller may read returns an empty page and an unshared space is not revealed. Deleted records are not listed (their tombstones are in listChanges). Use it to learn what a repo holds now without replaying its receipts; use listChanges to follow what changes. A caller reading another owner's records should pass space, the space it reads them in: at atproto's permissioned data (proposal 0016) a permissioned listing is per space, under that space's credential, and a record's address there names its space, so a listing across spaces has no counterpart to move to. 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). Read access is use access. Draft tier.",
8744
+ "description": "List one repo's current permissioned records in one collection that the caller may read, in ascending record key order (there is no reverse): the caller's own records, and those counting in a space whose read policy admits the caller now (for a source space: the owner and every DID a `share` the owner placed there names; see getGrants), not taken down. A record the caller may not read is left out, exactly like one that does not exist, so a repo with nothing the caller may read returns an empty page and an unshared space is not revealed. Deleted records are not listed (their tombstones are in listChanges). Use it to learn what a repo holds now without replaying its receipts; use listChanges to follow what changes. A caller reading another owner's records should pass space, the space it reads them in: at atproto's permissioned data (proposal 0016) a permissioned listing is per space, under that space's credential, and a record's address there names its space, so a listing across spaces has no counterpart to move to. 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). Read access is use access. When the call's token carries space scopes from Techne's ePDS, only records in spaces the scopes cover are returned. Draft tier.",
8734
8745
  "defs": {
8735
8746
  "main": {
8736
8747
  "type": "query",
@@ -8842,14 +8853,15 @@ export const catalog = {
8842
8853
  "name": "draft.permissioned.putRecord",
8843
8854
  "group": "pub.techne",
8844
8855
  "kind": "procedure",
8845
- "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. No write is refused for its collection or its space; 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. 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, or moving it out of the space, gives a 'revoke-read'), 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). Draft tier.",
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.",
8846
8857
  "doc": ({
8847
8858
  "lexicon": 1,
8848
8859
  "id": "pub.techne.draft.permissioned.putRecord",
8849
- "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. No write is refused for its collection or its space; 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. 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, or moving it out of the space, gives a 'revoke-read'), 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). Draft tier.",
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.",
8850
8861
  "defs": {
8851
8862
  "main": {
8852
8863
  "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.",
8853
8865
  "input": {
8854
8866
  "encoding": "application/json",
8855
8867
  "schema": {
@@ -8888,7 +8900,7 @@ export const catalog = {
8888
8900
  "space": {
8889
8901
  "type": "string",
8890
8902
  "format": "at-uri",
8891
- "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."
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."
8892
8904
  }
8893
8905
  }
8894
8906
  }
@@ -8929,7 +8941,7 @@ export const catalog = {
8929
8941
  "space": {
8930
8942
  "type": "string",
8931
8943
  "format": "at-uri",
8932
- "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)."
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)."
8933
8945
  }
8934
8946
  }
8935
8947
  }
@@ -8957,7 +8969,7 @@ export const catalog = {
8957
8969
  },
8958
8970
  {
8959
8971
  "name": "Conflict",
8960
- "description": "HTTP 409. The same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded (read the record back)."
8972
+ "description": "HTTP 409. The same key holds a public record in the caller's repo, or a claim (a share, membership, connection and the like keep one space per key) written for another space, or a concurrent write replaced this version before it was recorded (read the record back)."
8961
8973
  },
8962
8974
  {
8963
8975
  "name": "IdentityConflict",
@@ -8981,14 +8993,15 @@ export const catalog = {
8981
8993
  "name": "draft.permissioned.putRecords",
8982
8994
  "group": "pub.techne",
8983
8995
  "kind": "procedure",
8984
- "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. Draft tier.",
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.",
8985
8997
  "doc": ({
8986
8998
  "lexicon": 1,
8987
8999
  "id": "pub.techne.draft.permissioned.putRecords",
8988
- "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. Draft tier.",
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.",
8989
9001
  "defs": {
8990
9002
  "main": {
8991
9003
  "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.",
8992
9005
  "input": {
8993
9006
  "encoding": "application/json",
8994
9007
  "schema": {
@@ -9938,7 +9951,7 @@ export const catalog = {
9938
9951
  },
9939
9952
  "composition": {
9940
9953
  "type": "object",
9941
- "description": "How the curated record was composed from its sources. Each source is a version, ranked: 1 a source the commons root vouches for in the collection (a mirror, a rule, a collective: its pub.techne.draft.publisher `writes` holds the collection and a live root pub.techne.draft.credential pins that declaration), 2 a verified account (a pub.techne.draft.verification by an issuer whose vouched declaration writes pub.techne.draft.verification) or a member of a collective vouched for to write membership claims (its vouched declaration's `writes` holds pub.techne.draft.membership), 3 everyone else. Per field the best rank wins, ties going to the newest edit; a rank 3 version only fills blanks or stands alone. A version with a moderation verdict the curator honours is left out (it has no rank here and gives no field), and so is a source by a retired identity: it is not a version. Readers show the composition as the default and may let a person pick another version.",
9954
+ "description": "How the curated record was composed from its sources. Each source is a version, ranked: 1 a source an admin writer vouches for in the collection (a mirror, a rule, a collective: its pub.techne.draft.publisher `writes` holds the collection and a live pub.techne.draft.credential from the commons root, or from an operator the root names, pins that declaration), 2 a verified account (a pub.techne.draft.verification by an issuer whose vouched declaration writes pub.techne.draft.verification) or a member of a collective vouched for to write membership claims (its vouched declaration's `writes` holds pub.techne.draft.membership), 3 everyone else. Per field the best rank wins, ties going to the newest edit; a rank 3 version only fills blanks or stands alone. A version with a moderation verdict the curator honours is left out (it has no rank here and gives no field), and so is a source by a retired identity: it is not a version. Readers show the composition as the default and may let a person pick another version.",
9942
9955
  "required": [
9943
9956
  "byline",
9944
9957
  "ranks"
@@ -10050,7 +10063,7 @@ export const catalog = {
10050
10063
  "group": "pub.techne",
10051
10064
  "kind": "record",
10052
10065
  "key": "literal:self",
10053
- "description": "An account's own declaration of what it publishes and vouches for: its name, the code it runs (if any), the record collections it reads and writes, the labels it may assign, and the credentials it issues. Written by the account in its own repo at rkey `self`. A declaration grants nothing alone: a reader trusts it only while a root the reader trusts (for the commons, the commons root, COMMONS_ROOT_DID) holds a live pub.techne.draft.credential in the root's own repo whose `subject` is this account, whose `record` is this record and whose `cid` is this record's current CID, and whose `revocation` is an address in the root's own repo under pub.techne.draft.credentialRevocation at which no record exists. Editing the declaration changes its CID, so it is untrusted until the root re-issues; revoking withdraws trust in everything the account published, past records included. Used by rules, mirrors, collectives and credential issuers alike. PUBLIC. Read by the rules runner, the curator, the commons and the AppView.",
10066
+ "description": "An account's own declaration of what it publishes and vouches for: its name, the code it runs (if any), the record collections it reads and writes, the labels it may assign, and the credentials it issues. Written by the account in its own repo at rkey `self`. A declaration grants nothing alone: a reader trusts it only while an admin writer the reader trusts holds a live pub.techne.draft.credential in the writer's own repo whose `subject` is this account, whose `record` is this record and whose `cid` is this record's current CID, and whose `revocation` is an address in that repo under pub.techne.draft.credentialRevocation at which no record exists. For the commons the admin writers are the commons root (COMMONS_ROOT_DID) and the operators it names (pub.techne.draft.provenancePolicy#vouchedWriter); the root can also revoke an operator's credential at the same rkey in its own repo. Editing the declaration changes its CID, so it is untrusted until an admin writer re-issues; revoking withdraws trust in everything the account published, past records included. Used by rules, mirrors, collectives and credential issuers alike. PUBLIC. Read by the rules runner, the curator, the commons and the AppView.",
10054
10067
  "fields": [
10055
10068
  {
10056
10069
  "name": "name",
@@ -10120,7 +10133,7 @@ export const catalog = {
10120
10133
  "name": "issues",
10121
10134
  "type": "array<→ #issue>",
10122
10135
  "required": false,
10123
- "description": "The credentials the account issues about a holder's record. Its pub.techne.draft.credential counts only while the root vouches for this declaration and the attested record is in an entry's `collection`, signed and stored by the subject, when the credential's `fields` are a subset of that entry's `fields` (a whole-record credential, by `cid`, only when that entry's `fields` is empty). Absent or empty: it issues none."
10136
+ "description": "The credentials the account issues about a holder's record. Its pub.techne.draft.credential counts only while an admin writer (the root, or an operator the root names) vouches for this declaration and the attested record is in an entry's `collection`, signed and stored by the subject, when the credential's `fields` are a subset of that entry's `fields` (a whole-record credential, by `cid`, only when that entry's `fields` is empty). Absent or empty: it issues none."
10124
10137
  },
10125
10138
  {
10126
10139
  "name": "createdAt",
@@ -10131,7 +10144,7 @@ export const catalog = {
10131
10144
  "doc": ({
10132
10145
  "lexicon": 1,
10133
10146
  "id": "pub.techne.draft.publisher",
10134
- "description": "An account's own declaration of what it publishes and vouches for: its name, the code it runs (if any), the record collections it reads and writes, the labels it may assign, and the credentials it issues. Written by the account in its own repo at rkey `self`. A declaration grants nothing alone: a reader trusts it only while a root the reader trusts (for the commons, the commons root, COMMONS_ROOT_DID) holds a live pub.techne.draft.credential in the root's own repo whose `subject` is this account, whose `record` is this record and whose `cid` is this record's current CID, and whose `revocation` is an address in the root's own repo under pub.techne.draft.credentialRevocation at which no record exists. Editing the declaration changes its CID, so it is untrusted until the root re-issues; revoking withdraws trust in everything the account published, past records included. Used by rules, mirrors, collectives and credential issuers alike. PUBLIC. Read by the rules runner, the curator, the commons and the AppView.",
10147
+ "description": "An account's own declaration of what it publishes and vouches for: its name, the code it runs (if any), the record collections it reads and writes, the labels it may assign, and the credentials it issues. Written by the account in its own repo at rkey `self`. A declaration grants nothing alone: a reader trusts it only while an admin writer the reader trusts holds a live pub.techne.draft.credential in the writer's own repo whose `subject` is this account, whose `record` is this record and whose `cid` is this record's current CID, and whose `revocation` is an address in that repo under pub.techne.draft.credentialRevocation at which no record exists. For the commons the admin writers are the commons root (COMMONS_ROOT_DID) and the operators it names (pub.techne.draft.provenancePolicy#vouchedWriter); the root can also revoke an operator's credential at the same rkey in its own repo. Editing the declaration changes its CID, so it is untrusted until an admin writer re-issues; revoking withdraws trust in everything the account published, past records included. Used by rules, mirrors, collectives and credential issuers alike. PUBLIC. Read by the rules runner, the curator, the commons and the AppView.",
10135
10148
  "defs": {
10136
10149
  "main": {
10137
10150
  "type": "record",
@@ -10225,7 +10238,7 @@ export const catalog = {
10225
10238
  "type": "ref",
10226
10239
  "ref": "#issue"
10227
10240
  },
10228
- "description": "The credentials the account issues about a holder's record. Its pub.techne.draft.credential counts only while the root vouches for this declaration and the attested record is in an entry's `collection`, signed and stored by the subject, when the credential's `fields` are a subset of that entry's `fields` (a whole-record credential, by `cid`, only when that entry's `fields` is empty). Absent or empty: it issues none."
10241
+ "description": "The credentials the account issues about a holder's record. Its pub.techne.draft.credential counts only while an admin writer (the root, or an operator the root names) vouches for this declaration and the attested record is in an entry's `collection`, signed and stored by the subject, when the credential's `fields` are a subset of that entry's `fields` (a whole-record credential, by `cid`, only when that entry's `fields` is empty). Absent or empty: it issues none."
10229
10242
  },
10230
10243
  "createdAt": {
10231
10244
  "type": "string",
@@ -10303,11 +10316,6 @@ export const catalog = {
10303
10316
  "required": false,
10304
10317
  "description": "The page size when the call names none."
10305
10318
  },
10306
- {
10307
- "name": "include",
10308
- "type": "→ #include",
10309
- "required": false
10310
- },
10311
10319
  {
10312
10320
  "name": "curated",
10313
10321
  "type": "boolean",
@@ -10373,14 +10381,10 @@ export const catalog = {
10373
10381
  "limit": {
10374
10382
  "type": "integer",
10375
10383
  "minimum": 1,
10376
- "maximum": 100,
10384
+ "maximum": 500,
10377
10385
  "default": 50,
10378
10386
  "description": "The page size when the call names none."
10379
10387
  },
10380
- "include": {
10381
- "type": "ref",
10382
- "ref": "#include"
10383
- },
10384
10388
  "curated": {
10385
10389
  "type": "boolean",
10386
10390
  "default": true,
@@ -10409,7 +10413,7 @@ export const catalog = {
10409
10413
  },
10410
10414
  "node": {
10411
10415
  "type": "object",
10412
- "description": "One node of the `where` tree: exactly one property. `all` (every child holds), `any` (at least one holds; at the top level each child is a branch the platform runs on its own index), `not` (a list of one node that must not hold; it narrows and never drives a branch), or a leaf naming one role with one condition. A leaf that produces a number (`near`, `matches`) is allowed only at the top of a branch.",
10416
+ "description": "One node of the `where` tree: exactly one property. `all` (every child holds), `any` (at least one holds; at the top level each child is a branch the platform runs on its own index), `not` (a list of one node that must not hold; it narrows and never drives a branch), `has` (some other record names this one; it narrows and never drives a branch), or a leaf naming one role with one condition. A leaf that produces a number (`near`, `matches`) is allowed only at the top of a branch.",
10413
10417
  "properties": {
10414
10418
  "all": {
10415
10419
  "type": "array",
@@ -10437,6 +10441,11 @@ export const catalog = {
10437
10441
  },
10438
10442
  "description": "One node that must not hold."
10439
10443
  },
10444
+ "has": {
10445
+ "type": "ref",
10446
+ "ref": "#has",
10447
+ "description": "Some public record the caller may read names this one through the role `via`. Under `not`, none does (an anti-join)."
10448
+ },
10440
10449
  "type": {
10441
10450
  "type": "ref",
10442
10451
  "ref": "#condition",
@@ -10499,6 +10508,33 @@ export const catalog = {
10499
10508
  }
10500
10509
  }
10501
10510
  },
10511
+ "has": {
10512
+ "type": "object",
10513
+ "description": "`has`: some public record the caller may read (not hidden, not a hidden or suspended account's, not across a block) names this record through the role `via`, by this record's own author when `by` is `author`, and matches `where`. One index probe per record the branch reads; it narrows a branch and never drives one. It counts as one condition, plus one for each leaf in `where`. A `has` inside a `has` is refused.",
10514
+ "required": [
10515
+ "via"
10516
+ ],
10517
+ "properties": {
10518
+ "via": {
10519
+ "type": "string",
10520
+ "maxLength": 64,
10521
+ "description": "The other record's role that holds this record's AT-URI: a URI role every record has other than its own `uri` (today only `subject`)."
10522
+ },
10523
+ "by": {
10524
+ "type": "string",
10525
+ "knownValues": [
10526
+ "author"
10527
+ ],
10528
+ "maxLength": 16,
10529
+ "description": "`author`: only a record in this record's own author's repo. Any other value is refused."
10530
+ },
10531
+ "where": {
10532
+ "type": "ref",
10533
+ "ref": "#node",
10534
+ "description": "What the other record also matches: `type` and/or `author` conditions (`is` or `in`), one alone or several under one `all`."
10535
+ }
10536
+ }
10537
+ },
10502
10538
  "condition": {
10503
10539
  "type": "object",
10504
10540
  "description": "One operator and its value. A string value starting with `$` is a parameter.",
@@ -10589,26 +10625,6 @@ export const catalog = {
10589
10625
  }
10590
10626
  }
10591
10627
  },
10592
- "include": {
10593
- "type": "object",
10594
- "description": "One level of attached records, by key, each read like a result (viewer-scoped, hidden-filtered).",
10595
- "properties": {
10596
- "author": {
10597
- "type": "string",
10598
- "knownValues": [
10599
- "profile"
10600
- ],
10601
- "description": "`profile`: the author's pub.techne.draft.actor.profile/self, read like a result."
10602
- },
10603
- "subject": {
10604
- "type": "string",
10605
- "knownValues": [
10606
- "record"
10607
- ],
10608
- "description": "`record`: the record the result is about."
10609
- }
10610
- }
10611
- },
10612
10628
  "weight": {
10613
10629
  "type": "object",
10614
10630
  "required": [
@@ -10747,149 +10763,36 @@ export const catalog = {
10747
10763
  ]
10748
10764
  },
10749
10765
  {
10750
- "nsid": "pub.techne.draft.query.countRecords",
10751
- "name": "draft.query.countRecords",
10766
+ "nsid": "pub.techne.draft.query.composeRecords",
10767
+ "name": "draft.query.composeRecords",
10752
10768
  "group": "pub.techne",
10753
- "kind": "query",
10754
- "description": "How many records a pub.techne.draft.query names: the records listRecords would answer for it (the same read path, and the platform's `decide` on every record answered as written or permissioned), each once. The count stops at 1000 (`capped`). The query's `order`, `limit`, `signals` and `include` are ignored, so a record without the role a list is ordered by is still counted. Anyone may call it, signed in or not; an anonymous caller counts public records only. Draft tier.",
10769
+ "kind": "procedure",
10770
+ "description": "Up to 12 generic reads in one call. Each step is a pub.techne.draft.query.listRecords call (a list step) or a pub.techne.draft.query.getRecords call (a get step) and answers exactly as that method would for the same caller. A step runs once the steps it binds to have answered (at most 4 at once); the answer does not depend on which finished first. A binding, a string `$<step>.<output>` in a list step's `params` or among a get step's `uris`, stands for that output over the earlier step's records, deduplicated in the order first seen (possibly empty). Outputs: `uri`, `author`, `type`, `space`, `subject`, `references`, and `value.<path>` (string values only). A param may mix literals and bindings and stands for their union. A bound param is a list, so the query uses it with `in` on an indexed role; bind indexed outputs (they never hold a comma) rather than free text. A literal param may not start with `$`. A wrong shape refuses the whole call as InvalidRequest: more than 12 steps, a list step's `limit` over 50000, more than 500 literal `uris`, a `limit` or `cursor` on a `return: false` step. Once running, a step fails alone, its error under its name in `errors`: its method refuses it, a binding fills more than 500 `uris` or 2000 values, the steps read in one page answer more than 3000 records in all, a `return: false` step matches more than 50000, or the paged steps (a `limit` over 500, or `return: false`) read more than 50000 in all. Every step bound to a failed step is `Skipped`, naming the root failure; the others answer, and the call is 200. Budget: a signed-in caller has 20000 rows, refilled at 500 a second. A call is charged up front its declared maximum (a list step's `limit`, else its query's limit or 50, 500 for a `queryUri` or paged step; a get step's URIs, 500 if bound; at most 3000) plus 1000 per `count` step, is given back what it did not read, and is charged afterwards, into debt if need be, for what it read beyond that. A call the budget cannot cover now is RateLimitExceeded. Anonymous callers spend a budget per client IP (one shared budget ten times the size when the IP is unknown). `handles` and `curation` on a list step answer as getRecords does. The body must be application/json, else 415 before it is parsed or charged. A procedure only for its body size: nothing is written, and anyone may call it, signed in or not. Draft tier.",
10755
10771
  "doc": ({
10756
10772
  "lexicon": 1,
10757
- "id": "pub.techne.draft.query.countRecords",
10773
+ "id": "pub.techne.draft.query.composeRecords",
10758
10774
  "defs": {
10759
10775
  "main": {
10760
- "type": "query",
10761
- "description": "How many records a pub.techne.draft.query names: the records listRecords would answer for it (the same read path, and the platform's `decide` on every record answered as written or permissioned), each once. The count stops at 1000 (`capped`). The query's `order`, `limit`, `signals` and `include` are ignored, so a record without the role a list is ordered by is still counted. Anyone may call it, signed in or not; an anonymous caller counts public records only. Draft tier.",
10762
- "parameters": {
10763
- "type": "params",
10764
- "properties": {
10765
- "query": {
10766
- "type": "string",
10767
- "maxLength": 16384,
10768
- "description": "A pub.techne.draft.query object, as JSON. Give this or `queryUri`."
10769
- },
10770
- "queryUri": {
10771
- "type": "string",
10772
- "format": "at-uri",
10773
- "description": "A published pub.techne.draft.query record to run. Give this or `query`."
10774
- },
10775
- "params": {
10776
- "type": "string",
10777
- "maxLength": 8192,
10778
- "description": "The query's parameters as a JSON object of strings (or lists of strings), e.g. {\"here\": \"40.01,-105.27\"}. `$viewer` and `$now` are the platform's and cannot be passed."
10779
- },
10780
- "groupBy": {
10781
- "type": "string",
10782
- "knownValues": [
10783
- "type",
10784
- "author"
10785
- ],
10786
- "description": "Count per type or per author instead of in all."
10787
- }
10788
- }
10789
- },
10790
- "output": {
10776
+ "type": "procedure",
10777
+ "description": "Up to 12 generic reads in one call. Each step is a pub.techne.draft.query.listRecords call (a list step) or a pub.techne.draft.query.getRecords call (a get step) and answers exactly as that method would for the same caller. A step runs once the steps it binds to have answered (at most 4 at once); the answer does not depend on which finished first. A binding, a string `$<step>.<output>` in a list step's `params` or among a get step's `uris`, stands for that output over the earlier step's records, deduplicated in the order first seen (possibly empty). Outputs: `uri`, `author`, `type`, `space`, `subject`, `references`, and `value.<path>` (string values only). A param may mix literals and bindings and stands for their union. A bound param is a list, so the query uses it with `in` on an indexed role; bind indexed outputs (they never hold a comma) rather than free text. A literal param may not start with `$`. A wrong shape refuses the whole call as InvalidRequest: more than 12 steps, a list step's `limit` over 50000, more than 500 literal `uris`, a `limit` or `cursor` on a `return: false` step. Once running, a step fails alone, its error under its name in `errors`: its method refuses it, a binding fills more than 500 `uris` or 2000 values, the steps read in one page answer more than 3000 records in all, a `return: false` step matches more than 50000, or the paged steps (a `limit` over 500, or `return: false`) read more than 50000 in all. Every step bound to a failed step is `Skipped`, naming the root failure; the others answer, and the call is 200. Budget: a signed-in caller has 20000 rows, refilled at 500 a second. A call is charged up front its declared maximum (a list step's `limit`, else its query's limit or 50, 500 for a `queryUri` or paged step; a get step's URIs, 500 if bound; at most 3000) plus 1000 per `count` step, is given back what it did not read, and is charged afterwards, into debt if need be, for what it read beyond that. A call the budget cannot cover now is RateLimitExceeded. Anonymous callers spend a budget per client IP (one shared budget ten times the size when the IP is unknown). `handles` and `curation` on a list step answer as getRecords does. The body must be application/json, else 415 before it is parsed or charged. A procedure only for its body size: nothing is written, and anyone may call it, signed in or not. Draft tier.",
10778
+ "input": {
10791
10779
  "encoding": "application/json",
10792
10780
  "schema": {
10793
10781
  "type": "object",
10794
10782
  "required": [
10795
- "count",
10796
- "capped"
10783
+ "steps"
10797
10784
  ],
10798
10785
  "properties": {
10799
- "count": {
10800
- "type": "integer",
10801
- "description": "Records counted (at most 1000)."
10802
- },
10803
- "capped": {
10804
- "type": "boolean",
10805
- "description": "True when the count stopped at 1000."
10806
- },
10807
- "groups": {
10786
+ "steps": {
10808
10787
  "type": "array",
10788
+ "minLength": 1,
10789
+ "maxLength": 12,
10809
10790
  "items": {
10810
10791
  "type": "ref",
10811
- "ref": "#group"
10792
+ "ref": "#step"
10812
10793
  },
10813
- "description": "With groupBy: the count per key, largest first."
10814
- }
10815
- }
10816
- }
10817
- },
10818
- "errors": [
10819
- {
10820
- "name": "InvalidRequest",
10821
- "description": "HTTP 400. A malformed or refused query or parameter."
10822
- },
10823
- {
10824
- "name": "NotFound",
10825
- "description": "HTTP 404. `queryUri` names no query record the caller may read."
10826
- }
10827
- ]
10828
- },
10829
- "group": {
10830
- "type": "object",
10831
- "required": [
10832
- "key",
10833
- "count"
10834
- ],
10835
- "properties": {
10836
- "key": {
10837
- "type": "string"
10838
- },
10839
- "count": {
10840
- "type": "integer"
10841
- }
10842
- }
10843
- }
10844
- }
10845
- })
10846
- },
10847
- {
10848
- "nsid": "pub.techne.draft.query.getRecords",
10849
- "name": "draft.query.getRecords",
10850
- "group": "pub.techne",
10851
- "kind": "query",
10852
- "description": "Records by URI, as listRecords answers them: the query `{\"where\": {\"uri\": {\"in\": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the curated record it resolves to instead (see `curated`). Draft tier.",
10853
- "doc": ({
10854
- "lexicon": 1,
10855
- "id": "pub.techne.draft.query.getRecords",
10856
- "defs": {
10857
- "main": {
10858
- "type": "query",
10859
- "description": "Records by URI, as listRecords answers them: the query `{\"where\": {\"uri\": {\"in\": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the curated record it resolves to instead (see `curated`). Draft tier.",
10860
- "parameters": {
10861
- "type": "params",
10862
- "required": [
10863
- "uris"
10864
- ],
10865
- "properties": {
10866
- "uris": {
10867
- "type": "array",
10868
- "maxLength": 100,
10869
- "items": {
10870
- "type": "string",
10871
- "format": "at-uri"
10794
+ "description": "The steps. A binding names only an earlier step. A step runs as soon as the steps it binds to have answered, at most 4 at once, so the steps do not run in this order; the 3000-record cap is counted in this order."
10872
10795
  }
10873
- },
10874
- "handles": {
10875
- "type": "boolean",
10876
- "description": "Also answer `handles`: the public handle of each repo the asked URIs name. Default false."
10877
- },
10878
- "curated": {
10879
- "type": "boolean",
10880
- "description": "Answer each asked URI as the curated record it resolves to (a source copy, or a record merged into another, answers as the curated record that claims it), when that record is listed in public now (curated, moderated, not held back); otherwise the URI answers as itself, as written. `resolved` names each one answered as another record. A URI moderation holds back is `withheld` and never resolved; the caller's own held-back post is answered to them as itself. A source whose account is not active still resolves: the claim is the curated record's public provenance, not the source row. A source of a suspended account, or, to a signed-in caller, one whose author is across a block either way (see `includeBlockedByMe`), is not resolved: it answers as itself, and so is left out. Records come once each, in the order first asked. Default false: as written."
10881
- },
10882
- "curation": {
10883
- "type": "boolean",
10884
- "description": "Also answer `curation`, signed in: the curation status of each asked URI that is the caller's own record (in their repo, a commons post they made, or the curated record standing for one), the answer a write's `put` gives, read back later. Nobody else's record is answered, nor one held privately (private records are never curated). Default false."
10885
- },
10886
- "defaults": {
10887
- "type": "boolean",
10888
- "description": "Also answer `defaults`, signed in: each asked URI naming a record of the caller's own that is missing, for which the platform reads a starting value in its place. Today that is a subjectPrefs record for a circle someone outside the caller's People added them to: Notifications start off (Show in my feed on) until the caller writes the record. Nobody else's is answered. Default false."
10889
- },
10890
- "includeBlockedByMe": {
10891
- "type": "boolean",
10892
- "description": "Signed in: lift the caller's OWN blocks for this read, so records and `handles` of people the caller blocked are answered (a client's list of the people its user blocked, to name them). Every generic read otherwise leaves out, for a signed-in caller, the records and handles of an account blocked either way, and for everyone those of a hidden or suspended account. A block made against the caller is never lifted, nor is a hidden or suspended account shown. Default false."
10893
10796
  }
10894
10797
  }
10895
10798
  },
@@ -10898,55 +10801,16 @@ export const catalog = {
10898
10801
  "schema": {
10899
10802
  "type": "object",
10900
10803
  "required": [
10901
- "records"
10804
+ "steps"
10902
10805
  ],
10903
10806
  "properties": {
10904
- "records": {
10905
- "type": "array",
10906
- "items": {
10907
- "type": "ref",
10908
- "ref": "pub.techne.draft.query.listRecords#record"
10909
- }
10910
- },
10911
- "withheld": {
10912
- "type": "array",
10913
- "description": "The asked URIs of indexed public records moderation holds back from this caller, their author's account active and not suspended (a trusted verdict or a takedown, or a curated record every source of which is held back or by an account not active or suspended): they answer not found, and a client must not show another copy (the curated record they resolve to) in their place, as it may for a record that is gone or merged away. A caller's own commons post held back is answered to them instead (their own source, or the record it resolves to; not another author's source merged into it). A record whose author's account is not active or is suspended is not found and never named here; to a signed-in caller, neither is a record by an author blocked either way, or a curated record every source of which is by an author blocked either way, not active or suspended. Absent when none.",
10914
- "items": {
10915
- "type": "string",
10916
- "format": "at-uri"
10917
- }
10918
- },
10919
- "handles": {
10920
- "type": "array",
10921
- "description": "Only when asked with `handles`: the public handle of each repo the asked URIs name, whether or not its record was found or readable (handles are public directory data), in the order first asked, so a client can name a person whose profile has no name. A repo whose account is not active or is suspended, or that has no handle, is not named, nor, to a signed-in caller, one across a block either way (see `includeBlockedByMe`). Absent when none.",
10922
- "items": {
10923
- "type": "ref",
10924
- "ref": "#handle"
10925
- }
10926
- },
10927
- "resolved": {
10928
- "type": "array",
10929
- "description": "Only when asked with `curated`: each asked URI (once) that answered as another record, and that curated record. Absent when none.",
10930
- "items": {
10931
- "type": "ref",
10932
- "ref": "#resolved"
10933
- }
10934
- },
10935
- "curation": {
10936
- "type": "array",
10937
- "description": "Only when asked with `curation`, signed in: the curation status of each asked URI (once, in the order first asked) that is the caller's own. Absent when none.",
10938
- "items": {
10939
- "type": "ref",
10940
- "ref": "#curation"
10941
- }
10807
+ "steps": {
10808
+ "type": "unknown",
10809
+ "description": "An object keyed by step name, each a #stepResult: one for every step whose `return` is not false."
10942
10810
  },
10943
- "defaults": {
10944
- "type": "array",
10945
- "description": "Only when asked with `defaults`, signed in: each asked URI (once, in the order first asked) naming a missing record of the caller's own that the platform reads a starting value for, and that value. A client shows it as the record's value until the caller writes the record. Absent when none.",
10946
- "items": {
10947
- "type": "ref",
10948
- "ref": "#default"
10949
- }
10811
+ "errors": {
10812
+ "type": "unknown",
10813
+ "description": "An object keyed by step name, each a #stepError: one for every step that failed or was skipped, returned or not. Absent when every step answered."
10950
10814
  }
10951
10815
  }
10952
10816
  }
@@ -10954,200 +10818,200 @@ export const catalog = {
10954
10818
  "errors": [
10955
10819
  {
10956
10820
  "name": "InvalidRequest",
10957
- "description": "HTTP 400. No URIs, more than 100, one that is not an AT-URI, or `handles`, `curated`, `curation` or `defaults` not true or false."
10821
+ "description": "HTTP 400. A malformed call, before any step runs (naming the step where there is one): no steps or more than 12, a name repeated or not of the pattern, a step that is neither a list step nor a get step or both, a binding to no earlier step or an unknown output, a list step's `limit` over 500, a get step's literal `uris` over 500, a malformed flag, `params`, `fields` or `envelope` (a name not among its known values). Also HTTP 415, under this name, for a body whose content-type is not application/json, refused before it is parsed or charged. What a step's method refuses is that step's error (`errors`), not the call's."
10822
+ },
10823
+ {
10824
+ "name": "RateLimitExceeded",
10825
+ "description": "HTTP 429. A call whose charge (at most 15000) is more than what is left of its caller's row budget now: a signed-in caller's 20000 rows, refilled at 500 rows a second; an anonymous caller's the same per client IP, or, without a known client IP, the one budget all such callers share, ten times that size."
10958
10826
  }
10959
10827
  ]
10960
10828
  },
10961
- "handle": {
10829
+ "step": {
10962
10830
  "type": "object",
10831
+ "description": "One read. A list step has `query` or `queryUri` (and may have `params`, `limit`, `cursor`, `count`, `handles`, `curation`), as listRecords takes them; a get step has `uris` (and may have `curated`, `handles`, `curation`, `defaults`, `includeBlockedByMe`), as getRecords takes them. Exactly one of the two.",
10963
10832
  "required": [
10964
- "did",
10965
- "handle"
10833
+ "name"
10966
10834
  ],
10967
10835
  "properties": {
10968
- "did": {
10836
+ "name": {
10969
10837
  "type": "string",
10970
- "format": "did"
10838
+ "minLength": 1,
10839
+ "maxLength": 32,
10840
+ "description": "The step's name, unique in the call: a letter, then up to 31 letters, digits or `_` (^[A-Za-z][A-Za-z0-9_]{0,31}$). The key of its result and the `<step>` of a binding to it."
10971
10841
  },
10972
- "handle": {
10973
- "type": "string",
10974
- "format": "handle"
10975
- }
10976
- }
10977
- },
10978
- "resolved": {
10979
- "type": "object",
10980
- "required": [
10981
- "uri",
10982
- "curated"
10983
- ],
10984
- "properties": {
10985
- "uri": {
10842
+ "query": {
10843
+ "type": "unknown",
10844
+ "description": "List step: an inline pub.techne.draft.query object (not JSON in a string, as listRecords takes it). Give this or `queryUri`."
10845
+ },
10846
+ "queryUri": {
10986
10847
  "type": "string",
10987
10848
  "format": "at-uri",
10988
- "description": "The URI asked."
10849
+ "description": "List step: a published pub.techne.draft.query record to run. Give this or `query`."
10989
10850
  },
10990
- "curated": {
10991
- "type": "string",
10992
- "format": "at-uri",
10993
- "description": "The curated record that answered for it."
10994
- }
10995
- }
10996
- },
10997
- "curation": {
10998
- "type": "object",
10999
- "required": [
11000
- "uri",
11001
- "status"
11002
- ],
11003
- "properties": {
11004
- "uri": {
11005
- "type": "string",
11006
- "format": "at-uri",
11007
- "description": "The URI asked."
10851
+ "params": {
10852
+ "type": "unknown",
10853
+ "description": "List step: the query's parameters, an object of strings or lists of strings, as listRecords' `params` (an object here, not JSON in a string). A string `$<step>.<output>` is a binding and becomes a list; a list may mix literal strings and several bindings, and is their deduplicated union."
11008
10854
  },
11009
- "status": {
10855
+ "limit": {
10856
+ "type": "integer",
10857
+ "minimum": 1,
10858
+ "maximum": 50000,
10859
+ "description": "List step: how many records, as listRecords' `limit`, up to 50000: past 500 (one listRecords page) the server reads listRecords' pages one after another on the same read path and answers them as one, with the `cursor` after the last record answered. Not allowed on a `return: false` step. The steps read past one page read at most 50000 records in all per call; the step whose page crosses that fails (InvalidRequest), and so does any such step that reads a page after it."
10860
+ },
10861
+ "cursor": {
11010
10862
  "type": "string",
11011
- "knownValues": [
11012
- "pending",
11013
- "curated",
11014
- "notCurated"
11015
- ],
11016
- "description": "`pending`: not listed for others yet (the curator or moderation has not answered). `curated`: listed in public as `curated`. `notCurated`: it will not be listed, for `reason` (moderation declined it, the index refused the version, a type with no lexicon, or a type no curator is endorsed for)."
10863
+ "description": "List step: the cursor of a previous page of this step, as listRecords' `cursor`. Not allowed on a `return: false` step."
10864
+ },
10865
+ "count": {
10866
+ "type": "boolean",
10867
+ "default": false,
10868
+ "description": "List step: also count, as listRecords' `count`."
10869
+ },
10870
+ "uris": {
10871
+ "type": "array",
10872
+ "minLength": 1,
10873
+ "maxLength": 500,
10874
+ "items": {
10875
+ "type": "string"
10876
+ },
10877
+ "description": "Get step: the URIs to read, as getRecords' `uris`; each entry an AT-URI or a binding, which is replaced by its list. At most 500 after binding."
11017
10878
  },
11018
10879
  "curated": {
11019
- "type": "string",
11020
- "format": "at-uri",
11021
- "description": "With `curated`: the curated record listed for it (itself when it is that record)."
10880
+ "type": "boolean",
10881
+ "description": "Get step: as getRecords' `curated`."
11022
10882
  },
11023
- "reason": {
11024
- "type": "string",
11025
- "description": "With `notCurated`: why, in words for people (a moderation label value, the index's refusal, or `not curated: no lexicon` / `not curated: no curator`)."
10883
+ "handles": {
10884
+ "type": "boolean",
10885
+ "description": "As getRecords' `handles`: in a get step for its URIs, in a list step for the URIs of the records it answered."
10886
+ },
10887
+ "curation": {
10888
+ "type": "boolean",
10889
+ "description": "As getRecords' `curation`: in a get step for its URIs, in a list step for the URIs of the records it answered."
10890
+ },
10891
+ "defaults": {
10892
+ "type": "boolean",
10893
+ "description": "Get step: as getRecords' `defaults`."
10894
+ },
10895
+ "includeBlockedByMe": {
10896
+ "type": "boolean",
10897
+ "description": "Get step: as getRecords' `includeBlockedByMe`."
10898
+ },
10899
+ "return": {
10900
+ "type": "boolean",
10901
+ "default": true,
10902
+ "description": "False: the step's records only feed later bindings and are not in the output. A list step asked `return: false` is read in full on the server (every record its query matches for the caller, page after page on listRecords' read path), so a later step binds to all of it; it takes no `limit` or `cursor`, and a query that matches more than 50000 records fails the step (InvalidRequest naming the step and the ceiling), never answered in part."
10903
+ },
10904
+ "fields": {
10905
+ "type": "array",
10906
+ "minLength": 1,
10907
+ "maxLength": 32,
10908
+ "items": {
10909
+ "type": "string",
10910
+ "maxLength": 256
10911
+ },
10912
+ "description": "Value paths (`a`, `a.b`, `a[].b`): each answered record's `value` keeps only these. Bindings read the whole value, before this selection. The record's other fields come back as `envelope` says, and its `uri` as `uri` says."
10913
+ },
10914
+ "envelope": {
10915
+ "type": "array",
10916
+ "maxLength": 10,
10917
+ "items": {
10918
+ "type": "string",
10919
+ "knownValues": [
10920
+ "cid",
10921
+ "author",
10922
+ "collection",
10923
+ "time",
10924
+ "space",
10925
+ "source",
10926
+ "curated",
10927
+ "held",
10928
+ "measures",
10929
+ "signals"
10930
+ ]
10931
+ },
10932
+ "description": "The record fields (#record) each answered record keeps besides `uri` (kept unless `uri` is false) and `value` (always kept): any of cid, author, collection, time, space, source, curated, held, measures, signals and nothing else: the list is closed to these known values, and another name refuses the call as InvalidRequest. Without it every field comes back; `[]` keeps only `value` and, unless `uri` is false, `uri`. A field left out is absent, so a flag left out (`curated`, `held`) reads as false. Bindings read every field, before this selection."
10933
+ },
10934
+ "uri": {
10935
+ "type": "boolean",
10936
+ "default": true,
10937
+ "description": "False: each answered record comes back without its `uri`, for a step whose records nobody reads by URI. Bindings read it, before this cut: `$<step>.uri` stands for the step's records' URIs either way. A get step's `resolved`, `curation` and `defaults` still name records by URI, so with `uri: false` they cannot be matched to the records answered."
11026
10938
  }
11027
10939
  }
11028
10940
  },
11029
- "default": {
10941
+ "stepResult": {
11030
10942
  "type": "object",
10943
+ "description": "What the step's method answered: a list step's fields are listRecords' output, a get step's are getRecords' output.",
11031
10944
  "required": [
11032
- "uri",
11033
- "value"
10945
+ "records"
11034
10946
  ],
11035
10947
  "properties": {
11036
- "uri": {
10948
+ "records": {
10949
+ "type": "array",
10950
+ "items": {
10951
+ "type": "ref",
10952
+ "ref": "#record"
10953
+ },
10954
+ "description": "As the step's method answers them, as #record: `value` always, `uri` unless the step's `uri` is false, every other record field unless the step's `envelope` left it out, and `value` cut to `fields` when given."
10955
+ },
10956
+ "cursor": {
11037
10957
  "type": "string",
11038
- "format": "at-uri",
11039
- "description": "The URI asked: a record of the caller's own, missing."
10958
+ "description": "List step: as listRecords' `cursor`."
11040
10959
  },
11041
- "value": {
11042
- "type": "unknown",
11043
- "description": "The record value the platform reads in its place."
11044
- }
11045
- }
11046
- }
11047
- }
11048
- })
11049
- },
11050
- {
11051
- "nsid": "pub.techne.draft.query.listRecords",
11052
- "name": "draft.query.listRecords",
11053
- "group": "pub.techne",
11054
- "kind": "query",
11055
- "description": "The platform's generic list query: one page of the records a pub.techne.draft.query names, in its order. Every record is read through the platform's one read path, whatever the query says: no record of a hidden or suspended account is answered, nor, to a signed-in caller, another's record across a block either way (the caller blocked its author, or its author blocked the caller); a public record also leaves out anything moderation holds back (a trusted verdict or `!takedown`); a permissioned record is answered only when it is the caller's own or counts in a space whose read policy admits the caller now, not taken down (in a space whose authority is the caller, a block does not hide its records from them), and (in a member-owned circle space) only while its author is a current member by a claim the caller can read. A branch scoped to named authors, subjects or URIs, and a query with `curated: false`, answers public records as written; any other branch crosses sources and answers curated public records (the commons' listed records). A curated record every source of which is by a hidden or suspended account is left out for everyone, and one every source of which is by an author blocked either way is left out for a signed-in caller. Anyone may call it, signed in or not; an anonymous caller gets public records only. Each top-level `any` branch runs on its own index and the branches are merged in order, so a record that matches two branches comes once. A permissioned record, and a public record answered as written, is answered only while the platform's `decide` calls its version valid, and because that check runs on the page already read, a page can hold fewer records than `limit` and still carry a cursor: keep paging until none comes back. Draft tier.",
11056
- "doc": ({
11057
- "lexicon": 1,
11058
- "id": "pub.techne.draft.query.listRecords",
11059
- "defs": {
11060
- "main": {
11061
- "type": "query",
11062
- "description": "The platform's generic list query: one page of the records a pub.techne.draft.query names, in its order. Every record is read through the platform's one read path, whatever the query says: no record of a hidden or suspended account is answered, nor, to a signed-in caller, another's record across a block either way (the caller blocked its author, or its author blocked the caller); a public record also leaves out anything moderation holds back (a trusted verdict or `!takedown`); a permissioned record is answered only when it is the caller's own or counts in a space whose read policy admits the caller now, not taken down (in a space whose authority is the caller, a block does not hide its records from them), and (in a member-owned circle space) only while its author is a current member by a claim the caller can read. A branch scoped to named authors, subjects or URIs, and a query with `curated: false`, answers public records as written; any other branch crosses sources and answers curated public records (the commons' listed records). A curated record every source of which is by a hidden or suspended account is left out for everyone, and one every source of which is by an author blocked either way is left out for a signed-in caller. Anyone may call it, signed in or not; an anonymous caller gets public records only. Each top-level `any` branch runs on its own index and the branches are merged in order, so a record that matches two branches comes once. A permissioned record, and a public record answered as written, is answered only while the platform's `decide` calls its version valid, and because that check runs on the page already read, a page can hold fewer records than `limit` and still carry a cursor: keep paging until none comes back. Draft tier.",
11063
- "parameters": {
11064
- "type": "params",
11065
- "properties": {
11066
- "query": {
11067
- "type": "string",
11068
- "maxLength": 16384,
11069
- "description": "A pub.techne.draft.query object, as JSON. Give this or `queryUri`."
11070
- },
11071
- "queryUri": {
10960
+ "count": {
10961
+ "type": "integer",
10962
+ "description": "List step, asked with `count`: as listRecords' `count`."
10963
+ },
10964
+ "capped": {
10965
+ "type": "boolean",
10966
+ "description": "List step, asked with `count`: as listRecords' `capped`."
10967
+ },
10968
+ "withheld": {
10969
+ "type": "array",
10970
+ "items": {
11072
10971
  "type": "string",
11073
- "format": "at-uri",
11074
- "description": "A published pub.techne.draft.query record to run. Give this or `query`."
10972
+ "format": "at-uri"
11075
10973
  },
11076
- "params": {
11077
- "type": "string",
11078
- "maxLength": 8192,
11079
- "description": "The query's parameters as a JSON object of strings (or lists of strings), e.g. {\"here\": \"40.01,-105.27\"}. `$viewer` and `$now` are the platform's and cannot be passed."
10974
+ "description": "Get step: as getRecords' `withheld`."
10975
+ },
10976
+ "handles": {
10977
+ "type": "array",
10978
+ "items": {
10979
+ "type": "ref",
10980
+ "ref": "pub.techne.draft.query.getRecords#handle"
11080
10981
  },
11081
- "limit": {
11082
- "type": "integer",
11083
- "minimum": 1,
11084
- "maximum": 100,
11085
- "description": "The page size; default the query's `limit`, else 50."
10982
+ "description": "Asked with `handles`: as getRecords' `handles`."
10983
+ },
10984
+ "resolved": {
10985
+ "type": "array",
10986
+ "items": {
10987
+ "type": "ref",
10988
+ "ref": "pub.techne.draft.query.getRecords#resolved"
11086
10989
  },
11087
- "cursor": {
11088
- "type": "string",
11089
- "description": "The cursor of the previous page, opaque: pass it back as it came, with the same query."
10990
+ "description": "Get step, asked with `curated`: as getRecords' `resolved`."
10991
+ },
10992
+ "curation": {
10993
+ "type": "array",
10994
+ "items": {
10995
+ "type": "ref",
10996
+ "ref": "pub.techne.draft.query.getRecords#curation"
11090
10997
  },
11091
- "count": {
11092
- "type": "boolean",
11093
- "default": false,
11094
- "description": "Also count the records the query answers this caller, as pub.techne.draft.query.countRecords would for the same query and params: the output gains `count` and `capped`."
11095
- }
11096
- }
11097
- },
11098
- "output": {
11099
- "encoding": "application/json",
11100
- "schema": {
11101
- "type": "object",
11102
- "required": [
11103
- "records"
11104
- ],
11105
- "properties": {
11106
- "records": {
11107
- "type": "array",
11108
- "items": {
11109
- "type": "ref",
11110
- "ref": "#record"
11111
- },
11112
- "description": "In the query's order, ties broken by URI."
11113
- },
11114
- "cursor": {
11115
- "type": "string",
11116
- "description": "Pass it back as cursor for the next page. Absent on the last page; a page shorter than `limit` is not the last page while it carries one."
11117
- },
11118
- "count": {
11119
- "type": "integer",
11120
- "description": "Only when asked with `count=true`: how many records the query answers this caller, each once, up to countRecords' cap (countRecords' `count`)."
11121
- },
11122
- "capped": {
11123
- "type": "boolean",
11124
- "description": "Only when asked with `count=true`: true when there are more than `count` (countRecords' `capped`)."
11125
- }
11126
- }
11127
- }
11128
- },
11129
- "errors": [
11130
- {
11131
- "name": "InvalidRequest",
11132
- "description": "HTTP 400. A malformed or refused query (naming the branch or condition), parameter or cursor."
10998
+ "description": "Asked with `curation`: as getRecords' `curation`."
11133
10999
  },
11134
- {
11135
- "name": "NotFound",
11136
- "description": "HTTP 404. `queryUri` names no query record the caller may read."
11000
+ "defaults": {
11001
+ "type": "array",
11002
+ "items": {
11003
+ "type": "ref",
11004
+ "ref": "pub.techne.draft.query.getRecords#default"
11005
+ },
11006
+ "description": "Get step, asked with `defaults`: as getRecords' `defaults`."
11137
11007
  }
11138
- ]
11008
+ }
11139
11009
  },
11140
11010
  "record": {
11141
11011
  "type": "object",
11142
- "description": "One indexed record.",
11012
+ "description": "One answered record of a step: pub.techne.draft.query.listRecords#record with only `value` required. `uri` is present unless the step's `uri` is false; every other field is present as listRecords#record has it unless the step's `envelope` left it out; `fields` cuts `value`.",
11143
11013
  "required": [
11144
- "uri",
11145
- "cid",
11146
- "author",
11147
- "collection",
11148
- "value",
11149
- "time",
11150
- "source"
11014
+ "value"
11151
11015
  ],
11152
11016
  "properties": {
11153
11017
  "uri": {
@@ -11204,10 +11068,29 @@ export const catalog = {
11204
11068
  "signals": {
11205
11069
  "type": "unknown",
11206
11070
  "description": "The server-side signals the query asked for, by name; a signal with no value for this record is absent."
11071
+ }
11072
+ }
11073
+ },
11074
+ "stepError": {
11075
+ "type": "object",
11076
+ "description": "Why a step has no result: what its method refused (as that method would answer it), `Skipped` (424) for a step that binds to a failed one (it may already have run; its answer is dropped), or InvalidRequest (400) for a step past a call limit: its bindings fill a get step's `uris` past 500 or a bound list past 2000 values, or its records would take the call past 3000 answered across the steps read in one page, counted in step order, or it is a list step asked `return: false` whose query matches more than 50000 records, or a page it read took the records read by the call's steps read past one page past 50000; or InternalError (500) for a step read past one page whose pages stop advancing (a cursor that comes back twice).",
11077
+ "required": [
11078
+ "error",
11079
+ "message",
11080
+ "status"
11081
+ ],
11082
+ "properties": {
11083
+ "error": {
11084
+ "type": "string",
11085
+ "description": "The error name the step's method would answer (InvalidRequest, NotFound, ...); InvalidRequest for a step past a call limit (#stepError); or `Skipped`: a step it binds to failed."
11207
11086
  },
11208
- "included": {
11209
- "type": "unknown",
11210
- "description": "The records the query's `include` attached, by key (`author`, `subject`), each a #record; absent when there is none the caller may read."
11087
+ "message": {
11088
+ "type": "string",
11089
+ "description": "What went wrong, naming the step; for `Skipped`, `step <name>: skipped because <failed step> failed`, naming the step that failed itself (the root of the chain)."
11090
+ },
11091
+ "status": {
11092
+ "type": "integer",
11093
+ "description": "The HTTP status the step's method would answer alone; 400 for a step past a call limit (a get step's bound `uris` past 500, a bound list past 2000 values, the one-page steps' records past 3000, a `return: false` step matching past 50000, the call's paged reads past 50000); 424 for `Skipped`."
11211
11094
  }
11212
11095
  }
11213
11096
  }
@@ -11215,44 +11098,43 @@ export const catalog = {
11215
11098
  })
11216
11099
  },
11217
11100
  {
11218
- "nsid": "pub.techne.draft.query.listRejections",
11219
- "name": "draft.query.listRejections",
11101
+ "nsid": "pub.techne.draft.query.countRecords",
11102
+ "name": "draft.query.countRecords",
11220
11103
  "group": "pub.techne",
11221
11104
  "kind": "query",
11222
- "description": "The public records this AppView refused when it indexed them, by the shared check (lexicons/check) or its own lexicon validation: they are not stored and no read answers them. Each is a public fact about a public record: which version, the check's reason, and when this AppView first saw that version refused. A record fixed by a later version, or deleted, drops out. Open to anyone. A record whose author's account is not active, or that a trusted takedown names, is not listed. Oldest first-seen first, so a reader pages forward with `cursor` or resumes with `since`. Draft tier.",
11105
+ "description": "How many records a pub.techne.draft.query names: the records listRecords would answer for it (the same read path, and the platform's `decide` on every record answered as written or permissioned), each once. The count stops at 1000 (`capped`). The query's `order`, `limit` and `signals` are ignored, so a record without the role a list is ordered by is still counted. Anyone may call it, signed in or not; an anonymous caller counts public records only. Draft tier.",
11223
11106
  "doc": ({
11224
11107
  "lexicon": 1,
11225
- "id": "pub.techne.draft.query.listRejections",
11108
+ "id": "pub.techne.draft.query.countRecords",
11226
11109
  "defs": {
11227
11110
  "main": {
11228
11111
  "type": "query",
11229
- "description": "The public records this AppView refused when it indexed them, by the shared check (lexicons/check) or its own lexicon validation: they are not stored and no read answers them. Each is a public fact about a public record: which version, the check's reason, and when this AppView first saw that version refused. A record fixed by a later version, or deleted, drops out. Open to anyone. A record whose author's account is not active, or that a trusted takedown names, is not listed. Oldest first-seen first, so a reader pages forward with `cursor` or resumes with `since`. Draft tier.",
11112
+ "description": "How many records a pub.techne.draft.query names: the records listRecords would answer for it (the same read path, and the platform's `decide` on every record answered as written or permissioned), each once. The count stops at 1000 (`capped`). The query's `order`, `limit` and `signals` are ignored, so a record without the role a list is ordered by is still counted. Anyone may call it, signed in or not; an anonymous caller counts public records only. Draft tier.",
11230
11113
  "parameters": {
11231
11114
  "type": "params",
11232
11115
  "properties": {
11233
- "author": {
11116
+ "query": {
11234
11117
  "type": "string",
11235
- "format": "did",
11236
- "description": "Only this repo's records."
11118
+ "maxLength": 16384,
11119
+ "description": "A pub.techne.draft.query object, as JSON. Give this or `queryUri`."
11237
11120
  },
11238
- "collection": {
11121
+ "queryUri": {
11239
11122
  "type": "string",
11240
- "format": "nsid",
11241
- "description": "Only this collection's records."
11123
+ "format": "at-uri",
11124
+ "description": "A published pub.techne.draft.query record to run. Give this or `query`."
11242
11125
  },
11243
- "since": {
11126
+ "params": {
11244
11127
  "type": "string",
11245
- "format": "datetime",
11246
- "description": "Only versions first seen refused at or after this time."
11128
+ "maxLength": 8192,
11129
+ "description": "The query's parameters as a JSON object of strings (or lists of strings), e.g. {\"here\": \"40.01,-105.27\"}. `$viewer` and `$now` are the platform's and cannot be passed."
11247
11130
  },
11248
- "limit": {
11249
- "type": "integer",
11250
- "minimum": 1,
11251
- "maximum": 100,
11252
- "default": 50
11253
- },
11254
- "cursor": {
11255
- "type": "string"
11131
+ "groupBy": {
11132
+ "type": "string",
11133
+ "knownValues": [
11134
+ "type",
11135
+ "author"
11136
+ ],
11137
+ "description": "Count per type or per author instead of in all."
11256
11138
  }
11257
11139
  }
11258
11140
  },
@@ -11261,19 +11143,25 @@ export const catalog = {
11261
11143
  "schema": {
11262
11144
  "type": "object",
11263
11145
  "required": [
11264
- "rejections"
11146
+ "count",
11147
+ "capped"
11265
11148
  ],
11266
11149
  "properties": {
11267
- "rejections": {
11150
+ "count": {
11151
+ "type": "integer",
11152
+ "description": "Records counted (at most 1000)."
11153
+ },
11154
+ "capped": {
11155
+ "type": "boolean",
11156
+ "description": "True when the count stopped at 1000."
11157
+ },
11158
+ "groups": {
11268
11159
  "type": "array",
11269
11160
  "items": {
11270
11161
  "type": "ref",
11271
- "ref": "#rejection"
11272
- }
11273
- },
11274
- "cursor": {
11275
- "type": "string",
11276
- "description": "Present when the page is full: pass it back for the next page."
11162
+ "ref": "#group"
11163
+ },
11164
+ "description": "With groupBy: the count per key, largest first."
11277
11165
  }
11278
11166
  }
11279
11167
  }
@@ -11281,55 +11169,26 @@ export const catalog = {
11281
11169
  "errors": [
11282
11170
  {
11283
11171
  "name": "InvalidRequest",
11284
- "description": "HTTP 400. `limit` outside 1..100, `author` not a DID, `since` not a datetime, or a malformed `cursor`."
11172
+ "description": "HTTP 400. A malformed or refused query or parameter."
11173
+ },
11174
+ {
11175
+ "name": "NotFound",
11176
+ "description": "HTTP 404. `queryUri` names no query record the caller may read."
11285
11177
  }
11286
11178
  ]
11287
11179
  },
11288
- "rejection": {
11180
+ "group": {
11289
11181
  "type": "object",
11290
11182
  "required": [
11291
- "uri",
11292
- "cid",
11293
- "author",
11294
- "collection",
11295
- "reason",
11296
- "message",
11297
- "firstSeenAt"
11183
+ "key",
11184
+ "count"
11298
11185
  ],
11299
11186
  "properties": {
11300
- "uri": {
11301
- "type": "string",
11302
- "format": "at-uri"
11303
- },
11304
- "cid": {
11305
- "type": "string",
11306
- "format": "cid",
11307
- "description": "The version refused (its CID verified against the signed bytes)."
11308
- },
11309
- "author": {
11310
- "type": "string",
11311
- "format": "did"
11312
- },
11313
- "collection": {
11314
- "type": "string",
11315
- "format": "nsid"
11316
- },
11317
- "reason": {
11318
- "type": "string",
11319
- "knownValues": [
11320
- "invalid",
11321
- "placement"
11322
- ],
11323
- "description": "`invalid`: the body does not satisfy its lexicon. `placement`: the record has no public home (its collection is private-only, or a credential that is not its issuer's own unsigned one)."
11324
- },
11325
- "message": {
11326
- "type": "string",
11327
- "description": "The refusal's own words, for people; not a stable value."
11187
+ "key": {
11188
+ "type": "string"
11328
11189
  },
11329
- "firstSeenAt": {
11330
- "type": "string",
11331
- "format": "datetime",
11332
- "description": "When this AppView first saw this version refused."
11190
+ "count": {
11191
+ "type": "integer"
11333
11192
  }
11334
11193
  }
11335
11194
  }
@@ -11337,140 +11196,629 @@ export const catalog = {
11337
11196
  })
11338
11197
  },
11339
11198
  {
11340
- "nsid": "pub.techne.draft.questionSet",
11341
- "name": "draft.questionSet",
11199
+ "nsid": "pub.techne.draft.query.getRecords",
11200
+ "name": "draft.query.getRecords",
11342
11201
  "group": "pub.techne",
11343
- "kind": "record",
11344
- "key": "any",
11345
- "description": "A list of questions to answer about a record, in order. They are portable assessment questions, answered by a pub.techne.draft.assessment. Published under a content-addressed key by publisher convention: unchanged content reuses the same record; changed content gets a new key. This is not a protocol write gate. Consumers pin the strongRef and choose which publishers and questions they trust. No access or source facts are conferred.",
11346
- "fields": [
11347
- {
11348
- "name": "createdAt",
11349
- "type": "string<datetime>",
11350
- "required": false,
11351
- "description": "When the publisher first wrote this content. Optional: records published before it existed lack it, and the writer never rewrites unchanged content to add it. The content-derived key is computed without it, and republishing unchanged content keeps the stored record, so its CID (which strongRefs pin) never moves."
11352
- },
11353
- {
11354
- "name": "name",
11355
- "type": "string",
11356
- "required": false
11357
- },
11358
- {
11359
- "name": "questions",
11360
- "type": "array<→ #question>",
11361
- "required": true
11362
- }
11363
- ],
11202
+ "kind": "query",
11203
+ "description": "Records by URI, as listRecords answers them: the query `{\"where\": {\"uri\": {\"in\": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the curated record it resolves to instead (see `curated`). Draft tier.",
11364
11204
  "doc": ({
11365
11205
  "lexicon": 1,
11366
- "id": "pub.techne.draft.questionSet",
11367
- "description": "A list of questions to answer about a record, in order. They are portable assessment questions, answered by a pub.techne.draft.assessment. Published under a content-addressed key by publisher convention: unchanged content reuses the same record; changed content gets a new key. This is not a protocol write gate. Consumers pin the strongRef and choose which publishers and questions they trust. No access or source facts are conferred.",
11206
+ "id": "pub.techne.draft.query.getRecords",
11368
11207
  "defs": {
11369
11208
  "main": {
11370
- "type": "record",
11371
- "key": "any",
11372
- "record": {
11373
- "type": "object",
11209
+ "type": "query",
11210
+ "description": "Records by URI, as listRecords answers them: the query `{\"where\": {\"uri\": {\"in\": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the curated record it resolves to instead (see `curated`). Draft tier.",
11211
+ "parameters": {
11212
+ "type": "params",
11374
11213
  "required": [
11375
- "questions"
11214
+ "uris"
11376
11215
  ],
11377
11216
  "properties": {
11378
- "createdAt": {
11379
- "type": "string",
11380
- "format": "datetime",
11381
- "description": "When the publisher first wrote this content. Optional: records published before it existed lack it, and the writer never rewrites unchanged content to add it. The content-derived key is computed without it, and republishing unchanged content keeps the stored record, so its CID (which strongRefs pin) never moves."
11382
- },
11383
- "name": {
11384
- "type": "string",
11385
- "maxLength": 256
11386
- },
11387
- "questions": {
11217
+ "uris": {
11388
11218
  "type": "array",
11219
+ "maxLength": 100,
11389
11220
  "items": {
11390
- "type": "ref",
11391
- "ref": "#question"
11221
+ "type": "string",
11222
+ "format": "at-uri"
11223
+ }
11224
+ },
11225
+ "handles": {
11226
+ "type": "boolean",
11227
+ "description": "Also answer `handles`: the public handle of each repo the asked URIs name. Default false."
11228
+ },
11229
+ "curated": {
11230
+ "type": "boolean",
11231
+ "description": "Answer each asked URI as the curated record it resolves to (a source copy, or a record merged into another, answers as the curated record that claims it), when that record is listed in public now (curated, moderated, not held back); otherwise the URI answers as itself, as written. `resolved` names each one answered as another record. A URI moderation holds back is `withheld` and never resolved; the caller's own held-back post is answered to them as itself. A source whose account is not active still resolves: the claim is the curated record's public provenance, not the source row. A source of a suspended account, or, to a signed-in caller, one whose author is across a block either way (see `includeBlockedByMe`), is not resolved: it answers as itself, and so is left out. Records come once each, in the order first asked. Default false: as written."
11232
+ },
11233
+ "curation": {
11234
+ "type": "boolean",
11235
+ "description": "Also answer `curation`, signed in: the curation status of each asked URI that is the caller's own record (in their repo, a commons post they made, or the curated record standing for one), the answer a write's `put` gives, read back later. Nobody else's record is answered, nor one held privately (private records are never curated). Default false."
11236
+ },
11237
+ "defaults": {
11238
+ "type": "boolean",
11239
+ "description": "Also answer `defaults`, signed in: each asked URI naming a record of the caller's own that is missing, for which the platform reads a starting value in its place. Today that is a subjectPrefs record for a circle someone outside the caller's People added them to: Notifications start off (Show in my feed on) until the caller writes the record. Nobody else's is answered. Default false."
11240
+ },
11241
+ "includeBlockedByMe": {
11242
+ "type": "boolean",
11243
+ "description": "Signed in: lift the caller's OWN blocks for this read, so records and `handles` of people the caller blocked are answered (a client's list of the people its user blocked, to name them). Every generic read otherwise leaves out, for a signed-in caller, the records and handles of an account blocked either way, and for everyone those of a hidden or suspended account. A block made against the caller is never lifted, nor is a hidden or suspended account shown. Default false."
11244
+ }
11245
+ }
11246
+ },
11247
+ "output": {
11248
+ "encoding": "application/json",
11249
+ "schema": {
11250
+ "type": "object",
11251
+ "required": [
11252
+ "records"
11253
+ ],
11254
+ "properties": {
11255
+ "records": {
11256
+ "type": "array",
11257
+ "items": {
11258
+ "type": "ref",
11259
+ "ref": "pub.techne.draft.query.listRecords#record"
11260
+ }
11392
11261
  },
11393
- "minLength": 1,
11394
- "maxLength": 200
11262
+ "withheld": {
11263
+ "type": "array",
11264
+ "description": "The asked URIs of indexed public records moderation holds back from this caller, their author's account active and not suspended (a trusted verdict or a takedown, or a curated record every source of which is held back or by an account not active or suspended): they answer not found, and a client must not show another copy (the curated record they resolve to) in their place, as it may for a record that is gone or merged away. A caller's own commons post held back is answered to them instead (their own source, or the record it resolves to; not another author's source merged into it). A record whose author's account is not active or is suspended is not found and never named here; to a signed-in caller, neither is a record by an author blocked either way, or a curated record every source of which is by an author blocked either way, not active or suspended. Absent when none.",
11265
+ "items": {
11266
+ "type": "string",
11267
+ "format": "at-uri"
11268
+ }
11269
+ },
11270
+ "handles": {
11271
+ "type": "array",
11272
+ "description": "Only when asked with `handles`: the public handle of each repo the asked URIs name, whether or not its record was found or readable (handles are public directory data), in the order first asked, so a client can name a person whose profile has no name. A repo whose account is not active or is suspended, or that has no handle, is not named, nor, to a signed-in caller, one across a block either way (see `includeBlockedByMe`). Absent when none.",
11273
+ "items": {
11274
+ "type": "ref",
11275
+ "ref": "#handle"
11276
+ }
11277
+ },
11278
+ "resolved": {
11279
+ "type": "array",
11280
+ "description": "Only when asked with `curated`: each asked URI (once) that answered as another record, and that curated record. Absent when none.",
11281
+ "items": {
11282
+ "type": "ref",
11283
+ "ref": "#resolved"
11284
+ }
11285
+ },
11286
+ "curation": {
11287
+ "type": "array",
11288
+ "description": "Only when asked with `curation`, signed in: the curation status of each asked URI (once, in the order first asked) that is the caller's own. Absent when none.",
11289
+ "items": {
11290
+ "type": "ref",
11291
+ "ref": "#curation"
11292
+ }
11293
+ },
11294
+ "defaults": {
11295
+ "type": "array",
11296
+ "description": "Only when asked with `defaults`, signed in: each asked URI (once, in the order first asked) naming a missing record of the caller's own that the platform reads a starting value for, and that value. A client shows it as the record's value until the caller writes the record. Absent when none.",
11297
+ "items": {
11298
+ "type": "ref",
11299
+ "ref": "#default"
11300
+ }
11301
+ }
11395
11302
  }
11396
11303
  }
11397
- }
11304
+ },
11305
+ "errors": [
11306
+ {
11307
+ "name": "InvalidRequest",
11308
+ "description": "HTTP 400. No URIs, more than 100, one that is not an AT-URI, or `handles`, `curated`, `curation` or `defaults` not true or false."
11309
+ }
11310
+ ]
11398
11311
  },
11399
- "question": {
11312
+ "handle": {
11400
11313
  "type": "object",
11401
11314
  "required": [
11402
- "id",
11403
- "kind",
11404
- "question",
11405
- "prompt",
11406
- "criteria"
11315
+ "did",
11316
+ "handle"
11407
11317
  ],
11408
11318
  "properties": {
11409
- "id": {
11410
- "type": "string",
11411
- "maxLength": 128
11412
- },
11413
- "kind": {
11319
+ "did": {
11414
11320
  "type": "string",
11415
- "knownValues": [
11416
- "event",
11417
- "place"
11418
- ],
11419
- "description": "Subject category this question applies to."
11321
+ "format": "did"
11420
11322
  },
11421
- "question": {
11323
+ "handle": {
11422
11324
  "type": "string",
11423
- "maxLength": 4096
11424
- },
11425
- "prompt": {
11325
+ "format": "handle"
11326
+ }
11327
+ }
11328
+ },
11329
+ "resolved": {
11330
+ "type": "object",
11331
+ "required": [
11332
+ "uri",
11333
+ "curated"
11334
+ ],
11335
+ "properties": {
11336
+ "uri": {
11426
11337
  "type": "string",
11427
- "maxLength": 8192
11338
+ "format": "at-uri",
11339
+ "description": "The URI asked."
11428
11340
  },
11429
- "criteria": {
11430
- "type": "array",
11431
- "items": {
11341
+ "curated": {
11342
+ "type": "string",
11343
+ "format": "at-uri",
11344
+ "description": "The curated record that answered for it."
11345
+ }
11346
+ }
11347
+ },
11348
+ "curation": {
11349
+ "type": "object",
11350
+ "required": [
11351
+ "uri",
11352
+ "status"
11353
+ ],
11354
+ "properties": {
11355
+ "uri": {
11356
+ "type": "string",
11357
+ "format": "at-uri",
11358
+ "description": "The URI asked."
11359
+ },
11360
+ "status": {
11361
+ "type": "string",
11362
+ "knownValues": [
11363
+ "pending",
11364
+ "curated",
11365
+ "notCurated"
11366
+ ],
11367
+ "description": "`pending`: not listed for others yet (the curator or moderation has not answered). `curated`: listed in public as `curated`. `notCurated`: it will not be listed, for `reason` (moderation declined it, the index refused the version, a type with no lexicon, or a type no curator is endorsed for)."
11368
+ },
11369
+ "curated": {
11370
+ "type": "string",
11371
+ "format": "at-uri",
11372
+ "description": "With `curated`: the curated record listed for it (itself when it is that record)."
11373
+ },
11374
+ "reason": {
11375
+ "type": "string",
11376
+ "description": "With `notCurated`: why, in words for people (a moderation verdict value such as `spam`, `obscene` or `!takedown`, the index's refusal, or `not curated: no lexicon` / `not curated: no curator`)."
11377
+ }
11378
+ }
11379
+ },
11380
+ "default": {
11381
+ "type": "object",
11382
+ "required": [
11383
+ "uri",
11384
+ "value"
11385
+ ],
11386
+ "properties": {
11387
+ "uri": {
11388
+ "type": "string",
11389
+ "format": "at-uri",
11390
+ "description": "The URI asked: a record of the caller's own, missing."
11391
+ },
11392
+ "value": {
11393
+ "type": "unknown",
11394
+ "description": "The record value the platform reads in its place."
11395
+ }
11396
+ }
11397
+ }
11398
+ }
11399
+ })
11400
+ },
11401
+ {
11402
+ "nsid": "pub.techne.draft.query.listRecords",
11403
+ "name": "draft.query.listRecords",
11404
+ "group": "pub.techne",
11405
+ "kind": "query",
11406
+ "description": "The platform's generic list query: one page of the records a pub.techne.draft.query names, in its order. Every record is read through the platform's one read path, whatever the query says: no record of a hidden or suspended account is answered, nor, to a signed-in caller, another's record across a block either way (the caller blocked its author, or its author blocked the caller); a public record also leaves out anything moderation holds back (a trusted verdict or `!takedown`); a permissioned record is answered only when it is the caller's own or counts in a space whose read policy admits the caller now, not taken down (in a space whose authority is the caller, a block does not hide its records from them), and (in a member-owned circle space) only while its author is a current member by a claim the caller can read. A branch scoped to named authors, subjects or URIs, and a query with `curated: false`, answers public records as written; any other branch crosses sources and answers curated public records (the commons' listed records). A curated record every source of which is by a hidden or suspended account is left out for everyone, and one every source of which is by an author blocked either way is left out for a signed-in caller. Anyone may call it, signed in or not; an anonymous caller gets public records only. Each top-level `any` branch runs on its own index and the branches are merged in order, so a record that matches two branches comes once. A permissioned record, and a public record answered as written, is answered only while the platform's `decide` calls its version valid, and because that check runs on the page already read, a page can hold fewer records than `limit` and still carry a cursor: keep paging until none comes back. Draft tier.",
11407
+ "doc": ({
11408
+ "lexicon": 1,
11409
+ "id": "pub.techne.draft.query.listRecords",
11410
+ "defs": {
11411
+ "main": {
11412
+ "type": "query",
11413
+ "description": "The platform's generic list query: one page of the records a pub.techne.draft.query names, in its order. Every record is read through the platform's one read path, whatever the query says: no record of a hidden or suspended account is answered, nor, to a signed-in caller, another's record across a block either way (the caller blocked its author, or its author blocked the caller); a public record also leaves out anything moderation holds back (a trusted verdict or `!takedown`); a permissioned record is answered only when it is the caller's own or counts in a space whose read policy admits the caller now, not taken down (in a space whose authority is the caller, a block does not hide its records from them), and (in a member-owned circle space) only while its author is a current member by a claim the caller can read. A branch scoped to named authors, subjects or URIs, and a query with `curated: false`, answers public records as written; any other branch crosses sources and answers curated public records (the commons' listed records). A curated record every source of which is by a hidden or suspended account is left out for everyone, and one every source of which is by an author blocked either way is left out for a signed-in caller. Anyone may call it, signed in or not; an anonymous caller gets public records only. Each top-level `any` branch runs on its own index and the branches are merged in order, so a record that matches two branches comes once. A permissioned record, and a public record answered as written, is answered only while the platform's `decide` calls its version valid, and because that check runs on the page already read, a page can hold fewer records than `limit` and still carry a cursor: keep paging until none comes back. Draft tier.",
11414
+ "parameters": {
11415
+ "type": "params",
11416
+ "properties": {
11417
+ "query": {
11432
11418
  "type": "string",
11433
- "maxLength": 256
11419
+ "maxLength": 16384,
11420
+ "description": "A pub.techne.draft.query object, as JSON. Give this or `queryUri`."
11434
11421
  },
11435
- "minLength": 1,
11436
- "maxLength": 32,
11437
- "description": "Ordered assessment vocabulary. This version supports supported, contradicted, unknown and conflicting; consumers must not interpret other values as false."
11438
- },
11439
- "levels": {
11440
- "type": "array",
11441
- "items": {
11422
+ "queryUri": {
11442
11423
  "type": "string",
11443
- "maxLength": 64
11424
+ "format": "at-uri",
11425
+ "description": "A published pub.techne.draft.query record to run. Give this or `query`."
11444
11426
  },
11445
- "minLength": 2,
11446
- "maxLength": 10,
11447
- "description": "Optional ordered answer rubric for a graded question, lowest first, as asked of the model. criteria remains the categorical value vocabulary. Answers to a question with levels may carry score."
11427
+ "params": {
11428
+ "type": "string",
11429
+ "maxLength": 8192,
11430
+ "description": "The query's parameters as a JSON object of strings (or lists of strings), e.g. {\"here\": \"40.01,-105.27\"}. `$viewer` and `$now` are the platform's and cannot be passed."
11431
+ },
11432
+ "limit": {
11433
+ "type": "integer",
11434
+ "minimum": 1,
11435
+ "maximum": 500,
11436
+ "description": "The page size; default the query's `limit`, else 50."
11437
+ },
11438
+ "cursor": {
11439
+ "type": "string",
11440
+ "description": "The cursor of the previous page, opaque: pass it back as it came, with the same query."
11441
+ },
11442
+ "count": {
11443
+ "type": "boolean",
11444
+ "default": false,
11445
+ "description": "Also count the records the query answers this caller, as pub.techne.draft.query.countRecords would for the same query and params: the output gains `count` and `capped`."
11446
+ }
11447
+ }
11448
+ },
11449
+ "output": {
11450
+ "encoding": "application/json",
11451
+ "schema": {
11452
+ "type": "object",
11453
+ "required": [
11454
+ "records"
11455
+ ],
11456
+ "properties": {
11457
+ "records": {
11458
+ "type": "array",
11459
+ "items": {
11460
+ "type": "ref",
11461
+ "ref": "#record"
11462
+ },
11463
+ "description": "In the query's order, ties broken by URI."
11464
+ },
11465
+ "cursor": {
11466
+ "type": "string",
11467
+ "description": "Pass it back as cursor for the next page. Absent on the last page; a page shorter than `limit` is not the last page while it carries one."
11468
+ },
11469
+ "count": {
11470
+ "type": "integer",
11471
+ "description": "Only when asked with `count=true`: how many records the query answers this caller, each once, up to countRecords' cap (countRecords' `count`)."
11472
+ },
11473
+ "capped": {
11474
+ "type": "boolean",
11475
+ "description": "Only when asked with `count=true`: true when there are more than `count` (countRecords' `capped`)."
11476
+ }
11477
+ }
11478
+ }
11479
+ },
11480
+ "errors": [
11481
+ {
11482
+ "name": "InvalidRequest",
11483
+ "description": "HTTP 400. A malformed or refused query (naming the branch or condition), parameter or cursor."
11448
11484
  },
11449
- "tag": {
11485
+ {
11486
+ "name": "NotFound",
11487
+ "description": "HTTP 404. `queryUri` names no query record the caller may read."
11488
+ }
11489
+ ]
11490
+ },
11491
+ "record": {
11492
+ "type": "object",
11493
+ "description": "One indexed record.",
11494
+ "required": [
11495
+ "uri",
11496
+ "cid",
11497
+ "author",
11498
+ "collection",
11499
+ "value",
11500
+ "time",
11501
+ "source"
11502
+ ],
11503
+ "properties": {
11504
+ "uri": {
11450
11505
  "type": "string",
11451
- "maxLength": 256
11506
+ "format": "at-uri"
11452
11507
  },
11453
- "family": {
11508
+ "cid": {
11454
11509
  "type": "string",
11455
- "maxLength": 128
11510
+ "format": "cid"
11511
+ },
11512
+ "author": {
11513
+ "type": "string",
11514
+ "format": "did",
11515
+ "description": "The DID whose repo holds the record."
11516
+ },
11517
+ "collection": {
11518
+ "type": "string",
11519
+ "format": "nsid"
11520
+ },
11521
+ "value": {
11522
+ "type": "unknown",
11523
+ "description": "The record body."
11524
+ },
11525
+ "time": {
11526
+ "type": "string",
11527
+ "format": "datetime",
11528
+ "description": "The record's indexed time (the `written` role)."
11529
+ },
11530
+ "space": {
11531
+ "type": "string",
11532
+ "format": "at-uri",
11533
+ "description": "The space a permissioned record counts in. Absent for a public record, and for a caller's own record that counts in none."
11534
+ },
11535
+ "source": {
11536
+ "type": "string",
11537
+ "knownValues": [
11538
+ "public",
11539
+ "permissioned"
11540
+ ],
11541
+ "description": "Whether the record is public (on the firehose) or permissioned."
11542
+ },
11543
+ "curated": {
11544
+ "type": "boolean",
11545
+ "description": "A public record that is a live curated record: a curator the commons root trusts merged it from its sources, and it is not superseded. Its `pub.techne.draft.provenance` (same author, subject this record) names who it is from. Absent otherwise."
11546
+ },
11547
+ "held": {
11548
+ "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."
11550
+ },
11551
+ "measures": {
11552
+ "type": "unknown",
11553
+ "description": "The numbers the query's operators produced for this record, by name (a `near` distance in metres, a `matches` rank)."
11554
+ },
11555
+ "signals": {
11556
+ "type": "unknown",
11557
+ "description": "The server-side signals the query asked for, by name; a signal with no value for this record is absent."
11456
11558
  }
11457
11559
  }
11458
11560
  }
11459
11561
  }
11460
- }),
11461
- "homes": [
11462
- {
11463
- "space": "public",
11464
- "unbuilt": false
11465
- }
11466
- ]
11562
+ })
11467
11563
  },
11468
11564
  {
11469
- "nsid": "pub.techne.draft.receipt",
11470
- "name": "draft.receipt",
11565
+ "nsid": "pub.techne.draft.query.listRejections",
11566
+ "name": "draft.query.listRejections",
11471
11567
  "group": "pub.techne",
11472
- "kind": "record",
11473
- "key": "any",
11568
+ "kind": "query",
11569
+ "description": "The public records this AppView refused when it indexed them, by the shared check (lexicons/check) or its own lexicon validation: they are not stored and no read answers them. Each is a public fact about a public record: which version, the check's reason, and when this AppView first saw that version refused. A record fixed by a later version, or deleted, drops out. Open to anyone. A record whose author's account is not active, or that a trusted takedown names, is not listed. Oldest first-seen first, so a reader pages forward with `cursor` or resumes with `since`. Draft tier.",
11570
+ "doc": ({
11571
+ "lexicon": 1,
11572
+ "id": "pub.techne.draft.query.listRejections",
11573
+ "defs": {
11574
+ "main": {
11575
+ "type": "query",
11576
+ "description": "The public records this AppView refused when it indexed them, by the shared check (lexicons/check) or its own lexicon validation: they are not stored and no read answers them. Each is a public fact about a public record: which version, the check's reason, and when this AppView first saw that version refused. A record fixed by a later version, or deleted, drops out. Open to anyone. A record whose author's account is not active, or that a trusted takedown names, is not listed. Oldest first-seen first, so a reader pages forward with `cursor` or resumes with `since`. Draft tier.",
11577
+ "parameters": {
11578
+ "type": "params",
11579
+ "properties": {
11580
+ "author": {
11581
+ "type": "string",
11582
+ "format": "did",
11583
+ "description": "Only this repo's records."
11584
+ },
11585
+ "collection": {
11586
+ "type": "string",
11587
+ "format": "nsid",
11588
+ "description": "Only this collection's records."
11589
+ },
11590
+ "since": {
11591
+ "type": "string",
11592
+ "format": "datetime",
11593
+ "description": "Only versions first seen refused at or after this time."
11594
+ },
11595
+ "limit": {
11596
+ "type": "integer",
11597
+ "minimum": 1,
11598
+ "maximum": 100,
11599
+ "default": 50
11600
+ },
11601
+ "cursor": {
11602
+ "type": "string"
11603
+ }
11604
+ }
11605
+ },
11606
+ "output": {
11607
+ "encoding": "application/json",
11608
+ "schema": {
11609
+ "type": "object",
11610
+ "required": [
11611
+ "rejections"
11612
+ ],
11613
+ "properties": {
11614
+ "rejections": {
11615
+ "type": "array",
11616
+ "items": {
11617
+ "type": "ref",
11618
+ "ref": "#rejection"
11619
+ }
11620
+ },
11621
+ "cursor": {
11622
+ "type": "string",
11623
+ "description": "Present when the page is full: pass it back for the next page."
11624
+ }
11625
+ }
11626
+ }
11627
+ },
11628
+ "errors": [
11629
+ {
11630
+ "name": "InvalidRequest",
11631
+ "description": "HTTP 400. `limit` outside 1..100, `author` not a DID, `since` not a datetime, or a malformed `cursor`."
11632
+ }
11633
+ ]
11634
+ },
11635
+ "rejection": {
11636
+ "type": "object",
11637
+ "required": [
11638
+ "uri",
11639
+ "cid",
11640
+ "author",
11641
+ "collection",
11642
+ "reason",
11643
+ "message",
11644
+ "firstSeenAt"
11645
+ ],
11646
+ "properties": {
11647
+ "uri": {
11648
+ "type": "string",
11649
+ "format": "at-uri"
11650
+ },
11651
+ "cid": {
11652
+ "type": "string",
11653
+ "format": "cid",
11654
+ "description": "The version refused (its CID verified against the signed bytes)."
11655
+ },
11656
+ "author": {
11657
+ "type": "string",
11658
+ "format": "did"
11659
+ },
11660
+ "collection": {
11661
+ "type": "string",
11662
+ "format": "nsid"
11663
+ },
11664
+ "reason": {
11665
+ "type": "string",
11666
+ "knownValues": [
11667
+ "invalid",
11668
+ "placement",
11669
+ "budget"
11670
+ ],
11671
+ "description": "`invalid`: the body does not satisfy its lexicon. `placement`: the record has no public home (its collection is private-only, or a credential that is not its issuer's own unsigned one). `budget`: a record of a runtime (community or requested) type skipped because its author, or the type, had used the day's indexing budget; a later version may be indexed on another day."
11672
+ },
11673
+ "message": {
11674
+ "type": "string",
11675
+ "description": "The refusal's own words, for people; not a stable value."
11676
+ },
11677
+ "firstSeenAt": {
11678
+ "type": "string",
11679
+ "format": "datetime",
11680
+ "description": "When this AppView first saw this version refused."
11681
+ }
11682
+ }
11683
+ }
11684
+ }
11685
+ })
11686
+ },
11687
+ {
11688
+ "nsid": "pub.techne.draft.questionSet",
11689
+ "name": "draft.questionSet",
11690
+ "group": "pub.techne",
11691
+ "kind": "record",
11692
+ "key": "any",
11693
+ "description": "A list of questions to answer about a record, in order. They are portable assessment questions, answered by a pub.techne.draft.assessment. Published under a content-addressed key by publisher convention: unchanged content reuses the same record; changed content gets a new key. This is not a protocol write gate. Consumers pin the strongRef and choose which publishers and questions they trust. No access or source facts are conferred.",
11694
+ "fields": [
11695
+ {
11696
+ "name": "createdAt",
11697
+ "type": "string<datetime>",
11698
+ "required": false,
11699
+ "description": "When the publisher first wrote this content. Optional: records published before it existed lack it, and the writer never rewrites unchanged content to add it. The content-derived key is computed without it, and republishing unchanged content keeps the stored record, so its CID (which strongRefs pin) never moves."
11700
+ },
11701
+ {
11702
+ "name": "name",
11703
+ "type": "string",
11704
+ "required": false
11705
+ },
11706
+ {
11707
+ "name": "questions",
11708
+ "type": "array<→ #question>",
11709
+ "required": true
11710
+ }
11711
+ ],
11712
+ "doc": ({
11713
+ "lexicon": 1,
11714
+ "id": "pub.techne.draft.questionSet",
11715
+ "description": "A list of questions to answer about a record, in order. They are portable assessment questions, answered by a pub.techne.draft.assessment. Published under a content-addressed key by publisher convention: unchanged content reuses the same record; changed content gets a new key. This is not a protocol write gate. Consumers pin the strongRef and choose which publishers and questions they trust. No access or source facts are conferred.",
11716
+ "defs": {
11717
+ "main": {
11718
+ "type": "record",
11719
+ "key": "any",
11720
+ "record": {
11721
+ "type": "object",
11722
+ "required": [
11723
+ "questions"
11724
+ ],
11725
+ "properties": {
11726
+ "createdAt": {
11727
+ "type": "string",
11728
+ "format": "datetime",
11729
+ "description": "When the publisher first wrote this content. Optional: records published before it existed lack it, and the writer never rewrites unchanged content to add it. The content-derived key is computed without it, and republishing unchanged content keeps the stored record, so its CID (which strongRefs pin) never moves."
11730
+ },
11731
+ "name": {
11732
+ "type": "string",
11733
+ "maxLength": 256
11734
+ },
11735
+ "questions": {
11736
+ "type": "array",
11737
+ "items": {
11738
+ "type": "ref",
11739
+ "ref": "#question"
11740
+ },
11741
+ "minLength": 1,
11742
+ "maxLength": 200
11743
+ }
11744
+ }
11745
+ }
11746
+ },
11747
+ "question": {
11748
+ "type": "object",
11749
+ "required": [
11750
+ "id",
11751
+ "kind",
11752
+ "question",
11753
+ "prompt",
11754
+ "criteria"
11755
+ ],
11756
+ "properties": {
11757
+ "id": {
11758
+ "type": "string",
11759
+ "maxLength": 128
11760
+ },
11761
+ "kind": {
11762
+ "type": "string",
11763
+ "knownValues": [
11764
+ "event",
11765
+ "place"
11766
+ ],
11767
+ "description": "Subject category this question applies to."
11768
+ },
11769
+ "question": {
11770
+ "type": "string",
11771
+ "maxLength": 4096
11772
+ },
11773
+ "prompt": {
11774
+ "type": "string",
11775
+ "maxLength": 8192
11776
+ },
11777
+ "criteria": {
11778
+ "type": "array",
11779
+ "items": {
11780
+ "type": "string",
11781
+ "maxLength": 256
11782
+ },
11783
+ "minLength": 1,
11784
+ "maxLength": 32,
11785
+ "description": "Ordered assessment vocabulary. This version supports supported, contradicted, unknown and conflicting; consumers must not interpret other values as false."
11786
+ },
11787
+ "levels": {
11788
+ "type": "array",
11789
+ "items": {
11790
+ "type": "string",
11791
+ "maxLength": 64
11792
+ },
11793
+ "minLength": 2,
11794
+ "maxLength": 10,
11795
+ "description": "Optional ordered answer rubric for a graded question, lowest first, as asked of the model. criteria remains the categorical value vocabulary. Answers to a question with levels may carry score."
11796
+ },
11797
+ "tag": {
11798
+ "type": "string",
11799
+ "maxLength": 256
11800
+ },
11801
+ "family": {
11802
+ "type": "string",
11803
+ "maxLength": 128
11804
+ }
11805
+ }
11806
+ }
11807
+ }
11808
+ }),
11809
+ "homes": [
11810
+ {
11811
+ "space": "public",
11812
+ "unbuilt": false
11813
+ }
11814
+ ]
11815
+ },
11816
+ {
11817
+ "nsid": "pub.techne.draft.receipt",
11818
+ "name": "draft.receipt",
11819
+ "group": "pub.techne",
11820
+ "kind": "record",
11821
+ "key": "any",
11474
11822
  "description": "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. `any` permits that convention but cannot enforce it.",
11475
11823
  "fields": [
11476
11824
  {
@@ -11490,110 +11838,1170 @@ export const catalog = {
11490
11838
  "type": "string<datetime>",
11491
11839
  "required": true
11492
11840
  }
11493
- ],
11841
+ ],
11842
+ "doc": ({
11843
+ "lexicon": 1,
11844
+ "id": "pub.techne.draft.receipt",
11845
+ "description": "A note that a rule has processed a record. It names the record at a revision, and what the rule wrote about it (possibly nothing). A rule at stage `curated` writes one for every curated record it processes, so a reader can tell a record that is done from one still waiting, including when the rule had nothing to say. The curator's pub.techne.draft.provenance is the merge receipt; these are the curated-stage ones. A curated record is fully processed when it has its provenance and a receipt, for its current revision, from every rule at `stage: curated` that an admin writer (the commons root, or an operator the root names) vouches for. Written by the commons rules in their own repos. PUBLIC.",
11846
+ "defs": {
11847
+ "main": {
11848
+ "type": "record",
11849
+ "key": "any",
11850
+ "description": "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. `any` permits that convention but cannot enforce it.",
11851
+ "record": {
11852
+ "type": "object",
11853
+ "required": [
11854
+ "subject",
11855
+ "createdAt"
11856
+ ],
11857
+ "properties": {
11858
+ "subject": {
11859
+ "type": "ref",
11860
+ "ref": "com.atproto.repo.strongRef",
11861
+ "description": "The record processed, at the revision processed."
11862
+ },
11863
+ "outputs": {
11864
+ "type": "array",
11865
+ "maxLength": 64,
11866
+ "items": {
11867
+ "type": "ref",
11868
+ "ref": "com.atproto.repo.strongRef"
11869
+ },
11870
+ "description": "What the rule wrote about it on that run. Empty or absent: nothing to say."
11871
+ },
11872
+ "createdAt": {
11873
+ "type": "string",
11874
+ "format": "datetime"
11875
+ }
11876
+ }
11877
+ }
11878
+ }
11879
+ }
11880
+ }),
11881
+ "homes": [
11882
+ {
11883
+ "space": "public",
11884
+ "unbuilt": false
11885
+ }
11886
+ ]
11887
+ },
11888
+ {
11889
+ "nsid": "pub.techne.draft.receipt.query",
11890
+ "name": "draft.receipt.query",
11891
+ "group": "pub.techne",
11892
+ "kind": "queryDocument",
11893
+ "description": "Which fields of a rule's receipt fill the shared query roles: the records it wrote (outputs) are its references, so a read finds the receipt that accounts for a record. Its subject is the record the rule ran on.",
11894
+ "doc": ({
11895
+ "lexicon": 1,
11896
+ "id": "pub.techne.draft.receipt.query",
11897
+ "description": "Which fields of a rule's receipt fill the shared query roles: the records it wrote (outputs) are its references, so a read finds the receipt that accounts for a record. Its subject is the record the rule ran on.",
11898
+ "defs": {
11899
+ "main": {
11900
+ "type": "queryDocument",
11901
+ "roles": {
11902
+ "references": [
11903
+ "outputs[].uri"
11904
+ ]
11905
+ }
11906
+ }
11907
+ }
11908
+ })
11909
+ },
11910
+ {
11911
+ "nsid": "pub.techne.draft.reflection",
11912
+ "name": "draft.reflection",
11913
+ "group": "pub.techne",
11914
+ "kind": "record",
11915
+ "key": "tid",
11916
+ "description": "A first-person reflection on YOUR OWN act: \"how did this go for me?\" — a beacon you lit, an event you hosted, an intro you brokered — disambiguated by the TYPED SUBJECT, no kind enum. PRIVATE by construction: its only declared home is the author's own `pub.techne.draft.space.personal` (audience of one); it has NO public home at all, so the firehose guard withholds it and no member-facing surface ever reads it. THE DISTINCTION FROM `pub.techne.draft.evaluation`, which must never blur again: an `evaluation` is a JUDGEMENT OF SOMETHING ELSE (\"was this good?\" — a vouch, event feedback, an intro outcome) shared into a space; a `reflection` is a SELF-REPORT ABOUT YOUR OWN ACT (\"how did this go FOR ME?\") kept to yourself. The two are different QUESTIONS, so they are different RECORD TYPES — never one shape read two ways by where it happens to be placed: placement never changes what a record means, and a record is portable, so the placement does not travel with it. Provenance: the author is by definition the actor whose act is reflected on — the write path rebuilds the subject from the authenticated author, so a reflection about someone else's act is unconstructable.",
11917
+ "fields": [
11918
+ {
11919
+ "name": "subject",
11920
+ "type": "→ com.atproto.repo.strongRef",
11921
+ "required": true,
11922
+ "description": "The author's OWN act being reflected on: an event they lit/hosted, an introProposal they brokered."
11923
+ },
11924
+ {
11925
+ "name": "direction",
11926
+ "type": "string (enum)",
11927
+ "required": true,
11928
+ "description": "How it went, for the author. `positive` = it worked out; `negative` = it did not. First-answer-wins at the writer: once a direction is on record a later answer never overwrites it.",
11929
+ "knownValues": [
11930
+ "positive",
11931
+ "negative"
11932
+ ]
11933
+ },
11934
+ {
11935
+ "name": "note",
11936
+ "type": "string",
11937
+ "required": false,
11938
+ "description": "Optional free-form note to self."
11939
+ },
11940
+ {
11941
+ "name": "counterfactual",
11942
+ "type": "boolean",
11943
+ "required": false,
11944
+ "description": "Attribution: \"would this outcome have happened without my act?\" — a question only ever meaningful about your OWN act, which is why it lives here and not on `evaluation`. Written by a SECOND write that re-puts the same record; there is still exactly one reflection record per subject. Rules (each pinned by a test at the writer): (a) asked ONLY after a positive `direction` — a negative answer never renders this question and never sets the field; (b) `direction` stays first-answer-wins (idempotent) while this field may be set EXACTLY ONCE, only by the record's own author, and only when `direction == \"positive\"`; (c) placement is unchanged by this second write — the re-put takes no placement parameter, so this field is exactly as private as the record it rides."
11945
+ },
11946
+ {
11947
+ "name": "createdAt",
11948
+ "type": "string<datetime>",
11949
+ "required": true
11950
+ }
11951
+ ],
11952
+ "doc": ({
11953
+ "lexicon": 1,
11954
+ "id": "pub.techne.draft.reflection",
11955
+ "description": "A first-person reflection on YOUR OWN act: \"how did this go for me?\" — a beacon you lit, an event you hosted, an intro you brokered — disambiguated by the TYPED SUBJECT, no kind enum. PRIVATE by construction: its only declared home is the author's own `pub.techne.draft.space.personal` (audience of one); it has NO public home at all, so the firehose guard withholds it and no member-facing surface ever reads it. THE DISTINCTION FROM `pub.techne.draft.evaluation`, which must never blur again: an `evaluation` is a JUDGEMENT OF SOMETHING ELSE (\"was this good?\" — a vouch, event feedback, an intro outcome) shared into a space; a `reflection` is a SELF-REPORT ABOUT YOUR OWN ACT (\"how did this go FOR ME?\") kept to yourself. The two are different QUESTIONS, so they are different RECORD TYPES — never one shape read two ways by where it happens to be placed: placement never changes what a record means, and a record is portable, so the placement does not travel with it. Provenance: the author is by definition the actor whose act is reflected on — the write path rebuilds the subject from the authenticated author, so a reflection about someone else's act is unconstructable.",
11956
+ "defs": {
11957
+ "main": {
11958
+ "type": "record",
11959
+ "key": "tid",
11960
+ "record": {
11961
+ "type": "object",
11962
+ "required": [
11963
+ "subject",
11964
+ "direction",
11965
+ "createdAt"
11966
+ ],
11967
+ "properties": {
11968
+ "subject": {
11969
+ "type": "ref",
11970
+ "ref": "com.atproto.repo.strongRef",
11971
+ "description": "The author's OWN act being reflected on: an event they lit/hosted, an introProposal they brokered."
11972
+ },
11973
+ "direction": {
11974
+ "type": "string",
11975
+ "description": "How it went, for the author. `positive` = it worked out; `negative` = it did not. First-answer-wins at the writer: once a direction is on record a later answer never overwrites it.",
11976
+ "knownValues": [
11977
+ "positive",
11978
+ "negative"
11979
+ ]
11980
+ },
11981
+ "note": {
11982
+ "type": "string",
11983
+ "maxLength": 2560,
11984
+ "maxGraphemes": 256,
11985
+ "description": "Optional free-form note to self."
11986
+ },
11987
+ "counterfactual": {
11988
+ "type": "boolean",
11989
+ "description": "Attribution: \"would this outcome have happened without my act?\" — a question only ever meaningful about your OWN act, which is why it lives here and not on `evaluation`. Written by a SECOND write that re-puts the same record; there is still exactly one reflection record per subject. Rules (each pinned by a test at the writer): (a) asked ONLY after a positive `direction` — a negative answer never renders this question and never sets the field; (b) `direction` stays first-answer-wins (idempotent) while this field may be set EXACTLY ONCE, only by the record's own author, and only when `direction == \"positive\"`; (c) placement is unchanged by this second write — the re-put takes no placement parameter, so this field is exactly as private as the record it rides."
11990
+ },
11991
+ "createdAt": {
11992
+ "type": "string",
11993
+ "format": "datetime"
11994
+ }
11995
+ }
11996
+ }
11997
+ }
11998
+ }
11999
+ }),
12000
+ "homes": [
12001
+ {
12002
+ "space": "pub.techne.draft.space.personal",
12003
+ "unbuilt": false
12004
+ }
12005
+ ]
12006
+ },
12007
+ {
12008
+ "nsid": "pub.techne.draft.registry.blockIndex",
12009
+ "name": "draft.registry.blockIndex",
12010
+ "group": "pub.techne",
12011
+ "kind": "procedure",
12012
+ "description": "Operator only. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.",
12013
+ "doc": ({
12014
+ "lexicon": 1,
12015
+ "id": "pub.techne.draft.registry.blockIndex",
12016
+ "defs": {
12017
+ "main": {
12018
+ "type": "procedure",
12019
+ "description": "Operator only. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.",
12020
+ "input": {
12021
+ "encoding": "application/json",
12022
+ "schema": {
12023
+ "type": "object",
12024
+ "required": [
12025
+ "nsid",
12026
+ "author",
12027
+ "reason"
12028
+ ],
12029
+ "properties": {
12030
+ "nsid": {
12031
+ "type": "string",
12032
+ "format": "nsid",
12033
+ "description": "The runtime type (a community draft or a requested type)."
12034
+ },
12035
+ "author": {
12036
+ "type": "string",
12037
+ "format": "did",
12038
+ "description": "The author whose records of the type are blocked."
12039
+ },
12040
+ "reason": {
12041
+ "type": "string",
12042
+ "minLength": 1,
12043
+ "maxLength": 1000,
12044
+ "description": "Why, kept with the block."
12045
+ }
12046
+ }
12047
+ }
12048
+ },
12049
+ "output": {
12050
+ "encoding": "application/json",
12051
+ "schema": {
12052
+ "type": "object",
12053
+ "required": [
12054
+ "nsid",
12055
+ "author",
12056
+ "purged",
12057
+ "page"
12058
+ ],
12059
+ "properties": {
12060
+ "nsid": {
12061
+ "type": "string",
12062
+ "format": "nsid"
12063
+ },
12064
+ "author": {
12065
+ "type": "string",
12066
+ "format": "did"
12067
+ },
12068
+ "purged": {
12069
+ "type": "integer",
12070
+ "minimum": 0,
12071
+ "description": "How many of the author's indexed records of the type were removed."
12072
+ },
12073
+ "page": {
12074
+ "type": "string",
12075
+ "format": "uri",
12076
+ "description": "The type's page on techne.pub."
12077
+ }
12078
+ }
12079
+ }
12080
+ },
12081
+ "errors": [
12082
+ {
12083
+ "name": "AuthenticationRequired",
12084
+ "description": "Blocking is a signed-in act."
12085
+ },
12086
+ {
12087
+ "name": "Forbidden",
12088
+ "description": "The caller is not an operator of this platform."
12089
+ },
12090
+ {
12091
+ "name": "UnknownType",
12092
+ "description": "`nsid` names no community or requested type (our own types are not limited)."
12093
+ }
12094
+ ]
12095
+ }
12096
+ }
12097
+ })
12098
+ },
12099
+ {
12100
+ "nsid": "pub.techne.draft.registry.defs",
12101
+ "name": "draft.registry.defs",
12102
+ "group": "pub.techne",
12103
+ "kind": "object",
12104
+ "description": "Shared shapes of the type registry: what a type is (its lexicon, query roles, creator, state, record count, sidecars) and what a request to index a foreign type is.",
12105
+ "doc": ({
12106
+ "lexicon": 1,
12107
+ "id": "pub.techne.draft.registry.defs",
12108
+ "description": "Shared shapes of the type registry: what a type is (its lexicon, query roles, creator, state, record count, sidecars) and what a request to index a foreign type is.",
12109
+ "defs": {
12110
+ "typeSummary": {
12111
+ "type": "object",
12112
+ "description": "One type in a list.",
12113
+ "required": [
12114
+ "nsid",
12115
+ "name",
12116
+ "origin",
12117
+ "state",
12118
+ "recordCount",
12119
+ "page"
12120
+ ],
12121
+ "properties": {
12122
+ "nsid": {
12123
+ "type": "string",
12124
+ "format": "nsid"
12125
+ },
12126
+ "name": {
12127
+ "type": "string",
12128
+ "maxLength": 63,
12129
+ "description": "The NSID's last segment, which is how the type reads."
12130
+ },
12131
+ "description": {
12132
+ "type": "string",
12133
+ "description": "The lexicon's own description of its main def (else of the document), as written: its length is the lexicon's."
12134
+ },
12135
+ "origin": {
12136
+ "type": "string",
12137
+ "maxLength": 32,
12138
+ "knownValues": [
12139
+ "platform",
12140
+ "community",
12141
+ "requested"
12142
+ ],
12143
+ "description": "`platform`: a type the platform ships. `community`: a draft someone published, `pub.techne.draft.c.<id>.<name>`. `requested`: a type defined elsewhere on the network that someone asked the platform to index."
12144
+ },
12145
+ "state": {
12146
+ "type": "string",
12147
+ "maxLength": 32,
12148
+ "knownValues": [
12149
+ "indexed",
12150
+ "pending",
12151
+ "declined",
12152
+ "blocked"
12153
+ ],
12154
+ "description": "`indexed`: a platform or community type, or an approved request. An approved request's existing records are read from the network (a walk of its history) from the approval on; its new writes on the network reach the platform once a release adds the type to what the platform subscribes to, and until then only those written through the platform arrive. `pending`: a request not yet decided; only records written through the platform are indexed. `declined`: an operator declined the request; it stays as pending does. `blocked`: an operator stopped indexing it."
12155
+ },
12156
+ "creator": {
12157
+ "type": "string",
12158
+ "format": "did",
12159
+ "description": "Who published a community type, or who requested a foreign one. Only the creator may change a community type."
12160
+ },
12161
+ "sidecarOf": {
12162
+ "type": "string",
12163
+ "format": "nsid",
12164
+ "description": "The type this one extends: its records carry a `subject` naming a record of that type."
12165
+ },
12166
+ "forkOf": {
12167
+ "type": "string",
12168
+ "format": "nsid",
12169
+ "description": "The community type this one was forked from."
12170
+ },
12171
+ "recordCount": {
12172
+ "type": "integer",
12173
+ "minimum": 0,
12174
+ "description": "Public records of this type the platform holds now."
12175
+ },
12176
+ "page": {
12177
+ "type": "string",
12178
+ "format": "uri",
12179
+ "description": "The type's page on techne.pub. Share it with the person you are working with."
12180
+ },
12181
+ "updatedAt": {
12182
+ "type": "string",
12183
+ "format": "datetime"
12184
+ }
12185
+ }
12186
+ },
12187
+ "typeView": {
12188
+ "type": "object",
12189
+ "description": "One type in full.",
12190
+ "required": [
12191
+ "nsid",
12192
+ "name",
12193
+ "origin",
12194
+ "state",
12195
+ "recordCount",
12196
+ "page",
12197
+ "lexicon"
12198
+ ],
12199
+ "properties": {
12200
+ "nsid": {
12201
+ "type": "string",
12202
+ "format": "nsid"
12203
+ },
12204
+ "name": {
12205
+ "type": "string",
12206
+ "maxLength": 63
12207
+ },
12208
+ "description": {
12209
+ "type": "string"
12210
+ },
12211
+ "origin": {
12212
+ "type": "string",
12213
+ "maxLength": 32,
12214
+ "knownValues": [
12215
+ "platform",
12216
+ "community",
12217
+ "requested"
12218
+ ]
12219
+ },
12220
+ "state": {
12221
+ "type": "string",
12222
+ "maxLength": 32,
12223
+ "knownValues": [
12224
+ "indexed",
12225
+ "pending",
12226
+ "declined",
12227
+ "blocked"
12228
+ ]
12229
+ },
12230
+ "creator": {
12231
+ "type": "string",
12232
+ "format": "did"
12233
+ },
12234
+ "sidecarOf": {
12235
+ "type": "string",
12236
+ "format": "nsid"
12237
+ },
12238
+ "forkOf": {
12239
+ "type": "string",
12240
+ "format": "nsid"
12241
+ },
12242
+ "recordCount": {
12243
+ "type": "integer",
12244
+ "minimum": 0
12245
+ },
12246
+ "page": {
12247
+ "type": "string",
12248
+ "format": "uri"
12249
+ },
12250
+ "lexicon": {
12251
+ "type": "unknown",
12252
+ "description": "The type's current lexicon document."
12253
+ },
12254
+ "query": {
12255
+ "type": "unknown",
12256
+ "description": "The type's `{nsid}.query` document: which fields fill the shared query roles (the time, the place, the text, the references). Absent when the type has none; its records can then only be got and listed."
12257
+ },
12258
+ "version": {
12259
+ "type": "integer",
12260
+ "minimum": 1,
12261
+ "description": "A community or requested type's version. A community type's is 1 at its first publish and one more at each additive change; a requested type's is 1. Absent for a platform type."
12262
+ },
12263
+ "schema": {
12264
+ "type": "ref",
12265
+ "ref": "com.atproto.repo.strongRef",
12266
+ "description": "The `com.atproto.lexicon.schema` record this lexicon is published as (in the registry's repo for a community type, in its authority's repo for a foreign one)."
12267
+ },
12268
+ "sidecars": {
12269
+ "type": "array",
12270
+ "maxLength": 100,
12271
+ "items": {
12272
+ "type": "string",
12273
+ "format": "nsid"
12274
+ },
12275
+ "description": "Types that extend this one, most used first."
12276
+ },
12277
+ "request": {
12278
+ "type": "ref",
12279
+ "ref": "#requestView",
12280
+ "description": "For a requested type, its request."
12281
+ },
12282
+ "createdAt": {
12283
+ "type": "string",
12284
+ "format": "datetime"
12285
+ },
12286
+ "updatedAt": {
12287
+ "type": "string",
12288
+ "format": "datetime"
12289
+ }
12290
+ }
12291
+ },
12292
+ "requestView": {
12293
+ "type": "object",
12294
+ "description": "A request to index a type defined elsewhere on the network.",
12295
+ "required": [
12296
+ "nsid",
12297
+ "requester",
12298
+ "state",
12299
+ "uri",
12300
+ "cid",
12301
+ "createdAt",
12302
+ "page"
12303
+ ],
12304
+ "properties": {
12305
+ "nsid": {
12306
+ "type": "string",
12307
+ "format": "nsid"
12308
+ },
12309
+ "requester": {
12310
+ "type": "string",
12311
+ "format": "did"
12312
+ },
12313
+ "state": {
12314
+ "type": "string",
12315
+ "maxLength": 32,
12316
+ "knownValues": [
12317
+ "pending",
12318
+ "approved",
12319
+ "declined",
12320
+ "blocked"
12321
+ ],
12322
+ "description": "`pending` until an operator decides. `approved`: an operator's live commons credential pinned this request's CID when the platform read it; the approval stands after that, even if the credential is later withdrawn (only a block, registry.purgeType, ends it). Approval starts a walk of the type's existing records on the network; its new writes there reach the platform once a release adds the type to what the platform subscribes to. `declined`: an operator declined it; records written through the platform are still indexed. `blocked`: an operator stopped indexing the type (registry.purgeType); nothing of it is indexed, and an approval or a decline no longer changes that."
12323
+ },
12324
+ "uri": {
12325
+ "type": "string",
12326
+ "format": "at-uri",
12327
+ "description": "The pub.techne.draft.registry.typeRequest record, in the registry's repo."
12328
+ },
12329
+ "cid": {
12330
+ "type": "string",
12331
+ "format": "cid",
12332
+ "description": "Its CID, which an approval pins."
12333
+ },
12334
+ "query": {
12335
+ "type": "unknown",
12336
+ "description": "The query roles the requester mapped, as a `{nsid}.query` document."
12337
+ },
12338
+ "preview": {
12339
+ "type": "ref",
12340
+ "ref": "#preview"
12341
+ },
12342
+ "decidedBy": {
12343
+ "type": "string",
12344
+ "format": "did",
12345
+ "description": "The operator who approved or declined it."
12346
+ },
12347
+ "decidedAt": {
12348
+ "type": "string",
12349
+ "format": "datetime"
12350
+ },
12351
+ "decision": {
12352
+ "type": "string",
12353
+ "format": "at-uri",
12354
+ "description": "The record that decided it: the approving credential or the declining verdict."
12355
+ },
12356
+ "createdAt": {
12357
+ "type": "string",
12358
+ "format": "datetime"
12359
+ },
12360
+ "page": {
12361
+ "type": "string",
12362
+ "format": "uri",
12363
+ "description": "The type's page on techne.pub."
12364
+ }
12365
+ }
12366
+ },
12367
+ "preview": {
12368
+ "type": "object",
12369
+ "description": "What indexing a foreign type would take on, read when it was requested: where its schema is published and how big it is on the network.",
12370
+ "required": [
12371
+ "schema",
12372
+ "fields"
12373
+ ],
12374
+ "properties": {
12375
+ "schema": {
12376
+ "type": "ref",
12377
+ "ref": "com.atproto.repo.strongRef",
12378
+ "description": "The `com.atproto.lexicon.schema` record its NSID authority's `_lexicon` TXT record led to."
12379
+ },
12380
+ "schemaCreatedAt": {
12381
+ "type": "string",
12382
+ "format": "datetime",
12383
+ "description": "When that schema record was first written, as far as the platform can tell."
12384
+ },
12385
+ "fields": {
12386
+ "type": "array",
12387
+ "maxLength": 200,
12388
+ "items": {
12389
+ "type": "string",
12390
+ "maxLength": 256
12391
+ },
12392
+ "description": "The main record's top-level fields, each as `name: type`."
12393
+ },
12394
+ "repos": {
12395
+ "type": "integer",
12396
+ "minimum": 0,
12397
+ "description": "Accounts the relay lists as holding records of it (`com.atproto.sync.listReposByCollection`), counted up to a ceiling."
12398
+ },
12399
+ "reposCapped": {
12400
+ "type": "boolean",
12401
+ "description": "Whether `repos` stopped at the ceiling."
12402
+ },
12403
+ "sampledRecords": {
12404
+ "type": "integer",
12405
+ "minimum": 0,
12406
+ "description": "Records read from a sample of those accounts."
12407
+ },
12408
+ "sampledValid": {
12409
+ "type": "integer",
12410
+ "minimum": 0,
12411
+ "description": "How many of the sampled records satisfy the schema."
12412
+ },
12413
+ "estimatedRecords": {
12414
+ "type": "integer",
12415
+ "minimum": 0,
12416
+ "description": "Records of it on the network, estimated from the sample."
12417
+ },
12418
+ "readAt": {
12419
+ "type": "string",
12420
+ "format": "datetime"
12421
+ }
12422
+ }
12423
+ }
12424
+ }
12425
+ })
12426
+ },
12427
+ {
12428
+ "nsid": "pub.techne.draft.registry.getType",
12429
+ "name": "draft.registry.getType",
12430
+ "group": "pub.techne",
12431
+ "kind": "query",
12432
+ "description": "One record type the platform knows: a platform type, a community draft or a requested foreign type, with its lexicon, query roles, creator, state, record count and sidecars. Public. The answer carries the type's techne.pub page; share it.",
12433
+ "doc": ({
12434
+ "lexicon": 1,
12435
+ "id": "pub.techne.draft.registry.getType",
12436
+ "defs": {
12437
+ "main": {
12438
+ "type": "query",
12439
+ "description": "One record type the platform knows: a platform type, a community draft or a requested foreign type, with its lexicon, query roles, creator, state, record count and sidecars. Public. The answer carries the type's techne.pub page; share it.",
12440
+ "parameters": {
12441
+ "type": "params",
12442
+ "required": [
12443
+ "nsid"
12444
+ ],
12445
+ "properties": {
12446
+ "nsid": {
12447
+ "type": "string",
12448
+ "format": "nsid"
12449
+ }
12450
+ }
12451
+ },
12452
+ "output": {
12453
+ "encoding": "application/json",
12454
+ "schema": {
12455
+ "type": "ref",
12456
+ "ref": "pub.techne.draft.registry.defs#typeView"
12457
+ }
12458
+ },
12459
+ "errors": [
12460
+ {
12461
+ "name": "UnknownType",
12462
+ "description": "The platform does not know this type. A type defined elsewhere can be asked for with pub.techne.draft.registry.requestType."
12463
+ }
12464
+ ]
12465
+ }
12466
+ }
12467
+ })
12468
+ },
12469
+ {
12470
+ "nsid": "pub.techne.draft.registry.getTypeRequest",
12471
+ "name": "draft.registry.getTypeRequest",
12472
+ "group": "pub.techne",
12473
+ "kind": "query",
12474
+ "description": "The request to index one foreign type: who asked, its query roles, its preview and whether an operator approved or declined it. Public.",
12475
+ "doc": ({
12476
+ "lexicon": 1,
12477
+ "id": "pub.techne.draft.registry.getTypeRequest",
12478
+ "defs": {
12479
+ "main": {
12480
+ "type": "query",
12481
+ "description": "The request to index one foreign type: who asked, its query roles, its preview and whether an operator approved or declined it. Public.",
12482
+ "parameters": {
12483
+ "type": "params",
12484
+ "required": [
12485
+ "nsid"
12486
+ ],
12487
+ "properties": {
12488
+ "nsid": {
12489
+ "type": "string",
12490
+ "format": "nsid"
12491
+ }
12492
+ }
12493
+ },
12494
+ "output": {
12495
+ "encoding": "application/json",
12496
+ "schema": {
12497
+ "type": "ref",
12498
+ "ref": "pub.techne.draft.registry.defs#requestView"
12499
+ }
12500
+ },
12501
+ "errors": [
12502
+ {
12503
+ "name": "NotFound",
12504
+ "description": "No one has requested this type."
12505
+ }
12506
+ ]
12507
+ }
12508
+ }
12509
+ })
12510
+ },
12511
+ {
12512
+ "nsid": "pub.techne.draft.registry.listTypeRequests",
12513
+ "name": "draft.registry.listTypeRequests",
12514
+ "group": "pub.techne",
12515
+ "kind": "query",
12516
+ "description": "Requests to index foreign types, newest first. Public: the requests are public records in the registry's repo, and the commons operator page lists them from here.",
12517
+ "doc": ({
12518
+ "lexicon": 1,
12519
+ "id": "pub.techne.draft.registry.listTypeRequests",
12520
+ "defs": {
12521
+ "main": {
12522
+ "type": "query",
12523
+ "description": "Requests to index foreign types, newest first. Public: the requests are public records in the registry's repo, and the commons operator page lists them from here.",
12524
+ "parameters": {
12525
+ "type": "params",
12526
+ "properties": {
12527
+ "state": {
12528
+ "type": "string",
12529
+ "maxLength": 32,
12530
+ "knownValues": [
12531
+ "pending",
12532
+ "approved",
12533
+ "declined",
12534
+ "blocked"
12535
+ ],
12536
+ "description": "Only requests in this state."
12537
+ },
12538
+ "requester": {
12539
+ "type": "string",
12540
+ "format": "did"
12541
+ },
12542
+ "limit": {
12543
+ "type": "integer",
12544
+ "minimum": 1,
12545
+ "maximum": 100,
12546
+ "default": 50
12547
+ },
12548
+ "cursor": {
12549
+ "type": "string",
12550
+ "maxLength": 512
12551
+ }
12552
+ }
12553
+ },
12554
+ "output": {
12555
+ "encoding": "application/json",
12556
+ "schema": {
12557
+ "type": "object",
12558
+ "required": [
12559
+ "requests"
12560
+ ],
12561
+ "properties": {
12562
+ "requests": {
12563
+ "type": "array",
12564
+ "items": {
12565
+ "type": "ref",
12566
+ "ref": "pub.techne.draft.registry.defs#requestView"
12567
+ }
12568
+ },
12569
+ "cursor": {
12570
+ "type": "string",
12571
+ "maxLength": 512
12572
+ }
12573
+ }
12574
+ }
12575
+ }
12576
+ }
12577
+ }
12578
+ })
12579
+ },
12580
+ {
12581
+ "nsid": "pub.techne.draft.registry.listTypes",
12582
+ "name": "draft.registry.listTypes",
12583
+ "group": "pub.techne",
12584
+ "kind": "query",
12585
+ "description": "Find record types: search by name, field or purpose, or list a creator's. Public. Types with no records are left out unless `creator` is given or `includeEmpty` is set, so the lists show what is in use. Each type carries its techne.pub page.",
12586
+ "doc": ({
12587
+ "lexicon": 1,
12588
+ "id": "pub.techne.draft.registry.listTypes",
12589
+ "defs": {
12590
+ "main": {
12591
+ "type": "query",
12592
+ "description": "Find record types: search by name, field or purpose, or list a creator's. Public. Types with no records are left out unless `creator` is given or `includeEmpty` is set, so the lists show what is in use. Each type carries its techne.pub page.",
12593
+ "parameters": {
12594
+ "type": "params",
12595
+ "properties": {
12596
+ "q": {
12597
+ "type": "string",
12598
+ "maxLength": 200,
12599
+ "description": "Words matched against each type's name, field names and descriptions."
12600
+ },
12601
+ "creator": {
12602
+ "type": "string",
12603
+ "format": "did",
12604
+ "description": "Only types this account published or requested."
12605
+ },
12606
+ "origin": {
12607
+ "type": "string",
12608
+ "maxLength": 32,
12609
+ "knownValues": [
12610
+ "platform",
12611
+ "community",
12612
+ "requested"
12613
+ ]
12614
+ },
12615
+ "sidecarOf": {
12616
+ "type": "string",
12617
+ "format": "nsid",
12618
+ "description": "Only types that extend this one."
12619
+ },
12620
+ "includeEmpty": {
12621
+ "type": "boolean",
12622
+ "default": false
12623
+ },
12624
+ "sort": {
12625
+ "type": "string",
12626
+ "maxLength": 32,
12627
+ "knownValues": [
12628
+ "records",
12629
+ "name",
12630
+ "updated"
12631
+ ],
12632
+ "default": "records",
12633
+ "description": "The order of the list, or, when `q` is given, the order within equally good matches (a search ranks by how well each type matches first). `records`: most used first (the default). `name`: A to Z. `updated`: most recently changed first."
12634
+ },
12635
+ "limit": {
12636
+ "type": "integer",
12637
+ "minimum": 1,
12638
+ "maximum": 100,
12639
+ "default": 50
12640
+ },
12641
+ "cursor": {
12642
+ "type": "string",
12643
+ "maxLength": 512
12644
+ }
12645
+ }
12646
+ },
12647
+ "output": {
12648
+ "encoding": "application/json",
12649
+ "schema": {
12650
+ "type": "object",
12651
+ "required": [
12652
+ "types"
12653
+ ],
12654
+ "properties": {
12655
+ "types": {
12656
+ "type": "array",
12657
+ "items": {
12658
+ "type": "ref",
12659
+ "ref": "pub.techne.draft.registry.defs#typeSummary"
12660
+ }
12661
+ },
12662
+ "cursor": {
12663
+ "type": "string",
12664
+ "maxLength": 512
12665
+ }
12666
+ }
12667
+ }
12668
+ }
12669
+ }
12670
+ }
12671
+ })
12672
+ },
12673
+ {
12674
+ "nsid": "pub.techne.draft.registry.publishType",
12675
+ "name": "draft.registry.publishType",
12676
+ "group": "pub.techne",
12677
+ "kind": "procedure",
12678
+ "description": "Publish a community record type, or a new version of one you published. A new type gets the NSID `pub.techne.draft.c.<id>.<name>`: `<id>` is minted at random, so no one gets a good name and the type still reads as `<name>`. Only the creating account may change a type afterwards, and only additively (new optional fields, wider limits); anything else is refused and is published as a new type under a new name. Anyone may fork a type to a new id. To extend someone else's type, publish a sidecar of your own (`sidecarOf`): its records carry a `subject` naming the record they extend. The lexicon is validated, published as a `com.atproto.lexicon.schema` record in the registry's repo, and indexed from this moment. The answer carries the type's techne.pub page; share it.",
12679
+ "doc": ({
12680
+ "lexicon": 1,
12681
+ "id": "pub.techne.draft.registry.publishType",
12682
+ "defs": {
12683
+ "main": {
12684
+ "type": "procedure",
12685
+ "description": "Publish a community record type, or a new version of one you published. A new type gets the NSID `pub.techne.draft.c.<id>.<name>`: `<id>` is minted at random, so no one gets a good name and the type still reads as `<name>`. Only the creating account may change a type afterwards, and only additively (new optional fields, wider limits); anything else is refused and is published as a new type under a new name. Anyone may fork a type to a new id. To extend someone else's type, publish a sidecar of your own (`sidecarOf`): its records carry a `subject` naming the record they extend. The lexicon is validated, published as a `com.atproto.lexicon.schema` record in the registry's repo, and indexed from this moment. The answer carries the type's techne.pub page; share it.",
12686
+ "input": {
12687
+ "encoding": "application/json",
12688
+ "schema": {
12689
+ "type": "object",
12690
+ "required": [
12691
+ "lexicon"
12692
+ ],
12693
+ "properties": {
12694
+ "nsid": {
12695
+ "type": "string",
12696
+ "format": "nsid",
12697
+ "description": "The type to publish a new version of. Leave it out to create a type."
12698
+ },
12699
+ "name": {
12700
+ "type": "string",
12701
+ "maxLength": 63,
12702
+ "description": "For a new type, its name: the NSID's last segment, a letter then letters and digits (`bookClubMeeting`). With `nsid`, a new name under the same id (a second type, or a sidecar, of yours)."
12703
+ },
12704
+ "lexicon": {
12705
+ "type": "unknown",
12706
+ "description": "The lexicon document. Its main def is a record. Its `id` may be left out of a new type (it is filled in); otherwise it must equal the type's NSID."
12707
+ },
12708
+ "query": {
12709
+ "type": "unknown",
12710
+ "description": "The type's `{nsid}.query` document: which fields fill the shared query roles (`start`, `end`, `location`, `text`, `references`, `category`; pub.techne.draft.query#roles). Without it the type's records can only be got and listed."
12711
+ },
12712
+ "sidecarOf": {
12713
+ "type": "string",
12714
+ "format": "nsid",
12715
+ "description": "For a new type: the type it extends. Its main record must then have a required `subject` (an at-uri)."
12716
+ },
12717
+ "forkOf": {
12718
+ "type": "string",
12719
+ "format": "nsid",
12720
+ "description": "For a new type: the community type it was forked from."
12721
+ }
12722
+ }
12723
+ }
12724
+ },
12725
+ "output": {
12726
+ "encoding": "application/json",
12727
+ "schema": {
12728
+ "type": "object",
12729
+ "required": [
12730
+ "nsid",
12731
+ "version",
12732
+ "schema",
12733
+ "page",
12734
+ "created"
12735
+ ],
12736
+ "properties": {
12737
+ "nsid": {
12738
+ "type": "string",
12739
+ "format": "nsid"
12740
+ },
12741
+ "version": {
12742
+ "type": "integer",
12743
+ "minimum": 1
12744
+ },
12745
+ "schema": {
12746
+ "type": "ref",
12747
+ "ref": "com.atproto.repo.strongRef",
12748
+ "description": "The published `com.atproto.lexicon.schema` record."
12749
+ },
12750
+ "page": {
12751
+ "type": "string",
12752
+ "format": "uri",
12753
+ "description": "The type's page on techne.pub."
12754
+ },
12755
+ "created": {
12756
+ "type": "boolean",
12757
+ "description": "Whether this call created the type (false: a new version)."
12758
+ },
12759
+ "unchanged": {
12760
+ "type": "boolean",
12761
+ "description": "The lexicon and query document equal the current version; nothing was published."
12762
+ }
12763
+ }
12764
+ }
12765
+ },
12766
+ "errors": [
12767
+ {
12768
+ "name": "AuthenticationRequired",
12769
+ "description": "Publishing is a signed-in act: the creator is the caller."
12770
+ },
12771
+ {
12772
+ "name": "InvalidLexicon",
12773
+ "description": "The document is not a record lexicon the platform can check records against (the message lists every problem)."
12774
+ },
12775
+ {
12776
+ "name": "InvalidQuery",
12777
+ "description": "The query document names a role or a field the lexicon does not have, or a field of the wrong kind for its role."
12778
+ },
12779
+ {
12780
+ "name": "InvalidName",
12781
+ "description": "The name is not a letter followed by letters and digits, or is taken under this id."
12782
+ },
12783
+ {
12784
+ "name": "NotAdditive",
12785
+ "description": "The new version removes or tightens something (the message lists each change). Publish it as a new type under a new name."
12786
+ },
12787
+ {
12788
+ "name": "NotCreator",
12789
+ "description": "Only the account that created the type may change it. Fork it, or publish a sidecar."
12790
+ },
12791
+ {
12792
+ "name": "UnknownType",
12793
+ "description": "`nsid` or `forkOf` names no community type, or `sidecarOf` names no type the platform indexes."
12794
+ },
12795
+ {
12796
+ "name": "TooLarge",
12797
+ "description": "The lexicon or query document is larger than the platform takes (64 KiB as JSON)."
12798
+ },
12799
+ {
12800
+ "name": "NotConfigured",
12801
+ "description": "HTTP 503. This platform has no type registry account to publish in."
12802
+ },
12803
+ {
12804
+ "name": "RateLimitExceeded",
12805
+ "description": "Too many publishes from this account; try again later."
12806
+ }
12807
+ ]
12808
+ }
12809
+ }
12810
+ })
12811
+ },
12812
+ {
12813
+ "nsid": "pub.techne.draft.registry.purgeType",
12814
+ "name": "draft.registry.purgeType",
12815
+ "group": "pub.techne",
12816
+ "kind": "procedure",
12817
+ "description": "Operator only. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.",
11494
12818
  "doc": ({
11495
12819
  "lexicon": 1,
11496
- "id": "pub.techne.draft.receipt",
11497
- "description": "A note that a rule has processed a record. It names the record at a revision, and what the rule wrote about it (possibly nothing). A rule at stage `curated` writes one for every curated record it processes, so a reader can tell a record that is done from one still waiting, including when the rule had nothing to say. The curator's pub.techne.draft.provenance is the merge receipt; these are the curated-stage ones. A curated record is fully processed when it has its provenance and a receipt, for its current revision, from every rule the commons root endorses with `stage: curated`. Written by the commons rules in their own repos. PUBLIC.",
12820
+ "id": "pub.techne.draft.registry.purgeType",
11498
12821
  "defs": {
11499
12822
  "main": {
11500
- "type": "record",
11501
- "key": "any",
11502
- "description": "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. `any` permits that convention but cannot enforce it.",
11503
- "record": {
11504
- "type": "object",
11505
- "required": [
11506
- "subject",
11507
- "createdAt"
11508
- ],
11509
- "properties": {
11510
- "subject": {
11511
- "type": "ref",
11512
- "ref": "com.atproto.repo.strongRef",
11513
- "description": "The record processed, at the revision processed."
11514
- },
11515
- "outputs": {
11516
- "type": "array",
11517
- "maxLength": 64,
11518
- "items": {
11519
- "type": "ref",
11520
- "ref": "com.atproto.repo.strongRef"
12823
+ "type": "procedure",
12824
+ "description": "Operator only. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.",
12825
+ "input": {
12826
+ "encoding": "application/json",
12827
+ "schema": {
12828
+ "type": "object",
12829
+ "required": [
12830
+ "nsid",
12831
+ "reason"
12832
+ ],
12833
+ "properties": {
12834
+ "nsid": {
12835
+ "type": "string",
12836
+ "format": "nsid",
12837
+ "description": "The runtime type (a community draft or a requested type)."
11521
12838
  },
11522
- "description": "What the rule wrote about it on that run. Empty or absent: nothing to say."
11523
- },
11524
- "createdAt": {
11525
- "type": "string",
11526
- "format": "datetime"
12839
+ "reason": {
12840
+ "type": "string",
12841
+ "minLength": 1,
12842
+ "maxLength": 1000,
12843
+ "description": "Why, kept with the block."
12844
+ }
11527
12845
  }
11528
12846
  }
11529
- }
12847
+ },
12848
+ "output": {
12849
+ "encoding": "application/json",
12850
+ "schema": {
12851
+ "type": "object",
12852
+ "required": [
12853
+ "nsid",
12854
+ "purged",
12855
+ "page"
12856
+ ],
12857
+ "properties": {
12858
+ "nsid": {
12859
+ "type": "string",
12860
+ "format": "nsid"
12861
+ },
12862
+ "purged": {
12863
+ "type": "integer",
12864
+ "minimum": 0,
12865
+ "description": "How many indexed records were removed."
12866
+ },
12867
+ "page": {
12868
+ "type": "string",
12869
+ "format": "uri",
12870
+ "description": "The type's page on techne.pub."
12871
+ }
12872
+ }
12873
+ }
12874
+ },
12875
+ "errors": [
12876
+ {
12877
+ "name": "AuthenticationRequired",
12878
+ "description": "Purging is a signed-in act."
12879
+ },
12880
+ {
12881
+ "name": "Forbidden",
12882
+ "description": "The caller is not an operator of this platform."
12883
+ },
12884
+ {
12885
+ "name": "UnknownType",
12886
+ "description": "`nsid` names no community or requested type (our own types cannot be purged)."
12887
+ }
12888
+ ]
11530
12889
  }
11531
12890
  }
11532
- }),
11533
- "homes": [
11534
- {
11535
- "space": "public",
11536
- "unbuilt": false
11537
- }
11538
- ]
12891
+ })
11539
12892
  },
11540
12893
  {
11541
- "nsid": "pub.techne.draft.receipt.query",
11542
- "name": "draft.receipt.query",
12894
+ "nsid": "pub.techne.draft.registry.requestType",
12895
+ "name": "draft.registry.requestType",
11543
12896
  "group": "pub.techne",
11544
- "kind": "queryDocument",
11545
- "description": "Which fields of a rule's receipt fill the shared query roles: the records it wrote (outputs) are its references, so a read finds the receipt that accounts for a record. Its subject is the record the rule ran on.",
12897
+ "kind": "procedure",
12898
+ "description": "Ask the platform to index a record type defined elsewhere on the network. The type's schema must be published (a `com.atproto.lexicon.schema` record its NSID authority's `_lexicon` TXT record leads to); one that is not is refused. The platform reads the schema and a sample of the network, and answers with a preview. You can build on it at once: while the request is pending, records of the type written through the platform are indexed under the type's real name, so nothing moves later. An operator approves or declines it. Approval starts a walk of the type's existing records on the network; its new writes there reach the platform once a release adds the type to what the platform subscribes to. One request per type: the requester asking again updates the query roles (and rereads the schema) and returns the request; anyone else asking gets it back as it stands. The answer carries the type's techne.pub page; share it.",
11546
12899
  "doc": ({
11547
12900
  "lexicon": 1,
11548
- "id": "pub.techne.draft.receipt.query",
11549
- "description": "Which fields of a rule's receipt fill the shared query roles: the records it wrote (outputs) are its references, so a read finds the receipt that accounts for a record. Its subject is the record the rule ran on.",
12901
+ "id": "pub.techne.draft.registry.requestType",
11550
12902
  "defs": {
11551
12903
  "main": {
11552
- "type": "queryDocument",
11553
- "roles": {
11554
- "references": [
11555
- "outputs[].uri"
11556
- ]
11557
- }
12904
+ "type": "procedure",
12905
+ "description": "Ask the platform to index a record type defined elsewhere on the network. The type's schema must be published (a `com.atproto.lexicon.schema` record its NSID authority's `_lexicon` TXT record leads to); one that is not is refused. The platform reads the schema and a sample of the network, and answers with a preview. You can build on it at once: while the request is pending, records of the type written through the platform are indexed under the type's real name, so nothing moves later. An operator approves or declines it. Approval starts a walk of the type's existing records on the network; its new writes there reach the platform once a release adds the type to what the platform subscribes to. One request per type: the requester asking again updates the query roles (and rereads the schema) and returns the request; anyone else asking gets it back as it stands. The answer carries the type's techne.pub page; share it.",
12906
+ "input": {
12907
+ "encoding": "application/json",
12908
+ "schema": {
12909
+ "type": "object",
12910
+ "required": [
12911
+ "nsid"
12912
+ ],
12913
+ "properties": {
12914
+ "nsid": {
12915
+ "type": "string",
12916
+ "format": "nsid"
12917
+ },
12918
+ "query": {
12919
+ "type": "unknown",
12920
+ "description": "Which of the type's fields fill the shared query roles, as a `{nsid}.query` document (pub.techne.draft.query#roles). Without it the type's records can only be got and listed."
12921
+ }
12922
+ }
12923
+ }
12924
+ },
12925
+ "output": {
12926
+ "encoding": "application/json",
12927
+ "schema": {
12928
+ "type": "ref",
12929
+ "ref": "pub.techne.draft.registry.defs#requestView"
12930
+ }
12931
+ },
12932
+ "errors": [
12933
+ {
12934
+ "name": "AuthenticationRequired",
12935
+ "description": "Requesting is a signed-in act: the requester is the caller."
12936
+ },
12937
+ {
12938
+ "name": "NoSchema",
12939
+ "description": "No published schema was found for this NSID (no `_lexicon` TXT record, or no schema record where it points)."
12940
+ },
12941
+ {
12942
+ "name": "InvalidLexicon",
12943
+ "description": "The published schema is not a record lexicon the platform can check records against."
12944
+ },
12945
+ {
12946
+ "name": "InvalidQuery",
12947
+ "description": "The query document names a role or a field the schema does not have."
12948
+ },
12949
+ {
12950
+ "name": "AlreadyIndexed",
12951
+ "description": "The platform already has this type and it needs no request (a platform type, a community draft, or an approved request)."
12952
+ },
12953
+ {
12954
+ "name": "InvalidRequest",
12955
+ "description": "HTTP 400. `nsid` is not an NSID, is in the platform's own namespace (publish a draft type with publishType instead), or names a type an operator blocked (registry.purgeType)."
12956
+ },
12957
+ {
12958
+ "name": "TooLarge",
12959
+ "description": "HTTP 413. The query document is larger than the platform takes (64 KiB as JSON)."
12960
+ },
12961
+ {
12962
+ "name": "NotConfigured",
12963
+ "description": "HTTP 503. This platform has no type registry account to write the request in."
12964
+ },
12965
+ {
12966
+ "name": "RateLimitExceeded",
12967
+ "description": "Too many requests from this account; try again later."
12968
+ }
12969
+ ]
11558
12970
  }
11559
12971
  }
11560
12972
  })
11561
12973
  },
11562
12974
  {
11563
- "nsid": "pub.techne.draft.reflection",
11564
- "name": "draft.reflection",
12975
+ "nsid": "pub.techne.draft.registry.typeRequest",
12976
+ "name": "draft.registry.typeRequest",
11565
12977
  "group": "pub.techne",
11566
12978
  "kind": "record",
11567
- "key": "tid",
11568
- "description": "A first-person reflection on YOUR OWN act: \"how did this go for me?\" — a beacon you lit, an event you hosted, an intro you brokered — disambiguated by the TYPED SUBJECT, no kind enum. PRIVATE by construction: its only declared home is the author's own `pub.techne.draft.space.personal` (audience of one); it has NO public home at all, so the firehose guard withholds it and no member-facing surface ever reads it. THE DISTINCTION FROM `pub.techne.draft.evaluation`, which must never blur again: an `evaluation` is a JUDGEMENT OF SOMETHING ELSE (\"was this good?\" — a vouch, event feedback, an intro outcome) shared into a space; a `reflection` is a SELF-REPORT ABOUT YOUR OWN ACT (\"how did this go FOR ME?\") kept to yourself. The two are different QUESTIONS, so they are different RECORD TYPES — never one shape read two ways by where it happens to be placed: placement never changes what a record means, and a record is portable, so the placement does not travel with it. Provenance: the author is by definition the actor whose act is reflected on — the write path rebuilds the subject from the authenticated author, so a reflection about someone else's act is unconstructable.",
12979
+ "key": "nsid",
12980
+ "description": "A request that the platform index a record type defined elsewhere on the network. Written by the platform, in the registry's own repo, when someone calls pub.techne.draft.registry.requestType; the record key is the requested NSID, so a type has one request. PUBLIC. While it is undecided, records of the type written through the platform are indexed under the type's real name and nothing else is. An operator approves it with a commons credential (pub.techne.draft.credential, unsigned, in the operator's repo) whose `subject` is the registry's DID, `record` this request's AT-URI and `cid` its CID. Once the platform reads a live one pinning the request's current CID, the request is approved and stays approved (a later new version of the request does not undo it): approval starts a walk of the type's existing records on the network, and its new writes there reach the platform once a release adds the type to what the platform subscribes to. An operator declines it with a pub.techne.draft.verdict whose `subject` is this version and `values` is `declined`; a declined type stays as an undecided one does. A new version of the request (new query roles) is decided afresh.",
11569
12981
  "fields": [
11570
12982
  {
11571
- "name": "subject",
11572
- "type": "→ com.atproto.repo.strongRef",
12983
+ "name": "nsid",
12984
+ "type": "string<nsid>",
11573
12985
  "required": true,
11574
- "description": "The author's OWN act being reflected on: an event they lit/hosted, an introProposal they brokered."
12986
+ "description": "The requested type; equal to the record key."
11575
12987
  },
11576
12988
  {
11577
- "name": "direction",
11578
- "type": "string (enum)",
12989
+ "name": "requester",
12990
+ "type": "string<did>",
11579
12991
  "required": true,
11580
- "description": "How it went, for the author. `positive` = it worked out; `negative` = it did not. First-answer-wins at the writer: once a direction is on record a later answer never overwrites it.",
11581
- "knownValues": [
11582
- "positive",
11583
- "negative"
11584
- ]
12992
+ "description": "Who asked."
11585
12993
  },
11586
12994
  {
11587
- "name": "note",
11588
- "type": "string",
11589
- "required": false,
11590
- "description": "Optional free-form note to self."
12995
+ "name": "schema",
12996
+ "type": "→ com.atproto.repo.strongRef",
12997
+ "required": true,
12998
+ "description": "The type's published `com.atproto.lexicon.schema` record, found through its NSID authority's `_lexicon` TXT record, at the version that was read. A type with no published schema cannot be requested."
11591
12999
  },
11592
13000
  {
11593
- "name": "counterfactual",
11594
- "type": "boolean",
13001
+ "name": "query",
13002
+ "type": "unknown",
11595
13003
  "required": false,
11596
- "description": "Attribution: \"would this outcome have happened without my act?\" — a question only ever meaningful about your OWN act, which is why it lives here and not on `evaluation`. Written by a SECOND write that re-puts the same record; there is still exactly one reflection record per subject. Rules (each pinned by a test at the writer): (a) asked ONLY after a positive `direction` — a negative answer never renders this question and never sets the field; (b) `direction` stays first-answer-wins (idempotent) while this field may be set EXACTLY ONCE, only by the record's own author, and only when `direction == \"positive\"`; (c) placement is unchanged by this second write — the re-put takes no placement parameter, so this field is exactly as private as the record it rides."
13004
+ "description": "Which of the type's fields fill the shared query roles, as a `{nsid}.query` document (pub.techne.draft.query#roles). Without it the type's records can only be got and listed."
11597
13005
  },
11598
13006
  {
11599
13007
  "name": "createdAt",
@@ -11603,42 +13011,39 @@ export const catalog = {
11603
13011
  ],
11604
13012
  "doc": ({
11605
13013
  "lexicon": 1,
11606
- "id": "pub.techne.draft.reflection",
11607
- "description": "A first-person reflection on YOUR OWN act: \"how did this go for me?\" — a beacon you lit, an event you hosted, an intro you brokered — disambiguated by the TYPED SUBJECT, no kind enum. PRIVATE by construction: its only declared home is the author's own `pub.techne.draft.space.personal` (audience of one); it has NO public home at all, so the firehose guard withholds it and no member-facing surface ever reads it. THE DISTINCTION FROM `pub.techne.draft.evaluation`, which must never blur again: an `evaluation` is a JUDGEMENT OF SOMETHING ELSE (\"was this good?\" — a vouch, event feedback, an intro outcome) shared into a space; a `reflection` is a SELF-REPORT ABOUT YOUR OWN ACT (\"how did this go FOR ME?\") kept to yourself. The two are different QUESTIONS, so they are different RECORD TYPES — never one shape read two ways by where it happens to be placed: placement never changes what a record means, and a record is portable, so the placement does not travel with it. Provenance: the author is by definition the actor whose act is reflected on — the write path rebuilds the subject from the authenticated author, so a reflection about someone else's act is unconstructable.",
13014
+ "id": "pub.techne.draft.registry.typeRequest",
13015
+ "description": "A request that the platform index a record type defined elsewhere on the network. Written by the platform, in the registry's own repo, when someone calls pub.techne.draft.registry.requestType; the record key is the requested NSID, so a type has one request. PUBLIC. While it is undecided, records of the type written through the platform are indexed under the type's real name and nothing else is. An operator approves it with a commons credential (pub.techne.draft.credential, unsigned, in the operator's repo) whose `subject` is the registry's DID, `record` this request's AT-URI and `cid` its CID. Once the platform reads a live one pinning the request's current CID, the request is approved and stays approved (a later new version of the request does not undo it): approval starts a walk of the type's existing records on the network, and its new writes there reach the platform once a release adds the type to what the platform subscribes to. An operator declines it with a pub.techne.draft.verdict whose `subject` is this version and `values` is `declined`; a declined type stays as an undecided one does. A new version of the request (new query roles) is decided afresh.",
11608
13016
  "defs": {
11609
13017
  "main": {
11610
13018
  "type": "record",
11611
- "key": "tid",
13019
+ "key": "nsid",
11612
13020
  "record": {
11613
13021
  "type": "object",
11614
13022
  "required": [
11615
- "subject",
11616
- "direction",
13023
+ "nsid",
13024
+ "requester",
13025
+ "schema",
11617
13026
  "createdAt"
11618
13027
  ],
11619
13028
  "properties": {
11620
- "subject": {
11621
- "type": "ref",
11622
- "ref": "com.atproto.repo.strongRef",
11623
- "description": "The author's OWN act being reflected on: an event they lit/hosted, an introProposal they brokered."
11624
- },
11625
- "direction": {
13029
+ "nsid": {
11626
13030
  "type": "string",
11627
- "description": "How it went, for the author. `positive` = it worked out; `negative` = it did not. First-answer-wins at the writer: once a direction is on record a later answer never overwrites it.",
11628
- "knownValues": [
11629
- "positive",
11630
- "negative"
11631
- ]
13031
+ "format": "nsid",
13032
+ "description": "The requested type; equal to the record key."
11632
13033
  },
11633
- "note": {
13034
+ "requester": {
11634
13035
  "type": "string",
11635
- "maxLength": 2560,
11636
- "maxGraphemes": 256,
11637
- "description": "Optional free-form note to self."
13036
+ "format": "did",
13037
+ "description": "Who asked."
11638
13038
  },
11639
- "counterfactual": {
11640
- "type": "boolean",
11641
- "description": "Attribution: \"would this outcome have happened without my act?\" — a question only ever meaningful about your OWN act, which is why it lives here and not on `evaluation`. Written by a SECOND write that re-puts the same record; there is still exactly one reflection record per subject. Rules (each pinned by a test at the writer): (a) asked ONLY after a positive `direction` — a negative answer never renders this question and never sets the field; (b) `direction` stays first-answer-wins (idempotent) while this field may be set EXACTLY ONCE, only by the record's own author, and only when `direction == \"positive\"`; (c) placement is unchanged by this second write — the re-put takes no placement parameter, so this field is exactly as private as the record it rides."
13039
+ "schema": {
13040
+ "type": "ref",
13041
+ "ref": "com.atproto.repo.strongRef",
13042
+ "description": "The type's published `com.atproto.lexicon.schema` record, found through its NSID authority's `_lexicon` TXT record, at the version that was read. A type with no published schema cannot be requested."
13043
+ },
13044
+ "query": {
13045
+ "type": "unknown",
13046
+ "description": "Which of the type's fields fill the shared query roles, as a `{nsid}.query` document (pub.techne.draft.query#roles). Without it the type's records can only be got and listed."
11642
13047
  },
11643
13048
  "createdAt": {
11644
13049
  "type": "string",
@@ -11651,7 +13056,7 @@ export const catalog = {
11651
13056
  }),
11652
13057
  "homes": [
11653
13058
  {
11654
- "space": "pub.techne.draft.space.personal",
13059
+ "space": "public",
11655
13060
  "unbuilt": false
11656
13061
  }
11657
13062
  ]
@@ -11685,7 +13090,7 @@ export const catalog = {
11685
13090
  "doc": ({
11686
13091
  "lexicon": 1,
11687
13092
  "id": "pub.techne.draft.retirement",
11688
- "description": "A statement, in its writer's repo, that an identity is retired: its records are kept but are no versions. For the commons a reader counts one only at rkey = its subject and only from the commons root, or from an operator the root names (pub.techne.draft.operator) whose period held when the reader first saw this version of the retirement. A retired identity's records stay cluster members and provenance sources, so a pointer to one still resolves to its curated record, but they are never versions: not composed, ranked or bylined by the curator, not judged or counted by the features rule, not listed by pub.techne.draft.commons.getVersions, and a curated record with no other source is not curated for readers. Used for a publisher whose records were re-published under another identity (the old Almanac publisher). Its writer deleting it withdraws it; the identity is un-retired when no counted retirement of it is left. Modeled on pub.techne.draft.operator. PUBLIC. Written by the commons root or an operator in its own repo (the commons' web app, signed in as that account); read by the AppView, the commons, the curator and the features rule.",
13093
+ "description": "A statement, in its writer's repo, that an identity is retired: its records are kept but are no versions. For the commons a reader counts one only at rkey = its subject and only from the commons root, or from an operator the root names (pub.techne.draft.operator) whose period held when the reader first saw this version of the retirement. A retired identity's records stay cluster members and provenance sources, so a pointer to one still resolves to its curated record, but they are never versions: not composed, ranked or bylined by the curator, not judged or counted by the features rule, not listed by pub.techne.draft.commons.getVersions, and a curated record with no other source is not curated for readers. Used for a publisher whose records were re-published under another identity (the old Almanac publisher). Each counts on its own: the root's stands whatever an operator does with its own. Its writer deleting it withdraws it; the identity is un-retired when no counted retirement of it is left. Modeled on pub.techne.draft.operator. PUBLIC. Written by the commons root or an operator in its own repo (the commons' web app, signed in as that account); read by the AppView, the commons, the curator and the features rule.",
11689
13094
  "defs": {
11690
13095
  "main": {
11691
13096
  "type": "record",
@@ -12686,7 +14091,7 @@ export const catalog = {
12686
14091
  "pending",
12687
14092
  "invalid"
12688
14093
  ],
12689
- "description": "Whether this version counts. valid: it does. pending: nothing is wrong, but a claim it needs has not arrived yet (its author's membership, the root's credential for its author); a later read may say valid. invalid: it does not count, for the reason given (it is still in the author's repo; a version the platform refuses to index, such as one that is not valid for its lexicon, is not put on the stream). A curated version of the record, if a rule writes one, is another record."
14094
+ "description": "Whether this version counts. valid: it does. pending: nothing is wrong, but a claim it needs has not arrived yet (its author's membership, an admin writer's credential for its author: the root's, or an operator's the root names); a later read may say valid. invalid: it does not count, for the reason given (it is still in the author's repo; a version the platform refuses to index, such as one that is not valid for its lexicon, is not put on the stream). A curated version of the record, if a rule writes one, is another record."
12690
14095
  },
12691
14096
  "reason": {
12692
14097
  "type": "string",
@@ -12743,7 +14148,7 @@ export const catalog = {
12743
14148
  "name": "values",
12744
14149
  "type": "array<string>",
12745
14150
  "required": true,
12746
- "description": "What the version is. `spam`: advertising, scams, link farms or bulk promotion rather than a real gathering. `obscene`: sexually explicit or gratuitously graphic content. `!takedown`: an operator took the record down; it hides the record at every version."
14151
+ "description": "What the version is. `spam`: advertising, scams, link farms or bulk promotion rather than a real gathering. `obscene`: sexually explicit or gratuitously graphic content. `!takedown`: an operator took the record down; it hides the record at every version. `declined`: an operator declined a pub.techne.draft.registry.typeRequest at this version; it hides nothing."
12747
14152
  },
12748
14153
  {
12749
14154
  "name": "createdAt",
@@ -12754,7 +14159,7 @@ export const catalog = {
12754
14159
  "doc": ({
12755
14160
  "lexicon": 1,
12756
14161
  "id": "pub.techne.draft.verdict",
12757
- "description": "A moderation verdict on a record. It names a version (a strongRef) and what it is (`spam`, `obscene`, `!takedown`). `spam` and `obscene` are judged on all of that version's fields and cover that version only, so an edit is a new version they do not cover. `!takedown` is an operator's takedown: it covers every version of the subject record, including later edits. Only bad versions get one; a version with no verdict was judged clean or not judged. Withdrawing a verdict is deleting it (or updating it with other values) in a commit. A reader drops a version with a verdict it honours before composing a cluster's default view, and before deriving anything from it: the commons curator leaves it out of the curated record, the features rule out of its evidence. A reader honours a verdict only from an author whose pub.techne.draft.publisher declaration lists those values in `labels` and is vouched for by the commons root (a live root pub.techne.draft.credential pinned to its CID). atproto labels (`com.atproto.label.queryLabels`) are an export generated from these records for Bluesky-style clients, never the source of truth. Written in the writer's own repo: `spam` and `obscene` by the commons features rule, `!takedown` by the commons' operator account (whichever account the root vouches for with `verdict` in `writes` and `!takedown` in `labels`). PUBLIC.",
14162
+ "description": "A moderation verdict on a record. It names a version (a strongRef) and what it is (`spam`, `obscene`, `!takedown`). `spam` and `obscene` are judged on all of that version's fields and cover that version only, so an edit is a new version they do not cover. `!takedown` is an operator's takedown: it covers every version of the subject record, including later edits. Only bad versions get one; a version with no verdict was judged clean or not judged. Withdrawing a verdict is deleting it (or updating it with other values) in a commit. A reader drops a version with a verdict it honours before composing a cluster's default view, and before deriving anything from it: the commons curator leaves it out of the curated record, the features rule out of its evidence. A reader honours a verdict only from an author whose pub.techne.draft.publisher declaration lists those values in `labels` and is vouched for by an admin writer (a live pub.techne.draft.credential pinned to its CID from the commons root, or from an operator the root names; pub.techne.draft.provenancePolicy#vouchedWriter). atproto labels (`com.atproto.label.queryLabels`) are an export generated from these records for Bluesky-style clients, never the source of truth. Written in the writer's own repo: `spam` and `obscene` by the commons features rule, `!takedown` by any account an admin writer vouches for with `verdict` in `writes` and `!takedown` in `labels` (operators, as themselves; the commons' own account wrote the earlier ones). PUBLIC.",
12758
14163
  "defs": {
12759
14164
  "main": {
12760
14165
  "type": "record",
@@ -12783,10 +14188,11 @@ export const catalog = {
12783
14188
  "knownValues": [
12784
14189
  "spam",
12785
14190
  "obscene",
12786
- "!takedown"
14191
+ "!takedown",
14192
+ "declined"
12787
14193
  ]
12788
14194
  },
12789
- "description": "What the version is. `spam`: advertising, scams, link farms or bulk promotion rather than a real gathering. `obscene`: sexually explicit or gratuitously graphic content. `!takedown`: an operator took the record down; it hides the record at every version."
14195
+ "description": "What the version is. `spam`: advertising, scams, link farms or bulk promotion rather than a real gathering. `obscene`: sexually explicit or gratuitously graphic content. `!takedown`: an operator took the record down; it hides the record at every version. `declined`: an operator declined a pub.techne.draft.registry.typeRequest at this version; it hides nothing."
12790
14196
  },
12791
14197
  "createdAt": {
12792
14198
  "type": "string",
@@ -12827,7 +14233,7 @@ export const catalog = {
12827
14233
  "doc": ({
12828
14234
  "lexicon": 1,
12829
14235
  "id": "pub.techne.draft.verification",
12830
- "description": "A statement that a verified person is behind an account. The issuer checked a channel it counts as verification (which channel counts is the issuer's decision; for this commons, a phone number proved with a one-time code, and an email alone does not count). It names only the DID: no handle, no name, no channel, so a rename keeps it and nothing about the person is published beyond the fact. What it means is the endorser's call: a reader counts it only while its author's pub.techne.draft.publisher declaration lists pub.techne.draft.verification in `writes` and the commons root vouches for that declaration (a live root pub.techne.draft.credential pinned to its CID), read at runtime. Unlike app.bsky.graph.verification it does not vouch for a handle or a display name. The person's own pub.techne.draft.credential stays private in their wallet; this is the public signal. Deleting it withdraws it. Written by the credential issuer in its own repo. PUBLIC.",
14236
+ "description": "A statement that a verified person is behind an account. The issuer checked a channel it counts as verification (which channel counts is the issuer's decision; for this commons, a phone number proved with a one-time code, and an email alone does not count). It names only the DID: no handle, no name, no channel, so a rename keeps it and nothing about the person is published beyond the fact. What it means is the endorser's call: a reader counts it only while its author's pub.techne.draft.publisher declaration lists pub.techne.draft.verification in `writes` and an admin writer vouches for that declaration (a live pub.techne.draft.credential pinned to its CID from the commons root, or from an operator the root names; pub.techne.draft.provenancePolicy#vouchedWriter), read at runtime. Unlike app.bsky.graph.verification it does not vouch for a handle or a display name. The person's own pub.techne.draft.credential stays private in their wallet; this is the public signal. Deleting it withdraws it. Written by the credential issuer in its own repo. PUBLIC.",
12831
14237
  "defs": {
12832
14238
  "main": {
12833
14239
  "type": "record",
@@ -13871,6 +15277,61 @@ export const catalog = {
13871
15277
  }
13872
15278
  })
13873
15279
  },
15280
+ {
15281
+ "nsid": "pub.techne.draft.space.private",
15282
+ "name": "App private space",
15283
+ "kind": "space",
15284
+ "key": "any",
15285
+ "description": "An app's private space for one person: owner-only, one instance per app, keyed by the app (at://{owner}/pub.techne.draft.space.private/{appKey}, appKey = sidecar_rkey(client_id)). An ordinary space type: apps use it through the permissioned.* methods, naming it as the space. It holds records of any type that is not one of the platform's own, community drafts included (0016: every space may contain records of any type), so it declares no collections and is on the placement manifest's `open` list; the platform's own record types keep their declared homes, and a write of one here is refused. The adopted calendar types (community.lexicon.calendar.event and .rsvp) are held here as the app's own data: an RSVP here projects no claim, and neither counts as the platform's event or RSVP at its key. The platform is the managing app and admits and serves an instance's records only when the call comes through the app its key names (known from the client_id claim our ePDS puts on the service token). A write from any other app, or with no claim, is stored but not admitted: it counts in no space. An app asks for narrow access with the 0016 scope space:pub.techne.draft.space.private?skey={appKey}.",
15286
+ "collections": [],
15287
+ "policy": {
15288
+ "read": {
15289
+ "$type": "pub.techne.draft.policy#authorityOnly"
15290
+ },
15291
+ "write": {
15292
+ "$type": "pub.techne.draft.policy#authorityOnly"
15293
+ },
15294
+ "manage": {
15295
+ "$type": "pub.techne.draft.policy#authorityOnly"
15296
+ }
15297
+ },
15298
+ "doc": ({
15299
+ "lexicon": 1,
15300
+ "id": "pub.techne.draft.space.private",
15301
+ "defs": {
15302
+ "main": {
15303
+ "type": "space",
15304
+ "description": "An app's private space for one person: owner-only, one instance per app, keyed by the app (at://{owner}/pub.techne.draft.space.private/{appKey}, appKey = sidecar_rkey(client_id)). An ordinary space type: apps use it through the permissioned.* methods, naming it as the space. It holds records of any type that is not one of the platform's own, community drafts included (0016: every space may contain records of any type), so it declares no collections and is on the placement manifest's `open` list; the platform's own record types keep their declared homes, and a write of one here is refused. The adopted calendar types (community.lexicon.calendar.event and .rsvp) are held here as the app's own data: an RSVP here projects no claim, and neither counts as the platform's event or RSVP at its key. The platform is the managing app and admits and serves an instance's records only when the call comes through the app its key names (known from the client_id claim our ePDS puts on the service token). A write from any other app, or with no claim, is stored but not admitted: it counts in no space. An app asks for narrow access with the 0016 scope space:pub.techne.draft.space.private?skey={appKey}.",
15305
+ "key": "any",
15306
+ "name": "App private space",
15307
+ "collections": []
15308
+ }
15309
+ }
15310
+ }),
15311
+ "policyNsid": "pub.techne.draft.space.private.policy",
15312
+ "policyDescription": "Access policy for pub.techne.draft.space.private: owner only, all capabilities. Which app may reach an instance is decided at read time from the app's identity, not by this policy.",
15313
+ "policyDoc": ({
15314
+ "lexicon": 1,
15315
+ "id": "pub.techne.draft.space.private.policy",
15316
+ "defs": {
15317
+ "main": {
15318
+ "type": "spacePolicy",
15319
+ "description": "Access policy for pub.techne.draft.space.private: owner only, all capabilities. Which app may reach an instance is decided at read time from the app's identity, not by this policy.",
15320
+ "policy": {
15321
+ "read": {
15322
+ "$type": "pub.techne.draft.policy#authorityOnly"
15323
+ },
15324
+ "write": {
15325
+ "$type": "pub.techne.draft.policy#authorityOnly"
15326
+ },
15327
+ "manage": {
15328
+ "$type": "pub.techne.draft.policy#authorityOnly"
15329
+ }
15330
+ }
15331
+ }
15332
+ }
15333
+ })
15334
+ },
13874
15335
  {
13875
15336
  "nsid": "pub.techne.draft.space.source",
13876
15337
  "name": "Source space",
@@ -14256,7 +15717,7 @@ export const catalog = {
14256
15717
  },
14257
15718
  "placement": {
14258
15719
  "nsid": "pub.techne.draft.placement",
14259
- "description": "The PLACEMENT MANIFEST: the published record of every record collection's legal homes. The space-side homes are NOT restated here — they live in each space type's declaration (`collections`, vanilla 0016); this doc declares the ONE home 0016 declarations cannot express (the public firehose) and the exceptions list for declared-but-not-yet-built space placements. The full manifest = union(space declarations' collections, this doc). Fail-closed: a record collection not listed in `public` has NO public home (the firehose guard withholds it); a declared (collection, space) pair with neither a registered write call site nor an `unbuilt` entry fails the drift gate. The manifest says where OUR writers place records. It is not a write gate on anyone else: the generic private write (pub.techne.draft.permissioned.putRecord) stores any collection in its caller's repo for the space the caller names, and where it counts is decided when each version is written, by the managing app's admission: the space's write policy, and for our own record types only where a space type declares them. `pub.techne.draft.credential` is public in one form only: published by its issuer in the issuer's own repo (author = `issuer`) with no `signature`, as the commons root vouches for a publisher declaration; a subject-stored, signed credential (its digest is of a phone or an email) lives only in its subject's pub.techne.draft.space.credential, and readers refuse it in public. Consumed three ways so it cannot drift from behavior: (1) regenos-lexicons build.rs generates the typed placement layer (placing an undeclared pair is a compile error) + the runtime tables the typed write chokepoint enforces; (2) the drift tests bind it to the indexer's private-only guard and to the registered call sites; (3) the sdk catalog renders it at /commons as each record's `homes`. Lives OUTSIDE the codegen roots (space-lexicons/), like pub.techne.draft.policy.",
15720
+ "description": "The PLACEMENT MANIFEST: the published record of every record collection's legal homes. The space-side homes are NOT restated here — they live in each space type's declaration (`collections`, vanilla 0016); this doc declares the ONE home 0016 declarations cannot express (the public firehose) and the exceptions list for declared-but-not-yet-built space placements. The full manifest = union(space declarations' collections, this doc). A space type on the `open` list holds records of any collection (0016: every space may contain records of any type) and declares none; our own record types do not count there: they keep their declared homes, and a write of one into an open space is refused (InvalidRequest). The adopted community.lexicon.calendar.event and community.lexicon.calendar.rsvp are not ours in this sense: an open space holds them as the writing app's own data, projecting no claim and never read as the platform's record at that key. Fail-closed: a record collection not listed in `public` has NO public home (the firehose guard withholds it); a declared (collection, space) pair with neither a registered write call site nor an `unbuilt` entry fails the drift gate. The manifest says where OUR writers place records. It is not a write gate on anyone else: the generic private write (pub.techne.draft.permissioned.putRecord) stores any collection in its caller's repo for the space the caller names, and where it counts is decided when each version is written, by the managing app's admission: the space's write policy, and for our own record types only where a space type declares them. `pub.techne.draft.credential` is public in one form only: published by its issuer in the issuer's own repo (author = `issuer`) with no `signature`, as the commons root vouches for a publisher declaration; a subject-stored, signed credential (its digest is of a phone or an email) lives only in its subject's pub.techne.draft.space.credential, and readers refuse it in public. Consumed three ways so it cannot drift from behavior: (1) regenos-lexicons build.rs generates the typed placement layer (placing an undeclared pair is a compile error) + the runtime tables the typed write chokepoint enforces; (2) the drift tests bind it to the indexer's private-only guard and to the registered call sites; (3) the sdk catalog renders it at /commons as each record's `homes`. Lives OUTSIDE the codegen roots (space-lexicons/), like pub.techne.draft.policy.",
14260
15721
  "public": [
14261
15722
  "pub.techne.draft.appConfig",
14262
15723
  "pub.techne.draft.approval",
@@ -14275,6 +15736,7 @@ export const catalog = {
14275
15736
  "pub.techne.draft.provenance",
14276
15737
  "pub.techne.draft.questionSet",
14277
15738
  "pub.techne.draft.receipt",
15739
+ "pub.techne.draft.registry.typeRequest",
14278
15740
  "pub.techne.draft.verdict",
14279
15741
  "pub.techne.draft.verification",
14280
15742
  "pub.techne.draft.retirement",
@@ -14346,7 +15808,7 @@ export const catalog = {
14346
15808
  "doc": ({
14347
15809
  "lexicon": 1,
14348
15810
  "id": "pub.techne.draft.placement",
14349
- "description": "The PLACEMENT MANIFEST: the published record of every record collection's legal homes. The space-side homes are NOT restated here — they live in each space type's declaration (`collections`, vanilla 0016); this doc declares the ONE home 0016 declarations cannot express (the public firehose) and the exceptions list for declared-but-not-yet-built space placements. The full manifest = union(space declarations' collections, this doc). Fail-closed: a record collection not listed in `public` has NO public home (the firehose guard withholds it); a declared (collection, space) pair with neither a registered write call site nor an `unbuilt` entry fails the drift gate. The manifest says where OUR writers place records. It is not a write gate on anyone else: the generic private write (pub.techne.draft.permissioned.putRecord) stores any collection in its caller's repo for the space the caller names, and where it counts is decided when each version is written, by the managing app's admission: the space's write policy, and for our own record types only where a space type declares them. `pub.techne.draft.credential` is public in one form only: published by its issuer in the issuer's own repo (author = `issuer`) with no `signature`, as the commons root vouches for a publisher declaration; a subject-stored, signed credential (its digest is of a phone or an email) lives only in its subject's pub.techne.draft.space.credential, and readers refuse it in public. Consumed three ways so it cannot drift from behavior: (1) regenos-lexicons build.rs generates the typed placement layer (placing an undeclared pair is a compile error) + the runtime tables the typed write chokepoint enforces; (2) the drift tests bind it to the indexer's private-only guard and to the registered call sites; (3) the sdk catalog renders it at /commons as each record's `homes`. Lives OUTSIDE the codegen roots (space-lexicons/), like pub.techne.draft.policy.",
15811
+ "description": "The PLACEMENT MANIFEST: the published record of every record collection's legal homes. The space-side homes are NOT restated here — they live in each space type's declaration (`collections`, vanilla 0016); this doc declares the ONE home 0016 declarations cannot express (the public firehose) and the exceptions list for declared-but-not-yet-built space placements. The full manifest = union(space declarations' collections, this doc). A space type on the `open` list holds records of any collection (0016: every space may contain records of any type) and declares none; our own record types do not count there: they keep their declared homes, and a write of one into an open space is refused (InvalidRequest). The adopted community.lexicon.calendar.event and community.lexicon.calendar.rsvp are not ours in this sense: an open space holds them as the writing app's own data, projecting no claim and never read as the platform's record at that key. Fail-closed: a record collection not listed in `public` has NO public home (the firehose guard withholds it); a declared (collection, space) pair with neither a registered write call site nor an `unbuilt` entry fails the drift gate. The manifest says where OUR writers place records. It is not a write gate on anyone else: the generic private write (pub.techne.draft.permissioned.putRecord) stores any collection in its caller's repo for the space the caller names, and where it counts is decided when each version is written, by the managing app's admission: the space's write policy, and for our own record types only where a space type declares them. `pub.techne.draft.credential` is public in one form only: published by its issuer in the issuer's own repo (author = `issuer`) with no `signature`, as the commons root vouches for a publisher declaration; a subject-stored, signed credential (its digest is of a phone or an email) lives only in its subject's pub.techne.draft.space.credential, and readers refuse it in public. Consumed three ways so it cannot drift from behavior: (1) regenos-lexicons build.rs generates the typed placement layer (placing an undeclared pair is a compile error) + the runtime tables the typed write chokepoint enforces; (2) the drift tests bind it to the indexer's private-only guard and to the registered call sites; (3) the sdk catalog renders it at /commons as each record's `homes`. Lives OUTSIDE the codegen roots (space-lexicons/), like pub.techne.draft.policy.",
14350
15812
  "defs": {
14351
15813
  "main": {
14352
15814
  "type": "placement",
@@ -14368,6 +15830,7 @@ export const catalog = {
14368
15830
  "pub.techne.draft.provenance",
14369
15831
  "pub.techne.draft.questionSet",
14370
15832
  "pub.techne.draft.receipt",
15833
+ "pub.techne.draft.registry.typeRequest",
14371
15834
  "pub.techne.draft.verdict",
14372
15835
  "pub.techne.draft.verification",
14373
15836
  "pub.techne.draft.retirement",
@@ -14394,6 +15857,9 @@ export const catalog = {
14394
15857
  "community.lexicon.calendar.event",
14395
15858
  "community.lexicon.calendar.rsvp"
14396
15859
  ],
15860
+ "open": [
15861
+ "pub.techne.draft.space.private"
15862
+ ],
14397
15863
  "unbuilt": [
14398
15864
  {
14399
15865
  "collection": "pub.techne.draft.channelVerification",
@@ -27031,7 +28497,7 @@ export const catalog = {
27031
28497
  "group": "social.scenius",
27032
28498
  "kind": "procedure",
27033
28499
  "class": "write",
27034
- "description": "The batch form of contact resolution: resolve up to 200 E.164 phone numbers to their Beacon accounts, for the list picker's \"already on Beacon\" affordance. A `procedure` (not a `query`) because the input is a bounded array too large for GET query params. Returns MATCHES ONLY — an unmatched number is simply absent from `matches`, never distinguished from \"not looked up\". Rate-limited 10 calls/minute per caller.",
28500
+ "description": "The batch form of contact resolution: resolve up to 200 E.164 phone numbers to their Beacon accounts, for the list picker's \"already on Beacon\" affordance. A `procedure` (not a `query`) because the input is a bounded array too large for GET query params. Returns MATCHES ONLY — an unmatched number is simply absent from `matches`, never distinguished from \"not looked up\". Rate-limited 60 calls/minute per caller.",
27035
28501
  "input": [
27036
28502
  {
27037
28503
  "name": "phones",
@@ -27053,7 +28519,7 @@ export const catalog = {
27053
28519
  "defs": {
27054
28520
  "main": {
27055
28521
  "type": "procedure",
27056
- "description": "The batch form of contact resolution: resolve up to 200 E.164 phone numbers to their Beacon accounts, for the list picker's \"already on Beacon\" affordance. A `procedure` (not a `query`) because the input is a bounded array too large for GET query params. Returns MATCHES ONLY — an unmatched number is simply absent from `matches`, never distinguished from \"not looked up\". Rate-limited 10 calls/minute per caller.",
28522
+ "description": "The batch form of contact resolution: resolve up to 200 E.164 phone numbers to their Beacon accounts, for the list picker's \"already on Beacon\" affordance. A `procedure` (not a `query`) because the input is a bounded array too large for GET query params. Returns MATCHES ONLY — an unmatched number is simply absent from `matches`, never distinguished from \"not looked up\". Rate-limited 60 calls/minute per caller.",
27057
28523
  "input": {
27058
28524
  "encoding": "application/json",
27059
28525
  "schema": {
@@ -27772,7 +29238,7 @@ export const catalog = {
27772
29238
  "name": "types",
27773
29239
  "type": "array<string>",
27774
29240
  "required": true,
27775
- "description": "The record collections to search — REQUIRED, never defaulted to everything (an endpoint that searches every collection when asked for none becomes a full-model scan as the model grows). Named by NSID, the way every other published surface names a record type. An unrecognized value is a 400, never a silently-narrowed search. Sent over the wire comma-joined, mirroring resolveHandles/getEventJoins."
29241
+ "description": "The record collections to search — REQUIRED, never defaulted to everything (an endpoint that searches every collection when asked for none becomes a full-model scan as the model grows). Named by NSID, the way every other published surface names a record type. An unrecognized value is a 400, never a silently-narrowed search. Sent over the wire comma-joined, mirroring resolveHandles/getEventJoins. Besides the known values, a runtime (community or requested) type (one learned at run time, up to 8) whose query document fills the text role is searched through the generic read path and answered in `records`."
27776
29242
  },
27777
29243
  {
27778
29244
  "name": "limit",
@@ -27800,6 +29266,12 @@ export const catalog = {
27800
29266
  "required": false,
27801
29267
  "description": "Absent when pub.techne.draft.place was not requested; present-and-empty when it was and nothing matched."
27802
29268
  },
29269
+ {
29270
+ "name": "records",
29271
+ "type": "array<→ pub.techne.draft.query.listRecords#record>",
29272
+ "required": false,
29273
+ "description": "The hits of the runtime (community or requested) types `types` named (types learned at run time whose query document fills the text role), best match first, as the generic reads answer them. Absent when `types` named none; present-and-empty when it did and nothing matched."
29274
+ },
27803
29275
  {
27804
29276
  "name": "partial",
27805
29277
  "type": "boolean",
@@ -27826,7 +29298,7 @@ export const catalog = {
27826
29298
  },
27827
29299
  "types": {
27828
29300
  "type": "array",
27829
- "description": "The record collections to search — REQUIRED, never defaulted to everything (an endpoint that searches every collection when asked for none becomes a full-model scan as the model grows). Named by NSID, the way every other published surface names a record type. An unrecognized value is a 400, never a silently-narrowed search. Sent over the wire comma-joined, mirroring resolveHandles/getEventJoins.",
29301
+ "description": "The record collections to search — REQUIRED, never defaulted to everything (an endpoint that searches every collection when asked for none becomes a full-model scan as the model grows). Named by NSID, the way every other published surface names a record type. An unrecognized value is a 400, never a silently-narrowed search. Sent over the wire comma-joined, mirroring resolveHandles/getEventJoins. Besides the known values, a runtime (community or requested) type (one learned at run time, up to 8) whose query document fills the text role is searched through the generic read path and answered in `records`.",
27830
29302
  "items": {
27831
29303
  "type": "string",
27832
29304
  "knownValues": [
@@ -27872,6 +29344,14 @@ export const catalog = {
27872
29344
  "ref": "#placeHit"
27873
29345
  }
27874
29346
  },
29347
+ "records": {
29348
+ "type": "array",
29349
+ "description": "The hits of the runtime (community or requested) types `types` named (types learned at run time whose query document fills the text role), best match first, as the generic reads answer them. Absent when `types` named none; present-and-empty when it did and nothing matched.",
29350
+ "items": {
29351
+ "type": "ref",
29352
+ "ref": "pub.techne.draft.query.listRecords#record"
29353
+ }
29354
+ },
27875
29355
  "partial": {
27876
29356
  "type": "boolean",
27877
29357
  "description": "True iff SOME (not all) requested arms failed — the rest still rendered."
@@ -29688,8 +31168,8 @@ export const catalog = {
29688
31168
  }
29689
31169
  ],
29690
31170
  "counts": {
29691
- "records": 135,
29692
- "spaces": 11,
31171
+ "records": 146,
31172
+ "spaces": 12,
29693
31173
  "predicates": 9,
29694
31174
  "methods": 125
29695
31175
  }