@standardagents/builder 0.27.2 → 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/built-in-routes.js +18 -1
- package/dist/built-in-routes.js.map +1 -1
- package/dist/{index-DJ7B8CTp.d.ts → index-DReIS8eP.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +5 -1
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.js +23 -1
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/package.json +5 -5
package/dist/plugin.js
CHANGED
|
@@ -7517,7 +7517,11 @@ ${packedThreadRouteCode}
|
|
|
7517
7517
|
authContext = authResult;
|
|
7518
7518
|
|
|
7519
7519
|
if (routePath.startsWith('/api/threads/')) {
|
|
7520
|
-
|
|
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);
|