@inventarch/graph 1.1.1 → 1.2.0
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/LANGUAGE.md +2 -2
- package/README.md +1 -1
- package/SPEC.md +14 -4
- package/dist/claims.d.ts +47 -0
- package/dist/claims.d.ts.map +1 -0
- package/dist/claims.js +137 -0
- package/dist/claims.js.map +1 -0
- package/dist/codec.d.ts +24 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +57 -0
- package/dist/codec.js.map +1 -0
- package/dist/directed.d.ts +46 -0
- package/dist/directed.d.ts.map +1 -0
- package/dist/directed.js +79 -0
- package/dist/directed.js.map +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +20 -6
- package/dist/load.js.map +1 -1
- package/dist/revision.d.ts +11 -1
- package/dist/revision.d.ts.map +1 -1
- package/dist/revision.js +65 -0
- package/dist/revision.js.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -2
package/LANGUAGE.md
CHANGED
|
@@ -31,7 +31,7 @@ Spec source locators do not load documents. Resource capture and disclosure requ
|
|
|
31
31
|
| @kind | taxonomy | Defines a closed semantic role for records; lowering determines the role of each registered word. |
|
|
32
32
|
| @lane | taxonomy | Defines a retrieval lane associated with record kinds. |
|
|
33
33
|
| @law | governance-system | Declares a rule with severity. Structural admission cannot establish the truth or suitability of its prose. |
|
|
34
|
-
| @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. |
|
|
34
|
+
| @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. An authority section names the participant it binds, the closed moves it allows, the workspaces it scopes, the words it excludes and the paths it covers. |
|
|
35
35
|
| @milestone | work-system | Represents an outcome with an exit criterion inside exactly one plan; it names a condition, not the work toward it. |
|
|
36
36
|
| @move | taxonomy | Defines the closed classification of an agent action or activity. |
|
|
37
37
|
| @observation | learning-system | Represents an attributed evidence account with interpretation and retention metadata. Evidence claims are not verified by field typing. |
|
|
@@ -51,6 +51,6 @@ Spec source locators do not load documents. Resource capture and disclosure requ
|
|
|
51
51
|
| @template | template-system | Represents bounded rendering inputs and output structure. Rendering does not publish or install output. |
|
|
52
52
|
| @value-type | taxonomy | Defines the field types that schemas may require. |
|
|
53
53
|
| @voice | agent-composition-system | Declares communication attributes separate from authority and procedure. |
|
|
54
|
-
| @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. |
|
|
54
|
+
| @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. Its sources name the roots and placement bands its records are captured from, and its steward the agent that directs it by default. |
|
|
55
55
|
|
|
56
56
|
This guide describes the selected structural vocabulary. Private expert procedures, live provider behavior and unobserved platform qualification are separate from the installed public contract.
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# @inventarch/graph
|
|
2
2
|
|
|
3
|
-
The pure graph layer consumes compiled IA records and an explicit registry. [SPEC.md](SPEC.md) owns behavior and implementation status. The package provides immutable graph construction, reach/phase authority resolution, occurrence and relationship indexes, a derived typed field-reference index kept apart from the edges, revision hashing, and coordinate/dimension validation. Conditions, selectors, variant and cell selection, and scoped breadth-first traversal consume those products. search(graph, text, scope) ranks decoded content using BM25 with scope-local statistics.
|
|
3
|
+
The pure graph layer consumes compiled IA records and an explicit registry. [SPEC.md](SPEC.md) owns behavior and implementation status. The package provides immutable graph construction, reach/phase authority resolution, occurrence and relationship indexes, a derived typed field-reference index kept apart from the edges, `directedView(graph, identity)` (each assertion read from both endpoints, as a declared row on its author and a labeled derived inverse on the other side in the kernel spelling for that side, such as `governed-by` at the target, plus field references both ways, read from the load-time `referencesFrom` and `referencedBy` indexes; SPEC G06b), a load-time claimant index `claims` of the path selections records state in `authority.covers`, `subject.covers`, `work.covers` and `hook.paths`, with `selects(selection, path)`, the one path-selection dialect, and `claimants(graph, path, scope)`, the records whose selections select a path, band descending then identity (SPEC G06c), revision hashing, and coordinate/dimension validation. Conditions, selectors, variant and cell selection, and scoped breadth-first traversal consume those products. search(graph, text, scope) ranks decoded content using BM25 with scope-local statistics. The canonical JSON codec (`canonical`, `digest`, `copy` and `CodecError`) gives release assessment and session journals one byte-stable SHA-256 digest; SPEC G12 states its rules and refusal codes. Each loaded Node carries `digest`, the per-record digest `recordDigest` computes over what the record says without where it was read: its source path, lines, spans, placement and provenance (SPEC G13); it is not a revision input.
|
|
4
4
|
|
|
5
5
|
The package depends on @inventarch/language and uses node:crypto only for deterministic SHA-256. It performs no filesystem I/O, clock reads, source parsing, cache publication or model/tool execution. Decoded prose search is implemented here; IA lexical analysis stays in language.
|
package/SPEC.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Bounded traversal extension (Workbench): optional `maxNodes`/`maxEdges` retain normal authority, scope, direction and condition behavior while bounding emitted records and edge examination. A bounded result reports `truncated`; callers must not describe it as a complete graph. Calls without limits preserve the original contract.
|
|
4
4
|
|
|
5
|
-
Status: G01–G11 implemented under the graph plan. Shared concepts: graph/matrix design. Pure Node-compatible package depending only on @inventarch/language; no filesystem, clock, default registry or source-text lexer. Task-delivery paragraphs below retain historical counts and next steps; current readiness covers the completed downstream consumers.
|
|
5
|
+
Status: G01–G11 implemented under the graph plan; G12 states the canonical codec re-homed here from session-system; G13 adds the per-record digest; G06b adds the directed view; G06c adds the claimant index and the path-selection dialect. Shared concepts: graph/matrix design. Pure Node-compatible package depending only on @inventarch/language; no filesystem, clock, default registry or source-text lexer. Task-delivery paragraphs below retain historical counts and next steps; current readiness covers the completed downstream consumers.
|
|
6
6
|
|
|
7
7
|
## Construction and revision
|
|
8
8
|
|
|
@@ -18,9 +18,13 @@ G04. Filter occurrences by reach and optional phase before authority. For phase
|
|
|
18
18
|
|
|
19
19
|
G05. Build byName, byDiscriminator, byKind, bySystem, byCategory and byLane postings from winners; category comes from the registration and lane from the validated kernel kind mapping (contract@authority maps authority). Index cells at phase/primitive, selector axis/value groups and all condition terms from cells/edges/variants/requirements. Classification is an optional single head artifact-set field, a scalar/string closed value. Severity is an optional single governance.severity scalar/string closed value. Unknown, malformed or repeated dimension declarations refuse that record with DIMENSION-UNKNOWN. Provenance is the compiled loader-supplied value. Prose/gloss fields never supply routing coordinates.
|
|
20
20
|
|
|
21
|
-
G06. Resolve every authored edge through language.resolveTarget against winners, including formerly dangling edges. Normalize inverse direction into active endpoints; retain author identity, typed reference, fragment, condition subject (the author), spans and source assertions. A missing endpoint is null: ordinary edges remain under out[author], inverse edges under in[author]. Both forms remain in dangling and a byDanglingReference index. More than one candidate refuses the edge with TARGET-AMBIGUOUS; zero retains it with TARGET-MISSING warning. Resolve API reports these graph codes without candidate-order selection.
|
|
21
|
+
G06. Resolve every authored edge through language.resolveTarget against winners, including formerly dangling edges. Normalize inverse direction into active endpoints; retain author identity, typed reference, fragment, condition subject (the author), spans and source assertions, each assertion keeping the verb `spelling` its author wrote while the edge's endpoints stay active (a registration-generated ground assertion carries `ground`; under language S07 it absorbs an equivalent unconditioned, fragmentless ground line written on the same system record in either outbound spelling, `ground` or `grounds`; any other ground line, such as `grounded-by @system <name>` on the schema, keeps its spelling and ordinary consent under G07). A missing endpoint is null: ordinary edges remain under out[author], inverse edges under in[author]. Both forms remain in dangling and a byDanglingReference index. More than one candidate refuses the edge with TARGET-AMBIGUOUS; zero retains it with TARGET-MISSING warning. Resolve API reports these graph codes without candidate-order selection. The directed view (G06b) reads each resolved assertion from both endpoints, as declared on its author and as a derived inverse on the other side; a dangling assertion has no row there.
|
|
22
22
|
|
|
23
|
-
G06a. Derive `references`, a typed field-reference index beside the edges, from every typed ref value a winner holds in its head or sections, list items and nested fields included. Each `FieldReference` carries `from` (the holder), `to` (the resolved winner), `field` (the compiler's field path: `head.steward`, `composition.mandate`, `binding.target`, or the bare section name for a section-level item), the authored `reference` and the holder's source span. Targets resolve through the same resolve API as edges; an unresolved or ambiguous ref is omitted without a graph diagnostic, because compliance reports it (IA-COMP-FIELD-REF-MISSING). The `relationships` section is skipped by name, so a consent-refused assertion never reappears as a reference, and a ref inside the span of an edge the compiler already lowered (a floor `@system` `discriminators` entry's `ground`) is skipped, so no authored ref is both an edge and a reference. A field reference carries no predicate and is never consent-, cardinality- or COMP-checked; `edges`, `in`, `out`, `dangling`, diagnostics and revision are unchanged by it. `referencedBy` keys `references` by target. Ordering is total over from, field, to, source path/line and the serialized reference, independent of input order; equal entries are stored once.
|
|
23
|
+
G06a. Derive `references`, a typed field-reference index beside the edges, from every typed ref value a winner holds in its head or sections, list items and nested fields included. Each `FieldReference` carries `from` (the holder), `to` (the resolved winner), `field` (the compiler's field path: `head.steward`, `composition.mandate`, `binding.target`, or the bare section name for a section-level item), the authored `reference` and the holder's source span. Targets resolve through the same resolve API as edges; an unresolved or ambiguous ref is omitted without a graph diagnostic, because compliance reports it (IA-COMP-FIELD-REF-MISSING). The `relationships` section is skipped by name, so a consent-refused assertion never reappears as a reference, and a ref inside the span of an edge the compiler already lowered (a floor `@system` `discriminators` entry's `ground`) is skipped, so no authored ref is both an edge and a reference. A field reference carries no predicate and is never consent-, cardinality- or COMP-checked; `edges`, `in`, `out`, `dangling`, diagnostics and revision are unchanged by it. `referencedBy` keys `references` by target and `referencesFrom` keys them by holder, each list in `references` order, both built once at load. Ordering is total over from, field, to, source path/line and the serialized reference, independent of input order; equal entries are stored once. The directed view (G06b) lists each reference from both ends as a derived `field-ref` row, so the index is navigable from its holder as well as its target.
|
|
24
|
+
|
|
25
|
+
G06b. `directedView(graph, identity)` returns the identity's directed view (position-and-projection row 4 and section 8): a frozen list of every row the graph holds at that identity, read from its side. Each resolved edge the identity is an endpoint of gives one row per assertion per side it occupies, carrying the edge's `predicate`, the `direction` the identity reads it in (`out` at the active source, `in` at the active target), the `counterpart` (the other endpoint), `declaredOn` (the assertion's author), `declaredBy` (`source` for an outbound assertion, `target` for an inverse one, the same from either side: the `declared by source` or `declared by target` label), the assertion's `source` lines, and the edge's `fragment` and `condition` when it has them; the fragment addresses the record the declaration references. On the side its author stands the row is `kind: 'edge'`, `derived: false`, with `spelling` the verb the author wrote. On the other side it is `kind: 'inverse'`, `derived: true`, with `spelling` the kernel's for that side: the active predicate at the source, and at the target its language `INVERSE_OF` spelling, one of the eighteen (governed-by, enforced-by, grounded-by, constrained-by, implemented-by, produced-by, consumed-by, lineage-recorded-by, access-granted-by, run-after, triggered-by, cited-by, superseded-by, required-by, used-by, forbidden-by, routed-by, landed-by). An edge asserted from both ends keeps both assertions (G07), so each side holds its own declared row and the derived inverse of the other's; a self-relation is read from both of its sides. Each G06a field reference the identity holds or is named by gives one `kind: 'field-ref'`, `derived: true` row with its `field` path, `declaredOn` the holder and no predicate or spelling. A derived row is a view and is never authoritative over the declared row it reads: nothing is written back to source, merged into `edges` or re-spelled there. Dangling (G06), ambiguous and consent-refused (G07) assertions are findings, not rows: a dangling one stays in diagnostics, `dangling` and `byDanglingReference`, an ambiguous or refused one in diagnostics only, and neither endpoint has a row for it. An identity that is not an admitted winner has no rows. Rows order by kind (edge, inverse, field-ref), direction (out, in), predicate or field, counterpart, declaring record, source path and line, then the serialized row: a total order independent of input order. The view is computed on read from the load-time `out`, `in`, `referencesFrom` and `referencedBy` indexes, so a call reads only the identity's own entries and never scans `references`; reading it adds no index, diagnostic or revision input and leaves `serialize(graph)` unchanged. `tests/directed.test.ts` pins both spellings from both sides, both-sided assertions, self-relations, fragments, conditions, findings, field references and the order within one kind and direction, and that over the native corpus each resolved assertion and each field reference is read exactly once from each end, a record's held references exactly as a scan of `references` finds them.
|
|
26
|
+
|
|
27
|
+
G06c. Claimant index and path selections (position-and-projection row 17; the covers-field-vs-predicate decision keeps `covers` a field of text path selections, neither a predicate nor a ref). `claims` is a derived index built once at load: one frozen `Claim` `{from, field, selection, source}` for each text value a winner holds in a claimant field, a list's items in authored order. The claimant fields, exported as `CLAIM_FIELDS`, are `authority.covers` (`@mandate`), `subject.covers` (`@law`, `@convention`), `work.covers` (`@spec`) and `hook.paths` (`@hook`), each a top-level field of its section, read by path on any winner that holds it; schema admission keeps an undeclared one out of an admitted view. A nested field, a ref value and a `covers` in any other section are not claims. Equal (holder, field, selection) claims are stored once, and claims order by holder identity, then as the record states them. A claim is not an edge: it carries no predicate, is never consent-checked and is not a revision input. `selects(selection, path)` is the one path-selection dialect. Both read `\` as `/`. The path is canonicalized as a scope root (G03: `.` and empty segments dropped, `..` resolved), and an absolute path or one escaping the workspace is selected by nothing. A selection is `/`-separated workspace-relative segments: a whole-segment `**` matches zero or more segments, `*` any run of characters within one segment, `?` exactly one character (one code point), and every other character itself, case-sensitively. A trailing `/` stands for `/**`, so `docs/` selects `docs` and everything below it, while `docs` selects only that path. There are no braces, classes, escapes or negation, a leading dot is not special, and an empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing; `isSelection(selection)` says whether the dialect reads a selection at all, so a host can name one that selects nothing where it is authored (db D02b `inertDeclarations`). A `@check`'s `check.scope` is not a claimant field (decision check-scope-claims, 2026-10-08): its schema requires it as prose, such as "every admitted native record", which no selection reads, so a check claims no path until its schema gives it a field of path selections. Matching keeps one backtrack point per level, so it takes at most pattern × path steps. `claimants(graph, path, scope?)` reads the index, never the records: each winner with a claim that selects the path, holders outside `scope` pruned, as a frozen `Claimant` `{identity, band, matches}` listing every matching `{field, selection}` in index order, ordered band descending then identity ascending. `tests/claims.test.ts` pins the dialect, the index over probe and native records, permutation stability, pruning and the order.
|
|
24
28
|
|
|
25
29
|
G07. Check both word owners' consent on each resolved edge in active direction, reporting only the first refusing side as EDGE-UNCONSENTED. The exact unconditioned, fragmentless system-to-registered-schema ground assertion generated by registration bypasses ledgers as specified by language S07; no other ground edge is exempt. Store equivalent unconditioned edges once, retaining every source assertion. Conditioned edges also key by condition subject, because equal terms authored on different records may see different dimensions. Sort edges by endpoints/predicate/fragment/condition/author/source for a total order.
|
|
26
30
|
|
|
@@ -38,9 +42,15 @@ G10. traverse(graph, options) performs breadth-first traversal from a declared s
|
|
|
38
42
|
|
|
39
43
|
G11. search(graph, text, scope?) is graph-owned BM25 over decoded names, field/item text, references and semantic products without indexing the same body text twice. Preserve donor NFKC/lowercase/NFD mark removal, Unicode letter/digit tokens of 2..64 characters, donor stopwords, k1=1.2 and b=.75. Query terms deduplicate. Statistics N/df/average length are computed over the allowed scope, never hidden records. Return positive scores sorted descending then identity. Text tokenization is over decoded prose/query strings, not IA source syntax. Expose no mutable postings.
|
|
40
44
|
|
|
45
|
+
## Canonical codec
|
|
46
|
+
|
|
47
|
+
G12. `canonical(value)` is the canonical JSON text of finite structured data, the digest contract that release assessment, captured compositions and session journals share. It admits null, strings, booleans, finite numbers, arrays and objects whose prototype is `Object.prototype` or null, and reads only own enumerable string keys. Members are written in UTF-16 code-unit order of their keys, except that array-index keys lead in ascending numeric order, as JavaScript property order requires; values are written as `JSON.stringify` writes them, with no whitespace. Any other value (undefined, a non-finite number, a bigint, function or symbol, or an object with another prototype such as a Map, Date or class instance) refuses with IA-SESSION-INPUT-INVALID, as does a `__proto__`, `prototype` or `constructor` key. A value more than 64 levels below the root refuses with IA-SESSION-LIMIT-EXCEEDED whatever its kind, so a cycle through otherwise valid data refuses with that code. `digest(value)` is the lowercase hex SHA-256 of the canonical text's UTF-8 bytes. `copy(value)` parses the canonical text back: a new value of arrays and `Object.prototype` objects with keys in canonical order, refusing exactly what `canonical` refuses. Every refusal is a `CodecError`, an `Error` named `CodecError` whose readonly string `code` is the stable contract. Canonical text and digests are byte-stable: vectors captured from the session-system codec before it moved here pin both. The codec is distinct from `stableSerialize`, which tags maps and sets and feeds `revisionOf`; neither replaces the other. `@inventarch/session-system` re-exports this `CodecError` class and wraps `canonical`, `digest` and `copy`, rethrowing each refusal as its `SessionError`, a `CodecError` subclass named `SessionError`, with the same code and message.
|
|
48
|
+
|
|
49
|
+
G13. Every Node carries `digest`, its per-record digest, computed once per occurrence at load by the exported `recordDigest(record)`: the G12 `digest` of a location-free form of the compiled record. The form covers identity, system, kind, facet, name, displayName, discriminator and parent (null when absent); head and section fields and items, in authored order, each one row of its `path` of indexes among its parents' children with its key, value and `when` words, or its item, so nested blocks are covered and the form's depth stays bounded however deeply they nest; each compiled edge's predicate, direction, spelling, typed reference, fragment and condition; cells (phase, primitive, primary, text, condition), selectors, variants (key, value, condition) and requirements (id, kind, text, condition); and schema. It omits where the record was read: `source` (path, line, endLine) and every field, section and product span; `placement` (kind, band, reach) and `provenance`, which the loader supplies from the source's location rather than the record's text (G05) and which database capture membership carries as root and band; and each edge's compile-time `target`, which resolves against the other records of its file rather than anything the record says. Inserting, editing or removing another record, comment or blank line, moving the record to another file, or reading the same text at another placement and provenance (an adopted or installed mount rather than the authored tree) therefore leaves its digest unchanged, while any change to what it says changes it. The digest is over the compiled form, so a vocabulary change that changes how the same text compiles (a schema spelling that resolves a field key, a registration that generates a floor ground edge only where it registers) changes it too. Every compiled record fits the G12 nesting limit, so computing the digest never refuses. It lives on the Node because language cannot depend on this codec. It is not a `revisionOf` input, so graph and workspace revisions are unchanged; `serialize(graph)` includes it. `tests/digest.test.ts` pins one vector and both directions.
|
|
50
|
+
|
|
41
51
|
## Diagnostics, evidence and boundaries
|
|
42
52
|
|
|
43
|
-
Graph source codes use IA-GRAPH-IDENTITY-TIE, TARGET-MISSING, TARGET-AMBIGUOUS, EDGE-UNCONSENTED and DIMENSION-UNKNOWN. Query errors use IA-GRAPH-COORDINATE-VALUE-UNKNOWN, VERB-UNKNOWN, TRAVERSAL-INVALID and VARIANT-AMBIGUOUS; root normalization uses SCOPE-INVALID. Source diagnostic shape matches language with the graph namespace; errors refuse their stated subject, warnings retain evidence. Fragments are retained but compliance owns existence. Graph performs no scenario execution, caching, scope-token issuance, ranking into runtime packets or model/tool dispatch. Public evidence must distinguish these boundaries.
|
|
53
|
+
Graph source codes use IA-GRAPH-IDENTITY-TIE, TARGET-MISSING, TARGET-AMBIGUOUS, EDGE-UNCONSENTED and DIMENSION-UNKNOWN. Query errors use IA-GRAPH-COORDINATE-VALUE-UNKNOWN, VERB-UNKNOWN, TRAVERSAL-INVALID and VARIANT-AMBIGUOUS; root normalization uses SCOPE-INVALID. Codec refusals use IA-SESSION-INPUT-INVALID and IA-SESSION-LIMIT-EXCEEDED (G12). Source diagnostic shape matches language with the graph namespace; errors refuse their stated subject, warnings retain evidence. Fragments are retained but compliance owns existence. Graph performs no scenario execution, caching, scope-token issuance, ranking into runtime packets or model/tool dispatch. Public evidence must distinguish these boundaries.
|
|
44
54
|
|
|
45
55
|
Each task records native success/refusal, permutation/immutability and public-consumer evidence here. Native taxonomy/system records, the authoring playbook, law and check provide the normal path; overlays and malformed coordinates provide adversarial cases. Central exact-cell/primary examples use separate records to avoid double-delivery. Raising severity uses an advisory fixture, because a blocking subject is already blocking without a request override.
|
|
46
56
|
|
package/dist/claims.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Band } from '@inventarch/language';
|
|
2
|
+
import type { Claim, Graph, Node } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* G06c: the claimant fields, each a section field whose text values are path selections (position-and-projection row
|
|
5
|
+
* 17; the covers-field-vs-predicate decision keeps `covers` a field, not a predicate): `covers` in a @mandate's
|
|
6
|
+
* `authority`, a @law's or @convention's `subject` and a @spec's `work`, and a @hook's `hook.paths`. A field is read by
|
|
7
|
+
* its path on any winner that holds it; schema admission keeps undeclared ones out. A @check's `check.scope` is not one
|
|
8
|
+
* (decision check-scope-claims): the schema requires it as prose, such as "every admitted native record", which no path
|
|
9
|
+
* selection reads, so a check claims no path until its schema gives it a field of path selections.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CLAIM_FIELDS: readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* G06c: the claimant index, read once at load from every text value a winner holds in a claimant field, a list's
|
|
14
|
+
* items in authored order. Equal (holder, field, selection) claims are stored once; holders order by identity.
|
|
15
|
+
*/
|
|
16
|
+
export declare function claimsOf(nodes: Iterable<Node>): Claim[];
|
|
17
|
+
/**
|
|
18
|
+
* G06c: whether the dialect reads `selection` as a workspace-relative selection at all. An empty or absolute selection,
|
|
19
|
+
* or one with an empty, `.` or `..` segment, is none and selects nothing; a host can say so where it is authored.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSelection(selection: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* G06c path selection dialect: whether `selection` selects the workspace-relative `path`. Both read `\` as `/`; the
|
|
24
|
+
* path is canonicalized like a scope root and selects nothing when it is absolute or escapes the workspace. A selection
|
|
25
|
+
* is `/`-separated segments: `**` as a whole segment matches zero or more segments, `*` any run of characters within
|
|
26
|
+
* one segment, `?` exactly one character, anything else itself, case-sensitively; a trailing `/` stands for `/**`, so
|
|
27
|
+
* `docs/` selects `docs` and everything below it. No braces, classes, escapes or negation, and a leading dot is not
|
|
28
|
+
* special. An empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function selects(selection: string, path: string): boolean;
|
|
31
|
+
/** One claim of a claimant that selects the path: its claimant field and the selection as authored. */
|
|
32
|
+
export interface ClaimMatch {
|
|
33
|
+
readonly field: string;
|
|
34
|
+
readonly selection: string;
|
|
35
|
+
}
|
|
36
|
+
/** G06c: a record whose claimant field selects a path, with every claim that does, in index order. */
|
|
37
|
+
export interface Claimant {
|
|
38
|
+
readonly identity: string;
|
|
39
|
+
readonly band: Band;
|
|
40
|
+
readonly matches: readonly ClaimMatch[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* G06c: the winners whose claims select `path`, holders outside `scope` pruned, ordered band descending then identity
|
|
44
|
+
* ascending (position-and-projection row 17). Reads the load-time claimant index; nothing is rescanned per query.
|
|
45
|
+
*/
|
|
46
|
+
export declare function claimants(graph: Graph, path: string, scope?: ReadonlySet<string>): readonly Claimant[];
|
|
47
|
+
//# sourceMappingURL=claims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../src/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAKxC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,CAsBvD;AASD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEtD;AAkDD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,uGAAuG;AACvG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AACD,sGAAsG;AACtG,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;CACzC;AACD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,QAAQ,EAAE,CAiBtG"}
|
package/dist/claims.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { snapshot } from './immutable.js';
|
|
2
|
+
import { canonicalRoot } from './paths.js';
|
|
3
|
+
import { compare, stableSerialize } from './revision.js';
|
|
4
|
+
/**
|
|
5
|
+
* G06c: the claimant fields, each a section field whose text values are path selections (position-and-projection row
|
|
6
|
+
* 17; the covers-field-vs-predicate decision keeps `covers` a field, not a predicate): `covers` in a @mandate's
|
|
7
|
+
* `authority`, a @law's or @convention's `subject` and a @spec's `work`, and a @hook's `hook.paths`. A field is read by
|
|
8
|
+
* its path on any winner that holds it; schema admission keeps undeclared ones out. A @check's `check.scope` is not one
|
|
9
|
+
* (decision check-scope-claims): the schema requires it as prose, such as "every admitted native record", which no path
|
|
10
|
+
* selection reads, so a check claims no path until its schema gives it a field of path selections.
|
|
11
|
+
*/
|
|
12
|
+
export const CLAIM_FIELDS = Object.freeze([
|
|
13
|
+
'authority.covers',
|
|
14
|
+
'subject.covers',
|
|
15
|
+
'work.covers',
|
|
16
|
+
'hook.paths',
|
|
17
|
+
]);
|
|
18
|
+
/**
|
|
19
|
+
* G06c: the claimant index, read once at load from every text value a winner holds in a claimant field, a list's
|
|
20
|
+
* items in authored order. Equal (holder, field, selection) claims are stored once; holders order by identity.
|
|
21
|
+
*/
|
|
22
|
+
export function claimsOf(nodes) {
|
|
23
|
+
const found = new Map();
|
|
24
|
+
for (const node of nodes)
|
|
25
|
+
for (const section of node.sections)
|
|
26
|
+
for (const child of section.fields) {
|
|
27
|
+
if ('item' in child)
|
|
28
|
+
continue;
|
|
29
|
+
const field = `${section.name}.${child.key}`;
|
|
30
|
+
if (!CLAIM_FIELDS.includes(field))
|
|
31
|
+
continue;
|
|
32
|
+
for (const value of child.value.kind === 'list' ? child.value.items : [child.value]) {
|
|
33
|
+
if (!('text' in value))
|
|
34
|
+
continue;
|
|
35
|
+
const key = stableSerialize([node.identity, field, value.text]);
|
|
36
|
+
if (!found.has(key))
|
|
37
|
+
found.set(key, {
|
|
38
|
+
from: node.identity,
|
|
39
|
+
field,
|
|
40
|
+
selection: value.text,
|
|
41
|
+
source: { path: node.source.path, line: child.span.line, endLine: child.span.endLine },
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// A stable sort: one holder's claims keep the order its record states them in.
|
|
46
|
+
return [...found.values()].sort((a, b) => compare(a.from, b.from));
|
|
47
|
+
}
|
|
48
|
+
/** A selection's segments, a trailing `/` read as `/**`; undefined when it is not a workspace-relative selection. */
|
|
49
|
+
function selectionSegments(selection) {
|
|
50
|
+
const text = selection.replaceAll('\\', '/');
|
|
51
|
+
if (text === '' || text.startsWith('/') || /^[A-Za-z]:/.test(text))
|
|
52
|
+
return undefined;
|
|
53
|
+
const segments = (text.endsWith('/') ? `${text}**` : text).split('/');
|
|
54
|
+
return segments.some((segment) => segment === '' || segment === '.' || segment === '..') ? undefined : segments;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* G06c: whether the dialect reads `selection` as a workspace-relative selection at all. An empty or absolute selection,
|
|
58
|
+
* or one with an empty, `.` or `..` segment, is none and selects nothing; a host can say so where it is authored.
|
|
59
|
+
*/
|
|
60
|
+
export function isSelection(selection) {
|
|
61
|
+
return selectionSegments(selection) !== undefined;
|
|
62
|
+
}
|
|
63
|
+
/** A path's canonical segments (none for the workspace root); undefined when it is absolute or escapes the workspace. */
|
|
64
|
+
function pathSegments(path) {
|
|
65
|
+
let canonical;
|
|
66
|
+
try {
|
|
67
|
+
canonical = canonicalRoot(path);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
return canonical === '' ? [] : canonical.split('/');
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Wildcard matching with one backtrack point: `star(token)` matches any run of elements, every other token exactly one
|
|
76
|
+
* element it accepts. At most pattern × text steps, so no authored selection backtracks exponentially.
|
|
77
|
+
*/
|
|
78
|
+
function wildcard(pattern, text, star, accepts) {
|
|
79
|
+
let p = 0, t = 0, starAt = -1, resume = 0;
|
|
80
|
+
while (t < text.length) {
|
|
81
|
+
if (p < pattern.length && !star(pattern[p]) && accepts(pattern[p], text[t])) {
|
|
82
|
+
p++;
|
|
83
|
+
t++;
|
|
84
|
+
}
|
|
85
|
+
else if (p < pattern.length && star(pattern[p])) {
|
|
86
|
+
starAt = p++;
|
|
87
|
+
resume = t;
|
|
88
|
+
}
|
|
89
|
+
else if (starAt >= 0) {
|
|
90
|
+
p = starAt + 1;
|
|
91
|
+
t = ++resume;
|
|
92
|
+
}
|
|
93
|
+
else
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
while (p < pattern.length && star(pattern[p]))
|
|
97
|
+
p++;
|
|
98
|
+
return p === pattern.length;
|
|
99
|
+
}
|
|
100
|
+
const segmentAccepts = (pattern, segment) => wildcard([...pattern], [...segment], (c) => c === '*', (c, d) => c === '?' || c === d);
|
|
101
|
+
const matches = (pattern, target) => wildcard(pattern, target, (segment) => segment === '**', segmentAccepts);
|
|
102
|
+
/**
|
|
103
|
+
* G06c path selection dialect: whether `selection` selects the workspace-relative `path`. Both read `\` as `/`; the
|
|
104
|
+
* path is canonicalized like a scope root and selects nothing when it is absolute or escapes the workspace. A selection
|
|
105
|
+
* is `/`-separated segments: `**` as a whole segment matches zero or more segments, `*` any run of characters within
|
|
106
|
+
* one segment, `?` exactly one character, anything else itself, case-sensitively; a trailing `/` stands for `/**`, so
|
|
107
|
+
* `docs/` selects `docs` and everything below it. No braces, classes, escapes or negation, and a leading dot is not
|
|
108
|
+
* special. An empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing.
|
|
109
|
+
*/
|
|
110
|
+
export function selects(selection, path) {
|
|
111
|
+
const pattern = selectionSegments(selection), target = pathSegments(path);
|
|
112
|
+
return pattern !== undefined && target !== undefined && matches(pattern, target);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* G06c: the winners whose claims select `path`, holders outside `scope` pruned, ordered band descending then identity
|
|
116
|
+
* ascending (position-and-projection row 17). Reads the load-time claimant index; nothing is rescanned per query.
|
|
117
|
+
*/
|
|
118
|
+
export function claimants(graph, path, scope) {
|
|
119
|
+
const target = pathSegments(path);
|
|
120
|
+
if (target === undefined)
|
|
121
|
+
return Object.freeze([]);
|
|
122
|
+
const found = new Map();
|
|
123
|
+
for (const claim of graph.claims) {
|
|
124
|
+
if (scope !== undefined && !scope.has(claim.from))
|
|
125
|
+
continue;
|
|
126
|
+
const pattern = selectionSegments(claim.selection);
|
|
127
|
+
if (pattern === undefined || !matches(pattern, target))
|
|
128
|
+
continue;
|
|
129
|
+
const held = found.get(claim.from) ?? [];
|
|
130
|
+
held.push({ field: claim.field, selection: claim.selection });
|
|
131
|
+
found.set(claim.from, held);
|
|
132
|
+
}
|
|
133
|
+
return snapshot([...found]
|
|
134
|
+
.map(([identity, held]) => ({ identity, band: graph.nodes.get(identity).band, matches: held }))
|
|
135
|
+
.sort((a, b) => b.band - a.band || compare(a.identity, b.identity)));
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=claims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../src/claims.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGzD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC3D,kBAAkB;IAClB,gBAAgB;IAChB,aAAa;IACb,YAAY;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC5C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAiB,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,KAAK;QACtB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;YACjC,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnC,IAAI,MAAM,IAAI,KAAK;oBAAE,SAAS;gBAC9B,MAAM,KAAK,GAAG,GAAG,OAAO,CAAC,IAAI,IAAI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C,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SAC/F,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
package/dist/codec.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Finite JSON data: the only shape the canonical form admits. */
|
|
2
|
+
export type Json = null | boolean | number | string | Json[] | {
|
|
3
|
+
[key: string]: Json;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A canonical-form refusal. The `code` is the stable contract; a package that wraps this codec may subclass the
|
|
7
|
+
* error to keep its own name (session-system's `SessionError` does), and the codes are unchanged by that.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CodecError extends Error {
|
|
10
|
+
readonly code: string;
|
|
11
|
+
constructor(code: string, message: string);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The canonical JSON text of finite structured data: keys sorted, prototypes and unsafe keys refused, nesting
|
|
15
|
+
* bounded. Two values with the same canonical text have the same digest; this is the digest contract that release
|
|
16
|
+
* assessment, captured compositions and session journals share. It is distinct from `stableSerialize`, which tags
|
|
17
|
+
* maps and sets and feeds workspace revisions; neither form replaces the other.
|
|
18
|
+
*/
|
|
19
|
+
export declare function canonical(value: unknown): string;
|
|
20
|
+
/** SHA-256 of the canonical text, as lowercase hex. */
|
|
21
|
+
export declare function digest(value: unknown): string;
|
|
22
|
+
/** A deep copy through the canonical form: plain data only, every prototype dropped. */
|
|
23
|
+
export declare function copy<T>(value: T): T;
|
|
24
|
+
//# sourceMappingURL=codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAEA,kEAAkE;AAClE,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEvF;;;GAGG;AACH,qBAAa,UAAW,SAAQ,KAAK;IAEjC,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAMD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAqBhD;AACD,uDAAuD;AACvD,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE7C;AACD,wFAAwF;AACxF,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAEnC"}
|
package/dist/codec.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
/**
|
|
3
|
+
* A canonical-form refusal. The `code` is the stable contract; a package that wraps this codec may subclass the
|
|
4
|
+
* error to keep its own name (session-system's `SessionError` does), and the codes are unchanged by that.
|
|
5
|
+
*/
|
|
6
|
+
export class CodecError extends Error {
|
|
7
|
+
code;
|
|
8
|
+
constructor(code, message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.code = code;
|
|
11
|
+
this.name = 'CodecError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const NESTING_LIMIT = 64;
|
|
15
|
+
const UNSAFE_KEYS = ['__proto__', 'prototype', 'constructor'];
|
|
16
|
+
function refuse(condition, code, message) {
|
|
17
|
+
if (!condition)
|
|
18
|
+
throw new CodecError(code, message);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The canonical JSON text of finite structured data: keys sorted, prototypes and unsafe keys refused, nesting
|
|
22
|
+
* bounded. Two values with the same canonical text have the same digest; this is the digest contract that release
|
|
23
|
+
* assessment, captured compositions and session journals share. It is distinct from `stableSerialize`, which tags
|
|
24
|
+
* maps and sets and feeds workspace revisions; neither form replaces the other.
|
|
25
|
+
*/
|
|
26
|
+
export function canonical(value) {
|
|
27
|
+
const visit = (item, depth) => {
|
|
28
|
+
refuse(depth <= NESTING_LIMIT, 'IA-SESSION-LIMIT-EXCEEDED', `Structured data nesting exceeds ${NESTING_LIMIT}`);
|
|
29
|
+
if (item === null || typeof item === 'string' || typeof item === 'boolean')
|
|
30
|
+
return item;
|
|
31
|
+
if (typeof item === 'number' && Number.isFinite(item))
|
|
32
|
+
return item;
|
|
33
|
+
if (Array.isArray(item))
|
|
34
|
+
return item.map((entry) => visit(entry, depth + 1));
|
|
35
|
+
if (typeof item === 'object' &&
|
|
36
|
+
item !== null &&
|
|
37
|
+
[Object.prototype, null].includes(Object.getPrototypeOf(item))) {
|
|
38
|
+
const out = Object.create(null);
|
|
39
|
+
for (const key of Object.keys(item).sort()) {
|
|
40
|
+
refuse(!UNSAFE_KEYS.includes(key), 'IA-SESSION-INPUT-INVALID', 'Unsafe object key');
|
|
41
|
+
out[key] = visit(item[key], depth + 1);
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
throw new CodecError('IA-SESSION-INPUT-INVALID', 'Expected finite JSON data');
|
|
46
|
+
};
|
|
47
|
+
return JSON.stringify(visit(value, 0));
|
|
48
|
+
}
|
|
49
|
+
/** SHA-256 of the canonical text, as lowercase hex. */
|
|
50
|
+
export function digest(value) {
|
|
51
|
+
return createHash('sha256').update(canonical(value)).digest('hex');
|
|
52
|
+
}
|
|
53
|
+
/** A deep copy through the canonical form: plain data only, every prototype dropped. */
|
|
54
|
+
export function copy(value) {
|
|
55
|
+
return JSON.parse(canonical(value));
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=codec.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4
|
+
/** The side the viewed record reads the row from: `out` when it is the active source, `in` when the active target. */
|
|
5
|
+
readonly direction: 'out' | 'in';
|
|
6
|
+
/** The other endpoint, always an admitted winner: a dangling or consent-refused assertion is a finding, not a row. */
|
|
7
|
+
readonly counterpart: string;
|
|
8
|
+
/** The record whose text states the row: the viewed record or its counterpart. */
|
|
9
|
+
readonly declaredOn: string;
|
|
10
|
+
/** Where `declaredOn` states it: the assertion's lines, or the line of the field holding the ref. */
|
|
11
|
+
readonly source: EdgeAssertion['source'];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* G06b: one edge assertion read from one endpoint. `edge` is the declaration of the viewed record itself, in the verb
|
|
15
|
+
* its author wrote; `inverse` is the counterpart's declaration read from this side in the kernel's spelling for it,
|
|
16
|
+
* the active predicate at the source and its `INVERSE_OF` spelling at the target. Only `edge` rows are declared.
|
|
17
|
+
*/
|
|
18
|
+
export interface DirectedEdgeRow extends DirectedRowBase {
|
|
19
|
+
readonly kind: 'edge' | 'inverse';
|
|
20
|
+
/** True exactly for `inverse`: a view over the counterpart's declaration, never authoritative over it. */
|
|
21
|
+
readonly derived: boolean;
|
|
22
|
+
readonly predicate: Predicate;
|
|
23
|
+
readonly spelling: string;
|
|
24
|
+
/** Which active endpoint declared the assertion, whichever side reads it: `declared by source` or `by target`. */
|
|
25
|
+
readonly declaredBy: 'source' | 'target';
|
|
26
|
+
/** The edge's fragment, on the record its declaration references: an `edge` row's counterpart, an `inverse` row's own record. */
|
|
27
|
+
readonly fragment?: string;
|
|
28
|
+
readonly condition?: readonly Term[];
|
|
29
|
+
}
|
|
30
|
+
/** G06b: one G06a typed field reference read from one end; `field` is the holder's field path, `declaredOn` the holder. */
|
|
31
|
+
export interface DirectedFieldRow extends DirectedRowBase {
|
|
32
|
+
readonly kind: 'field-ref';
|
|
33
|
+
readonly derived: true;
|
|
34
|
+
readonly field: string;
|
|
35
|
+
}
|
|
36
|
+
export type DirectedRow = DirectedEdgeRow | DirectedFieldRow;
|
|
37
|
+
/**
|
|
38
|
+
* G06b: every row the graph holds at `identity`, read from its side. Each assertion of an edge it is an endpoint of
|
|
39
|
+
* gives one row per side it occupies (both sides of a self-relation), so an edge asserted from both ends keeps both
|
|
40
|
+
* declarations; each G06a field reference it holds or is named by gives one `field-ref` row. Derived on read from the
|
|
41
|
+
* load-time `out`, `in`, `referencesFrom` and `referencedBy` indexes, so no call scans the graph; it adds no index,
|
|
42
|
+
* diagnostic or revision input. An identity that is not an admitted winner has no rows.
|
|
43
|
+
*/
|
|
44
|
+
export declare function directedView(graph: Graph, identity: string): readonly DirectedRow[];
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=directed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directed.d.ts","sourceRoot":"","sources":["../src/directed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5D,OAAO,KAAK,EAAQ,aAAa,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7D,UAAU,eAAe;IACvB,sHAAsH;IACtH,QAAQ,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI,CAAC;IACjC,sHAAsH;IACtH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kFAAkF;IAClF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qGAAqG;IACrG,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC1C;AACD;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kHAAkH;IAClH,QAAQ,CAAC,UAAU,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACzC,iIAAiI;IACjI,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;CACtC;AACD,2HAA2H;AAC3H,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAc7D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,WAAW,EAAE,CAoDnF"}
|
package/dist/directed.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { INVERSE_OF } from '@inventarch/language';
|
|
2
|
+
import { snapshot } from './immutable.js';
|
|
3
|
+
import { compare, stableSerialize } from './revision.js';
|
|
4
|
+
const KINDS = ['edge', 'inverse', 'field-ref'];
|
|
5
|
+
const DIRECTIONS = ['out', 'in'];
|
|
6
|
+
const rowOrder = (a, b) => KINDS.indexOf(a.kind) - KINDS.indexOf(b.kind) ||
|
|
7
|
+
DIRECTIONS.indexOf(a.direction) - DIRECTIONS.indexOf(b.direction) ||
|
|
8
|
+
compare('predicate' in a ? a.predicate : a.field, 'predicate' in b ? b.predicate : b.field) ||
|
|
9
|
+
compare(a.counterpart, b.counterpart) ||
|
|
10
|
+
compare(a.declaredOn, b.declaredOn) ||
|
|
11
|
+
compare(a.source.path, b.source.path) ||
|
|
12
|
+
a.source.line - b.source.line ||
|
|
13
|
+
compare(stableSerialize(a), stableSerialize(b));
|
|
14
|
+
/**
|
|
15
|
+
* G06b: every row the graph holds at `identity`, read from its side. Each assertion of an edge it is an endpoint of
|
|
16
|
+
* gives one row per side it occupies (both sides of a self-relation), so an edge asserted from both ends keeps both
|
|
17
|
+
* declarations; each G06a field reference it holds or is named by gives one `field-ref` row. Derived on read from the
|
|
18
|
+
* load-time `out`, `in`, `referencesFrom` and `referencedBy` indexes, so no call scans the graph; it adds no index,
|
|
19
|
+
* diagnostic or revision input. An identity that is not an admitted winner has no rows.
|
|
20
|
+
*/
|
|
21
|
+
export function directedView(graph, identity) {
|
|
22
|
+
const rows = [];
|
|
23
|
+
const read = (edge, direction) => {
|
|
24
|
+
const counterpart = direction === 'out' ? edge.to : edge.from;
|
|
25
|
+
if (counterpart === null)
|
|
26
|
+
return;
|
|
27
|
+
for (const assertion of edge.assertions) {
|
|
28
|
+
// An author always stands at the active endpoint its spelling names: `out` at the source, `in` at the target.
|
|
29
|
+
const declared = assertion.direction === direction;
|
|
30
|
+
rows.push({
|
|
31
|
+
kind: declared ? 'edge' : 'inverse',
|
|
32
|
+
derived: !declared,
|
|
33
|
+
direction,
|
|
34
|
+
predicate: edge.predicate,
|
|
35
|
+
spelling: declared
|
|
36
|
+
? assertion.spelling
|
|
37
|
+
: direction === 'out'
|
|
38
|
+
? edge.predicate
|
|
39
|
+
: INVERSE_OF.get(edge.predicate),
|
|
40
|
+
declaredBy: assertion.direction === 'out' ? 'source' : 'target',
|
|
41
|
+
declaredOn: assertion.author,
|
|
42
|
+
counterpart,
|
|
43
|
+
source: assertion.source,
|
|
44
|
+
...(edge.fragment === undefined ? {} : { fragment: edge.fragment }),
|
|
45
|
+
...(edge.condition === undefined ? {} : { condition: edge.condition }),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
if (graph.nodes.has(identity)) {
|
|
50
|
+
for (const edges of graph.out.get(identity)?.values() ?? [])
|
|
51
|
+
for (const edge of edges)
|
|
52
|
+
read(edge, 'out');
|
|
53
|
+
for (const edges of graph.in.get(identity)?.values() ?? [])
|
|
54
|
+
for (const edge of edges)
|
|
55
|
+
read(edge, 'in');
|
|
56
|
+
for (const reference of graph.referencesFrom.get(identity) ?? [])
|
|
57
|
+
rows.push({
|
|
58
|
+
kind: 'field-ref',
|
|
59
|
+
derived: true,
|
|
60
|
+
direction: 'out',
|
|
61
|
+
field: reference.field,
|
|
62
|
+
counterpart: reference.to,
|
|
63
|
+
declaredOn: identity,
|
|
64
|
+
source: reference.source,
|
|
65
|
+
});
|
|
66
|
+
for (const reference of graph.referencedBy.get(identity) ?? [])
|
|
67
|
+
rows.push({
|
|
68
|
+
kind: 'field-ref',
|
|
69
|
+
derived: true,
|
|
70
|
+
direction: 'in',
|
|
71
|
+
field: reference.field,
|
|
72
|
+
counterpart: reference.from,
|
|
73
|
+
declaredOn: reference.from,
|
|
74
|
+
source: reference.source,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return snapshot(rows.sort(rowOrder));
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=directed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directed.js","sourceRoot":"","sources":["../src/directed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAsCzD,MAAM,KAAK,GAAmC,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAC/E,MAAM,UAAU,GAAwC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACtE,MAAM,QAAQ,GAAG,CAAC,CAAc,EAAE,CAAc,EAAU,EAAE,CAC1D,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,OAAO,CAA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G,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC9D,IAAI,CAAC,IAAI,CAAC;gBACR,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,WAAW,EAAE,SAAS,CAAC,EAAE;gBACzB,UAAU,EAAE,QAAQ;gBACpB,MAAM,EAAE,SAAS,CAAC,MAAM;aACzB,CAAC,CAAC;QACL,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC5D,IAAI,CAAC,IAAI,CAAC;gBACR,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,WAAW,EAAE,SAAS,CAAC,IAAI;gBAC3B,UAAU,EAAE,SAAS,CAAC,IAAI;gBAC1B,MAAM,EAAE,SAAS,CAAC,MAAM;aACzB,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
export { GRAPH_CODES, GraphUsageError } from './diagnostics.js';
|
|
2
2
|
export type { GraphCode, GraphDiagnostic } from './diagnostics.js';
|
|
3
3
|
export { canonicalRoot, reaches } from './paths.js';
|
|
4
|
-
export { stableSerialize, revisionOf } from './revision.js';
|
|
4
|
+
export { stableSerialize, recordDigest, revisionOf } from './revision.js';
|
|
5
5
|
export type { RevisionInputs, RevisionSource } from './revision.js';
|
|
6
|
+
export { CodecError, canonical, copy, digest } from './codec.js';
|
|
7
|
+
export type { Json } from './codec.js';
|
|
6
8
|
export { validateCoordinate, dimensionsOf } from './coordinate.js';
|
|
7
9
|
export type { Coordinate, Dimensions } from './coordinate.js';
|
|
8
10
|
export { load, serialize } from './load.js';
|
|
9
11
|
export { resolve } from './resolve.js';
|
|
10
12
|
export type { Resolution } from './resolve.js';
|
|
11
|
-
export type { CellRef, CellSelection, Edge, EdgeAssertion, FieldReference, Graph, LoadOptions, Node, Occurrence, Shadow, Tie, } from './types.js';
|
|
13
|
+
export type { CellRef, CellSelection, Claim, Edge, EdgeAssertion, FieldReference, Graph, LoadOptions, Node, Occurrence, Shadow, Tie, } from './types.js';
|
|
12
14
|
export { cell, conditionHolds, effectiveSeverity, selectors, variants } from './queries.js';
|
|
13
15
|
export type { SelectorMatch, VariantSelection } from './queries.js';
|
|
16
|
+
export { CLAIM_FIELDS, claimants, isSelection, selects } from './claims.js';
|
|
17
|
+
export type { ClaimMatch, Claimant } from './claims.js';
|
|
18
|
+
export { directedView } from './directed.js';
|
|
19
|
+
export type { DirectedEdgeRow, DirectedFieldRow, DirectedRow } from './directed.js';
|
|
14
20
|
export { traverse } from './traverse.js';
|
|
15
21
|
export type { Traversal, TraverseOptions, Via, WalkNode } from './traverse.js';
|
|
16
22
|
export { fold, tokenize, search } from './text.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB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Ae,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { GRAPH_CODES, GraphUsageError } from './diagnostics.js';
|
|
2
2
|
export { canonicalRoot, reaches } from './paths.js';
|
|
3
|
-
export { stableSerialize, revisionOf } from './revision.js';
|
|
3
|
+
export { stableSerialize, recordDigest, revisionOf } from './revision.js';
|
|
4
|
+
export { CodecError, canonical, copy, digest } from './codec.js';
|
|
4
5
|
export { validateCoordinate, dimensionsOf } from './coordinate.js';
|
|
5
6
|
export { load, serialize } from './load.js';
|
|
6
7
|
export { resolve } from './resolve.js';
|
|
7
8
|
export { cell, conditionHolds, effectiveSeverity, selectors, variants } from './queries.js';
|
|
9
|
+
export { CLAIM_FIELDS, claimants, isSelection, selects } from './claims.js';
|
|
10
|
+
export { directedView } from './directed.js';
|
|
8
11
|
export { traverse } from './traverse.js';
|
|
9
12
|
export { fold, tokenize, search } from './text.js';
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAgBvC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/load.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,cAAc,EAEd,cAAc,EAEf,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,cAAc,EAEd,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAU9B,OAAO,KAAK,EAAW,IAAI,EAAkB,KAAK,EAAE,WAAW,EAAiC,MAAM,YAAY,CAAC;AAEnH,eAAO,MAAM,SAAS,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAG,MASd,CAAC;AAChC,wBAAgB,IAAI,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,KAAK,CA8S9G;AAkFD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAE9C"}
|
package/dist/load.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { KIND_LANES, canonicalPath, consentFor, isPhase, validatePool } from '@inventarch/language';
|
|
2
|
+
import { claimsOf } from './claims.js';
|
|
2
3
|
import { dimensionsOf } from './coordinate.js';
|
|
3
4
|
import { GraphUsageError, graphDiagnostic } from './diagnostics.js';
|
|
4
5
|
import { snapshot } from './immutable.js';
|
|
5
6
|
import { assertLocation, canonicalRoot, reaches } from './paths.js';
|
|
6
7
|
import { referenceKey, resolve } from './resolve.js';
|
|
7
|
-
import { compare, revisionOf, stableSerialize } from './revision.js';
|
|
8
|
+
import { compare, recordDigest, revisionOf, stableSerialize } from './revision.js';
|
|
8
9
|
import { buildTextIndex } from './text.js';
|
|
9
10
|
export const edgeOrder = (a, b) => compare(a.from ?? '', b.from ?? '') ||
|
|
10
11
|
compare(a.predicate, b.predicate) ||
|
|
@@ -46,6 +47,7 @@ export function load(records, registry, options) {
|
|
|
46
47
|
band: record.placement.band,
|
|
47
48
|
reach: canonicalRoot(record.placement.reach),
|
|
48
49
|
dimensions: dimensions.dimensions,
|
|
50
|
+
digest: recordDigest(record),
|
|
49
51
|
};
|
|
50
52
|
return { key, node, status: dimensions.diagnostics.length > 0 ? 'refused' : 'inactive' };
|
|
51
53
|
})
|
|
@@ -168,7 +170,13 @@ export function load(records, registry, options) {
|
|
|
168
170
|
}),
|
|
169
171
|
...(assertion.condition === undefined ? {} : { condition: assertion.condition }),
|
|
170
172
|
assertions: [
|
|
171
|
-
{
|
|
173
|
+
{
|
|
174
|
+
author: author.identity,
|
|
175
|
+
direction: assertion.direction,
|
|
176
|
+
spelling: assertion.spelling,
|
|
177
|
+
reference: assertion.reference,
|
|
178
|
+
source,
|
|
179
|
+
},
|
|
172
180
|
],
|
|
173
181
|
};
|
|
174
182
|
const key = stableSerialize([
|
|
@@ -207,11 +215,15 @@ export function load(records, registry, options) {
|
|
|
207
215
|
}
|
|
208
216
|
}
|
|
209
217
|
diagnostics.sort((a, b) => compare(a.path, b.path) || a.line - b.line || compare(a.code, b.code));
|
|
210
|
-
const references = fieldReferences(nodes, byName, registry), referencedBy = new Map();
|
|
211
|
-
|
|
212
|
-
const list =
|
|
218
|
+
const references = fieldReferences(nodes, byName, registry), referencedBy = new Map(), referencesFrom = new Map();
|
|
219
|
+
const keyed = (map, identity, reference) => {
|
|
220
|
+
const list = map.get(identity) ?? [];
|
|
213
221
|
list.push(reference);
|
|
214
|
-
|
|
222
|
+
map.set(identity, list);
|
|
223
|
+
};
|
|
224
|
+
for (const reference of references) {
|
|
225
|
+
keyed(referencedBy, reference.to, reference);
|
|
226
|
+
keyed(referencesFrom, reference.from, reference);
|
|
215
227
|
}
|
|
216
228
|
return snapshot({
|
|
217
229
|
revision,
|
|
@@ -240,6 +252,8 @@ export function load(records, registry, options) {
|
|
|
240
252
|
byDanglingReference,
|
|
241
253
|
references,
|
|
242
254
|
referencedBy,
|
|
255
|
+
referencesFrom,
|
|
256
|
+
claims: claimsOf(nodes.values()),
|
|
243
257
|
text: buildTextIndex(nodes.values()),
|
|
244
258
|
});
|
|
245
259
|
}
|
package/dist/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;A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ACJ,CAAC;gBACH,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;oBAAE,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC,CAAC;QACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ;YAAE,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe;gBAAE,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACnH,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/revision.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrozenRegistry, Location } from '@inventarch/language';
|
|
1
|
+
import type { CompiledRecord, FrozenRegistry, Location } from '@inventarch/language';
|
|
2
2
|
export interface RevisionSource {
|
|
3
3
|
readonly path: string;
|
|
4
4
|
readonly text: string;
|
|
@@ -13,4 +13,14 @@ export declare const compare: (a: string, b: string) => number;
|
|
|
13
13
|
/** Stable structured-data encoding. Collection tags keep maps, sets and arrays distinct. */
|
|
14
14
|
export declare function stableSerialize(value: unknown): string;
|
|
15
15
|
export declare function revisionOf(registry: FrozenRegistry, inputs: RevisionInputs): string;
|
|
16
|
+
/**
|
|
17
|
+
* G13: the per-record digest, the codec `digest` of what a record says with where it was read left out. It covers the
|
|
18
|
+
* identity slots, `parent`, head and section fields with their nested blocks, each compiled edge's predicate,
|
|
19
|
+
* direction, spelling, reference, fragment and condition, cells, selectors, variants, requirements and `schema`. It
|
|
20
|
+
* omits `source`, every span, `placement` and `provenance` (both supplied by the loader from the source's location;
|
|
21
|
+
* capture membership carries root and band) and each edge's compile-time `target`, which resolves against the other
|
|
22
|
+
* records of its file. Moving a record to another file or placement, or shifting its lines, leaves the digest unchanged
|
|
23
|
+
* while its text compiles the same way. It is not a `revisionOf` input.
|
|
24
|
+
*/
|
|
25
|
+
export declare function recordDigest(record: CompiledRecord): string;
|
|
16
26
|
//# sourceMappingURL=revision.d.ts.map
|
package/dist/revision.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revision.d.ts","sourceRoot":"","sources":["../src/revision.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"revision.d.ts","sourceRoot":"","sources":["../src/revision.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIpG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AACD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AACD,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAsC,CAAC;AAEtF,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAwBtD;AACD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CA0BnF;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAuC3D"}
|
package/dist/revision.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { canonicalPath } from '@inventarch/language';
|
|
3
|
+
import { digest } from './codec.js';
|
|
3
4
|
import { assertLocation, canonicalRoot } from './paths.js';
|
|
4
5
|
export const compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
5
6
|
/** Stable structured-data encoding. Collection tags keep maps, sets and arrays distinct. */
|
|
@@ -55,4 +56,68 @@ export function revisionOf(registry, inputs) {
|
|
|
55
56
|
}))
|
|
56
57
|
.digest('hex');
|
|
57
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Compiled fields and items without their spans, one row each in authored order: its `path` of indexes among its
|
|
61
|
+
* parents' children, then its key, value and `when` words, or its item. Rows keep nested blocks in the form while its
|
|
62
|
+
* depth stays bounded however deeply they nest, so every compiled record fits the codec's nesting limit.
|
|
63
|
+
*/
|
|
64
|
+
function authored(children, parent = []) {
|
|
65
|
+
return children.flatMap((child, index) => {
|
|
66
|
+
const path = [...parent, index];
|
|
67
|
+
return 'item' in child
|
|
68
|
+
? [{ path, item: child.item }]
|
|
69
|
+
: [
|
|
70
|
+
{ path, key: child.key, value: child.value, ...(child.when === undefined ? {} : { when: child.when }) },
|
|
71
|
+
...authored(child.fields ?? [], path),
|
|
72
|
+
];
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* G13: the per-record digest, the codec `digest` of what a record says with where it was read left out. It covers the
|
|
77
|
+
* identity slots, `parent`, head and section fields with their nested blocks, each compiled edge's predicate,
|
|
78
|
+
* direction, spelling, reference, fragment and condition, cells, selectors, variants, requirements and `schema`. It
|
|
79
|
+
* omits `source`, every span, `placement` and `provenance` (both supplied by the loader from the source's location;
|
|
80
|
+
* capture membership carries root and band) and each edge's compile-time `target`, which resolves against the other
|
|
81
|
+
* records of its file. Moving a record to another file or placement, or shifting its lines, leaves the digest unchanged
|
|
82
|
+
* while its text compiles the same way. It is not a `revisionOf` input.
|
|
83
|
+
*/
|
|
84
|
+
export function recordDigest(record) {
|
|
85
|
+
const condition = (product) => product.condition === undefined ? {} : { condition: product.condition };
|
|
86
|
+
return digest({
|
|
87
|
+
identity: record.identity,
|
|
88
|
+
system: record.system,
|
|
89
|
+
kind: record.kind,
|
|
90
|
+
facet: record.facet,
|
|
91
|
+
name: record.name,
|
|
92
|
+
displayName: record.displayName,
|
|
93
|
+
discriminator: record.discriminator,
|
|
94
|
+
parent: record.parent ?? null,
|
|
95
|
+
head: authored(record.head),
|
|
96
|
+
sections: record.sections.map((section) => ({ name: section.name, fields: authored(section.fields) })),
|
|
97
|
+
edges: record.edges.map((edge) => ({
|
|
98
|
+
predicate: edge.predicate,
|
|
99
|
+
direction: edge.direction,
|
|
100
|
+
spelling: edge.spelling,
|
|
101
|
+
reference: edge.reference,
|
|
102
|
+
...(edge.fragment === undefined ? {} : { fragment: edge.fragment }),
|
|
103
|
+
...condition(edge),
|
|
104
|
+
})),
|
|
105
|
+
cells: record.cells.map((cell) => ({
|
|
106
|
+
phase: cell.phase,
|
|
107
|
+
primitive: cell.primitive,
|
|
108
|
+
primary: cell.primary,
|
|
109
|
+
text: cell.text,
|
|
110
|
+
...condition(cell),
|
|
111
|
+
})),
|
|
112
|
+
selectors: record.selectors,
|
|
113
|
+
variants: record.variants.map((variant) => ({ key: variant.key, value: variant.value, ...condition(variant) })),
|
|
114
|
+
requirements: record.requirements.map((requirement) => ({
|
|
115
|
+
id: requirement.id,
|
|
116
|
+
kind: requirement.kind,
|
|
117
|
+
text: requirement.text,
|
|
118
|
+
...condition(requirement),
|
|
119
|
+
})),
|
|
120
|
+
schema: record.schema,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
58
123
|
//# sourceMappingURL=revision.js.map
|
package/dist/revision.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revision.js","s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AAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnE,GAAG,SAAS,CAAC,IAAI,CAAC;SACnB,CAAC,CAAC;QACH,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACjC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,SAAS,CAAC,IAAI,CAAC;SACnB,CAAC,CAAC;QACH,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC/G,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YACtD,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,GAAG,SAAS,CAAC,WAAW,CAAC;SAC1B,CAAC,CAAC;QACH,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface Node extends CompiledRecord {
|
|
|
7
7
|
readonly band: Band;
|
|
8
8
|
readonly reach: string;
|
|
9
9
|
readonly dimensions: Dimensions;
|
|
10
|
+
/** G13: `recordDigest` of this occurrence, computed once at load; its source path, lines, placement and provenance are not in it. */
|
|
11
|
+
readonly digest: string;
|
|
10
12
|
}
|
|
11
13
|
export interface Occurrence {
|
|
12
14
|
readonly key: string;
|
|
@@ -27,6 +29,8 @@ export interface Tie {
|
|
|
27
29
|
export interface EdgeAssertion {
|
|
28
30
|
readonly author: string;
|
|
29
31
|
readonly direction: 'out' | 'in';
|
|
32
|
+
/** The verb as the author wrote it (`CompiledEdge.spelling`); the edge's `from`/`to` stay normalized to the active direction. */
|
|
33
|
+
readonly spelling: string;
|
|
30
34
|
readonly reference: EdgeReference;
|
|
31
35
|
readonly source: {
|
|
32
36
|
readonly path: string;
|
|
@@ -65,6 +69,21 @@ export interface FieldReference {
|
|
|
65
69
|
readonly endLine: number;
|
|
66
70
|
};
|
|
67
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* One path selection a winner states in a claimant field (G06c): `field` is `authority.covers`, `subject.covers`,
|
|
74
|
+
* `work.covers` or `hook.paths`, `selection` the text as authored. Derived only, like a FieldReference:
|
|
75
|
+
* not an Edge, no predicate, never consent-checked.
|
|
76
|
+
*/
|
|
77
|
+
export interface Claim {
|
|
78
|
+
readonly from: string;
|
|
79
|
+
readonly field: string;
|
|
80
|
+
readonly selection: string;
|
|
81
|
+
readonly source: {
|
|
82
|
+
readonly path: string;
|
|
83
|
+
readonly line: number;
|
|
84
|
+
readonly endLine: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
68
87
|
export interface CellRef {
|
|
69
88
|
readonly identity: string;
|
|
70
89
|
readonly primary: boolean;
|
|
@@ -104,6 +123,10 @@ export interface Graph {
|
|
|
104
123
|
readonly references: readonly FieldReference[];
|
|
105
124
|
/** `references` keyed by target identity, each list in `references` order. */
|
|
106
125
|
readonly referencedBy: ReadonlyMap<string, readonly FieldReference[]>;
|
|
126
|
+
/** `references` keyed by holder identity, each list in `references` order. */
|
|
127
|
+
readonly referencesFrom: ReadonlyMap<string, readonly FieldReference[]>;
|
|
128
|
+
/** G06c: the claimant index, every path selection a winner states in a claimant field, holders by identity. */
|
|
129
|
+
readonly claims: readonly Claim[];
|
|
107
130
|
}
|
|
108
131
|
export interface CellSelection {
|
|
109
132
|
readonly kind: 'exact' | 'primary';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,WAAW,IAAK,SAAQ,cAAc;IAC1C,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,WAAW,IAAK,SAAQ,cAAc;IA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,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC,CAAC;IACtE,8EAA8E;IAC9E,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC,CAAC;IACxE,+GAA+G;IAC/G,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;CACnC;AACD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inventarch/graph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
11
|
},
|
|
12
|
+
"./internal/codec": {
|
|
13
|
+
"types": "./dist/codec.d.ts",
|
|
14
|
+
"default": "./dist/codec.js"
|
|
15
|
+
},
|
|
12
16
|
"./internal/coordinate": {
|
|
13
17
|
"types": "./dist/coordinate.d.ts",
|
|
14
18
|
"default": "./dist/coordinate.js"
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
"LANGUAGE.md"
|
|
68
72
|
],
|
|
69
73
|
"dependencies": {
|
|
70
|
-
"@inventarch/language": "1.
|
|
74
|
+
"@inventarch/language": "1.2.0"
|
|
71
75
|
},
|
|
72
76
|
"devDependencies": {
|
|
73
77
|
"@types/node": "^22.19.0",
|