Add text features: trusted triggers, context cache, response policy, MCP config tools

This commit is contained in:
Fisto
2026-09-11 15:31:23 +02:00
parent 23a1a8e593
commit 82f78bb2b4
20 changed files with 841 additions and 88 deletions
+22 -25
View File
@@ -6,51 +6,48 @@ This file tracks the work state. Read it first. Update it before you stop.
## Current focus (broad)
Rework the Vesktop integration into a validated capability layer ("core bridge"). Move all logic
into the external daemon. Keep upstream divergence small.
Build the text-based communication layer: trusted-only triggers, conversation context, response
routing, and MCP tools. Voice, audio, and video stay deferred.
## In progress
- None. The rework milestone is complete and verified live.
- None. The text milestone is complete and verified with the mock core.
## Done
- Audit of the earlier Vesktop patches. `src/` was reverted to upstream.
- Action protocol and validated renderer actions: `src/shared/puppetProtocol.ts`,
`src/renderer/puppet/actions.ts`.
- Core bridge wired: events, renderer init, main bridge, and the upstream hooks.
- Auth persistence re-added: pinned `DATA_DIR`, token file, preload seeding, `VESKSLOP_HEADLESS`.
- Validated core bridge: protocol, actions, validation, structured errors, hard outbound rate limit.
- Core bridge wired: renderer events, main bridge, and the upstream hooks.
- Auth persistence: pinned `DATA_DIR`, token file, preload seeding, `VESKSLOP_HEADLESS`.
- Daemon moved to the core-bridge transport. CDP stays as a development fallback.
- Mock core and trigger test added. The daemon runs without Electron.
- Live verification (2026-09-11): `get_state` returned the real account and 7 guilds, `send_dm`
reached zzib, and a synthetic owner message flowed through the real event path into the daemon
log with the command parsed.
- Module docs in `docs/` and the agent entry point in `AGENTS.md`.
- Trusted-only triggers: direct messages and direct mentions.
- Context: 15 messages or 4000 characters, file names only, incremental fetch, tmp cache with a
size limit.
- Response policy: origin channel or DM. Sensitive commands default to DM.
- MCP tools: context and config tools beside the earlier state and log tools.
- Unit tests for the pure logic and the cache. Mock end-to-end tests passed.
- Live verification: state, DM send, and a synthetic trigger through the real event path.
## Next (in order)
1. Keep `CURRENT.md`, `AGENTS.md`, and `docs/` in sync with each change.
2. Voice join and leave actions. Validated actions, then a trigger command.
3. Audio in and out with PipeWire.
4. Video streaming.
5. Fetch-based message read. The current read is cache-only.
6. Client lightening and the web debug UI.
7. Remote client authentication over LAN or Tailscale.
1. Notification parsing: edits, deletes, reactions, replies, and message references.
2. Persistent trigger log with rotation.
3. Per-user rate limit and command cooldowns.
4. More commands: `ask`, `summarize`, `context`, and `config`.
5. MCP event delivery for agents. Push or a stateful stream.
6. Multi-identity: a read-only collector account beside the puppet.
7. Later: voice, audio, video, client lightening, web debug UI, remote authentication.
## 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.
Gitea's branch metadata is stale, so the web UI does not show `headless` or `headless-rework`.
The admin must fix that hook and re-enable or repair push processing.
- Workaround: use `zib/Veskslop-t` (remote `veskslop-t`). All branches and tags are pushed there,
and its read path works.
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.
- The hero image was copied from the original `main` into `docs/images/veskslop-hero.png`.
## Where to look
- Backlog: `TODO.md`
- Design documents: `docs/INDEX.md`
- Agent rules: `AGENTS.md`
- Daemon code: `poc/src/`