mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
fix(flows): normalize bare-scope jq in condition expressions + prompt guard (B17) (#4707)
This commit is contained in:
@@ -307,6 +307,14 @@ the run scope (`.`):
|
||||
the first output is used; a bad program yields `null` (never an error).
|
||||
- A string **without** a leading `=` is a literal. To emit a literal `=`, don't
|
||||
start the string with it.
|
||||
- **Never mix the shorthand with jq.** If an expression **begins with a bare
|
||||
scope key** (`item`/`items`/`run`/`nodes`) and continues into jq syntax —
|
||||
`|`, `[`, functions (`any(...)`, `length`), or anything beyond a plain
|
||||
dotted path — it MUST start with `.` instead (the jq root): write
|
||||
`"=.item.labels | any(.name==\"x\")"`, NOT `"=item.labels | any(...)"`. The
|
||||
plain shorthand `"=item.labels"` (no jq) is fine alone. Expressions that
|
||||
already start with valid jq syntax (e.g. `"=[.item.a, .item.b]"` for array
|
||||
construction) don't need an extra leading dot — only bare scope keys do.
|
||||
|
||||
The scope exposes:
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule vendor/tinyflows updated: 56d81dfdad...68590ed32e
Reference in New Issue
Block a user