docs(prompts): model-facing tool descriptions stop suggesting /tmp
The kanban artifact examples, MEDIA: example, pdftoppm OCR hint, the background-poller tee hint and the Windows path note all showed the model a literal /tmp path, which it copied into its own commands on every platform. They now point at $TMPDIR (Hermes sets it to its scratch dir) or ~/.hermes/cache/scratch; the two Windows-note mentions that describe why /tmp is the wrong choice keep the literal with a no-tmp marker.
This commit is contained in:
@@ -877,9 +877,11 @@ _WINDOWS_BASH_SHELL_HINT = (
|
||||
"MSYS-style paths like `/c/Users/<user>/...` work alongside native `C:\\Users\\<user>\\...` 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 "
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -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 <first> -l <last> {shlex.quote(path)} /tmp/page` "
|
||||
f"`pdftoppm -jpeg -r 150 -f <first> -l <last> {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 <first> -l <last> {shlex.quote(shown)} /tmp/page` "
|
||||
f"`pdftoppm -jpeg -r 150 -f <first> -l <last> {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")
|
||||
|
||||
@@ -766,7 +766,7 @@ SEND_MESSAGE_SCHEMA = {
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "The message text to send. To send an image or file, include MEDIA:<local_path> (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:<local_path> (e.g. 'MEDIA:~/.hermes/cache/scratch/report.pdf') in the message — the platform will deliver it as a native media attachment."
|
||||
},
|
||||
"emoji": {
|
||||
"type": "string",
|
||||
|
||||
@@ -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.'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user