cursedbelt-server 4.48.0 → 4.49.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 (186) hide show
  1. package/dist/server/activity/store.d.ts +1 -1
  2. package/dist/server/analytics/injectedScripts.d.ts +1 -1
  3. package/dist/server/analytics/injectedScripts.js +1 -1
  4. package/dist/server/analytics/webAnalytics.d.ts +1 -1
  5. package/dist/server/analytics/webAnalytics.js +1 -1
  6. package/dist/server/auth/loginThrottleDurable.d.ts +3 -3
  7. package/dist/server/auth/loginThrottleDurable.js +3 -3
  8. package/dist/server/auth/passwordCost.js +1 -1
  9. package/dist/server/ctgrChunkDurable.d.ts +1 -1
  10. package/dist/server/ctgrChunkDurable.js +1 -1
  11. package/dist/server/d1/backup.d.ts +1 -1
  12. package/dist/server/d1/backup.js +1 -1
  13. package/dist/server/d1/http.d.ts +2 -2
  14. package/dist/server/d1/http.js +2 -2
  15. package/dist/server/d1/invocation.js +1 -1
  16. package/dist/server/d1/limits.d.ts +1 -1
  17. package/dist/server/d1/limits.js +1 -1
  18. package/dist/server/d1/pullD1.d.ts +4 -1
  19. package/dist/server/d1/pullD1.js +5 -2
  20. package/dist/server/d1/scheduling.d.ts +1 -1
  21. package/dist/server/d1/scheduling.js +1 -1
  22. package/dist/server/d1/types.d.ts +1 -1
  23. package/dist/server/d1/types.js +1 -1
  24. package/dist/server/d1/values.d.ts +1 -1
  25. package/dist/server/d1/values.js +1 -1
  26. package/dist/server/dropzone/index.d.ts +1 -0
  27. package/dist/server/dropzone/index.js +1 -0
  28. package/dist/server/dropzone/report.d.ts +188 -0
  29. package/dist/server/dropzone/report.js +430 -0
  30. package/dist/server/dropzone/scan.d.ts +22 -3
  31. package/dist/server/dropzone/scan.js +46 -1
  32. package/dist/server/engagement/index.d.ts +1 -1
  33. package/dist/server/engagement/index.js +1 -1
  34. package/dist/server/guard/argon2Binding.js +1 -1
  35. package/dist/server/guard/kdfWorkerEntry.js +2 -2
  36. package/dist/server/incidents/index.d.ts +1 -1
  37. package/dist/server/incidents/index.js +1 -1
  38. package/dist/server/incidents/store.d.ts +1 -1
  39. package/dist/server/incidents/store.js +1 -1
  40. package/dist/server/jobs/timeout.d.ts +1 -1
  41. package/dist/server/jobs/timeout.js +1 -1
  42. package/dist/server/master-lock/accountsPage.d.ts +1 -1
  43. package/dist/server/master-lock/accountsPage.js +2 -2
  44. package/dist/server/master-lock/guard.js +1 -1
  45. package/dist/server/master-lock/lockPage.d.ts +1 -1
  46. package/dist/server/master-lock/lockPage.js +2 -2
  47. package/dist/server/master-lock/masterLock.d.ts +2 -2
  48. package/dist/server/master-lock/masterLock.js +2 -2
  49. package/dist/server/metrics/normalizeRoute.js +1 -1
  50. package/dist/server/metrics/telemetrySink.d.ts +2 -2
  51. package/dist/server/metrics/telemetrySink.js +1 -1
  52. package/dist/server/middleware/zValidator.js +2 -2
  53. package/dist/server/notifications/hub.js +1 -1
  54. package/dist/server/requestLog/requestMetrics.d.ts +2 -2
  55. package/dist/server/requestLog/requestMetrics.js +2 -2
  56. package/dist/server/retention/archive.d.ts +1 -1
  57. package/dist/server/retention/archive.js +2 -2
  58. package/dist/server/satellite/config.js +2 -2
  59. package/dist/server/satellite/door.d.ts +1 -1
  60. package/dist/server/sharing/contract.d.ts +1 -1
  61. package/dist/server/storage/binaryStore.d.ts +1 -1
  62. package/dist/server/storage/binaryStore.js +3 -3
  63. package/dist/server/storage/derivatives.d.ts +2 -2
  64. package/dist/server/storage/derivatives.js +2 -2
  65. package/dist/server/storage/files/adapter.d.ts +2 -2
  66. package/dist/server/storage/files/adapter.js +10 -10
  67. package/dist/server/storage/files/catalogue.d.ts +1 -1
  68. package/dist/server/storage/files/catalogue.js +4 -4
  69. package/dist/server/storage/files/chunkedUpload.d.ts +2 -2
  70. package/dist/server/storage/files/chunkedUpload.js +1 -1
  71. package/dist/server/storage/files/fileRoutes.d.ts +1 -1
  72. package/dist/server/storage/files/fileRoutes.js +4 -4
  73. package/dist/server/storage/files/mimeByExt.js +1 -1
  74. package/dist/server/storage/files/stack.d.ts +2 -2
  75. package/dist/server/storage/files/types.d.ts +4 -4
  76. package/dist/server/storage/files/types.js +1 -1
  77. package/dist/server/storage/index.js +1 -1
  78. package/dist/server/storage/objectStoreMediaStore.js +1 -1
  79. package/dist/server/storage/transcodeJobs.js +5 -5
  80. package/dist/server/storage/types.d.ts +1 -1
  81. package/dist/server/storage/types.js +1 -1
  82. package/dist/server/storage/videoDerivativeKeys.d.ts +1 -1
  83. package/dist/server/storage/videoDerivativeKeys.js +1 -1
  84. package/dist/server/storage/videoProcessor.js +1 -1
  85. package/dist/server/sync/status.d.ts +1 -1
  86. package/dist/server/zipStream.d.ts +1 -1
  87. package/dist/server/zipStream.js +1 -1
  88. package/docs/activity.md +2 -2
  89. package/docs/retention.md +2 -2
  90. package/package.json +1 -1
  91. package/src/leafSubpathsImportNothing.spec.ts +1 -1
  92. package/src/namedSubpathsResolve.spec.ts +1 -1
  93. package/src/noTimerDialsAPeer.spec.ts +1 -1
  94. package/src/nodeBuiltinsAreProbedByCalling.spec.ts +1 -1
  95. package/src/publishShape.spec.ts +1 -1
  96. package/src/server/activity/store.ts +1 -1
  97. package/src/server/analytics/injectedScripts.spec.ts +1 -1
  98. package/src/server/analytics/injectedScripts.ts +1 -1
  99. package/src/server/analytics/webAnalytics.ts +1 -1
  100. package/src/server/auth/loginThrottleDurable.ts +3 -3
  101. package/src/server/auth/passwordCost.ts +1 -1
  102. package/src/server/bench/cpuBudget.spec.ts +1 -1
  103. package/src/server/bench/tail.spec.ts +1 -1
  104. package/src/server/ctgrChunkDurable.ts +1 -1
  105. package/src/server/d1/backup.spec.ts +1 -1
  106. package/src/server/d1/backup.ts +1 -1
  107. package/src/server/d1/http.ts +2 -2
  108. package/src/server/d1/invocation.spec.ts +1 -1
  109. package/src/server/d1/invocation.ts +1 -1
  110. package/src/server/d1/limits.ts +1 -1
  111. package/src/server/d1/pullD1.spec.ts +9 -1
  112. package/src/server/d1/pullD1.ts +5 -2
  113. package/src/server/d1/scheduling.ts +1 -1
  114. package/src/server/d1/types.ts +1 -1
  115. package/src/server/d1/values.ts +1 -1
  116. package/src/server/dropzone/index.ts +8 -0
  117. package/src/server/dropzone/report.spec.ts +275 -0
  118. package/src/server/dropzone/report.ts +568 -0
  119. package/src/server/dropzone/scan.spec.ts +2 -2
  120. package/src/server/dropzone/scan.ts +68 -5
  121. package/src/server/engagement/engagement.spec.ts +1 -1
  122. package/src/server/engagement/index.ts +1 -1
  123. package/src/server/google-oauth/googleOAuth.spec.ts +1 -1
  124. package/src/server/guard/argon2Binding.ts +1 -1
  125. package/src/server/guard/kdfWorkerEntry.ts +2 -2
  126. package/src/server/incidents/index.ts +1 -1
  127. package/src/server/incidents/store.ts +1 -1
  128. package/src/server/jobs/timeout.ts +1 -1
  129. package/src/server/master-lock/accountsPage.spec.ts +2 -2
  130. package/src/server/master-lock/accountsPage.ts +2 -2
  131. package/src/server/master-lock/beaconNeverReachesTheWall.spec.ts +2 -2
  132. package/src/server/master-lock/guard.spec.ts +2 -2
  133. package/src/server/master-lock/guard.ts +1 -1
  134. package/src/server/master-lock/lockPage.spec.ts +1 -1
  135. package/src/server/master-lock/lockPage.ts +2 -2
  136. package/src/server/master-lock/masterLock.spec.ts +1 -1
  137. package/src/server/master-lock/masterLock.ts +2 -2
  138. package/src/server/master-lock/sessions.spec.ts +1 -1
  139. package/src/server/metrics/normalizeRoute.ts +1 -1
  140. package/src/server/metrics/telemetrySink.ts +3 -3
  141. package/src/server/middleware/bodyLimit.spec.ts +1 -1
  142. package/src/server/middleware/zValidator.spec.ts +3 -3
  143. package/src/server/middleware/zValidator.ts +3 -3
  144. package/src/server/notifications/hub.ts +1 -1
  145. package/src/server/requestLog/requestMetrics.spec.ts +2 -2
  146. package/src/server/requestLog/requestMetrics.ts +3 -3
  147. package/src/server/retention/archive.spec.ts +2 -2
  148. package/src/server/retention/archive.ts +2 -2
  149. package/src/server/satellite/config.ts +2 -2
  150. package/src/server/satellite/door.ts +1 -1
  151. package/src/server/satellite/satellite.spec.ts +1 -1
  152. package/src/server/sharing/contract.ts +1 -1
  153. package/src/server/storage/binaryServerProcessing.spec.ts +1 -1
  154. package/src/server/storage/binaryServerProcessing.ts +4 -4
  155. package/src/server/storage/binaryStore.spec.ts +6 -6
  156. package/src/server/storage/binaryStore.ts +4 -4
  157. package/src/server/storage/chunked.integration.spec.ts +2 -2
  158. package/src/server/storage/derivatives.ts +2 -2
  159. package/src/server/storage/fileUploadClient.integration.spec.ts +1 -1
  160. package/src/server/storage/files/adapter.photo.spec.ts +2 -2
  161. package/src/server/storage/files/adapter.spec.ts +3 -3
  162. package/src/server/storage/files/adapter.ts +10 -10
  163. package/src/server/storage/files/catalogue.spec.ts +1 -1
  164. package/src/server/storage/files/catalogue.ts +4 -4
  165. package/src/server/storage/files/chunkedUpload.spec.ts +5 -5
  166. package/src/server/storage/files/chunkedUpload.ts +3 -3
  167. package/src/server/storage/files/fileRoutes.spec.ts +3 -3
  168. package/src/server/storage/files/fileRoutes.ts +5 -5
  169. package/src/server/storage/files/mimeByExt.ts +1 -1
  170. package/src/server/storage/files/stack.ts +3 -3
  171. package/src/server/storage/files/types.ts +6 -6
  172. package/src/server/storage/index.ts +1 -1
  173. package/src/server/storage/objectStoreMediaStore.ts +1 -1
  174. package/src/server/storage/sources.ts +1 -1
  175. package/src/server/storage/transcodeJobs.ts +5 -5
  176. package/src/server/storage/types.ts +2 -2
  177. package/src/server/storage/uploadSession.spec.ts +1 -1
  178. package/src/server/storage/videoDerivativeKeys.spec.ts +3 -3
  179. package/src/server/storage/videoDerivativeKeys.ts +1 -1
  180. package/src/server/storage/videoProcessor.ts +1 -1
  181. package/src/server/sync/status.ts +1 -1
  182. package/src/server/sync/timer.spec.ts +1 -1
  183. package/src/server/worker-argon2/index.spec.ts +1 -1
  184. package/src/server/zipStream.spec.ts +2 -2
  185. package/src/server/zipStream.ts +1 -1
  186. package/src/shippedFilesAreTracked.spec.ts +2 -2
@@ -2,12 +2,12 @@ import type { ImageDerivatives, VideoProcessor } from './files/catalogue.js';
2
2
  import { createTranscodeJobClient } from './transcodeJobs.js';
3
3
  import { fsHlsPrefix, fsMp4Key, fsPosterKey, fsSpriteKey, fsVttKey } from './types.js';
4
4
 
5
- // The cursedbelt file CATALOGUE's two derivative seams, bound to binary-server's transcode
5
+ // The cursedbelt file CATALOG's two derivative seams, bound to binary-server's transcode
6
6
  // API. The transport itself — submit, poll, and the two derivative shapes — lives in
7
- // `./transcodeJobs`, so an app that stores binaries WITHOUT a catalogue (apps/notes keys
7
+ // `./transcodeJobs`, so an app that stores binaries WITHOUT a catalog (apps/notes keys
8
8
  // attachments by sha256 through satellite-kit's binary-store) can reach the same pipeline
9
- // without adopting the catalogue or writing a second HTTP client. There is one derivative
10
- // pipeline in the fleet; this file is the catalogue-shaped door onto it.
9
+ // without adopting the catalog or writing a second HTTP client. There is one derivative
10
+ // pipeline in the fleet; this file is the catalog-shaped door onto it.
11
11
  //
12
12
  // Why remote at all: the bytes already live on the binary-server host, which has real CPU,
13
13
  // disk and ffmpeg. Pulling a multi-GB source down to the app host defeats the point, and the
@@ -18,7 +18,7 @@
18
18
  * the fork it replaces: the same risk, now with one blast radius instead of five.
19
19
  *
20
20
  * So the deliverable is the module AND its first real coverage. Everything below is an
21
- * assertion about a behaviour the file's own prose claims — the memo demotions, the
21
+ * assertion about a behavior the file's own prose claims — the memo demotions, the
22
22
  * 429-is-not-a-404 rule, the chunk fallback, the stable window, the two-barrier delete
23
23
  * — each one a documented incident that nothing could have caught a regression of.
24
24
  *
@@ -49,7 +49,7 @@ import * as binaryStoreModule from './binaryStore.js';
49
49
  import { binaryStoreFakeDefaults } from './binaryStoreFake.js';
50
50
 
51
51
  // Read off the namespace, not named imports, so the task-2505 specs run (and go red on the
52
- // BEHAVIOUR) against a build that predates these exports — which is what prove-red does.
52
+ // BEHAVIOR) against a build that predates these exports — which is what prove-red does.
53
53
  const { BINARY_PACED_MAX_WAIT_MS, BinaryStoreRateLimitedError } = binaryStoreModule;
54
54
 
55
55
  // One 2048-bit keypair for the whole file — generation is the slow part, and every
@@ -253,7 +253,7 @@ describe('put', () => {
253
253
  expect(calls.every((c) => c.url.includes('/upload-chunk/'))).toBe(true);
254
254
  expect(tokenOf(calls[0]!.url).payload.sid).toBeString();
255
255
 
256
- // …and `Infinity` restores the pre-2026-08-08 behaviour for a caller that has a
256
+ // …and `Infinity` restores the pre-2026-08-08 behavior for a caller that has a
257
257
  // measured reason to want one request.
258
258
  calls = [];
259
259
  const direct = makeStore({ autoChunkBytes: Number.POSITIVE_INFINITY });
@@ -371,7 +371,7 @@ describe('the negative memo', () => {
371
371
  expect(calls, 'a lapsed absence must re-ask').toHaveLength(2);
372
372
  });
373
373
 
374
- it('honours a shorter TTL when an app has a measured reason', async () => {
374
+ it('honors a shorter TTL when an app has a measured reason', async () => {
375
375
  const store = makeStore({ absenceTtlMs: 1_000 });
376
376
  reply = () => ok(null, { status: 404 });
377
377
  await store.get('art/missing');
@@ -621,7 +621,7 @@ describe('mediaUrl and the stable window', () => {
621
621
  expect(a.payload.iat % 3600 === 0 && a.payload.exp - a.payload.iat === 7200).toBe(false);
622
622
  });
623
623
 
624
- it('honours an explicit ttlSeconds', async () => {
624
+ it('honors an explicit ttlSeconds', async () => {
625
625
  const store = makeStore();
626
626
  const { payload } = tokenOf(await store.mediaUrl('art/z', { ttlSeconds: 15 }));
627
627
  expect(payload.exp - payload.iat).toBe(15);
@@ -739,7 +739,7 @@ describe('fetchMedia', () => {
739
739
  expect(calls[0]?.init?.headers).toBeUndefined();
740
740
  });
741
741
 
742
- it('honours HEAD and forwards an abort signal', async () => {
742
+ it('honors HEAD and forwards an abort signal', async () => {
743
743
  const store = makeStore();
744
744
  reply = () => ok(null);
745
745
  const controller = new AbortController();
@@ -28,7 +28,7 @@
28
28
  * binary-server.
29
29
  *
30
30
  * 🔴 It is published as the LEAF subpath `cursedbelt-server/binary-store`, never through
31
- * the `./storage` barrel — that barrel drags the file-catalogue and transcode graph, and
31
+ * the `./storage` barrel — that barrel drags the file-catalog and transcode graph, and
32
32
  * this module's whole promise is that an app pays nothing but `node:crypto` for it.
33
33
  * `src/leafSubpathsImportNothing.spec.ts` is what holds that promise.
34
34
  *
@@ -38,7 +38,7 @@
38
38
  * three forks of the fleet's binary-storage client looked like from the outside. The
39
39
  * divergence was measured before the move and was entirely in prose and in one stale
40
40
  * import specifier (`cursedbelt/server/storage`, the pre-split package name) — no
41
- * behavioural difference in any of the three, so nothing was dropped to land the union.
41
+ * behavioral difference in any of the three, so nothing was dropped to land the union.
42
42
  */
43
43
  import { createHash, createPrivateKey, createPublicKey, sign as cryptoSign, type KeyObject } from 'node:crypto';
44
44
  import type { FileTokenClaims } from './types.js';
@@ -263,7 +263,7 @@ export interface ReadOptions {
263
263
  * 🔴 Wait out binary-server's read ceiling instead of throwing it (task 2505).
264
264
  *
265
265
  * The store allows a tenant a burst of reads, then a steady rate, and answers 429 with the
266
- * `retry-after` it wants honoured (`apps/binary-server/src/rateLimit.ts`). A batch read —
266
+ * `retry-after` it wants honored (`apps/binary-server/src/rateLimit.ts`). A batch read —
267
267
  * roms filing a disc's 256 parts, a hash backfill, an import — met it at read ~204 and threw
268
268
  * the whole pass away. `paced` makes `get`/`meta`/`stat` sleep the named `retry-after` and ask
269
269
  * again, for at most {@link BINARY_PACED_MAX_WAIT_MS} in total (or `{ maxWaitMs }`).
@@ -906,7 +906,7 @@ export function createBinaryStore(cfg: BinaryStoreConfig): BinaryStore {
906
906
  known(key) {
907
907
  // Order matters: a lapsed absence is DROPPED by `knownAbsent`, so asking it
908
908
  // first keeps this accessor from reporting an expiry the next real read would
909
- // not honour. A positive memo has no expiry, so it needs no such care.
909
+ // not honor. A positive memo has no expiry, so it needs no such care.
910
910
  if (knownAbsent(key)) return 'absent';
911
911
  return present.has(key) ? 'present' : 'unknown';
912
912
  },
@@ -19,7 +19,7 @@ import type { MediaCtx } from './types.js';
19
19
 
20
20
  // End-to-end PROOF of the large-file (chunked) upload against a REAL binary-server: spawn bs with
21
21
  // a boot-registered app (our RS256 public key), then run the exact client flow — init → PUT each
22
- // chunk DIRECT to bs → bs assembles on the last chunk → complete registers the catalogue row over
22
+ // chunk DIRECT to bs → bs assembles on the last chunk → complete registers the catalog row over
23
23
  // the assembled bytes — and read the bytes back through the store. Skips cleanly when the local
24
24
  // binary-server checkout isn't present (CI / other machines).
25
25
  const BS_DIR = process.env.BINARY_SERVER_DIR ?? '';
@@ -174,7 +174,7 @@ describe.skipIf(!BS_PRESENT)('chunked upload → real binary-server (integration
174
174
  }
175
175
  expect(assembled).toBe(true); // bs assembled on the final chunk
176
176
 
177
- // Complete → the catalogue row exists over the already-assembled bytes (no re-upload).
177
+ // Complete → the catalog row exists over the already-assembled bytes (no re-upload).
178
178
  const rec = await svc.complete(init.sid, { size });
179
179
  expect(rec?.id).toBe(init.fileId);
180
180
  expect(rec?.name).toBe('big.bin');
@@ -5,7 +5,7 @@
5
5
  * owner's 2026-08-14 ruling — *"Make it in cb because many apps may move to cloudflare and share
6
6
  * the logic"*); what was still copied into `collections` and `family` as `src/kit/imageDerivatives.ts`
7
7
  * and `src/kit/videoDerivatives.ts` was the READING strategy built on them — the part with the
8
- * judgement in it. The video copy had already forked (three import lines and a doc comment, benign
8
+ * judgment in it. The video copy had already forked (three import lines and a doc comment, benign
9
9
  * by accident), and the HEIC rule below decides whether a photograph appears AT ALL, which may not
10
10
  * exist in two places.
11
11
  *
@@ -178,7 +178,7 @@ export const isUnviewableStill = (
178
178
  * ── 🔴 Why this is here, from the owner's report (2026-08-14) ────────────────────────
179
179
  * *"videos are not showing with thumbnails in the family app keepsakes"*, with a screenshot
180
180
  * of one album: eleven photographs with tiles and three videos — 129, 282 and 633 MB — drawn
181
- * as a grey play triangle.
181
+ * as a gray play triangle.
182
182
  *
183
183
  * Nothing was broken. binary-server's `runPoster` had always existed and was reachable only
184
184
  * from its `library` strategy, while `family` and `collections` both submit `faststart`,
@@ -60,7 +60,7 @@ describe('createFileUploadClient ⇄ mountFileRoutes', () => {
60
60
 
61
61
  let uploadedId = '';
62
62
 
63
- test('upload carries filename + tags through to the catalogue row', async () => {
63
+ test('upload carries filename + tags through to the catalog row', async () => {
64
64
  const res = await client.upload(new File(['hello'], 'notes.txt', { type: 'text/plain' }), {
65
65
  tags: ['a', 'b'],
66
66
  });
@@ -13,7 +13,7 @@ import type { FileUrls } from './fileRoutes.js';
13
13
  import { FILE_CATALOGUE_MIGRATIONS } from './migrations.js';
14
14
  import type { FileCatalogue } from './types.js';
15
15
 
16
- // The photo source is an image-filtered VIEW over the catalogue: primary bytes via the file
16
+ // The photo source is an image-filtered VIEW over the catalog: primary bytes via the file
17
17
  // route URL, grid thumb via the type-agnostic poster URL (only when the thumbnailer produced one).
18
18
 
19
19
  const CTX: MediaCtx = { userId: 'u1', tenantId: 't1' };
@@ -114,7 +114,7 @@ describe('createCataloguePhotoSource', () => {
114
114
  ).rejects.toThrow(/image/);
115
115
  });
116
116
 
117
- test('remove trashes (soft-deletes) through to the catalogue, not a hard delete', async () => {
117
+ test('remove trashes (soft-deletes) through to the catalog, not a hard delete', async () => {
118
118
  const rec = await cat.ingest(CTX, {
119
119
  name: 'gone.png',
120
120
  mime: 'image/png',
@@ -72,7 +72,7 @@ describe('createFileToPlayable', () => {
72
72
  });
73
73
  });
74
74
 
75
- describe('createCatalogueVideoSource (gallery = view over catalogue)', () => {
75
+ describe('createCatalogueVideoSource (gallery = view over catalog)', () => {
76
76
  let db: Database;
77
77
  let root: string;
78
78
  let cat: FileCatalogue;
@@ -105,10 +105,10 @@ describe('createCatalogueVideoSource (gallery = view over catalogue)', () => {
105
105
  urls: fakeUrls,
106
106
  });
107
107
  const page = await src.list(CTX, {});
108
- expect(page.items).toEqual([]); // catalogue has an image + a doc, zero videos
108
+ expect(page.items).toEqual([]); // catalog has an image + a doc, zero videos
109
109
  });
110
110
 
111
- test('tags() reflects the catalogue facets', async () => {
111
+ test('tags() reflects the catalog facets', async () => {
112
112
  const src = createCatalogueVideoSource({
113
113
  id: 'files',
114
114
  title: 'Files',
@@ -36,15 +36,15 @@ function createFileToPhoto(cfg: {
36
36
  }
37
37
 
38
38
  // ── FileCatalogue → media seam ────────────────────────────────────────────────────
39
- // The catalogue is the ONE source of truth for a user's binaries. The video gallery is not a
40
- // separate store — it is a video-filtered VIEW over the catalogue. These two adapters are the
39
+ // The catalog is the ONE source of truth for a user's binaries. The video gallery is not a
40
+ // separate store — it is a video-filtered VIEW over the catalog. These two adapters are the
41
41
  // seam: `createFileToPlayable` turns a video FileRecord into the player's PlayableVideo (URLs
42
42
  // baked server-side via the shared token/serve infra), and `createCatalogueVideoSource` exposes
43
- // the catalogue as a `MediaSource` so the existing `mountMediaRoutes` + gallery serve it
43
+ // the catalog as a `MediaSource` so the existing `mountMediaRoutes` + gallery serve it
44
44
  // unchanged. Because the serve routes address bytes by (owner, videoId) through the shared
45
- // keyspace, a catalogue video is served by the same routes regardless of `sourceId`.
45
+ // keyspace, a catalog video is served by the same routes regardless of `sourceId`.
46
46
 
47
- /** Resolve a video FileRecord to a PlayableVideo with tokenised URLs. Non-video ⇒ null. */
47
+ /** Resolve a video FileRecord to a PlayableVideo with tokenized URLs. Non-video ⇒ null. */
48
48
  export function createFileToPlayable(urls: MediaUrls, sourceId: string): FileToPlayable {
49
49
  return async (ctx, file) => {
50
50
  if (file.fileType !== 'video') return null;
@@ -117,7 +117,7 @@ export function createCatalogueVideoSource(cfg: {
117
117
  }
118
118
 
119
119
  // ── Photo view ────────────────────────────────────────────────────────────────────
120
- // The photo gallery is the image-filtered sibling of the video view: same catalogue, same
120
+ // The photo gallery is the image-filtered sibling of the video view: same catalog, same
121
121
  // token/serve infra. The primary image is served by the file byte route (fileUrls) and the grid
122
122
  // thumbnail by the type-agnostic poster route (mediaUrls) when the ingest thumbnailer produced
123
123
  // one — so a PhotoSource needs BOTH URL builders.
@@ -179,15 +179,15 @@ export function createCataloguePhotoSource(cfg: {
179
179
  }
180
180
 
181
181
  // ── Mixed media view ───────────────────────────────────────────────────────────────
182
- // A combined gallery lists BOTH photos and videos from the one catalogue. This adapter
182
+ // A combined gallery lists BOTH photos and videos from the one catalog. This adapter
183
183
  // reuses the same two mappers (`createFileToPlayable`, `createFileToPhoto`) so a mixed
184
184
  // item renders identically to its single-type sibling — it just tags each with
185
185
  // `mediaKind` for the UI to pick a tile/stage. It needs BOTH URL builders (video streams
186
- // + image bytes/poster). A `kind` filter maps to the catalogue's `type`; `all` lists
186
+ // + image bytes/poster). A `kind` filter maps to the catalog's `type`; `all` lists
187
187
  // untyped and keeps only image|video (dropping docs/audio the mixed gallery can't show).
188
188
 
189
189
  /** Expose a FileCatalogue as a `MediaGallerySource` — photos + videos in one feed.
190
- * Videos are tokenised under `videoSourceId` (must match the registered video source so
190
+ * Videos are tokenized under `videoSourceId` (must match the registered video source so
191
191
  * `mountMediaRoutes` serves their streams); photo posters/thumbnails under this source's `id`. */
192
192
  export function createCatalogueMediaSource(cfg: {
193
193
  id: string;
@@ -218,7 +218,7 @@ export function createCatalogueMediaSource(cfg: {
218
218
  title: cfg.title,
219
219
 
220
220
  async list(ctx, opts) {
221
- // `all` ⇒ no catalogue type filter, then drop non-image/video below.
221
+ // `all` ⇒ no catalog type filter, then drop non-image/video below.
222
222
  const type = opts.kind === 'image' ? 'image' : opts.kind === 'video' ? 'video' : undefined;
223
223
  const page = await cfg.catalogue.list(ctx, {
224
224
  type,
@@ -109,7 +109,7 @@ describe('FileCatalogue (SQLite)', () => {
109
109
 
110
110
  test('remove deletes an image’s binary AND its poster thumbnail from the store', async () => {
111
111
  const img = await ingest('orphan.png', 'image/png');
112
- const owner = CTX.tenantId; // catalogue's default ownerOf
112
+ const owner = CTX.tenantId; // catalog's default ownerOf
113
113
  // Simulate the thumbnail the async kickImageThumbnail pipeline writes.
114
114
  await store.put(fsPosterKey(owner, img.id), bytes('thumb'), 'image/jpeg');
115
115
  expect(await store.stat(fileBinaryKey(owner, img.id))).not.toBeNull();
@@ -64,7 +64,7 @@ export const fileBinaryKey = (owner: string, id: string) => `fs/${owner}/${id}`;
64
64
 
65
65
  /** Where a file's uploaded bytes must land for `registerUploaded` to find them: a video's raw
66
66
  * source (fed to the transcode), else the primary binary. The chunked-upload path targets this key
67
- * so an out-of-band upload lands exactly where the catalogue + serve routes expect it. */
67
+ * so an out-of-band upload lands exactly where the catalog + serve routes expect it. */
68
68
  export const catalogueUploadKey = (owner: string, id: string, mime: string): string =>
69
69
  mime.startsWith('video/') ? fsSourceKey(owner, id) : fileBinaryKey(owner, id);
70
70
 
@@ -423,7 +423,7 @@ export function createSqliteFileCatalogue(opts: SqliteFileCatalogueOptions): Fil
423
423
  updatedAt: row.updated_at,
424
424
  });
425
425
 
426
- // A background job can outlive this catalogue's Database — a host shutting down mid-transcode,
426
+ // A background job can outlive this catalog's Database — a host shutting down mid-transcode,
427
427
  // or a test teardown that closed the db after its settle timeout. The job's late progress/result
428
428
  // writes must not crash the process (the rows they'd update are gone with the closed db, and
429
429
  // recoverProcessing re-kicks anything left 'processing' on the next boot) — drop exactly the
@@ -748,7 +748,7 @@ export function createSqliteFileCatalogue(opts: SqliteFileCatalogueOptions): Fil
748
748
 
749
749
  async registerUploaded(ctx, upload) {
750
750
  // Bytes were uploaded out-of-band (a chunked upload direct to binary-server) and already sit
751
- // at the catalogue's key (fsSourceKey for video, fileBinaryKey otherwise). Just create the
751
+ // at the catalog's key (fsSourceKey for video, fileBinaryKey otherwise). Just create the
752
752
  // row + kick processing — no re-store. The caller owns having placed the bytes correctly.
753
753
  return finalizePublicRow(ownerOf(ctx), upload.id, upload, upload.size, now());
754
754
  },
@@ -895,7 +895,7 @@ export function createSqliteFileCatalogue(opts: SqliteFileCatalogueOptions): Fil
895
895
  }
896
896
 
897
897
  // Directory: recurse, tagging each file with its immediate containing folder name so the
898
- // origin structure survives as a (flat) tag facet rather than a tree the catalogue doesn't
898
+ // origin structure survives as a (flat) tag facet rather than a tree the catalog doesn't
899
899
  // model. The top-level directory itself is NOT used as a tag (it's just the import root).
900
900
  const walk = async (dir: string, isRoot: boolean): Promise<void> => {
901
901
  let entries: Dirent[];
@@ -71,7 +71,7 @@ describe('chunked upload', () => {
71
71
  // without this the minter has nothing to put in the token's `sz` claim, and binary-server's
72
72
  // only end-to-end check of the finished object against its source stays inert.
73
73
  expect(minted.map((m) => m.sz)).toEqual([20 * 1024 * 1024, 20 * 1024 * 1024, 20 * 1024 * 1024]);
74
- // The mint targets exactly the key the catalogue will look for on complete.
74
+ // The mint targets exactly the key the catalog will look for on complete.
75
75
  expect(init.key).toBe(catalogueUploadKey('u1', init.fileId, 'image/png'));
76
76
 
77
77
  // A durable pending 'upload' op keyed by the session id.
@@ -84,7 +84,7 @@ describe('chunked upload', () => {
84
84
 
85
85
  test('🔴 a size the caller could not state is OMITTED, never declared as zero', async () => {
86
86
  // `sz: 0` would compare zero to the assembled length and refuse every assemble — so an
87
- // unknown size degrades to exactly today's behaviour (no claim, recorded undeclared) rather
87
+ // unknown size degrades to exactly today's behavior (no claim, recorded undeclared) rather
88
88
  // than to a 422. `chunkCount` still clamps to one chunk, which is the old `req.size || 1`.
89
89
  const { svc, minted } = build();
90
90
  const init = await svc.init(CTX, { name: 'unknown.bin', mime: 'application/octet-stream', size: 0 });
@@ -92,7 +92,7 @@ describe('chunked upload', () => {
92
92
  expect(minted.map((m) => m.sz)).toEqual([undefined]);
93
93
  });
94
94
 
95
- test('complete registers the catalogue row over the assembled bytes + marks the op done', async () => {
95
+ test('complete registers the catalog row over the assembled bytes + marks the op done', async () => {
96
96
  const { catalogue, ledger, svc } = build();
97
97
  const init = await svc.init(CTX, {
98
98
  name: 'photo.png',
@@ -105,7 +105,7 @@ describe('chunked upload', () => {
105
105
  expect(rec?.id).toBe(init.fileId);
106
106
  expect(rec?.name).toBe('photo.png');
107
107
  expect(rec?.tags).toEqual(['big']);
108
- // Now discoverable through the normal catalogue (no re-upload happened).
108
+ // Now discoverable through the normal catalog (no re-upload happened).
109
109
  expect((await catalogue.get(CTX, init.fileId))?.name).toBe('photo.png');
110
110
  expect(ledger.get(init.sid)?.status).toBe('done');
111
111
  expect(svc.pending()).toBe(0);
@@ -114,7 +114,7 @@ describe('chunked upload', () => {
114
114
  expect(await svc.complete(init.sid)).toBeNull();
115
115
  });
116
116
 
117
- test('abort marks the op failed and drops the session (no catalogue row)', async () => {
117
+ test('abort marks the op failed and drops the session (no catalog row)', async () => {
118
118
  const { catalogue, ledger, svc } = build();
119
119
  const init = await svc.init(CTX, { name: 'x.png', mime: 'image/png', size: 1 });
120
120
  svc.abort(init.sid);
@@ -10,7 +10,7 @@ import type { FileCatalogue, FileRecord } from './types.js';
10
10
  // backend (binary-server), records a durable `upload` ledger op, and hands the URLs back. The
11
11
  // client PUTs each chunk to the backend, which assembles them at the target key once the last
12
12
  // arrives. Then the client (or a backend webhook) calls COMPLETE, and the app registers the
13
- // catalogue row over the already-stored bytes (no re-upload) + kicks processing.
13
+ // catalog row over the already-stored bytes (no re-upload) + kicks processing.
14
14
  //
15
15
  // This module is backend-AGNOSTIC: the app injects `mintChunkUpload` (the binary-server chunk URL
16
16
  // + signed sid/ci/tc token). On disk-only deploys, an app simply doesn't wire chunked uploads and
@@ -52,10 +52,10 @@ export interface ChunkedUploadService {
52
52
  ctx: MediaCtx,
53
53
  req: { name: string; mime: string; size: number; tags?: string[] },
54
54
  ): Promise<ChunkedInit>;
55
- /** Finish it: mark the op done and register the catalogue row over the assembled bytes. Returns
55
+ /** Finish it: mark the op done and register the catalog row over the assembled bytes. Returns
56
56
  * the new record, or null if the session is unknown (already completed / server restarted). */
57
57
  complete(sid: string, confirmed?: { size?: number }): Promise<FileRecord | null>;
58
- /** Give up on a session (client cancelled / a chunk failed) — mark the ledger op failed. */
58
+ /** Give up on a session (client canceled / a chunk failed) — mark the ledger op failed. */
59
59
  abort(sid: string): void;
60
60
  /** Open session count (observability / tests). */
61
61
  pending(): number;
@@ -145,12 +145,12 @@ describe('fileRoutes — GET list route (filters + sort passthrough)', () => {
145
145
 
146
146
  describe('fileRoutes — single-PUT upload cap (MAX_SINGLE_UPLOAD_BYTES → 413)', () => {
147
147
  // The law: no single request may carry more than the cap; larger files must chunk. The guard
148
- // fails fast on Content-Length. A fake catalogue captures whether ingest was even reached.
148
+ // fails fast on Content-Length. A fake catalog captures whether ingest was even reached.
149
149
  let ingested = 0;
150
150
  const fakeCatalogue = {
151
151
  async ingest(_ctx: MediaCtx, upload: { body: ReadableStream<Uint8Array> }) {
152
152
  // Drain the body so the guard's streaming byte-cap transform actually runs (a real
153
- // catalogue writes it to the store; here we just discard it). Over the cap, the transform
153
+ // catalog writes it to the store; here we just discard it). Over the cap, the transform
154
154
  // errors the stream and this read rejects.
155
155
  const reader = upload.body.getReader();
156
156
  let done = false;
@@ -194,7 +194,7 @@ describe('fileRoutes — single-PUT upload cap (MAX_SINGLE_UPLOAD_BYTES → 413)
194
194
  const res = await putWithLength(MAX_SINGLE_UPLOAD_BYTES + 1);
195
195
  expect(res.status).toBe(413);
196
196
  expect(((await res.json()) as { error: string }).error).toBe(SINGLE_UPLOAD_TOO_LARGE);
197
- expect(ingested).toBe(0); // fail-fast: never touched the catalogue
197
+ expect(ingested).toBe(0); // fail-fast: never touched the catalog
198
198
  });
199
199
 
200
200
  test('Content-Length at the cap → allowed', async () => {
@@ -14,7 +14,7 @@ import { FILE_SORTS, type FileCatalogue, type ListFilesOptions } from './types.j
14
14
  // can't send a Bearer). Uploads DO carry the app Bearer, so the PUT routes are session-guarded.
15
15
  //
16
16
  // `sourceId` for a file token is the constant 'files'. The served Content-Type is carried as a
17
- // signed-URL query (`?ct=`) — the catalogue knows each file's mime when it builds the URL, so the
17
+ // signed-URL query (`?ct=`) — the catalog knows each file's mime when it builds the URL, so the
18
18
  // route needn't re-derive it. It only ever serves the token owner's own bytes.
19
19
 
20
20
  const FILE_SOURCE_ID = 'files';
@@ -42,7 +42,7 @@ const isUploadTooLarge = (e: unknown): boolean =>
42
42
  * Content-Length header (browsers set it for a File/Blob body), and — for length-less chunked
43
43
  * transfer — wraps the stream to abort once the accumulated bytes pass the cap (the wrapping error
44
44
  * surfaces from `catalogue.ingest`, which the handlers turn into a 413). Returns either the body to
45
- * hand to the catalogue, or a 413 Response to return immediately.
45
+ * hand to the catalog, or a 413 Response to return immediately.
46
46
  */
47
47
  function guardSingleUpload(
48
48
  c: Context,
@@ -99,7 +99,7 @@ export type MountFileRoutesOptions = {
99
99
  basePath?: string;
100
100
  /** Session auth for the upload PUTs (a fetch CAN send the Bearer). Return a ctx or null. */
101
101
  authorizeUpload?: (c: Context) => Promise<MediaCtx | null> | MediaCtx | null;
102
- /** The catalogue uploads land in. Required for the upload routes to be mounted. */
102
+ /** The catalog uploads land in. Required for the upload routes to be mounted. */
103
103
  catalogue?: FileCatalogue;
104
104
  /** Wire large-file chunked uploads (direct-to-backend). Omit ⇒ init/complete routes are absent
105
105
  * and clients use the streamed `PUT /upload`. Uses the same `authorizeUpload` guard. */
@@ -221,12 +221,12 @@ export function mountFileRoutes(app: Hono, opts: MountFileRoutesOptions): void {
221
221
  }
222
222
 
223
223
  // ── Listing + collection routes ───────────────────────────────────────────────
224
- // All require authorizeUpload (session auth) and a catalogue. They follow the same
224
+ // All require authorizeUpload (session auth) and a catalog. They follow the same
225
225
  // auth/ctx/envelope pattern as the upload routes above. The `includeUnlockable` gate is the
226
226
  // caller's responsibility — the route passes the query param through, and it's the app's session
227
227
  // middleware that decides whether the caller has unlocked.
228
228
  if (opts.authorizeUpload && catalogue) {
229
- // GET /_files/list → cursor-paginated catalogue listing. Query params mirror
229
+ // GET /_files/list → cursor-paginated catalog listing. Query params mirror
230
230
  // ListFilesOptions: type, tag, query (q), collectionId, favorite, includeUnlockable,
231
231
  // sort (recent|oldest|name|size|random|lastViewed), cursor, limit.
232
232
  app.get(`${base}/list`, async (c) => {
@@ -1,6 +1,6 @@
1
1
  import { mimeForFilename } from 'cwip/string';
2
2
 
3
- // Ext → mime for local-disk import (catalogue.importFromPath) — the catalogue needs SOME mime
3
+ // Ext → mime for local-disk import (catalogue.importFromPath) — the catalog needs SOME mime
4
4
  // to classify + serve a file that never passed through a browser's upload Content-Type.
5
5
  //
6
6
  // The table itself moved DOWN to `cwip/string`'s `fileKind` (2026-07-31): the viewer UI and the
@@ -23,13 +23,13 @@ import type { FileCatalogue } from './types.js';
23
23
 
24
24
  // ── Files stack — the host recipe ───────────────────────────────────────────────
25
25
  // One call that assembles the whole files/media server stack a host would otherwise hand-wire:
26
- // migrations + SQLite catalogue over a MediaStore, the stream-token service, the media/file URL
26
+ // migrations + SQLite catalog over a MediaStore, the stream-token service, the media/file URL
27
27
  // builders, the catalogue-as-video-source registered in a SourceRegistry, and a `mount()` that
28
28
  // wires every byte/upload route onto a Hono app. The auth seam (session → MediaCtx) stays
29
29
  // host-injected — the stack owns no auth.
30
30
 
31
31
  export interface FilesStackOptions {
32
- /** The catalogue database. The stack runs FILE_CATALOGUE_MIGRATIONS on it itself. */
32
+ /** The catalog database. The stack runs FILE_CATALOGUE_MIGRATIONS on it itself. */
33
33
  db: Database;
34
34
  /** Byte backend (disk / binary-server / s3) — the swappable piece. */
35
35
  store: MediaStore;
@@ -83,7 +83,7 @@ export interface FilesStackOptions {
83
83
  backfillPosters?: boolean;
84
84
  /** Wire LARGE-file chunked uploads (direct-to-backend). Give the backend-specific per-chunk URL
85
85
  * minter (for binary-server: a signed `${base}/upload-chunk/${app}/${key}?token=`) and the stack
86
- * builds the ChunkedUploadService over its own catalogue + a storage-ops ledger on `db`, then
86
+ * builds the ChunkedUploadService over its own catalog + a storage-ops ledger on `db`, then
87
87
  * mount() auto-wires the /upload-init, /upload-complete, /upload-abort routes. Omit ⇒ chunked is
88
88
  * off and clients fall back to the streamed single PUT (disk-only deploys). */
89
89
  chunkedUpload?: {
@@ -2,8 +2,8 @@ import type { PlayableVideo, ProcessingStatus } from 'cursedbelt-core/media';
2
2
  import type { MediaCtx } from '../types.js';
3
3
 
4
4
  // ── FileCatalogue: a tagged flat file system over the storage layer ──────────────
5
- // A production-shaped, SQLite-backed catalogue of a user's binaries (images, video, audio,
6
- // docs, code). Generalises the video-only gallery source into ONE source of truth: the gallery
5
+ // A production-shaped, SQLite-backed catalog of a user's binaries (images, video, audio,
6
+ // docs, code). Generalizes the video-only gallery source into ONE source of truth: the gallery
7
7
  // becomes a video-filtered view over it. Improves on ca's fs_nodes: FLAT (no folder tree), the
8
8
  // smart-view `fileType` is STORED at write (not re-derived per request), tags are a JOIN table
9
9
  // (indexed facets, not a JSON scan), listing is CURSOR-paginated, and processing state is typed
@@ -61,7 +61,7 @@ export type TagFacet = { tag: string; count: number };
61
61
  /** A page of results with an opaque cursor for the next page (cursor-keyed, not OFFSET). */
62
62
  export type FilePage = { items: FileRecord[]; nextCursor?: string };
63
63
 
64
- /** Every listing order the catalogue understands — the single source of truth the route layer
64
+ /** Every listing order the catalog understands — the single source of truth the route layer
65
65
  * validates against and the `FileSort` union derives from. `recent` = newest first (default);
66
66
  * `oldest` = oldest first; `name` = A→Z; `size` = largest first; `random` = a seeded shuffle
67
67
  * (the seed is minted per session and folded into the cursor, so a visit reshuffles but its own
@@ -108,7 +108,7 @@ export function classifyFileType(mime: string, isText = false): FileType {
108
108
  return 'other';
109
109
  }
110
110
 
111
- /** The catalogue contract. A SQLite implementation is the production default; the interface lets
111
+ /** The catalog contract. A SQLite implementation is the production default; the interface lets
112
112
  * an app swap it. All calls are owner-scoped via {@link MediaCtx} (one tenant never sees another). */
113
113
  /** Cheap owner-scoped aggregates (COUNT/SUM over the files table) — the admin
114
114
  * surface's "site stats" source. */
@@ -138,7 +138,7 @@ export interface FileCatalogue {
138
138
  },
139
139
  ): Promise<FileRecord>;
140
140
  /** Register bytes uploaded OUT OF BAND (a chunked upload sent direct to the backend) — insert the
141
- * row + kick processing WITHOUT re-storing bytes (they already sit at the catalogue's key for this
141
+ * row + kick processing WITHOUT re-storing bytes (they already sit at the catalog's key for this
142
142
  * id: fsSourceKey for video, fileBinaryKey otherwise). */
143
143
  registerUploaded(
144
144
  ctx: MediaCtx,
@@ -172,7 +172,7 @@ export interface FileCatalogue {
172
172
  restore(ctx: MediaCtx, id: string): Promise<void>;
173
173
  /** Ingest file(s) from a LOCAL path already on this host's disk (a directory imports every
174
174
  * regular file inside it, recursively; a file imports just itself). Each imported file is
175
- * tagged with its immediate containing folder name (the catalogue is flat — folder structure
175
+ * tagged with its immediate containing folder name (the catalog is flat — folder structure
176
176
  * survives as a tag, not a tree) plus any `tags` passed. Unreadable/unsupported entries are
177
177
  * skipped, not thrown — the return value reports both. */
178
178
  importFromPath(
@@ -23,7 +23,7 @@ export {
23
23
  createBinaryServerProcessing,
24
24
  } from './binaryServerProcessing.js';
25
25
  // The transcode API as a plain job client, for apps whose binaries do NOT live in the file
26
- // catalogue (apps/notes keys attachments by sha256). One derivative pipeline, two doors.
26
+ // catalog (apps/notes keys attachments by sha256). One derivative pipeline, two doors.
27
27
  export {
28
28
  createTranscodeJobClient,
29
29
  type TranscodeJobClient,
@@ -7,7 +7,7 @@
7
7
  // fork the whole transcode orchestrator onto a second store type, the asset
8
8
  // `transcode` handler wraps its `ObjectStore` in this adapter and reuses the
9
9
  // pipeline unchanged. There is deliberately NO `localPath`, so `processVideo`
10
- // materialises the source by download — correct for a stream store where the
10
+ // materializes the source by download — correct for a stream store where the
11
11
  // bytes may live off-box (S3/R2).
12
12
 
13
13
  import type { ObjectStore } from 'cwip/storage';
@@ -85,7 +85,7 @@ export class SourceRegistry {
85
85
 
86
86
  // ── Disk-backed source ──────────────────────────────────────────────────────────
87
87
  // A MediaSource over a MediaStore: ingests uploads, runs the pipeline in the background, and
88
- // resolves videos to tokenised PlayableVideos. Metadata is held in memory keyed by tenant (an
88
+ // resolves videos to tokenized PlayableVideos. Metadata is held in memory keyed by tenant (an
89
89
  // app that needs persistence swaps this for a DB-backed MediaSource — cursedbelt-server/sqlite
90
90
  // — without touching consumers).
91
91
  type VideoMeta = {
@@ -3,12 +3,12 @@
3
3
  //
4
4
  // It was already here, inlined inside `createBinaryServerProcessing`, but only reachable
5
5
  // through that module's two seams (`VideoProcessor` / `ImageDerivatives`), which are shaped
6
- // for the cursedbelt file CATALOGUE: they take a `MediaStore`, a `workDir`, an owner and a
7
- // catalogue id. An app that stores binaries some other way — apps/notes keys attachments by
8
- // sha256 through satellite-kit's binary-store and has no catalogue at all — could not reach
9
- // the pipeline without either adopting the catalogue or writing a second HTTP client.
6
+ // for the cursedbelt file CATALOG: they take a `MediaStore`, a `workDir`, an owner and a
7
+ // catalog id. An app that stores binaries some other way — apps/notes keys attachments by
8
+ // sha256 through satellite-kit's binary-store and has no catalog at all — could not reach
9
+ // the pipeline without either adopting the catalog or writing a second HTTP client.
10
10
  //
11
- // So the transport lives here and the catalogue seams are built on top of it. There is ONE
11
+ // So the transport lives here and the catalog seams are built on top of it. There is ONE
12
12
  // derivative pipeline in the fleet, and this is its entry point.
13
13
  //
14
14
  // ── Why binary-server rather than deriving locally ──────────────────────────────────────
@@ -11,7 +11,7 @@
11
11
  // no packages resolvable at all and fails if it throws, so an `import` here that survives
12
12
  // transpilation (anything that is not `import type`) turns that spec red rather than turning
13
13
  // up in a consumer's install. The subpath exists because `./server/storage`'s own index is a
14
- // barrel: it reaches `streamToken` → `auth/jwt` → jose, the whole SQLite file catalogue under
14
+ // barrel: it reaches `streamToken` → `auth/jwt` → jose, the whole SQLite file catalog under
15
15
  // `files/`, and a lazily-imported `sharp` — while an app that wants only the SHAPE of a file
16
16
  // token (apps/collections wanted exactly `FileTokenClaims`, a type TypeScript erases) was made
17
17
  // to install a one-time-password library to get it. Add types here freely; add a value import
@@ -203,7 +203,7 @@ export interface PhotoSource {
203
203
  }
204
204
 
205
205
  /** A source of MIXED media (photos + videos) for a combined gallery — the union of
206
- * {@link MediaSource} and {@link PhotoSource} over ONE catalogue. `list`/`resolve`
206
+ * {@link MediaSource} and {@link PhotoSource} over ONE catalog. `list`/`resolve`
207
207
  * yield `GalleryMedia` (a `mediaKind`-tagged photo|video), and a `kind` filter narrows
208
208
  * to just photos or just videos. Same cursor/tag/sort listing contract as its siblings. */
209
209
  export interface MediaGallerySource {
@@ -3,7 +3,7 @@
3
3
  * one key's worth of write access for a bounded time.
4
4
  *
5
5
  * Each case below is a claim binary-server ENFORCES, so a mint that got it wrong would not be
6
- * caught downstream — it would be honoured: a token for the wrong key writes the wrong key, a
6
+ * caught downstream — it would be honored: a token for the wrong key writes the wrong key, a
7
7
  * token with no expiry writes for ever, and a token with no `sz` stores a short object `active`.
8
8
  */
9
9
  import { describe, expect, it } from 'bun:test';