@getcirrus/space-conformance 0.0.0 → 0.2.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 (80) hide show
  1. package/dist/base-CGsQgOwR.d.ts +472 -0
  2. package/dist/base-CGsQgOwR.d.ts.map +1 -0
  3. package/dist/cli.js +26 -18
  4. package/dist/cli.js.map +1 -1
  5. package/dist/coverage-cK1NBo-P.js +2250 -0
  6. package/dist/coverage-cK1NBo-P.js.map +1 -0
  7. package/dist/descriptors-BUCV_BuG.js +4428 -0
  8. package/dist/descriptors-BUCV_BuG.js.map +1 -0
  9. package/dist/full-CKsHg6ox.js +852 -0
  10. package/dist/full-CKsHg6ox.js.map +1 -0
  11. package/dist/full.d.ts +44 -17
  12. package/dist/full.d.ts.map +1 -1
  13. package/dist/full.js +3 -3
  14. package/dist/index.d.ts +90 -28
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +115 -93
  17. package/dist/index.js.map +1 -1
  18. package/lexicons/MANIFEST.json +4 -4
  19. package/lexicons/managedspace/checkAccess.json +44 -0
  20. package/lexicons/managedspace/policy.json +22 -0
  21. package/lexicons/memberspace/defs.json +22 -0
  22. package/lexicons/{simplespace → memberspace}/listMembers.json +15 -17
  23. package/lexicons/memberspace/member.json +23 -0
  24. package/lexicons/memberspace/policy.json +40 -0
  25. package/lexicons/memberspace/putMembers.json +43 -0
  26. package/lexicons/memberspace/removeMembers.json +43 -0
  27. package/lexicons/personalspace/policy.json +11 -0
  28. package/lexicons/space/applyWrites.json +6 -11
  29. package/lexicons/space/authorizeSpaceSync.json +109 -0
  30. package/lexicons/space/clearRecords.json +34 -0
  31. package/lexicons/space/confirmRegistration.json +44 -0
  32. package/lexicons/space/createRecord.json +7 -14
  33. package/lexicons/space/createSpace.json +58 -0
  34. package/lexicons/space/defs.json +61 -16
  35. package/lexicons/space/deleteRecord.json +5 -9
  36. package/lexicons/space/deleteSpace.json +31 -0
  37. package/lexicons/space/exportSpaceMeta.json +31 -0
  38. package/lexicons/space/getBlob.json +4 -7
  39. package/lexicons/space/getDelegationToken.json +3 -5
  40. package/lexicons/space/getLatestCommit.json +8 -7
  41. package/lexicons/space/getRecord.json +9 -9
  42. package/lexicons/space/getRepo.json +8 -11
  43. package/lexicons/space/getSpace.json +43 -0
  44. package/lexicons/space/importRepo.json +27 -0
  45. package/lexicons/space/importSpaceMeta.json +25 -0
  46. package/lexicons/space/listBlobs.json +3 -10
  47. package/lexicons/space/listRecords.json +10 -16
  48. package/lexicons/space/listRepoOps.json +23 -23
  49. package/lexicons/space/listSpaces.json +30 -14
  50. package/lexicons/space/listWriters.json +66 -0
  51. package/lexicons/space/notifyCredentialsRevoked.json +30 -0
  52. package/lexicons/space/notifyRepoUpdate.json +44 -0
  53. package/lexicons/space/notifySpaceUpdate.json +53 -0
  54. package/lexicons/space/policy.json +26 -0
  55. package/lexicons/space/putRecord.json +7 -14
  56. package/lexicons/space/removeWriter.json +35 -0
  57. package/lexicons/space/updateSpace.json +43 -0
  58. package/package.json +11 -11
  59. package/dist/base-D8a-ZK57.d.ts +0 -249
  60. package/dist/base-D8a-ZK57.d.ts.map +0 -1
  61. package/dist/coverage-DhJZu8P8.js +0 -1914
  62. package/dist/coverage-DhJZu8P8.js.map +0 -1
  63. package/dist/full-D4ufJLcw.js +0 -409
  64. package/dist/full-D4ufJLcw.js.map +0 -1
  65. package/dist/operator-BErXCDow.js +0 -923
  66. package/dist/operator-BErXCDow.js.map +0 -1
  67. package/lexicons/simplespace/addMember.json +0 -37
  68. package/lexicons/simplespace/checkUserAccess.json +0 -43
  69. package/lexicons/simplespace/createSpace.json +0 -74
  70. package/lexicons/simplespace/defs.json +0 -47
  71. package/lexicons/simplespace/deleteSpace.json +0 -32
  72. package/lexicons/simplespace/getSpace.json +0 -53
  73. package/lexicons/simplespace/removeMember.json +0 -37
  74. package/lexicons/simplespace/updateSpace.json +0 -57
  75. package/lexicons/space/getSpaceCredential.json +0 -67
  76. package/lexicons/space/listRepos.json +0 -75
  77. package/lexicons/space/notifySpaceDeleted.json +0 -24
  78. package/lexicons/space/notifyWrite.json +0 -38
  79. package/lexicons/space/registerNotify.json +0 -49
  80. package/lexicons/space/unregisterNotify.json +0 -29
@@ -4,7 +4,7 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "procedure",
7
- "description": "Apply a batch transaction of creates, updates, and deletes in a permissioned space. Requires auth, implemented by PDS.",
7
+ "description": "Apply a batch transaction of creates, updates, and deletes to a space repo. Requires auth, implemented by PDS.",
8
8
  "input": {
9
9
  "encoding": "application/json",
10
10
  "schema": {
@@ -13,13 +13,11 @@
13
13
  "properties": {
14
14
  "space": {
15
15
  "type": "string",
16
- "format": "space-ref",
17
- "description": "Reference to the space."
16
+ "format": "space-ref"
18
17
  },
19
18
  "repo": {
20
19
  "type": "string",
21
- "format": "did",
22
- "description": "The DID of the repo to write to (the authenticated member)."
20
+ "format": "did"
23
21
  },
24
22
  "validate": {
25
23
  "type": "boolean",
@@ -57,12 +55,10 @@
57
55
  "name": "SpaceNotFound"
58
56
  },
59
57
  {
60
- "name": "RecordNotFound",
61
- "description": "An update or delete targeted a record that does not exist."
58
+ "name": "RecordNotFound"
62
59
  },
63
60
  {
64
- "name": "RecordAlreadyExists",
65
- "description": "A create targeted a collection and rkey that already holds a record."
61
+ "name": "RecordAlreadyExists"
66
62
  }
67
63
  ]
68
64
  },
@@ -77,8 +73,7 @@
77
73
  },
78
74
  "rkey": {
79
75
  "type": "string",
80
- "format": "record-key",
81
- "maxLength": 512
76
+ "format": "record-key"
82
77
  },
83
78
  "value": {
84
79
  "type": "unknown"
@@ -0,0 +1,109 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.authorizeSpaceSync",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Authorize syncing a space, returning a new credential for reading data across it and the space's current revision, and optionally registering for notifications of updates to it. Depending on the space's policy, a delegation token and/or client attestation may be required. Implemented by the space host.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "credentialKey"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref"
17
+ },
18
+ "credentialKey": {
19
+ "type": "string",
20
+ "description": "P-256 did:key that the credential is bound to."
21
+ },
22
+ "delegationToken": {
23
+ "type": "string",
24
+ "description": "Obtained from getDelegationToken."
25
+ },
26
+ "clientAttestation": {
27
+ "type": "string"
28
+ },
29
+ "notify": {
30
+ "type": "ref",
31
+ "ref": "#notify",
32
+ "description": "Register an endpoint to be notified of updates to the space via notifySpaceUpdate. The registration stays active while this credential is valid. After it expires, the endpoint receives only a prompt to reauthorize, or notice of the space's deletion."
33
+ }
34
+ }
35
+ }
36
+ },
37
+ "output": {
38
+ "encoding": "application/json",
39
+ "schema": {
40
+ "type": "object",
41
+ "required": ["credential"],
42
+ "properties": {
43
+ "credential": {
44
+ "type": "string"
45
+ },
46
+ "spaceRev": {
47
+ "type": "string",
48
+ "format": "tid",
49
+ "description": "The space's current revision. Omitted before the space's first update."
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "errors": [
55
+ {
56
+ "name": "SpaceNotFound",
57
+ "description": "May also be returned in place of AccountNotAuthorized, to avoid revealing that the space exists."
58
+ },
59
+ {
60
+ "name": "SpaceDeleted"
61
+ },
62
+ {
63
+ "name": "AccountNotAuthorized"
64
+ },
65
+ {
66
+ "name": "AppNotAuthorized"
67
+ },
68
+ {
69
+ "name": "NotAuthorized",
70
+ "description": "Generic refusal. May be returned in place of AccountNotAuthorized or AppNotAuthorized."
71
+ },
72
+ {
73
+ "name": "InvalidDelegationToken"
74
+ },
75
+ {
76
+ "name": "InvalidClientAttestation"
77
+ },
78
+ {
79
+ "name": "RegistrationNotConfirmed",
80
+ "description": "The notify endpoint did not confirm the registration."
81
+ },
82
+ {
83
+ "name": "RepoTakendown",
84
+ "description": "The space authority has been taken down."
85
+ },
86
+ {
87
+ "name": "RepoDeactivated",
88
+ "description": "The space authority has been deactivated."
89
+ }
90
+ ]
91
+ },
92
+ "notify": {
93
+ "type": "object",
94
+ "required": ["endpoint", "token"],
95
+ "properties": {
96
+ "endpoint": {
97
+ "type": "string",
98
+ "format": "uri",
99
+ "description": "Base HTTPS URL that notification methods are called against."
100
+ },
101
+ "token": {
102
+ "type": "string",
103
+ "maxLength": 512,
104
+ "description": "Opaque secret, included in the body of each request to the endpoint. The endpoint and token together identify the registration, so the token should stay the same across authorizations."
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.clearRecords",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Delete all records in the authenticated account's space repo. In the space authority's repo, records published from the space's configuration (such as its policy) are kept. Requires auth, implemented by PDS.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "repo"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref"
17
+ },
18
+ "repo": {
19
+ "type": "string",
20
+ "format": "did"
21
+ }
22
+ }
23
+ }
24
+ },
25
+ "output": {
26
+ "encoding": "application/json",
27
+ "schema": {
28
+ "type": "object",
29
+ "properties": {}
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.confirmRegistration",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Confirm a new notification registration. Called by the space host on an endpoint passed to authorizeSpaceSync, before registering it. The syncing service checks that it issued the token for the space, and echoes back the challenge.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "token", "challenge"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref"
17
+ },
18
+ "token": {
19
+ "type": "string",
20
+ "maxLength": 512
21
+ },
22
+ "challenge": {
23
+ "type": "string",
24
+ "maxLength": 512
25
+ }
26
+ }
27
+ }
28
+ },
29
+ "output": {
30
+ "encoding": "application/json",
31
+ "schema": {
32
+ "type": "object",
33
+ "required": ["challenge"],
34
+ "properties": {
35
+ "challenge": {
36
+ "type": "string",
37
+ "maxLength": 512
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
@@ -4,7 +4,7 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "procedure",
7
- "description": "Create a single new record in a permissioned space. Requires auth, implemented by PDS.",
7
+ "description": "Create a single new record in a space repo. Requires auth, implemented by PDS.",
8
8
  "input": {
9
9
  "encoding": "application/json",
10
10
  "schema": {
@@ -13,24 +13,19 @@
13
13
  "properties": {
14
14
  "space": {
15
15
  "type": "string",
16
- "format": "space-ref",
17
- "description": "Reference to the space."
16
+ "format": "space-ref"
18
17
  },
19
18
  "repo": {
20
19
  "type": "string",
21
- "format": "did",
22
- "description": "The DID of the repo to write to (the authenticated member)."
20
+ "format": "did"
23
21
  },
24
22
  "collection": {
25
23
  "type": "string",
26
- "format": "nsid",
27
- "description": "The NSID of the record collection."
24
+ "format": "nsid"
28
25
  },
29
26
  "rkey": {
30
27
  "type": "string",
31
- "format": "record-key",
32
- "description": "The Record Key.",
33
- "maxLength": 512
28
+ "format": "record-key"
34
29
  },
35
30
  "validate": {
36
31
  "type": "boolean",
@@ -51,8 +46,7 @@
51
46
  "properties": {
52
47
  "uri": {
53
48
  "type": "string",
54
- "format": "at-uri",
55
- "description": "URI of the created record."
49
+ "format": "at-uri"
56
50
  },
57
51
  "cid": {
58
52
  "type": "string",
@@ -70,8 +64,7 @@
70
64
  "name": "SpaceNotFound"
71
65
  },
72
66
  {
73
- "name": "RecordAlreadyExists",
74
- "description": "A record already exists at this collection and rkey. Retry with a different rkey, or use putRecord."
67
+ "name": "RecordAlreadyExists"
75
68
  }
76
69
  ]
77
70
  }
@@ -0,0 +1,58 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.createSpace",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Create a new space, with the authenticated account as its authority. Requires auth, implemented by PDS.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["spaceType", "policy"],
13
+ "properties": {
14
+ "spaceType": {
15
+ "type": "string",
16
+ "format": "nsid"
17
+ },
18
+ "skey": {
19
+ "type": "string",
20
+ "format": "record-key",
21
+ "description": "Space key. Generated as a TID if not provided."
22
+ },
23
+ "policy": {
24
+ "type": "union",
25
+ "description": "PDSes must support all of the listed policies. Other space hosts may support only some of them, and any host may support policies beyond those listed.",
26
+ "refs": [
27
+ "com.atproto.personalspace.policy",
28
+ "com.atproto.memberspace.policy",
29
+ "com.atproto.managedspace.policy"
30
+ ]
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "output": {
36
+ "encoding": "application/json",
37
+ "schema": {
38
+ "type": "object",
39
+ "required": ["space"],
40
+ "properties": {
41
+ "space": {
42
+ "type": "string",
43
+ "format": "space-ref"
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "errors": [
49
+ {
50
+ "name": "SpaceAlreadyExists"
51
+ },
52
+ {
53
+ "name": "UnsupportedPolicy"
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ }
@@ -2,35 +2,80 @@
2
2
  "lexicon": 1,
3
3
  "id": "com.atproto.space.defs",
4
4
  "defs": {
5
- "signedCommit": {
5
+ "commit": {
6
6
  "type": "object",
7
- "description": "A signed commit over the current state of a permissioned repo.",
8
- "required": ["ver", "hash", "mac", "ikm", "sig", "rev"],
7
+ "description": "Commit to the current state of a space repo. Not signed; authenticated by the repo host with a MAC instead.",
8
+ "required": ["ver", "repo", "space", "rev", "data"],
9
9
  "properties": {
10
10
  "ver": {
11
11
  "type": "integer",
12
- "description": "Commit format version, currently 1. Corresponds to the version in the ctx protocol tag (atproto-space-v1)."
12
+ "description": "Commit format version, currently 1."
13
13
  },
14
- "hash": {
15
- "type": "bytes",
16
- "description": "sha256 digest of the LtHash state (32 bytes)."
14
+ "repo": {
15
+ "type": "string",
16
+ "format": "did"
17
17
  },
18
- "ikm": {
19
- "type": "bytes",
20
- "description": "Per-signature input keying material (32 random bytes)"
18
+ "space": {
19
+ "type": "string",
20
+ "format": "space-ref"
21
21
  },
22
- "sig": {
22
+ "rev": {
23
+ "type": "string",
24
+ "format": "tid"
25
+ },
26
+ "data": {
23
27
  "type": "bytes",
24
- "description": "Signature over ctx (space, author DID, rev, ikm) by the user's atproto signing key. Does not cover the repo hash."
28
+ "description": "SHA-256 digest of the repo's LtHash state."
29
+ }
30
+ }
31
+ },
32
+ "repoWrite": {
33
+ "type": "object",
34
+ "description": "A repo in the space advanced to a new revision.",
35
+ "required": ["repo", "repoRev", "data", "spaceRev"],
36
+ "properties": {
37
+ "repo": {
38
+ "type": "string",
39
+ "format": "did"
25
40
  },
26
- "mac": {
41
+ "repoRev": {
42
+ "type": "string",
43
+ "format": "tid"
44
+ },
45
+ "data": {
27
46
  "type": "bytes",
28
- "description": "HMAC-SHA256 over hash, keyed by HKDF-SHA256(ikm, info=ctx). Binds the repo hash to this commit's context."
47
+ "description": "SHA-256 digest of the repo's LtHash state."
29
48
  },
30
- "rev": {
49
+ "spaceRev": {
50
+ "type": "string",
51
+ "format": "tid",
52
+ "description": "The space revision at which this update was sequenced."
53
+ },
54
+ "prevSpaceRev": {
55
+ "type": "string",
56
+ "format": "tid",
57
+ "description": "The space revision before this update, if any. Set in notifySpaceUpdate, where a gap indicates missed notifications, which can be recovered with listWriters."
58
+ }
59
+ }
60
+ },
61
+ "repoRemoved": {
62
+ "type": "object",
63
+ "description": "A repo was removed from the writer set.",
64
+ "required": ["repo", "spaceRev"],
65
+ "properties": {
66
+ "repo": {
67
+ "type": "string",
68
+ "format": "did"
69
+ },
70
+ "spaceRev": {
71
+ "type": "string",
72
+ "format": "tid",
73
+ "description": "The space revision at which this update was sequenced."
74
+ },
75
+ "prevSpaceRev": {
31
76
  "type": "string",
32
77
  "format": "tid",
33
- "description": "Commit revision (TID), also bound into ctx."
78
+ "description": "The space revision before this update, if any. Set in notifySpaceUpdate, where a gap indicates missed notifications, which can be recovered with listWriters."
34
79
  }
35
80
  }
36
81
  }
@@ -4,7 +4,7 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "procedure",
7
- "description": "Delete a record from a permissioned space, or ensure it doesn't exist. Succeeds whether or not the record was present. Requires auth, implemented by PDS.",
7
+ "description": "Delete a record from a space repo, or ensure it doesn't exist. Requires auth, implemented by PDS.",
8
8
  "input": {
9
9
  "encoding": "application/json",
10
10
  "schema": {
@@ -13,23 +13,19 @@
13
13
  "properties": {
14
14
  "space": {
15
15
  "type": "string",
16
- "format": "space-ref",
17
- "description": "Reference to the space."
16
+ "format": "space-ref"
18
17
  },
19
18
  "repo": {
20
19
  "type": "string",
21
- "format": "did",
22
- "description": "The DID of the repo to delete from (the authenticated member)."
20
+ "format": "did"
23
21
  },
24
22
  "collection": {
25
23
  "type": "string",
26
- "format": "nsid",
27
- "description": "The NSID of the record collection."
24
+ "format": "nsid"
28
25
  },
29
26
  "rkey": {
30
27
  "type": "string",
31
- "format": "record-key",
32
- "description": "The Record Key."
28
+ "format": "record-key"
33
29
  }
34
30
  }
35
31
  }
@@ -0,0 +1,31 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.deleteSpace",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Delete a space, along with the authority's space repo. Requires auth as the space authority, implemented by PDS.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref"
17
+ }
18
+ }
19
+ }
20
+ },
21
+ "errors": [
22
+ {
23
+ "name": "SpaceNotFound"
24
+ },
25
+ {
26
+ "name": "NotAuthorized"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.exportSpaceMeta",
4
+ "defs": {
5
+ "main": {
6
+ "type": "query",
7
+ "description": "Export a space's state, such as its policy and member list, as a STAR file for account migration. Requires auth as the space authority, implemented by PDS.",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref"
15
+ }
16
+ }
17
+ },
18
+ "output": {
19
+ "encoding": "application/vnd.dasl.star"
20
+ },
21
+ "errors": [
22
+ {
23
+ "name": "SpaceNotFound"
24
+ },
25
+ {
26
+ "name": "NotAuthorized"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
@@ -4,25 +4,22 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "query",
7
- "description": "Get a blob referenced from a record in a permissioned space. Returns the full blob as originally uploaded. Blobs are not uploaded through this namespace: a space record references a blob uploaded via com.atproto.repo.uploadBlob, so a client writing blob-bearing records into a space needs a blob permission alongside its space permission. Use listBlobs to enumerate a repo's blobs in a space. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services).",
7
+ "description": "Get a blob referenced by a record in a space repo. Returns the full blob as originally uploaded. Requires auth as the repo's account or with a space credential; implemented by PDS.",
8
8
  "parameters": {
9
9
  "type": "params",
10
10
  "required": ["space", "repo", "cid"],
11
11
  "properties": {
12
12
  "space": {
13
13
  "type": "string",
14
- "format": "space-ref",
15
- "description": "Reference to the space."
14
+ "format": "space-ref"
16
15
  },
17
16
  "repo": {
18
17
  "type": "string",
19
- "format": "did",
20
- "description": "The DID of the account whose repo holds the blob."
18
+ "format": "did"
21
19
  },
22
20
  "cid": {
23
21
  "type": "string",
24
- "format": "cid",
25
- "description": "The CID of the blob to fetch."
22
+ "format": "cid"
26
23
  }
27
24
  }
28
25
  },
@@ -4,15 +4,14 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "query",
7
- "description": "Mint a delegation token for a space, proving the requesting app is acting on the user's behalf. Exchanged with the space authority for a space credential. Served by the requesting user's PDS. Requires OAuth auth.",
7
+ "description": "Get a delegation token for a space, to exchange with the space host for a space credential. Requires auth, implemented by PDS.",
8
8
  "parameters": {
9
9
  "type": "params",
10
10
  "required": ["space"],
11
11
  "properties": {
12
12
  "space": {
13
13
  "type": "string",
14
- "format": "space-ref",
15
- "description": "Reference to the space."
14
+ "format": "space-ref"
16
15
  }
17
16
  }
18
17
  },
@@ -23,8 +22,7 @@
23
22
  "required": ["token"],
24
23
  "properties": {
25
24
  "token": {
26
- "type": "string",
27
- "description": "A signed JWT delegation token."
25
+ "type": "string"
28
26
  }
29
27
  }
30
28
  }
@@ -4,20 +4,18 @@
4
4
  "defs": {
5
5
  "main": {
6
6
  "type": "query",
7
- "description": "Get the current signed commit for an account's permissioned repo within a space. Served by a repo host. Throws RepoNotFound when the account holds no repo in the space, including the case of a member that has never written to it. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services).",
7
+ "description": "Get the current commit of a space repo. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.",
8
8
  "parameters": {
9
9
  "type": "params",
10
10
  "required": ["space", "repo"],
11
11
  "properties": {
12
12
  "space": {
13
13
  "type": "string",
14
- "format": "space-ref",
15
- "description": "Reference to the space."
14
+ "format": "space-ref"
16
15
  },
17
16
  "repo": {
18
17
  "type": "string",
19
- "format": "did",
20
- "description": "The DID of the account whose latest commit to retrieve."
18
+ "format": "did"
21
19
  }
22
20
  }
23
21
  },
@@ -28,14 +26,17 @@
28
26
  "properties": {
29
27
  "commit": {
30
28
  "type": "ref",
31
- "ref": "com.atproto.space.defs#signedCommit",
32
- "description": "The account's current signed commit."
29
+ "ref": "com.atproto.space.defs#commit"
33
30
  }
34
31
  },
35
32
  "required": ["commit"]
36
33
  }
37
34
  },
38
35
  "errors": [
36
+ {
37
+ "name": "InvalidSpaceMac",
38
+ "description": "The MAC requested in the Accept-Signature header is missing or invalid."
39
+ },
39
40
  {
40
41
  "name": "SpaceNotFound"
41
42
  },