@pollinations/cli 0.1.43 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var init_package = __esm({
14
14
  "package.json"() {
15
15
  package_default = {
16
16
  name: "@pollinations/cli",
17
- version: "0.1.43",
17
+ version: "0.1.44",
18
18
  description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
19
19
  type: "module",
20
20
  bin: {
@@ -5754,6 +5754,13 @@ if ! { [ -s /run/polli-ws.pid ] && kill -0 "$(cat /run/polli-ws.pid)" 2>/dev/nul
5754
5754
  setsid nohup sh -c 'while :; do websocat -b -E "ws-l:0.0.0.0:$POLLI_SSH_PORT" tcp:127.0.0.1:22; sleep 1; done' >/dev/null 2>&1 </dev/null &
5755
5755
  echo $! > /run/polli-ws.pid
5756
5756
  fi
5757
+ # Templates with herdr, like \`pollinations\`, get its server, so agents in its
5758
+ # panes keep running between ssh sessions. A fixed environment, not envd's.
5759
+ # \`herdr status server\` exits 0 either way.
5760
+ if [ -x /usr/local/bin/herdr ] && ! runuser -u user -- herdr status server | grep -qx 'status: running'; then
5761
+ setsid runuser -u user -- env -i HOME=/home/user USER=user LOGNAME=user SHELL=/bin/bash LANG=C.UTF-8 \\
5762
+ PATH=/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin herdr server >/dev/null 2>&1 </dev/null &
5763
+ fi
5757
5764
  for _ in $(seq 50); do
5758
5765
  (exec 3<>/dev/tcp/127.0.0.1/22 4<>/dev/tcp/127.0.0.1/"$POLLI_SSH_PORT") 2>/dev/null && exit 0
5759
5766
  sleep 0.1