@standardagents/builder 0.17.0-next.a4b7340 → 0.17.1

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
@@ -824,6 +824,12 @@ function needsRegeneration(config) {
824
824
 
825
825
  // src/providers/catalog.ts
826
826
  var FIRST_PARTY_PROVIDERS = [
827
+ {
828
+ name: "anthropic",
829
+ package: "@standardagents/anthropic",
830
+ label: "Anthropic",
831
+ envKeys: ["ANTHROPIC_API_KEY"]
832
+ },
827
833
  {
828
834
  name: "cloudflare",
829
835
  package: "@standardagents/cloudflare",
@@ -6533,6 +6539,18 @@ function readRawRequestBody(req) {
6533
6539
  req.on("error", reject);
6534
6540
  });
6535
6541
  }
6542
+ function resolveContainedFile(baseDir, requestPath) {
6543
+ const resolvedBase = path8__default.resolve(baseDir);
6544
+ const resolved = path8__default.resolve(resolvedBase, `.${path8__default.sep}${requestPath.replace(/^\/+/, "")}`);
6545
+ if (resolved !== resolvedBase && !resolved.startsWith(resolvedBase + path8__default.sep)) {
6546
+ return null;
6547
+ }
6548
+ try {
6549
+ return fs8__default.existsSync(resolved) && fs8__default.statSync(resolved).isFile() ? resolved : null;
6550
+ } catch {
6551
+ return null;
6552
+ }
6553
+ }
6536
6554
  function injectUiConfigIntoHtml(htmlContent) {
6537
6555
  const configScript = `<script>window.__AGENTBUILDER_CONFIG__ = { devMode: true };</script>`;
6538
6556
  return htmlContent.replace(/\/agents\//g, "/").replace("</head>", `${configScript}</head>`);
@@ -6675,6 +6693,15 @@ function createDevMiddleware(server, context) {
6675
6693
  if (isStaticAsset) {
6676
6694
  const cleanUrl = clientPath.split("?")[0];
6677
6695
  filePath = path8__default.join(clientDir, cleanUrl);
6696
+ if (!fs8__default.existsSync(filePath)) {
6697
+ const projectPublicFile = resolveContainedFile(
6698
+ path8__default.resolve(server.config.root, "public"),
6699
+ cleanUrl
6700
+ );
6701
+ if (projectPublicFile) {
6702
+ filePath = projectPublicFile;
6703
+ }
6704
+ }
6678
6705
  } else {
6679
6706
  filePath = path8__default.join(clientDir, "index.html");
6680
6707
  }
@@ -7637,6 +7664,7 @@ var depsToInclude = [
7637
7664
  "zod/v4",
7638
7665
  "zod/v4/core",
7639
7666
  "openai",
7667
+ "@anthropic-ai/sdk",
7640
7668
  "magic-string",
7641
7669
  "@standardagents/spec"
7642
7670
  ];
@@ -7970,6 +7998,27 @@ export { CodeExecutionBridge, DurableAgentBuilder, DurableThread };
7970
7998
  }
7971
7999
  }
7972
8000
  copyRecursive(clientDir, mountDir);
8001
+ const projectPublicDir = path8__default.resolve(process.cwd(), "public");
8002
+ if (fs8__default.existsSync(projectPublicDir)) {
8003
+ let copyPublicRecursive2 = function(src, dest) {
8004
+ const entries = fs8__default.readdirSync(src, { withFileTypes: true });
8005
+ for (const entry of entries) {
8006
+ const srcPath = path8__default.join(src, entry.name);
8007
+ const destPath = path8__default.join(dest, entry.name);
8008
+ if (entry.isDirectory()) {
8009
+ fs8__default.mkdirSync(destPath, { recursive: true });
8010
+ copyPublicRecursive2(srcPath, destPath);
8011
+ } else if (fs8__default.existsSync(destPath)) {
8012
+ console.warn(
8013
+ `[agentbuilder] Skipping public/ file that collides with a built UI asset: ${destPath}`
8014
+ );
8015
+ } else {
8016
+ fs8__default.copyFileSync(srcPath, destPath);
8017
+ }
8018
+ }
8019
+ };
8020
+ copyPublicRecursive2(projectPublicDir, mountDir);
8021
+ }
7973
8022
  }
7974
8023
  };
7975
8024
  return [