@o-lang/olang 1.2.22 → 1.2.23

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.22",
3
+ "version": "1.2.23",
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",
@@ -919,23 +919,28 @@ class RuntimeAPI {
919
919
  c.includes('withdraw')
920
920
  );
921
921
 
922
- if (!hasCapability) {
923
- const match = output.match(pattern);
924
-
925
- // ✅ Explicitly flag African & Financial context for Audit Logs
926
- const isAfrican = ['yo', 'ig', 'ha', 'sw', 'zu', 'am', 'om', 'ff', 'so', 'sn'].includes(lang);
927
- const isFinancial = ['transfer', 'payment', 'withdrawal', 'deposit', 'financial_action'].includes(capability);
928
-
929
- return {
930
- passed: false,
931
- reason: `Hallucinated "${capability}" capability in ${lang}...`,
932
- detected: match ? match[0].trim() : 'unknown pattern',
933
- language: lang,
934
- african_language_detected: isAfrican,
935
- financial_expression_found: isFinancial,
936
- capability_attempted: capability
937
- };
938
- }
922
+ if (!hasCapability) {
923
+ const match = output.match(pattern);
924
+
925
+ // ✅ Explicitly flag African & Financial context for Audit Logs
926
+ const isAfrican = ['yo', 'ig', 'ha', 'sw', 'zu', 'am', 'om', 'ff', 'so', 'sn'].includes(lang);
927
+ const isFinancial = ['transfer', 'payment', 'withdrawal', 'deposit', 'financial_action'].includes(capability);
928
+
929
+ return {
930
+ passed: false,
931
+ reason: `Hallucinated "${capability}" capability in ${lang}...`,
932
+ detected: match ? match[0].trim() : 'unknown pattern',
933
+ language: lang,
934
+ african_language_detected: isAfrican,
935
+ financial_expression_found: isFinancial,
936
+ capability_attempted: capability
937
+ };
938
+ }
939
+ }
940
+ }
941
+ return { passed: true };
942
+ }
943
+
939
944
  // -----------------------------
940
945
  // ✅ CRITICAL FIX: Resolver output unwrapping helper
941
946
  // -----------------------------
@@ -1469,7 +1474,7 @@ class RuntimeAPI {
1469
1474
  const db = this.dbClient.client.db(process.env.DB_NAME || 'olang');
1470
1475
  await db.collection(step.collection).insertOne({
1471
1476
  workflow_name: this.context.workflow_name || 'unknown',
1472
- data: sourceValue,
1477
+ sourceValue,
1473
1478
  created_at: new Date()
1474
1479
  });
1475
1480
  break;