@miller-tech/uap 2.1.6 → 2.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -133,4 +133,40 @@ if command -v llama_upstream_watch >/dev/null 2>&1 &&
133
133
  llama_upstream_watch "$LLAMA_CPP_BASE" "$$" &
134
134
  fi
135
135
 
136
+ # ---------------------------------------------------------------------------
137
+ # Source-drift warning. ExecStart runs anthropic_proxy.py straight out of this
138
+ # working tree, so the proxy executes WHATEVER IS CHECKED OUT — a feature branch
139
+ # left over from a merge, or a master that has fallen behind origin, is served
140
+ # silently with no signal anywhere. Hit twice on 2026-09-13: a fix was live only
141
+ # because its branch happened to still be checked out, and `gh pr merge
142
+ # --delete-branch` switching back to master would have reverted the running
143
+ # proxy on its next restart.
144
+ # Advisory only — it never blocks startup, never fetches, and never changes the
145
+ # tree. Making drift visible is the point; deciding what to do about it is the
146
+ # operator's. Set UAP_PROXY_SOURCE_DRIFT_WARN=off to silence.
147
+ # ---------------------------------------------------------------------------
148
+ if [ "${UAP_PROXY_SOURCE_DRIFT_WARN:-on}" != "off" ] && command -v git >/dev/null 2>&1; then
149
+ _branch="$(git -C "$ROOT_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')"
150
+ if [ -n "$_branch" ]; then
151
+ if [ "$_branch" != "master" ] && [ "$_branch" != "main" ]; then
152
+ echo "[proxy-startup] WARNING: serving from branch '${_branch}', not master/main —" \
153
+ "this code may not be released, and a checkout will change what runs" >&2
154
+ fi
155
+ # Compare against the last-known remote ref only; no network call, so a
156
+ # stale origin/master simply yields no warning rather than a hang.
157
+ _remote="origin/${_branch}"
158
+ if git -C "$ROOT_DIR" rev-parse --verify --quiet "$_remote" >/dev/null 2>&1; then
159
+ _behind="$(git -C "$ROOT_DIR" rev-list --count "HEAD..${_remote}" 2>/dev/null || echo 0)"
160
+ if [ "${_behind:-0}" -gt 0 ]; then
161
+ echo "[proxy-startup] WARNING: ${_branch} is ${_behind} commit(s) behind ${_remote}" \
162
+ "(as of the last fetch) — the running proxy is stale; git pull to update" >&2
163
+ fi
164
+ fi
165
+ if ! git -C "$ROOT_DIR" diff --quiet -- tools/agents/scripts/anthropic_proxy.py 2>/dev/null; then
166
+ echo "[proxy-startup] WARNING: anthropic_proxy.py has uncommitted changes —" \
167
+ "the running proxy does not match any commit" >&2
168
+ fi
169
+ fi
170
+ fi
171
+
136
172
  exec python3 tools/agents/scripts/anthropic_proxy.py