Commit 99d3d7c
committed
fix(hermes): harden hermes_home() and widen session-read allowlist
Three small follow-ups from review of the prior commit:
1. Reject relative `$HERMES_HOME` and fall through to platform default.
Coffee CLI changes process CWD per tab via the launchpad's dir picker,
so a relative HERMES_HOME would resolve to different absolute paths
on different surfaces (history scan vs. plugin install vs. skill
mirror). Log a warning and keep the documented behavior.
2. Push `~/.hermes` into read_native_session's allowlist when it differs
from the resolved hermes_home(). A user who exports HERMES_HOME to
point at a fresh location can still open previously-collected sessions
that haven't been migrated off the old dotdir path.
3. Note in ToolDescriptor::skill_dir that the Hermes branch uses
`skill_dir_relative` as the source of truth (only the root swaps to
hermes_home), so future layout changes upstream are one-field edits.1 parent 80ae5e3 commit 99d3d7c
3 files changed
Lines changed: 29 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1923 | 1923 | | |
1924 | 1924 | | |
1925 | 1925 | | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
1926 | 1934 | | |
1927 | 1935 | | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
| 1936 | + | |
1932 | 1937 | | |
1933 | 1938 | | |
1934 | 1939 | | |
1935 | 1940 | | |
1936 | 1941 | | |
1937 | 1942 | | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1938 | 1946 | | |
1939 | 1947 | | |
1940 | 1948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
62 | 74 | | |
63 | 75 | | |
64 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
| |||
0 commit comments