@windyroad/architect 0.23.6 → 0.23.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.
@@ -123,5 +123,5 @@
123
123
  }
124
124
  },
125
125
  "name": "wr-architect",
126
- "version": "0.23.6"
126
+ "version": "0.23.7"
127
127
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-architect",
3
- "version": "0.23.6",
3
+ "version": "0.23.7",
4
4
  "description": "Architecture decision enforcement for AI coding agents",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
@@ -74,16 +74,6 @@ import json, re, shlex, sys
74
74
  try:
75
75
  data = json.load(sys.stdin)
76
76
  tool = data.get("tool_input") or {}
77
- for owner, key in ((tool, "cwd"), (tool, "workdir")):
78
- if key in owner:
79
- value = owner[key]
80
- if not isinstance(value, str):
81
- print(json.dumps({"declared": True, "path": ""}))
82
- raise SystemExit
83
- if value:
84
- print(json.dumps({"declared": True, "path": value}))
85
- raise SystemExit
86
-
87
77
  try:
88
78
  tokens = shlex.split(tool.get("command", ""))
89
79
  except (TypeError, ValueError):
@@ -94,6 +84,16 @@ try:
94
84
  print(json.dumps({"declared": True, "path": tokens[1]}))
95
85
  raise SystemExit
96
86
 
87
+ for owner, key in ((tool, "cwd"), (tool, "workdir")):
88
+ if key in owner:
89
+ value = owner[key]
90
+ if not isinstance(value, str):
91
+ print(json.dumps({"declared": True, "path": ""}))
92
+ raise SystemExit
93
+ if value:
94
+ print(json.dumps({"declared": True, "path": value}))
95
+ raise SystemExit
96
+
97
97
  if "cwd" in data:
98
98
  value = data["cwd"]
99
99
  if not isinstance(value, str):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/architect",
3
- "version": "0.23.6",
3
+ "version": "0.23.7",
4
4
  "description": "Architecture decision enforcement for AI coding agents",
5
5
  "bin": {
6
6
  "windyroad-architect": "./bin/install.mjs"