Docs pass: refresh statuses, add resume checklist, poll and log decisions
This commit is contained in:
+3
-1
@@ -18,6 +18,8 @@ This file lists the project documents.
|
||||
|
||||
| File | Scope |
|
||||
| --- | --- |
|
||||
| [../AGENTS.md](../AGENTS.md) | Agent entry point and guardrails |
|
||||
| [../AGENTS.md](../AGENTS.md) | Agent entry point, guardrails, resume checklist |
|
||||
| [../CURRENT.md](../CURRENT.md) | Live session state |
|
||||
| [../TODO.md](../TODO.md) | Ordered backlog |
|
||||
| [../poc/README.md](../poc/README.md) | Spike and daemon run commands |
|
||||
| [../README.md](../README.md) | Project introduction |
|
||||
|
||||
@@ -55,6 +55,8 @@ when the action list changes.
|
||||
| Pacing | `poc/src/pacing.ts` | Implemented |
|
||||
| Trigger log and trust list | `poc/src/communication.ts`, `poc/src/puppet.ts` | Implemented and verified live |
|
||||
| Context cache and response policy | `poc/src/message-cache.ts`, `poc/src/puppet.ts` | Implemented and verified with the mock |
|
||||
| Chat commands and polls | `poc/src/puppet.ts`, `poc/src/communication.ts` | Implemented and verified with the mock |
|
||||
| Persistent action log | `poc/src/action-log.ts` | Implemented |
|
||||
| Voice, audio, video | Not started | Not started |
|
||||
|
||||
## Data flow
|
||||
|
||||
+4
-7
@@ -53,11 +53,8 @@ can occur.
|
||||
|
||||
| Part | Status |
|
||||
| --- | --- |
|
||||
| QR login and token file | Implemented and verified |
|
||||
| Pinned profile directory | Implemented and verified. Currently out of the tree after the CDP pivot. |
|
||||
| Token seeding | Implemented and verified. Currently out of the tree after the CDP pivot. |
|
||||
| Headless first-launch skip | Implemented and verified. Currently out of the tree after the CDP pivot. |
|
||||
| QR login and token file | Implemented and verified live |
|
||||
| Pinned profile directory | Implemented and verified live |
|
||||
| Token seeding | Implemented and verified live |
|
||||
| Headless first-launch skip | Implemented and verified live |
|
||||
| Devtools patch | Upstream Vesktop code. Keep it. |
|
||||
|
||||
The three out-of-tree parts are small. Add them again with the core bridge, at the same time as the
|
||||
bridge hooks.
|
||||
|
||||
+19
-1
@@ -30,7 +30,8 @@ the validated core bridge.
|
||||
**Reason.** CDP needs no Vesktop patch. However, CDP evaluates raw code in the page. It bypasses the
|
||||
core-side validation and rate limits. The project keeps the probe as a development tool.
|
||||
|
||||
**Status.** The daemon uses CDP at this time. The core-bridge transport is pending.
|
||||
**Status.** The primary transport is the validated core bridge. The CDP client and the probe stay in
|
||||
`poc/` as development tools.
|
||||
|
||||
## ADR-4: No bespoke client
|
||||
|
||||
@@ -79,3 +80,20 @@ more.
|
||||
**Decision.** The only permitted live-send target is user zzib (`177117296140091393`).
|
||||
|
||||
**Reason.** Tests must not send messages to other users. DMs to zzib are safe and permitted.
|
||||
|
||||
## ADR-10: Poll command
|
||||
|
||||
**Decision.** The poll command accepts `|` or `//` as separators, an optional quoted question, and
|
||||
many reactions per user. A bare command shows help.
|
||||
|
||||
**Reason.** The pipe is hard to type on some keyboards. `//` is safe in Discord markdown when it has
|
||||
whitespace on both sides, so URLs stay in one piece. Many selections match how people use polls in
|
||||
group chats. A bare command gives the user the syntax without a failed poll.
|
||||
|
||||
## ADR-11: Persistent action log
|
||||
|
||||
**Decision.** Write triggers, continuations, commands, replies, and errors to a rotating JSONL file.
|
||||
Redact token-shaped strings before the write.
|
||||
|
||||
**Reason.** The in-memory trigger log resets at restart. The action log gives a durable audit trail
|
||||
without storing raw credentials.
|
||||
|
||||
+13
-4
@@ -5,14 +5,17 @@ This document describes the test setup, the run commands, and the known gaps.
|
||||
## Unit tests
|
||||
|
||||
The pure daemon logic has unit tests. The tests cover the ring buffers, the mention helpers, the
|
||||
command parser, the trust check, and the pacing range.
|
||||
command parser, the poll parser, the trust helpers, the context assembly, the redaction, and the
|
||||
pacing range. The cache tests cover merge, dedupe, trimming, and eviction.
|
||||
|
||||
```sh
|
||||
cd poc
|
||||
pnpm test:comm
|
||||
pnpm test:cache
|
||||
```
|
||||
|
||||
The file is `poc/src/test-communication.ts`. The tests do not need Discord or Vesktop.
|
||||
The files are `poc/src/test-communication.ts` and `poc/src/test-cache.ts`. The tests do not need
|
||||
Discord or Vesktop.
|
||||
|
||||
## Type checks
|
||||
|
||||
@@ -49,6 +52,10 @@ VESKSLOP_SOCKET=/tmp/vesktop-puppet-mock.sock TEST_TRIGGER_CONTENT="whitelist li
|
||||
Expected result: the daemon log shows one trusted entry with the parsed command. The mock log shows
|
||||
the reply (`message.send`). The reply wait is inside the 500 to 2800 ms window.
|
||||
|
||||
The mock also covers tiers, continuation, polls, reactions, and the action log. Set config values
|
||||
with `set_puppet_config` before a test. Inject a reaction with
|
||||
`TEST_TRIGGER_REACTION=1 TEST_REACTION_MESSAGE_ID=msg-1 TEST_REACTION_EMOJI="1️⃣" pnpm test:trigger`.
|
||||
|
||||
## CDP probe
|
||||
|
||||
The probe checks the CDP fallback transport. Start the client with
|
||||
@@ -89,7 +96,7 @@ Notes:
|
||||
|
||||
- `VENCORD_USER_DATA_DIR` pins the Electron profile. The profile holds the client session.
|
||||
- Write `{"firstLaunch": false}` to `<DATA_DIR>/state.json` before the first start. This step skips
|
||||
the first-launch window. The `VESKSLOP_HEADLESS=1` flag does the same job when it is in the tree.
|
||||
the first-launch window. The `VESKSLOP_HEADLESS=1` flag does the same job.
|
||||
- The container needs `libasound.so.2` for Electron. Extract the library locally when the system
|
||||
package is not available.
|
||||
|
||||
@@ -120,5 +127,7 @@ The CDP transport was verified earlier with the same checks.
|
||||
| Gap | Effect |
|
||||
| --- | --- |
|
||||
| Live trigger tests need an incoming message. | Use the mock core, or send from zzib's account. |
|
||||
| `reaction.add` and the message ID return are mock-verified only. | Confirm Discord's internal `addReaction` lookup on the first live run. |
|
||||
| Polls and other chat commands are mock-verified only. | Run them on the live client. |
|
||||
| `message.read` is cache-only. | A channel that the client never opened returns zero messages. |
|
||||
| Voice, audio, and video are not started. | No test coverage. |
|
||||
| Voice, audio, and video are not started. | No coverage. |
|
||||
|
||||
Reference in New Issue
Block a user