@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 CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  const { Command } = require('commander');
3
3
  const { parse } = require('./src/parser');
4
4
  const { execute } = require('./src/runtime');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o-lang/olang",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "author": "Olalekan Ogundipe <info@workfily.com>",
5
5
  "description": "O-Lang: A governance language for user-directed, rule-enforced agent workflows",
6
6
  "main": "./src/index.js",
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
- const validateResolver = (resolver) => {
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 math is required
157
- if (resolverName === 'builtInMathResolver' && workflow.__requiresMath && !allowed.includes('builtInMathResolver')) {
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
  }