hephaestus/heph.nvim
Erich Blume ee865e5635
Some checks failed
Build / validate (pull_request) Failing after 4s
heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a)
The primary surface begins (tech-spec §8): a Neovim plugin that is a thin
client of the local hephd over its unix-socket JSON-RPC.

- node.resolve {title} → Node|null (heph-core Store + dispatch): exact,
  owner-scoped, non-tombstoned alias-then-title match — the same mapping that
  materializes wiki links, so follow-link jumps to the node the stored link
  points at (never fuzzy search). Unit + rpc_socket integration tests.
- heph.nvim/: vim.uv unix-socket JSON-RPC client (blocking call via vim.wait,
  id-demuxed, partial-line buffered, luanil so JSON null → Lua nil; isolated
  Sessions for tests). Buffer-backed nodes (heph://node/<id>, acwrite;
  BufReadCmd→node.get / BufWriteCmd→node.update, whole-buffer body round-trips
  exactly through the CRDT). [[wiki-link]] follow on <CR>. Daily journal.
  :Heph command surface + completion.
- Headless e2e (§9): a self-contained busted-style runner (tests/e2e/runner.lua)
  — no external plugins, no network, deterministic CI exit codes. Specs: journal
  round-trip, follow-link (+ unresolved no-op), link-two-docs/backlink.
  `make -C heph.nvim test` builds hephd and runs it.

Docs: heph-nvim reference card, §14 tracker (11a done; 11b/11c/11d queued),
changelog fragment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:33:29 -07:00
..
lua/heph heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a) 2026-06-01 20:33:29 -07:00
plugin heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a) 2026-06-01 20:33:29 -07:00
tests/e2e heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a) 2026-06-01 20:33:29 -07:00
Makefile heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a) 2026-06-01 20:33:29 -07:00
README.md heph.nvim: RPC client + buffer editing + wiki-links + journal (slice 11a) 2026-06-01 20:33:29 -07:00

heph.nvim

The primary surface for hephaestus — an obsidian.nvim replacement that is a thin client of the local hephd daemon over its unix-socket JSON-RPC (tech-spec §8). Notes, journals, and tasks are edited as ordinary Neovim buffers; saving routes through the daemon.

Status: built in checkpointed slices. 11a (this slice) delivers the RPC client, buffer-backed editing, [[wiki-link]] following, and the daily journal. Task/agenda views (:Heph next/list/capture), the per-task log, and promotion arrive in 11b/11c. See tech-spec §14.

How it works

  • Buffer-backed nodes. A node is edited in a buffer named heph://node/<id>. Opening it loads the markdown body via node.get; :w saves the whole buffer back via node.update (the backend diffs it into a text CRDT, so sending the full buffer is correct). buftype=acwrite.
  • Links. Press <CR> on a [[wiki-link]] to jump to its node (resolved exactly via node.resolve). Unresolved links are allowed — they just notify.
  • Journal. :Heph today (or :Heph journal YYYY-MM-DD) opens a dated journal note; the id is deterministic so reopening is idempotent.

Setup

Requires a running hephd (hephd --mode local) and Neovim ≥ 0.10.

require("heph").setup({
  -- socket = "/run/user/1000/heph/hephd.sock",  -- defaults to hephd's path
  -- keymaps = true,                             -- <leader>h* maps
  -- autostart = false,                          -- spawn hephd if absent
})

Commands

Command Action
:Heph today Open today's journal
:Heph journal <YYYY-MM-DD> Open a dated journal
:Heph follow Follow the [[link]] under the cursor (also <CR>)
:Heph open <id> Open a node buffer by id

Tests

The e2e suite drives the plugin in headless Neovim against a real daemon:

make test          # builds hephd, runs the headless e2e suite

The suite uses a small self-contained busted-style runner (tests/e2e/runner.lua) — no external plugins and no network, so it is deterministic in CI. It needs only Neovim (≥ 0.10) and a built hephd.