@miller-tech/uap 1.42.4 → 1.42.5

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.42.4",
3
+ "version": "1.42.5",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -6,10 +6,10 @@ import sys
6
6
  from pathlib import Path
7
7
 
8
8
  sys.path.insert(0, str(Path(__file__).parent))
9
- from _common import arg_str, emit, parse_cli, run, worktree_root # noqa: E402
9
+ from _common import emit, parse_cli, run, worktree_root # noqa: E402
10
10
 
11
11
  MUTATING_RE = re.compile(
12
- r"\b(kubectl|helm|doctl|aws|gcloud)\b.*?\b(apply|patch|create|edit|delete|install|upgrade|rollout|scale|set)\b",
12
+ r"\b(kubectl|helm|doctl|aws|gcloud)\b[^\n;&|]{0,48}?\b(apply|patch|create|edit|delete|install|upgrade|rollout|scale|set)\b",
13
13
  re.I,
14
14
  )
15
15
  IAC_PATHS = (
@@ -23,9 +23,15 @@ IAC_PATHS = (
23
23
 
24
24
  def main() -> None:
25
25
  op, args = parse_cli()
26
- blob = f"{op} {arg_str(args)}"
27
-
28
- if not MUTATING_RE.search(blob):
26
+ # iac-parity governs live-state MUTATING shell COMMANDS (kubectl apply,
27
+ # helm install, ...). File edits -- including editing IaC manifests, or any
28
+ # content that merely names infra tools -- are never live-state mutations,
29
+ # so only Bash commands are in scope.
30
+ if op.lower() != "bash":
31
+ emit(True, "not a bash command")
32
+ cmd = args.get("command") or args.get("cmd") or ""
33
+
34
+ if not MUTATING_RE.search(cmd):
29
35
  emit(True, "not a mutating IaC-scope command")
30
36
 
31
37
  root = worktree_root() # git status must run against the working tree, not MAIN_ROOT