trilean 1.0.12 → 1.0.13
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/README.md +37 -0
- package/package.json +1 -1
- package/schemas/trilean.schema.json +1 -1
package/README.md
CHANGED
|
@@ -748,3 +748,40 @@ This package is a representation-plus-evaluator for conditions and formulas over
|
|
|
748
748
|
- **Batch unresolvable-reference reporting.** This design deliberately has no node kind for asking "which of these references, across a whole batch, are unresolvable" as a single evaluation — only the [`exists`](#exists) leaf's one-at-a-time true/false/false-on-absence check. A tool that wants to report a *list* of every missing reference (for an authoring UI validating a tree before it's saved, say) is expected to build that on top of `exists` — walk the references of interest and evaluate an `exists` leaf over each — at the authoring/tooling layer, rather than this package growing a bespoke aggregate-diagnostic node kind for it. This is a deliberate boundary, not an oversight: it keeps the evaluation tree itself limited to producing one `Evaluation` per node, and leaves "collect many such results and report on them together" to whatever sits above the evaluator, exactly like symbolic algebra and complex-number arithmetic above are left to whatever sits beside it.
|
|
749
749
|
|
|
750
750
|
This package does not name or depend on any specific external tool for either of the two delegation cases above — it only defines the shape of the hand-off (an opaque payload plus a named destination system).
|
|
751
|
+
|
|
752
|
+
## Prior art
|
|
753
|
+
|
|
754
|
+
Twenty-three existing tools — JSON rule engines, expression languages, query-filter conventions, and three-valued-logic precedents — researched against seven properties trilean combines: a genuinely portable representation, injected async data access, a real three-outcome logic, vendor-agnostic scope, mixing logic and arithmetic in one tree, no code-execution surface for an untrusted author, and a formally published schema. None of the twenty-three combine all seven. Each verdict below was checked against the tool's own documentation, specification, or a security advisory, not assumed from category.
|
|
755
|
+
|
|
756
|
+
The closest structural relative is [GoRules' Zen Engine](https://gorules.io) (`@gorules/zen-engine`), whose JDM format is a genuinely portable JSON decision graph with a real injected extension point — but its outcome model is value-level nulls, not a propagating three-valued logic, and its "Function" node type runs real JavaScript rather than staying within a bounded grammar. The closest semantic relative is [DMN](https://www.omg.org/spec/DMN)'s FEEL expression language, which implements the identical absorbing-AND/OR three-valued truth tables trilean does — but FEEL's canonical form is XML, not JSON.
|
|
757
|
+
|
|
758
|
+
Worth knowing: a Rust crate on crates.io is also named [`trilean`](https://crates.io/crates/trilean) and also implements Kleene's three-valued logic — a genuine name collision, different ecosystem, no npm conflict, unrelated project.
|
|
759
|
+
|
|
760
|
+
The security research here surfaced findings worth knowing independent of the comparison: [JSONata](https://jsonata.org) has had multiple prototype-pollution CVEs reaching `Function`/`child_process`; [jexl](https://github.com/TomFrost/Jexl) has a documented, unfixed path to `Function.prototype` via `__proto__`; [expr-eval](https://github.com/silentmatt/expr-eval) has a prototype-pollution CVE (CVE-2026-12866); and MongoDB's `$where`/`$function` and JsonLogic's `method` operator are documented, acknowledged arbitrary-code escape hatches. [CEL](https://cel.dev), [filtrex](https://github.com/cshaa/filtrex), and [Rego](https://www.openpolicyagent.org/docs/policy-language) are the standouts, each explicitly designed and marketed as safe for untrusted input.
|
|
761
|
+
|
|
762
|
+
| Tool | Category | Portable data | Async access | Missing ≠ false | Vendor-agnostic | Mixes logic & math | No code-exec risk | Published schema |
|
|
763
|
+
|---|---|---|---|---|---|---|---|---|
|
|
764
|
+
| [trilean](https://www.npmjs.com/package/trilean) | — | 🟢<br>JSON, Zod-validated, RFC 8785 canonical | 🟢<br>three typed resolver contracts | 🟢<br>definite/indeterminate, typed reason | 🟢<br>no assumptions about consumer data | 🟢<br>compare/textCompare/memberOf take formulas | 🟢<br>call's fn is a registry key, never code | 🟢<br>one Zod schema generates both |
|
|
765
|
+
| [JsonLogic](https://www.npmjs.com/package/json-logic-js) | Rule engine | 🟢 | 🔴<br>direct path lookup | 🔴<br>counts as false | 🟢 | 🟢<br>any operand can be another rule | 🟡<br>`method` op is an acknowledged escape hatch | 🔴<br>a JSON Schema request was never resolved |
|
|
766
|
+
| [json-rules-engine](https://www.npmjs.com/package/json-rules-engine) | Rule engine | 🟢 | 🟢<br>async fact handlers | 🔴<br>undocumented | 🟢 | 🔴<br>docs call inline formulas "a design smell" | 🟢<br>operators are name-based registry lookups | 🔴<br>a proposed schema was never merged |
|
|
767
|
+
| [json-rules-engine-simplified](https://www.npmjs.com/package/json-rules-engine-simplified) | Rule engine | 🟢 | 🔴<br>direct path lookup | 🔴<br>falls through to false | 🟢 | 🔴<br>no arithmetic/formula node exists | 🟢<br>no `eval()`, by the project's own claim | 🔴<br>README prose only |
|
|
768
|
+
| [Zen Engine](https://www.npmjs.com/package/@gorules/zen-engine) / [JDM](https://docs.gorules.io/developers/jdm/standard) | Rule engine | 🟢 | 🟢<br>injected custom-node callback | 🟡<br>null-coalescing only | 🟢 | 🟢<br>ZEN expressions nest arithmetic in comparisons | 🟡<br>Function nodes run real JS, sandboxed | 🟡<br>docs claim one, none found published |
|
|
769
|
+
| [nools](https://www.npmjs.com/package/nools) | Rule engine | 🔴<br>JS/DSL | 🔴 | 🔴 | 🟢 | 🟢<br>DSL nests arithmetic in comparisons | 🔴<br>the `then` block is literal JS | 🔴<br>DSL documented only in prose |
|
|
770
|
+
| [rools](https://www.npmjs.com/package/rools) | Rule engine | 🔴<br>rules are JS | 🔴 | 🔴 | 🟢 | 🟢<br>but only because it's unrestricted JS | 🔴<br>"rules are specified in pure JavaScript" | 🔴<br>plain JS, prose docs only |
|
|
771
|
+
| [node-rules](https://www.npmjs.com/package/node-rules) | Rule engine | 🔴<br>conditions are JS | 🔴 | 🔴 | 🟢 | 🟢<br>but only because it's unrestricted JS | 🔴<br>a condition is explicitly "a function" | 🔴<br>prose docs only |
|
|
772
|
+
| [JSONata](https://www.npmjs.com/package/jsonata) | Expression lang. | 🟡<br>undocumented shape | 🟢 | — | 🟢 | 🟢<br>arithmetic on both sides of any comparison | 🔴<br>multiple prototype-pollution CVEs to RCE | 🔴<br>hand-written parser, a grammar request was declined |
|
|
773
|
+
| [CEL](https://cel.dev) | Expression lang. | 🟢<br>as Protobuf, not JSON | 🔴<br>sync by design | — | 🟢 | 🟢<br>arithmetic feeds directly into comparison | 🟢<br>explicitly designed safe for untrusted code | 🟢<br>versioned .proto files, wire-compatible forever |
|
|
774
|
+
| [jexl](https://www.npmjs.com/package/jexl) | Expression lang. | 🔴<br>private, unexposed | 🟢<br>closest match | — | 🟢 | 🟢<br>arithmetic and logical ops nest freely | 🔴<br>documented unfixed `__proto__` access issue | 🔴<br>grammar lives in a JS source file |
|
|
775
|
+
| [filtrex](https://www.npmjs.com/package/filtrex) | Expression lang. | 🔴<br>AST retained | 🔴<br>sandboxed sync closure | — | 🟢 | 🟢<br>documented example nests a product in a condition | 🟢<br>markets itself explicitly as safe for end-users | 🔴<br>a real grammar file exists but ships unpublished |
|
|
776
|
+
| [expr-eval](https://www.npmjs.com/package/expr-eval) | Expression lang. | 🔴<br>(jsep-based siblings do) | 🔴 | — | 🟢 | 🟢<br>and/or plus comparisons alongside arithmetic | 🔴<br>CVE-2026-12866, prototype pollution to RCE | 🔴<br>prose README only |
|
|
777
|
+
| [mathjs](https://www.npmjs.com/package/mathjs) | Expression lang. | 🔴<br>round-trip unreliable | 🔴<br>sync `evaluate()` | — | 🟢 | 🟢<br>arithmetic binds tighter than and/or, by design | 🟡<br>`eval` removed, but real sandbox-escape CVEs existed | 🔴<br>documented only in prose |
|
|
778
|
+
| [MongoDB query operators](https://www.mongodb.com/docs/manual/reference/operator/query/) | Query/filter DSL | 🟢 | — | — | 🔴<br>MQL only | 🟡<br>only behind the `$expr` escape hatch | 🟡<br>`$where`/`$function` run arbitrary server-side JS | 🟡<br>an official grammar exists but is archived since 2021 |
|
|
779
|
+
| [Prisma `where`](https://www.prisma.io/docs/orm/prisma-client/queries/filtering-and-sorting) | Query/filter DSL | 🔴<br>never transmitted | — | — | 🔴<br>per-schema generated | 🔴<br>computed fields aren't usable for filtering at all | 🟢<br>a fixed, enumerated operator set only | 🔴<br>generated internal TypeScript types only |
|
|
780
|
+
| [OData `$filter`](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html) | Query/filter DSL | 🟢<br>as a query string | — | — | 🟢<br>OASIS standard | 🟢<br>arithmetic operators combine directly with comparisons | 🟢<br>fixed operator set, no code-reference mechanism | 🟢<br>a normative, versioned ABNF grammar document |
|
|
781
|
+
| [JSON:API `filter`](https://jsonapi.org/format/#fetching-filtering) | Query/filter DSL | 🔴<br>reservation only | — | — | 🟡<br>no grammar defined | — | — | — |
|
|
782
|
+
| [GraphQL (Hasura-style)](https://hasura.io/docs/2.0/queries/postgres/filters/boolean-operators/) | Query/filter DSL | 🟢 | — | — | 🟡<br>de facto convention | 🟡<br>operand can be a column, never a computed formula | 🟢<br>fixed comparison-operator vocabulary | 🟡<br>real schema, but generated per deployment |
|
|
783
|
+
| [SQL `NULL` / `UNKNOWN`](https://www.postgresql.org/docs/current/functions-comparison.html) | 3VL precedent | 🔴<br>language semantic | — | 🟢<br>same absorbing tables | 🟢 | 🟢<br>WHERE-clause operands are arbitrary expressions | — | — |
|
|
784
|
+
| [DMN's FEEL](https://www.omg.org/spec/DMN) | 3VL precedent | 🟢<br>as XML, not JSON | — | 🟢<br>absorbing | 🟢<br>OMG standard | 🟢<br>full FEEL mixes arithmetic and and/or freely | 🟡<br>a boxed function can invoke external Java/PMML by name | 🟡<br>DMN XML has an XSD, FEEL itself is prose BNF |
|
|
785
|
+
| [OPA / Rego](https://www.openpolicyagent.org/docs/policy-language) | 3VL precedent | 🟢<br>, as source text | — | 🟡<br>absence, not a value | 🟢 | 🟢<br>comparisons take arithmetic sub-expressions | 🟢<br>explicitly not Turing-complete, by design | 🔴<br>grammar is prose EBNF, no standalone file |
|
|
786
|
+
| [AWS IAM policy language](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) | 3VL precedent | 🟢 | — | 🟡<br>default, not propagating | 🔴<br>AWS-specific | 🔴<br>every condition value is a literal string | 🟢<br>bounded grammar, fixed operator set | 🔴<br>only a prose BNF-like description |
|
|
787
|
+
| [`trinary`](https://pypi.org/project/trinary/), [`tvl`](https://github.com/archanpatkar/tvl), [`3vl`](https://www.npmjs.com/package/3vl), Go [`ternary`](https://github.com/mithrandie/ternary) | 3VL precedent | 🔴<br>in-memory only | — | 🟢<br>Kleene K3 | 🟢 | — | — | — |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trilean",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Three-valued predicate and expression evaluation trees, stored as JSON and evaluated against injected resolvers, for domain logic — business rules, eligibility checks, formulas, search filters, and more — that needs to be data instead of code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$defs":{"ExpressionNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.0.
|
|
1
|
+
{"$defs":{"ExpressionNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.0.13/schemas/trilean.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"$ref":"#/$defs/PredicateNode"},{"$ref":"#/$defs/ExpressionNode"}]}
|