@ateam-ai/mcp 0.4.66 → 0.4.67

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.js +18 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.66",
3
+ "version": "0.4.67",
4
4
  "mcpName": "io.github.ariekogan/ateam-mcp",
5
5
  "description": "A-Team MCP Server — build, validate, and deploy multi-agent solutions from any AI environment",
6
6
  "type": "module",
package/src/api.js CHANGED
@@ -198,7 +198,24 @@ export function touchSession(sessionId, { toolName, solutionId, skillId, actorId
198
198
  // the Builder applies realActorId() before forwarding, so a generated
199
199
  // test_<ts>_<rand> thread key is dropped rather than sent to Core (which 401s on
200
200
  // an actor it cannot find). An explicit actor_id on a call still wins. (2026-08-22.)
201
- if (actorId) session.context.actorId = String(actorId);
201
+ // ONLY A REAL ACTOR. ateam_conversation mints a throwaway THREAD key
202
+ // (test_<ts>_<rand>) for anonymous use and returns it as actor_id — the docs
203
+ // tell callers to pass it back for multi-turn. It is not an actor Core can
204
+ // resolve, and Core 401s the WHOLE REQUEST on an actor it cannot find.
205
+ //
206
+ // I shipped this without the filter and broke ateam_chain_status — the tool
207
+ // every agent polls in a loop — for a chain the same session had just
208
+ // started: 403 "Access denied" became 401 "Authentication required". The
209
+ // commit claimed it was safe because "the Builder applies realActorId()
210
+ // first", which is true only of the two routes I had touched, not of the
211
+ // status/chain pipes. Asserting a safety property that holds locally and
212
+ // assuming it holds everywhere is how the header reached Core unfiltered.
213
+ //
214
+ // So the rule lives at the SOURCE too, matching the Builder's
215
+ // GENERATED_THREAD_ACTOR_RE exactly. (2026-08-22.)
216
+ if (actorId && !/^test_\d+_[a-z0-9]+$/i.test(String(actorId))) {
217
+ session.context.actorId = String(actorId);
218
+ }
202
219
  }
203
220
 
204
221
  /**