@atproto/tap 0.0.0-spaces-alpha-20260818163953

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,372 @@
1
+ # @atproto/tap
2
+
3
+ ## 0.0.0-spaces-alpha-20260818163953
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`2f77206`](https://github.com/bluesky-social/atproto/commit/2f77206ff8010710db5733c454abff9eb5ebb96b)]:
8
+ - @atproto/common@0.0.0-spaces-alpha-20260818163953
9
+ - @atproto/syntax@0.0.0-spaces-alpha-20260818163953
10
+ - @atproto/lex@0.0.0-spaces-alpha-20260818163953
11
+
12
+ ## 0.4.2
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`b66870d`](https://github.com/bluesky-social/atproto/commit/b66870d5a1efbcfa0cc07498c7cfcf3f0f243e86), [`b66870d`](https://github.com/bluesky-social/atproto/commit/b66870d5a1efbcfa0cc07498c7cfcf3f0f243e86)]:
17
+ - @atproto/common@0.7.6
18
+ - @atproto/lex@0.3.5
19
+
20
+ ## 0.4.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [[`8b55a4a`](https://github.com/bluesky-social/atproto/commit/8b55a4ab69c24e5038f67c479b3b9953666ea0c2)]:
25
+ - @atproto/syntax@0.7.4
26
+ - @atproto/lex@0.3.4
27
+ - @atproto/common@0.7.5
28
+
29
+ ## 0.4.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [#5285](https://github.com/bluesky-social/atproto/pull/5285) [`d12f6ac`](https://github.com/bluesky-social/atproto/commit/d12f6ac6e2cb2590446bf9f2051287bac058c092) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** `TapWebsocketOptions` now takes an explicit set of options rather than arbitrary `ws` `ClientOptions`, and adds a `headers` option for the upgrade request.
34
+
35
+ `ackEvent()` now resolves once the ack has been sent — or recorded for the next connection — rather than once it is confirmed delivered. Awaiting confirmed delivery from a handler could deadlock the channel (a bug that predates this change). Acks issued while disconnected are flushed when the next connection comes up, and Tap's at-least-once redelivery covers an ack lost with its connection.
36
+
37
+ `onReconnectError`'s `initialSetup` argument now means "first attempt of this reconnect cycle" rather than "before the first-ever successful connection".
38
+
39
+ ### Patch Changes
40
+
41
+ - [#5295](https://github.com/bluesky-social/atproto/pull/5295) [`6a3d607`](https://github.com/bluesky-social/atproto/commit/6a3d6073cb66c527b5b109242049c85c36b9658c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update vitest dependencies
42
+
43
+ - [#5301](https://github.com/bluesky-social/atproto/pull/5301) [`8c07338`](https://github.com/bluesky-social/atproto/commit/8c07338232aa69427aa65322a555f70e0211d6d7) Thanks [@43081j](https://github.com/43081j)! - Switch from destructured default imports to named imports of CommonJS dependencies.
44
+
45
+ - Updated dependencies [[`6a3d607`](https://github.com/bluesky-social/atproto/commit/6a3d6073cb66c527b5b109242049c85c36b9658c), [`8c07338`](https://github.com/bluesky-social/atproto/commit/8c07338232aa69427aa65322a555f70e0211d6d7), [`d12f6ac`](https://github.com/bluesky-social/atproto/commit/d12f6ac6e2cb2590446bf9f2051287bac058c092)]:
46
+ - @atproto/lex@0.3.3
47
+ - @atproto/syntax@0.7.3
48
+ - @atproto/ws-client@0.2.0
49
+ - @atproto/common@0.7.4
50
+
51
+ ## 0.3.12
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies []:
56
+ - @atproto/lex@0.3.2
57
+ - @atproto/common@0.7.3
58
+ - @atproto/ws-client@0.1.8
59
+
60
+ ## 0.3.11
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies []:
65
+ - @atproto/lex@0.3.1
66
+
67
+ ## 0.3.10
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [[`f8267c3`](https://github.com/bluesky-social/atproto/commit/f8267c3ada1645a2472c81c1ba95157466108b6e)]:
72
+ - @atproto/lex@0.3.0
73
+
74
+ ## 0.3.9
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies []:
79
+ - @atproto/lex@0.2.3
80
+
81
+ ## 0.3.8
82
+
83
+ ### Patch Changes
84
+
85
+ - Updated dependencies [[`9e1da84`](https://github.com/bluesky-social/atproto/commit/9e1da84cc00a1cc5b453705539a2766403f3ee55)]:
86
+ - @atproto/syntax@0.7.2
87
+ - @atproto/lex@0.2.2
88
+ - @atproto/common@0.7.2
89
+ - @atproto/ws-client@0.1.7
90
+
91
+ ## 0.3.7
92
+
93
+ ### Patch Changes
94
+
95
+ - [#5197](https://github.com/bluesky-social/atproto/pull/5197) [`a0c49d9`](https://github.com/bluesky-social/atproto/commit/a0c49d9e8bc685c5a747a8d3b2775c73c63fdb6f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Rewrite import statements to be compatible with TypeScript's `verbatimModuleSyntax` config.
96
+
97
+ - Updated dependencies [[`a0c49d9`](https://github.com/bluesky-social/atproto/commit/a0c49d9e8bc685c5a747a8d3b2775c73c63fdb6f)]:
98
+ - @atproto/ws-client@0.1.6
99
+ - @atproto/lex@0.2.1
100
+ - @atproto/common@0.7.1
101
+ - @atproto/syntax@0.7.1
102
+
103
+ ## 0.3.6
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`d1be0ce`](https://github.com/bluesky-social/atproto/commit/d1be0cead444ef95e64cac5ea5318edbec9d8112), [`963b944`](https://github.com/bluesky-social/atproto/commit/963b9440190c7e59abc0c05de70ecea9cab6fe37), [`d1be0ce`](https://github.com/bluesky-social/atproto/commit/d1be0cead444ef95e64cac5ea5318edbec9d8112), [`d79f6d5`](https://github.com/bluesky-social/atproto/commit/d79f6d59a073c05cc37bd0d1482beeea482b67ed)]:
108
+ - @atproto/syntax@0.7.0
109
+ - @atproto/lex@0.2.0
110
+ - @atproto/common@0.7.0
111
+ - @atproto/ws-client@0.1.5
112
+
113
+ ## 0.3.5
114
+
115
+ ### Patch Changes
116
+
117
+ - [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update TypeScript build to rely on references to composite internal projects
118
+
119
+ - [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Bundle only necessary files in the NPM tarball, including the `CHANGELOG.md` and `README.md` files (if present).
120
+
121
+ - [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Build with `noImplicitAny` enabled
122
+
123
+ - Updated dependencies [[`28a0b58`](https://github.com/bluesky-social/atproto/commit/28a0b588147863eaef948cd2bb8fc0f19d08cda9), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07)]:
124
+ - @atproto/syntax@0.6.4
125
+ - @atproto/ws-client@0.1.4
126
+ - @atproto/lex@0.1.7
127
+ - @atproto/common@0.6.5
128
+
129
+ ## 0.3.4
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies []:
134
+ - @atproto/lex@0.1.6
135
+
136
+ ## 0.3.3
137
+
138
+ ### Patch Changes
139
+
140
+ - [#5151](https://github.com/bluesky-social/atproto/pull/5151) [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update dependencies
141
+
142
+ - Updated dependencies [[`f2cf8f7`](https://github.com/bluesky-social/atproto/commit/f2cf8f7fc5f3a10847f2e6d785e5fa2244ee8cfb), [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7), [`f2cf8f7`](https://github.com/bluesky-social/atproto/commit/f2cf8f7fc5f3a10847f2e6d785e5fa2244ee8cfb)]:
143
+ - @atproto/common@0.6.4
144
+ - @atproto/lex@0.1.5
145
+ - @atproto/syntax@0.6.3
146
+ - @atproto/ws-client@0.1.3
147
+
148
+ ## 0.3.2
149
+
150
+ ### Patch Changes
151
+
152
+ - [#5117](https://github.com/bluesky-social/atproto/pull/5117) [`8a4c88b`](https://github.com/bluesky-social/atproto/commit/8a4c88b0f63fb2d82b1391d64c54e0c760fac48b) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Make tests less flaky in CI
153
+
154
+ - Updated dependencies [[`8a4c88b`](https://github.com/bluesky-social/atproto/commit/8a4c88b0f63fb2d82b1391d64c54e0c760fac48b)]:
155
+ - @atproto/ws-client@0.1.2
156
+
157
+ ## 0.3.1
158
+
159
+ ### Patch Changes
160
+
161
+ - [#4967](https://github.com/bluesky-social/atproto/pull/4967) [`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use TypeScript 7 to build package
162
+
163
+ - Updated dependencies [[`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5)]:
164
+ - @atproto/ws-client@0.1.1
165
+ - @atproto/lex@0.1.4
166
+ - @atproto/common@0.6.3
167
+ - @atproto/syntax@0.6.2
168
+
169
+ ## 0.3.0
170
+
171
+ ### Minor Changes
172
+
173
+ - [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24.
174
+
175
+ - [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution.
176
+
177
+ Node.js 22's `require()` compatibility layer can still load these packages in CommonJS code.
178
+
179
+ - [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0.
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies [[`affb50c`](https://github.com/bluesky-social/atproto/commit/affb50c040b497a12631df99a6310f8e78cab557), [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c), [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9), [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705)]:
184
+ - @atproto/common@0.6.0
185
+ - @atproto/lex@0.1.0
186
+ - @atproto/syntax@0.6.0
187
+ - @atproto/ws-client@0.1.0
188
+
189
+ ## 0.2.15
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies []:
194
+ - @atproto/lex@0.0.27
195
+
196
+ ## 0.2.14
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies []:
201
+ - @atproto/lex@0.0.26
202
+
203
+ ## 0.2.13
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [[`26d793a`](https://github.com/bluesky-social/atproto/commit/26d793af95a6fb3a50f9b2a97187d8ac4fecf676), [`26d793a`](https://github.com/bluesky-social/atproto/commit/26d793af95a6fb3a50f9b2a97187d8ac4fecf676), [`26d793a`](https://github.com/bluesky-social/atproto/commit/26d793af95a6fb3a50f9b2a97187d8ac4fecf676), [`55d06de`](https://github.com/bluesky-social/atproto/commit/55d06de80a1506908a04ed5c0834986cb5783797), [`26d793a`](https://github.com/bluesky-social/atproto/commit/26d793af95a6fb3a50f9b2a97187d8ac4fecf676)]:
208
+ - @atproto/syntax@0.5.4
209
+ - @atproto/lex@0.0.25
210
+
211
+ ## 0.2.12
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies [[`c62651d`](https://github.com/bluesky-social/atproto/commit/c62651dd69f1e18bd854b66e499b91fee9eaa856)]:
216
+ - @atproto/lex@0.0.24
217
+ - @atproto/common@0.5.16
218
+
219
+ ## 0.2.11
220
+
221
+ ### Patch Changes
222
+
223
+ - Updated dependencies [[`0dbea15`](https://github.com/bluesky-social/atproto/commit/0dbea15da48a6ca913cc3a3a2d8c0ffe64d7c69a), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`527f5d4`](https://github.com/bluesky-social/atproto/commit/527f5d4c5d0c9264c2ff6f23ad06a41163fc6809)]:
224
+ - @atproto/syntax@0.5.2
225
+ - @atproto/lex@0.0.23
226
+
227
+ ## 0.2.10
228
+
229
+ ### Patch Changes
230
+
231
+ - Updated dependencies []:
232
+ - @atproto/lex@0.0.22
233
+ - @atproto/common@0.5.15
234
+
235
+ ## 0.2.9
236
+
237
+ ### Patch Changes
238
+
239
+ - Updated dependencies [[`67eb0c1`](https://github.com/bluesky-social/atproto/commit/67eb0c19ac415e762e221b2ccda9f0bcf7b3dd6f)]:
240
+ - @atproto/syntax@0.5.1
241
+ - @atproto/lex@0.0.21
242
+
243
+ ## 0.2.8
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies [[`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`52834ab`](https://github.com/bluesky-social/atproto/commit/52834aba182da8df3611fd9dff924e6c6a3973a7), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd)]:
248
+ - @atproto/syntax@0.5.0
249
+ - @atproto/lex@0.0.20
250
+ - @atproto/common@0.5.14
251
+
252
+ ## 0.2.7
253
+
254
+ ### Patch Changes
255
+
256
+ - Updated dependencies [[`38852f0`](https://github.com/bluesky-social/atproto/commit/38852f0ddfa9fbce8036233dc6af87614e9ae4b2)]:
257
+ - @atproto/lex@0.0.19
258
+
259
+ ## 0.2.6
260
+
261
+ ### Patch Changes
262
+
263
+ - Updated dependencies []:
264
+ - @atproto/common@0.5.13
265
+ - @atproto/lex@0.0.18
266
+
267
+ ## 0.2.5
268
+
269
+ ### Patch Changes
270
+
271
+ - Updated dependencies [[`009c4af`](https://github.com/bluesky-social/atproto/commit/009c4afd3643d4edf4bd05065ec93cab74610bfe)]:
272
+ - @atproto/lex@0.0.17
273
+ - @atproto/common@0.5.12
274
+
275
+ ## 0.2.4
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies []:
280
+ - @atproto/lex@0.0.16
281
+
282
+ ## 0.2.3
283
+
284
+ ### Patch Changes
285
+
286
+ - Updated dependencies [[`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015), [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015), [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015)]:
287
+ - @atproto/lex@0.0.15
288
+ - @atproto/common@0.5.11
289
+
290
+ ## 0.2.2
291
+
292
+ ### Patch Changes
293
+
294
+ - Updated dependencies [[`369bb02`](https://github.com/bluesky-social/atproto/commit/369bb02b9f80f0e15e5242e54f09bd4e01117f3a), [`49b3806`](https://github.com/bluesky-social/atproto/commit/49b38069ed4b5bd1ef71e967c78e5123b1c1f6f1)]:
295
+ - @atproto/lex@0.0.14
296
+ - @atproto/common@0.5.10
297
+
298
+ ## 0.2.1
299
+
300
+ ### Patch Changes
301
+
302
+ - Updated dependencies []:
303
+ - @atproto/lex@0.0.13
304
+
305
+ ## 0.2.0
306
+
307
+ ### Minor Changes
308
+
309
+ - [#4532](https://github.com/bluesky-social/atproto/pull/4532) [`aaedafc`](https://github.com/bluesky-social/atproto/commit/aaedafc6baef106b85e0954d8474cec21c00c1c2) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Expose `record` data as parsed atproto data (including CIDs and Uint8Arrays)
310
+
311
+ ### Patch Changes
312
+
313
+ - [#4532](https://github.com/bluesky-social/atproto/pull/4532) [`aaedafc`](https://github.com/bluesky-social/atproto/commit/aaedafc6baef106b85e0954d8474cec21c00c1c2) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Replace event validation from "zod" to "@atproto/lex"
314
+
315
+ - [#4562](https://github.com/bluesky-social/atproto/pull/4562) [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add validation error as cause when handling invalid records
316
+
317
+ - Updated dependencies [[`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101), [`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b)]:
318
+ - @atproto/syntax@0.4.3
319
+ - @atproto/lex@0.0.12
320
+ - @atproto/common@0.5.9
321
+
322
+ ## 0.1.3
323
+
324
+ ### Patch Changes
325
+
326
+ - [#4534](https://github.com/bluesky-social/atproto/pull/4534) [`0193467`](https://github.com/bluesky-social/atproto/commit/0193467463a1a49c0c7f17d129c07b687a1f5057) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Make sure the `destroy()` promise resolves, even in case of error
327
+
328
+ - [#4534](https://github.com/bluesky-social/atproto/pull/4534) [`0193467`](https://github.com/bluesky-social/atproto/commit/0193467463a1a49c0c7f17d129c07b687a1f5057) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Make `TapChannel` implement `AsyncDisposable`, allowing use with `using` keyword
329
+
330
+ - Updated dependencies []:
331
+ - @atproto/common@0.5.8
332
+ - @atproto/lex@0.0.11
333
+
334
+ ## 0.1.2
335
+
336
+ ### Patch Changes
337
+
338
+ - Updated dependencies []:
339
+ - @atproto/common@0.5.7
340
+ - @atproto/lex@0.0.10
341
+
342
+ ## 0.1.1
343
+
344
+ ### Patch Changes
345
+
346
+ - Updated dependencies [[`2f78893`](https://github.com/bluesky-social/atproto/commit/2f78893ace3bbf14d4bac36837820ddb46658c98), [`2f78893`](https://github.com/bluesky-social/atproto/commit/2f78893ace3bbf14d4bac36837820ddb46658c98)]:
347
+ - @atproto/lex@0.0.9
348
+ - @atproto/common@0.5.6
349
+
350
+ ## 0.1.0
351
+
352
+ ### Minor Changes
353
+
354
+ - [#4483](https://github.com/bluesky-social/atproto/pull/4483) [`e3357e9`](https://github.com/bluesky-social/atproto/commit/e3357e9c781ff84430556f4c891639acfcef3486) Thanks [@dholms](https://github.com/dholms)! - Add LexIndexer
355
+
356
+ ## 0.0.3
357
+
358
+ ### Patch Changes
359
+
360
+ - [#4481](https://github.com/bluesky-social/atproto/pull/4481) [`e15e7cf`](https://github.com/bluesky-social/atproto/commit/e15e7cf1a07d6a4bdd7a9a3c591690613f5414b5) Thanks [@dholms](https://github.com/dholms)! - Fix URL formatting with trailing slash
361
+
362
+ - Updated dependencies []:
363
+ - @atproto/common@0.5.4
364
+
365
+ ## 0.0.2
366
+
367
+ ### Patch Changes
368
+
369
+ - [#4290](https://github.com/bluesky-social/atproto/pull/4290) [`b4a76ba`](https://github.com/bluesky-social/atproto/commit/b4a76bae7bef1189302488d43ce49a03fd61f957) Thanks [@dholms](https://github.com/dholms)! - Initial version of package
370
+
371
+ - Updated dependencies [[`b4a76ba`](https://github.com/bluesky-social/atproto/commit/b4a76bae7bef1189302488d43ce49a03fd61f957)]:
372
+ - @atproto/ws-client@0.0.4
package/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ Dual MIT/Apache-2.0 License
2
+
3
+ Copyright (c) 2022-2026 Bluesky Social PBC, and Contributors
4
+
5
+ Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
6
+
7
+ Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
package/README.md ADDED
@@ -0,0 +1,268 @@
1
+ # @atproto/tap
2
+
3
+ TypeScript client library for [Tap](https://github.com/bluesky-social/indigo/tree/main/cmd/tap/README.md), a sync utility for the AT Protocol network.
4
+
5
+ Tap handles firehose connections, cryptographic verification, backfill, and filtering. This client library lets you connect to a Tap instance and receive simple JSON events for the repos you care about.
6
+
7
+ [![NPM](https://img.shields.io/npm/v/@atproto/tap)](https://www.npmjs.com/package/@atproto/tap)
8
+ [![Github CI Status](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml/badge.svg)](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ npm install @atproto/tap
14
+ ```
15
+
16
+ ```ts
17
+ import { Tap, SimpleIndexer } from '@atproto/tap'
18
+
19
+ const tap = new Tap('http://localhost:2480', { adminPassword: 'secret' })
20
+
21
+ const indexer = new SimpleIndexer()
22
+
23
+ indexer.identity(async (evt) => {
24
+ console.log(`${evt.did} updated identity: ${evt.handle} (${evt.status})`)
25
+ })
26
+
27
+ indexer.record(async (evt) => {
28
+ const uri = `at://${evt.did}/${evt.collection}/${evt.rkey}`
29
+ if (evt.action === 'create' || evt.action === 'update') {
30
+ console.log(`${evt.action}: ${uri}`)
31
+ } else {
32
+ console.log(`deleted: ${uri}`)
33
+ }
34
+ })
35
+
36
+ indexer.error((err) => console.error(err))
37
+
38
+ const channel = tap.channel(indexer)
39
+ channel.start()
40
+
41
+ await tap.addRepos(['did:plc:ewvi7nxzyoun6zhxrhs64oiz'])
42
+
43
+ // On shutdown
44
+ await channel.destroy()
45
+ ```
46
+
47
+ ## Running Tap
48
+
49
+ See the [Tap README](https://github.com/bluesky-social/indigo/tree/main/cmd/tap/README.md) for details getting Tap up and running. Your app can communicate with it either locally or over the internet.
50
+
51
+ This library is intended to be used with Tap running in the default mode of "WebScoket with acks". In this mode, Tap provides:
52
+
53
+ - **At-least-once delivery**: Events may be redelivered if the connection drops before an ack is received
54
+ - **Per-repo ordering**: Events for the same repo are delivered in order
55
+ - **Backfill**: When you add a repo, historical events are delivered before live events
56
+
57
+ ## API
58
+
59
+ ### `Tap`
60
+
61
+ The main client for interacting with a Tap server.
62
+
63
+ ```ts
64
+ const tap = new Tap(url: string, config?: TapConfig)
65
+ ```
66
+
67
+ **Config options:**
68
+
69
+ - `adminPassword?: string` - Password for Basic auth (required if Tap server has auth enabled)
70
+
71
+ **Methods:**
72
+
73
+ - `channel(handler: TapHandler, opts?: TapWebsocketOptions): TapChannel` - Create a WebSocket channel to receive events
74
+ - `addRepos(dids: string[]): Promise<void>` - Add repos to track (triggers backfill)
75
+ - `removeRepos(dids: string[]): Promise<void>` - Stop tracking repos
76
+ - `resolveDid(did: string): Promise<DidDocument | null>` - Resolve a DID to its DID document
77
+ - `getRepoInfo(did: string): Promise<RepoInfo>` - Get info about a tracked repo
78
+
79
+ ### `TapChannel`
80
+
81
+ WebSocket connection for receiving events. Created via `tap.channel()`.
82
+
83
+ ```ts
84
+ const channel = tap.channel(handler, opts?)
85
+ ```
86
+
87
+ **Methods:**
88
+
89
+ - `start(): Promise<void>` - Start receiving events. Returns a promise that resolves when the connection is destroyed or errors.
90
+ - `destroy(): Promise<void>` - Close the connection
91
+
92
+ The channel automatically handles reconnection and keepalive. Events are automatically acknowledged after your handler completes successfully.
93
+
94
+ ### `SimpleIndexer`
95
+
96
+ A convenience class for handling events by type. Passed into `tap.channel()` when opening a channel with Tap.
97
+
98
+ ```ts
99
+ const indexer = new SimpleIndexer()
100
+
101
+ indexer.identity(async (evt: IdentityEvent) => { ... })
102
+ indexer.record(async (evt: RecordEvent) => { ... })
103
+ indexer.error((err: Error) => { ... })
104
+ ```
105
+
106
+ If no error handler is registered, errors will throw as unhandled exceptions.
107
+
108
+ ### `LexIndexer`
109
+
110
+ A typed indexer that uses `@atproto/lex` schemas for type-safe event handling. Register handlers for specific record types and actions:
111
+
112
+ ```ts
113
+ import { LexIndexer } from '@atproto/tap'
114
+ import * as com from './lexicons/com'
115
+
116
+ const indexer = new LexIndexer()
117
+
118
+ // Handle creates for a specific record type
119
+ indexer.create(com.example.post, async (evt) => {
120
+ // evt.record is fully typed as com.example.post.Main
121
+ console.log(`New post: ${evt.record.text}`)
122
+ })
123
+
124
+ // Handle updates
125
+ indexer.update(com.example.post, async (evt) => {
126
+ console.log(`Updated post: ${evt.record.text}`)
127
+ })
128
+
129
+ // Handle deletes (no record on delete events)
130
+ indexer.delete(com.example.post, async (evt) => {
131
+ console.log(`Deleted: at://${evt.did}/${evt.collection}/${evt.rkey}`)
132
+ })
133
+
134
+ // Handle both creates and updates with put()
135
+ indexer.put(com.example.like, async (evt) => {
136
+ console.log(`Like ${evt.action}: ${evt.record.subject.uri}`)
137
+ })
138
+
139
+ // Fallback for unhandled record types/actions
140
+ indexer.other(async (evt) => {
141
+ console.log(`Unhandled: ${evt.action}, ${evt.collection}`)
142
+ })
143
+
144
+ // Identity and error handlers
145
+ indexer.identity(async (evt) => { ... })
146
+ indexer.error((err) => { ... })
147
+
148
+ const channel = tap.channel(indexer)
149
+ ```
150
+
151
+ Records are validated against their schemas before handlers are called. If validation fails, an error is thrown which will be picked up through the `error` handler..
152
+
153
+ Duplicate handler registration throws an error, including conflicts between `put()` and `create()`/`update()` for the same schema.
154
+
155
+ ### `TapHandler`
156
+
157
+ You can create your own custom handler by creating a class that implements the `TapHandler` interface:
158
+
159
+ ```ts
160
+ interface TapHandler {
161
+ onEvent: (evt: TapEvent, opts: HandlerOpts) => void | Promise<void>
162
+ onError: (err: Error) => void
163
+ }
164
+
165
+ interface HandlerOpts {
166
+ signal: AbortSignal
167
+ ack: () => Promise<void>
168
+ }
169
+ ```
170
+
171
+ When implementing a custom handler, be sure to call `ack()` when you're done processing the event.
172
+
173
+ ## Event Types
174
+
175
+ ### `RecordEvent`
176
+
177
+ ```ts
178
+ type RecordEvent = {
179
+ id: number
180
+ type: 'record'
181
+ action: 'create' | 'update' | 'delete'
182
+ did: string
183
+ rev: string
184
+ collection: string
185
+ rkey: string
186
+ record?: Record<string, unknown> // present for create/update
187
+ cid?: string // present for create/update
188
+ live: boolean // true if from firehose, false if from backfill
189
+ }
190
+ ```
191
+
192
+ ### `IdentityEvent`
193
+
194
+ ```ts
195
+ type IdentityEvent = {
196
+ id: number
197
+ type: 'identity'
198
+ did: string
199
+ handle: string
200
+ isActive: boolean
201
+ status: 'active' | 'takendown' | 'suspended' | 'deactivated' | 'deleted'
202
+ }
203
+ ```
204
+
205
+ ## Webhook Mode
206
+
207
+ If your Tap server is configured for webhook delivery, you can use `parseTapEvent` to validate incoming webhook payloads:
208
+
209
+ ```ts
210
+ import express from 'express'
211
+ import { parseTapEvent, assureAdminAuth } from '@atproto/tap'
212
+
213
+ const ADMIN_PASSWORD = process.env.ADMIN_PASSWORD
214
+
215
+ const app = express()
216
+ app.use(express.json())
217
+
218
+ app.post('/webhook', async (req, res) => {
219
+ try {
220
+ assureAdminAuth(ADMIN_PASSWORD, req.headers.authorization)
221
+ } catch {
222
+ return res.status(401).json({ error: 'Unauthorized' })
223
+ }
224
+
225
+ try {
226
+ const evt = parseTapEvent(req.body)
227
+ // handle event...
228
+ res.sendStatus(200)
229
+ } catch (err) {
230
+ console.error('Failed to process event:', err)
231
+ res.status(500).json({ error: 'Failed to process event' })
232
+ }
233
+ })
234
+ ```
235
+
236
+ ## Utilities
237
+
238
+ ### Auth helpers
239
+
240
+ ```ts
241
+ import {
242
+ formatAdminAuthHeader,
243
+ parseAdminAuthHeader,
244
+ assureAdminAuth,
245
+ } from '@atproto/tap'
246
+
247
+ // Format a password into a Basic auth header value
248
+ const header = formatAdminAuthHeader('secret')
249
+ // => 'Basic YWRtaW46c2VjcmV0'
250
+
251
+ // Parse an auth header to extract the password (throws if invalid)
252
+ const password = parseAdminAuthHeader(header)
253
+
254
+ // Verify auth header matches expected password (timing-safe, throws if invalid)
255
+ assureAdminAuth('secret', req.headers.authorization)
256
+ ```
257
+
258
+ ### Event parsing
259
+
260
+ ```ts
261
+ import { parseTapEvent } from '@atproto/tap'
262
+
263
+ const evt = parseTapEvent(jsonData) // validates and returns typed TapEvent
264
+ ```
265
+
266
+ ## License
267
+
268
+ MIT