Commit Graph
607 Commits
Author SHA1 Message Date
GoRules Team 61862ab9ef chore(release): publish (#526) zen-expression-v2.1.0 zen-macros-v2.1.0 zen-engine-v2.1.0 zen-types-v2.1.0 uniffi-v2.1.0 zen-tmpl-v2.1.0 nodejs-v2.1.0 go-v2.1.0 python-v2.1.0 2026-09-29 12:35:25 +02:00
stefan-gorules efb213c9c8 chore: align binding versions with core in releases (#531) 2026-09-29 12:17:11 +02:00
stefan-gorules 41e3f8ce60 fix: keep decimal fractions when serializing numbers without arbitrary precision (#530)
Without the arbitrary_precision feature, numbers were serialized through
to_u64/to_i64 first, which truncate, so 1.5 became 1 and 0.1 became 0.
Only integral values take the integer path now; the serialization for
Variable and RcValue shares one implementation.
2026-09-29 10:23:43 +02:00
stefan-gorules 39916c9d18 feat: date input (#529)
* feat: declared dates as date values

- graph format:date/date-time inputs and policy date properties arrive as
  dates that keep their original text for output, string() and string
  functions
- d() keeps the instant of offset/Z strings, resolves DST gaps and accepts
  ISO forms without offset, compact, slash-separated, YYYY-MM and YYYY
- dates compare with date strings in ==, !=, <, >, in and contains, and
  concatenate with strings; deprecated date helpers accept dates
- string(date), type() reports date, and date-to-string at string inputs

* fix: close review gaps in date inputs

- parse new date formats by exact shape; keep master formats first and
  guard DST-gap and extreme-year overflows
- text-carrying dates act as strings for object keys, in-object, index,
  slice, concatenation and bool
- deprecated helpers fall back to the date instant; time() accepts dates
- schema-less child inputs receive date text; dates satisfy string
  parameters and slicing in the type checker
- convert policy input before validation so dates are parsed once;
  share rewrite helpers between graph and policy conversion

* fix: align date text, unions, references and child inputs

- every valid date exposes a text form (original or RFC3339), so string
  functions and slicing on computed dates match the type checker
- date and string types merge to string; reference ids typed as dates
  resolve through their text
- input nodes convert declared dates and hand every other converted date
  back as its original text, following combinators only for structure
- date format checks no longer allocate
2026-09-29 09:59:44 +02:00
stefan-gorules 4aba11edd3 fix: tolerate null inputs and enforce required policy inputs (#528)
- graph input and output validation treats null optional properties as
  absent (including inside anyOf/oneOf objects) and reports the real
  error when validation still fails
- remove the NULLABILITY_DIVERGENCE diagnostic
- policies enforce required inputs also without goals; a path is missing
  when absent or null unless a step along it is optional, checked after
  reference hydration, and computed entity fields are not inputs
2026-09-28 22:51:47 +02:00
stefan-gorules ffdfd807d1 feat: implement slots instead of natural language (#527)
* feat: implement slots instead of natural language

Replace the natural-language projection (`nl`) with engine-owned slot
completion: for a cursor position the engine classifies the slot being
edited (operand, operator, literal, member access, ...) and returns typed
options, literal facts and the expected type, for policies and graphs.

- zen-expression: new `slot` module (classification, literals, operators)
  and a lenient lexer mode for incomplete input; `nl` removed
- Intellisense: typed diagnostic codes with arguments, richer inspect for
  hover, dedicated parser error variants (messages unchanged)
- Engine: `Workspace::cursor_scope`, `slot`, `facts`; `rename_from` and
  `references_from`; editor spans in UTF-16 units; renames reach imported
  policies, `$nodes` reads, child graphs and output column heads; no `$root`
  completion in policies
- Node bindings: `slot`, `facts`, `cursorScope`, `slotBatch` replace
  `nl`, `nlTokenize`, `nlEncodeString`, `nlTokenizeBatch`

No change to expression evaluation: the VM, compiler, functions and the
default lexer path are untouched, and parser error messages keep their text.

* fix: harden slot classification, scopes and graph expectations

- restore master execution order; slot scopes hide writes of the edited
  block and its dependents instead of relying on block ranking
- token-start editing gated by slot state; operator, list and operand
  spans no longer splice into neighbouring tokens
- interval-aware bracket pairing for half-open and reversed intervals
- lenient lexer recovers from unknown characters (slots only)
- graph expected type follows switch and pass-through nodes and merges
  compatible output schemas
- sibling inference caps distinct values and analyses lazily
- deterministic overload return type display

* fix: order policy blocks by entity reads through closures and relationships

- record reads for `#.field` in closures so entity fields read through
  lists become dependencies
- link reads through derived lists (filter/map results) to the entity
  fields they carry and order the list after those fields
- evaluate entity blocks on single relationships, and demand entity
  paths for plain reads through relationships
- slot scopes keep the top-level variable when hiding written fields
2026-09-28 21:47:40 +02:00
stefan-gorules a7157f3448 fix: scope policy evaluation to the import closure (#525)
* fix: scope policy evaluation to the import closure

A policy is now analysed and evaluated together with the policies it
imports (transitively), instead of every policy connected to it by imports
in either direction. Importers and siblings no longer leak into each other:
compiled evaluate() of an imported policy used to run its importers' and
siblings' blocks.

- Evaluation gate analyses the entry's import closure as one unit, so a
  child may read fields and reference entities its importer declares when
  evaluated through that importer
- compile() reports a policy that is only valid through an importer with
  kind "policyImportOnly" instead of failing it as a plain "policy"; errors
  are computed once per key
- Scope diagnostics (duplicate writers, input overrides, data model and
  dictionary collisions, cycles) are reported for the whole closure, and
  conflicts introduced by combining imports are reported on the importer
- Single-entity scope checks run per import closure instead of workspace-wide

* fix: unknown import relationship targets and renames across imports

- An unresolved relationship/reference target inside an imported policy now
  blocks the importer's evaluation and compile(), as on master; the check was
  still limited to the policy being analysed, so the importer compiled and
  the broken child was reported as "policyImportOnly"
- Rename and find-references analyse each policy's expressions in every
  importer's context too, so reads of a field declared by an importer are
  found in the imported policy again
2026-09-28 12:17:12 +02:00
stefan-gorules e095189dd6 fix: return errors instead of panicking in memory loader and v1 functions (#524)
* fix: return errors instead of panicking in memory loader and v1 functions

- MemoryLoader recovers from a poisoned lock. Previously a panic during
  one add() (e.g. a failing content conversion) made every later
  add/get/remove/keys call panic for the rest of the process
- v1 function node returns an error when its JS bootstrap fails instead
  of unwrapping. The 500ms interrupt budget starts before the runtime and
  bundled libraries load, so a slow or loaded host could interrupt the
  bootstrap and panic

* chore: bump setup-android to v3 in uniffi workflow

Only platform-tools is installed; Gradle fetches the platform and build tools the AAR build needs.
2026-09-28 11:24:17 +02:00
stefan-gorules adf7cdf44a chore: add uniffi tests (#520)
* chore: add uniffi tests

* fix permissions in pipelines

* fix tests
2026-08-24 12:45:09 +02:00
GoRules Team a1f8c3e470 chore(release): publish (#519) uniffi-v2.0.2 nodejs-v2.0.2 python-v2.0.2 2026-08-24 10:08:40 +02:00
stefan-gorules 8594f9a5fb fix: correct readme examples and java native library loader (#518) 2026-08-24 09:52:58 +02:00
GoRules Team 6c0fbabba1 chore(release): publish (#517) zen-engine-v2.0.1 zen-expression-v2.0.1 zen-types-v2.0.1 uniffi-v2.0.1 zen-tmpl-v2.0.1 python-v2.0.1 go-v2.0.1 nodejs-v2.0.1 zen-macros-v2.0.1 2026-08-22 13:27:31 +02:00
stefan-gorules 692ca2fe6b fix: improve READMEs across bindings (#516)
* fix: improve READMEs across bindings

* add readmes for crates
2026-08-22 13:10:37 +02:00
stefan-gorules f4e32deb9a fix: windows gnu ffi (#515) 2026-08-20 23:24:48 +02:00
GoRules TeamandStefan 112b8dbd42 chore(release): publish (#507)
* chore(release): publish

* correct version of expression_repl to v2

* remove release-as property

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-macros-v2.0.0 zen-expression-v2.0.0 nodejs-v2.0.0 uniffi-v2.0.0 go-v2.0.0 zen-tmpl-v2.0.0 python-v2.0.0 zen-types-v2.0.0 zen-engine-v2.0.0
2026-08-20 19:43:55 +02:00
stefan-gorules 6bc6a90ff6 feat: release version 2 (#514)
* feat: release version 2

* improve readme
2026-08-20 19:06:58 +02:00
stefan-gorules 0b6c6a709a fix: nested scopes and any cascade (#513) 2026-08-20 17:39:45 +02:00
stefan-gorules 792e77a82e fix: panic hardening (#509) 2026-08-19 12:04:15 +02:00
stefan-gorules 32f7fb875c fix: end of week boundary (#508) 2026-08-19 11:15:21 +02:00
stefan-gorules 13722740a1 fix: number out of range panics (#506) 2026-08-19 11:01:36 +02:00
stefan-gorules c615013a2d feat: graph dt column collect (#505) 2026-08-19 10:44:58 +02:00
GoRules TeamandStefan 0a1c0c3ff5 chore(release): publish (#503)
* chore(release): publish

* correct versions

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-macros-v1.0.0-beta.13 go-v1.0.0-beta.13 zen-types-v1.0.0-beta.13 zen-engine-v1.0.0-beta.13 python-v1.0.0-beta.14 nodejs-v1.0.0-beta.15 zen-expression-v1.0.0-beta.13 zen-tmpl-v1.0.0-beta.13 uniffi-v1.0.0-beta.14
2026-08-19 00:06:21 +02:00
stefan-gorules 7259ab28c3 fix: repair uniffi release pipeline and bump uniffi to 0.31 (#504) 2026-08-18 23:03:23 +02:00
GoRules TeamandStefan 83504fa639 chore(release): publish (#501)
* chore(release): publish

* correct versions

---------

Co-authored-by: Stefan <stefan@gorules.io>
uniffi-v1.0.0-beta.13 zen-tmpl-v1.0.0-beta.12 zen-expression-v1.0.0-beta.12 zen-engine-v1.0.0-beta.12 go-v1.0.0-beta.12 zen-macros-v1.0.0-beta.12 python-v1.0.0-beta.13 nodejs-v1.0.0-beta.14
2026-08-07 10:51:46 +02:00
stefan-gorules ed0c286d9f fix: v1 behaviour hardening (#502) 2026-08-07 10:30:43 +02:00
stefan-gorules fe43b4c1d7 perf: general performance improvements (#500)
* perf: general performance improvements

* remove unsafe usages, further improve perf

* perf: add table indexing
2026-08-04 11:12:37 +02:00
GoRules TeamandIvan Miletic 32a8f12547 chore(release): publish (#499)
* chore(release): publish

* correct the release

---------

Co-authored-by: Ivan Miletic <vnmiletic@gmail.com>
zen-engine-v1.0.0-beta.11 python-v1.0.0-beta.12 zen-macros-v1.0.0-beta.11 go-v1.0.0-beta.11 zen-types-v1.0.0-beta.11 uniffi-v1.0.0-beta.12 nodejs-v1.0.0-beta.13 zen-expression-v1.0.0-beta.11 zen-tmpl-v1.0.0-beta.11
2026-07-26 14:02:39 +02:00
Ivan Miletic 7b4dc3cfbc fix: graph explain dot (#498) 2026-07-26 13:45:39 +02:00
GoRules TeamandIvan Miletic 6ed91ecb82 chore(release): publish (#497)
* chore(release): publish

---------

Co-authored-by: Ivan Miletic <vnmiletic@gmail.com>
zen-types-v1.0.0-beta.10 uniffi-v1.0.0-beta.11 zen-tmpl-v1.0.0-beta.10 nodejs-v1.0.0-beta.12 zen-expression-v1.0.0-beta.10 zen-macros-v1.0.0-beta.10 go-v1.0.0-beta.10 python-v1.0.0-beta.11 zen-engine-v1.0.0-beta.10
2026-07-24 14:53:46 +02:00
Ivan Miletic 37d5e0baf7 fix: dt no cell defaults to true (#496) 2026-07-24 14:35:55 +02:00
GoRules TeamandStefan e17a808bae chore(release): publish (#495)
* chore(release): publish

* correct the release

---------

Co-authored-by: Stefan <stefan@gorules.io>
python-v1.0.0-beta.10 zen-tmpl-v1.0.0-beta.9 zen-types-v1.0.0-beta.9 zen-engine-v1.0.0-beta.9 zen-expression-v1.0.0-beta.9 zen-macros-v1.0.0-beta.9 nodejs-v1.0.0-beta.11 uniffi-v1.0.0-beta.10 go-v1.0.0-beta.9
2026-07-22 16:47:46 +02:00
stefan-gorules c3b9de695b feat: search capability (#494)
* feat: search capability

* reduce false fuzzy matches count
2026-07-22 16:23:40 +02:00
stefan-gorules 1cb74e6f59 feat: add date natural language (#493)
* feat: add date natural language

* add coverage for date methods
2026-07-22 15:55:43 +02:00
GoRules TeamandStefan ad97b340b3 chore(release): publish (#491)
* chore(release): publish

* fix: correct cascade-bumped prerelease versions

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-expression-v1.0.0-beta.8 zen-tmpl-v1.0.0-beta.8 go-v1.0.0-beta.8 uniffi-v1.0.0-beta.9 python-v1.0.0-beta.9 zen-types-v1.0.0-beta.8 zen-macros-v1.0.0-beta.8 zen-engine-v1.0.0-beta.8 nodejs-v1.0.0-beta.10
2026-07-22 11:38:23 +02:00
stefan-gorules 63b560c526 feat: workspace lints and type fixes (#492)
* feat: workspace lints and type fixes

* fix fmt
2026-07-22 11:17:49 +02:00
stefan-gorules e4c51b7dfc perf: improve workspace performance (#490)
* perf: improve workspace performance

* fix fmt
2026-07-21 22:19:59 +02:00
GoRules Team 717cbf5d80 chore(release): publish (#488) uniffi-v1.0.0-beta.8 go-v1.0.0-beta.7 nodejs-v1.0.0-beta.9 zen-types-v1.0.0-beta.7 zen-engine-v1.0.0-beta.7 zen-tmpl-v1.0.0-beta.7 zen-expression-v1.0.0-beta.7 python-v1.0.0-beta.8 zen-macros-v1.0.0-beta.7 2026-07-21 12:44:04 +02:00
stefan-gorules a9580c83d7 fix: reduce wasm memory limits (#489) 2026-07-21 00:19:22 +02:00
stefan-gorules 1818371c90 feat: implement new loaders across languages (#487) 2026-07-20 12:20:48 +02:00
GoRules Team fe4790bee4 chore(release): publish (#486) nodejs-v1.0.0-beta.8 2026-07-18 02:21:58 +02:00
stefan-gorules 4990a487cb fix: nodejs types and test timeout (#485) 2026-07-18 01:33:37 +02:00
GoRules TeamandStefan 7c8f847c6d chore(release): publish (#484)
* chore(release): publish

* fix prerelease versions

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-macros-v1.0.0-beta.6 python-v1.0.0-beta.7 zen-tmpl-v1.0.0-beta.6 go-v1.0.0-beta.6 nodejs-v1.0.0-beta.7 zen-expression-v1.0.0-beta.6 zen-types-v1.0.0-beta.6 zen-engine-v1.0.0-beta.6 uniffi-v1.0.0-beta.7
2026-07-17 11:51:27 +02:00
stefan-gorules 8d1910cc4e feat: graph workspace and static analysis (#483) 2026-07-16 23:42:13 +02:00
GoRules TeamandStefan 48cc2e38d5 chore(release): publish (#482)
* chore(release): publish

* correct release versions

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-expression-v1.0.0-beta.5 uniffi-v1.0.0-beta.6 python-v1.0.0-beta.6 zen-engine-v1.0.0-beta.5 zen-tmpl-v1.0.0-beta.5 go-v1.0.0-beta.5 zen-macros-v1.0.0-beta.5 zen-types-v1.0.0-beta.5 nodejs-v1.0.0-beta.6
2026-07-10 10:42:56 +02:00
stefan-gorules 9a11ae4f48 feat: policy table output type (#481) 2026-07-10 10:13:47 +02:00
GoRules TeamandStefan 68708fa057 chore(release): publish (#480)
* chore(release): publish

* fix incorrect version bump

---------

Co-authored-by: Stefan <stefan@gorules.io>
uniffi-v1.0.0-beta.5 zen-tmpl-v1.0.0-beta.4 nodejs-v1.0.0-beta.5 zen-types-v1.0.0-beta.4 go-v1.0.0-beta.4 python-v1.0.0-beta.5 zen-macros-v1.0.0-beta.4 zen-expression-v1.0.0-beta.4 zen-engine-v1.0.0-beta.4
2026-07-08 13:49:07 +02:00
stefan-gorules b4b59eb7c5 feat: policy dictionary (#479)
* feat: policy dictionary

* remove enum references

* improve tests

* reset index.js and package.json
2026-07-08 13:21:03 +02:00
GoRules TeamandStefan d3cd7ccad9 chore(release): publish (#478)
* chore(release): publish

* correct release version

---------

Co-authored-by: Stefan <stefan@gorules.io>
zen-types-v1.0.0-beta.3 zen-tmpl-v1.0.0-beta.3 nodejs-v1.0.0-beta.4 python-v1.0.0-beta.4 zen-engine-v1.0.0-beta.3 zen-expression-v1.0.0-beta.3 zen-macros-v1.0.0-beta.3 uniffi-v1.0.0-beta.4 go-v1.0.0-beta.3
2026-07-07 14:54:50 +02:00
stefan-gorules 6858c1bd04 feat: natural language (#477)
* feat: natural language

* fix cargo fmt
2026-07-07 13:12:46 +02:00
GoRules Team 7805da79f7 chore(release): publish (#475) python-v1.0.0-beta.3 nodejs-v1.0.0-beta.3 uniffi-v1.0.0-beta.3 2026-06-29 14:18:59 +02:00