@technomoron/agent-run 0.99.19 → 0.99.20

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/CHANGES CHANGED
@@ -1,6 +1,11 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ Version 0.99.20 (2026-06-03)
5
+ ----------------------------
6
+ * Add systemd unit templates and install tooling for the global AI tools updater.
7
+ * Add a login warning helper that prints a large banner when `~/.agent-config` has uncommitted changes.
8
+
4
9
  Version 0.99.19 (2026-06-03)
5
10
  ----------------------------
6
11
  * Link per-profile Codex `auth.json` files to the shared `~/.codex/auth.json` login cache when available.
package/README.md CHANGED
@@ -255,6 +255,40 @@ review files into `reviews/`, moves loose `memory*.md` files into `memories/`,
255
255
  and moves old Codex runtime files into `memories/codex-home` when doing so does
256
256
  not overwrite existing files.
257
257
 
258
+ ## Systemd Jobs
259
+
260
+ The repo includes optional systemd units for keeping global AI tooling current.
261
+
262
+ Install the global AI tools updater:
263
+
264
+ ```sh
265
+ sudo scripts/install-systemd-jobs.sh --ai-tools
266
+ ```
267
+
268
+ This installs and enables `ai-tools-update.timer`, which runs hourly. The
269
+ package list is configurable through systemd environment overrides:
270
+
271
+ ```text
272
+ AI_TOOLS_NPM_PACKAGES="npm pnpm netlify-cli@latest @openai/codex@latest @anthropic-ai/claude-code@latest @technomoron/agent-run@latest @technomoron/repo-check@latest"
273
+ AI_TOOLS_APT_PACKAGES="gh"
274
+ ```
275
+
276
+ ## Login Warning
277
+
278
+ For user-owned machines, `scripts/agent-config-login-warning.sh` can be called
279
+ from a shell startup file to print a large warning when `~/.agent-config` is a
280
+ dirty git checkout:
281
+
282
+ ```csh
283
+ if ( -x "$HOME/bin/agent-config-login-warning" ) then
284
+ "$HOME/bin/agent-config-login-warning"
285
+ endif
286
+ ```
287
+
288
+ The helper only reads the git status and exits quietly when the checkout is
289
+ clean or absent. Set `AGENT_CONFIG_TARGET` before calling it to check a
290
+ different config tree.
291
+
258
292
  ## Install
259
293
 
260
294
  ```sh
@@ -0,0 +1,11 @@
1
+ [Unit]
2
+ Description=Update global AI and developer CLI packages
3
+ After=network-online.target
4
+ Wants=network-online.target
5
+
6
+ [Service]
7
+ Type=oneshot
8
+ Environment=HOME=/root
9
+ Environment=NPM_CONFIG_PREFIX=/usr
10
+ Environment=PNPM_HOME=/usr/local/bin
11
+ ExecStart=/usr/local/lib/agent-run/update-ai-tools.sh
@@ -0,0 +1,11 @@
1
+ [Unit]
2
+ Description=Run AI tool updater hourly
3
+
4
+ [Timer]
5
+ OnBootSec=10m
6
+ OnUnitActiveSec=1h
7
+ AccuracySec=5m
8
+ Unit=ai-tools-update.service
9
+
10
+ [Install]
11
+ WantedBy=timers.target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technomoron/agent-run",
3
- "version": "0.99.19",
3
+ "version": "0.99.20",
4
4
  "packageManager": "pnpm@10.28.1",
5
5
  "bin": {
6
6
  "agent-run": "dist/agent-run.js"
@@ -8,6 +8,10 @@
8
8
  "files": [
9
9
  "dist/",
10
10
  "examples/",
11
+ "ops/",
12
+ "scripts/agent-config-login-warning.sh",
13
+ "scripts/install-systemd-jobs.sh",
14
+ "scripts/update-ai-tools.sh",
11
15
  "README.md",
12
16
  "LICENSE",
13
17
  "CHANGES"
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env sh
2
+ set -u
3
+
4
+ target="${AGENT_CONFIG_TARGET:-$HOME/.agent-config}"
5
+
6
+ [ -d "$target/.git" ] || exit 0
7
+ command -v git >/dev/null 2>&1 || exit 0
8
+
9
+ status="$(git -C "$target" status --short 2>/dev/null)" || exit 0
10
+ [ -n "$status" ] || exit 0
11
+
12
+ cat <<'BANNER'
13
+
14
+ ###############################################################################
15
+ ###############################################################################
16
+ ## ##
17
+ ## WARNING: ~/.agent-config HAS UNCOMMITTED LOCAL CHANGES ##
18
+ ## ##
19
+ ## agent-run config updates should not pull over this tree. ##
20
+ ## Commit, stash, or remove these changes before updating configs. ##
21
+ ## ##
22
+ ###############################################################################
23
+ ###############################################################################
24
+
25
+ BANNER
26
+
27
+ printf '%s\n' "$status" | sed 's/^/ /'
28
+ printf '\n'
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ usage() {
5
+ cat <<'USAGE'
6
+ Usage:
7
+ install-systemd-jobs.sh [options]
8
+
9
+ Options:
10
+ --ai-tools Install and enable ai-tools-update.timer.
11
+ --all Install all repo-provided systemd jobs.
12
+ --dry-run Print actions without writing system files.
13
+ -h, --help Show this help.
14
+
15
+ Examples:
16
+ sudo scripts/install-systemd-jobs.sh --ai-tools
17
+ sudo scripts/install-systemd-jobs.sh --all
18
+ USAGE
19
+ }
20
+
21
+ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
22
+ INSTALL_LIB_DIR="${INSTALL_LIB_DIR:-/usr/local/lib/agent-run}"
23
+ SYSTEMD_DIR="${SYSTEMD_DIR:-/etc/systemd/system}"
24
+ ORIGINAL_ARGS=("$@")
25
+
26
+ INSTALL_AI_TOOLS=0
27
+ INSTALL_ALL=0
28
+ DRY_RUN=0
29
+
30
+ while [ "$#" -gt 0 ]; do
31
+ case "$1" in
32
+ --ai-tools)
33
+ INSTALL_AI_TOOLS=1
34
+ shift
35
+ ;;
36
+ --all)
37
+ INSTALL_ALL=1
38
+ INSTALL_AI_TOOLS=1
39
+ shift
40
+ ;;
41
+ --dry-run)
42
+ DRY_RUN=1
43
+ shift
44
+ ;;
45
+ -h|--help)
46
+ usage
47
+ exit 0
48
+ ;;
49
+ *)
50
+ echo "Unknown option: $1" >&2
51
+ usage >&2
52
+ exit 2
53
+ ;;
54
+ esac
55
+ done
56
+
57
+ if [ "$INSTALL_AI_TOOLS" -eq 0 ]; then
58
+ usage >&2
59
+ exit 2
60
+ fi
61
+
62
+ if [ "$DRY_RUN" -eq 0 ] && [ "${EUID:-$(id -u)}" -ne 0 ]; then
63
+ exec sudo "$0" "${ORIGINAL_ARGS[@]}"
64
+ fi
65
+
66
+ run() {
67
+ if [ "$DRY_RUN" -eq 1 ]; then
68
+ printf '+'
69
+ printf ' %q' "$@"
70
+ printf '\n'
71
+ return 0
72
+ fi
73
+ "$@"
74
+ }
75
+
76
+ run install -d -m 0755 "$INSTALL_LIB_DIR" "$SYSTEMD_DIR"
77
+ run install -m 0755 "$ROOT/scripts/update-ai-tools.sh" "$INSTALL_LIB_DIR/update-ai-tools.sh"
78
+ run install -m 0644 "$ROOT/ops/systemd/ai-tools-update.service" "$SYSTEMD_DIR/ai-tools-update.service"
79
+ run install -m 0644 "$ROOT/ops/systemd/ai-tools-update.timer" "$SYSTEMD_DIR/ai-tools-update.timer"
80
+
81
+ if [ "$INSTALL_AI_TOOLS" -eq 1 ]; then
82
+ run systemctl daemon-reload
83
+ run systemctl enable --now ai-tools-update.timer
84
+ fi
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ export HOME="${HOME:-/root}"
5
+ export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-/usr}"
6
+ export PNPM_HOME="${PNPM_HOME:-/usr/local/bin}"
7
+ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH:-}"
8
+
9
+ NPM_BIN="${AI_TOOLS_NPM_BIN:-/usr/bin/npm}"
10
+ APT_GET_BIN="${AI_TOOLS_APT_GET_BIN:-/usr/bin/apt-get}"
11
+
12
+ AI_TOOLS_NPM_PACKAGES="${AI_TOOLS_NPM_PACKAGES:-npm pnpm netlify-cli@latest @openai/codex@latest @anthropic-ai/claude-code@latest @technomoron/agent-run@latest @technomoron/repo-check@latest}"
13
+ AI_TOOLS_APT_PACKAGES="${AI_TOOLS_APT_PACKAGES:-gh}"
14
+
15
+ if [ -n "$AI_TOOLS_NPM_PACKAGES" ]; then
16
+ # shellcheck disable=SC2086
17
+ "$NPM_BIN" install -g --force $AI_TOOLS_NPM_PACKAGES
18
+ fi
19
+
20
+ if [ -n "$AI_TOOLS_APT_PACKAGES" ] && command -v "$APT_GET_BIN" >/dev/null 2>&1; then
21
+ # shellcheck disable=SC2086
22
+ "$APT_GET_BIN" install --only-upgrade -y $AI_TOOLS_APT_PACKAGES
23
+ fi