This version folds in the outside opinions, the follow-up product decisions, and the implementation now in the repo. The direction is clear: Penpad should stay a small personal primitive, but it should be safer and more useful when many machines and many local agents are involved.
- Three notes: editable Today, read-only Week, read-only Archive.
- Sunday-to-Monday rollover: Today moves into Week, then the completed Week moves into Archive and Week starts fresh.
- Search across Today, Week, and Archive, prioritized in that order.
- Mobile/PWA fixes: top view switcher, no horizontal page scroll, no zoom in notes/files, read-before-type behavior, keyboard dismissal on Files/Chat.
- File inspector fixes: image arrows move between files, arrows disappear while zoomed, swipe changes files only at 1x zoom, text and Markdown files preview with wrapping.
- FIFO upload queue: one active upload at a time, later uploads wait in order.
- Append-oriented API:
POST /appendfor safer additive agent writes. - Atomic server saves for Today.
- Append-only routed chat room with author, time, mentions, kind/status, and task ids for lightweight workflow messages.
- Agent watcher script with explicit mention routing, ack support, presence
heartbeats, persisted last-seen state, optional local
--exec, and SSE wakeups. - Presence API and web
@autocomplete for listening agents/machines. - Task lifecycle buttons on routed messages: claim, working, done, blocked.
- Discord/Telegram-style chat affordances implemented append-only: replies, pinned messages, unpin events, and toggleable quick reactions.
- Slack-style chat affordances: copyable message permalinks and local unread dividers with mark-read behavior.
- Resource guardrails: bounded note/chat/upload request bodies, bounded SSE clients, daemon request threads for clean shutdown, and memory-capped chat reads.
- Optional default-off
PENPAD_TOKENfor mutating routes, supported by web, TUI, widget, and watcher. /eventsServer-Sent Events stream for notes, files, chat, and presence.- TUI upload streaming so large files are not read fully into memory.
- Removed the external Google Fonts dependency.
-
History and restore Keep a rolling
.history/of Today saves and rollovers, addGET /history,GET /history/<rev>, andPOST /restore?rev=.... This is the biggest remaining protection against accidental overwrites. -
Export and backup helpers Add
GET /export.tar.gzplusscripts/backup.shandscripts/restore.shfor the current notes, chat, and files. This preserves the "just files" philosophy while giving any device a fast grab-and-go backup. -
Optimistic save conflicts Add
If-MatchorX-Base-Revsupport to/save, then let web/TUI offer actions when the remote changed while local edits are dirty: reload remote, copy local, overwrite remote, or append local. -
Conditional reads Add
ETag/If-None-Matchfor/content,/notes,/files/,/chat, and/presence. SSE now reduces churn for the web client, but conditional reads still help TUI and simple scripts. -
Agent helper CLI Add a tiny stdlib
penpad-cliforappend,chat,watch,put,get,rm, andexport. It should be a convenience wrapper around the same API, not a second product. -
Operational endpoints Add
GET /healthzandGET /statswith uptime, revisions, file count, chat count, listener count, and upload/save counters. -
Read-only mode Add
PENPAD_READONLY=1to allow browsing notes/files/chat while rejecting writes and deletes. This pairs nicely with temporary demos or screen shares. -
Preview and file polish Add pin/favorite files, rename, clearer binary/too-large preview messages, and consistent preview limits across web and TUI.
-
Focused tests Cover
safe_name, rollover,/append, token checks, presence heartbeat, watcher state, upload queue assumptions, range requests, and path traversal.
The chat room should be a command room, not a universal autonomous trigger. Humans write natural language, but agents only react when explicitly mentioned and only after a watcher on that machine has opted in. Penpad should make those hand-offs obvious and inspectable without becoming a multi-user platform.