@o-lang/olang 1.2.34 → 1.2.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o-lang/olang",
3
- "version": "1.2.34",
3
+ "version": "1.2.35",
4
4
  "author": "Olalekan Ogundipe <info@olang.cloud>",
5
5
  "description": "O-Lang: A governance language for user-directed, rule-enforced agent workflows",
6
6
  "main": "./src/runtime/index.js",
@@ -1086,12 +1086,15 @@ const forbiddenPatterns = [
1086
1086
  // -----------------------------
1087
1087
  // ✅ CRITICAL FIX: Resolver output unwrapping helper
1088
1088
  // -----------------------------
1089
- _unwrapResolverResult(result) {
1090
- if (result && typeof result === 'object' && 'output' in result && result.output !== undefined) {
1091
- return result.output;
1092
- }
1093
- return result;
1089
+ _unwrapResolverResult(result) {
1090
+ if (result && typeof result === 'object') {
1091
+ if (result.output !== undefined) return result.output;
1092
+ if (result.response !== undefined) return result.response; // ✅ ADD THIS
1093
+ if (result.text !== undefined) return result.text;
1094
+ if (result.content !== undefined) return result.content;
1094
1095
  }
1096
+ return result;
1097
+ }
1095
1098
 
1096
1099
  // -----------------------------
1097
1100
  // Step execution (WHERE RESOLVERS ARE INVOKED)