@windyroad/architect 0.23.5-preview.1270 → 0.23.6-preview.1278

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.5"
126
+ "version": "0.23.6"
127
127
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-architect",
3
- "version": "0.23.5",
3
+ "version": "0.23.6",
4
4
  "description": "Architecture decision enforcement for AI coding agents",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
@@ -160,19 +160,22 @@ function registrations(input, target) {
160
160
  const path = join(transportDir(), name);
161
161
  try {
162
162
  const registered = JSON.parse(readFileSync(path, "utf8"));
163
- return registered.role === role && registered.target === target && registered.root === current.root && registered.physical === current.physical ? [{ registered, age: Date.now() - statSync(path).mtimeMs }] : [];
163
+ return registered.role === role && registered.root === current.root && registered.physical === current.physical ? [{ registered, age: Date.now() - statSync(path).mtimeMs }] : [];
164
164
  } catch { return []; }
165
165
  });
166
166
  }
167
167
 
168
168
  function persist(input) {
169
- const target = normalizeTarget(input.task_name || input.agent_name || input.agent_id);
169
+ let target = normalizeTarget(input.task_name || input.agent_name || input.agent_id);
170
170
  const output = input.last_assistant_message;
171
171
  if (!target || typeof output !== "string" || !output) return;
172
172
  if (parsedVerdict(output) !== "PASS") return diagnostic("non-pass-output", input);
173
- const candidates = registrations(input, target);
173
+ const registrationsForCheckout = registrations(input, target);
174
+ const exact = registrationsForCheckout.filter(({ registered }) => registered.target === target);
175
+ const candidates = exact.length ? exact : registrationsForCheckout.filter(({ registered }) => registered.parentSession === input.session_id);
174
176
  if (candidates.length !== 1) return diagnostic(candidates.length ? "ambiguous-parent-registration" : "missing-parent-registration", input);
175
177
  const { registered, age } = candidates[0];
178
+ target = registered.target;
176
179
  if (!valid(registered, input, target, age)) return;
177
180
  const path = receiptPath(registered.parentSession, target);
178
181
  if (existsSync(path) || existsSync(`${path}.done`)) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/architect",
3
- "version": "0.23.5-preview.1270",
3
+ "version": "0.23.6-preview.1278",
4
4
  "description": "Architecture decision enforcement for AI coding agents",
5
5
  "bin": {
6
6
  "windyroad-architect": "./bin/install.mjs"