@o-lang/olang 1.0.13 → 1.0.14
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/cli.js +1 -1
- package/package.json +1 -1
- package/src/runtime.js +3 -6
package/cli.js
CHANGED
package/package.json
CHANGED
package/src/runtime.js
CHANGED
|
@@ -144,17 +144,14 @@ class RuntimeAPI {
|
|
|
144
144
|
async executeStep(step, agentResolver) {
|
|
145
145
|
const stepType = step.type;
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
// Get resolver name from metadata, trim whitespace
|
|
147
|
+
const validateResolver = (resolver) => {
|
|
149
148
|
const resolverName = (resolver?.resolverName || resolver?.name || '').trim();
|
|
150
|
-
|
|
151
149
|
if (!resolverName) throw new Error('[O-Lang] Resolver missing name metadata');
|
|
152
150
|
|
|
153
|
-
// Normalize allowed resolver names for comparison
|
|
154
151
|
const allowed = Array.from(this.allowedResolvers || []).map(r => r.trim());
|
|
155
152
|
|
|
156
|
-
// Auto-inject builtInMathResolver if
|
|
157
|
-
if (
|
|
153
|
+
// Auto-inject builtInMathResolver if step type is 'calculate' and resolver is math
|
|
154
|
+
if (step.type === 'calculate' && resolverName === 'builtInMathResolver' && !allowed.includes('builtInMathResolver')) {
|
|
158
155
|
this.allowedResolvers.add('builtInMathResolver');
|
|
159
156
|
allowed.push('builtInMathResolver');
|
|
160
157
|
}
|