@@ -16,7 +16,9 @@ When attempting to send files with long Chinese filenames from `~/.hermes/cache/
...
@@ -16,7 +16,9 @@ When attempting to send files with long Chinese filenames from `~/.hermes/cache/
**This is a Hermes security policy restriction, NOT a platform-specific issue.**
**This is a Hermes security policy restriction, NOT a platform-specific issue.**
Hermes enforces that files must be within the **session workspace** (`~/.hermes/workspace/`) for Markdown link delivery. Even though `~/.hermes/cache/` directories are listed as "safe roots" for MEDIA protocol, the **Markdown link delivery** path has stricter restrictions that only allow files within the active workspace.
Hermes enforces that files must be within the **session workspace** for Markdown link delivery. Even though `~/.hermes/cache/` directories are listed as "safe roots" for MEDIA protocol, the **Markdown link delivery** path has stricter restrictions that only allow files within the **active session's workspace**.
**Key point**: The workspace is the session-specific working directory (which may be `~/.hermes/workspace/` or another path configured for the session), NOT necessarily the default `~/.hermes/workspace/`.
@@ -98,7 +101,9 @@ When encountering `File is outside the session and Hermes workspaces`:
...
@@ -98,7 +101,9 @@ When encountering `File is outside the session and Hermes workspaces`:
2.**Verify if in workspace**:
2.**Verify if in workspace**:
```bash
```bash
[[ "/path/to/file" == ~/.hermes/workspace/* ]] && echo "In workspace" || echo "Not in workspace"
# Check if file is in the session's workspace
WORKSPACE=$(hermes config get workspace.path 2>/dev/null || echo "~/.hermes/workspace")
[[ "/path/to/file" == "$WORKSPACE"* ]] && echo "In workspace" || echo "Not in workspace"
```
```
3.**Try copying to workspace**:
3.**Try copying to workspace**:
...
@@ -137,9 +142,13 @@ When encountering `File is outside the session and Hermes workspaces`:
...
@@ -137,9 +142,13 @@ When encountering `File is outside the session and Hermes workspaces`:
## Key Takeaway
## Key Takeaway
**Hermes security policy restricts Markdown file links to `~/.hermes/workspace/` only. Files in `~/.hermes/cache/` directories will fail with "File is outside the session and Hermes workspaces" error, regardless of deployment platform.**
**Hermes security policy restricts Markdown file links to the session's workspace directory only. Files in `~/.hermes/cache/` directories will fail with "File is outside the session and Hermes workspaces" error, regardless of deployment platform.**
The workspace is the **session-specific working directory**, which may be:
- Default: `~/.hermes/workspace/`
- Custom: Configured per session via `workdir` parameter
Use one of these alternatives:
Use one of these alternatives:
1. Copy file to workspace (preferred for small/medium files)
1. Copy file to the session workspace (preferred for small/medium files)
2. Use base64 encoding (works for any file, any location)
2. Use base64 encoding (works for any file, any location)