feat(core): add Discord Rich Presence integration

Introduce optional Discord activity updates across config, runtime, tests, and docs so playback context appears in Discord without destabilizing app lifecycle. Tune default refresh cadence to reduce pause/resume lag during real sessions.
This commit is contained in:
2026-02-22 17:25:55 -08:00
parent edfe6640ac
commit f1dc418e2d
17 changed files with 238 additions and 346 deletions

View File

@@ -85,3 +85,4 @@ Read first. Keep concise.
| `codex-task103-jellyfin-main-composer-20260222T220441Z-m8p1` | `codex-task103-jellyfin-main-composer` | `Execute TASK-103 Jellyfin runtime wiring extraction from src/main.ts via plan-first workflow without commit.` | `done` | `docs/subagents/agents/codex-task103-jellyfin-main-composer-20260222T220441Z-m8p1.md` | `2026-02-22T22:49:30Z` |
| `codex-task109-discord-presence-20260222T220537Z-lkfv` | `codex-task109-discord-presence` | `Execute TASK-109 Discord Rich Presence integration end-to-end with plan-first workflow (no commit)` | `handoff` | `docs/subagents/agents/codex-task109-discord-presence-20260222T220537Z-lkfv.md` | `2026-02-22T22:36:40Z` |
| `opencode-task103-jellyfin-main-composer-20260222T221152Z-n3p7` | `opencode-task103-jellyfin-main-composer` | `Implement TASK-103 Jellyfin runtime wiring extraction from main.ts into composer module(s), tests, docs, and required validations (no commit).` | `in_progress` | `docs/subagents/agents/opencode-task103-jellyfin-main-composer-20260222T221152Z-n3p7.md` | `2026-02-22T22:11:52Z` |
| `opencode-task109-discord-presence-20260223T011027Z-j9r4` | `opencode-task109-discord-presence` | `Finalize TASK-109 Discord Rich Presence with plan-first workflow and backlog closure.` | `in_progress` | `docs/subagents/agents/opencode-task109-discord-presence-20260223T011027Z-j9r4.md` | `2026-02-23T01:15:39Z` |

View File

@@ -0,0 +1,41 @@
# Agent: `opencode-task109-discord-presence-20260223T011027Z-j9r4`
- alias: `opencode-task109-discord-presence`
- mission: `Finalize TASK-109 Discord Rich Presence integration end-to-end with plan-first workflow (no commit).`
- status: `in_progress`
- branch: `main`
- started_at: `2026-02-23T01:10:27Z`
- heartbeat_minutes: `5`
## Current Work (newest first)
- [2026-02-23T01:10:27Z] intent: load backlog context for TASK-109, write execution plan, run required validations, and finalize backlog ticket if all criteria pass.
- [2026-02-23T01:10:27Z] assumptions: TASK-109 code/docs edits already present in working tree from prior handoff and should be validated/closed instead of reimplemented.
- [2026-02-23T01:11:58Z] progress: created closure plan at `docs/plans/2026-02-23-task-109-discord-rich-presence-closure.md`; next record plan in Backlog task and execute validations.
- [2026-02-23T01:15:39Z] progress: addressed user-reported delayed Playing resume update by reducing `discordPresence.updateIntervalMs` default from 15000 to 3000 and updating docs/examples/tests; focused config + presence tests green.
## Files Touched
- `docs/subagents/INDEX.md`
- `docs/subagents/collaboration.md`
- `docs/subagents/agents/opencode-task109-discord-presence-20260223T011027Z-j9r4.md`
- `docs/plans/2026-02-23-task-109-discord-rich-presence-closure.md`
- `src/config/definitions/defaults-integrations.ts`
- `src/config/config.test.ts`
- `src/config/resolve/jellyfin.test.ts`
- `config.example.jsonc`
- `docs/public/config.example.jsonc`
- `docs/configuration.md`
## Assumptions
- Backlog MCP available and authoritative for task metadata.
- Existing TASK-109 diffs in working tree are in scope and should be preserved.
## Open Questions / Blockers
- None.
## Next Step
- Write plan artifact via writing-plans skill, then execute with executing-plans skill including parallel subagents where safe.

View File

@@ -143,3 +143,8 @@ Shared notes. Append-only.
- [2026-02-22T22:10:10Z] [codex-kiku-modal-overlay-20260222T220502Z-r4m1|codex-kiku-modal-overlay] overlap note: touching `src/core/services/field-grouping-overlay.ts` + tests to fix Kiku modal auto-shown visible overlay restore when modal closes.
- [2026-02-22T22:07:38Z] [codex-kiku-modal-overlay-20260222T220502Z-r4m1|codex-kiku-modal-overlay] completed fix: synchronized visible-overlay state when Kiku request opens via external sender; added regression test for hidden->open->resolve->hidden visibility restoration; focused field-grouping/overlay tests passing.
- [2026-02-22T22:11:52Z] [opencode-task103-jellyfin-main-composer-20260222T221152Z-n3p7|opencode-task103-jellyfin-main-composer] overlap note: implementing user-requested TASK-103 extraction in `src/main.ts`, `src/main/runtime/composers/jellyfin-*.ts`, composer tests, and `docs/architecture.md`; coordinating with active `codex-task103-...` session to avoid clobber.
## 2026-02-23
- [2026-02-23T01:10:27Z] [opencode-task109-discord-presence-20260223T011027Z-j9r4|opencode-task109-discord-presence] starting TASK-109 closure pass via Backlog MCP + writing-plans/executing-plans; scope validate existing Discord config/runtime/docs changes, close remaining DoD evidence, and finalize task status if gates pass.
- [2026-02-23T01:15:39Z] [opencode-task109-discord-presence-20260223T011027Z-j9r4|opencode-task109-discord-presence] user feedback from real Discord session: status resumed to Playing with noticeable delay; tuned default `discordPresence.updateIntervalMs` from 15000 to 3000 in defaults/docs/examples and updated focused config expectations; reran focused config + discord presence tests green.