@o-lang/olang 1.2.14 → 1.2.15

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.14",
3
+ "version": "1.2.15",
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/runtime/index.js",
@@ -529,34 +529,31 @@ function parseBlock(lines) {
529
529
  continue;
530
530
  }
531
531
 
532
- // Use in block - PRESERVE TOOL EXACTLY (NO NORMALIZATION)
533
- const useMatch = line.match(/^Use\s+(.+)$/i);
534
- if (useMatch) {
535
- flushCurrentStep();
536
- workflow.steps.push({
537
- type: 'action',
538
- actionRaw: `Action ${useMatch[1].trim()}`,
539
- stepNumber: workflow.steps.length + 1,
540
- saveAs: null,
541
- constraints: {}
542
- });
543
- continue;
544
- }
545
-
546
-
547
- // Ask in block — CANONICALIZE AT PARSE TIME
548
- const askMatch = line.match(/^Ask\s+(.+)$/i);
549
- if (askMatch) {
550
- flush();
551
- steps.push({
552
- type: 'action',
553
- actionRaw: `Action ${askMatch[1].trim()}`,
554
- saveAs: null,
555
- constraints: {}
556
- });
557
- continue;
558
- }
532
+ // ✅ FIXED: Use in block consistent with top-level Use handler (Bug 1 + Bug 2)
533
+ const useMatch = line.match(/^Use\s+(.+)$/i);
534
+ if (useMatch) {
535
+ flush();
536
+ steps.push({
537
+ type: 'use',
538
+ tool: useMatch[1].trim(),
539
+ saveAs: null,
540
+ constraints: {}
541
+ });
542
+ continue;
543
+ }
559
544
 
545
+ // Ask in block — CANONICALIZE AT PARSE TIME
546
+ const askMatch = line.match(/^Ask\s+(.+)$/i);
547
+ if (askMatch) {
548
+ flush();
549
+ steps.push({
550
+ type: 'action',
551
+ actionRaw: `Action ${askMatch[1].trim()}`,
552
+ saveAs: null,
553
+ constraints: {}
554
+ });
555
+ continue;
556
+ }
560
557
 
561
558
  // Constraint inside block
562
559
  const constraintMatch = line.match(/^Constraint:\s*(.+)$/i);