Menu
popagent
publicLatest change 6edc7e928c57dab23c0973ed3f7ee70b3ebb72d5 - Initial popagent baseline by AkurAI Build
# Native channels implementation Popagent's first channel is a shared, PostgreSQL-backed `#general` dispatch surface. It uses the existing Mastra supervisor and durable task runtime rather than an IRC service or a synthetic IRC protocol. Mastra platform adapters remain a future integration boundary. ## 1. Contracts and persistence - [ ] Define shared channel settings, channel, message, and dispatch DTOs in `src/api-types.ts`. - [ ] Add a retry-safe versioned PostgreSQL migration for singleton channel settings, channels, and messages. - [ ] Implement stores with bounded input, chronological pagination, and singleton configuration semantics. - [ ] Seed `#general` exactly once without recreating user-deleted configuration. - [ ] Add disposable-PostgreSQL contract tests and migration-marker coverage. ## 2. Dispatch runtime - [ ] Add channel APIs for settings, channel listing, message history, and posting. - [ ] Persist the user message before dispatch and correlate it with a durable background task. - [ ] Require a repository workspace for dispatch so existing workspace containment remains intact. - [ ] Mirror queued/running/completed/failed/cancelled task state and final output into channel messages without duplicating execution logic. - [ ] Preserve API authentication, request validation, abort behavior, and task recovery semantics. ## 3. Web UI - [ ] Add a `#general` channel surface to primary navigation with history, composer, workspace selection, dispatch state, and agent activity. - [ ] Add a Channels settings page with persisted enablement, channel name, dispatch behavior, context-message limit, streaming preference, and tool-display preference. - [ ] Cover loading, empty, failure, disabled, queued, running, completed, and cancelled states. - [ ] Ensure keyboard operation, focus behavior, mobile layout, and accessible status announcements. ## 4. Mastra integration boundary - [ ] Keep channel execution on Popagent's existing Mastra supervisor pipeline and request-context snapshot. - [ ] Document how future Mastra Chat SDK adapters (Slack, Discord, Web, etc.) map external threads into the same channel/task contracts. - [ ] Do not add a custom IRC server or claim that Mastra's Web adapter provides a shared room. ## 5. Verification and deployment - [ ] Run narrow store, route, runtime, and UI tests. - [ ] Run `bunx tsc --noEmit` and the full `bun test` suite. - [ ] Verify desktop and mobile behavior in a real browser. - [ ] Update `AGENTS_AGENT.md`, `AGENTS_UI.md`, repository skills, and this checklist as facts change. - [ ] Restart `popagent.service`, verify HTTP health, and confirm no IRC containers remain.