kopje 0.0.0 → 0.1.0-rc.10

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 (149) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/LICENSE +13 -0
  3. package/README.md +35 -4
  4. package/cli/kopje-admin.js +13 -0
  5. package/cli/legacy-migrations/0000_initial.sql +184 -0
  6. package/cli/legacy-migrations/0001_add-unique-following.sql +3 -0
  7. package/cli/legacy-migrations/0002_add-target-outbox_objects.sql +4 -0
  8. package/cli/legacy-migrations/0003_add_peers.sql +5 -0
  9. package/cli/legacy-migrations/0004_add_outbox_objects_indices.sql +4 -0
  10. package/cli/legacy-migrations/0005_add_idempotency_keys.sql +9 -0
  11. package/cli/legacy-migrations/0006_add_note_hashtags.sql +9 -0
  12. package/cli/legacy-migrations/0007_change_subscriptions_id.sql +29 -0
  13. package/cli/legacy-migrations/0008_add_server-settings.sql +11 -0
  14. package/cli/legacy-migrations/0009_add_admin.sql +10 -0
  15. package/cli/legacy-migrations/0010_add_ui_client.sql +4 -0
  16. package/cli/legacy-migrations/0011_add_actor_preference.sql +13 -0
  17. package/cli/legacy-migrations/0012_add_mastodon_id.sql +1 -0
  18. package/cli/legacy-migrations/0013_add_id_sequences.sql +4 -0
  19. package/cli/legacy-migrations/0014_add_client_credentials.sql +9 -0
  20. package/cli/legacy-migrations/0015_add_actor_activities.sql +9 -0
  21. package/cli/legacy-migrations/0016_change_outbox_objects.sql +22 -0
  22. package/cli/legacy-migrations/0017_change_actor_reblogs.sql +42 -0
  23. package/cli/legacy-migrations/0018_swap_actor_reblogs.sql +2 -0
  24. package/cli/legacy-migrations/0019_add_users.sql +26 -0
  25. package/cli/legacy-migrations/0020_change_actors.sql +53 -0
  26. package/cli/legacy-migrations/0021_update_objects.sql +179 -0
  27. package/cli/legacy-migrations/0022_index_objects.sql +5 -0
  28. package/cli/legacy-migrations/0023_add_object_revisions.sql +11 -0
  29. package/cli/legacy-migrations/0024_add_actor_columns.sql +23 -0
  30. package/cli/legacy-migrations/0025_add_object_columns.sql +22 -0
  31. package/cli/legacy-migrations/0026_extend_following_users_notifications.sql +21 -0
  32. package/cli/legacy-migrations/0027_add_retention_columns.sql +14 -0
  33. package/cli/legacy-migrations/0028_backfill_retention_columns.sql +24 -0
  34. package/cli/legacy-migrations/0029_backfill_interaction_count.sql +32 -0
  35. package/cli/legacy-migrations/0030_create_account_relationship_tables.sql +66 -0
  36. package/cli/legacy-migrations/0031_create_interaction_media_tables.sql +46 -0
  37. package/cli/legacy-migrations/0032_create_tag_mention_list_tables.sql +79 -0
  38. package/cli/legacy-migrations/0033_create_remaining_tables.sql +162 -0
  39. package/cli/legacy-migrations/0034_add_unique_actor_favourites.sql +8 -0
  40. package/cli/legacy-migrations/0035_add_missing_indexes.sql +7 -0
  41. package/cli/legacy-migrations/0036_backfill_in_reply_to_id.sql +67 -0
  42. package/cli/legacy-migrations/0037_backfill_reblogs_count_and_add_in_reply_to_id_index.sql +4 -0
  43. package/cli/legacy-migrations/0038_add_actor_replies_unique_index.sql +37 -0
  44. package/cli/legacy-migrations/0039_add_relationship_visibility_indexes.sql +2 -0
  45. package/cli/lib/client.js +156 -0
  46. package/cli/lib/commands.js +556 -0
  47. package/cli/lib/cutover/convert.js +1798 -0
  48. package/cli/lib/cutover/dump-parse.js +219 -0
  49. package/cli/lib/cutover/export-files.js +38 -0
  50. package/cli/lib/cutover/fingerprint.js +298 -0
  51. package/cli/lib/cutover/image-size.js +105 -0
  52. package/cli/lib/cutover/images-export.js +524 -0
  53. package/cli/lib/cutover/kek.js +79 -0
  54. package/cli/lib/cutover/kopje-db.js +341 -0
  55. package/cli/lib/cutover/kopje-runtime.js +44 -0
  56. package/cli/lib/cutover/legacy-load.js +652 -0
  57. package/cli/lib/cutover/maintenance.js +284 -0
  58. package/cli/lib/cutover/preflight.js +252 -0
  59. package/cli/lib/cutover/run.js +387 -0
  60. package/cli/lib/cutover/sql-script.js +633 -0
  61. package/cli/lib/cutover/upload-rules.js +23 -0
  62. package/cli/lib/cutover/verify-actual.js +496 -0
  63. package/cli/lib/cutover/verify-expect.js +992 -0
  64. package/cli/lib/cutover/worker-file.js +39 -0
  65. package/cli/lib/format.js +175 -0
  66. package/cli/lib/main.js +1040 -0
  67. package/cli/lib/node-io.js +98 -0
  68. package/cli/lib/write-all.js +16 -0
  69. package/dist/0493fbdddf5ec1e3e7a564066dd8a537871a0b17-0019_tag_normalization.sql +287 -0
  70. package/dist/04ed1b7bc3e323c41ed047f3d42aa21a9cee679b-0006_account_deletion.sql +25 -0
  71. package/dist/11771467d3871fe8e4b007e49de329960ad5756d-0021_directory.sql +64 -0
  72. package/dist/120c47969d6ff8824a24e4f63762cae293877044-0001_blocks_and_mutes.sql +24 -0
  73. package/dist/126ae75c059207ac2ee37e0c1ce406acabf3c81e-0028_streaming_home.sql +55 -0
  74. package/dist/18c5cb49295830a61af7afbb9d109ceea10131bf-0017_notification_groups.sql +15 -0
  75. package/dist/266f6387caad37ff08189aefb25bc541e46f371b-0025_remote_collections.sql +96 -0
  76. package/dist/36ab70640c94ae2bb6779527dd6513f01ef63eb4-0005_hide_collections.sql +7 -0
  77. package/dist/47bde524113b34255f9c6acfa221058260495161-0003_domain_block_form.sql +37 -0
  78. package/dist/4c661b0d6b843f90a26f7ce54c1ae17715da6371-0026_streaming.sql +54 -0
  79. package/dist/50cbde8d90acaec919f08471214247db7fcb0ae5-0023_notification_clears.sql +28 -0
  80. package/dist/611c9f51f4ade0ff6dfca74cbcc0357c34b4b2a9-0014_account_notes_and_pins.sql +43 -0
  81. package/dist/7c9e411b4a01216e1c5ebad05d81cfaa0e2b5140-0009_conversations.sql +132 -0
  82. package/dist/7d03b7000b6f95b66d149a5b18e46e0885e3fae2-0022_reports.sql +32 -0
  83. package/dist/80b2b4d2147e64225c55d15882872a246d6a048f-0002_web_push.sql +28 -0
  84. package/dist/8725aabf6c17bd5a7f7275aca74cc9103bb271a6-0008_status_mentions_requires_mention.sql +23 -0
  85. package/dist/95fd75214dcf7ad5d04a04a65b029956f4df532a-0004_status_tags_public.sql +16 -0
  86. package/dist/9f11638399066975aa2743da2f1469cffd95bf41-0018_status_pins_and_conversation_mutes.sql +32 -0
  87. package/dist/THIRD_PARTY_NOTICES.md +2605 -0
  88. package/dist/aeea693fcbc4419422cc1481c0f58bb51966b3fb-0000_initial.sql +562 -0
  89. package/dist/afa1fae5fee4e9854101ef25dcc26b4d7f8152c5-0011_scheduled_statuses.sql +50 -0
  90. package/dist/b00831763145b268e3b629b07986e458bfe054fd-0020_notification_policies.sql +88 -0
  91. package/dist/bb7212ac38b9fb5efb137bc019f154678e10d784-0030_admin_accounts.sql +15 -0
  92. package/dist/beb8e6e40ac5942c2b5ba2e1557a4f7db68aaa05-0015_media_shown.sql +48 -0
  93. package/dist/c86fac272fbcb0850aba8f1f6c3e042a91bc2c4f-0010_markers.sql +15 -0
  94. package/dist/ce6b90353d8cd83253c91698e640c657d5aa844c-0007_list_members.sql +25 -0
  95. package/dist/ceb1821b1fd425c1e818320f61d2c45543fabee9-0029_admin_reports.sql +56 -0
  96. package/dist/d081da63819f3cb23b62abe3b64063f456c8cca2-0013_polls.sql +70 -0
  97. package/dist/e3ae5ea92edb703bea45645919daef8dbc9579a9-0031_admin_accounts_available.sql +15 -0
  98. package/dist/f44f620c2f33afebb3a2243e65ab777663b8c902-0012_filters.sql +45 -0
  99. package/dist/fbee73f95a7c4b3da4a13e6d46ceaa0878416c77-0016_tags.sql +45 -0
  100. package/dist/fd1d479b4282d0d8d30386a1f77042281e9013b2-0024_attribution_domains.sql +11 -0
  101. package/dist/maintenance-render.js +1149 -0
  102. package/dist/maintenance-worker.js +1 -0
  103. package/dist/worker.js +1390 -0
  104. package/dist/worker.js.map +8 -0
  105. package/docs/backup.md +347 -0
  106. package/docs/cutover-runbook.md +710 -0
  107. package/docs/cutover.md +356 -0
  108. package/docs/dump-format.md +307 -0
  109. package/docs/setup.md +220 -0
  110. package/docs/upgrade.md +115 -0
  111. package/migrations/0000_initial.sql +562 -0
  112. package/migrations/0001_blocks_and_mutes.sql +24 -0
  113. package/migrations/0002_web_push.sql +28 -0
  114. package/migrations/0003_domain_block_form.sql +37 -0
  115. package/migrations/0004_status_tags_public.sql +16 -0
  116. package/migrations/0005_hide_collections.sql +7 -0
  117. package/migrations/0006_account_deletion.sql +25 -0
  118. package/migrations/0007_list_members.sql +25 -0
  119. package/migrations/0008_status_mentions_requires_mention.sql +23 -0
  120. package/migrations/0009_conversations.sql +132 -0
  121. package/migrations/0010_markers.sql +15 -0
  122. package/migrations/0011_scheduled_statuses.sql +50 -0
  123. package/migrations/0012_filters.sql +45 -0
  124. package/migrations/0013_polls.sql +70 -0
  125. package/migrations/0014_account_notes_and_pins.sql +43 -0
  126. package/migrations/0015_media_shown.sql +48 -0
  127. package/migrations/0016_tags.sql +45 -0
  128. package/migrations/0017_notification_groups.sql +15 -0
  129. package/migrations/0018_status_pins_and_conversation_mutes.sql +32 -0
  130. package/migrations/0019_tag_normalization.sql +287 -0
  131. package/migrations/0020_notification_policies.sql +88 -0
  132. package/migrations/0021_directory.sql +64 -0
  133. package/migrations/0022_reports.sql +32 -0
  134. package/migrations/0023_notification_clears.sql +28 -0
  135. package/migrations/0024_attribution_domains.sql +11 -0
  136. package/migrations/0025_remote_collections.sql +96 -0
  137. package/migrations/0026_streaming.sql +54 -0
  138. package/migrations/0028_streaming_home.sql +55 -0
  139. package/migrations/0029_admin_reports.sql +56 -0
  140. package/migrations/0030_admin_accounts.sql +15 -0
  141. package/migrations/0031_admin_accounts_available.sql +15 -0
  142. package/package.json +91 -6
  143. package/public/_headers +3 -0
  144. package/public/assets/avatar.png +0 -0
  145. package/public/assets/embed-status.js +28 -0
  146. package/public/assets/embed.js +81 -0
  147. package/public/assets/header.png +0 -0
  148. package/public/assets/kopje.css +337 -0
  149. package/types/index.d.ts +17 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,929 @@
1
+ # Changelog
2
+
3
+ All notable changes to the `kopje` package. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
4
+ and versions follow [semver](https://semver.org). Before 1.0, a minor version may make breaking changes.
5
+
6
+ Each version says whether it changes the Store's schema (adds migrations) and whether an instance must change its
7
+ `wrangler.jsonc` (a binding, a compatibility date or flag). See [docs/upgrade.md](docs/upgrade.md).
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [0.1.0-rc.10] - 2026-10-16
12
+
13
+ A tenth release candidate of the first release, published under the npm dist-tag `next`.
14
+
15
+ ### Added
16
+
17
+ - The streaming API's `user` stream (`read` or `read:statuses`) carries the home timeline, as Mastodon 4.5's does:
18
+ `update` when a status or boost enters it (the account's own included), `status.update` when a status in it is
19
+ edited, and `delete` (the id) when a status or boost the account could see is deleted or unboosted. Each status is the
20
+ one `GET /api/v1/timelines/home` would show at its place, presented as REST presents it to the account.
21
+ - An edit of a post that mentions the account (one whose mention notification its list shows) is also sent as
22
+ `status.update` on `user` when the token has `read` or `read:notifications`, and on `user:notification`, as
23
+ Mastodon sends edits to the accounts a post mentioned.
24
+ - As Mastodon, a post published more than 6 hours before it arrived (a remote post fetched late) is not sent as
25
+ `update`.
26
+ - `public*`, `hashtag*`, `list` and `direct` still answer `{"error":"Unknown stream type","status":400}`.
27
+ - Where Kopje differs from Mastodon: at most 40 boosts of a deleted status are deleted on each account's stream,
28
+ those by the account and by accounts it follows; nothing is sent when an account is purged; and a post of a
29
+ followed hashtag is sent even when a page of home read from the top would leave it out behind 40 or more newer
30
+ posts the account's home hides (`max_id` paging shows it at its place).
31
+ - The Mastodon admin API's 63 routes (`/api/v1/admin/*` and `GET /api/v2/admin/accounts`) are routed, each with its
32
+ admin scope and an optional token, as Mastodon's. None is served yet: each answers as Mastodon answers a caller whose
33
+ role lacks the route's permission.
34
+ - `GET /api/v1/admin/trends/tags`, `/links` and `/statuses` answer `[]`, as the public trends do.
35
+ - `GET`, `PUT`, `PATCH` and `DELETE` of one domain block, domain allow, IP block, email domain block or canonical
36
+ email block answer 404 `Record not found`: Kopje stores none.
37
+ - Every other route answers 403 `This action is not allowed`, to everyone, the admin included.
38
+ - A token sent must be valid, or the answer is 401. It must cover the route's scope, or the answer is 403
39
+ `This action is outside the authorized scopes`. An app token is let through, as by Mastodon.
40
+ - The admin these routes will serve is the one local account whose email equals `admin_email`, compared trimmed
41
+ and lowercased. There is none when `admin_email` is unset or empty, when no local account matches, when the match
42
+ is suspended, or when two accounts match; nothing is picked then. The match is read in each request, so existing
43
+ tokens follow a change of `admin_email` at once. `/setup` after bootstrap uses the same match.
44
+ - `GET /admin/health` (Access only) shows `oauthAdmin`: `status` (`ok`, `unset`, `none`, `suspended` or
45
+ `ambiguous`) and the matched `username`.
46
+ - The admin API's reports are served to that admin (the role's `manage_reports`), as Mastodon 4.5 serves them:
47
+ `GET /api/v1/admin/reports` and `GET`, `PUT` and `PATCH /api/v1/admin/reports/:id`, and `POST .../assign_to_self`,
48
+ `unassign`, `resolve` and `reopen`. Everyone else is still answered 403, a missing report included.
49
+ - The list shows the unresolved reports, or with `resolved` (whatever its value, as Mastodon) the resolved ones,
50
+ by `account_id` (the reporter) and `target_account_id`, newest first, with `Link` headers. It holds 100 reports
51
+ by default and at most 200, and stops early, offering the next page, once its reports name 100 statuses.
52
+ - A report shows its reporter, reported account, assignee and resolver as admin accounts (a local account's email
53
+ and role; for a remote account the fields of a missing user are null), its rules, and the statuses it names
54
+ that its reporter may still see; Mastodon shows them all.
55
+ - `PUT` and `PATCH` change `category` and `rule_ids` with Mastodon's validations and messages; an unknown
56
+ category is answered 422 where Mastodon fails.
57
+ - The reporter's report shows `action_taken` once it is resolved.
58
+ - `GET /api/v1/accounts/verify_credentials` shows the admin's role as `Owner` (id 3) with the permissions
59
+ served (`16`); every other account keeps the default role.
60
+ - The admin API's accounts, for the admin once Kopje grants the role `manage_users`, which it does with local
61
+ suspension (until then these routes still answer 403 to everyone, the admin included): `GET /api/v1/admin/accounts`,
62
+ `GET /api/v2/admin/accounts` and `GET /api/v1/admin/accounts/:id`, and `POST .../enable`, `unsilence`,
63
+ `unsensitive`, `approve` and `reject`.
64
+ - The lists take Mastodon's filters: v1's names and defaults (active local accounts unless `remote` or a state is
65
+ sent; the last state sent wins; `staff`), and v2's `origin`, `status`, `permissions=staff` and `role_ids`
66
+ (one or many), with `username` (a prefix, a leading `@` dropped), `display_name` (a prefix), `email` (a
67
+ prefix), `by_domain` (which replaces the origin, v1's default included, as in Mastodon), `ip` and
68
+ `invited_by`. An unknown `origin` or `status` is answered 400 `Unknown origin: x` or
69
+ `Unknown status: x`. Newest first, with `Link` headers; 100 accounts by default and at most 200.
70
+ - Unlike Mastodon, v2 reads the v1 names Fedilab sends it (`local`, `remote`, the five states, `staff`) when no
71
+ v2 filter name is sent: exactly one of `local` and `remote` gives the origin, exactly one state gives the
72
+ status, so Fedilab's "all" lists every account.
73
+ - No account is pending, disabled, silenced or sensitized, and no IP or invite is recorded: those filters, and
74
+ roles other than Owner (`3`) and the default role (`-99`), list nothing. An account being deleted is listed as
75
+ suspended, as its entity shows it.
76
+ - A username, display name or domain search reads at most 2,000 accounts: a broader one is answered 422
77
+ `search term too broad; add a filter or a longer prefix`, where Mastodon pages through it. A domain with more
78
+ than 2,000 known accounts needs a username prefix too. Prefixes are literal (Mastodon reads `_` and `%` in them
79
+ as wildcards) and compare letters case-insensitively in ASCII only.
80
+ - `enable`, `unsilence` and `unsensitive` change nothing, log the action and return the account (`enable` needs a
81
+ local account); `approve` and `reject` are answered 403, as Mastodon answers them for an approved user.
82
+ - The moderation log: every admin write through the admin API, and every account repair through `/admin`, is
83
+ recorded with who made it (the admin's account and client, or the Access identity), in the write's transaction.
84
+ It keeps the newest 10,000 entries. `GET /admin/moderation-log` and `kopje-admin moderation-log` show it, to
85
+ Access only. Dumps and backups carry it; the cutover has none to carry.
86
+ - `POST /admin/accounts/email` and `kopje-admin account set-email <username> <email>` (Access only) set a local
87
+ account's email, refusing one another local account has after trimming and lowercasing. It repairs a missing or
88
+ ambiguous admin match.
89
+
90
+ ### Instance changes
91
+
92
+ - Store schema: adds four migrations, applied in order on the first request after the deploy; a rollback to an earlier
93
+ version needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
94
+ - `0028_streaming_home`: adds the triggers that journal a status inserted while an account subscribes to `user`,
95
+ and an edit while one subscribes to `user` or `user:notification`, the empty `stream_delete_viewers` table (a
96
+ delete's capture), a column of the streaming position and an index of the subscription registry. The registry
97
+ and the position hold only the open sockets' rows (every socket closes on the deploy), so its work does not grow
98
+ with the Store. The new table is left out of dumps and backups, as the other streaming tables are.
99
+ - `0029_admin_reports`: adds the reports' moderation columns (when resolved and by whom, the assignee, the time of
100
+ the last change) and their indexes, replacing two, and the moderation log table. It reads only the reports: on a
101
+ benchmark store of 1,000,000 accounts, 3,000,000 follows, 2,000,000 statuses and 10,000 reports its upgrade took
102
+ 2.3 seconds in workerd's local Durable Object SQLite.
103
+ - `0030_admin_accounts`: adds an index of the accounts' lowercased display names, for the admin's display name
104
+ search. It reads only the accounts: on the same benchmark store its upgrade took 2.8 seconds.
105
+ - `0031_admin_accounts_available`: adds an index of the accounts whose deletion has not started, by id, so the
106
+ admin's list of active accounts skips none awaiting their purge. It reads only the accounts: on the same
107
+ benchmark store its upgrade took 2.8 seconds.
108
+ - `wrangler.jsonc`: unchanged.
109
+
110
+ ## [0.1.0-rc.9] - 2026-10-16
111
+
112
+ A ninth release candidate of the first release, published under the npm dist-tag `next`.
113
+
114
+ ### Added
115
+
116
+ - A remote account's pinned posts, featured hashtags and hidden network, learned as Mastodon 4.5 learns them:
117
+ `GET /api/v1/accounts/:id/statuses?pinned=true` and `GET /api/v1/accounts/:id/featured_tags` now show a remote
118
+ account's, and its `hide_collections` is shown and hides its followers and following lists as a local account's
119
+ setting does.
120
+ - Kopje reads the account's `featured` and `featuredTags` collections, and whether its `followers` or `following`
121
+ collection hides its items, each time it stores the account's profile, in the background rounds a few minutes
122
+ apart at most. A pinned post it does not have is fetched, signed by a local follower of the account if it has
123
+ one. An `Add` or `Remove` of a post or a hashtag to the account's own featured collection (or of a hashtag to its
124
+ featuredTags collection) changes one pin or featured hashtag at once.
125
+ - Pins and featured hashtags are shown by the same rules as a local account's: a followers-only pin only to the
126
+ account's followers, nothing of an account that blocks you. A featured hashtag counts, when it is shown, the
127
+ account's public and unlisted posts with it among the newest 200 Kopje has of it.
128
+ - A sync reads the featured collection, the followers and following collections, and the featuredTags collection
129
+ as three parts, each applied as soon as it is read; a round reads the parts not read yet, so one cut short by the
130
+ fetch budget is read in the next round. The pinned posts Kopje does not have are fetched in later rounds, as many
131
+ as each round's fetch budget allows, and one that cannot be fetched is dropped. A collection that cannot be read
132
+ for now (a timeout, a 5xx) is read again later, at most three times in a row without progress, and leaves what
133
+ was learned as it was meanwhile; the pending pinned posts are fetched even then. A profile update while a sync
134
+ runs is read again afterwards, with its own three tries.
135
+ - Where Kopje differs from Mastodon: an account keeps at most 20 pins and 10 featured hashtags (Mastodon keeps any
136
+ number for a remote account), from the first 20 items of its featured collection and the first three pages of its
137
+ featuredTags collection; a collection is read only on the account's own server, and a pin only when it is the
138
+ account's own post there; a followers or following collection that cannot be read for now hides nothing unless the
139
+ other one hides its items (Mastodon takes it as hidden); a featured hashtag of a remote account counts its posts
140
+ among the newest 200 Kopje has of it (Mastodon counts them all and keeps the count); a newly learned pin is
141
+ ordered as the collection lists it (the first is the newest); and a remote account's featured hashtag links to
142
+ `/@username@domain/tagged/:tag`, which leads to its profile on its server (Mastodon's link,
143
+ `/@username/tagged/:tag`, names a local account of the same username).
144
+ - The streaming API's WebSocket, as Mastodon 4.5's streaming server serves it, for the notifications: clients open
145
+ `wss://<domain>/api/v1/streaming` (any path below it is taken too) with the token as the subprotocol (echoed, as
146
+ masto.js needs) or in the `Authorization` header, then send
147
+ `{"type":"subscribe","stream":"user:notification"}` (or `user`, or `?stream=` on connect). `user:notification`
148
+ (`read` or `read:notifications`) and `user` (`read` or `read:statuses`, with notifications only if the token also has
149
+ `read:notifications`) carry `notification` events: each new notification the recipient's list shows, as REST
150
+ presents it, and not one their notification policy filtered, as Mastodon. Other streams (`public*`, `hashtag*`,
151
+ `list`, `direct`, and a name Mastodon does not know) answer `{"error":"Unknown stream type","status":400}`, and
152
+ `user` carries no `update`, `status.update` or `delete` yet. `GET /api/v1/streaming/health` answers `OK`. SSE is not
153
+ served (a request that is not an upgrade answers 404); no surveyed client uses it.
154
+ - Delivery is at most once and live, with no replay: a client reads REST again after a gap, as with Mastodon.
155
+ - A socket closes when its token is revoked, its web session signed out or its account suspended (at the next
156
+ write), and when the token expires (within 5 minutes); every socket closes on each deploy, as Durable Objects
157
+ drop WebSockets then, and clients reconnect.
158
+ - Limits: 16 sockets per account (429 `Too many connections`), 256 per instance (503), 16 subscriptions per
159
+ socket (`Too many subscriptions`), and incoming messages of text only (1003), at most 4 KiB and 120 a minute
160
+ (1008).
161
+ - Where Kopje differs from Mastodon: there is no protocol ping every 30 seconds (hibernated sockets are answered by
162
+ the platform without waking the Store); the message rate counts every message a socket sends; and the token is
163
+ not taken from an `access_token` query parameter, which would reach the platform's request logs (masto.js and
164
+ Ice Cubes send it as the subprotocol), so a request with only that answers 401 `Missing access token`.
165
+
166
+ ### Instance changes
167
+
168
+ - Store schema: adds two migrations, applied in order on the first request after the deploy; a rollback to an earlier
169
+ version needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
170
+ - `0025_remote_collections`: lets `status_pins` and `featured_tags` hold any account's rows (each table is rebuilt
171
+ and its rows copied), adds `accounts.hide_collections`, and adds the empty `collection_syncs` and
172
+ `collection_pins_pending` tables. Only local accounts have pins and featured hashtags until then, at most five and
173
+ ten each, so its work grows with the local accounts alone (about four rows read per pin or featured hashtag). The
174
+ new column has no default and no constraint, so the remote accounts and their statuses are neither read nor
175
+ rewritten.
176
+ - `0026_streaming`: adds the streaming API's registry of subscriptions, journal of events and position, and a
177
+ trigger that journals a new unfiltered notification while its recipient has a subscription. It only creates
178
+ empty tables (and the position's row) and the trigger, so its work does not grow with the Store. The three
179
+ tables are left out of dumps and backups: they describe one object's open sockets.
180
+ - `wrangler.jsonc`: unchanged. The sockets live in the Store, which already exists, so no Durable Object migration
181
+ (and no rollback barrier) is added.
182
+
183
+ ## [0.1.0-rc.8] - 2026-10-16
184
+
185
+ An eighth release candidate of the first release, published under the npm dist-tag `next`.
186
+
187
+ ### Added
188
+
189
+ - oEmbed, as Mastodon 4.5 has it: `GET /api/oembed?url=` (no token) answers a `rich` embed of a status, with
190
+ `author_name`, `author_url`, `provider_name`, `provider_url`, `cache_age` (a day), `width` (`maxwidth`, 400 by
191
+ default) and `height` (`maxheight`, else null), and HTML that links to the status and loads `/assets/embed.js`. The
192
+ script replaces the link with an iframe of the status's embed page, `/@username/:id/embed`, sized to the post. A
193
+ status can be embedded exactly when its page shows it: a public or unlisted post, not a boost, of a local account that
194
+ is not suspended; anything else, and any URL that is not a status page or object URI of this instance, answers 404.
195
+ The embed page is the one page other sites may frame; every other page still refuses framing.
196
+ - Where Kopje differs from Mastodon: the URL must name the status's author (`/@alice/:id` of another account's
197
+ status answers 404, as its page does), and `/@alice@this.domain/:id` and the object URI (`/ap/o/...`) are taken;
198
+ the HTML says "View on Kopje" without Mastodon's logo; the script is at `/assets/embed.js` (Mastodon:
199
+ `/embed.js`) and frames only the `blockquote` embeds (not the older `iframe` ones).
200
+ - The follow limit of Mastodon 4.5 (`FollowLimitValidator`, at its defaults): `POST /api/v1/accounts/:id/follow` refuses
201
+ a new follow or follow request with 422 and `Validation failed: You cannot follow more than 7500 people` once the
202
+ account follows 7,500 accounts, or, past that, 1.1 times its followers (rounded). Pending requests do not count;
203
+ changing an existing follow's options, authorizing a request (locally or by a remote `Accept`) and a `Move`'s
204
+ follower transfer are not limited, as in Mastodon. It is an admission rule on the account's own follows, not a
205
+ bound on what a home timeline reads.
206
+ - Where Kopje differs from Mastodon: the limit and ratio are fixed (Mastodon reads `MAX_FOLLOWS_THRESHOLD` and
207
+ `MAX_FOLLOWS_RATIO`).
208
+ - Attribution domains, as Mastodon 4.5 has them: `PATCH /api/v1/accounts/update_credentials` takes
209
+ `attribution_domains[]` (the websites allowed to credit the account as the author of their articles), normalized as
210
+ Mastodon does (surrounding whitespace and an `http://`, `https://` or `*.` prefix removed, blanks and duplicates
211
+ dropped) and validated with its messages (each a domain name, at most 100). The credential account shows them in
212
+ `source.attribution_domains` (`[]` when none), and the actor document publishes them as `attributionDomains` when
213
+ there is one, which reaches other servers with the account's Update.
214
+ - An about page at `/about`: the server's title (else its domain), description, rules and contact address, as the
215
+ instance endpoints give them. `/api/v2/instance` names it as `configuration.urls.about`, and the instance actor's
216
+ `url` already pointed there.
217
+
218
+ ### Changed
219
+
220
+ - A full Tag (`/api/v1/tags/:id` and its `follow`, `unfollow`, `feature` and `unfeature`, `/api/v1/followed_tags`,
221
+ `/api/v1/featured_tags/suggestions` and the hashtags of `/api/v2/search`) has Mastodon's `id` (sent since 4.3.1).
222
+ Kopje has no table of hashtags, so the id is derived from the normalized name (its 64-bit FNV-1a hash cut to 63
223
+ bits, in decimal): the same on every endpoint and instance. No route takes it back; `/api/v1/tags/:id` still takes
224
+ the name, as in Mastodon.
225
+ - Instance rules have Mastodon's `hint` and `translations` on every endpoint that shows them (`/api/v1/instance`,
226
+ `/api/v2/instance`, `/api/v1/instance/rules`): the hint is the `hint` of a rule given as an object in the `rules`
227
+ setting (else `""`), and `translations` is `{}`, since Kopje stores none. The about page shows the hint under its
228
+ rule.
229
+ - `/api/v1/instance` and `/api/v2/instance` declare Mastodon `4.4.0` (was `4.0.2`), and `/api/v2/instance` adds
230
+ `api_versions: { "mastodon": 6 }`, the number Mastodon 4.4 sends. Clients choose APIs by these numbers, and every
231
+ API they switch on up to 6 is now served: grouped notifications (`/api/v2/notifications`), the notification policy,
232
+ the link timeline, `delete_media`, the `blur` filter action, featured hashtags and OAuth PKCE. With this, Phanpy,
233
+ Ice Cubes, Moshidon and the official iOS and Android apps use grouped notifications, Phanpy and Tusky offer the `blur`
234
+ filter action, the official Android app signs in with PKCE, and the official iOS app shows an account's featured
235
+ tab. Kopje stays below 7 (Mastodon 4.5) because 7 tells clients that quote posts are served, and they are not yet.
236
+ - The official iOS app also shows a default quote policy in its privacy settings at 6. Kopje ignores it: no one can
237
+ quote a Kopje post whatever it says.
238
+ - `/api/v2/instance` has Mastodon 4.4's other fields with Kopje's values: `icon` (none), `configuration.urls`
239
+ `about` (the about page), `status`, `privacy_policy` and `terms_of_service` (null),
240
+ `configuration.accounts.max_pinned_statuses` (5), `configuration.media_attachments.description_limit` (1500),
241
+ `configuration.limited_federation` (false), and `registrations.reason_required` (false), `min_age` and `url`
242
+ (null).
243
+
244
+ ### Fixed
245
+
246
+ - Authorizing a local account's follow request counts the follow in that account's `following_count` at once (it was
247
+ counted only at the account's next follow change).
248
+
249
+ ### Instance changes
250
+
251
+ - Store schema: adds one migration, applied on the first request after the deploy; a rollback to an earlier version
252
+ needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
253
+ - `0024_attribution_domains`: adds `local_accounts.attribution_domains`, an empty list for every account. Adding a
254
+ column with a constant default reads no row, so its work does not grow with the Store.
255
+ - `wrangler.jsonc`: unchanged.
256
+
257
+ ## [0.1.0-rc.7] - 2026-10-16
258
+
259
+ A seventh release candidate of the first release, published under the npm dist-tag `next`.
260
+
261
+ ### Added
262
+
263
+ - The notification policy and notification requests, as Mastodon 4.5 has them: `GET`, `PATCH` and `PUT` of
264
+ `/api/v1/notifications/policy` (`filter_not_following`, `filter_not_followers`, `filter_new_accounts`,
265
+ `filter_private_mentions`, each true for filter and false for accept) and `/api/v2/notifications/policy`
266
+ (`for_not_following`, `for_not_followers`, `for_new_accounts`, `for_private_mentions`, `for_limited_accounts`, each
267
+ `accept`, `filter` or `drop`), with the `summary` of pending requests; `GET /api/v1/notifications/requests` (40 by
268
+ default, at most 80, with Link headers), `GET /api/v1/notifications/requests/:id`,
269
+ `POST /api/v1/notifications/requests/:id/accept` and `/dismiss`, the bulk `POST /api/v1/notifications/requests/accept`
270
+ and `/dismiss` (`id[]`), and `GET /api/v1/notifications/requests/merged`. Scopes are `read:notifications` and
271
+ `write:notifications` (or `read` and `write`).
272
+ - A notification from an account you do not follow, from one that has not followed you for three days, from an
273
+ account younger than 30 days you do not follow, or a private mention from an account you do not follow that
274
+ answers none of your private mentions of it, is accepted, filtered or dropped as your policy chooses. Mentions,
275
+ favourites, boosts, follows and follow requests are filtered or dropped; posts, edits and poll ends never are.
276
+ By default, as on Mastodon, private mentions are filtered and the rest accepted.
277
+ - A dropped notification is not written. A filtered one is written but left out of the notifications, the grouped
278
+ notifications and both unread counts unless you ask with `include_filtered=true` (or, in v1, `account_id`); it is
279
+ not pushed, joins no group, and a private mention does not reach your conversations. A filtered mention opens or
280
+ updates a request for its sender, which counts up to 100 of them.
281
+ - Blocking an account deletes its request and the permission you gave it by accepting one.
282
+ - Accepting a request lets its sender through from then on, shows the sender's filtered notifications, and adds
283
+ the private mentions among them to your conversations. Dismissing one deletes the sender's filtered notifications.
284
+ Both happen in the request for up to 2,000 of the sender's notifications and in the background rounds for the
285
+ rest; `merged` answers false until an accepted request's notifications are all shown.
286
+ - Where Kopje differs from Mastodon: Kopje has no silenced accounts, so `for_limited_accounts` is kept but never
287
+ matches, and no staff role that bypasses blocks, so no sender is exempt as staff; a follow counts from when it was
288
+ requested, not when it was accepted; a request's count is kept as its mentions arrive, so deleting one of them
289
+ does not lower it and the request stays until it is answered; the summary looks at 100 requests at most (Mastodon
290
+ names that limit, but its query counts all of them); a v2 value other than `accept`, `filter`, `drop` or 0 to 2
291
+ answers 422 (`'x' is not a valid for_not_following`) and changes nothing, where Mastodon answers 500; a v1 form
292
+ value of `false` or `0` accepts, where Mastodon filters for any value sent; a domain block keeps the permissions of accepted requests from accounts there (Mastodon's
293
+ AfterBlockDomainFromAccountService deletes them), so after an unblock those senders pass your policy again; the bulk
294
+ forms take at most 100 ids
295
+ (more answer 422); and `merged` reflects the work an accepted request has left, which Kopje runs in rounds a few
296
+ minutes apart rather than at once. As on Mastodon, the bulk dismiss deletes the requests alone and leaves their
297
+ filtered notifications, and `GET /api/v1/notifications/:id` and `GET /api/v2/notifications/ungrouped-:id` show a
298
+ filtered notification.
299
+ - Reports, as Mastodon 4.5 has them: `POST /api/v1/reports` (`account_id`, `comment`, `category`, `rule_ids[]`,
300
+ `status_ids[]`, `forward`, `forward_to_domains[]`), under the `write:reports` scope (or `write`), answered as Mastodon's
301
+ Report entity. The report is stored for the instance's moderation; nothing else shows it yet.
302
+ - The reported account must be available, and each reported status one of its statuses you may see on its profile
303
+ (a private one only if you follow it, a direct one only if it mentions you); anything else answers 404, as on
304
+ Mastodon. Blocking the account does not stop you from naming its statuses.
305
+ - `rule_ids` make the category `violation` and must name rules of `GET /api/v1/instance/rules`, each once; a
306
+ comment is at most 1,000 characters. Errors answer 422 in Mastodon's words.
307
+ - With `forward` true, a report of a remote account is sent as a `Flag` from the instance actor (it does not name
308
+ you) to the account's server when its domain is in `forward_to_domains` (by default its own; `forwarded` says
309
+ whether it was), and to the servers of the accounts the reported posts reply to on the listed domains. It carries
310
+ your comment and the addresses of the account and the reported posts.
311
+ - A report stays when a reported post is deleted, naming it by its id; it goes with the reported account when a
312
+ remote account is deleted.
313
+ - Where Kopje differs from Mastodon: nobody is notified of a new report, as Kopje has no admin notification (no
314
+ staff notification or email); Kopje has no admin view of reports yet; a report names at most 100 posts and 100
315
+ forward domains (more answer 422, where Mastodon sets no limit); an unknown category answers 422
316
+ (`Category is not included in the list`), where Mastodon answers 500; the `Flag` goes to a server's shared inbox
317
+ when the account has one (as Kopje sends every activity without `to`), where Mastodon sends it to the reported
318
+ account's personal inbox; its id is `https://<domain>/actor#reports/<uuid>`; and the application a report was made
319
+ with is not kept.
320
+ - Mastodon 4.5's remaining small endpoints, under Mastodon's scopes, answered as Mastodon answers when the feature has
321
+ nothing to show or is not configured: `GET /api/v1/annual_reports` (none),
322
+ `GET /api/v1/instance/translation_languages` (`{}`), `GET /api/v1/emails/check_confirmation` (`true`) and
323
+ `DELETE /api/v1/suggestions/:id` (`{}`); 404 for
324
+ `GET /api/v1/timelines/link`, `GET /api/v1/annual_reports/:id`, `POST /api/v1/annual_reports/:id/read`,
325
+ `POST /api/v1/announcements/:id/dismiss`, announcement reactions, `GET /api/v1/instance/terms_of_service/:date`,
326
+ `POST /api/v1/statuses/:id/translate` and `GET /api/v1_alpha/async_refreshes/:id`; and 403 for
327
+ `POST /api/v1/emails/confirmations`. `GET /api/v1/peers/search` finds up to 10 known peers by domain prefix, and
328
+ `PATCH /api/v1/push/subscription` updates as `PUT` does.
329
+ - The profile directory, `GET /api/v1/directory`, as Mastodon 4.5 has it (token optional, any scope): the discoverable
330
+ accounts, the most recently active first (`order=active`, the default; accounts that have not posted come last) or
331
+ the newest first (`order=new`), all of them or the local ones (`local=true`), 40 by default and at most 80 by `limit`,
332
+ from `offset`. A local account is listed when its owner made it discoverable, a remote account when its actor says
333
+ `discoverable: true`. Suspended accounts and accounts being deleted are never listed, and a signed-in viewer is not
334
+ shown the accounts they block or mute, those on domains they block, nor those that block them. An answer without a
335
+ token may be cached for 15 seconds, as Mastodon's.
336
+ - Where Kopje differs from Mastodon: an offset above 400 answers no accounts, and a page looks at most twice offset
337
+ plus limit accounts of the directory, so when more than half of them are hidden from you (accounts you block or
338
+ mute, say), that page comes back shorter; `order=active` goes by an account's newest public, unlisted or private
339
+ post or boost as stored, the one its `last_status_at` shows, so the account moves back when that post is deleted,
340
+ and accounts that have not posted are ordered newest first (Mastodon leaves their order open); an unknown `order`
341
+ reads as `active` (Mastodon fails); Kopje has no silenced accounts, and it does not record that an account moved, so a moved
342
+ account stays listed while its actor says it is discoverable.
343
+
344
+ ### Changed
345
+
346
+ - Hashtags are normalized as Mastodon 4.5 normalizes them (HashtagNormalizer): NFKC, lowercase, Latin letters with
347
+ diacritics folded to ASCII by Mastodon's table, and the characters a hashtag cannot hold dropped. `#Café`, `#cafe`
348
+ and `#CAFÉ` are one hashtag, as on Mastodon, wherever a hashtag is named: in a posted or received status (a received
349
+ `Hashtag` loses every `#` with the rest), on hashtag timelines, in home through a followed hashtag, in search, on
350
+ the tagged profile page, and among featured hashtags, so featuring `blahaj` after `BLÅHAJ` is refused as taken.
351
+ A hashtag in status text that leaves nothing once normalized (a lone combining mark) stays text, and hashtag search
352
+ drops the spaces of its query rather than finding nothing. The cutover and `verify-conversion` name hashtags the same
353
+ way. Stored names are renormalized by the migration below.
354
+ - Clearing notifications (`POST /api/v1/notifications/clear` and `/api/v2/notifications/clear`) and dismissing a group
355
+ (`POST /api/v2/notifications/:group_key/dismiss`) answer as before, and what they remove is gone at once from the
356
+ lists, a notification by id, the grouped notifications, both unread counts and the pushes waiting; the request
357
+ deletes up to 2,000 notifications and the background rounds delete the rest, so however many notifications others
358
+ sent, one request's work is bounded. A notification that arrives afterwards shows as usual.
359
+
360
+ ### Instance changes
361
+
362
+ - Store schema: adds five migrations, applied in order on the first request after the deploy; a rollback to an earlier
363
+ version needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
364
+ - `0019_tag_normalization`: renames the stored hashtags (`status_tags`, `tag_follows`, `featured_tags`) to
365
+ Mastodon's normalization. Names that become one are merged: a status keeps one row of the hashtag, an account
366
+ keeps its earliest follow and its earliest featured hashtag (with its spelling), and the featured hashtags left
367
+ are recounted from the account's statuses; a featured hashtag merged away sends no `Remove`, since Mastodon
368
+ servers already hold the names as one featured hashtag. A name that leaves nothing is deleted. A stored name
369
+ made from a word-final capital sigma keeps its `ς` (Mastodon would store `σ`), since the stored name cannot tell
370
+ it from a typed `ς`. It reads each table once to find the names with a character other than `a`–`z`, `0`–`9`
371
+ and `_`, walks each such distinct name's characters, and rewrites the rows of the renamed names through indexes,
372
+ so its work grows linearly with the hashtag rows stored.
373
+ - `0020_notification_policies`: adds `notifications.filtered` (every stored notification stays shown), the
374
+ partial index of unfiltered notifications the lists read, and the tables of notification policies, permissions,
375
+ requests and their background work. Adding the column reads no row; building the index reads each stored
376
+ notification once and writes an entry for each, so its work grows linearly with the notifications stored.
377
+ - `0021_directory`: adds `accounts.last_status_id` (each account's newest public, unlisted or private status, kept
378
+ by triggers as statuses are stored, deleted or hidden), fills it with one lookup per account through an index, and
379
+ indexes the discoverable accounts by the directory's two orders. Its work grows linearly with the accounts
380
+ stored, whatever the statuses.
381
+ - `0022_reports`: adds the table of reports. It only creates an empty table and its indexes, so its work does not
382
+ grow with the Store.
383
+ - `0023_notification_clears`: adds the empty tables of cleared notifications and dismissed notification groups
384
+ waiting to be deleted. It reads no row.
385
+ - `wrangler.jsonc`: unchanged.
386
+
387
+ ## [0.1.0-rc.6] - 2026-10-16
388
+
389
+ A sixth release candidate of the first release, published under the npm dist-tag `next`.
390
+
391
+ ### Added
392
+
393
+ - `GET` and `POST /oauth/userinfo`, as Mastodon 4.5 has it: for a token with the `profile` scope, the OpenID Connect
394
+ claims of its account (`iss`, `sub`, `name`, `preferred_username`, `profile`, `picture`). A token without `profile`
395
+ is refused with 403, an app token with 422.
396
+ - `GET /.well-known/oauth-authorization-server` (RFC 8414), as Mastodon 4.5 has it: the OAuth endpoints, including
397
+ `userinfo_endpoint` and Mastodon's `app_registration_endpoint`, the scopes, and the supported response types and
398
+ modes, grant types, client authentication methods and PKCE methods.
399
+ - Filters, as Mastodon 4.5 has them: `/api/v2/filters` with keywords (`keywords_attributes`, `_destroy`) and statuses,
400
+ `/api/v2/filters/:id/keywords`, `/api/v2/filters/keywords/:id`, `/api/v2/filters/:id/statuses` and
401
+ `/api/v2/filters/statuses/:id`, and the v1 `/api/v1/filters` over the same filters. Every status shown to you carries
402
+ in `filtered` your active filters that match it, whatever their context and action, and your client hides or warns by
403
+ context, as with Mastodon. An account has at most 50 filters, a filter 20 keywords and 200 statuses. A status is
404
+ matched on the beginning of its text: at most 10,000 characters each, and a response's statuses share 400,000 (short
405
+ ones whole, long ones on an equal share), so a page is matched in full but a keyword deep in a long status of a very
406
+ large thread may be missed (filtered statuses always match). Keywords match case-insensitively by simple Unicode case
407
+ folding; the multi-character folds Mastodon also applies (ß and ss, İ and i̇) do not match. Deleting a v1 filter also
408
+ deletes its filter when that leaves it with no keyword and no status.
409
+ - Conversations in the Mastodon API, as Mastodon 4.5 has them: `GET /api/v1/conversations` (paged by the last status
410
+ with Link headers, 20 by default and at most 40), `DELETE /api/v1/conversations/:id` and
411
+ `POST /api/v1/conversations/:id/read` and `/unread`. Scopes are `read:statuses` and `write:conversations` (or `read`
412
+ and `write`); another account's conversation answers 404.
413
+ - Your direct statuses, and the direct statuses you are notified of as a mention, are grouped by thread and by the
414
+ other accounts in them. A received status that names its conversation, as Mastodon's do, joins that thread even
415
+ when it arrives before the status it replies to. A new status from someone else marks the conversation unread; your own does not.
416
+ - Deleting a status takes it out of its conversations; a conversation with none left goes. Deleting a
417
+ conversation keeps its statuses, and a later one makes a new conversation. Blocking an account ends your
418
+ conversations with it.
419
+ - A conversation's last status is shown only while you may still see it (its author is not suspended and does not
420
+ block you); otherwise it is `null`.
421
+ - The conversations of the direct statuses already stored are made when the instance upgrades, and the cutover
422
+ makes them of the statuses it carries.
423
+ - Timeline markers in the Mastodon API, as Mastodon 4.5 has them: `GET /api/v1/markers` (`timeline[]`: `home`,
424
+ `notifications`; other names are ignored) and `POST /api/v1/markers` (`home[last_read_id]`,
425
+ `notifications[last_read_id]`), each marker with its `last_read_id`, `version` and `updated_at`. Scopes are
426
+ `read:statuses` and `write:statuses` (or `read` and `write`). An update that changes a marker counts a version; the
427
+ same value changes nothing. `last_read_id` is kept as sent, up to 255 characters; a blank one answers 422 with
428
+ Mastodon's message. Updates are applied one at a time, so two at once both succeed instead of one answering 409.
429
+ - Scheduled statuses, as Mastodon 4.5 has them: `POST /api/v1/statuses` with `scheduled_at` answers a
430
+ `ScheduledStatus`, checked as a post is, at least 5 minutes ahead, at most 300 per account and 25 per day (a time
431
+ not in the future posts at once). `GET /api/v1/scheduled_statuses` lists them, and `GET`, `PUT`, `PATCH` and
432
+ `DELETE` on `/api/v1/scheduled_statuses/:id` show, move and delete one. The cron publishes each when it is due
433
+ (within its 5-minute schedule) as an ordinary post, and drops one that no longer passes (the status it replies to is
434
+ gone, or its account is suspended); one that fails with an error is retried four times over about five hours, then
435
+ dropped. An `Idempotency-Key` that scheduled a status answers with it on a repeat, with or without `scheduled_at`.
436
+ Media attached to a scheduled status is kept until it is published or deleted.
437
+ - Polls, as Mastodon 4.5 has them: `POST /api/v1/statuses` takes `poll[options][]`, `poll[expires_in]`,
438
+ `poll[multiple]` and `poll[hide_totals]` (2 to 4 choices of at most 50 characters, 5 minutes to a month, refused
439
+ with media), and every status shows its `Poll`. `GET /api/v1/polls/:id` shows a poll to whoever may see its status,
440
+ and `POST /api/v1/polls/:id/votes` (`choices[]`) votes, with Mastodon's validation and messages; a voter who blocks
441
+ the author is refused. `hide_totals` hides the counts from everyone until the poll ends, and who voted is never
442
+ shown. Editing a status's poll moves its end, and changed choices drop the votes cast; an edit without a poll
443
+ removes it. A scheduled status keeps its poll and creates it on publication. When a poll ends, its local author and
444
+ local voters are notified (`poll`, with Web Push), by the cron within its 5-minute schedule.
445
+ - Over ActivityPub, a poll is a `Question` in its Create, Update and served object; votes in a local poll update
446
+ it with an Update about 3 minutes after the first new vote (one for all, and one when it ends), and a vote in a
447
+ remote poll goes to its author as Mastodon's vote Note. A received `Question` is stored with its poll, an
448
+ Update refreshes its counts and end, and a received vote counts in a local poll once, from an account that may
449
+ see it, and is never stored as a status.
450
+ - Where Kopje differs from Mastodon: a poll's id is its status's id; a voter who blocks the author's domain is
451
+ refused, since the vote could not be delivered; a remote poll keeps at most 100 choices of 1,000 code units, and a
452
+ choice cut to that length cannot be voted for; any Note naming a choice in reply to a local poll is treated as a
453
+ vote, never as a status; a local poll's `Question` says `closed` once the cron has ended it, within 5 minutes of
454
+ its end; and the Update of counts reaches remote voters only for a public or unlisted status.
455
+ - `PATCH /api/v1/media/:id`, the same update as `PUT`, and `DELETE /api/v1/media/:id`, as Mastodon 4.5 has them (scope
456
+ `write:media`): your own media only, else 404. Media a status uses, or a scheduled status holds, answers 422 with
457
+ Mastodon's message, and so does an image the cutover kept unattached (one only earlier versions of a status show, or
458
+ one legacy kept); otherwise the media is deleted with its files and the answer is `{}`.
459
+ - `DELETE /api/v1/profile/avatar` and `DELETE /api/v1/profile/header`, as Mastodon 4.5 has them (scope
460
+ `write:accounts`): the account shows the default image again, the removed image's files are deleted, followers'
461
+ servers receive the profile `Update`, and the answer is your `CredentialAccount`.
462
+ - Followed hashtags, as Mastodon 4.5 has them: `POST /api/v1/tags/:id/follow` and `/unfollow` (scope
463
+ `write:follows`), and `GET /api/v1/followed_tags` (scope `read:follows`; newest follow first, 100 by default and at
464
+ most 200, with Link headers). A name that is not a hashtag answers 404; any other name may be followed, used or not.
465
+ Home also shows the public statuses, not boosts, with a hashtag you follow, from anyone, unless you block or mute
466
+ their author or an account they mention, block their author's domain, or their author blocks you. The Tag entity
467
+ shows `following` and `featuring` to a signed-in user wherever it appears, search's hashtags included.
468
+ - Where Kopje differs from Mastodon: an account follows at most 100 hashtags; home shows a followed hashtag's
469
+ statuses posted before the follow too (home is read, not filled as statuses arrive), and they leave it at once
470
+ on an unfollow; the followed hashtags and the suggestions below show each hashtag with an empty `history`, as
471
+ search's do; and home looks at most two pages (at least 40) of a followed hashtag's newest statuses for a page, so
472
+ when most of them are hidden from you (say, a blocked account's), that page shows fewer of the hashtag's
473
+ statuses.
474
+ - Featured hashtags, as Mastodon 4.5 has them: `GET` and `POST /api/v1/featured_tags`,
475
+ `DELETE /api/v1/featured_tags/:id`, `GET /api/v1/featured_tags/suggestions` (the hashtags of your newest 1,000
476
+ statuses you do not feature yet, the most used first), `POST /api/v1/tags/:id/feature` and `/unfeature` (scopes
477
+ `read:accounts` and `write:accounts`), and `GET /api/v1/accounts/:id/featured_tags`, public, empty for a suspended
478
+ account. An account features at most 10 hashtags, with Mastodon's validation and messages. Each shows the number of
479
+ your public and unlisted statuses with it and the date of the newest, kept as you post, edit and delete. Its `url`,
480
+ `/@username/tagged/:tag`, is your public profile page with only your posts with the hashtag.
481
+ - Over ActivityPub, the actor publishes `featuredTags` (its featured hashtags as `Hashtag`s) and `featured` (its
482
+ pinned statuses, below), and featuring or unfeaturing a hashtag sends your followers Mastodon's `Add` or
483
+ `Remove` of the `Hashtag`; before an account's first one, its followers are sent the actor again, as servers that
484
+ stored it earlier know no `featured` collection to add to. Kopje does not read the featured hashtags of remote
485
+ accounts.
486
+ - Where Kopje differs from Mastodon: an edit that adds a hashtag to an older status keeps the newest date rather
487
+ than taking the older status's.
488
+ - The remaining account endpoints of Mastodon 4.5:
489
+ - Private notes: `POST /api/v1/accounts/:id/note` (`comment`, at most 2,000 characters; a blank one deletes the
490
+ note) answers the Relationship. Every Relationship now carries your note on the account in `note`; nobody else
491
+ is shown it.
492
+ - Endorsements: `POST /api/v1/accounts/:id/endorse` and `/unendorse` (also as `/pin` and `/unpin`), which answer
493
+ the Relationship, now with a real `endorsed`; `GET /api/v1/endorsements` (yours, 40 by default and at most 80
494
+ with Link headers, or all at once with `limit=0`, up to 1,000), which no longer answers empty; and
495
+ `GET /api/v1/accounts/:id/endorsements` (anyone's, to anyone). You can endorse only an account you follow (else
496
+ 422 with Mastodon's message), and the endorsement goes when the follow ends, however it ends. Suspended accounts
497
+ and accounts being deleted are not listed. Endorsements are not federated, as in Mastodon 4.5.
498
+ - `POST /api/v1/accounts/:id/remove_from_followers` ends the account's follow of you: a remote follower is sent a
499
+ `Reject`, as when a block ends its follow. A pending request is left alone.
500
+ - `GET /api/v1/accounts?id[]=` shows up to 40 accounts at once, as `GET /api/v1/accounts/:id` shows each; more
501
+ answer 422.
502
+ - `GET /api/v1/accounts/:id/identity_proofs` answers `[]`, as Mastodon's deprecated endpoint does.
503
+ - `POST /api/v1/accounts` (registration) answers as Mastodon does with registrations closed: 403 `Forbidden` for an
504
+ app token with `write:accounts`, after Mastodon's token checks. Kopje has no open registration.
505
+ - The remaining status actions of Mastodon 4.5:
506
+ - Pins: `POST /api/v1/statuses/:id/pin` and `/unpin` (scope `write:accounts`), which answer the status. You can pin
507
+ up to 5 of your own statuses, not boosts or direct statuses; anything else answers 422 with Mastodon's messages,
508
+ and pinning a status again answers 422 `Duplicate record`. Your statuses now carry a real `pinned`, and
509
+ `GET /api/v1/accounts/:id/statuses?pinned=true` lists an account's pins, newest pin first, to whoever may see
510
+ each. Your actor publishes its `featured` collection of pins (the post of a public or unlisted one, the address
511
+ of any other), and your followers' servers are sent an `Add` or `Remove` when you pin or unpin; before an
512
+ account's first one, pin or featured hashtag, its followers are sent the actor again. A later `Add` or `Remove` of
513
+ the same status replaces an earlier one still waiting or given up. Deleting a pinned status unpins it.
514
+ - Conversation mutes: `POST /api/v1/statuses/:id/mute` and `/unmute` (scope `write:mutes`) mute the conversation
515
+ of a status you may see, and every status of it then shows `muted: true` to you. While it is muted, nothing in
516
+ it notifies you (mentions, favourites, boosts, poll ends, edits), and its direct statuses no longer reach your
517
+ conversations; notifications you already had stay.
518
+ - `GET /api/v1/statuses?id[]=` shows up to 20 statuses at once, those you may see and have not filtered out by a
519
+ block, mute or domain block, each as `GET /api/v1/statuses/:id` shows it, in the order asked; more answer 422.
520
+ - `PATCH /api/v1/statuses/:id` edits a status, as `PUT` does.
521
+ - Grouped notifications, as Mastodon 4.5 has them: `GET /api/v2/notifications` answers `accounts`, `statuses` and
522
+ `notification_groups` (with `types[]`, `exclude_types[]`, `grouped_types[]`, `expand_accounts=partial_avatars` and
523
+ paging with Link headers, 40 groups by default and at most 80), `GET /api/v2/notifications/:group_key` shows one
524
+ group, `GET /api/v2/notifications/:group_key/accounts` lists its accounts, and
525
+ `POST /api/v2/notifications/:group_key/dismiss` and `POST /api/v2/notifications/clear` delete. Favourites and
526
+ boosts of the same status, and follows, group by the hour, joining a group of the same kind from up to 11 hours
527
+ before; v1 notifications show their `group_key` too. Scopes are `read:notifications` and `write:notifications` (or
528
+ `read` and `write`).
529
+ - A group counts and shows only the notifications you are shown in v1: a notification from an account you have
530
+ since blocked or muted, or about a status you may no longer see, is left out.
531
+ - Each group on a page counts and samples its notifications up to the page's newest, those below the page
532
+ included, as Mastodon does.
533
+ - Where Kopje differs from Mastodon: a group counts at most 400 notifications, and a page reads at most 2,000
534
+ notifications, skipping those of the groups it has found, so a page ends early, with the groups found and a `next`
535
+ link that goes on from there, only when its walk meets more than that of the groups it found (in practice a status
536
+ favourited by thousands within a few hours). A dismissed group is not remembered, so a later notification within
537
+ its hours starts a new one. Dismissing a group and clearing hide its notifications, or all of them, from every
538
+ read at once; the request deletes up to 2,000 of them and the background rounds delete the rest.
539
+ - Notifications stored before the upgrade stay ungrouped, each a group of its own, as Mastodon left those it
540
+ stored before it grouped them.
541
+ - `GET /api/v1/notifications/unread_count` and `GET /api/v2/notifications/unread_count`, as Mastodon 4.5 has them: the
542
+ notifications (v1) or groups (v2) newer than your notifications marker, up to `limit` (100 by default, at most 1,000),
543
+ with the same filters as the lists.
544
+
545
+ ### Changed
546
+
547
+ - A missing, unknown or expired bearer token is refused with a `WWW-Authenticate: Bearer` challenge
548
+ (`error="invalid_token"`), as Mastodon refuses it.
549
+ - The public timeline, account statuses, notifications, favourites and bookmarks read a bounded number of rows for a
550
+ page anywhere in the history, and home and list timelines no longer read the statuses of followed accounts they
551
+ hide entirely. Home reads only the mentions of you in direct and limited statuses by accounts you follow, not every
552
+ mention of you, and the statuses of an account that blocks you, that you block, or that is suspended or being deleted
553
+ are no longer read to show its empty profile.
554
+ - A page of a list's members (`GET /api/v1/lists/:id/accounts` with `max_id` or `min_id`) is read from its cursor, not
555
+ from the newest member.
556
+
557
+ ### Fixed
558
+
559
+ - Media an edit removes from a status stays with the status, as with Mastodon, so the status's edit history still
560
+ shows it: it is no longer deleted a day after the edit. The status no longer shows it, and it cannot be attached to
561
+ another status or a scheduled status; a later edit of the same status can attach it again, and it is deleted with
562
+ the status (at once with `delete_media`, otherwise after the grace period, as the status's other media). An image
563
+ that only earlier versions of a converted status show now belongs to that status too, so it is no longer offered as
564
+ an unattached upload, and goes with the status.
565
+
566
+ ### Instance changes
567
+
568
+ - Store schema: adds eleven migrations, applied in order on the first request after the deploy; a rollback to an earlier
569
+ version needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
570
+ - `0008_status_mentions_requires_mention`: adds `status_mentions.requires_mention` and `status_mentions.author_id`,
571
+ marks the mentions in direct and limited statuses with their status's author, and indexes them by recipient and
572
+ author. Its work grows linearly with the mentions stored (one pass, with a lookup of each one's status); locally,
573
+ 200,000 mentions took under a second.
574
+ - `0009_conversations`: adds `statuses.thread` (the thread a status belongs to, given to each status stored, from
575
+ the start of each reply chain down, and to each new one by a trigger), the `conversations` and
576
+ `conversation_statuses` tables, the trigger that takes a deleted status out of its conversations, and the
577
+ conversations of the direct statuses stored. It rewrites every status once (its thread) and reads each a few
578
+ times, so its work grows linearly with the statuses stored; locally, 500,000 statuses, 50,000 of them direct in
579
+ two long reply chains, took about 1.2 seconds.
580
+ - `0010_markers`: adds the `markers` table. It is quick.
581
+ - `0011_scheduled_statuses`: adds the `scheduled_statuses` table and `media_attachments.scheduled_status_id`, with
582
+ their indexes. Its work grows linearly with the media stored (one pass to add the column and one to build its
583
+ partial index).
584
+ - `0012_filters`: adds the `filters`, `filter_keywords` and `filter_statuses` tables, empty. Its work does not grow
585
+ with the Store.
586
+ - `0013_polls`: adds the `polls` and `poll_votes` tables, with their indexes, and `status_edits.poll_options`. It is
587
+ quick.
588
+ - `0014_account_notes_and_pins`: adds the `account_notes` and `account_pins` tables, empty, and the trigger that
589
+ deletes an endorsement with its follow. Its work does not grow with the Store.
590
+ - `0015_media_shown`: adds `media_attachments.shown`, rebuilds the index `media_attachments_status` with it, and
591
+ gives back to its status, not shown, each kept upload that earlier versions of exactly one status of its author
592
+ name (an image the cutover kept for earlier versions, or media an edit detached that is more than an hour from
593
+ its sweep); other uploads stay as they are. Its work grows linearly with the media and the edits stored (one pass
594
+ over the media for the column and one for the index, and one over the edits' media, grouped by id, with a
595
+ lookup of each named upload).
596
+ - `0016_tags`: adds the `tag_follows` and `featured_tags` tables, empty, and `local_accounts.featured_announced`.
597
+ It is quick.
598
+ - `0017_notification_groups`: adds `notifications.group_key`, empty for the notifications stored, and its partial
599
+ index by recipient and group. It reads each notification once to build the index, so its work grows linearly
600
+ with the notifications stored.
601
+ - `0018_status_pins_and_conversation_mutes`: adds the `status_pins` and `conversation_mutes` tables, empty. Its
602
+ work does not grow with the Store.
603
+ - `wrangler.jsonc`: unchanged.
604
+
605
+ ## [0.1.0-rc.5] - 2026-10-15
606
+
607
+ A fifth release candidate of the first release, published under the npm dist-tag `next`.
608
+
609
+ ### Added
610
+
611
+ - `kopje-admin keys rewrap` moves the private keys of local accounts and the instance actor from the KEK in
612
+ `USER_KEK_PREVIOUS` (unset reads as the empty KEK) to `USER_KEK`, keeping the same key pairs. Keys already under
613
+ `USER_KEK` are skipped, so it can run again; a key neither KEK unwraps is reported and left unchanged. See "Rotating
614
+ the KEK" in docs/setup.md.
615
+
616
+ ### Changed
617
+
618
+ - Home and list timelines read a bounded number of rows per page.
619
+
620
+ ### Instance changes
621
+
622
+ - Store schema: unchanged.
623
+ - `wrangler.jsonc`: unchanged. `USER_KEK_PREVIOUS` is a new optional secret, set only while rotating the KEK.
624
+
625
+ ## [0.1.0-rc.4] - 2026-10-15
626
+
627
+ A fourth release candidate of the first release, published under the npm dist-tag `next`.
628
+
629
+ ### Added
630
+
631
+ - Lists in the Mastodon API, as Mastodon 4.5 has them: `GET` and `POST /api/v1/lists`, `GET`, `PUT`, `PATCH` and
632
+ `DELETE /api/v1/lists/:id` (`title`, at most 256 characters; `replies_policy` `followed`, `list` or `none`, `list` by
633
+ default; `exclusive`), at most 50 lists per account; `GET`, `POST` and `DELETE /api/v1/lists/:id/accounts`
634
+ (`account_ids[]`; the members paged by Link headers, 40 by default and at most 80, or all at once with `limit=0`, up
635
+ to 1,000); `GET /api/v1/accounts/:id/lists`; and `GET /api/v1/timelines/list/:id`. Scopes are `read:lists` and
636
+ `write:lists` (or `read` and `write`). Errors answer as Mastodon's do (422 with its validation messages, 404 for an
637
+ unknown account or a list of someone else's).
638
+ - A list holds you and accounts you follow or have asked to follow; anyone else is refused. An account whose
639
+ request is pending is listed but adds nothing to the timeline until you are accepted.
640
+ - The list timeline has the public, unlisted and private statuses and boosts of its members, filtered as home
641
+ filters them (blocks, mutes, domain blocks, a follow's boosts and languages), with the list's `replies_policy`
642
+ deciding which replies to others are shown. Like home, it is worked out when read, so it also shows what members
643
+ posted before they were added.
644
+ - An exclusive list keeps its members' statuses and boosts out of home. Post notifications (`notify` on a follow)
645
+ are still sent for them, as in Mastodon.
646
+ - When your follow of a member ends (you unfollow it, either of you blocks the other, a domain block's cleanup
647
+ reaches it, it rejects or removes your follow, or its account is deleted), it leaves your lists, and following it
648
+ again does not bring it back. When an account you follow moves, its new account takes its place in your lists.
649
+
650
+ - Blocks, mutes and domain blocks in the Mastodon API, as Mastodon 4.5 has them: `POST /api/v1/accounts/:id/block`,
651
+ `/unblock`, `/mute` (`notifications`, default true, and `duration` in seconds, 0 for no expiry) and `/unmute`, which
652
+ answer the Relationship; `GET /api/v1/blocks` and `GET /api/v1/mutes` (with `mute_expires_at`), paged by Link
653
+ headers; and `GET`, `POST` and `DELETE /api/v1/domain_blocks` and `GET /api/v1/domain_blocks/preview`. Scopes are
654
+ `read:blocks`, `write:blocks`, `read:mutes`, `write:mutes` or `follow`.
655
+ - A block ends the follows between the two accounts both ways. A blocked remote account is sent an `Undo` of our
656
+ follow, a `Reject` of its follow, and the `Block`; an unblock sends the `Block`'s `Undo`. A blocked account (or
657
+ one on a blocked domain) is not mentioned in, or sent, the statuses you write after the block (deliveries already
658
+ queued are sent as queued, as in Mastodon).
659
+ - A mute is not federated. It expires after its duration: it stops applying at that time, whether or not it has
660
+ been removed yet. `muting_expires_at` in relationships shows the expiry.
661
+ - A domain block takes the domain as Mastodon normalizes it and refuses this instance's own domain. As in Mastodon
662
+ 4.5, it ends your follows to and from accounts on that domain (a `Reject` to each follower, an `Undo` of each of
663
+ your follows). Kopje does this in the background in bounded batches until done (the Queue and the 5-minute cron
664
+ continue it); meanwhile what you post is not delivered to followers there. Unblocking the domain stops the rest.
665
+ - `GET /api/v1/domain_blocks/preview` needs `write:blocks` (or `write` or `follow`), as in Mastodon.
666
+
667
+ - Web Push, as Mastodon 4.5 offers it. `POST`, `GET`, `PUT` and `DELETE /api/v1/push/subscription` keep one
668
+ subscription per access token, under the `push` scope, with Mastodon's alerts (per notification type) and policy
669
+ (`all`, `followed`, `follower`, `none`) and `server_key` from `VAPID_JWK`. The endpoint must be a public https URL
670
+ and the client keys valid, or the request answers 422. Each new notification is pushed to the recipient's
671
+ subscriptions that want it, from the Queue consumer, with the retries of deliveries; right before each POST, the
672
+ notification is checked again and the push dropped if it is gone or no longer shown. Pushes are encrypted as the
673
+ subscription asks (`standard`: RFC 8291 aes128gcm; otherwise the aesgcm draft most clients use), signed with VAPID
674
+ (RFC 8292), and carry Mastodon's payload, the subscription's access token included. A push service answering a 4xx
675
+ other than 408 and 429 ends the subscription, as Mastodon 4.5 does. Revoking a token or suspending an account
676
+ deletes its subscriptions. Without `VAPID_JWK`, the endpoints answer 404 and the instance advertises no key; Kopje
677
+ never makes one.
678
+
679
+ - Mastodon API endpoints that clients read at startup and that answered 404 before. `GET /api/v1/preferences` shows
680
+ the account's posting defaults (visibility, sensitive, language) and Mastodon's defaults for the reading preferences
681
+ (`reading:expand:media` `default`, `reading:expand:spoilers` false).
682
+
683
+ - `GET /api/v1/instance/rules` (the rules `/api/v2/instance` shows), `/api/v1/instance/peers` (the domains of known
684
+ remote accounts, at most 10,000), `/api/v1/instance/extended_description` (none set) and `/api/v1/instance/languages`
685
+ (ISO 639-1). `privacy_policy`, `terms_of_service`, `activity` and `domain_blocks` answer 404, as Mastodon does when
686
+ none is configured or the feature is off.
687
+
688
+ - `GET /api/v1/tags/:id`: any valid hashtag, with seven days of history counted from public statuses.
689
+ It needs no scope; `following` is false for a signed-in viewer, since tag follows do not exist yet.
690
+
691
+ - `GET /api/v1/accounts/familiar_followers`: for each requested account, the accounts the user follows that follow it
692
+ among up to 10,000 of the user's follows (at most 20 ids and 80 accounts each), without accounts the user blocks,
693
+ mutes (while the mute lasts) or whose domain the user blocks.
694
+
695
+ - Empty answers, under the scopes Mastodon requires, for features Kopje has no data for yet: `GET /api/v1/filters`,
696
+ `/api/v2/filters`, `/api/v1/followed_tags`, `/api/v1/featured_tags`, `/api/v1/accounts/:id/featured_tags`,
697
+ `/api/v1/endorsements`, `/api/v1/announcements` (any user token), `/api/v1/trends` (and `/trends/tags`,
698
+ `/trends/statuses`, `/trends/links`), `/api/v1/suggestions` and `/api/v2/suggestions`.
699
+
700
+ - `hide_collections`, Mastodon's setting to hide an account's network: `PATCH /api/v1/accounts/update_credentials` takes
701
+ it, and the Account entity and the credential account's `source` show it (`null` for a remote account, whose setting
702
+ Kopje does not learn). While it is on, the account's followers and following are listed to nobody but the account
703
+ itself, familiar followers show none of its followers (to anyone, as Mastodon) and leave it out as a follower, and the
704
+ ActivityPub followers and following collections show their size (`totalItems`) only and refuse a page (403), as
705
+ Mastodon's do.
706
+
707
+ - The `profile` OAuth scope, as Mastodon 4.5 has it: an app may register and request it alone or with other scopes. A
708
+ `profile` token reads `GET /api/v1/accounts/verify_credentials` (the same answer as with `read:accounts`) and no other
709
+ route that requires a scope; `read` does not include `profile`.
710
+
711
+ ### Changed
712
+
713
+ - An inbound `Announce` of a local status by an account its author blocks, or by an account on a domain its author
714
+ blocks, is ignored, as an inbound `Like` (a favourite or a reaction) by a blocked account already was; a `Like` by an
715
+ account on a blocked domain is now ignored too. A public or unlisted status is not visible to a remote account on a
716
+ domain its author blocks, as in Mastodon 4.5's status policy. Mastodon stores such favourites and boosts and filters
717
+ only their notifications.
718
+
719
+ - `GET /api/v1/accounts/:id/followers` and `/following` read an optional token (`read:accounts`), as Mastodon does,
720
+ and list as Mastodon 4.5 lists for the viewer: nothing when the account is suspended, or, to anyone but the account
721
+ itself, when it blocks the viewer or hides its network; and without the accounts the viewer blocks, mutes (while
722
+ the mute lasts) or is blocked by. A suspended account stays in the lists, shown redacted. The ActivityPub followers
723
+ and following collections of a suspended account answer 404, as its outbox does.
724
+
725
+ - Who an outbound activity goes to is decided by one rule, by what the activity does. Content (a new status, an edit,
726
+ a boost) still goes to no account you block or whose domain you block, and to no unavailable account (suspended, or
727
+ a remote account being deleted). The `Undo` of a boost now names and reaches the boosted status's author even when
728
+ you block them or their domain, as every other `Delete` and `Undo` does. A profile change, and a `Delete` or `Undo`,
729
+ now also reach a follower on a domain you have just blocked, until the domain block's cleanup has ended that follow,
730
+ as Mastodon 4.5 sends them; new statuses still do not reach that follower.
731
+
732
+ - Home and mention notifications also leave out a status that mentions or replies to an account you block or mute
733
+ (for mention notifications, a mute that hides notifications), as Mastodon filters them; so do post notifications
734
+ of accounts you follow with `notify`, whenever home leaves the status out.
735
+
736
+ - A post notification (`notify` on a follow) is no longer created, shown or pushed for a post by an account you mute,
737
+ even with a mute that keeps notifications, as Mastodon creates none: home leaves that post out.
738
+
739
+ - Home leaves out a reply whose conversation partner is unknown: a reply to a status the instance never stored, or one
740
+ continuing such a reply, as Mastodon's home does. A reply to an account whose deletion has been processed counts as
741
+ one, so removing that account no longer brings into home a reply that home left out. A reply whose parent is deleted
742
+ keeps its partner and stays in home as before. Your own replies are shown as before. Such a reply also creates, lists
743
+ and pushes no post notification (`notify` on a follow), as home leaves it out.
744
+
745
+ - The cutover leaves out a legacy list member that is neither the list's owner nor an account the owner follows or has
746
+ asked to follow, counted (`list_accounts:not-followed-left-out`): legacy kept members whatever the follows, while a
747
+ list in Kopje, as in Mastodon, holds an account only while you follow it. `verify-conversion` expects the same.
748
+
749
+ - The cutover converts a legacy domain block as Kopje's API stores one: lowercase, in punycode and without a trailing
750
+ dot, the form domain blocks are matched in. Rows that become the same block are merged, and a value that is no
751
+ domain name is dropped and counted (`domain_blocks:invalid-domain`), so the conversion stops on it until
752
+ `--accept-deletions`.
753
+
754
+ - `verify-conversion` also compares hashtags, status language and edit time, actor type and discoverability, each
755
+ local account's aliases and posting defaults (visibility, sensitivity, language), follow languages, the Like and
756
+ Block records of favourites and blocks, and client websites.
757
+
758
+ - The cutover converts a status's language as Kopje reads one from a remote object: the primary subtag of the first
759
+ language in `contentMap` (else `nameMap`, `summaryMap`), when it is two or three letters. It used to keep the whole
760
+ tag, and only when `contentMap` had a single language.
761
+
762
+ - The cutover names hashtags as Kopje does: a received `Hashtag` tag loses only its one leading `#`, and a legacy
763
+ `note_hashtags` value is kept whole, both then NFKC and lowercase. It used to drop a leading `#` or `#` from either,
764
+ so a tag named `#Foo` became `foo` rather than `#foo`.
765
+
766
+ - The cutover carries a local account that never set `discoverable` as not discoverable, as legacy showed and published
767
+ it, rather than as unset. A remote account that omits it stays unset, as Kopje stores a fetched actor.
768
+
769
+ - `VAPID_JWK` must hold the private key (`d`), not only the public point: a key without it now makes the instance
770
+ answer 503 as misconfigured, as any invalid value does.
771
+
772
+ - Hashtag timelines and a tag's history read only the statuses that can appear on them: each hashtag records whether
773
+ its status is public, and these reads go through an index of those hashtags, so their work no longer grows with the
774
+ tag's unlisted, private, direct or limited statuses. A hashtag timeline also reads each requested tag in status id
775
+ order from the page's cursor and stops once it has a page, so a page's work no longer grows with the tag's history.
776
+ What they show is unchanged. The cutover writes the mark and `verify-conversion` compares it.
777
+
778
+ - The content of an account being deleted is hidden as soon as its deletion starts: from the transaction that accepts a
779
+ remote account's `Delete`, its statuses, boosts, notifications and interactions are shown to nobody, it cannot be
780
+ followed, mentioned, boosted or found, and the account itself is shown redacted (`suspended: true`), while its purge
781
+ removes what it has in the background. Blocks and mutes of the account are removed last, so a post that mentions it
782
+ stays filtered for whoever blocks or mutes it while that mention remains.
783
+
784
+ - A suspended account's rescue documents (its actor document and WebFinger answers, served while the Store refuses
785
+ requests) are removed when the account is suspended: they answer 503 until a live request keeps the redacted
786
+ document, which is then served.
787
+
788
+ ### Fixed
789
+
790
+ - A `Move` whose new account a follower may not follow (the follower blocks it, or its domain) leaves that follower's
791
+ follow of the old account, and the old account in the follower's lists, as they are, as in Mastodon. Before, the old
792
+ follow was ended anyway.
793
+
794
+ - The cutover reads a legacy export that holds `d1_kv`, a table D1 now creates in a database by itself: the table list
795
+ of the export (`kopje-admin fingerprint tables-sql`) leaves it out, as it leaves out `_cf_*`, and the fingerprint and
796
+ the conversion ignore both in an export that has them. Before, such an export was refused as a schema mismatch.
797
+
798
+ - A remote actor that deletes itself again, after its earlier deletion's 30-day record has expired and it was stored
799
+ again, is purged to the end and its record renewed, also when the expired record has not been cleaned up yet.
800
+
801
+ - Home applies its rule to your own direct and limited statuses too. A converted Store can hold a legacy direct boost
802
+ of yours, and home used to list it with its original even when you may no longer see the original (its author
803
+ blocks you or is suspended, or it is private and you no longer follow its author) or you filter its author; such a
804
+ boost is now left out, as your other boosts are.
805
+
806
+ ### Instance changes
807
+
808
+ - Store schema: adds seven migrations, applied in order on the first request after the deploy; a rollback to an earlier
809
+ version needs the point-in-time restore described in [docs/upgrade.md](docs/upgrade.md).
810
+ - `0001_blocks_and_mutes`: `mutes.expires_at` with an index, and the `domain_block_cleanups` table. It is quick.
811
+ - `0002_web_push`: the subscription's encoding and sealed token on `push_subscriptions`, and the
812
+ `push_deliveries` table.
813
+ - `0003_domain_block_form`: drops the trailing dot that earlier converters kept on a legacy domain block, so the
814
+ block keeps applying now that blocks are compared as stored, and merges a row that then repeats a block of the
815
+ same account. It is quick.
816
+ - `0004_status_tags_public`: adds `status_tags.public`, marks the hashtags of public statuses, and indexes them.
817
+ Its work grows linearly with the hashtags stored (one pass, with a lookup of each one's status); locally, 500,000
818
+ hashtags took a few seconds.
819
+ - `0005_hide_collections`: adds `local_accounts.hide_collections`, 0 for every account. It is quick.
820
+ - `0006_account_deletion`: adds `accounts.deleted_at` with a partial index, and marks the account of a purge that
821
+ is still running. Its work grows linearly with the accounts stored (one check and one index pass); locally,
822
+ 200,000 accounts took under a second.
823
+ - `0007_list_members`: removes the list members whose list's owner neither is nor follows them (a Store converted
824
+ by an earlier release keeps them), and adds the trigger that removes a member with the follow. Its work grows
825
+ linearly with the list members stored (one check of each); it is quick.
826
+ - `wrangler.jsonc`: unchanged. Set the `VAPID_JWK` secret to turn Web Push on.
827
+
828
+ ## [0.1.0-rc.3] - 2026-10-14
829
+
830
+ A third release candidate of the first release, published under the npm dist-tag `next`.
831
+
832
+ ### Added
833
+
834
+ - The cutover can move a legacy instance's images out of Cloudflare Images. `kopje-admin images-export` downloads the
835
+ images the legacy data references under the operator's Images account, through the Images API with a token read
836
+ from `CF_IMAGES_TOKEN`, or else from the delivery URLs, which give copies in the stored format that may be resized.
837
+ It checks them as Kopje checks an upload and records them in `images.json`; a rerun downloads only what is new.
838
+ `kopje-admin convert --images` then maps avatars, headers, attachments and earlier versions of edited statuses to
839
+ local media rows, each with a file token and an original of its own (also when several show one image), drops
840
+ legacy's default profile images so Kopje's defaults apply, and writes the originals for R2 under their media ids.
841
+ `verify-conversion --images` checks the result independently. A missing image stops the conversion unless
842
+ `--accept-missing-images` is given. The served files are made by `kopje-admin media-rebuild` (below). Without
843
+ `--images`, the conversion is unchanged. See docs/cutover.md ("Media") and docs/cutover-runbook.md.
844
+
845
+ - `kopje-admin media-rebuild [--dry-run]` (`POST /admin/media/rebuild`, Access admin only) makes the served files of
846
+ local media whose files are missing from their originals in R2: media restored from a backup, which holds only the
847
+ originals, and images moved by the cutover. Each is re-encoded as an upload is, and its sizes in `meta` are corrected
848
+ to the files made. Rows whose files exist are skipped, so it can be run again; it reports rows whose original is
849
+ missing, whose type does not match their URLs, or that fail to re-encode, and stops on the Images quota or the
850
+ monthly transformation budget (exit 3). It writes only while nothing can delete media: before publication, or once
851
+ the Store's maintenance (`kopje-admin maintenance on`) has lasted 20 minutes (otherwise `rebuild-needs-readonly` or
852
+ `rebuild-settling`, exit 3). One call runs at a time under a Store lease, during which imports, resets, publication,
853
+ leaving maintenance, PITR restores and every media-deleting write are refused; after a PITR restore it waits for the
854
+ settle period again. A restore or a cutover thus serves its images when published
855
+ ([docs/backup.md](docs/backup.md), [docs/cutover-runbook.md](docs/cutover-runbook.md) step 8).
856
+
857
+ - Publication of a cutover converted with `--images` sends an `Update(Person)` to the followers of each local account
858
+ whose avatar or header the conversion changed, so other servers show the new profile images before Cloudflare Images
859
+ is retired. `convert --images` lists those accounts in the dump (the `kopje_state` row `profile_updates`), which
860
+ `verify-conversion` checks; `kopje-admin publish` queues the Updates in its transaction, reports them as
861
+ `profileUpdates`, and queues none when repeated; it is refused while a dump runs (`dump-in-progress`). The list
862
+ holds at most 100 distinct accounts: more changed profiles stop the conversion (`profile-updates-over-limit`). A dump
863
+ that declares fewer restorable `kopje_state` names, such as one from 0.1.0-rc.2, is still accepted
864
+ ([docs/cutover.md](docs/cutover.md), "Media").
865
+
866
+ ### Changed
867
+
868
+ - The setup guide and the instance template's README state that Kopje needs the Workers Paid plan: the Free plan's
869
+ 10 ms of CPU time and 50 subrequests per request are exceeded by signature checks on federated requests, the daily
870
+ backup and media processing.
871
+
872
+ ### Instance changes
873
+
874
+ - Store schema: unchanged (`0000_initial`).
875
+ - `wrangler.jsonc`: unchanged.
876
+
877
+ ## [0.1.0-rc.2] - 2026-10-14
878
+
879
+ A second release candidate of the first release, published under the npm dist-tag `next`.
880
+
881
+ ### Fixed
882
+
883
+ - The cutover tools read a real D1 export: `convert`, `verify-conversion` and `fingerprint export` accept the
884
+ `DELETE FROM sqlite_sequence` line that `wrangler d1 export` writes, match columns by name (a legacy database may
885
+ have re-added a column in another position, nullable), drop the notifications legacy created for the author of a
886
+ remote post and never showed (`--accept-deletions`), read outbox rows written before legacy migration 0016 as
887
+ targets, and replace lone surrogates in carried text, counting each.
888
+
889
+ - `kopje-admin import` bounds each call by what it writes, so a real-sized import no longer stops on the Durable
890
+ Object CPU limit: a chunk holds at most 2,000 statements in 4 MiB, and link statements are applied during verify in
891
+ bounded steps. An interrupted import saved by an earlier version cannot be resumed (`import-chunks-outdated`): run
892
+ `import-reset` and import again.
893
+
894
+ - An activity without addressing (a Follow, Accept, Reject, Like or their Undo) now goes to the recipient's shared
895
+ inbox when it has one, and to its personal inbox only otherwise. Some servers accept such activities at a personal
896
+ inbox but never process them, so a follow could stay pending. If the shared inbox answers 404, 405 or 410 (some
897
+ servers advertise one they have disabled), the activity is sent to the recipient's personal inbox on the same
898
+ server instead. An addressed activity that reaches a recipient without naming it still goes to that recipient's
899
+ personal inbox.
900
+
901
+ - The cutover rollback no longer reads a Queue holding only delayed messages as empty: Queues leaves a delayed message
902
+ out of the backlog's message count, so `kopje-admin cutover drain` and `kopje-admin cutover close` now count a Queue
903
+ as empty only when its message count and byte count are both 0, and fail closed on a malformed reading. Before, a
904
+ drain could finish while an older request was still delayed in Kopje's Queue, and `cutover close` could remove the
905
+ handoff receipts while a delayed copy of a handed-off request remained.
906
+
907
+ ### Instance changes
908
+
909
+ - Store schema: unchanged (`0000_initial`).
910
+ - `wrangler.jsonc`: unchanged.
911
+
912
+ ## [0.1.0-rc.1] - 2026-10-13
913
+
914
+ A release candidate of the first release, published under the npm dist-tag `next`.
915
+
916
+ ### Added
917
+
918
+ - The first release: the Mastodon API, ActivityPub federation, media, search, the `/setup` wizard, the daily
919
+ encrypted backup and the `kopje-admin` CLI.
920
+ - The instance template (`deploy/` in the repository), with the Deploy to Cloudflare button.
921
+ - The cutover from a legacy Wildebeest instance: `convert`, `verify-conversion`, `cutover-preflight`, `fingerprint`,
922
+ `maintenance-worker`, `maintenance-worker-check` and `cutover` in `kopje-admin`, and
923
+ [docs/cutover-runbook.md](docs/cutover-runbook.md).
924
+
925
+ ### Instance changes
926
+
927
+ - Store schema: `0000_initial`.
928
+ - `wrangler.jsonc`: as in the template, compatibility date `2026-10-11`. Tested with wrangler 4.149.0. The Queue
929
+ consumer has a dead-letter queue (`dead_letter_queue`), which must exist before the deploy.