kiwi/app/db/migrations
pyr0ball 6e954c5c6e
Some checks failed
CI / Backend (Python) (push) Has been cancelled
CI / Frontend (Vue) (push) Has been cancelled
Mirror / mirror (push) Has been cancelled
feat(ap): issue #113 — ActivityPub federation + Mastodon OAuth
Full ActivityPub implementation wired to cf-core.activitypub module:

Endpoints (root-level, not under /api/v1):
  GET  /.well-known/webfinger  — WebFinger JRD (AP_ENABLED only)
  GET  /ap/actor               — Instance actor document
  POST /ap/actor/inbox         — Incoming Follow/Undo (dedup + Accept dispatch)
  GET  /ap/outbox              — OrderedCollection of community posts
  GET  /ap/posts/{slug}        — Individual AP Note
  GET  /ap/followers           — Follower count collection
  GET  /ap/following           — Empty following collection

Mastodon OAuth (under /api/v1/social/mastodon/):
  POST   /connect      — Dynamic app registration + OAuth flow start
  GET    /callback     — Code exchange + token storage (Fernet-encrypted)
  DELETE /disconnect   — Token revocation
  GET    /status       — Connection status

Config: AP_ENABLED, AP_HOST, AP_KEY_PATH, AP_TOKEN_ENCRYPTION_KEY
Migration 042: ap_followers, ap_deliveries, ap_received, mastodon_tokens tables
Key manager: auto-generates RSA-2048 keypair on first boot if AP_ENABLED
Delivery service: deliver_to_followers() with 3-retry exponential backoff + DB log
Post publish: background fan-out to AP followers + Mastodon when opted-in

All AP endpoints gracefully degrade (404) when AP_ENABLED=false.
2026-05-11 17:55:51 -07:00
..
001_initial_schema.sql chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
002_inventory_and_products.sql chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
003_receipt_data.sql chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
004_tagging_system.sql chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
005_receipt_staged_status.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
006_element_profiles.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
007_recipe_corpus.sql fix: data pipeline — R-vector parser, allrecipes dataset, unique recipe index 2026-03-31 21:36:13 -07:00
008_substitution_pairs.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
009_staple_library.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
010_recipe_feedback.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
011_rate_limits.sql feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
012_user_settings.sql feat: recipe engine Phase 3 — StyleAdapter, LLM levels 3-4, user settings 2026-03-31 14:15:18 -07:00
013_background_tasks.sql fix: renumber background_tasks migration 006→013 (conflict with element_profiles) 2026-03-31 14:28:10 -07:00
014_nutrition_macros.sql feat: recipe engine — assembly templates, prep notes, FTS fixes, texture backfill 2026-04-02 22:12:35 -07:00
015_recipe_fts.sql fix: add FTS5 sync triggers so recipe inserts are indexed immediately 2026-04-02 23:14:22 -07:00
016_recipe_fts_triggers.sql fix: add FTS5 sync triggers so recipe inserts are indexed immediately 2026-04-02 23:14:22 -07:00
017_household_invites.sql feat: add household_invites migration (017) 2026-04-04 22:27:56 -07:00
018_saved_recipes.sql feat: saved recipes, recipe browser, and recipe detail panel 2026-04-08 14:35:02 -07:00
019_recipe_collections.sql feat: saved recipes, recipe browser, and recipe detail panel 2026-04-08 14:35:02 -07:00
020_browser_telemetry.sql feat: saved recipes, recipe browser, and recipe detail panel 2026-04-08 14:35:02 -07:00
021_recipe_browser_fts.sql perf(browser): replace LIKE scans with FTS5; cache category counts 2026-04-08 23:10:48 -07:00
022_meal_plans.sql feat(db): add meal_plans, slots, prep_sessions, prep_tasks migrations (022-025) 2026-04-12 13:11:34 -07:00
022_recipe_generic_flag.sql chore: commit in-progress work -- tag inferrer, imitate endpoint, hall-of-chaos easter egg, migration files, Dockerfile .env defense 2026-04-14 13:23:15 -07:00
023_meal_plan_slots.sql feat(db): add meal_plans, slots, prep_sessions, prep_tasks migrations (022-025) 2026-04-12 13:11:34 -07:00
024_prep_sessions.sql feat(db): add meal_plans, slots, prep_sessions, prep_tasks migrations (022-025) 2026-04-12 13:11:34 -07:00
025_prep_tasks.sql feat(db): add meal_plans, slots, prep_sessions, prep_tasks migrations (022-025) 2026-04-12 13:11:34 -07:00
028_community_pseudonyms.sql feat(community): migration 028 — community_pseudonyms table in per-user kiwi.db 2026-04-13 08:13:39 -07:00
029_inferred_tags.sql chore: commit in-progress work -- tag inferrer, imitate endpoint, hall-of-chaos easter egg, migration files, Dockerfile .env defense 2026-04-14 13:23:15 -07:00
030_opened_date.sql feat: pantry intel cluster — #61 expiry display, #64 cook log, #66 scaling, #59 open-package tracking 2026-04-16 06:01:25 -07:00
031_disposal_reason.sql feat: partial consumption tracking and waste/disposal logging (#12 #60) 2026-04-16 07:28:21 -07:00
032_meal_plan_unique_week.sql fix: meal planner week add button crashing on r.name / add duplicate guard 2026-04-16 10:46:28 -07:00
033_shopping_list.sql fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
034_recipe_jobs.sql feat(recipes): async L3/L4 recipe job queue with poll endpoint 2026-04-19 21:44:27 -07:00
035_sensory_tags.sql feat: sensory profile filter — texture/smell/noise filtering for Browse and Find (kiwi#51) 2026-04-24 09:47:48 -07:00
036_captured_products.sql feat: visual label capture for unenriched barcodes (kiwi#79) 2026-04-24 17:57:25 -07:00
037_products_source_visual_capture.sql fix: extend source CHECK constraints to include visual_capture (kiwi#79) 2026-04-25 08:46:44 -07:00
038_inventory_items_source_visual_capture.sql fix: extend source CHECK constraints to include visual_capture (kiwi#79) 2026-04-25 08:46:44 -07:00
039_saved_recipes_drop_fk.sql fix(saved-recipes): resolve FK constraint, null title, and load reliability 2026-04-25 21:44:10 -07:00
040_corrections.sql feat: corrections router (#73) + Magpie flywheel hook (#28) 2026-04-25 23:31:20 -07:00
041_user_recipes.sql feat: recipe scanner — photo to structured recipe (kiwi#9) 2026-04-27 08:23:01 -07:00
042_activitypub.sql feat(ap): issue #113 — ActivityPub federation + Mastodon OAuth 2026-05-11 17:55:51 -07:00