@miller-tech/uap 1.42.3 → 1.42.4

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.3",
3
+ "version": "1.42.4",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,6 +13,20 @@ RTK_META = re.compile(r"^\s*rtk\s+(gain|discover|proxy|--version|-V|--help)\b")
13
13
  ALREADY_WRAPPED = re.compile(r"^\s*rtk\s+\S+")
14
14
 
15
15
 
16
+ # `rtk npm`/`rtk pnpm`/`rtk yarn` map to `<pm> run` (filtered script output). The
17
+ # subcommands below are NOT script runners, so `rtk npm view` would mangle to
18
+ # `npm run view`. Route them through `rtk proxy` instead (still tracked).
19
+ PM_BUILTINS = {
20
+ "install", "i", "ci", "add", "view", "info", "show", "publish", "pack",
21
+ "audit", "outdated", "ls", "list", "link", "unlink", "dedupe", "prune",
22
+ "exec", "dlx", "init", "create", "ping", "whoami", "login", "logout",
23
+ "version", "deprecate", "dist-tag", "owner", "access", "search", "update",
24
+ "uninstall", "remove", "rm", "rebuild", "root", "bin", "config", "cache",
25
+ "doctor", "fund", "why", "store", "set", "get",
26
+ }
27
+ PMS = ("npm", "pnpm", "yarn")
28
+
29
+
16
30
  def main() -> None:
17
31
  op, args = parse_cli()
18
32
  cmd = (args.get("command") or args.get("cmd") or "").strip()
@@ -30,10 +44,19 @@ def main() -> None:
30
44
  for tok in tokens[:3]:
31
45
  bin_name = tok.split("/")[-1]
32
46
  if bin_name in WRAPPED:
47
+ wrapper = "rtk"
48
+ if bin_name in PMS:
49
+ sub = ""
50
+ for nxt in tokens[tokens.index(tok) + 1:]:
51
+ if not nxt.startswith("-"):
52
+ sub = nxt.split("/")[-1]
53
+ break
54
+ if sub in PM_BUILTINS:
55
+ wrapper = "rtk proxy"
33
56
  emit(
34
57
  False,
35
58
  f"rtk-wrap: '{bin_name}' must be invoked via rtk. "
36
- f"Use: rtk {cmd}",
59
+ f"Use: {wrapper} {cmd}",
37
60
  bin=bin_name,
38
61
  )
39
62