# CURRENT.md — session state Last updated: 2026-09-11 This file tracks the work state. Read it first. Update it before you stop. ## Current focus (broad) Build the text-based communication layer: trusted tiers, context, response routing, MCP tools, and persistent logging. Voice, audio, and video stay deferred. ## In progress - None. The documentation pass is complete. The project is ready to resume. ## Done - Validated core bridge: protocol, actions, validation, structured errors, hard outbound rate limit. - Auth persistence: pinned `DATA_DIR`, token file, preload seeding, `VESKSLOP_HEADLESS`. - Daemon on the core-bridge transport. CDP stays as a development fallback. - Trusted-only triggers: DMs and direct mentions. Trust tiers: user, trusted, admin. - Context: 15 messages or 4000 characters, time stamps, file names only, incremental fetch, tmp cache with a size limit, fetch cooldown. - Continuation window: a rushed follow-up joins the request context. - Response policy: origin channel or DM. Sensitive commands default to DM. - Persistent action log: triggers, commands, replies, errors, rotation, and secret redaction. - Chat command: `poll` with number-emoji reactions, one vote per user, and auto results. - MCP tools: context, config, voice state, action log, and a read-only batch tool. - Event processing is serialized. Replayed events are dropped. - Unit tests for the pure logic and the cache. Mock end-to-end tests pass. - Live verification: state, DM send, and a synthetic trigger through the real event path. ## Next (in order) 1. Notification parsing: edits, deletes, reactions, and message references. 2. Reply-to-puppet counts as a trigger. 3. Per-user rate limit and command cooldowns. 4. Setup command with reaction-based multiple choice. 5. MCP event delivery decision: poll, stateful session, or a local event stream. 6. Collector account: read-only modules for voice membership fallback. 7. Later: voice actions, audio, video, client lightening, web debug UI, remote authentication. ## Open discussions (need the user) These items were discussed and wait for a decision or a live check. 1. **MCP event delivery.** The MCP server is stateless, so it cannot push events. Options: (a) poll the logs with a `since` cursor, (b) a stateful Streamable HTTP session with server notifications, (c) a separate local SSE or WebSocket event stream. Option (a) works today. Decide before an LLM attaches. 2. **Untrusted logging.** Untrusted interactions are ignored at this time. The separate 30-entry buffer exists but receives nothing. Confirm whether to log untrusted DMs and mentions again. 3. **Privacy pass.** Only token-shaped and `mfa.` strings are redacted, and only in the persistent action log. A fuller policy (retention, cache clearing, message redaction) is deferred. 4. **First live run of reactions.** `reaction.add` and the message-ID return are mock-verified only. The first real-client poll must confirm Discord's internal `addReaction` lookup. 5. **Setup command flow.** The reaction-based multiple-choice design is recorded in `TODO.md`. The poll command now provides the reaction machinery. ## Blocked / needs input - The original repo `zib/Veskslop` has a broken server-side git setup. Fetches and clones fail with `bad pack header` because a script (`/home/git/.sys_health_s3`) runs on the Veskslop read path. The admin must fix it. Use `zib/Veskslop-t` (remote `veskslop-t`) until then. - `main` on the original server is `68fc8bb` (zib, "Upload files to docs/images"). It diverged from the local `main` (`24447f5`). Reconcile after the server is fixed. ## Where to look - Backlog: `TODO.md` - Design documents: `docs/INDEX.md` - Agent rules: `AGENTS.md` - Daemon code: `poc/src/` - Core bridge code: `src/shared/puppetProtocol.ts`, `src/renderer/puppet/`, `src/main/puppetBridge.ts`