remove the email residue the extraction left in the platform

a sweep for remnants after 2026-08-18. nothing was broken - no dangling
import, symbol, route or permission key anywhere in src/ - but the platform
was still speaking the plugin's vocabulary in a dozen places.

the one that mattered is live code rather than prose: ChatPanelWrapper
hardcodes workspace.id === 'email' to send context: 'email', which is the
frontend half of the pair whose backend half (resolveEmailCwd) carries a
fifteen-line justification. the two ends now both say so, including that
adding a SECOND id there is the signal the platform needs a real way for a
plugin to declare a chat context.

the rest: two dead imports left by removing the settings section, an empty
'Email' type-section header, a protocol.ts section header with no members
naming the plugin's SSE design, and a queue comment pointing at
sidecar/email/sync-runner.ts - a path in another repository now.

CLAUDE.md, AGENTS.md and working-on-officer.md described email as a platform
feature, an app permission and a pm2 process. those are the files a fresh
agent reads first, so they were the highest-risk staleness in the tree.

TODO.md's whole Email section moved to the plugin's own repository. it held
OPEN items pointing at sidecar/email/store.ts, which is exactly how a leftover
list sends someone to edit files that do not exist.

the delete-account dialog promised it would remove email accounts and
playlists. both tables belong to plugins now, so that cascade only happens
where the plugin is installed - it now says 'anything an installed plugin
keeps for them' instead of naming two it cannot guarantee.

imapflow and mailparser STAY in package.json. the plugin has no package.json
of its own and resolves from the platform's node_modules, so removing them
would break the installed plugin's sidecar. the fix is giving plugins their
own dependency manifest, not deleting these.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-18 01:01:23 +00:00
co-authored by Claude Opus 5
parent e88e3a70cf
commit b63badaf67
10 changed files with 41 additions and 68 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
// Empty on purpose.
//
// Both handlers that lived here were email syncs, and they moved into the officer-email sidecar, which
// schedules its own work now (sidecar/email/sync-runner.ts). The queue itself is untouched and still
// Both handlers that lived here were email syncs, and they moved into the email plugin's sidecar, which
// schedules its own work now (the email plugin). The queue itself is untouched and still
// serves the Jobs screen; it simply no longer has anything to do with mail.
//
// New handlers register here by side-effect import, as before.
-1
View File
@@ -136,7 +136,6 @@ export type SidecarEvent =
| { type: 'vnc:password'; id: string; password: string }
| { type: 'vnc:stopped'; id: string }
| { type: 'vnc:error'; id: string; error: string }
// Email — new mail no longer crosses this socket; the sidecar owns the SSE stream and pushes directly
// OpenCode — the sidecar reports where its `opencode serve` is listening (random port) on connect
| { type: 'opencode:server'; port: number }
// OpenCode turn streaming (analog of claude:*): spawned ack, per-message stream, session id report