@standardagents/builder 0.27.3 → 0.27.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/dist/plugin.js CHANGED
@@ -7517,7 +7517,11 @@ ${packedThreadRouteCode}
7517
7517
  authContext = authResult;
7518
7518
 
7519
7519
  if (routePath.startsWith('/api/threads/')) {
7520
- const threadId = routeMatch.params?.id || routeMatch.params?.threadId;
7520
+ // Packed and user thread endpoints reserve threadId for the owning
7521
+ // thread while nested endpoint parameters may also be named id.
7522
+ // Prefer the explicit thread parameter so /pending/:id and similar
7523
+ // routes authorize against the thread instead of the nested resource.
7524
+ const threadId = routeMatch.params?.threadId || routeMatch.params?.id;
7521
7525
  if (threadId) {
7522
7526
  const agentBuilderId = env.AGENT_BUILDER.idFromName('singleton');
7523
7527
  const agentBuilder = env.AGENT_BUILDER.get(agentBuilderId);