@dtmd/temper 0.0.24 → 0.0.26

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 (70) hide show
  1. package/README.md +14 -12
  2. package/dist/src/assembly.d.ts +45 -11
  3. package/dist/src/assembly.js +116 -8
  4. package/dist/src/builtins.d.ts +436 -103
  5. package/dist/src/builtins.js +772 -167
  6. package/dist/src/claude-code.d.ts +6 -3
  7. package/dist/src/claude-code.js +2 -2
  8. package/dist/src/contract.d.ts +153 -44
  9. package/dist/src/contract.js +123 -34
  10. package/dist/src/counsel.d.ts +11 -0
  11. package/dist/src/counsel.js +68 -0
  12. package/dist/src/declarations.d.ts +108 -2
  13. package/dist/src/declarations.js +606 -100
  14. package/dist/src/dial.d.ts +3 -3
  15. package/dist/src/dial.js +21 -5
  16. package/dist/src/emit.d.ts +12 -14
  17. package/dist/src/emit.js +123 -47
  18. package/dist/src/generated/AbsenceGateRow.d.ts +16 -0
  19. package/dist/src/generated/AbsenceGateRow.js +2 -0
  20. package/dist/src/generated/AreaMode.d.ts +5 -0
  21. package/dist/src/generated/AreaMode.js +2 -0
  22. package/dist/src/generated/AreaRow.d.ts +20 -0
  23. package/dist/src/generated/AreaRow.js +1 -0
  24. package/dist/src/generated/AssemblyFactRow.d.ts +17 -4
  25. package/dist/src/generated/BoundRow.d.ts +9 -4
  26. package/dist/src/generated/CedeRow.d.ts +14 -0
  27. package/dist/src/generated/CedeRow.js +2 -0
  28. package/dist/src/generated/CharsetRow.d.ts +14 -3
  29. package/dist/src/generated/ClauseRow.d.ts +23 -21
  30. package/dist/src/generated/CollectionAddressRow.d.ts +1 -1
  31. package/dist/src/generated/Declarations.d.ts +24 -9
  32. package/dist/src/generated/FeatureValue.d.ts +3 -3
  33. package/dist/src/generated/Features.d.ts +3 -3
  34. package/dist/src/generated/KindFactRow.d.ts +41 -8
  35. package/dist/src/generated/Payload.d.ts +3 -5
  36. package/dist/src/generated/PayloadMember.d.ts +7 -0
  37. package/dist/src/generated/RunsRow.d.ts +17 -0
  38. package/dist/src/generated/RunsRow.js +2 -0
  39. package/dist/src/generated/Section.d.ts +2 -2
  40. package/dist/src/generated/SectionContainsRow.d.ts +1 -1
  41. package/dist/src/generated/TypecheckRow.d.ts +20 -0
  42. package/dist/src/generated/TypecheckRow.js +2 -0
  43. package/dist/src/generated/Verifier.d.ts +8 -2
  44. package/dist/src/generated/index.d.ts +6 -0
  45. package/dist/src/index.d.ts +20 -15
  46. package/dist/src/index.js +10 -9
  47. package/dist/src/kind.d.ts +382 -52
  48. package/dist/src/kind.js +461 -49
  49. package/dist/src/lockfile.d.ts +39 -0
  50. package/dist/src/lockfile.js +265 -0
  51. package/dist/src/member-address.d.ts +15 -3
  52. package/dist/src/member-address.js +23 -6
  53. package/dist/src/needs.d.ts +25 -15
  54. package/dist/src/needs.js +10 -11
  55. package/dist/src/patterns.d.ts +112 -0
  56. package/dist/src/patterns.js +90 -0
  57. package/dist/src/pipe.d.ts +16 -0
  58. package/dist/src/pipe.js +39 -0
  59. package/dist/src/playbook.d.ts +203 -0
  60. package/dist/src/playbook.js +239 -0
  61. package/dist/src/prose.d.ts +69 -12
  62. package/dist/src/prose.js +125 -13
  63. package/dist/src/reference.d.ts +70 -0
  64. package/dist/src/reference.js +368 -0
  65. package/package.json +13 -4
  66. package/schemas/agent.json +23 -0
  67. package/schemas/command.json +5 -0
  68. package/schemas/output-style.json +4 -0
  69. package/schemas/rule.json +33 -0
  70. package/schemas/skill.json +63 -0
@@ -6,18 +6,18 @@ import type { RangeBoundRow } from "./RangeBoundRow.js";
6
6
  import type { SectionContainsRow } from "./SectionContainsRow.js";
7
7
  /**
8
8
  * One clause of a kind's effective contract, reduced to the columns the lock records:
9
- * which kind it governs, the predicate's key, the field it targets (when it names one),
9
+ * which kind owns it, the predicate's key, the field it targets (when it names one),
10
10
  * its declared severity, its guidance and cite — the clause's four channels
11
11
  * —
12
12
  * and, per predicate, its own argument: the node-set/edge-scope predicates
13
13
  * carry
14
14
  * their bounds/target, and the node-scope predicates that need more than
15
- * `field`/`severity` (`min_len`/`max_len`/`extent`'s bound, `extent`'s unit,
16
- * `allowed_chars`'s charset, `forbidden_keys`'s keys, `deny`'s values, `type`'s declared
15
+ * `field`/`severity` (`min-len`/`max-len`/`extent`'s bound, `extent`'s unit,
16
+ * `allowed-chars`'s charset, `forbidden-keys`'s keys, `deny`'s values, `type`'s declared
17
17
  * kind) carry theirs too — so a kind's
18
18
  * own floor clause round-trips losslessly, not identity+severity alone.
19
19
  * `unique`'s field rides the shared `field`
20
- * column (the same slot `required`/`min_len`/… target); the rest carry their own
20
+ * column (the same slot `required`/`min-len`/… target); the rest carry their own
21
21
  * optional columns since a plain field/severity pair cannot express them.
22
22
  *
23
23
  * Not `Eq`: the `range` column carries `f64` bounds ([`RangeBoundRow`]), so the
@@ -36,7 +36,7 @@ export type ClauseRow = {
36
36
  * ([`emit`]), stamping every row as it composes the lock, so the seam has no label
37
37
  * to author and no way to author a wrong one.
38
38
  */
39
- label?: string;
39
+ id?: string;
40
40
  /**
41
41
  * The kind whose contract carries the clause. `None` has two homes, distinguished
42
42
  * by nesting rather than by a second column: inside a [`RequirementRow`]'s own
@@ -46,14 +46,14 @@ export type ClauseRow = {
46
46
  */
47
47
  kind?: string;
48
48
  /**
49
- * The predicate's clause key (`required`, `max_len`, …).
49
+ * The predicate's clause key (`required`, `max-len`, …).
50
50
  */
51
51
  predicate: string;
52
52
  /**
53
53
  * The clause's **compiled label** segment ([`crate::contract::clause_label`]) — the
54
54
  * field the predicate constrains where it names one, and otherwise the identity the
55
- * seam synthesizes from the arguments the row already carries (`section_contains`
56
- * and `require_sections` name no field, so `clauseField` in
55
+ * seam synthesizes from the arguments the row already carries (`section-contains`
56
+ * and `require-sections` name no field, so `clauseField` in
57
57
  * `sdk/src/declarations.ts` lowers a `<heading>.<marker>` / joined-sections segment
58
58
  * here instead). `None` where the predicate needs no segment to label uniquely. A
59
59
  * synthesized segment labels only: those two predicates are reconstructed from
@@ -92,7 +92,8 @@ export type ClauseRow = {
92
92
  degree?: DegreeBoundRow;
93
93
  /**
94
94
  * The **field set** a by-incidence clause filters its selection to — `degree`'s
95
- * bound and `reached-from`'s via set (`specs/decisions/0056-…`). Shared rather
95
+ * bound and `reached-from`'s via set (`specs/decisions/0056-…`) — and the fields a
96
+ * `listing` clause lists. Shared rather
96
97
  * than nested inside [`DegreeBoundRow`] because the filter is the *clause's*, not
97
98
  * either direction's, and the two consumers name one concept: a lock spelling it
98
99
  * twice would be the residue class.
@@ -102,11 +103,12 @@ export type ClauseRow = {
102
103
  */
103
104
  fields?: Array<string>;
104
105
  /**
105
- * The `mention-reachable` clause's **target-side gate field**, when the predicate
106
- * is `mention-reachable`. The one predicate taking two field arguments: its
106
+ * The **target-side gate field**, when the predicate is `mention-reachable` or
107
+ * its converse `trigger-agrees`. The two predicates taking two field arguments: the
107
108
  * source-side scope field rides the shared [`field`](ClauseRow::field) column, and
108
109
  * this column carries the other end — the field read off the *mentioned* member,
109
- * which `field` alone cannot express.
110
+ * which `field` alone cannot express. A `listing` clause's withholding field rides
111
+ * it too: the field that, set `true`, gates a member out of the listing.
110
112
  */
111
113
  gate?: string;
112
114
  /**
@@ -136,7 +138,7 @@ export type ClauseRow = {
136
138
  */
137
139
  shape?: string;
138
140
  /**
139
- * The `min_len`/`max_len`/`extent` clause's scalar bound, when the predicate
141
+ * The `min-len`/`max-len`/`extent` clause's scalar bound, when the predicate
140
142
  * is one of those three.
141
143
  */
142
144
  bound?: BoundRow;
@@ -148,13 +150,13 @@ export type ClauseRow = {
148
150
  */
149
151
  unit?: string;
150
152
  /**
151
- * The `allowed_chars` clause's declared character class, when the predicate is
152
- * `allowed_chars`.
153
+ * The `allowed-chars` clause's declared character class, when the predicate is
154
+ * `allowed-chars`.
153
155
  */
154
156
  charset?: CharsetRow;
155
157
  /**
156
- * The `forbidden_keys` clause's forbidden key list, when the predicate is
157
- * `forbidden_keys`.
158
+ * The `forbidden-keys` clause's forbidden key list, when the predicate is
159
+ * `forbidden-keys`.
158
160
  */
159
161
  keys?: Array<string>;
160
162
  /**
@@ -166,13 +168,13 @@ export type ClauseRow = {
166
168
  */
167
169
  range?: RangeBoundRow;
168
170
  /**
169
- * The `section_contains` clause's heading prefix and required marker, when the
170
- * predicate is `section_contains`.
171
+ * The `section-contains` clause's heading prefix and required marker, when the
172
+ * predicate is `section-contains`.
171
173
  */
172
174
  section?: SectionContainsRow;
173
175
  /**
174
- * The `require_sections` clause's required heading list, when the predicate is
175
- * `require_sections`.
176
+ * The `require-sections` clause's required heading list, when the predicate is
177
+ * `require-sections`.
176
178
  */
177
179
  sections?: Array<string>;
178
180
  /**
@@ -2,7 +2,7 @@
2
2
  * A kind's declared **collection address** row — the key path a registration member
3
3
  * keys at and the shape its entry takes: the presence-coupled pair
4
4
  * [`KindFactRow::collection_address`] carries. The manifest it keys inside is the row's
5
- * own starless `governs_glob`, never a second column here. Absent from a [`KindFactRow`]
5
+ * own starless `locus_glob`, never a second column here. Absent from a [`KindFactRow`]
6
6
  * means the kind owns its own file locus.
7
7
  */
8
8
  export type CollectionAddressRow = {
@@ -1,3 +1,4 @@
1
+ import type { AreaRow } from "./AreaRow.js";
1
2
  import type { AssemblyFactRow } from "./AssemblyFactRow.js";
2
3
  import type { ClauseRow } from "./ClauseRow.js";
3
4
  import type { IncludeRow } from "./IncludeRow.js";
@@ -7,21 +8,16 @@ import type { MentionRow } from "./MentionRow.js";
7
8
  import type { NestedMemberRow } from "./NestedMemberRow.js";
8
9
  import type { RegistrationRow } from "./RegistrationRow.js";
9
10
  import type { RequirementRow } from "./RequirementRow.js";
11
+ import type { RunsRow } from "./RunsRow.js";
10
12
  import type { SatisfiesRow } from "./SatisfiesRow.js";
11
13
  import type { SettingsRow } from "./SettingsRow.js";
14
+ import type { TypecheckRow } from "./TypecheckRow.js";
12
15
  /**
13
16
  * The lock's **declaration-row family** — the composed program's erased declarations,
14
- * beside the
15
- * per-member provenance and emit-fingerprint rows. Seven sub-families: the program's
16
- * [kind facts](KindFactRow), its [clauses](ClauseRow), its [requirements](RequirementRow),
17
- * its assembly facts, its
18
- * [`satisfies`](SatisfiesRow) fill edges, its [`mention`](MentionRow) edges, and its
19
- * [`nested_member`](NestedMemberRow) rows.
17
+ * beside the per-member provenance and emit-fingerprint rows, one sub-family per field.
20
18
  *
21
19
  * Written into the lock by [`emit`] off the SDK's own payload ([`Declarations::write_into`])
22
- * and read back here ([`read_declarations`]) for the gate's one disk-vs-lock comparison —
23
- * `import`'s own extraction still writes this family for the `check` path it feeds
24
- * (`GATE-READ-LOCK-DEMOLITION`, next in the chain, moves that read onto the lock too).
20
+ * and read back here ([`read_declarations`]) for the gate's one disk-vs-lock comparison.
25
21
  * Each family's columns are owned scalars (or small owned collections for a set-scope
26
22
  * facet) so the read and write sides are the same shape: the lock is the vocabulary,
27
23
  * not a typed IR. `#[derive(Deserialize)]` doubles this shape as the SDK payload's own
@@ -59,6 +55,13 @@ export type Declarations = {
59
55
  * edge locus.
60
56
  */
61
57
  mentions: Array<MentionRow>;
58
+ /**
59
+ * The runner→tool edges — each member that runs a `tool` naming it, declared on the
60
+ * lock because the runner's projection (a settings handler entry) carries no key the
61
+ * edge could ride. `check` folds each onto its runner's [`RUNS_FIELD`], where the
62
+ * runner kind's `edge` fact resolves it like any other declared edge.
63
+ */
64
+ runs: Array<RunsRow>;
62
65
  /**
63
66
  * The composed-prose includes — a seam-inbound family only: `emit` resolves each
64
67
  * against disk, splices the target's bytes into the host's projection, and lowers
@@ -81,6 +84,13 @@ export type Declarations = {
81
84
  * so a lock round-trip reads this family empty.
82
85
  */
83
86
  modules: Array<string>;
87
+ /**
88
+ * The program's declared typecheck ([`TypecheckRow`]). Off the payload its project is
89
+ * the SDK-resolved absolute path; `emit` writes it into the lock as the single
90
+ * `[declaration.typecheck]` row with the project harness-relative, and the next
91
+ * `emit_program` runs that locked row before it runs the program at all.
92
+ */
93
+ typecheck: TypecheckRow | null;
84
94
  /**
85
95
  * The host members' declared embedded-member facts — captured as declaration
86
96
  * rows rather than a second copy the engine reads back off the rendered fence
@@ -102,4 +112,9 @@ export type Declarations = {
102
112
  * written into this declaration table, so a lock round-trip reads none.
103
113
  */
104
114
  settings: Array<SettingsRow>;
115
+ /**
116
+ * The playbook areas a guard attachment binds — what `temper guard` reads an edit's
117
+ * path against, recorded on the lock so the guard needs no program to run.
118
+ */
119
+ areas: Array<AreaRow>;
105
120
  };
@@ -2,9 +2,9 @@ import type { ValueType } from "./ValueType.js";
2
2
  /**
3
3
  * One extracted feature value: a scalar field (carrying its parsed source
4
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 reads
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 reads
8
8
  * [`FeatureValue::kind`].
9
9
  */
10
10
  export type FeatureValue = {
@@ -13,7 +13,7 @@ export type Features = {
13
13
  /**
14
14
  * Frontmatter fields by name — the typed fields *and* the `extra` keys, so
15
15
  * a clause resolves `name`/`description`/`version` or any unknown key
16
- * (e.g. for `forbidden_keys`) through one generic lookup.
16
+ * (e.g. for `forbidden-keys`) through one generic lookup.
17
17
  *
18
18
  * Each value is retained **as parsed**, never flattened: a clause addresses a field
19
19
  * by a path that may step into an object or grain over an array's elements
@@ -56,13 +56,13 @@ export type Features = {
56
56
  rendered_chars: number | null;
57
57
  /**
58
58
  * The ATX headings (`#`..`######`) in the body, in document order, with the
59
- * `#` run and any closing `#` run trimmed (for `require_sections`). A `#`
59
+ * `#` run and any closing `#` run trimmed (for `require-sections`). A `#`
60
60
  * inside a fenced code block is not a heading.
61
61
  */
62
62
  headings: Array<string>;
63
63
  /**
64
64
  * The body's ATX [`Section`]s (heading + the body span beneath it), in
65
- * document order — the feature a `section_contains` clause decides over.
65
+ * document order — the feature a `section-contains` clause decides over.
66
66
  * A
67
67
  * superset of [`headings`](Features::headings): where `headings` carries only
68
68
  * each heading's text, a section pairs it with its body span so a marker check
@@ -1,3 +1,5 @@
1
+ import type { AbsenceGateRow } from "./AbsenceGateRow.js";
2
+ import type { CedeRow } from "./CedeRow.js";
1
3
  import type { CollectionAddressRow } from "./CollectionAddressRow.js";
2
4
  import type { LayoutRow } from "./LayoutRow.js";
3
5
  import type { TemplateRow } from "./TemplateRow.js";
@@ -16,17 +18,26 @@ export type KindFactRow = {
16
18
  */
17
19
  provider?: string;
18
20
  /**
19
- * The `governs` locus root directory. Absent together with
20
- * [`governs_glob`](KindFactRow::governs_glob) for a **nested file** kind: its members'
21
+ * The **base** kind's bare name, for a subkind: it keeps the base's facts and governs
22
+ * a locus within the base's, whose documents there are its members alone. Absent for
23
+ * every other kind — a relocation keeps its base's name, so it names none.
24
+ */
25
+ base?: string;
26
+ /**
27
+ * The `at` locus root directory. Absent together with
28
+ * [`locus_glob`](KindFactRow::locus_glob) for a **nested file** kind: its members'
21
29
  * paths compose from their host's unit and the host template's pattern, so it governs
22
30
  * no glob of its own and two kinds still never share one.
23
31
  */
24
- governs_root?: string;
32
+ locus_root?: string;
25
33
  /**
26
- * The `governs` locus filename glob, absent for a nested file kind (see
27
- * [`governs_root`](KindFactRow::governs_root)).
34
+ * The `at` locus **templates** under [`locus_root`](KindFactRow::locus_root) —
35
+ * one or more, a document at any of them governed by the kind; empty for a nested
36
+ * file kind (see [`locus_root`](KindFactRow::locus_root)). Written as an array;
37
+ * a bare string reads as the one template it means, the spelling a lock written
38
+ * before a locus took several carries.
28
39
  */
29
- governs_glob?: string;
40
+ locus_glob?: Array<string>;
30
41
  /**
31
42
  * The file locus's declared **commitment class** label — `local` for a per-machine,
32
43
  * uncommitted locus: the kind is declared and reviewed, its members' documents are
@@ -46,6 +57,19 @@ export type KindFactRow = {
46
57
  * [`registration`](KindFactRow::registration) takes.
47
58
  */
48
59
  exclude?: Array<string>;
60
+ /**
61
+ * The file locus's **absence gates** — each names one of the row's templates and the
62
+ * documents whose presence, in a governed document's own directory or any directory
63
+ * above it, closes that document's channels. Empty for a locus gating nothing, so
64
+ * an ordinary row stays byte-identical.
65
+ */
66
+ absence_gate?: Array<AbsenceGateRow>;
67
+ /**
68
+ * The source malformations the kind's reader forgives, as wire labels
69
+ * (`malformed-yaml`). Empty for a kind forgiving none, the tolerant round-trip
70
+ * [`registration`](KindFactRow::registration) takes.
71
+ */
72
+ leniency?: Array<string>;
49
73
  /**
50
74
  * The declared projection format label, when declared.
51
75
  */
@@ -99,12 +123,21 @@ export type KindFactRow = {
99
123
  */
100
124
  collection_address?: CollectionAddressRow;
101
125
  /**
102
- * Advisory authoring counsel for the kind as a whole — teaching at authoring time via
103
- * `schema` hover or `explain`, carrying no predicate or severity (decision 0045).
126
+ * Advisory authoring counsel for the kind as a whole, carrying no predicate or
127
+ * severity; it rides the kind's guidance rule over its locus.
104
128
  */
105
129
  guidance?: string;
106
130
  /**
107
131
  * External-fact source backing the guidance — a doc URL plus retrieved date.
108
132
  */
109
133
  cite?: string;
134
+ /**
135
+ * The **claim resolutions** this kind's locus cedes — each overlap where a more
136
+ * specific claim holds the document: a subkind's locus, a directory host's unit
137
+ * subtree its any-depth reach enters. Engine-derived at emit from the whole kind set
138
+ * ([`compose::resolved_kind_rows`]) and recorded here so placement reads the answer
139
+ * rather than re-deriving it; a row the program supplies is overwritten. Empty for a
140
+ * kind ceding nothing, so its row stays byte-identical.
141
+ */
142
+ ceded?: Array<CedeRow>;
110
143
  };
@@ -1,10 +1,8 @@
1
1
  import type { Declarations } from "./Declarations.js";
2
2
  import type { PayloadMember } from "./PayloadMember.js";
3
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
4
+ * The whole seam payload the SDK pipe prints to stdout: the declaration rows and
5
+ * every projected member's erased payload. The engine is the sole compiler of every projection and the whole lock
8
6
  * from this one value — no harness re-supply, the payload IS the source.
9
7
  *
10
8
  * Not `Eq`: its declarations may carry `f64` `range` bounds ([`RangeBoundRow`]).
@@ -15,7 +13,7 @@ export type Payload = {
15
13
  */
16
14
  version: number;
17
15
  /**
18
- * The seven declaration families.
16
+ * The program's declaration rows.
19
17
  */
20
18
  declarations: Declarations;
21
19
  /**
@@ -25,6 +25,13 @@ export type PayloadMember = {
25
25
  * (`specs/model/representation.md`, "nesting").
26
26
  */
27
27
  host?: string;
28
+ /**
29
+ * Where the member's file sits, relative to its locus root — the kind's `locus`
30
+ * root, or its host's unit for a nested file child. Declared where no template can
31
+ * place the name whole (a `:`-prefixed identity such as `apps:web:CLAUDE`); absent,
32
+ * the name is placed whole through the first template that can.
33
+ */
34
+ location?: string;
28
35
  /**
29
36
  * The kind's typed fields, flat and ordered — the projected frontmatter. The
30
37
  * value is arbitrary JSON, so the seam type is `unknown`, never a serde_json
@@ -0,0 +1,17 @@
1
+ /**
2
+ * One **runner→tool** edge's declaration row — the running member's own address (a hook
3
+ * handler's `<hook-address>/handler/<position>`) and the address of the `tool` it runs
4
+ * (`root/tool/<name>`). Declared, never mined: the runner's command string is the
5
+ * harness's to parse, not temper's (intent invariant 1), so the program states which
6
+ * tool a command runs and the row carries that statement onto the lock.
7
+ */
8
+ export type RunsRow = {
9
+ /**
10
+ * The running member's own address.
11
+ */
12
+ member: string;
13
+ /**
14
+ * The address of the tool it runs.
15
+ */
16
+ tool: 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 {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * One ATX **section** of a markdown body: a heading paired with the body span
3
3
  * beneath it, up to the next heading of the same or a shallower level. The
4
- * feature a `section_contains` clause decides over — its [`heading`](Section::heading) is
4
+ * feature a `section-contains` clause decides over — its [`heading`](Section::heading) is
5
5
  * matched by the clause's declared prefix, its [`body`](Section::body) searched
6
6
  * for the declared marker. Surface-decidable like every other feature: a heading
7
7
  * inside a fenced code block opens no section (the same exclusion
@@ -15,7 +15,7 @@ export type Section = {
15
15
  heading: string;
16
16
  /**
17
17
  * The body span beneath the heading — the intervening lines rejoined with
18
- * `\n`, the text a `section_contains` marker check searches.
18
+ * `\n`, the text a `section-contains` marker check searches.
19
19
  */
20
20
  body: string;
21
21
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A `section_contains` clause row's arguments — the heading-text prefix selecting the
2
+ * A `section-contains` clause row's arguments — the heading-text prefix selecting the
3
3
  * governed sections and the marker every governed section's body must carry.
4
4
  */
5
5
  export type SectionContainsRow = {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The program's declared **typecheck** — the `tool` that runs its compiler and the
3
+ * project file the compiler checks. `emit` lowers the project to a root-owned `input`
4
+ * source dependency and records the row itself in the lock, the project spelled
5
+ * harness-relative; `emit_program` runs the locked row before running the program (so
6
+ * a program too broken to run still receives the compiler's diagnostics), and the
7
+ * payload's own row right after the run only when the lock records none. Declared,
8
+ * never guessed: the compiler is the consumer's own toolchain, run through the tool the
9
+ * program names.
10
+ */
11
+ export type TypecheckRow = {
12
+ /**
13
+ * The address of the tool that runs the compiler (`root/tool/<name>`).
14
+ */
15
+ tool: string;
16
+ /**
17
+ * The project file's SDK-resolved absolute path.
18
+ */
19
+ project: string;
20
+ };
@@ -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 {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A requirement's **typed verifier** — the declared delegate that judges the
3
- * behavioral remainder, resolved at admissibility and never run. Two species this
4
- * slice; a probe stays a documented pattern until a consumer types its transcript
3
+ * behavioral remainder, resolved at admissibility and never run. Three species; a
4
+ * probe stays a documented pattern until a consumer types its transcript
5
5
  * surface. One shared shape: [`crate::drift::RequirementRow`] carries it on the
6
6
  * wire and [`crate::roster`] resolves over it.
7
7
  */
@@ -17,4 +17,10 @@ export type Verifier = {
17
17
  * The harness lifecycle event names this verifier reads the tap for.
18
18
  */
19
19
  events: Array<string>;
20
+ } | {
21
+ "species": "review";
22
+ /**
23
+ * Who reviews, and at what point — the authored statement of the judge.
24
+ */
25
+ prose: string;
20
26
  };
@@ -1,5 +1,9 @@
1
+ export type { AbsenceGateRow } from "./AbsenceGateRow.js";
2
+ export type { AreaMode } from "./AreaMode.js";
3
+ export type { AreaRow } from "./AreaRow.js";
1
4
  export type { AssemblyFactRow } from "./AssemblyFactRow.js";
2
5
  export type { BoundRow } from "./BoundRow.js";
6
+ export type { CedeRow } from "./CedeRow.js";
3
7
  export type { CharsetRow } from "./CharsetRow.js";
4
8
  export type { ClauseRow } from "./ClauseRow.js";
5
9
  export type { CollectionAddressRow } from "./CollectionAddressRow.js";
@@ -26,12 +30,14 @@ export type { PayloadMember } from "./PayloadMember.js";
26
30
  export type { RangeBoundRow } from "./RangeBoundRow.js";
27
31
  export type { RegistrationRow } from "./RegistrationRow.js";
28
32
  export type { RequirementRow } from "./RequirementRow.js";
33
+ export type { RunsRow } from "./RunsRow.js";
29
34
  export type { SatisfiesRow } from "./SatisfiesRow.js";
30
35
  export type { Section } from "./Section.js";
31
36
  export type { SectionContainsRow } from "./SectionContainsRow.js";
32
37
  export type { SettingsRow } from "./SettingsRow.js";
33
38
  export type { Shape } from "./Shape.js";
34
39
  export type { TemplateRow } from "./TemplateRow.js";
40
+ export type { TypecheckRow } from "./TypecheckRow.js";
35
41
  export type { ValueType } from "./ValueType.js";
36
42
  export type { Verifier } from "./Verifier.js";
37
43
  export { TAP_EVENT_HOOKS } from "./tap-hooks.js";
@@ -1,29 +1,34 @@
1
1
  /**
2
- * temper's authoring face — the six-noun core as a typed module library.
2
+ * temper's authoring face as a typed module library.
3
3
  * A harness author imports plain nouns — `harness()`, the generic `kind`
4
- * constructor, the clause and requirement constructors, `needs`, and the four
5
- * prose constructors — and composes members as typed values. `emit` compiles the
6
- * whole into the declaration rows and the projected members' erased payload —
7
- * the JSON pipe printed to stdout; the engine is the sole compiler of every
8
- * projection and the whole lock.
4
+ * constructor, the clause and requirement constructors, `needs`, and the prose
5
+ * constructors — and composes members as typed values, exporting the composed
6
+ * harness as its module's default. The engine reads that export through the
7
+ * `./pipe` subpath — never the author's to call — and is the sole compiler of
8
+ * every projection and the whole lock.
9
9
  * Every type erases at the seam, and Turing-completeness
10
10
  * stays quarantined at authoring time.
11
11
  *
12
12
  * The first-party Claude Code provider face — the built-in kinds — lives at
13
13
  * the `./claude-code` subpath, never here.
14
14
  */
15
- export type { Blocks, File, Include, Mention, Mentionable, Prose, Reference, Text } from "./prose.js";
15
+ export type { Blocks, File, Include, Mention, Mentionable, MentionForm, MentionOptions, Prose, Reference, Text } from "./prose.js";
16
16
  export { blocks, file, include, mentionOf, renderText, span, text } from "./prose.js";
17
- export type { Capability } from "./needs.js";
17
+ export type { Capability, PermissionList, PermissionLists } from "./needs.js";
18
18
  export { bash, capability, permissionUnion } from "./needs.js";
19
- export type { Charset, Clause, ExtentUnit, Predicate, Requirement, Severity, Verifier } from "./contract.js";
20
- export { allowedChars, clause, closedKeys, count, degree, deny, engineMatches, enumOf, extent, forbiddenKeys, formatPlacesEdges, fresh, globValid, locusDeclared, maxLen, membership, mentionReachable, minLen, mustDefine, nameMatchesDir, optional, range, reachable, reachedFrom, required, requireSections, requirement, script, sectionContains, shape, telemetry, type, unique, uniqueName, when, } from "./contract.js";
21
- export type { CollectionAddress, EdgeField, EdgeTargetFacts, EmbeddedMemberCollectionEntry, EmbeddedMemberValue, Format, Input, KindDefinition, KindFacts, KindOptions, KindRelocation, Layout, LayoutRegion, LeafSet, Locus, Member, MemberInit, Registration, Residue, ResolvedEmbeddedMemberCollectionEntry, ResolvedEmbeddedMemberValue, Shape, Template, UnitShape, } from "./kind.js";
22
- export { embeddedMemberValue, kind, relocate } from "./kind.js";
19
+ export type { Charset, Clause, ExtentUnit, LoadMoment, Predicate, Requirement, RequirementValue, ScriptInit, Severity, TelemetryInit, Verifier } from "./contract.js";
20
+ export { allowedChars, clause, closedKeys, count, degree, deny, engineMatches, enumOf, extent, forbiddenKeys, formatPlacesEdges, fresh, globValid, importBacked, listing, loads, locusDeclared, maxLen, membership, mentionReachable, minLen, mustDefine, nameMatchesDir, optional, range, reachable, reachedFrom, required, requireSections, resolves, review, script, sectionContains, shape, telemetry, triggerAgrees, type, unique, uniqueName, unshadowed, when, } from "./contract.js";
21
+ import type { Remedy } from "./kind.js";
22
+ export declare const maxLines: Remedy<"maxLines is retired: write `extent('lines', n)`">;
23
+ export type { CollectionAddress, EdgeField, EdgeTargetFacts, EmbeddedMemberCollectionEntry, EmbeddedMemberValue, FieldGuidance, Format, Leniency, Input, KindDefinition, KindFacts, KindOptions, BodyPlacement, KeepsBaseSurface, KindExtension, KindRelocation, Layout, LayoutRegion, LeafSet, Locus, Member, MemberInit, Registration, Remedy, GatedTemplate, Templates, Residue, ResolvedEmbeddedMemberCollectionEntry, ResolvedEmbeddedMemberValue, Shape, Template, UnitShape, } from "./kind.js";
24
+ export { embeddedMemberValue, extend, kind, relocate } from "./kind.js";
23
25
  export { input } from "./kind.js";
24
- export type { Admission, EnforcementMode, ExpectBinding, Harness } from "./assembly.js";
26
+ export type { Admission, EnforcementMode, ExpectBinding, Harness, Typecheck } from "./assembly.js";
25
27
  export { harness, rootDefaultContract } from "./assembly.js";
26
- export type { EdgeTarget, EmbeddedTarget, EmitResult, RegistrationFact, ResolveOptions, SettingsResidue, } from "./emit.js";
27
- export { emit } from "./emit.js";
28
+ export type { EdgeTarget, EmbeddedTarget, ResolveOptions } from "./emit.js";
29
+ export type { ReferenceInit } from "./reference.js";
30
+ export { reference } from "./reference.js";
28
31
  export type { Dial, DialEntry } from "./dial.js";
29
32
  export { dial, dialDefaultContract } from "./dial.js";
33
+ export type { RequirementFields, RequirementInit, Tool, ToolFields, ToolInit } from "./builtins.js";
34
+ export { requirement, requirementDefaultContract, tool, toolDefaultContract } from "./builtins.js";
package/dist/src/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * temper's authoring face — the six-noun core as a typed module library.
2
+ * temper's authoring face as a typed module library.
3
3
  * A harness author imports plain nouns — `harness()`, the generic `kind`
4
- * constructor, the clause and requirement constructors, `needs`, and the four
5
- * prose constructors — and composes members as typed values. `emit` compiles the
6
- * whole into the declaration rows and the projected members' erased payload —
7
- * the JSON pipe printed to stdout; the engine is the sole compiler of every
8
- * projection and the whole lock.
4
+ * constructor, the clause and requirement constructors, `needs`, and the prose
5
+ * constructors — and composes members as typed values, exporting the composed
6
+ * harness as its module's default. The engine reads that export through the
7
+ * `./pipe` subpath — never the author's to call — and is the sole compiler of
8
+ * every projection and the whole lock.
9
9
  * Every type erases at the seam, and Turing-completeness
10
10
  * stays quarantined at authoring time.
11
11
  *
@@ -14,12 +14,13 @@
14
14
  */
15
15
  export { blocks, file, include, mentionOf, renderText, span, text } from "./prose.js";
16
16
  export { bash, capability, permissionUnion } from "./needs.js";
17
- export { allowedChars, clause, closedKeys, count, degree, deny, engineMatches, enumOf, extent, forbiddenKeys, formatPlacesEdges, fresh, globValid, locusDeclared, maxLen, membership, mentionReachable, minLen, mustDefine, nameMatchesDir, optional, range, reachable, reachedFrom, required, requireSections, requirement, script, sectionContains, shape, telemetry, type, unique, uniqueName, when, } from "./contract.js";
18
- export { embeddedMemberValue, kind, relocate } from "./kind.js";
17
+ export { allowedChars, clause, closedKeys, count, degree, deny, engineMatches, enumOf, extent, forbiddenKeys, formatPlacesEdges, fresh, globValid, importBacked, listing, loads, locusDeclared, maxLen, membership, mentionReachable, minLen, mustDefine, nameMatchesDir, optional, range, reachable, reachedFrom, required, requireSections, resolves, review, script, sectionContains, shape, telemetry, triggerAgrees, type, unique, uniqueName, unshadowed, when, } from "./contract.js";
18
+ export { embeddedMemberValue, extend, kind, relocate } from "./kind.js";
19
19
  // Inputs — the files a member's claims rest on, fingerprinted by the lock and moved
20
20
  // nowhere. A member-grain declaration, not a word in a body, so it rides here rather
21
21
  // than on the prose line.
22
22
  export { input } from "./kind.js";
23
23
  export { harness, rootDefaultContract } from "./assembly.js";
24
- export { emit } from "./emit.js";
24
+ export { reference } from "./reference.js";
25
25
  export { dial, dialDefaultContract } from "./dial.js";
26
+ export { requirement, requirementDefaultContract, tool, toolDefaultContract } from "./builtins.js";