@orkestrel/reason 0.0.9 → 0.0.11
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 +15 -19
- package/dist/src/core/index.cjs +289 -264
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +610 -281
- package/dist/src/core/index.d.ts +610 -281
- package/dist/src/core/index.js +290 -265
- package/dist/src/core/index.js.map +1 -1
- package/package.json +14 -15
package/README.md
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
# @orkestrel/reason
|
|
2
2
|
|
|
3
|
-
A synchronous, deterministic
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
shared arithmetic. Every result is a fresh object carrying `success`, a
|
|
13
|
-
human-readable `trace`, and accumulated `errors`; nothing mutates its inputs.
|
|
14
|
-
Environment-agnostic — no I/O, no browser or server assumptions. Part of the
|
|
15
|
-
`@orkestrel` line.
|
|
3
|
+
> A synchronous, deterministic reasoning engine: declarative JSON-serializable
|
|
4
|
+
> definitions evaluated against plain subject records to produce traceable
|
|
5
|
+
> results, through the `quantitative`, `logical`, `symbolic`, and `inferential`
|
|
6
|
+
> strategies behind one dispatch surface.
|
|
7
|
+
|
|
8
|
+
Register the reasoners you need on an orchestrator with the `createReason`
|
|
9
|
+
function, build a definition as plain data, then call `reason` with a subject
|
|
10
|
+
and read the traceable result it returns. Environment-agnostic — no I/O, no
|
|
11
|
+
browser or server assumptions. Part of the `@orkestrel` line.
|
|
16
12
|
|
|
17
13
|
## Install
|
|
18
14
|
|
|
@@ -51,18 +47,18 @@ if (result.reasoning === 'quantitative') result.value // 35 — narrow by the di
|
|
|
51
47
|
result.trace // the step-by-step account of how the value came to be
|
|
52
48
|
```
|
|
53
49
|
|
|
54
|
-
`reason` dispatches by `definition.reasoning` — pass an
|
|
55
|
-
the batch overload maps them in order
|
|
50
|
+
`reason` dispatches by `definition.reasoning` — pass an array of subjects and
|
|
51
|
+
the batch overload maps them in order onto an equal-length result array.
|
|
56
52
|
Results are a discriminated union (`reasoning` names the axis): narrow with
|
|
57
53
|
the discriminant and read the strategy-specific payload (`value` /
|
|
58
54
|
`conclusion` / `solutions` / `derived`).
|
|
59
55
|
|
|
60
56
|
## Guide
|
|
61
57
|
|
|
62
|
-
For the full surface — the orchestrator, the
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
For the full surface — the orchestrator, the reasoners, the operators, the
|
|
59
|
+
definitions & subjects capability layer, the `DefinitionBuilder` and
|
|
60
|
+
`SubjectBuilder` workspaces, validators, errors, and the observation surface —
|
|
61
|
+
see [`guides/reason.md`](guides/reason.md).
|
|
66
62
|
|
|
67
63
|
## Package
|
|
68
64
|
|