@miller-tech/uap 1.220.8 → 1.220.9

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.220.8",
3
+ "version": "1.220.9",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -60,6 +60,35 @@ MACHINE_FORMS = {
60
60
  "stash": ("list",),
61
61
  }
62
62
 
63
+ # rtk's docker handlers only recognise the BARE subcommand. Any flag on
64
+ # `docker ps` or `docker logs` makes rtk print "[rtk: parse failed, running
65
+ # raw]" ahead of otherwise-correct raw output. The DATA is fine -- but that
66
+ # line reads as a tool error, and a model that cannot act on it retries: it
67
+ # drove a live ERROR-LOOP on 2026-08-25 ("same failure x3,
68
+ # sig='[rtk: parse failed, running raw]'"). `rtk proxy` runs the same command
69
+ # unfiltered with no such line, and is still counted in the savings ledger.
70
+ #
71
+ # Measured against rtk 0.27.0 on 2026-08-25 -- listed rather than guessed,
72
+ # because every entry here is friction for a call that would have been fine:
73
+ # docker ps ok
74
+ # docker ps -a parse failed
75
+ # docker ps --filter name=uap parse failed
76
+ # docker ps --format '{{.Names}}' parse failed
77
+ # docker images ok
78
+ # docker logs --tail 1 <id> parse failed
79
+ # docker inspect <id> ok
80
+ # So the trigger is the SUBCOMMAND plus any flag at all, not a specific flag.
81
+ DOCKER_FLAG_INTOLERANT = ("ps", "logs")
82
+
83
+
84
+ def docker_wants_proxy(tokens: list[str]) -> bool:
85
+ """Is this a docker call rtk will fail to parse (bare form only)?"""
86
+ args = [t for t in tokens if t.split("/")[-1] != "docker"]
87
+ sub_cmd = next((t for t in args if not t.startswith("-")), "")
88
+ if sub_cmd not in DOCKER_FLAG_INTOLERANT:
89
+ return False
90
+ return any(t.startswith("-") for t in args)
91
+
63
92
 
64
93
  def wants_machine_output(tokens: list[str]) -> bool:
65
94
  """Is this git invocation asking for output something will parse?"""
@@ -122,6 +151,16 @@ def main() -> None:
122
151
  # skipping every rtk-led statement is what let it through the gate.
123
152
  if bin_name == "rtk":
124
153
  rest = [t for t in tokens[1:] if not t.startswith("-")]
154
+ if rest[:1] == ["docker"] and docker_wants_proxy(tokens[1:]):
155
+ emit(
156
+ False,
157
+ "rtk-wrap: rtk only parses the bare form of this docker "
158
+ "subcommand; with any flag it prefixes "
159
+ "'[rtk: parse failed, running raw]' to the output, which "
160
+ "reads as an error and has driven retry loops. Use: "
161
+ "rtk proxy " + " ".join(tokens[1:]),
162
+ bin="rtk",
163
+ )
125
164
  if rest[:1] == ["git"] and wants_machine_output(tokens[1:]):
126
165
  emit(
127
166
  False,
@@ -141,6 +180,8 @@ def main() -> None:
141
180
  if bin_name == "git" and wants_machine_output(tokens):
142
181
  # Still through rtk, so the call is still tracked -- just unfiltered.
143
182
  wrapper = "rtk proxy"
183
+ elif bin_name == "docker" and docker_wants_proxy(tokens):
184
+ wrapper = "rtk proxy"
144
185
  if bin_name in PMS:
145
186
  sub = ""
146
187
  for nxt in tokens[1:]: