@parcha/agentrun-dsl 0.1.0-beta.44 → 0.1.0-beta.46
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/dist/workflow.js +1 -1
- package/package.json +1 -1
package/dist/workflow.js
CHANGED
|
@@ -881,7 +881,7 @@ export function validateWorkflow(workflow, opts) {
|
|
|
881
881
|
const allowed = KIND_KEYS[node.node];
|
|
882
882
|
const extraneous = Object.keys(node).filter((key) => !allowed.has(key));
|
|
883
883
|
if (extraneous.length)
|
|
884
|
-
fail("NODE_KEY_UNKNOWN", ptrOf(path), `${path} (${node.label || node.node}): unknown key(s) for a ${node.node} node: ${extraneous.join(", ")}`);
|
|
884
|
+
fail("NODE_KEY_UNKNOWN", ptrOf(path), `${path} (${node.label || node.node}): unknown key(s) for ${/^[aeiou]/.test(node.node) ? "an" : "a"} ${node.node} node: ${extraneous.join(", ")}`);
|
|
885
885
|
// State keys that hold a `$` are engine-owned (`$host`, and a typed question's `<as>$answers` and `<as>$verify`): no node
|
|
886
886
|
// may write one, wherever the `$` is. A label is the state key whenever `as` is omitted, so labels are held to the same rule.
|
|
887
887
|
if (typeof node.as === "string" && holdsDollar(node.as))
|