@o-lang/olang 1.2.3 → 1.2.4
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 +1 -1
- package/src/runtime/RuntimeAPI.js +14 -14
package/package.json
CHANGED
|
@@ -616,20 +616,20 @@ class RuntimeAPI {
|
|
|
616
616
|
break;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
619
|
+
case 'ask': {
|
|
620
|
+
const target = this._safeInterpolate(step.target, this.context, 'LLM prompt');
|
|
621
|
+
|
|
622
|
+
if (/{[^}]+}/.test(target)) {
|
|
623
|
+
throw new Error(`[O-Lang] Unresolved variables in prompt: "${target}"`);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// ✅ Ask → Action happens ONLY here (runtime)
|
|
627
|
+
const rawResult = await runResolvers(`Action ${target}`);
|
|
628
|
+
const unwrapped = this._unwrapResolverResult(rawResult);
|
|
629
|
+
|
|
630
|
+
if (step.saveAs) this.context[step.saveAs] = unwrapped;
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
633
|
|
|
634
634
|
case 'evolve': {
|
|
635
635
|
const { targetResolver, feedback } = step;
|