eyeling 1.25.5 → 1.26.1
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/HANDBOOK.md +8 -8
- package/dist/browser/eyeling.browser.js +555 -32
- package/examples/output/socrates.n3 +0 -1
- package/examples/proof/age.n3 +40 -0
- package/examples/proof/socrates.n3 +24 -0
- package/examples/proof/witch.n3 +138 -0
- package/examples/socrates.n3 +0 -3
- package/eyeling.js +555 -32
- package/index.d.ts +1 -0
- package/index.js +16 -13
- package/lib/cli.js +10 -4
- package/lib/engine.js +150 -13
- package/lib/entry.js +1 -0
- package/lib/explain.js +299 -2
- package/lib/multisource.js +74 -7
- package/lib/parser.js +20 -6
- package/package.json +1 -1
- package/test/api.test.js +6 -6
- package/tools/bundle.js +3 -0
package/HANDBOOK.md
CHANGED
|
@@ -1958,7 +1958,7 @@ The current CLI supports a small set of flags (see `lib/cli.js`):
|
|
|
1958
1958
|
- `--builtin <module.js>` — load a custom builtin module (repeatable).
|
|
1959
1959
|
- `-d`, `--deterministic-skolem` — make `log:skolem` stable across runs.
|
|
1960
1960
|
- `-e`, `--enforce-https` — rewrite `http://…` to `https://…` for dereferencing builtins.
|
|
1961
|
-
- `-p`, `--proof
|
|
1961
|
+
- `-p`, `--proof` — include per-fact proof explanations as N3 proof graphs.
|
|
1962
1962
|
- `-s`, `--super-restricted` — disable all builtins except `log:implies` / `log:impliedBy`.
|
|
1963
1963
|
- `-t`, `--stream` — stream derived triples as soon as they are derived.
|
|
1964
1964
|
- `-v`, `--version` — print version and exit.
|
|
@@ -2045,7 +2045,7 @@ const input = `
|
|
|
2045
2045
|
{ ?s a ?A. ?A rdfs:subClassOf ?B. } => { ?s a ?B. }.
|
|
2046
2046
|
`;
|
|
2047
2047
|
|
|
2048
|
-
console.log(reason({
|
|
2048
|
+
console.log(reason({ proof: false }, input));
|
|
2049
2049
|
```
|
|
2050
2050
|
|
|
2051
2051
|
ESM:
|
|
@@ -2063,13 +2063,13 @@ const input = `
|
|
|
2063
2063
|
{ ?s a ?A. ?A rdfs:subClassOf ?B. } => { ?s a ?B. }.
|
|
2064
2064
|
`;
|
|
2065
2065
|
|
|
2066
|
-
console.log(eyeling.reason({
|
|
2066
|
+
console.log(eyeling.reason({ proof: false }, input));
|
|
2067
2067
|
```
|
|
2068
2068
|
|
|
2069
2069
|
Notes:
|
|
2070
2070
|
|
|
2071
2071
|
- `reason()` returns the same textual output you would get from the CLI for the same input and options.
|
|
2072
|
-
- By default, the npm helper keeps output machine-friendly (`
|
|
2072
|
+
- By default, the npm helper keeps output machine-friendly (`proof: false`).
|
|
2073
2073
|
- Use this path when you want CLI-equivalent behavior inside JavaScript.
|
|
2074
2074
|
|
|
2075
2075
|
#### 14.5.2 RDF-JS and Eyeling rule-object interoperability
|
|
@@ -2089,7 +2089,7 @@ For example:
|
|
|
2089
2089
|
const { reason } = require('eyeling');
|
|
2090
2090
|
|
|
2091
2091
|
const out = reason(
|
|
2092
|
-
{
|
|
2092
|
+
{ proof: false },
|
|
2093
2093
|
{
|
|
2094
2094
|
sources: [
|
|
2095
2095
|
'@prefix : <http://example.org/> .\n:Socrates a :Man .\n',
|
|
@@ -2138,7 +2138,7 @@ const rule = {
|
|
|
2138
2138
|
};
|
|
2139
2139
|
|
|
2140
2140
|
const out = reason(
|
|
2141
|
-
{
|
|
2141
|
+
{ proof: false },
|
|
2142
2142
|
{
|
|
2143
2143
|
quads: [rdfjs.quad(rdfjs.namedNode(ex + 'alice'), rdfjs.namedNode(ex + 'parent'), rdfjs.namedNode(ex + 'bob'))],
|
|
2144
2144
|
rules: [rule],
|
|
@@ -2556,7 +2556,7 @@ Options:
|
|
|
2556
2556
|
-d, --deterministic-skolem Make log:skolem stable across reasoning runs.
|
|
2557
2557
|
-e, --enforce-https Rewrite http:// IRIs to https:// for log dereferencing builtins.
|
|
2558
2558
|
-h, --help Show this help and exit.
|
|
2559
|
-
-p, --proof
|
|
2559
|
+
-p, --proof Enable proof explanations.
|
|
2560
2560
|
-s, --super-restricted Disable all builtins except => and <=.
|
|
2561
2561
|
-t, --stream Stream derived triples as soon as they are derived.
|
|
2562
2562
|
-v, --version Print version and exit.
|
|
@@ -3766,7 +3766,7 @@ When a user does want a portable link, the **Copy share link** button creates on
|
|
|
3766
3766
|
|
|
3767
3767
|
If a generated embedded-state link is still very long, the playground reveals **Create Gist share**. That option asks for a GitHub token with gist permission, stores the compact playground state as a secret Gist JSON file, and copies a small `?stateurl=...` playground link that fetches the state file client-side. The token is stored only in that browser's `localStorage`, the Gist is created by a POST request with `referrerPolicy: "no-referrer"`, and the shared playground URL no longer contains the large encoded program.
|
|
3768
3768
|
|
|
3769
|
-
This keeps everyday use pleasant while preserving the important tutorial and issue-reporting workflow: a link can still capture the imported resource, the local editable overlay, background-knowledge mode, proof
|
|
3769
|
+
This keeps everyday use pleasant while preserving the important tutorial and issue-reporting workflow: a link can still capture the imported resource, the local editable overlay, background-knowledge mode, proof mode, and HTTPS-dereferencing mode.
|
|
3770
3770
|
|
|
3771
3771
|
For compatibility, older `?edit=`, `?program=`, `?url=`, compact `?state=`, `?stateurl=`, and hash-based links are accepted when opened. The old `/demo` entry point is also kept as a redirect to the canonical `/playground` page.
|
|
3772
3772
|
|