@standardagents/builder 0.27.3 → 0.27.5

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.
@@ -66192,7 +66192,7 @@ var config_get_default = defineController2(async ({ config, env: env2, req }) =>
66192
66192
  });
66193
66193
 
66194
66194
  // src/version.ts
66195
- var BUILDER_VERSION = "0.27.3".length > 0 ? "0.27.3" : "dev";
66195
+ var BUILDER_VERSION = "0.27.5".length > 0 ? "0.27.5" : "dev";
66196
66196
 
66197
66197
  // src/api/diagnostics.get.ts
66198
66198
  init_LLMRequest();
package/dist/index.js CHANGED
@@ -21416,7 +21416,11 @@ ${packedThreadRouteCode}
21416
21416
  authContext = authResult;
21417
21417
 
21418
21418
  if (routePath.startsWith('/api/threads/')) {
21419
- const threadId = routeMatch.params?.id || routeMatch.params?.threadId;
21419
+ // Packed and user thread endpoints reserve threadId for the owning
21420
+ // thread while nested endpoint parameters may also be named id.
21421
+ // Prefer the explicit thread parameter so /pending/:id and similar
21422
+ // routes authorize against the thread instead of the nested resource.
21423
+ const threadId = routeMatch.params?.threadId || routeMatch.params?.id;
21420
21424
  if (threadId) {
21421
21425
  const agentBuilderId = env.AGENT_BUILDER.idFromName('singleton');
21422
21426
  const agentBuilder = env.AGENT_BUILDER.get(agentBuilderId);
@@ -24408,6 +24412,9 @@ var DurableThread = class _DurableThread extends DurableObject {
24408
24412
  codeExecutionBridges = /* @__PURE__ */ new Map();
24409
24413
  constructor(ctx, env) {
24410
24414
  super(ctx, env);
24415
+ ctx.setWebSocketAutoResponse(
24416
+ new WebSocketRequestResponsePair("stream_ping", "stream_pong")
24417
+ );
24411
24418
  this.alarmQueue = new AlarmQueue(ctx);
24412
24419
  this.alarmQueue.setExecutor(
24413
24420
  async (method, args, itemId) => {
@@ -30629,6 +30636,9 @@ var DurableAgentBuilder = class extends DurableObject {
30629
30636
  eventSockets = /* @__PURE__ */ new Set();
30630
30637
  constructor(ctx, env) {
30631
30638
  super(ctx, env);
30639
+ ctx.setWebSocketAutoResponse(
30640
+ new WebSocketRequestResponsePair("stream_ping", "stream_pong")
30641
+ );
30632
30642
  const sockets = ctx.getWebSockets();
30633
30643
  for (const ws of sockets) {
30634
30644
  const attachment = ws.deserializeAttachment();