@getcirrus/pds 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,531 @@
1
+ import { DurableObject } from "cloudflare:workers";
2
+ import { BlockMap, CommitData, ReadableBlockstore, Repo, RepoStorage } from "@atproto/repo";
3
+ import { Secp256k1Keypair } from "@atproto/crypto";
4
+ import { CID } from "@atproto/lex-data";
5
+ import { Hono } from "hono";
6
+ import * as _getcirrus_oauth_provider0 from "@getcirrus/oauth-provider";
7
+ import { AuthCodeData, ClientMetadata, OAuthStorage, PARData, TokenData } from "@getcirrus/oauth-provider";
8
+ import * as hono_types0 from "hono/types";
9
+
10
+ //#region src/storage.d.ts
11
+ /**
12
+ * SQLite-backed repository storage for Cloudflare Durable Objects.
13
+ *
14
+ * Implements the RepoStorage interface from @atproto/repo, storing blocks
15
+ * in a SQLite database within a Durable Object.
16
+ */
17
+ declare class SqliteRepoStorage extends ReadableBlockstore implements RepoStorage {
18
+ private sql;
19
+ constructor(sql: SqlStorage);
20
+ /**
21
+ * Initialize the database schema. Should be called once on DO startup.
22
+ * @param initialActive - Whether the account should start in active state (default true)
23
+ */
24
+ initSchema(initialActive?: boolean): void;
25
+ /**
26
+ * Get the current root CID of the repository.
27
+ */
28
+ getRoot(): Promise<CID | null>;
29
+ /**
30
+ * Get the current revision string.
31
+ */
32
+ getRev(): Promise<string | null>;
33
+ /**
34
+ * Get the current sequence number for firehose events.
35
+ */
36
+ getSeq(): Promise<number>;
37
+ /**
38
+ * Increment and return the next sequence number.
39
+ */
40
+ nextSeq(): Promise<number>;
41
+ /**
42
+ * Get the raw bytes for a block by CID.
43
+ */
44
+ getBytes(cid: CID): Promise<Uint8Array | null>;
45
+ /**
46
+ * Check if a block exists.
47
+ */
48
+ has(cid: CID): Promise<boolean>;
49
+ /**
50
+ * Get multiple blocks at once.
51
+ */
52
+ getBlocks(cids: CID[]): Promise<{
53
+ blocks: BlockMap;
54
+ missing: CID[];
55
+ }>;
56
+ /**
57
+ * Store a single block.
58
+ */
59
+ putBlock(cid: CID, block: Uint8Array, rev: string): Promise<void>;
60
+ /**
61
+ * Store multiple blocks at once.
62
+ */
63
+ putMany(blocks: BlockMap, rev: string): Promise<void>;
64
+ /**
65
+ * Update the repository root.
66
+ */
67
+ updateRoot(cid: CID, rev: string): Promise<void>;
68
+ /**
69
+ * Apply a commit atomically: add new blocks, remove old blocks, update root.
70
+ */
71
+ applyCommit(commit: CommitData): Promise<void>;
72
+ /**
73
+ * Get total storage size in bytes.
74
+ */
75
+ sizeInBytes(): Promise<number>;
76
+ /**
77
+ * Clear all data (for testing).
78
+ */
79
+ destroy(): Promise<void>;
80
+ /**
81
+ * Count the number of blocks stored.
82
+ */
83
+ countBlocks(): Promise<number>;
84
+ /**
85
+ * Get user preferences.
86
+ */
87
+ getPreferences(): Promise<unknown[]>;
88
+ /**
89
+ * Update user preferences.
90
+ */
91
+ putPreferences(preferences: unknown[]): Promise<void>;
92
+ /**
93
+ * Get the activation state of the account.
94
+ */
95
+ getActive(): Promise<boolean>;
96
+ /**
97
+ * Set the activation state of the account.
98
+ */
99
+ setActive(active: boolean): Promise<void>;
100
+ /**
101
+ * Add a blob reference from a record.
102
+ */
103
+ addRecordBlob(recordUri: string, blobCid: string): void;
104
+ /**
105
+ * Add multiple blob references from a record.
106
+ */
107
+ addRecordBlobs(recordUri: string, blobCids: string[]): void;
108
+ /**
109
+ * Remove all blob references for a record.
110
+ */
111
+ removeRecordBlobs(recordUri: string): void;
112
+ /**
113
+ * Track an imported blob.
114
+ */
115
+ trackImportedBlob(cid: string, size: number, mimeType: string): void;
116
+ /**
117
+ * Check if a blob has been imported.
118
+ */
119
+ isBlobImported(cid: string): boolean;
120
+ /**
121
+ * Count expected blobs (distinct blobs referenced by records).
122
+ */
123
+ countExpectedBlobs(): number;
124
+ /**
125
+ * Count imported blobs.
126
+ */
127
+ countImportedBlobs(): number;
128
+ /**
129
+ * List blobs that are referenced but not yet imported.
130
+ */
131
+ listMissingBlobs(limit?: number, cursor?: string): {
132
+ blobs: Array<{
133
+ cid: string;
134
+ recordUri: string;
135
+ }>;
136
+ cursor?: string;
137
+ };
138
+ /**
139
+ * Clear all blob tracking data (for testing).
140
+ */
141
+ clearBlobTracking(): void;
142
+ }
143
+ //#endregion
144
+ //#region src/oauth-storage.d.ts
145
+ /**
146
+ * SQLite-backed OAuth storage for Cloudflare Durable Objects.
147
+ *
148
+ * Implements the OAuthStorage interface from @getcirrus/oauth-provider,
149
+ * storing OAuth data in SQLite tables within a Durable Object.
150
+ */
151
+ declare class SqliteOAuthStorage implements OAuthStorage {
152
+ private sql;
153
+ constructor(sql: SqlStorage);
154
+ /**
155
+ * Initialize the OAuth database schema. Should be called once on DO startup.
156
+ */
157
+ initSchema(): void;
158
+ /**
159
+ * Clean up expired entries. Should be called periodically.
160
+ */
161
+ cleanup(): void;
162
+ saveAuthCode(code: string, data: AuthCodeData): Promise<void>;
163
+ getAuthCode(code: string): Promise<AuthCodeData | null>;
164
+ deleteAuthCode(code: string): Promise<void>;
165
+ saveTokens(data: TokenData): Promise<void>;
166
+ getTokenByAccess(accessToken: string): Promise<TokenData | null>;
167
+ getTokenByRefresh(refreshToken: string): Promise<TokenData | null>;
168
+ revokeToken(accessToken: string): Promise<void>;
169
+ revokeAllTokens(sub: string): Promise<void>;
170
+ saveClient(clientId: string, metadata: ClientMetadata): Promise<void>;
171
+ getClient(clientId: string): Promise<ClientMetadata | null>;
172
+ savePAR(requestUri: string, data: PARData): Promise<void>;
173
+ getPAR(requestUri: string): Promise<PARData | null>;
174
+ deletePAR(requestUri: string): Promise<void>;
175
+ checkAndSaveNonce(nonce: string): Promise<boolean>;
176
+ /**
177
+ * Clear all OAuth data (for testing).
178
+ */
179
+ destroy(): void;
180
+ }
181
+ //#endregion
182
+ //#region src/blobs.d.ts
183
+ interface BlobRef {
184
+ $type: "blob";
185
+ ref: {
186
+ $link: string;
187
+ };
188
+ mimeType: string;
189
+ size: number;
190
+ }
191
+ //#endregion
192
+ //#region src/types.d.ts
193
+ /**
194
+ * Environment bindings required by the PDS worker.
195
+ * Consumers must provide these bindings in their wrangler config.
196
+ */
197
+ interface PDSEnv {
198
+ /** The account's DID (e.g., did:web:example.com) */
199
+ DID: string;
200
+ /** The account's handle (e.g., alice.example.com) */
201
+ HANDLE: string;
202
+ /** Public hostname of the PDS */
203
+ PDS_HOSTNAME: string;
204
+ /** Bearer token for write operations */
205
+ AUTH_TOKEN: string;
206
+ /** Private signing key (hex-encoded) */
207
+ SIGNING_KEY: string;
208
+ /** Public signing key (multibase-encoded) */
209
+ SIGNING_KEY_PUBLIC: string;
210
+ /** Secret for signing session JWTs */
211
+ JWT_SECRET: string;
212
+ /** Bcrypt hash of account password */
213
+ PASSWORD_HASH: string;
214
+ /** Durable Object namespace for account storage */
215
+ ACCOUNT: DurableObjectNamespace<AccountDurableObject>;
216
+ /** R2 bucket for blob storage (optional) */
217
+ BLOBS?: R2Bucket;
218
+ /** Initial activation state for new accounts (default: true) */
219
+ INITIAL_ACTIVE?: string;
220
+ }
221
+ //#endregion
222
+ //#region src/account-do.d.ts
223
+ /**
224
+ * Account Durable Object - manages a single user's AT Protocol repository.
225
+ *
226
+ * This DO provides:
227
+ * - SQLite-backed block storage for the repository
228
+ * - AT Protocol Repo instance for repository operations
229
+ * - Firehose WebSocket connections
230
+ * - Sequence number management
231
+ */
232
+ declare class AccountDurableObject extends DurableObject<PDSEnv> {
233
+ private storage;
234
+ private oauthStorage;
235
+ private repo;
236
+ private keypair;
237
+ private sequencer;
238
+ private blobStore;
239
+ private storageInitialized;
240
+ private repoInitialized;
241
+ constructor(ctx: DurableObjectState, env: PDSEnv);
242
+ /**
243
+ * Initialize the storage adapter. Called lazily on first storage access.
244
+ */
245
+ private ensureStorageInitialized;
246
+ /**
247
+ * Initialize the Repo instance. Called lazily on first repo access.
248
+ */
249
+ private ensureRepoInitialized;
250
+ /**
251
+ * Get the storage adapter for direct access (used by tests and internal operations).
252
+ */
253
+ getStorage(): Promise<SqliteRepoStorage>;
254
+ /**
255
+ * Get the OAuth storage adapter for OAuth operations.
256
+ */
257
+ getOAuthStorage(): Promise<SqliteOAuthStorage>;
258
+ /**
259
+ * Get the Repo instance for repository operations.
260
+ */
261
+ getRepo(): Promise<Repo>;
262
+ /**
263
+ * Ensure the account is active. Throws error if deactivated.
264
+ */
265
+ ensureActive(): Promise<void>;
266
+ /**
267
+ * Get the signing keypair for repository operations.
268
+ */
269
+ getKeypair(): Promise<Secp256k1Keypair>;
270
+ /**
271
+ * Update the Repo instance after mutations.
272
+ */
273
+ setRepo(repo: Repo): Promise<void>;
274
+ /**
275
+ * RPC method: Get repo metadata for describeRepo
276
+ */
277
+ rpcDescribeRepo(): Promise<{
278
+ did: string;
279
+ collections: string[];
280
+ cid: string;
281
+ }>;
282
+ /**
283
+ * RPC method: Get a single record
284
+ */
285
+ rpcGetRecord(collection: string, rkey: string): Promise<{
286
+ cid: string;
287
+ record: Rpc.Serializable<any>;
288
+ } | null>;
289
+ /**
290
+ * RPC method: List records in a collection
291
+ */
292
+ rpcListRecords(collection: string, opts: {
293
+ limit: number;
294
+ cursor?: string;
295
+ reverse?: boolean;
296
+ }): Promise<{
297
+ records: Array<{
298
+ uri: string;
299
+ cid: string;
300
+ value: unknown;
301
+ }>;
302
+ cursor?: string;
303
+ }>;
304
+ /**
305
+ * RPC method: Create a record
306
+ */
307
+ rpcCreateRecord(collection: string, rkey: string | undefined, record: unknown): Promise<{
308
+ uri: string;
309
+ cid: string;
310
+ commit: {
311
+ cid: string;
312
+ rev: string;
313
+ };
314
+ }>;
315
+ /**
316
+ * RPC method: Delete a record
317
+ */
318
+ rpcDeleteRecord(collection: string, rkey: string): Promise<{
319
+ commit: {
320
+ cid: string;
321
+ rev: string;
322
+ };
323
+ } | null>;
324
+ /**
325
+ * RPC method: Put a record (create or update)
326
+ */
327
+ rpcPutRecord(collection: string, rkey: string, record: unknown): Promise<{
328
+ uri: string;
329
+ cid: string;
330
+ commit: {
331
+ cid: string;
332
+ rev: string;
333
+ };
334
+ validationStatus: string;
335
+ }>;
336
+ /**
337
+ * RPC method: Apply multiple writes (batch create/update/delete)
338
+ */
339
+ rpcApplyWrites(writes: Array<{
340
+ $type: string;
341
+ collection: string;
342
+ rkey?: string;
343
+ value?: unknown;
344
+ }>): Promise<{
345
+ commit: {
346
+ cid: string;
347
+ rev: string;
348
+ };
349
+ results: Array<{
350
+ $type: string;
351
+ uri?: string;
352
+ cid?: string;
353
+ validationStatus?: string;
354
+ }>;
355
+ }>;
356
+ /**
357
+ * RPC method: Get repo status
358
+ */
359
+ rpcGetRepoStatus(): Promise<{
360
+ did: string;
361
+ head: string;
362
+ rev: string;
363
+ }>;
364
+ /**
365
+ * RPC method: Export repo as CAR
366
+ */
367
+ rpcGetRepoCar(): Promise<Uint8Array>;
368
+ /**
369
+ * RPC method: Get specific blocks by CID as CAR file
370
+ * Used for partial sync and migration.
371
+ */
372
+ rpcGetBlocks(cids: string[]): Promise<Uint8Array>;
373
+ /**
374
+ * RPC method: Import repo from CAR file
375
+ * This is used for account migration - importing an existing repository
376
+ * from another PDS.
377
+ */
378
+ rpcImportRepo(carBytes: Uint8Array): Promise<{
379
+ did: string;
380
+ rev: string;
381
+ cid: string;
382
+ }>;
383
+ /**
384
+ * RPC method: Upload a blob to R2
385
+ */
386
+ rpcUploadBlob(bytes: Uint8Array, mimeType: string): Promise<BlobRef>;
387
+ /**
388
+ * RPC method: Get a blob from R2
389
+ */
390
+ rpcGetBlob(cidStr: string): Promise<R2ObjectBody | null>;
391
+ /**
392
+ * Encode a firehose frame (header + body CBOR).
393
+ */
394
+ private encodeFrame;
395
+ /**
396
+ * Encode a commit event frame.
397
+ */
398
+ private encodeCommitFrame;
399
+ /**
400
+ * Encode an error frame.
401
+ */
402
+ private encodeErrorFrame;
403
+ /**
404
+ * Backfill firehose events from a cursor.
405
+ */
406
+ private backfillFirehose;
407
+ /**
408
+ * Broadcast a commit event to all connected firehose clients.
409
+ */
410
+ private broadcastCommit;
411
+ /**
412
+ * Handle WebSocket upgrade for firehose (subscribeRepos).
413
+ */
414
+ handleFirehoseUpgrade(request: Request): Promise<Response>;
415
+ /**
416
+ * WebSocket message handler (hibernation API).
417
+ */
418
+ webSocketMessage(_ws: WebSocket, _message: string | ArrayBuffer): void;
419
+ /**
420
+ * WebSocket close handler (hibernation API).
421
+ */
422
+ webSocketClose(_ws: WebSocket, _code: number, _reason: string, _wasClean: boolean): void;
423
+ /**
424
+ * WebSocket error handler (hibernation API).
425
+ */
426
+ webSocketError(_ws: WebSocket, error: Error): void;
427
+ /**
428
+ * RPC method: Get user preferences
429
+ */
430
+ rpcGetPreferences(): Promise<{
431
+ preferences: unknown[];
432
+ }>;
433
+ /**
434
+ * RPC method: Put user preferences
435
+ */
436
+ rpcPutPreferences(preferences: unknown[]): Promise<void>;
437
+ /**
438
+ * RPC method: Get account activation state
439
+ */
440
+ rpcGetActive(): Promise<boolean>;
441
+ /**
442
+ * RPC method: Activate account
443
+ */
444
+ rpcActivateAccount(): Promise<void>;
445
+ /**
446
+ * RPC method: Deactivate account
447
+ */
448
+ rpcDeactivateAccount(): Promise<void>;
449
+ /**
450
+ * RPC method: Count blocks in storage
451
+ */
452
+ rpcCountBlocks(): Promise<number>;
453
+ /**
454
+ * RPC method: Count records in repository
455
+ */
456
+ rpcCountRecords(): Promise<number>;
457
+ /**
458
+ * RPC method: Count expected blobs (referenced in records)
459
+ */
460
+ rpcCountExpectedBlobs(): Promise<number>;
461
+ /**
462
+ * RPC method: Count imported blobs
463
+ */
464
+ rpcCountImportedBlobs(): Promise<number>;
465
+ /**
466
+ * RPC method: List missing blobs (referenced but not imported)
467
+ */
468
+ rpcListMissingBlobs(limit?: number, cursor?: string): Promise<{
469
+ blobs: Array<{
470
+ cid: string;
471
+ recordUri: string;
472
+ }>;
473
+ cursor?: string;
474
+ }>;
475
+ /**
476
+ * RPC method: Reset migration state.
477
+ * Clears imported repo and blob tracking to allow re-import.
478
+ * Only works when account is deactivated.
479
+ */
480
+ rpcResetMigration(): Promise<{
481
+ blocksDeleted: number;
482
+ blobsCleared: number;
483
+ }>;
484
+ /**
485
+ * Emit an identity event to notify downstream services to refresh identity cache.
486
+ */
487
+ rpcEmitIdentityEvent(handle: string): Promise<{
488
+ seq: number;
489
+ }>;
490
+ /** Save an authorization code */
491
+ rpcSaveAuthCode(code: string, data: _getcirrus_oauth_provider0.AuthCodeData): Promise<void>;
492
+ /** Get authorization code data */
493
+ rpcGetAuthCode(code: string): Promise<_getcirrus_oauth_provider0.AuthCodeData | null>;
494
+ /** Delete an authorization code */
495
+ rpcDeleteAuthCode(code: string): Promise<void>;
496
+ /** Save token data */
497
+ rpcSaveTokens(data: _getcirrus_oauth_provider0.TokenData): Promise<void>;
498
+ /** Get token data by access token */
499
+ rpcGetTokenByAccess(accessToken: string): Promise<_getcirrus_oauth_provider0.TokenData | null>;
500
+ /** Get token data by refresh token */
501
+ rpcGetTokenByRefresh(refreshToken: string): Promise<_getcirrus_oauth_provider0.TokenData | null>;
502
+ /** Revoke a token */
503
+ rpcRevokeToken(accessToken: string): Promise<void>;
504
+ /** Revoke all tokens for a user */
505
+ rpcRevokeAllTokens(sub: string): Promise<void>;
506
+ /** Save client metadata */
507
+ rpcSaveClient(clientId: string, metadata: _getcirrus_oauth_provider0.ClientMetadata): Promise<void>;
508
+ /** Get client metadata */
509
+ rpcGetClient(clientId: string): Promise<_getcirrus_oauth_provider0.ClientMetadata | null>;
510
+ /** Save PAR data */
511
+ rpcSavePAR(requestUri: string, data: _getcirrus_oauth_provider0.PARData): Promise<void>;
512
+ /** Get PAR data */
513
+ rpcGetPAR(requestUri: string): Promise<_getcirrus_oauth_provider0.PARData | null>;
514
+ /** Delete PAR data */
515
+ rpcDeletePAR(requestUri: string): Promise<void>;
516
+ /** Check and save DPoP nonce */
517
+ rpcCheckAndSaveNonce(nonce: string): Promise<boolean>;
518
+ /**
519
+ * HTTP fetch handler for WebSocket upgrades.
520
+ * This is used instead of RPC to avoid WebSocket serialization errors.
521
+ */
522
+ fetch(request: Request): Promise<Response>;
523
+ }
524
+ //#endregion
525
+ //#region src/index.d.ts
526
+ declare const app: Hono<{
527
+ Bindings: PDSEnv;
528
+ }, hono_types0.BlankSchema, "/">;
529
+ //#endregion
530
+ export { AccountDurableObject, type PDSEnv, app as default };
531
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/storage.ts","../src/oauth-storage.ts","../src/blobs.ts","../src/types.ts","../src/account-do.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;cAUa,iBAAA,SACJ,kBAAA,YACG;EAFC,QAAA,GAAA;EAIa,WAAA,CAAA,GAAA,EAAA,UAAA;EAyEA;;;;EAiCR,UAAA,CAAA,aAAA,CAAA,EAAA,OAAA,CAAA,EAAA,IAAA;EAQG;;;EAcL,OAAA,CAAA,CAAA,EAvDE,OAuDF,CAvDU,GAuDV,GAAA,IAAA,CAAA;EAAM;;;EAU8C,MAAA,CAAA,CAAA,EApDnD,OAoDmD,CAAA,MAAA,GAAA,IAAA,CAAA;EAArC;;;EAmB4B,MAAA,CAAA,CAAA,EA7D1C,OA6D0C,CAAA,MAAA,CAAA;EAYpC;;;EAoBmB,OAAA,CAAA,CAAA,EAnFxB,OAmFwB,CAAA,MAAA,CAAA;EAWf;;;EA6CT,QAAA,CAAA,GAAA,EAnIG,GAmIH,CAAA,EAnIS,OAmIT,CAnIiB,UAmIjB,GAAA,IAAA,CAAA;EAUI;;;EAoCF,GAAA,CAAA,GAAA,EAnKJ,GAmKI,CAAA,EAnKE,OAmKF,CAAA,OAAA,CAAA;EAUe;;;EA/SvB,SAAA,CAAA,IAAA,EA4IW,GA5IX,EAAA,CAAA,EA4ImB,OA5InB,CAAA;IAAW,MAAA,EA4I0B,QA5I1B;aA4I6C;;;AC1IpE;;EAyFwC,QAAA,CAAA,GAAA,EDoEnB,GCpEmB,EAAA,KAAA,EDoE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