You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[tech-debt] plugins: consolidate three competing architectures + dedupe Structured (defined 7 times with drift) #8559
plugins/ hosts three competing plugin architectures with no shared contract:
Legacy monolith in plugins/main.py — 8 routers (_multion, basic, oauth, zapier, chatgpt, subscription, notifications/hey_omi, iq_rating). Half the imports commented out with # @DEPRECATED. _mem0/ and _multion/ only contain a single router.py each — scaffolding, not plugins.
Per-app FastAPI services — 28 omi-*-app/ directories, each with own Dockerfile/Procfile/railway.toml, deployed separately. NOT registered in plugins/main.py. Storage layer inconsistent: some use simple_storage.py, some use db.py+models.py.
plugins/apps-js/ — a Node.js app (OmiSend: email + presentations + Gmail + Supabase + SlidesGPT) in a completely different stack.
Symptom: the Structured conversation shape is defined 7 separate times with field drift:
plugins/models.py:8
plugins/omi-linear-app/models.py:140
plugins/omi-shopify-app/models.py:166
plugins/omi-hive-app/models.py:140
plugins/omi-shipbob-app/models.py:108
plugins/omi-dropbox-app/models.py:50 (already drifted: adds action_items: List[ActionItem] = [] that the others don't)
backend/models/structured.py:76 (source of truth)
Same pattern for ActionItem, Event, ConversationPhoto.
Scope of this PR (one coherent change — single large refactor)
Extract a shared omi-plugin-sdk Python package (models, storage interface, auth helper, webhook sender) and have all Python omi-*-app/ plugins depend on it via path or git dependency.
Replace the 7 Structured copies with imports from the SDK; fix the dropbox drift.
Delete the legacy monolith (plugins/main.py) and scaffolding dirs (_mem0/, _multion/) once confirmed unused — verify against actual deploy targets first.
Decide explicitly whether apps-js/ stays Node.js (and gets its own typed contract) or gets ported.
Acceptance criteria
class Structured is defined exactly once (in backend/models/ or the new SDK).
All Python plugins consume the shared SDK; storage layer is consistent.
Legacy monolith is removed or explicitly documented as kept.
Activity
Refactor plugins shared webhook models into SDK (BasedHardware#8599)
refactor(plugins): remove dead notification apps, routers, and SDK he…
refactor(plugins): remove dead notification apps, routers, and SDK he…