@standardagents/builder 0.12.2 → 0.12.4
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 +14 -14
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/index.js +6 -6
- package/dist/index.js +16 -19
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +0 -3
- package/dist/plugin.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9348,9 +9348,6 @@ function validateModelData(data) {
|
|
|
9348
9348
|
if (!data.name || typeof data.name !== "string") {
|
|
9349
9349
|
return "Model name is required and must be a string";
|
|
9350
9350
|
}
|
|
9351
|
-
if (data.name.includes("/")) {
|
|
9352
|
-
return "Model name cannot contain '/'. Reserved for namespace qualification.";
|
|
9353
|
-
}
|
|
9354
9351
|
if (!data.provider || typeof data.provider !== "string") {
|
|
9355
9352
|
return "Model provider is required and must be a string";
|
|
9356
9353
|
}
|
|
@@ -16174,27 +16171,27 @@ var DurableThread = class extends DurableObject {
|
|
|
16174
16171
|
if (isQualifiedName(name)) {
|
|
16175
16172
|
const [packageId, modelName] = parseQualifiedName(name);
|
|
16176
16173
|
const reg = this.registry();
|
|
16177
|
-
|
|
16178
|
-
|
|
16179
|
-
|
|
16180
|
-
|
|
16181
|
-
|
|
16182
|
-
|
|
16183
|
-
|
|
16184
|
-
|
|
16185
|
-
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16174
|
+
if (reg?.packages && packageId) {
|
|
16175
|
+
const pkg = reg.packages[packageId];
|
|
16176
|
+
if (pkg) {
|
|
16177
|
+
if (pkg.models?.[modelName]) {
|
|
16178
|
+
return await pkg.models[modelName]();
|
|
16179
|
+
}
|
|
16180
|
+
const globalRegistry2 = this.models();
|
|
16181
|
+
const globalLoader2 = globalRegistry2[modelName];
|
|
16182
|
+
if (globalLoader2) {
|
|
16183
|
+
console.log(`[loadModel] Packed model "${modelName}" not in package, using global fallback`);
|
|
16184
|
+
return await globalLoader2();
|
|
16185
|
+
}
|
|
16186
|
+
throw new Error(`Model not found: ${name}. Model "${modelName}" not found in package "${packageId}" or global namespace.`);
|
|
16187
|
+
}
|
|
16190
16188
|
}
|
|
16191
16189
|
const globalRegistry = this.models();
|
|
16192
|
-
const globalLoader = globalRegistry[
|
|
16190
|
+
const globalLoader = globalRegistry[name];
|
|
16193
16191
|
if (globalLoader) {
|
|
16194
|
-
console.log(`[loadModel] Packed model "${modelName}" not in package, using global fallback`);
|
|
16195
16192
|
return await globalLoader();
|
|
16196
16193
|
}
|
|
16197
|
-
throw new Error(`Model not found: ${name}
|
|
16194
|
+
throw new Error(`Model not found: ${name}`);
|
|
16198
16195
|
}
|
|
16199
16196
|
const registry = this.models();
|
|
16200
16197
|
const loader = registry[name];
|