@standardagents/builder 0.40.5-next.3b25e2a → 0.40.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.
@@ -5047,9 +5047,7 @@ Message one with subagent_message(referenceId, message).`
5047
5047
  if (resumable) {
5048
5048
  await this.settleResumableChildAfterRun(
5049
5049
  state,
5050
- stub,
5051
- childThreadId,
5052
- childResult
5050
+ childThreadId
5053
5051
  );
5054
5052
  } else if (stub.terminateThread) {
5055
5053
  await stub.terminateThread(childThreadId);
@@ -5061,7 +5059,7 @@ Message one with subagent_message(referenceId, message).`
5061
5059
  attachments: copiedAttachments,
5062
5060
  subagent_id: childThreadId
5063
5061
  };
5064
- return resumable && !this.isTerminalSubagentResult(childResult) ? this.withReferenceInToolResult(toolResult, childThreadId) : toolResult;
5062
+ return resumable ? this.withReferenceInToolResult(toolResult, childThreadId) : toolResult;
5065
5063
  }
5066
5064
  const backgroundRun = (async () => {
5067
5065
  try {
@@ -5096,9 +5094,7 @@ Message one with subagent_message(referenceId, message).`
5096
5094
  if (resumable) {
5097
5095
  await this.settleResumableChildAfterRun(
5098
5096
  state,
5099
- stub,
5100
- childThreadId,
5101
- childResult
5097
+ childThreadId
5102
5098
  );
5103
5099
  } else if (stub.terminateThread) {
5104
5100
  await stub.terminateThread(childThreadId);
@@ -5493,18 +5489,8 @@ Message one with subagent_message(referenceId, message).`
5493
5489
  JSON.stringify(next)
5494
5490
  );
5495
5491
  }
5496
- static isTerminalSubagentResult(result) {
5497
- return result.terminal === true;
5498
- }
5499
- static async settleResumableChildAfterRun(state, childThread, reference, result) {
5500
- if (!this.isTerminalSubagentResult(result)) {
5501
- await this.updateChildStatus(state, reference, "idle");
5502
- return;
5503
- }
5504
- await this.updateChildStatus(state, reference, "terminated");
5505
- if (typeof childThread.terminateThread === "function") {
5506
- await childThread.terminateThread(reference);
5507
- }
5492
+ static async settleResumableChildAfterRun(state, reference) {
5493
+ await this.updateChildStatus(state, reference, "idle");
5508
5494
  }
5509
5495
  static async buildChildInvocationMessages(state, childThread, content, receivesMessages, parentAttachments, initialArguments) {
5510
5496
  const copiedAttachments = await this.copyAttachmentsBetweenThreads(
@@ -68027,7 +68013,14 @@ function isHostedInstance(env2) {
68027
68013
  }
68028
68014
  return Boolean(value);
68029
68015
  }
68030
- function isTrustedLocalDevelopmentRequest(request, env2) {
68016
+ function compiledTrustedDevHosts() {
68017
+ try {
68018
+ return typeof __STANDARD_AGENTS_TRUSTED_DEV_HOSTS__ !== "undefined" && Array.isArray(__STANDARD_AGENTS_TRUSTED_DEV_HOSTS__) ? __STANDARD_AGENTS_TRUSTED_DEV_HOSTS__ : [];
68019
+ } catch {
68020
+ return [];
68021
+ }
68022
+ }
68023
+ function isTrustedLocalDevelopmentRequest(request, env2, trustedDevHosts = compiledTrustedDevHosts()) {
68031
68024
  if (isHostedInstance(env2)) return false;
68032
68025
  let hostname;
68033
68026
  try {
@@ -68035,7 +68028,7 @@ function isTrustedLocalDevelopmentRequest(request, env2) {
68035
68028
  } catch {
68036
68029
  return false;
68037
68030
  }
68038
- return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost") || hostname.endsWith(".orb.local");
68031
+ return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost") || hostname.endsWith(".orb.local") || trustedDevHosts.some((trusted) => trusted.trim().toLowerCase() === hostname);
68039
68032
  }
68040
68033
  function requestObservedOrigins(request) {
68041
68034
  const origins = /* @__PURE__ */ new Set();
@@ -68899,7 +68892,7 @@ var config_get_default = defineController2(async ({ config, env: env2, req }) =>
68899
68892
  });
68900
68893
 
68901
68894
  // src/version.ts
68902
- var BUILDER_VERSION = "0.40.5-next.3b25e2a".length > 0 ? "0.40.5-next.3b25e2a" : "dev";
68895
+ var BUILDER_VERSION = "0.40.5".length > 0 ? "0.40.5" : "dev";
68903
68896
 
68904
68897
  // src/api/diagnostics.get.ts
68905
68898
  init_LLMRequest();
@@ -75494,11 +75487,8 @@ var tool_result_post_default = defineController2(async ({ req, params, env: env2
75494
75487
  if (!delivered) {
75495
75488
  return Response.json({ status: "ignored" }, { status: 200 });
75496
75489
  }
75497
- if (delivered.resume) {
75498
- await stub.continueExecution(threadId, delivered.side);
75499
- return Response.json({ status: "resumed", side: delivered.side }, { status: 200 });
75500
- }
75501
- return Response.json({ status: "delivered", side: delivered.side }, { status: 200 });
75490
+ await stub.continueExecution(threadId, delivered.side);
75491
+ return Response.json({ status: "resumed", side: delivered.side }, { status: 200 });
75502
75492
  } catch (error) {
75503
75493
  console.error(`Error delivering tool result for thread ${threadId}:`, error);
75504
75494
  return Response.json(