@dtmd/temper 0.0.4 → 0.0.7

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.
Files changed (91) hide show
  1. package/README.md +10 -12
  2. package/bin/temper.js +52 -0
  3. package/dist/src/assembly.d.ts +32 -16
  4. package/dist/src/assembly.js +11 -10
  5. package/dist/src/builtins.d.ts +206 -41
  6. package/dist/src/builtins.js +258 -54
  7. package/dist/src/claude-code.d.ts +7 -9
  8. package/dist/src/claude-code.js +6 -8
  9. package/dist/src/contract.d.ts +47 -24
  10. package/dist/src/contract.js +35 -9
  11. package/dist/src/declarations.d.ts +42 -101
  12. package/dist/src/declarations.js +375 -47
  13. package/dist/src/emit.d.ts +56 -28
  14. package/dist/src/emit.js +177 -54
  15. package/dist/src/generated/AssemblyFactRow.d.ts +29 -0
  16. package/dist/src/generated/AssemblyFactRow.js +2 -0
  17. package/dist/src/generated/BoundRow.d.ts +14 -0
  18. package/dist/src/generated/BoundRow.js +2 -0
  19. package/dist/src/generated/CharsetRow.d.ts +15 -0
  20. package/dist/src/generated/CharsetRow.js +2 -0
  21. package/dist/src/generated/ClauseRow.d.ts +97 -0
  22. package/dist/src/generated/ClauseRow.js +1 -0
  23. package/dist/src/generated/CollectionAddressRow.d.ts +17 -0
  24. package/dist/src/generated/CollectionAddressRow.js +2 -0
  25. package/dist/src/generated/CollectionEntryRow.d.ts +23 -0
  26. package/dist/src/generated/CollectionEntryRow.js +2 -0
  27. package/dist/src/generated/CollectionEntryWire.d.ts +17 -0
  28. package/dist/src/generated/CollectionEntryWire.js +2 -0
  29. package/dist/src/generated/CountBoundRow.d.ts +13 -0
  30. package/dist/src/generated/CountBoundRow.js +2 -0
  31. package/dist/src/generated/Declarations.d.ts +89 -0
  32. package/dist/src/generated/Declarations.js +1 -0
  33. package/dist/src/generated/DegreeBoundRow.d.ts +15 -0
  34. package/dist/src/generated/DegreeBoundRow.js +1 -0
  35. package/dist/src/generated/EdgeBoundRow.d.ts +13 -0
  36. package/dist/src/generated/EdgeBoundRow.js +2 -0
  37. package/dist/src/generated/EmbeddedMember.d.ts +45 -0
  38. package/dist/src/generated/EmbeddedMember.js +1 -0
  39. package/dist/src/generated/EmbeddedMemberCollectionEntry.d.ts +21 -0
  40. package/dist/src/generated/EmbeddedMemberCollectionEntry.js +1 -0
  41. package/dist/src/generated/FeatureValue.d.ts +23 -0
  42. package/dist/src/generated/FeatureValue.js +1 -0
  43. package/dist/src/generated/Features.d.ts +82 -0
  44. package/dist/src/generated/Features.js +1 -0
  45. package/dist/src/generated/FencedBlock.d.ts +24 -0
  46. package/dist/src/generated/FencedBlock.js +2 -0
  47. package/dist/src/generated/IncludeRow.d.ts +18 -0
  48. package/dist/src/generated/IncludeRow.js +2 -0
  49. package/dist/src/generated/KindFactRow.d.ts +65 -0
  50. package/dist/src/generated/KindFactRow.js +1 -0
  51. package/dist/src/generated/LayoutRegionRow.d.ts +29 -0
  52. package/dist/src/generated/LayoutRegionRow.js +2 -0
  53. package/dist/src/generated/LayoutRow.d.ts +12 -0
  54. package/dist/src/generated/LayoutRow.js +1 -0
  55. package/dist/src/generated/MentionRow.d.ts +17 -0
  56. package/dist/src/generated/MentionRow.js +2 -0
  57. package/dist/src/generated/NestedMemberRow.d.ts +39 -0
  58. package/dist/src/generated/NestedMemberRow.js +1 -0
  59. package/dist/src/generated/Payload.d.ts +25 -0
  60. package/dist/src/generated/Payload.js +1 -0
  61. package/dist/src/generated/PayloadMember.d.ts +31 -0
  62. package/dist/src/generated/PayloadMember.js +2 -0
  63. package/dist/src/generated/RangeBoundRow.d.ts +15 -0
  64. package/dist/src/generated/RangeBoundRow.js +2 -0
  65. package/dist/src/generated/RegistrationRow.d.ts +35 -0
  66. package/dist/src/generated/RegistrationRow.js +2 -0
  67. package/dist/src/generated/RequirementRow.d.ts +40 -0
  68. package/dist/src/generated/RequirementRow.js +1 -0
  69. package/dist/src/generated/SatisfiesRow.d.ts +14 -0
  70. package/dist/src/generated/SatisfiesRow.js +2 -0
  71. package/dist/src/generated/Section.d.ts +21 -0
  72. package/dist/src/generated/Section.js +2 -0
  73. package/dist/src/generated/SectionContainsRow.d.ts +14 -0
  74. package/dist/src/generated/SectionContainsRow.js +2 -0
  75. package/dist/src/generated/SettingsRow.d.ts +25 -0
  76. package/dist/src/generated/SettingsRow.js +2 -0
  77. package/dist/src/generated/ValueType.d.ts +9 -0
  78. package/dist/src/generated/ValueType.js +2 -0
  79. package/dist/src/generated/index.d.ts +32 -0
  80. package/dist/src/generated/index.js +1 -0
  81. package/dist/src/index.d.ts +14 -18
  82. package/dist/src/index.js +10 -13
  83. package/dist/src/kind.d.ts +190 -43
  84. package/dist/src/kind.js +34 -30
  85. package/dist/src/needs.d.ts +8 -8
  86. package/dist/src/needs.js +7 -7
  87. package/dist/src/prose.d.ts +75 -28
  88. package/dist/src/prose.js +0 -0
  89. package/package.json +9 -1
  90. package/dist/src/genres.d.ts +0 -38
  91. package/dist/src/genres.js +0 -24
@@ -0,0 +1,89 @@
1
+ import type { AssemblyFactRow } from "./AssemblyFactRow.js";
2
+ import type { ClauseRow } from "./ClauseRow.js";
3
+ import type { IncludeRow } from "./IncludeRow.js";
4
+ import type { KindFactRow } from "./KindFactRow.js";
5
+ import type { MentionRow } from "./MentionRow.js";
6
+ import type { NestedMemberRow } from "./NestedMemberRow.js";
7
+ import type { RegistrationRow } from "./RegistrationRow.js";
8
+ import type { RequirementRow } from "./RequirementRow.js";
9
+ import type { SatisfiesRow } from "./SatisfiesRow.js";
10
+ import type { SettingsRow } from "./SettingsRow.js";
11
+ /**
12
+ * The lock's **declaration-row family** — the composed program's erased declarations,
13
+ * beside the
14
+ * per-member provenance and emit-fingerprint rows. Seven sub-families: the program's
15
+ * [kind facts](KindFactRow), its [clauses](ClauseRow), its [requirements](RequirementRow),
16
+ * its assembly facts, its
17
+ * [`satisfies`](SatisfiesRow) fill edges, its [`mention`](MentionRow) edges, and its
18
+ * [`nested_member`](NestedMemberRow) rows.
19
+ *
20
+ * Written into the lock by [`emit`] off the SDK's own payload ([`Declarations::write_into`])
21
+ * and read back here ([`read_declarations`]) for the gate's one disk-vs-lock comparison —
22
+ * `import`'s own extraction still writes this family for the `check` path it feeds
23
+ * (`GATE-READ-LOCK-DEMOLITION`, next in the chain, moves that read onto the lock too).
24
+ * Each family's columns are owned scalars (or small owned collections for a set-scope
25
+ * facet) so the read and write sides are the same shape: the lock is the vocabulary,
26
+ * not a typed IR. `#[derive(Deserialize)]` doubles this shape as the SDK payload's own
27
+ * wire format — the same rows, whether they arrive off disk or off the seam's JSON pipe.
28
+ *
29
+ * Not `Eq`: its [`ClauseRow`]s may carry `f64` `range` bounds.
30
+ */
31
+ export type Declarations = {
32
+ /**
33
+ * The kind facts — one per kind in the program.
34
+ */
35
+ kinds: Array<KindFactRow>;
36
+ /**
37
+ * The clauses of every kind's effective contract.
38
+ */
39
+ clauses: Array<ClauseRow>;
40
+ /**
41
+ * The named requirements the assembly declares.
42
+ */
43
+ requirements: Array<RequirementRow>;
44
+ /**
45
+ * The assembly-scope facts — the root member's declared enforcement `mode`,
46
+ * edges.
47
+ */
48
+ assembly: Array<AssemblyFactRow>;
49
+ /**
50
+ * The member→requirement fill edges — every imported member's `satisfies` keys,
51
+ * so the roster/coverage
52
+ * tiers ride the lock rather than re-importing the harness.
53
+ */
54
+ satisfies: Array<SatisfiesRow>;
55
+ /**
56
+ * The authored `n` mention edges — every member's already-resolved prose
57
+ * mentions, so the reference graph carries them alongside every other declared
58
+ * edge locus.
59
+ */
60
+ mentions: Array<MentionRow>;
61
+ /**
62
+ * The composed-prose includes — a seam-inbound family only: `emit` resolves each
63
+ * against disk, splices the target's bytes into the host's projection, and lowers
64
+ * it to a fingerprinted `include` source dependency (never written back into this
65
+ * declaration table, so a lock round-trip reads it empty).
66
+ */
67
+ includes: Array<IncludeRow>;
68
+ /**
69
+ * The host members' declared embedded-member facts — captured as declaration
70
+ * rows rather than a second copy the engine reads back off the rendered fence
71
+ * (0018, "the projection is not the database").
72
+ */
73
+ nested_members: Array<NestedMemberRow>;
74
+ /**
75
+ * The fields-only registration members the SDK erased for the manifest write face —
76
+ * seam-inbound carrying their folded fields, so `emit` routes each host manifest whole
77
+ * through the canonical write face. The lock's `registration` family records only each
78
+ * member's identity and collection address; the fields live in the projected manifest
79
+ * artifact, never a second copy read back (0018), so a lock round-trip reads them
80
+ * fieldless.
81
+ */
82
+ registrations: Array<RegistrationRow>;
83
+ /**
84
+ * The harness-level settings residue — seam-inbound opaque `settings.json` keys with
85
+ * no member home, folded into their manifest's residue at emit. Like `includes`, never
86
+ * written into this declaration table, so a lock round-trip reads none.
87
+ */
88
+ settings: Array<SettingsRow>;
89
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { EdgeBoundRow } from "./EdgeBoundRow.js";
2
+ /**
3
+ * A requirement row's `degree` bound — the in/out edge-count bound every satisfier
4
+ * must land in.
5
+ */
6
+ export type DegreeBoundRow = {
7
+ /**
8
+ * The bound on a satisfier's incoming edge count, when constrained.
9
+ */
10
+ incoming?: EdgeBoundRow;
11
+ /**
12
+ * The bound on a satisfier's outgoing edge count, when constrained.
13
+ */
14
+ outgoing?: EdgeBoundRow;
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * One direction's inclusive `[min, max]` edge-count bound, each endpoint optional.
3
+ */
4
+ export type EdgeBoundRow = {
5
+ /**
6
+ * The inclusive lower bound. `None` ⇒ no lower bound.
7
+ */
8
+ min?: number;
9
+ /**
10
+ * The inclusive upper bound. `None` ⇒ unbounded above.
11
+ */
12
+ max?: number;
13
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,45 @@
1
+ import type { EmbeddedMemberCollectionEntry } from "./EmbeddedMemberCollectionEntry.js";
2
+ /**
3
+ * A **nested member** folded from its parent's body at the **embedded locus**,
4
+ * extracted from a member fence
5
+ * at the floor. It carries the child kind it instantiates (`decision`) and the fence
6
+ * key that names this instance among its embedded siblings (`surface-authority`),
7
+ * plus its own **prose leaves** — top-level authored strings — and its own **nested
8
+ * members**, one layer deeper: a collection's entries, each itself an
9
+ * [`EmbeddedMember`] (`rejected.baked-projection`), in authored order. Every leaf is
10
+ * addressed structurally (member + kind + key + child path) so drift, `impact`, and
11
+ * citations survive rewording ([`EmbeddedMember::addressed_leaves`]).
12
+ *
13
+ * Floor leaves carry no mentions — interpolation stays deferred until a floor
14
+ * mention syntax is separately ratified — so a
15
+ * leaf is a plain [`String`], not a mention-bearing span.
16
+ */
17
+ export type EmbeddedMember = {
18
+ /**
19
+ * The child kind this member instantiates — the fence info string's
20
+ * `member.<kind>` (`decision`), one of the host kind's declared templates.
21
+ */
22
+ kind: string;
23
+ /**
24
+ * The fence key naming this instance among its embedded siblings in the same
25
+ * host member — the info string's second token (`surface-authority`). Part of a
26
+ * leaf's address, so it is keyed, never positional.
27
+ */
28
+ key: string;
29
+ /**
30
+ * This member's own top-level **prose leaves** — field name → authored string,
31
+ * in stable (sorted) key order so serialization is deterministic.
32
+ */
33
+ leaves: {
34
+ [key in string]: string;
35
+ };
36
+ /**
37
+ * This member's own **nested members**, one layer deeper — one entry per
38
+ * collection member, in authored order, so a collection leaf addresses as
39
+ * `<collection>.<entry>.<field>` (`rejected.baked-projection.because`). Each
40
+ * entry's collection name and key are keyed identity, never positional — an
41
+ * address that survives insertion and reorder even though the list itself is
42
+ * ordered.
43
+ */
44
+ members: Array<EmbeddedMemberCollectionEntry>;
45
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { EmbeddedMember } from "./EmbeddedMember.js";
2
+ /**
3
+ * One entry in an [`EmbeddedMember`]'s sibling collection: the collection name it
4
+ * belongs to, its own key among that collection's siblings, and its own nested
5
+ * member — the same identity a [`CollectionEntryRow`](crate::drift::CollectionEntryRow)
6
+ * carries, expanded one layer.
7
+ */
8
+ export type EmbeddedMemberCollectionEntry = {
9
+ /**
10
+ * The collection this entry belongs to.
11
+ */
12
+ collection: string;
13
+ /**
14
+ * The entry's key among its collection's siblings.
15
+ */
16
+ key: string;
17
+ /**
18
+ * The entry's own nested member.
19
+ */
20
+ member: EmbeddedMember;
21
+ };
@@ -0,0 +1,23 @@
1
+ import type { ValueType } from "./ValueType.js";
2
+ /**
3
+ * One extracted feature value: a scalar field (carrying its parsed source
4
+ * [`ValueType`] alongside its comparison text), a list field (e.g. a YAML sequence
5
+ * like `allowed-tools`), or a map field. Scalar predicates (`min_len`, `enum`,
6
+ * `deny`, `allowed_chars`) read the scalar text; presence predicates
7
+ * (`required`, `forbidden_keys`) need only the key; the `type` primitive
8
+ * (forthcoming) reads [`FeatureValue::kind`].
9
+ */
10
+ export type FeatureValue = {
11
+ "Scalar": {
12
+ /**
13
+ * The parsed source kind of the scalar.
14
+ */
15
+ kind: ValueType;
16
+ /**
17
+ * The scalar as text (the YAML/JSON scalar stringified).
18
+ */
19
+ text: string;
20
+ };
21
+ } | {
22
+ "List": Array<string>;
23
+ } | "Map";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ import type { EmbeddedMember } from "./EmbeddedMember.js";
2
+ import type { FeatureValue } from "./FeatureValue.js";
3
+ import type { FencedBlock } from "./FencedBlock.js";
4
+ import type { Section } from "./Section.js";
5
+ /**
6
+ * An artifact's deterministically-extracted features, keyed for generic clause
7
+ * lookup. Everything here is surface-decidable; nothing is inferred meaning.
8
+ */
9
+ export type Features = {
10
+ /**
11
+ * The artifact id used in diagnostics (for a skill, its `name`).
12
+ */
13
+ id: string;
14
+ /**
15
+ * Frontmatter fields by name — the typed fields *and* the `extra` keys, so
16
+ * a clause resolves `name`/`description`/`version` or any unknown key
17
+ * (e.g. for `forbidden_keys`) through one generic lookup.
18
+ */
19
+ fields: {
20
+ [key in string]: FeatureValue;
21
+ };
22
+ /**
23
+ * The artifact body's line count (for `max_lines`).
24
+ */
25
+ body_lines: number;
26
+ /**
27
+ * The ATX headings (`#`..`######`) in the body, in document order, with the
28
+ * `#` run and any closing `#` run trimmed (for `require_sections`). A `#`
29
+ * inside a fenced code block is not a heading.
30
+ */
31
+ headings: Array<string>;
32
+ /**
33
+ * The body's ATX [`Section`]s (heading + the body span beneath it), in
34
+ * document order — the feature a `section_contains` clause decides over.
35
+ * A
36
+ * superset of [`headings`](Features::headings): where `headings` carries only
37
+ * each heading's text, a section pairs it with its body span so a marker check
38
+ * has prose to search.
39
+ */
40
+ sections: Array<Section>;
41
+ /**
42
+ * The name of the directory the unit was imported from, off provenance
43
+ * (for `name-matches-dir`). `None` when the source path has no parent.
44
+ */
45
+ source_dir: string | null;
46
+ /**
47
+ * The body's format-executed directive occurrences, in document order — the
48
+ * `at-import` `@path` targets a `directives` primitive extracts.
49
+ * A body-derived feature like [`headings`](Features::headings)/[`sections`](Features::sections):
50
+ * the raw occurrence strings only, resolution/classing a later slice. Empty
51
+ * when the kind composes no `directives` primitive.
52
+ */
53
+ directives: Array<string>;
54
+ /**
55
+ * The body's fenced code blocks, in document order — each block's info string
56
+ * paired with its interior content, the feature a `fenced` primitive yields.
57
+ * A body-derived feature like
58
+ * [`headings`](Features::headings)/[`sections`](Features::sections)/[`directives`](Features::directives):
59
+ * the same fence boundaries the heading extractor tracks, surfaced whole. Empty
60
+ * when the kind composes no `fenced` primitive.
61
+ */
62
+ fenced_blocks: Array<FencedBlock>;
63
+ /**
64
+ * The host member's own **nested members** — its declared [`EmbeddedMember`]s,
65
+ * read off the lock's own `Declarations::nested_members` rows by this member's
66
+ * `kind:name` address ([`nested_members_from_rows`]), never mined from
67
+ * [`fenced_blocks`](Features::fenced_blocks) (0018, "the projection is not the
68
+ * database"). Empty when the lock carries no row for this member.
69
+ */
70
+ nested_members: Array<EmbeddedMember>;
71
+ /**
72
+ * The requirements this artifact opts into filling — the authored
73
+ * `[representation].satisfies` bindings, surfaced for the coverage check.
74
+ * This is a *representation* edge
75
+ * the coverage resolver reads, NOT
76
+ * a contract-checkable frontmatter field — so it lives here, distinct from
77
+ * `fields`, and never resolves through [`Features::field`]. The authored
78
+ * `rationale` is deliberately absent: it is the human *why*, never a
79
+ * decidable feature.
80
+ */
81
+ satisfies: Array<string>;
82
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * One fenced code block of a markdown body: its **info string** (the text after
3
+ * the opening fence — `sh`, `toml`, `toml member.foo` — trimmed) paired with the
4
+ * block's **interior content** (the lines between the fences, rejoined with `\n`).
5
+ * The feature a `fenced` primitive yields: fenced extraction
6
+ * composed with a TOML parse yields an embedded member's features, declared data
7
+ * at body position. Surface-decidable like every other feature — the fence
8
+ * boundaries are the ones [`body_headings`] already tracks, so a block is never a
9
+ * guess. The info string is available so the embedded-member consumer can key on
10
+ * `member.<name>`; this generic primitive yields the raw blocks only, the TOML
11
+ * composition a later slice.
12
+ */
13
+ export type FencedBlock = {
14
+ /**
15
+ * The opening fence's info string, trimmed — `sh`, `toml`, or empty for a bare
16
+ * fence. The declared kind the embedded-member consumer keys on.
17
+ */
18
+ info: string;
19
+ /**
20
+ * The block's interior content — the lines between the fences, rejoined with
21
+ * `\n`, byte-faithful to the body span exactly as a [`Section`]'s body is.
22
+ */
23
+ content: string;
24
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One composed-prose include the SDK declares — the host member's own `kind:name`
3
+ * address and the include target's path, resolved by the SDK against the stating
4
+ * module (never the workspace) to an absolute path. A seam-inbound row only: `emit`
5
+ * resolves it against disk ([`resolve_source_dependency`]), splices the target's bytes
6
+ * into the host projection at the body's include slot, and lowers it to a fingerprinted
7
+ * `include` source dependency — this row itself never reaches the lock.
8
+ */
9
+ export type IncludeRow = {
10
+ /**
11
+ * The host member's own `kind:name` address.
12
+ */
13
+ member: string;
14
+ /**
15
+ * The include target's SDK-resolved absolute path.
16
+ */
17
+ source_path: string;
18
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,65 @@
1
+ import type { CollectionAddressRow } from "./CollectionAddressRow.js";
2
+ import type { LayoutRow } from "./LayoutRow.js";
3
+ /**
4
+ * One kind's declaration row — its identity and declared runtime facts.
5
+ * The optional facts are omitted from the lock when the kind declares none, so the row
6
+ * round-trips to exactly what was written.
7
+ */
8
+ export type KindFactRow = {
9
+ /**
10
+ * The bare kind name.
11
+ */
12
+ name: string;
13
+ /**
14
+ * The declared provider authority, when the kind qualifies by one.
15
+ */
16
+ provider?: string;
17
+ /**
18
+ * The `governs` locus root directory.
19
+ */
20
+ governs_root: string;
21
+ /**
22
+ * The `governs` locus filename glob.
23
+ */
24
+ governs_glob: string;
25
+ /**
26
+ * The declared projection format label, when declared.
27
+ */
28
+ format?: string;
29
+ /**
30
+ * The declared unit-shape label, when declared.
31
+ */
32
+ unit_shape?: string;
33
+ /**
34
+ * The declared registration channel set's wire labels, in declaration order.
35
+ * Empty for a kind that declares none, the same tolerant round-trip
36
+ * [`templates`](KindFactRow::templates) takes.
37
+ */
38
+ registration?: Array<string>;
39
+ /**
40
+ * The host kind's declared nesting templates — the embedded child kind names it
41
+ * folds embedded members of. Empty for
42
+ * a kind that nests nothing, the tolerant round-trip a lockless/template-less
43
+ * kind takes.
44
+ */
45
+ templates?: Array<string>;
46
+ /**
47
+ * The declared content: absent for a `file`-content kind (the default the whole
48
+ * built-in set takes, so those rows stay byte-identical), a [`LayoutRow`] for a
49
+ * kind whose body is a declared layout over its heading tree.
50
+ */
51
+ content?: LayoutRow;
52
+ /**
53
+ * The **fields-only** body-shape marker — `fields` for a no-body-slot kind (a hook,
54
+ * an MCP server); absent for a body-bearing kind, whose body is `file` or a `content`
55
+ * layout. The tolerant `#[serde(default)]` round-trip the rest of the optional facts
56
+ * take, so a body-bearing kind's row stays byte-identical.
57
+ */
58
+ shape?: string;
59
+ /**
60
+ * The declared **collection address** — for a registration member surfacing inside a
61
+ * host manifest, which manifest and which key path it keys at. Absent for a
62
+ * file-locus kind, so an ordinary row stays byte-identical.
63
+ */
64
+ collection_address?: CollectionAddressRow;
65
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * One [`LayoutRow`] region — one of the three corpus primitives, flattened to a
3
+ * discriminator plus each primitive's own optional columns (the same discriminator +
4
+ * optional-columns shape [`AssemblyFactRow`] takes). `prose` carries an optional
5
+ * `import`; `field` a `slot`; `collection` a `member_kind` and an optional `key`.
6
+ */
7
+ export type LayoutRegionRow = {
8
+ /**
9
+ * The primitive discriminator: `prose`, `field`, or `collection`.
10
+ */
11
+ region: string;
12
+ /**
13
+ * A `prose` region's import reference, when it imports a file's contents rather
14
+ * than carrying its own verbatim words.
15
+ */
16
+ import?: string;
17
+ /**
18
+ * A `field` region's named field slot.
19
+ */
20
+ slot?: string;
21
+ /**
22
+ * A `collection` region's child member kind.
23
+ */
24
+ member_kind?: string;
25
+ /**
26
+ * A `collection` region's explicit identity key, when declared.
27
+ */
28
+ key?: string;
29
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { LayoutRegionRow } from "./LayoutRegionRow.js";
2
+ /**
3
+ * A kind's declared **layout** — the ordered region rows a `layout`-content kind's body
4
+ * is read as. Absent from a [`KindFactRow`] means the kind is `file`-content; a present
5
+ * (even empty) layout means the body is a declared template.
6
+ */
7
+ export type LayoutRow = {
8
+ /**
9
+ * The layout's regions, in declared document order.
10
+ */
11
+ regions: Array<LayoutRegionRow>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * One authored `n` mention edge's declaration row — the citing member's own
3
+ * `kind:name` address and the address its mention names (another member's
4
+ * `kind:name`, or a bare requirement name), already resolved at emit. Recorded
5
+ * unconditionally: a dangling mention never reaches the lock (`emit` refuses
6
+ * first), so this row carries no resolution state of its own.
7
+ */
8
+ export type MentionRow = {
9
+ /**
10
+ * The citing member's own `kind:name` address.
11
+ */
12
+ member: string;
13
+ /**
14
+ * The address the mention names.
15
+ */
16
+ target: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,39 @@
1
+ import type { CollectionEntryWire } from "./CollectionEntryWire.js";
2
+ /**
3
+ * One host member's declared embedded-member value's declaration row — its
4
+ * identity (the host's own `kind:name` address, the embedded child kind, and its
5
+ * key) plus its leaves and sibling collections: the same composed value
6
+ * `blocks()` renders into the host's `member.<kind> <key>` fence. The sole fact
7
+ * source the read side consumes (`crate::builtin_kind::features`, matched by
8
+ * `host` address) — never a second copy of a value the engine reads back off its
9
+ * own rendering (0018, "the projection is not the database").
10
+ */
11
+ export type NestedMemberRow = {
12
+ /**
13
+ * The host member's own `kind:name` address.
14
+ */
15
+ host: string;
16
+ /**
17
+ * The embedded child kind this value instantiates.
18
+ */
19
+ kind: string;
20
+ /**
21
+ * The value's key — the identity a leaf address carries.
22
+ */
23
+ key: string;
24
+ /**
25
+ * Prose leaves, keyed by field name.
26
+ */
27
+ leaves: {
28
+ [key in string]: string;
29
+ };
30
+ /**
31
+ * Sibling collections, one row per entry, in authored order — the SDK's
32
+ * collection-name-keyed wire shape flattened by [`deserialize_collections`].
33
+ * The Rust side flattens the map to a `Vec`; the seam type carries the wire
34
+ * shape the flatten reads, a map of collection name to its ordered entries.
35
+ */
36
+ collections: {
37
+ [key in string]: Array<CollectionEntryWire>;
38
+ };
39
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { Declarations } from "./Declarations.js";
2
+ import type { PayloadMember } from "./PayloadMember.js";
3
+ /**
4
+ * The whole seam payload the SDK program prints to stdout:
5
+ * the
6
+ * declaration rows (the lock's seven families) and every projected member's erased
7
+ * payload. The engine is the sole compiler of every projection and the whole lock
8
+ * from this one value — no harness re-supply, the payload IS the source.
9
+ *
10
+ * Not `Eq`: its declarations may carry `f64` `range` bounds ([`RangeBoundRow`]).
11
+ */
12
+ export type Payload = {
13
+ /**
14
+ * The pinned seam version this payload was compiled against.
15
+ */
16
+ version: number;
17
+ /**
18
+ * The seven declaration families.
19
+ */
20
+ declarations: Declarations;
21
+ /**
22
+ * Every projected member.
23
+ */
24
+ members: Array<PayloadMember>;
25
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * One projected member's erased payload — the SDK's whole output surface for a
3
+ * member that lives at a path locus (`sdk/src/generated/PayloadMember`). An
4
+ * embedded member never appears here (it carries no standalone projection); its
5
+ * facts ride the [`NestedMemberRow`] family instead.
6
+ */
7
+ export type PayloadMember = {
8
+ /**
9
+ * The kind's bare name — joins this payload's own `declarations.kinds` family.
10
+ */
11
+ kind: string;
12
+ /**
13
+ * Identity within the kind.
14
+ */
15
+ name: string;
16
+ /**
17
+ * The kind's typed fields, flat and ordered — the projected frontmatter. The
18
+ * value is arbitrary JSON, so the seam type is `unknown`, never a serde_json
19
+ * binding — the SDK reads the field values, never the engine over this pipe.
20
+ */
21
+ fields: Array<[string, unknown]>;
22
+ /**
23
+ * The resolved prose body, byte-faithful.
24
+ */
25
+ body: string;
26
+ /**
27
+ * The resolved `file()` asset's absolute path, when the member's prose is
28
+ * `file()` — absent for `text`/`blocks` prose or no prose.
29
+ */
30
+ source_path?: string;
31
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A `range` clause row's inclusive numeric bound — `f64` so one predicate spans both
3
+ * integer and fractional fields. Not `Eq`: `f64` is only `PartialEq`, which is why
4
+ * the whole clause-row family it rides is `PartialEq`-only.
5
+ */
6
+ export type RangeBoundRow = {
7
+ /**
8
+ * The inclusive lower bound.
9
+ */
10
+ min: number;
11
+ /**
12
+ * The inclusive upper bound.
13
+ */
14
+ max: number;
15
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};