diff --git a/agent/prompt_builder.py b/agent/prompt_builder.py index 49a63d6881..82c6300f73 100644 --- a/agent/prompt_builder.py +++ b/agent/prompt_builder.py @@ -877,9 +877,11 @@ _WINDOWS_BASH_SHELL_HINT = ( "MSYS-style paths like `/c/Users//...` work alongside native `C:\\Users\\\\...` paths. PowerShell " "builtins (`Get-ChildItem`, `$env:FOO`, `Select-String`) will NOT work — use their POSIX equivalents (`ls`, " "`$FOO`, `grep`). Path arguments for NATIVE Windows programs (git, rg, node, python, ...) are NOT translated: MSYS " + # no-tmp: ok — illustrates the MSYS path that FAILS for native Windows tools "path conversion is disabled here, so `git -C /c/Users/x` or `node /tmp/a.js` fails with 'cannot change to'/'not " "found' even though `cd /c/Users/x` (a bash builtin) works. Pass `C:/Users/x`-style forward-slash native paths to " - "native tools, and prefer `$LOCALAPPDATA/Temp` over `/tmp` for scratch files a native tool must read. When " + # no-tmp: ok — tells the model what NOT to use + "native tools, and prefer `$LOCALAPPDATA/Temp` (or `$TMPDIR`, which Hermes points at its own scratch dir) for scratch files a native tool must read — never a bare `/tmp`. When " "answering prompts in a pty background process, use process(submit) — never process(write) with a bare trailing " "newline: Enter on a Windows PTY is a carriage return, and a lone `\\n" "` is not delivered as a line terminator, so the child's prompt silently never returns. When a CLI offers a " diff --git a/tools/kanban_tools_schemas.py b/tools/kanban_tools_schemas.py index 7642b6d58a..f4134e92c6 100644 --- a/tools/kanban_tools_schemas.py +++ b/tools/kanban_tools_schemas.py @@ -146,8 +146,8 @@ KANBAN_COMPLETE_SCHEMA = _schema( "Optional list of absolute paths to deliverable " "files you produced during this run — generated " "charts, PDFs, spreadsheets, images, archives. " - "Examples: [\"/tmp/q3-revenue.png\", " - "\"/tmp/report.pdf\"]. The gateway notifier " + "Examples: [\"~/.hermes/cache/scratch/q3-revenue.png\", " + "\"~/.hermes/cache/scratch/report.pdf\"]. The gateway notifier " "uploads each path as a native attachment to the " "subscribed chat (images embed inline, everything " "else uploads as a file) so the deliverable " @@ -237,7 +237,7 @@ KANBAN_REQUEST_REVIEW_SCHEMA = _schema( "Optional list of absolute paths to deliverable " "files this handoff names — generated charts, " "PDFs, spreadsheets, images, archives. Examples: " - "['/tmp/q3-revenue.png', '/tmp/report.pdf']. " + "['~/.hermes/cache/scratch/q3-revenue.png', '~/.hermes/cache/scratch/report.pdf']. " "A review handoff is the last implementer " "transition, so the kernel copies these into the " "task's durable attachments before the reviewer's " diff --git a/tools/read_extract.py b/tools/read_extract.py index 808749a41c..ccda054761 100644 --- a/tools/read_extract.py +++ b/tools/read_extract.py @@ -176,7 +176,7 @@ def _needs_ocr_warning(path: str, pages, hosted_error: str = "") -> str: f"[NEEDS OCR: pages {page_list} of this PDF are scanned images " f"with no text layer — their content is MISSING below. {hosted}" "If the missing pages matter: render just those pages with " - f"`pdftoppm -jpeg -r 150 -f -l {shlex.quote(path)} /tmp/page` " + f"`pdftoppm -jpeg -r 150 -f -l {shlex.quote(path)} $TMPDIR/page` " "and inspect via vision_analyze, or check whether an OCR skill is " "available (skills_list).]\n") @@ -307,7 +307,7 @@ def _pdf_coverage_note(path: str, display_path: Optional[str] = None) -> str: f"{_gap_map(counts, texts, empty)}\n" "Decide which gaps you actually need — do NOT OCR or render " "everything. For the gaps that matter, render just that range with " - f"`pdftoppm -jpeg -r 150 -f -l {shlex.quote(shown)} /tmp/page` " + f"`pdftoppm -jpeg -r 150 -f -l {shlex.quote(shown)} $TMPDIR/page` " "and inspect each image with the vision_analyze tool, or use the " "ocr-and-documents skill (marker-pdf) for bulk OCR of large " "ranges.]\n") diff --git a/tools/send_message_tool.py b/tools/send_message_tool.py index 70fd88e558..ebc3cbf813 100644 --- a/tools/send_message_tool.py +++ b/tools/send_message_tool.py @@ -766,7 +766,7 @@ SEND_MESSAGE_SCHEMA = { }, "message": { "type": "string", - "description": "The message text to send. To send an image or file, include MEDIA: (e.g. 'MEDIA:/tmp/report.pdf') in the message — the platform will deliver it as a native media attachment." + "description": "The message text to send. To send an image or file, include MEDIA: (e.g. 'MEDIA:~/.hermes/cache/scratch/report.pdf') in the message — the platform will deliver it as a native media attachment." }, "emoji": { "type": "string", diff --git a/tools/terminal_tool_background.py b/tools/terminal_tool_background.py index eb70a1fc6c..63ebd8f2b4 100644 --- a/tools/terminal_tool_background.py +++ b/tools/terminal_tool_background.py @@ -42,7 +42,7 @@ _HOMEBREW_CI_POLLER_HINT = ( '"$2==\\"pending\\""`) for sharded matrices. Load ' "skill_view(name='github/hermes-agent-dev', file_path='references/green-ci-policy.md') for " 'the verbatim snippets. If you must roll a custom loop with rich structured output, write ' - "each tick to a known file (`tee -a /tmp/ci.log`) and rely on `process(action='log')` to " + "each tick to a known file (`tee -a $TMPDIR/ci.log`) and rely on `process(action='log')` to " 'read THAT file — do not rely on background-process stdout capture for line-buffered shell ' 'loops.' )