@standardagents/builder 0.9.2 → 0.9.3

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/index.d.ts CHANGED
@@ -652,10 +652,13 @@ interface LogData {
652
652
  /**
653
653
  * Minimum required environment bindings for thread endpoints.
654
654
  * User's Env interface should extend this.
655
+ *
656
+ * Uses Rpc.DurableObjectBranded to allow users to specify their own
657
+ * Durable Object types that extend DurableThread/DurableAgentBuilder.
655
658
  */
656
659
  interface ThreadEnv {
657
- AGENT_BUILDER_THREAD: DurableObjectNamespace;
658
- AGENT_BUILDER: DurableObjectNamespace;
660
+ AGENT_BUILDER_THREAD: DurableObjectNamespace<Rpc.DurableObjectBranded>;
661
+ AGENT_BUILDER: DurableObjectNamespace<Rpc.DurableObjectBranded>;
659
662
  }
660
663
  interface ControllerContext<Env = any> {
661
664
  req: Request;
package/dist/index.js CHANGED
@@ -6854,24 +6854,6 @@ export class DurableAgentBuilder extends _BaseDurableAgentBuilder {
6854
6854
  next();
6855
6855
  return;
6856
6856
  }
6857
- const uiDevServer = process.env.UI_DEV_SERVER;
6858
- if (uiDevServer && !pathWithoutMount.startsWith("/api/")) {
6859
- const targetUrl = `${uiDevServer}${pathWithoutMount}`;
6860
- try {
6861
- const proxyRes = await fetch(targetUrl);
6862
- res.statusCode = proxyRes.status;
6863
- proxyRes.headers.forEach((value, key) => {
6864
- if (!["content-encoding", "transfer-encoding"].includes(key.toLowerCase())) {
6865
- res.setHeader(key, value);
6866
- }
6867
- });
6868
- const body = await proxyRes.arrayBuffer();
6869
- res.end(Buffer.from(body));
6870
- return;
6871
- } catch (error) {
6872
- console.error("[agentbuilder] Failed to proxy to UI dev server:", error);
6873
- }
6874
- }
6875
6857
  const isStaticAsset = pathWithoutMount.startsWith("/assets/") || pathWithoutMount.startsWith("/vendor.js") || pathWithoutMount.startsWith("/vue.js") || pathWithoutMount.startsWith("/monaco.js") || pathWithoutMount.startsWith("/index.js") || pathWithoutMount.startsWith("/index.css") || pathWithoutMount.match(/\.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot|ico)$/);
6876
6858
  {
6877
6859
  const currentDir = path3.dirname(fileURLToPath(import.meta.url));