@lemmabase/lemma-engine 0.9.1 → 0.9.2
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 +1 -1
- package/lemma.bindings.d.ts +3 -3
- package/lemma.bindings.js +9 -9
- package/lemma.d.ts +1 -1
- package/lemma.iife.js +1 -1
- package/lemma_bg.wasm +0 -0
- package/lemma_bg.wasm.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The `Response` carries every rule's value (or `veto` if no result could be compu
|
|
|
40
40
|
## Why use it from JavaScript?
|
|
41
41
|
|
|
42
42
|
- **Deterministic.** `(spec, data, effective_date) → result`. No DB, no clock, no ambient state. Same inputs → same outputs, every time.
|
|
43
|
-
- **Explainable.** Pass `explain: true` in your `run()` options to get a per-rule explanation tree; see [api.v1.json](https://github.com/lemma/lemma/blob/main/
|
|
43
|
+
- **Explainable.** Pass `explain: true` in your `run()` options to get a per-rule explanation tree; see [api.v1.json](https://github.com/lemma/lemma/blob/main/engine/schemas/api.v1.json). Pair with the [CLI](https://github.com/lemma/lemma) for human reasoning tables.
|
|
44
44
|
- **Time-aware.** Multiple versions of the same spec coexist. Pass an `effective` date and the engine resolves the version in force on that day.
|
|
45
45
|
- **Statically checked.** Type errors, missing data, cycles, measure-family mismatches - all caught at `load()` time. Bad specs never reach `run()`.
|
|
46
46
|
- **Runs anywhere JavaScript does.** ~2 MB package, no native binary, no postinstall script.
|
package/lemma.bindings.d.ts
CHANGED
|
@@ -129,9 +129,9 @@ export interface InitOutput {
|
|
|
129
129
|
readonly engine_run: (a: number, b: number, c: number) => void;
|
|
130
130
|
readonly engine_show: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
131
131
|
readonly engine_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
132
|
-
readonly
|
|
133
|
-
readonly
|
|
134
|
-
readonly
|
|
132
|
+
readonly __wasm_bindgen_func_elem_12434: (a: number, b: number, c: number, d: number) => void;
|
|
133
|
+
readonly __wasm_bindgen_func_elem_2732: (a: number, b: number, c: number, d: number) => void;
|
|
134
|
+
readonly __wasm_bindgen_func_elem_12441: (a: number, b: number, c: number, d: number) => void;
|
|
135
135
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
136
136
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
137
137
|
readonly __wbindgen_export3: (a: number) => void;
|
package/lemma.bindings.js
CHANGED
|
@@ -690,7 +690,7 @@ function __wbg_get_imports() {
|
|
|
690
690
|
const a = state0.a;
|
|
691
691
|
state0.a = 0;
|
|
692
692
|
try {
|
|
693
|
-
return
|
|
693
|
+
return __wasm_bindgen_func_elem_12441(a, state0.b, arg0, arg1);
|
|
694
694
|
} finally {
|
|
695
695
|
state0.a = a;
|
|
696
696
|
}
|
|
@@ -850,12 +850,12 @@ function __wbg_get_imports() {
|
|
|
850
850
|
},
|
|
851
851
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
852
852
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1397, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
853
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
853
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12434);
|
|
854
854
|
return addHeapObject(ret);
|
|
855
855
|
},
|
|
856
856
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
857
857
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IteratorResult<any>")], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
858
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
858
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2732);
|
|
859
859
|
return addHeapObject(ret);
|
|
860
860
|
},
|
|
861
861
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -892,10 +892,10 @@ function __wbg_get_imports() {
|
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
-
function
|
|
895
|
+
function __wasm_bindgen_func_elem_12434(arg0, arg1, arg2) {
|
|
896
896
|
try {
|
|
897
897
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
898
|
-
wasm.
|
|
898
|
+
wasm.__wasm_bindgen_func_elem_12434(retptr, arg0, arg1, addHeapObject(arg2));
|
|
899
899
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
900
900
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
901
901
|
if (r1) {
|
|
@@ -906,10 +906,10 @@ function __wasm_bindgen_func_elem_12433(arg0, arg1, arg2) {
|
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
function
|
|
909
|
+
function __wasm_bindgen_func_elem_2732(arg0, arg1, arg2) {
|
|
910
910
|
try {
|
|
911
911
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
912
|
-
wasm.
|
|
912
|
+
wasm.__wasm_bindgen_func_elem_2732(retptr, arg0, arg1, addHeapObject(arg2));
|
|
913
913
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
914
914
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
915
915
|
if (r1) {
|
|
@@ -920,8 +920,8 @@ function __wasm_bindgen_func_elem_2735(arg0, arg1, arg2) {
|
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
|
|
923
|
-
function
|
|
924
|
-
wasm.
|
|
923
|
+
function __wasm_bindgen_func_elem_12441(arg0, arg1, arg2, arg3) {
|
|
924
|
+
wasm.__wasm_bindgen_func_elem_12441(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
|
package/lemma.d.ts
CHANGED
|
@@ -345,7 +345,7 @@ export type RuleResult = RuleResultValue & {
|
|
|
345
345
|
rule_type: string;
|
|
346
346
|
/** Input keys still unbound for this rule (run-data-aware; same keys as Show.data). */
|
|
347
347
|
missing_data?: string[];
|
|
348
|
-
/** Present when `run(..., explain: true)`. Shape:
|
|
348
|
+
/** Present when `run(..., explain: true)`. Shape: engine/schemas/api.v1.json (`RuleResult.explanation`). */
|
|
349
349
|
explanation?: Explanation;
|
|
350
350
|
};
|
|
351
351
|
|