@standardagents/builder 0.40.4 → 0.40.5-next.3b25e2a
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 +26 -6
- package/dist/built-in-routes.js.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +15 -2
- package/dist/plugin.js.map +1 -1
- package/package.json +5 -5
package/dist/plugin.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ interface DeviceApprovalBrand {
|
|
|
11
11
|
|
|
12
12
|
interface AgentPluginOptions {
|
|
13
13
|
compatibilityDate?: string;
|
|
14
|
+
/** Additional Cloudflare compatibility flags required by this Worker. */
|
|
15
|
+
compatibilityFlags?: string[];
|
|
14
16
|
toolsDir?: string;
|
|
15
17
|
hooksDir?: string;
|
|
16
18
|
apiDir?: string;
|
package/dist/plugin.js
CHANGED
|
@@ -8289,6 +8289,18 @@ ${validUserProviders.map((p) => ` "${p.name}": async () => (await import("${p.i
|
|
|
8289
8289
|
}
|
|
8290
8290
|
}
|
|
8291
8291
|
var DEFAULT_AGENTBUILDER_COMPATIBILITY_DATE = "2025-08-13";
|
|
8292
|
+
var REQUIRED_AGENTBUILDER_COMPATIBILITY_FLAGS = [
|
|
8293
|
+
"nodejs_compat",
|
|
8294
|
+
"enable_ctx_exports"
|
|
8295
|
+
];
|
|
8296
|
+
function compatibilityFlagsWithBuilderRequirements(flags = []) {
|
|
8297
|
+
if (flags.some((flag) => typeof flag !== "string" || flag.trim().length === 0)) {
|
|
8298
|
+
throw new Error(
|
|
8299
|
+
"compatibilityFlags must contain non-empty Cloudflare compatibility flag names"
|
|
8300
|
+
);
|
|
8301
|
+
}
|
|
8302
|
+
return [.../* @__PURE__ */ new Set([...REQUIRED_AGENTBUILDER_COMPATIBILITY_FLAGS, ...flags])];
|
|
8303
|
+
}
|
|
8292
8304
|
var depsToExclude = [
|
|
8293
8305
|
"@standardagents/builder",
|
|
8294
8306
|
"@standardagents/builder/runtime",
|
|
@@ -8397,7 +8409,7 @@ function createAgentBuilderWorkerConfig(options) {
|
|
|
8397
8409
|
// in vite.config.ts plus their agents/ source tree.
|
|
8398
8410
|
main: options.workerEntry,
|
|
8399
8411
|
compatibility_date: compatibilityDate,
|
|
8400
|
-
compatibility_flags:
|
|
8412
|
+
compatibility_flags: compatibilityFlagsWithBuilderRequirements(options.compatibilityFlags),
|
|
8401
8413
|
observability: {
|
|
8402
8414
|
enabled: true
|
|
8403
8415
|
},
|
|
@@ -8788,7 +8800,8 @@ export { CodeExecutionBridge, DurableAgentBuilder, DurableThread, ThreadWatchdog
|
|
|
8788
8800
|
corePlugin,
|
|
8789
8801
|
...createAgentBuilderCloudflarePlugins({
|
|
8790
8802
|
workerEntry,
|
|
8791
|
-
compatibilityDate: options.compatibilityDate ?? DEFAULT_AGENTBUILDER_COMPATIBILITY_DATE
|
|
8803
|
+
compatibilityDate: options.compatibilityDate ?? DEFAULT_AGENTBUILDER_COMPATIBILITY_DATE,
|
|
8804
|
+
compatibilityFlags: options.compatibilityFlags
|
|
8792
8805
|
})
|
|
8793
8806
|
];
|
|
8794
8807
|
}
|