@miller-tech/uap 1.189.0 → 1.189.1

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": "1.189.0",
3
+ "version": "1.189.1",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -140,6 +140,27 @@ PROTECTED_TARGETS = (
140
140
  # shell-writable meant a single append could satisfy a gate — which is
141
141
  # exactly how one was satisfied during development.
142
142
  ".uap/evidence",
143
+ # Delivery COORDINATION state. Same argument as the evidence records, and
144
+ # listed individually for the same reason rather than by widening .uap/:
145
+ # the rest of that directory really is scratch the tooling rewrites
146
+ # constantly, but these two are mechanisms, not logs.
147
+ #
148
+ # `deliver.lock` is the single-flight guard. Removing it puts a second
149
+ # mission on the same tree - not hypothetical: two runs on nested roots
150
+ # overwrote each other's edits to src/cooccurrence.rs on 2026-08-08 until
151
+ # it stopped compiling, each one's gate failing on damage the other had
152
+ # just done. On 2026-08-10 an agent ran
153
+ # rm -f .uap/deliver.lock && uap deliver "<reworded instruction>"
154
+ # to force a relaunch past the guard.
155
+ #
156
+ # `deliver-runs` holds every run's checkpoint - the resumable work itself.
157
+ # Removing that directory was allowed and would discard all of it.
158
+ #
159
+ # Neither ever needs deleting by hand: a lock whose holder is dead or
160
+ # wedged is reclaimed automatically on the next launch, and a run is
161
+ # stopped with the STOP file, which leaves the checkpoint intact.
162
+ ".uap/deliver.lock",
163
+ ".uap/deliver-runs",
143
164
  ".uap.json",
144
165
  "anthropic-proxy.env",
145
166
  )
@@ -301,6 +322,19 @@ def _destructive_intent(command: str) -> bool:
301
322
  return bool(toks & set(DESTRUCTIVE_VERBS)) or bool(_REDIRECT.search(command))
302
323
 
303
324
 
325
+ _DELIVER_COORD = (".uap/deliver.lock", ".uap/deliver-runs")
326
+
327
+
328
+ def _mentions_deliver_coord(command: str) -> bool:
329
+ """True when the command names the delivery coordination surface.
330
+
331
+ Only chooses the WORDING of a refusal that has already been decided by
332
+ `_bash_destructive`; it never widens or narrows what is refused.
333
+ """
334
+ text = command.translate(_QUOTES).lower()
335
+ return any(t in text for t in _DELIVER_COORD)
336
+
337
+
304
338
  def _direct_destructive(command: str) -> bool:
305
339
  """Destructive op naming a protected path, judged per command segment."""
306
340
  cd_into_protected = False
@@ -465,6 +499,28 @@ def main() -> None:
465
499
  "(Operator-only override: UAP_SELF_PROTECT_OFF=1.)",
466
500
  )
467
501
  if _bash_destructive(cmd):
502
+ # Name the SURFACE that was touched. "policy enforcers or proxy env"
503
+ # is simply untrue of a lock file, and a refusal that describes the
504
+ # wrong thing and offers no alternative is how a loop survives a
505
+ # guard: the agent that hit this had been clearing the lock to force
506
+ # a relaunch, seven times, and nothing told it what to do instead.
507
+ if _mentions_deliver_coord(cmd):
508
+ emit(
509
+ False,
510
+ "BLOCKED: this removes delivery COORDINATION state. "
511
+ "`.uap/deliver.lock` is the single-flight guard - deleting it "
512
+ "does not free anything, it puts a SECOND mission on the same "
513
+ "tree, and two of them overwrite each other's edits. "
514
+ "`.uap/deliver-runs/` holds every run's checkpoint, which is "
515
+ "the work itself. "
516
+ "You never need to remove either: a lock whose holder is dead "
517
+ "or wedged is reclaimed automatically by the next launch. "
518
+ "To STOP a run instead of forcing past it, request the "
519
+ "cooperative stop - `touch .uap/deliver-runs/STOP` - which "
520
+ "ends it at the next turn boundary with its work checkpointed "
521
+ "and the lock released. "
522
+ "(Operator-only override: UAP_SELF_PROTECT_OFF=1.)",
523
+ )
468
524
  emit(
469
525
  False,
470
526
  "BLOCKED: modifying/removing the policy enforcers or proxy env is "