Commit Graph

16 Commits

Author SHA1 Message Date
Levi Neely 5d6a94ef42 Update frontmatter on title/keywords/signature change 2026-03-21 23:16:36 +01:00
Levi Neely 58911d5753 Fix tag formats to match denote.el spec; normalize tags on parse
- Md (yaml+toml): tags now marshal as ["tag1", "tag2"] (quoted)
- Txt: tags now marshal as double-space-separated (tag1  tag2)
- Add parseTags() to Unmarshal: accepts any delimiter format and
  normalizes each tag to [a-z0-9]+, enabling lenient frontmatter
  input on body writes
- Fix results tests to use UnmarshalStrict where errors were expected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:24:06 +01:00
Levi Neely 6e1fc063fa Remove event stream and pubsub bus; add file rename on metadata change
The pubsub event endpoint was only used for physical file sync, which is
no longer needed now that reads/writes go directly through 9P. Removed
the /event file, pubsub message bus, and all Publish calls.

Added renameNote helper that renames the physical file and updates
note.Path whenever title, keywords, signature, or body frontmatter
changes, keeping the denote filename in sync with in-memory metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:10:37 +01:00
Levi Neely 6dd103482b Fix n/ directory listing when note count exceeds 9P read buffer
readDir was slicing the serialized dir entry bytes at the raw byte
boundary, splitting entries mid-stream. The plan9 client's dirUnpack
stops on a truncated entry, so 9pfuse received nothing usable.

Fix readDir to return only complete entries per read, as required by
the 9P spec. Also warn-and-skip on ExtractMetadata errors in LoadAll
instead of aborting the entire directory walk.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 21:34:15 +01:00
Levi Neely 8a6c90f160 Add event stream via pubsub
- Add /event file for pub/sub event notifications
- Events: n (new), u (update), r (rename), d (delete)
- Format: '<type> <identifier>' per line
- Blocking read with 30s timeout
2026-03-20 18:00:34 +01:00
Levi Neely 1eb8c71e8a Update plan9port branch name 2026-03-20 17:37:10 +01:00
Levi Neely 9fc80cc207 Require lneely/plan9port wayland branch for 9pfuse fix 2026-03-20 17:35:44 +01:00
Levi Neely 4f2a6423b0 Add DENOTE_9MOUNT env var for mount path 2026-03-20 17:18:14 +01:00
Levi Neely c5c2c4ab1d Document FUSE mount and 9pfuse dependency 2026-03-20 17:13:35 +01:00
Levi Neely 76f7baae25 Add FUSE mount support (default: ~/mnt/denote) 2026-03-20 17:10:17 +01:00
Levi Neely c58b03b665 Sync frontmatter on body write; add refresh ctl command 2026-03-20 17:04:32 +01:00
Levi Neely 760f9549e0 body: include frontmatter for now 2026-03-20 16:59:08 +01:00
Levi Neely def12a01cc Add body endpoint for reading/writing note content 2026-03-20 16:58:28 +01:00
Levi Neely 7b32240415 Fix nil pointer: convert findNote to method 2026-03-20 16:55:30 +01:00
Levi Neely e362662175 Fix write handling: accumulate in buffer, dispatch on clunk 2026-03-20 16:51:54 +01:00
Levi Neely bb6eeec1b3 Initial commit: denotesrv 9P server for denote notes 2026-03-20 16:46:47 +01:00