@getcirrus/space-conformance 0.0.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 (49) hide show
  1. package/dist/base-D8a-ZK57.d.ts +249 -0
  2. package/dist/base-D8a-ZK57.d.ts.map +1 -0
  3. package/dist/cli.d.ts +1 -0
  4. package/dist/cli.js +373 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/coverage-DhJZu8P8.js +1914 -0
  7. package/dist/coverage-DhJZu8P8.js.map +1 -0
  8. package/dist/full-D4ufJLcw.js +409 -0
  9. package/dist/full-D4ufJLcw.js.map +1 -0
  10. package/dist/full.d.ts +59 -0
  11. package/dist/full.d.ts.map +1 -0
  12. package/dist/full.js +4 -0
  13. package/dist/index.d.ts +178 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +114 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/operator-BErXCDow.js +923 -0
  18. package/dist/operator-BErXCDow.js.map +1 -0
  19. package/lexicons/MANIFEST.json +7 -0
  20. package/lexicons/simplespace/addMember.json +37 -0
  21. package/lexicons/simplespace/checkUserAccess.json +43 -0
  22. package/lexicons/simplespace/createSpace.json +74 -0
  23. package/lexicons/simplespace/defs.json +47 -0
  24. package/lexicons/simplespace/deleteSpace.json +32 -0
  25. package/lexicons/simplespace/getSpace.json +53 -0
  26. package/lexicons/simplespace/listMembers.json +65 -0
  27. package/lexicons/simplespace/removeMember.json +37 -0
  28. package/lexicons/simplespace/updateSpace.json +57 -0
  29. package/lexicons/space/applyWrites.json +163 -0
  30. package/lexicons/space/createRecord.json +79 -0
  31. package/lexicons/space/defs.json +38 -0
  32. package/lexicons/space/deleteRecord.json +51 -0
  33. package/lexicons/space/getBlob.json +54 -0
  34. package/lexicons/space/getDelegationToken.json +34 -0
  35. package/lexicons/space/getLatestCommit.json +57 -0
  36. package/lexicons/space/getRecord.json +76 -0
  37. package/lexicons/space/getRepo.json +41 -0
  38. package/lexicons/space/getSpaceCredential.json +67 -0
  39. package/lexicons/space/listBlobs.json +59 -0
  40. package/lexicons/space/listRecords.json +108 -0
  41. package/lexicons/space/listRepoOps.json +111 -0
  42. package/lexicons/space/listRepos.json +75 -0
  43. package/lexicons/space/listSpaces.json +65 -0
  44. package/lexicons/space/notifySpaceDeleted.json +24 -0
  45. package/lexicons/space/notifyWrite.json +38 -0
  46. package/lexicons/space/putRecord.json +75 -0
  47. package/lexicons/space/registerNotify.json +49 -0
  48. package/lexicons/space/unregisterNotify.json +29 -0
  49. package/package.json +53 -0
@@ -0,0 +1,163 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.applyWrites",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Apply a batch transaction of creates, updates, and deletes in a permissioned space. Requires auth, implemented by PDS.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "repo", "writes"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref",
17
+ "description": "Reference to the space."
18
+ },
19
+ "repo": {
20
+ "type": "string",
21
+ "format": "did",
22
+ "description": "The DID of the repo to write to (the authenticated member)."
23
+ },
24
+ "validate": {
25
+ "type": "boolean",
26
+ "description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."
27
+ },
28
+ "writes": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "union",
32
+ "refs": ["#create", "#update", "#delete"],
33
+ "closed": true
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "output": {
40
+ "encoding": "application/json",
41
+ "schema": {
42
+ "type": "object",
43
+ "properties": {
44
+ "results": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "union",
48
+ "refs": ["#createResult", "#updateResult", "#deleteResult"],
49
+ "closed": true
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "errors": [
56
+ {
57
+ "name": "SpaceNotFound"
58
+ },
59
+ {
60
+ "name": "RecordNotFound",
61
+ "description": "An update or delete targeted a record that does not exist."
62
+ },
63
+ {
64
+ "name": "RecordAlreadyExists",
65
+ "description": "A create targeted a collection and rkey that already holds a record."
66
+ }
67
+ ]
68
+ },
69
+ "create": {
70
+ "type": "object",
71
+ "description": "Operation which creates a new record.",
72
+ "required": ["collection", "value"],
73
+ "properties": {
74
+ "collection": {
75
+ "type": "string",
76
+ "format": "nsid"
77
+ },
78
+ "rkey": {
79
+ "type": "string",
80
+ "format": "record-key",
81
+ "maxLength": 512
82
+ },
83
+ "value": {
84
+ "type": "unknown"
85
+ }
86
+ }
87
+ },
88
+ "update": {
89
+ "type": "object",
90
+ "description": "Operation which updates an existing record.",
91
+ "required": ["collection", "rkey", "value"],
92
+ "properties": {
93
+ "collection": {
94
+ "type": "string",
95
+ "format": "nsid"
96
+ },
97
+ "rkey": {
98
+ "type": "string",
99
+ "format": "record-key"
100
+ },
101
+ "value": {
102
+ "type": "unknown"
103
+ }
104
+ }
105
+ },
106
+ "delete": {
107
+ "type": "object",
108
+ "description": "Operation which deletes an existing record.",
109
+ "required": ["collection", "rkey"],
110
+ "properties": {
111
+ "collection": {
112
+ "type": "string",
113
+ "format": "nsid"
114
+ },
115
+ "rkey": {
116
+ "type": "string",
117
+ "format": "record-key"
118
+ }
119
+ }
120
+ },
121
+ "createResult": {
122
+ "type": "object",
123
+ "required": ["uri", "cid"],
124
+ "properties": {
125
+ "uri": {
126
+ "type": "string",
127
+ "format": "at-uri"
128
+ },
129
+ "cid": {
130
+ "type": "string",
131
+ "format": "cid"
132
+ },
133
+ "validationStatus": {
134
+ "type": "string",
135
+ "knownValues": ["valid", "unknown"]
136
+ }
137
+ }
138
+ },
139
+ "updateResult": {
140
+ "type": "object",
141
+ "required": ["uri", "cid"],
142
+ "properties": {
143
+ "uri": {
144
+ "type": "string",
145
+ "format": "at-uri"
146
+ },
147
+ "cid": {
148
+ "type": "string",
149
+ "format": "cid"
150
+ },
151
+ "validationStatus": {
152
+ "type": "string",
153
+ "knownValues": ["valid", "unknown"]
154
+ }
155
+ }
156
+ },
157
+ "deleteResult": {
158
+ "type": "object",
159
+ "required": [],
160
+ "properties": {}
161
+ }
162
+ }
163
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.createRecord",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Create a single new record in a permissioned space. Requires auth, implemented by PDS.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "repo", "collection", "record"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref",
17
+ "description": "Reference to the space."
18
+ },
19
+ "repo": {
20
+ "type": "string",
21
+ "format": "did",
22
+ "description": "The DID of the repo to write to (the authenticated member)."
23
+ },
24
+ "collection": {
25
+ "type": "string",
26
+ "format": "nsid",
27
+ "description": "The NSID of the record collection."
28
+ },
29
+ "rkey": {
30
+ "type": "string",
31
+ "format": "record-key",
32
+ "description": "The Record Key.",
33
+ "maxLength": 512
34
+ },
35
+ "validate": {
36
+ "type": "boolean",
37
+ "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
38
+ },
39
+ "record": {
40
+ "type": "unknown",
41
+ "description": "The record itself. Must contain a $type field."
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "output": {
47
+ "encoding": "application/json",
48
+ "schema": {
49
+ "type": "object",
50
+ "required": ["uri", "cid"],
51
+ "properties": {
52
+ "uri": {
53
+ "type": "string",
54
+ "format": "at-uri",
55
+ "description": "URI of the created record."
56
+ },
57
+ "cid": {
58
+ "type": "string",
59
+ "format": "cid"
60
+ },
61
+ "validationStatus": {
62
+ "type": "string",
63
+ "knownValues": ["valid", "unknown"]
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "errors": [
69
+ {
70
+ "name": "SpaceNotFound"
71
+ },
72
+ {
73
+ "name": "RecordAlreadyExists",
74
+ "description": "A record already exists at this collection and rkey. Retry with a different rkey, or use putRecord."
75
+ }
76
+ ]
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.defs",
4
+ "defs": {
5
+ "signedCommit": {
6
+ "type": "object",
7
+ "description": "A signed commit over the current state of a permissioned repo.",
8
+ "required": ["ver", "hash", "mac", "ikm", "sig", "rev"],
9
+ "properties": {
10
+ "ver": {
11
+ "type": "integer",
12
+ "description": "Commit format version, currently 1. Corresponds to the version in the ctx protocol tag (atproto-space-v1)."
13
+ },
14
+ "hash": {
15
+ "type": "bytes",
16
+ "description": "sha256 digest of the LtHash state (32 bytes)."
17
+ },
18
+ "ikm": {
19
+ "type": "bytes",
20
+ "description": "Per-signature input keying material (32 random bytes)"
21
+ },
22
+ "sig": {
23
+ "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."
25
+ },
26
+ "mac": {
27
+ "type": "bytes",
28
+ "description": "HMAC-SHA256 over hash, keyed by HKDF-SHA256(ikm, info=ctx). Binds the repo hash to this commit's context."
29
+ },
30
+ "rev": {
31
+ "type": "string",
32
+ "format": "tid",
33
+ "description": "Commit revision (TID), also bound into ctx."
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.deleteRecord",
4
+ "defs": {
5
+ "main": {
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.",
8
+ "input": {
9
+ "encoding": "application/json",
10
+ "schema": {
11
+ "type": "object",
12
+ "required": ["space", "repo", "collection", "rkey"],
13
+ "properties": {
14
+ "space": {
15
+ "type": "string",
16
+ "format": "space-ref",
17
+ "description": "Reference to the space."
18
+ },
19
+ "repo": {
20
+ "type": "string",
21
+ "format": "did",
22
+ "description": "The DID of the repo to delete from (the authenticated member)."
23
+ },
24
+ "collection": {
25
+ "type": "string",
26
+ "format": "nsid",
27
+ "description": "The NSID of the record collection."
28
+ },
29
+ "rkey": {
30
+ "type": "string",
31
+ "format": "record-key",
32
+ "description": "The Record Key."
33
+ }
34
+ }
35
+ }
36
+ },
37
+ "output": {
38
+ "encoding": "application/json",
39
+ "schema": {
40
+ "type": "object",
41
+ "properties": {}
42
+ }
43
+ },
44
+ "errors": [
45
+ {
46
+ "name": "SpaceNotFound"
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getBlob",
4
+ "defs": {
5
+ "main": {
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).",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space", "repo", "cid"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref",
15
+ "description": "Reference to the space."
16
+ },
17
+ "repo": {
18
+ "type": "string",
19
+ "format": "did",
20
+ "description": "The DID of the account whose repo holds the blob."
21
+ },
22
+ "cid": {
23
+ "type": "string",
24
+ "format": "cid",
25
+ "description": "The CID of the blob to fetch."
26
+ }
27
+ }
28
+ },
29
+ "output": {
30
+ "encoding": "*/*"
31
+ },
32
+ "errors": [
33
+ {
34
+ "name": "BlobNotFound"
35
+ },
36
+ {
37
+ "name": "SpaceNotFound"
38
+ },
39
+ {
40
+ "name": "RepoNotFound"
41
+ },
42
+ {
43
+ "name": "RepoTakendown"
44
+ },
45
+ {
46
+ "name": "RepoSuspended"
47
+ },
48
+ {
49
+ "name": "RepoDeactivated"
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getDelegationToken",
4
+ "defs": {
5
+ "main": {
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.",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref",
15
+ "description": "Reference to the space."
16
+ }
17
+ }
18
+ },
19
+ "output": {
20
+ "encoding": "application/json",
21
+ "schema": {
22
+ "type": "object",
23
+ "required": ["token"],
24
+ "properties": {
25
+ "token": {
26
+ "type": "string",
27
+ "description": "A signed JWT delegation token."
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getLatestCommit",
4
+ "defs": {
5
+ "main": {
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).",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space", "repo"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref",
15
+ "description": "Reference to the space."
16
+ },
17
+ "repo": {
18
+ "type": "string",
19
+ "format": "did",
20
+ "description": "The DID of the account whose latest commit to retrieve."
21
+ }
22
+ }
23
+ },
24
+ "output": {
25
+ "encoding": "application/json",
26
+ "schema": {
27
+ "type": "object",
28
+ "properties": {
29
+ "commit": {
30
+ "type": "ref",
31
+ "ref": "com.atproto.space.defs#signedCommit",
32
+ "description": "The account's current signed commit."
33
+ }
34
+ },
35
+ "required": ["commit"]
36
+ }
37
+ },
38
+ "errors": [
39
+ {
40
+ "name": "SpaceNotFound"
41
+ },
42
+ {
43
+ "name": "RepoNotFound"
44
+ },
45
+ {
46
+ "name": "RepoTakendown"
47
+ },
48
+ {
49
+ "name": "RepoSuspended"
50
+ },
51
+ {
52
+ "name": "RepoDeactivated"
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getRecord",
4
+ "defs": {
5
+ "main": {
6
+ "type": "query",
7
+ "description": "Get a single record from a permissioned space. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services). Throws RepoNotFound when the account holds no repo in the space; this does not distinguish a member that has never written from a non-member.",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space", "repo", "collection", "rkey"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref",
15
+ "description": "Reference to the space."
16
+ },
17
+ "repo": {
18
+ "type": "string",
19
+ "format": "did",
20
+ "description": "The DID of the account whose repo to read from."
21
+ },
22
+ "collection": {
23
+ "type": "string",
24
+ "format": "nsid",
25
+ "description": "The NSID of the record collection."
26
+ },
27
+ "rkey": {
28
+ "type": "string",
29
+ "format": "record-key",
30
+ "description": "The Record Key."
31
+ }
32
+ }
33
+ },
34
+ "output": {
35
+ "encoding": "application/json",
36
+ "schema": {
37
+ "type": "object",
38
+ "required": ["uri", "cid", "value"],
39
+ "properties": {
40
+ "uri": {
41
+ "type": "string",
42
+ "format": "at-uri"
43
+ },
44
+ "cid": {
45
+ "type": "string",
46
+ "format": "cid"
47
+ },
48
+ "value": {
49
+ "type": "unknown"
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "errors": [
55
+ {
56
+ "name": "RecordNotFound"
57
+ },
58
+ {
59
+ "name": "SpaceNotFound"
60
+ },
61
+ {
62
+ "name": "RepoNotFound"
63
+ },
64
+ {
65
+ "name": "RepoTakendown"
66
+ },
67
+ {
68
+ "name": "RepoSuspended"
69
+ },
70
+ {
71
+ "name": "RepoDeactivated"
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getRepo",
4
+ "defs": {
5
+ "main": {
6
+ "type": "query",
7
+ "description": "Download an account's permissioned repo within a space as a CAR file, for full-state recovery. The CAR declares two roots in order: the signed commit, then a DRISL (DAG-CBOR) index mapping '{collection}/{rkey}' to record CID. Record blocks follow, in the same canonical DAG-CBOR key order as the index (length-first, then bytewise). Blobs are not included and are fetched separately via getBlob. Served by a repo host. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services).",
8
+ "parameters": {
9
+ "type": "params",
10
+ "required": ["space", "repo"],
11
+ "properties": {
12
+ "space": {
13
+ "type": "string",
14
+ "format": "space-ref",
15
+ "description": "Reference to the space."
16
+ },
17
+ "repo": {
18
+ "type": "string",
19
+ "format": "did",
20
+ "description": "The DID of the account whose repo to download."
21
+ },
22
+ "excludeValues": {
23
+ "type": "boolean",
24
+ "default": false,
25
+ "description": "If true, omit the record blocks and return only the commit and index roots. The index is still fully authenticated by folding its entries into a set hash and comparing against the commit, so a syncer can diff it against a local copy and fetch just the records it lacks. Note the resulting CAR declares two roots and carries no non-root blocks."
26
+ }
27
+ }
28
+ },
29
+ "output": {
30
+ "encoding": "application/vnd.ipld.car"
31
+ },
32
+ "errors": [
33
+ { "name": "SpaceNotFound" },
34
+ { "name": "RepoNotFound" },
35
+ { "name": "RepoTakendown" },
36
+ { "name": "RepoSuspended" },
37
+ { "name": "RepoDeactivated" }
38
+ ]
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "com.atproto.space.getSpaceCredential",
4
+ "defs": {
5
+ "main": {
6
+ "type": "procedure",
7
+ "description": "Exchange a delegation token for a space credential. Called on the space authority, with the delegation token as the request's authorization token and a DPoP proof signed by the key to bind the credential to. The resulting space credential reads repos across the space. Requires a delegation token and DPoP proof, plus a client attestation when the space gates on app identity.",
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
+ "description": "Reference to the space."
18
+ },
19
+ "clientAttestation": {
20
+ "type": "string",
21
+ "description": "Optional client attestation JWT establishing the app's identity. Required only when the space gates on app identity."
22
+ }
23
+ }
24
+ }
25
+ },
26
+ "output": {
27
+ "encoding": "application/json",
28
+ "schema": {
29
+ "type": "object",
30
+ "required": ["credential"],
31
+ "properties": {
32
+ "credential": {
33
+ "type": "string",
34
+ "description": "A signed JWT space credential, bound through its cnf.jkt claim to the key that signed the request's DPoP proof."
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "errors": [
40
+ {
41
+ "name": "SpaceNotFound"
42
+ },
43
+ {
44
+ "name": "SpaceDeleted"
45
+ },
46
+ {
47
+ "name": "UserNotAuthorized",
48
+ "description": "Refused on the basis of the requesting user."
49
+ },
50
+ {
51
+ "name": "AppNotAuthorized",
52
+ "description": "Refused on the basis of the requesting app."
53
+ },
54
+ {
55
+ "name": "NotAuthorized",
56
+ "description": "Refused without attributing the refusal to the user or the app. Authorities that do not wish to disclose which perimeter failed may return this in place of UserNotAuthorized or AppNotAuthorized."
57
+ },
58
+ {
59
+ "name": "InvalidDelegationToken"
60
+ },
61
+ {
62
+ "name": "InvalidClientAttestation"
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ }