|
Some checks failed
Build / validate (pull_request) Failing after 3s
Backend (TDD):
- task.promote {container_id, item_ref, attention?, project?}: mint a committed
task from the item_ref-th `- [ ]` context item (1-based, document order via a
new extract::context_item_lines) and rewrite that source line into a [[link]]
to it. Unit + rpc_socket tests.
- resolve_id now excludes canonical-context docs, so [[Task Title]] resolves to
the task, not its identically-titled context doc (deterministic; a general fix
surfaced by promotion's ULID-tiebreak ambiguity).
Plugin: :Heph promote / promote_under_cursor (save-if-dirty → compute item index
with a code-fence-aware scanner mirroring extract.rs → task.promote → reload the
rewritten buffer). e2e spec (f): promote a context line, assert the new task in
next, the source line became a link, and the container backlinks the task.
CI via Dagger: a test_nvim function bakes a pinned, arch-detected Neovim
(v0.11.2 — Debian's is too old for vim.uv) onto rust:1-bookworm, builds hephd,
and runs the self-contained shim suite (cargo + target cache volumes);
build.yaml calls `dagger call test-nvim`. run.lua now fails on zero specs (no
false-green). Validated end-to-end: passing suite → exit 0, failing spec →
Dagger exit 1.
117 Rust tests + 7 nvim e2e specs green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| lua/heph | ||
| plugin | ||
| tests/e2e | ||
| README.md | ||
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 vianode.get;:wsaves the whole buffer back vianode.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 vianode.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:
mise run test-nvim # 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. Dev runs use system-installed Neovim (≥ 0.10) + rustc; CI runs
the same suite inside a Dagger container that provides them (slice 11c).