daemon, nix, docs: let an embedder give its sessions the terminfo entry #181

Merged
natsukium merged 1 commit from daemon/embedder-terminfo into main 2026-10-19 01:58:17 +09:00
Owner

Closes #179

A program serving felis-daemon in-process (adroit) stamps TERM=xterm-felis but could not resolve it: the shipped-terminfo lookup searches beside the embedder's executable, and the entry's source lived outside every crate.

  • The source moves to crates/felis-daemon/terminfo/felis.terminfo (inside the package, so include_str! survives cargo package) and is exported as felis_daemon::TERMINFO_SOURCE.
  • DaemonCaps::terminfo_dir: Option<PathBuf> names the directory listed first in each session's TERMINFO_DIRS (Unix only), defaulting to the shipped one; None adds nothing. It reaches the plain create and the bare-launch cwd retry. The daemon never runs tic.
  • Nix package, dev shell, compile-terminfo.sh, the felis doctor hint, Homebrew PACKAGING (+ self-test case), docs and CHANGELOG repointed.

Follow-up outside this repo

The Homebrew tap formula compiles share/terminfo/felis.terminfo by path and needs the new path at the next release; the bump PR opens as a draft since share/ changed.

Verification

  • just check (4273 tests), just release-homebrew-test, nix build .#default (ships share/terminfo/x/xterm-felis).
  • The new integration test fails when the caps field is not threaded and when the cwd retry drops it; the new Homebrew case fails without the PACKAGING entry.
Closes #179 A program serving `felis-daemon` in-process (adroit) stamps `TERM=xterm-felis` but could not resolve it: the shipped-terminfo lookup searches beside the embedder's executable, and the entry's source lived outside every crate. - The source moves to `crates/felis-daemon/terminfo/felis.terminfo` (inside the package, so `include_str!` survives `cargo package`) and is exported as `felis_daemon::TERMINFO_SOURCE`. - `DaemonCaps::terminfo_dir: Option<PathBuf>` names the directory listed first in each session's `TERMINFO_DIRS` (Unix only), defaulting to the shipped one; `None` adds nothing. It reaches the plain create and the bare-launch cwd retry. The daemon never runs `tic`. - Nix package, dev shell, `compile-terminfo.sh`, the `felis doctor` hint, Homebrew `PACKAGING` (+ self-test case), docs and CHANGELOG repointed. ## Follow-up outside this repo The Homebrew tap formula compiles `share/terminfo/felis.terminfo` by path and needs the new path at the next release; the bump PR opens as a draft since `share/` changed. ## Verification - `just check` (4273 tests), `just release-homebrew-test`, `nix build .#default` (ships `share/terminfo/x/xterm-felis`). - The new integration test fails when the caps field is not threaded and when the cwd retry drops it; the new Homebrew case fails without the `PACKAGING` entry.
daemon, nix, docs: let an embedder give its sessions the terminfo entry
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 14s
windows / windows docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 1m4s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m12s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m5s
pr / nix flake check (pull_request) Successful in 36s
windows / cargo nextest (Windows) (pull_request) Successful in 2m59s
windows / frontend smoke (Windows) (pull_request) Successful in 1m4s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m38s
pr / wire schema is compatible with the base (pull_request) Successful in 2s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m3s
windows / cargo clippy (Windows cross) (pull_request) Successful in 30s
4870c6d793
A program serving felis-daemon in-process stamps TERM=xterm-felis but
cannot resolve it: the shipped-terminfo lookup searches beside the
embedder's executable, and the entry's source sat outside every crate,
so the embedder kept a drifting copy and rewrote each spawn's
TERMINFO_DIRS itself.

The source now lives in the felis-daemon package, where include_str!
survives cargo package, and is exported as TERMINFO_SOURCE.
DaemonCaps::terminfo_dir names the directory to list, defaulting to
the shipped one, so the daemon applies the same TERMINFO_DIRS rules to
whatever the embedder compiled. Compiling stays the embedder's choice.

Closes #179

Assisted-by: Claude Code
natsukium deleted branch daemon/embedder-terminfo 2026-10-19 01:58:17 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!181
No description provided.