Files
Hermes Agent 87e6348642 junction: per-target 'as', example config for the van, C WoL helper
- A rule may send a different model name per target: 'pass peer-a as M, peer-b, cloud'
  rewrites only for peer-a, so a mixed local/cloud rule still asks the cloud for the
  name the client wanted.
- examples/olivia.conf: peers on the tunnel, embedding box, sleeping workstation with
  WoL + energy gate, cloud fallback, and the policy rules each with its reason.
- tools/junction-wol.c replaces the Python magic-packet helper; hooks stay shell.
- Forwarding no longer duplicates Host/Content-Length/X-Forwarded-*: Ollama answered
  400 to a request that was valid because it arrived with two Host headers.
- need_tokens: embeddings produce a vector, not tokens, so they are not charged
  default_max_tokens (a 2048-context embed endpoint refused every request).
- /status lists every target with its model, plus the rule's need window.
2026-10-29 14:13:46 +00:00

20 lines
829 B
Bash
Executable File

#!/bin/sh
# Wake a machine with a magic packet.
# JUNCTION_WAKE_MAC aa:bb:cc:dd:ee:ff (required)
# JUNCTION_WAKE_BCAST 255.255.255.255 (optional, use the subnet broadcast
# when directed broadcast is filtered)
# Needs junction-wol next to this script (installed with the package) or in $PATH.
mac="${JUNCTION_WAKE_MAC:-}"
[ -z "$mac" ] && { echo "no_JUNCTION_WAKE_MAC"; exit 1; }
bcast="${JUNCTION_WAKE_BCAST:-255.255.255.255}"
here=$(dirname "$0")
# installed next to the hook, or in the source tree's tools/ when run from the repo
for wol in "$here/junction-wol" "$here/../tools/junction-wol" \
"$(command -v junction-wol 2>/dev/null)"; do
[ -n "$wol" ] && [ -x "$wol" ] || continue
exec "$wol" "$mac" "$bcast"
done
echo "junction-wol_not_found"
exit 1