@okfit/core 0.13.5 → 0.15.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/index.d.ts CHANGED
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { Brand, DateTime, Duration, Effect, FileSystem, Graph as Graph$1, Option, Path, Schema } from "effect";
7
- import { MarkdownDocument } from "@effected/markdown";
6
+ import { Brand, DateTime, Duration, Effect, FileSystem, Graph as Graph$1, Option, Path, Result, Schema } from "effect";
7
+ import { MarkdownDocument, MarkdownParseError } from "@effected/markdown";
8
8
  import { ConfigReadError } from "@effected/config-file";
9
9
  import { HostedSchema } from "@effected/schemastore";
10
10
  /**
11
- * An OKF actor string: `<producer>/<version>`, `human:<id>`, `process:<id>`,
12
- * or any other `<prefix>:<id>` (the spec's `team:` examples).
11
+ * An OKF actor string: `<producer>/<version>`, `human:<id>`, `team:<id>`,
12
+ * `process:<id>`, or any other `<prefix>:<id>`.
13
13
  * @public
14
14
  */
15
15
  export type Actor = string & Brand.Brand<"Actor">;
@@ -17,7 +17,7 @@ export type Actor = string & Brand.Brand<"Actor">;
17
17
  * Prefix classification; `other` drives lint `actor-prefix-unknown` (D-18).
18
18
  * @public
19
19
  */
20
- type ActorForm = "producer" | "human" | "process" | "other";
20
+ type ActorForm = "producer" | "human" | "team" | "process" | "other";
21
21
  /**
22
22
  * Branded, pattern-checked actor codec with prefix classification statics.
23
23
  * @public
@@ -55,8 +55,8 @@ declare const ComputationParameter_base: Schema.Class<ComputationParameter, Sche
55
55
  */
56
56
  export declare class ComputationParameter extends ComputationParameter_base {}
57
57
  declare const ComputationExecutor_base: Schema.Class<ComputationExecutor, Schema.Struct<{
58
- readonly resource: Schema.String;
59
- readonly receipt: Schema.$Array<Schema.String>;
58
+ readonly resource: Schema.optionalKey<Schema.String>;
59
+ readonly receipt: Schema.optionalKey<Schema.$Array<Schema.String>>;
60
60
  }>, {}>;
61
61
  /**
62
62
  * The skill that runs the computation and the receipt fields it must return.
@@ -64,7 +64,7 @@ declare const ComputationExecutor_base: Schema.Class<ComputationExecutor, Schema
64
64
  */
65
65
  export declare class ComputationExecutor extends ComputationExecutor_base {}
66
66
  declare const ComputationAttester_base: Schema.Class<ComputationAttester, Schema.Struct<{
67
- readonly resource: Schema.String;
67
+ readonly resource: Schema.optionalKey<Schema.String>;
68
68
  }>, {}>;
69
69
  /**
70
70
  * The deterministic attester that checks an executor's receipt.
@@ -96,7 +96,7 @@ declare const Generated_base: Schema.Class<Generated, Schema.Struct<{
96
96
  /**
97
97
  * Legacy (pre-integrity) body digest, read only as a migration fallback and never
98
98
  * written. Lenient on purpose: a malformed legacy value must never fail the
99
- * `generated` family and drop `by`/`at`. `okfit sync` moves it to `integrity.generated.body`.
99
+ * `generated` family and drop `by`/`at`. `okfit sync` moves it to `x-okfit-integrity.generated.body`.
100
100
  */
101
101
  readonly body_sha256: Schema.optionalKey<Schema.String>;
102
102
  }>, {}>;
@@ -120,6 +120,17 @@ export declare const Digest: Schema.String;
120
120
  * @public
121
121
  */
122
122
  export type Digest = typeof Digest.Type;
123
+ /**
124
+ * The prefix of every frontmatter key okfit owns (OKF v0.3 section 4.1 extension keys).
125
+ * @public
126
+ */
127
+ export declare const OKFIT_KEY_PREFIX = "x-okfit-";
128
+ /**
129
+ * The top-level frontmatter key that holds okfit's {@link Integrity} family.
130
+ * Every reader and writer of that key goes through this constant.
131
+ * @public
132
+ */
133
+ export declare const INTEGRITY_KEY: "x-okfit-integrity";
123
134
  declare const IntegrityGenerated_base: Schema.Class<IntegrityGenerated, Schema.Struct<{
124
135
  readonly body: Schema.String;
125
136
  }>, {}>;
@@ -150,14 +161,14 @@ declare const Integrity_base: Schema.Class<Integrity, Schema.Struct<{
150
161
  }>, {}>;
151
162
  /**
152
163
  * okfit's own top-level frontmatter family, the only place okfit stores digests
153
- * (OKF v0.2 section 4.1 extension key). Spec families such as `generated` and
164
+ * (OKF v0.3 section 4.1 extension key). Spec families such as `generated` and
154
165
  * `verified` stay exactly as the spec defines them.
155
166
  * @public
156
167
  */
157
168
  export declare class Integrity extends Integrity_base {}
158
169
  declare const UsageWindow_base: Schema.Class<UsageWindow, Schema.Struct<{
159
- readonly from: Schema.Codec<import("effect/DateTime").Utc, string, never, never>;
160
- readonly to: Schema.Codec<import("effect/DateTime").Utc, string, never, never>;
170
+ readonly from: Schema.optionalKey<Schema.Codec<import("effect/DateTime").Utc, string, never, never>>;
171
+ readonly to: Schema.optionalKey<Schema.Codec<import("effect/DateTime").Utc, string, never, never>>;
161
172
  }>, {}>;
162
173
  /**
163
174
  * A closed interval of use, on a concept or on one of its sources.
@@ -214,6 +225,26 @@ export declare class Verification extends Verification_base {
214
225
  * @public
215
226
  */
216
227
  export declare const ATTESTED_COMPUTATION_TYPE: "Attested Computation";
228
+ declare const EntryPaths_base: Schema.Class<EntryPaths, Schema.Struct<{
229
+ readonly tags: Schema.optionalKey<Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>>;
230
+ readonly sources: Schema.optionalKey<Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>>;
231
+ readonly verified: Schema.optionalKey<Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>>;
232
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>>;
233
+ }>, {}>;
234
+ /**
235
+ * The YAML path of each kept entry of the four list families, in kept order. Tolerant
236
+ * reading drops an unreadable entry, so a kept entry's decoded index is not its YAML
237
+ * index; every range or edit path computed from a list family comes from here, through
238
+ * `Concept.entryPath`. A single item (a bare mapping) records `["sources"]`.
239
+ *
240
+ * @public
241
+ */
242
+ export declare class EntryPaths extends EntryPaths_base {}
243
+ /**
244
+ * A list family whose kept entries carry a recorded YAML path.
245
+ * @public
246
+ */
247
+ type EntryFamily = "tags" | "sources" | "verified" | "parameters";
217
248
  declare const Concept_base: Schema.Class<Concept, Schema.Struct<{
218
249
  readonly type: Schema.String;
219
250
  readonly title: Schema.optionalKey<Schema.String>;
@@ -226,8 +257,10 @@ declare const Concept_base: Schema.Class<Concept, Schema.Struct<{
226
257
  readonly verified: Schema.optionalKey<Schema.decodeTo<Schema.$Array<Schema.toType<typeof Verification>>, Schema.Union<readonly [typeof Verification, Schema.$Array<typeof Verification>]>, never, never>>;
227
258
  readonly status: Schema.optionalKey<Schema.Literals<readonly ["draft", "stable", "deprecated"]>>;
228
259
  readonly stale_after: Schema.optionalKey<Schema.Codec<import("effect/DateTime").Utc, string, never, never>>;
260
+ readonly superseded_by: Schema.optionalKey<Schema.String>;
229
261
  readonly integrity: Schema.optionalKey<typeof Integrity>;
230
262
  readonly attested: Schema.optionalKey<typeof AttestedComputation>;
263
+ readonly entries: Schema.optionalKey<typeof EntryPaths>;
231
264
  readonly extensions: Schema.$Record<Schema.String, Schema.Unknown>;
232
265
  readonly raw: Schema.$Record<Schema.String, Schema.Unknown>;
233
266
  }>, {}>;
@@ -242,7 +275,14 @@ declare const Concept_base: Schema.Class<Concept, Schema.Struct<{
242
275
  * not a subclass, so a bad `executor` cannot reject the concept.
243
276
  * @public
244
277
  */
245
- export declare class Concept extends Concept_base {}
278
+ export declare class Concept extends Concept_base {
279
+ /**
280
+ * The YAML path of the `position`-th kept entry of a list family. Without recorded
281
+ * `entries` (a hand-built concept) it falls back to `[family, position]`, or `[family]`
282
+ * when `raw[family]` is not a list.
283
+ */
284
+ static entryPath(concept: Concept, family: EntryFamily, position: number): ReadonlyArray<string | number>;
285
+ }
246
286
  /** A posix bundle-relative path with `.md` stripped and no leading slash (D-12). @public */
247
287
  export type ConceptId = string & Brand.Brand<"ConceptId">;
248
288
  /**
@@ -261,15 +301,15 @@ export declare const DiagnosticSeverity: Schema.Literals<readonly ["error", "war
261
301
  /** @public */
262
302
  export type DiagnosticSeverity = typeof DiagnosticSeverity.Type;
263
303
  /** Always `"error"`, never configurable (D-33). @public */
264
- export declare const ConformanceCode: Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>;
304
+ export declare const ConformanceCode: Schema.Literals<readonly ["frontmatter-unclosed", "frontmatter-unparseable", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>;
265
305
  /** @public */
266
306
  export type ConformanceCode = typeof ConformanceCode.Type;
267
307
  /** Severity from `OkfitConfig` (D-34). @public */
268
- export declare const LintCode: Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown"]>;
308
+ export declare const LintCode: Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "verified-before-change", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "config-okf-version-stale", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown", "resource-ignored", "resource-untracked", "resource-outside-project", "superseded-by-orphan", "superseded-by-unresolved", "index-metadata-invalid", "entry-ignored", "value-malformed", "value-unknown", "frontmatter-missing", "type-missing", "symlink-escape", "non-concept-unlisted", "computation-missing", "generated-at-future"]>;
269
309
  /** @public */
270
310
  export type LintCode = typeof LintCode.Type;
271
311
  /** @public */
272
- export declare const DiagnosticCode: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown"]>]>;
312
+ export declare const DiagnosticCode: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-unclosed", "frontmatter-unparseable", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "verified-before-change", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "config-okf-version-stale", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown", "resource-ignored", "resource-untracked", "resource-outside-project", "superseded-by-orphan", "superseded-by-unresolved", "index-metadata-invalid", "entry-ignored", "value-malformed", "value-unknown", "frontmatter-missing", "type-missing", "symlink-escape", "non-concept-unlisted", "computation-missing", "generated-at-future"]>]>;
273
313
  /** @public */
274
314
  export type DiagnosticCode = typeof DiagnosticCode.Type;
275
315
  declare const DiagnosticRange_base: Schema.Class<DiagnosticRange, Schema.Struct<{
@@ -303,7 +343,7 @@ export declare class DiagnosticRange extends DiagnosticRange_base {
303
343
  declare const Diagnostic_base: Schema.Class<Diagnostic, Schema.Struct<{
304
344
  readonly file: Schema.String;
305
345
  readonly range: Schema.optionalKey<typeof DiagnosticRange>;
306
- readonly code: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown"]>]>;
346
+ readonly code: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-unclosed", "frontmatter-unparseable", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "verified-before-change", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "config-okf-version-stale", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched", "verified-drift", "actor-email", "verified-actor-unknown", "resource-ignored", "resource-untracked", "resource-outside-project", "superseded-by-orphan", "superseded-by-unresolved", "index-metadata-invalid", "entry-ignored", "value-malformed", "value-unknown", "frontmatter-missing", "type-missing", "symlink-escape", "non-concept-unlisted", "computation-missing", "generated-at-future"]>]>;
307
347
  readonly severity: Schema.Literals<readonly ["error", "warning", "info"]>;
308
348
  readonly message: Schema.String;
309
349
  }>, {}>;
@@ -334,10 +374,17 @@ declare const IndexDocument_base: Schema.Class<IndexDocument, Schema.Struct<{
334
374
  readonly path: Schema.String;
335
375
  readonly dir: Schema.String;
336
376
  readonly okfVersion: Schema.optionalKey<Schema.String>;
377
+ readonly title: Schema.optionalKey<Schema.String>;
378
+ readonly description: Schema.optionalKey<Schema.String>;
379
+ readonly license: Schema.optionalKey<Schema.String>;
380
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
381
+ readonly frontmatter: Schema.optionalKey<Schema.String>;
337
382
  readonly sections: Schema.$Array<typeof IndexSection>;
338
383
  }>, {}>;
339
384
  /**
340
- * A parsed `index.md` (D-21). `okfVersion` is present only on the bundle root.
385
+ * A parsed `index.md` (D-21). The metadata fields are present only on the bundle root (OKF 0.3 section 8.1):
386
+ * `okfVersion`, `title`, `description` and `license` are the typed reads, `metadata` is the whole decoded
387
+ * mapping (extension keys included) and `frontmatter` is the raw YAML text between the fences.
341
388
  * @public
342
389
  */
343
390
  export declare class IndexDocument extends IndexDocument_base {}
@@ -442,7 +489,14 @@ declare const LoadedConcept_base: Schema.Class<LoadedConcept, Schema.Struct<{
442
489
  }>, {}>;
443
490
  /**
444
491
  * One concept file after loading: typed frontmatter, the parsed body, and the
445
- * `# Computation` section body when present (D-20).
492
+ * inline computation when present.
493
+ *
494
+ * @remarks
495
+ * `computationBody` is the inline form only. 0.3 or later: the code of the first fenced block in
496
+ * the first `Computation` section at any heading level (an empty fence yields an empty string; no
497
+ * fence is `None`). 0.2 or undeclared: the body of the depth-1 `Computation` section. When
498
+ * `attested.computation` is set, the file that path names is the computation (OKF 0.3 10.3 rule 1)
499
+ * and this field is not authoritative; core does not read that file.
446
500
  *
447
501
  * @public
448
502
  */
@@ -476,6 +530,20 @@ export declare class LoadedBundle extends LoadedBundle_base {}
476
530
  */
477
531
  export declare class Bundle {
478
532
  private constructor();
533
+ /**
534
+ * Parse Markdown text exactly as `Bundle.load` parses every bundle file (frontmatter on), so a tool that
535
+ * scans a file the loader did not keep as a concept reads its body the way a concept's is read.
536
+ */
537
+ static readonly parseDocument: (text: string) => Result.Result<MarkdownDocument, MarkdownParseError>;
538
+ /**
539
+ * Pure. The inline computation of `document` under one reading of the spec: `"legacy"` (OKF 0.2) is the body
540
+ * of the depth-1 `Computation` section, `"current"` (OKF 0.3 section 10.3) is the first fenced block of the
541
+ * first `Computation` section at any heading level. `None` when the reading finds nothing. `Bundle.load` calls
542
+ * this for the reading its bundle's declared version selects; a tool comparing the two readings calls it twice.
543
+ *
544
+ * @public
545
+ */
546
+ static readonly inlineComputation: (document: MarkdownDocument, reading: "legacy" | "current") => Option.Option<string>;
479
547
  /**
480
548
  * Load the bundle at `options.root` (D-8, D-9, D-11 to D-14, D-21). Content never
481
549
  * fails: every bad file becomes a diagnostic and loading continues (spec 8). A walk
@@ -494,12 +562,28 @@ export declare const Status: Schema.Literals<readonly ["draft", "stable", "depre
494
562
  * @public
495
563
  */
496
564
  export type Status = typeof Status.Type;
497
- /** Trust tier from `verified` (OKF 0.2 §5.3): none maps to unverified; only non-human maps to machine-confirmed; any `human:` maps to human-reviewed. @public */
565
+ /**
566
+ * What `Derive.status` reads: the three known values, or `unknown` for a `status` outside the
567
+ * vocabulary (OKF 0.3 §5.4). `unknown` is never written; `Status` is the write vocabulary.
568
+ * @public
569
+ */
570
+ export declare const DerivedStatus: Schema.Literals<readonly ["draft", "stable", "deprecated", "unknown"]>;
571
+ /**
572
+ * The derived status value.
573
+ * @public
574
+ */
575
+ export type DerivedStatus = typeof DerivedStatus.Type;
576
+ /**
577
+ * Trust tier from the current `verified` events (OKF 0.3 §5.3, §7): no current event is unverified; current events
578
+ * none of which is `human:` (a `team:` or unknown scheme included) are machine-confirmed; any current `human:` event
579
+ * is human-reviewed. An event before the last `generated.at` is history: it stays in the file and counts for nothing.
580
+ * @public
581
+ */
498
582
  export declare const TrustTier: Schema.Literals<readonly ["unverified", "machine-confirmed", "human-reviewed"]>;
499
583
  /** @public */
500
584
  export type TrustTier = typeof TrustTier.Type;
501
- /** Three-way staleness; `unknown` means no `stale_after`. @public */
502
- export declare const Staleness: Schema.Literals<readonly ["fresh", "stale", "unknown"]>;
585
+ /** Staleness; `unknown` means no `stale_after`, `malformed` a `stale_after` okfit cannot read (OKF 0.3 §5.5). @public */
586
+ export declare const Staleness: Schema.Literals<readonly ["fresh", "stale", "unknown", "malformed"]>;
503
587
  /** @public */
504
588
  export type Staleness = typeof Staleness.Type;
505
589
  /** One dated `log.md` group to render. @public */
@@ -514,21 +598,77 @@ interface StaleConcept {
514
598
  /** Whole days between `staleAfter` and `now`, floored; never negative. */
515
599
  readonly daysPast: number;
516
600
  }
601
+ /** One concept whose `stale_after` is present but unreadable (OKF 0.3 §5.5): its id and the value as written. @public */
602
+ interface MalformedStaleAfter {
603
+ readonly id: ConceptId;
604
+ /** The `stale_after` value as written: the string itself, `JSON.stringify` for any other value. */
605
+ readonly raw: string;
606
+ }
517
607
  /** Options for {@link Derive.renderIndex}. @public */
518
608
  interface RenderIndexOptions {
519
- /** Emits a frontmatter block carrying only `okf_version` first; root index only (D-21). */
609
+ /**
610
+ * Emits a root frontmatter block first (root index only). Without `frontmatter` it carries only
611
+ * `okf_version` (D-21); with it, `okf_version` is added only when the kept block declares none.
612
+ */
520
613
  readonly okfVersion?: string;
614
+ /**
615
+ * The existing root block's YAML text (`IndexDocument.frontmatter`), re-emitted verbatim so a declared
616
+ * title, description, license, version or extension key survives a re-render (D6). `""` is absent.
617
+ */
618
+ readonly frontmatter?: string;
619
+ /**
620
+ * The bundle's `title` and `description` (OKF 0.3 §8.1), written after `okf_version` in a new root block.
621
+ * Ignored when `frontmatter` keeps an existing block: a kept block is never merged with it.
622
+ *
623
+ * @public
624
+ */
625
+ readonly metadata?: {
626
+ readonly title?: string;
627
+ readonly description?: string;
628
+ };
521
629
  /** Rendered as `* [name](name/index.md)` under a trailing `# Subdirectories` section. */
522
630
  readonly subdirectories?: ReadonlyArray<string>;
523
631
  }
524
632
  /** Pure derivations (D-10, D-36): trust tier, status, staleness against a supplied instant, index/log rendering. @public */
525
633
  export declare class Derive {
526
634
  private constructor();
527
- /** Any `human:` verifier means human-reviewed; otherwise machine-confirmed; none means unverified. */
635
+ /**
636
+ * Whether a verification event at `at` is current for `concept` (OKF 0.3 §5.3): `at` is equal to or later than
637
+ * `generated.at` by instant, or `generated` or `generated.at` is absent. It reads only `generated`, so a caller holding
638
+ * no whole concept passes `{ generated }`.
639
+ *
640
+ * @public
641
+ */
642
+ static readonly isCurrent: (concept: {
643
+ readonly generated?: {
644
+ readonly at?: DateTime.Utc;
645
+ } | undefined;
646
+ }, at: DateTime.Utc) => boolean;
647
+ /**
648
+ * The decoded `verified` entries that are current ({@link Derive.isCurrent}), in list order. Earlier events stay
649
+ * in the file as history (OKF 0.3 §5.3) and are not returned.
650
+ *
651
+ * @public
652
+ */
653
+ static readonly currentVerifications: (concept: Concept) => ReadonlyArray<Verification>;
654
+ /**
655
+ * The trust tier from {@link Derive.currentVerifications} only (OKF 0.3 §5.3, §7; §11.2 makes it a MUST for every
656
+ * bundle): none is unverified, any `human:` verifier is human-reviewed, otherwise machine-confirmed.
657
+ *
658
+ * @public
659
+ */
528
660
  static readonly trustTier: (concept: Concept) => TrustTier;
529
- /** Absent `status` reads as `stable` (OKF 0.2 §5.4). */
530
- static readonly status: (concept: Concept) => Status;
531
- /** `stale` when `now >= stale_after` (OKF 0.2 §5.5); `unknown` without `stale_after`. */
661
+ /**
662
+ * The typed status; `unknown` when `raw.status` is present (not `null`, `""` or `[]`) but outside the
663
+ * vocabulary; `stable` when absent (OKF 0.3 §5.4).
664
+ */
665
+ static readonly status: (concept: Concept) => DerivedStatus;
666
+ /** The `status` value as written, as text for display; `undefined` when absent, `null`, `""` or `[]`. */
667
+ static readonly rawStatus: (concept: Concept) => string | undefined;
668
+ /**
669
+ * `stale` when `now >= stale_after` (OKF 0.3 §5.5); `unknown` without `stale_after`; `malformed`
670
+ * when `raw.stale_after` is present (not `null`, `""` or `[]`) but unreadable, so never fresh and never stale.
671
+ */
532
672
  static readonly staleness: (concept: Concept, now: DateTime.Utc) => Staleness;
533
673
  /** Boolean form of {@link Derive.staleness} (D-36). */
534
674
  static readonly isStale: (concept: Concept, now: DateTime.Utc) => boolean;
@@ -538,7 +678,13 @@ export declare class Derive {
538
678
  * never read from a clock here (D-36).
539
679
  */
540
680
  static readonly staleReport: (bundle: LoadedBundle, now: DateTime.Utc) => ReadonlyArray<StaleConcept>;
541
- /** Frontmatter `title`, else the file name without `.md` (OKF 0.2 §4.1). */
681
+ /**
682
+ * Every concept in `bundle` whose {@link Derive.staleness} is `malformed` (OKF 0.3 §5.5: an unreadable
683
+ * `stale_after` is never fresh), with the value as written, sorted by id ascending. `staleReport` never
684
+ * lists these. A malformed value does not depend on the instant, so there is no `now` argument.
685
+ */
686
+ static readonly malformedStaleAfter: (bundle: LoadedBundle) => ReadonlyArray<MalformedStaleAfter>;
687
+ /** Frontmatter `title`, else the file name without `.md` (OKF 0.3 §4.1). */
542
688
  static readonly title: (concept: LoadedConcept) => string;
543
689
  /** One H1 per `type` (sorted), entries sorted by title, then `# Subdirectories` (D-36; spec §8). */
544
690
  static readonly renderIndex: (dir: string, concepts: ReadonlyArray<LoadedConcept>, options?: RenderIndexOptions) => string;
@@ -564,6 +710,31 @@ export declare class Derive {
564
710
  /** Index text for `dir` from the concepts directly in it plus its immediate child directories; no frontmatter. */
565
711
  static readonly synthesizeIndex: (bundle: LoadedBundle, dir: string) => string;
566
712
  }
713
+ /**
714
+ * How far past now a `generated.at` may sit before okfit treats it as a future stamp: five minutes, the allowance for
715
+ * ordinary clock skew between machines. The lint `generated-at-future` and the repair in `okfit sync` both read it
716
+ * through {@link generatedAtIsFuture}.
717
+ *
718
+ * @public
719
+ */
720
+ export declare const GENERATED_AT_TOLERANCE: Duration.Duration;
721
+ /**
722
+ * Whether `generatedAt` is more than {@link GENERATED_AT_TOLERANCE} later than `now`. Exactly the tolerance is not
723
+ * future; one millisecond more is.
724
+ *
725
+ * @public
726
+ */
727
+ export declare const generatedAtIsFuture: (generatedAt: DateTime.Utc, now: DateTime.Utc) => boolean;
728
+ /**
729
+ * The earliest verification time `V` with `startOf(now, "second") <= V < generatedAt`, the verifications that
730
+ * re-stamping `generatedAt` down to now would turn from not current into current (OKF 0.3 §5.3). `okfit sync` skips
731
+ * such a re-stamp; the lint `generated-at-future` names the verification instead of promising the repair. `now` is
732
+ * truncated to the whole second because stamps are written in whole seconds. None when no verification falls in the
733
+ * window.
734
+ *
735
+ * @public
736
+ */
737
+ export declare const verificationBlockingRestamp: (verifiedAts: ReadonlyArray<DateTime.Utc>, generatedAt: DateTime.Utc, now: DateTime.Utc) => Option.Option<DateTime.Utc>;
567
738
  /**
568
739
  * Kind of a graph node: a loaded concept, an existing non-concept file (including reserved
569
740
  * `index.md`/`log.md`), or a placeholder for a target that does not exist (D-25).
@@ -574,7 +745,7 @@ export declare const GraphNodeKind: Schema.Literals<readonly ["concept", "file",
574
745
  /** @public */
575
746
  export type GraphNodeKind = typeof GraphNodeKind.Type;
576
747
  /** Frontmatter fields whose value is a bundle path (D-23). @public */
577
- type PathField = "resource" | "sources.resource" | "computation" | "executor.resource" | "attester.resource";
748
+ type PathField = "resource" | "sources.resource" | "computation" | "executor.resource" | "attester.resource" | "superseded_by";
578
749
  /**
579
750
  * How one reference resolved (D-23, D-24); `via` says which D-23 branch produced a node: `rooted` (a leading
580
751
  * `/`), `file` (against the linking file's directory) or `root` (a bare path against the bundle root).
@@ -641,6 +812,13 @@ export declare class LinkGraph {
641
812
  toGraphViz(options?: Graph$1.GraphVizOptions<GraphNode, GraphEdge>): string;
642
813
  private neighbours;
643
814
  }
815
+ /**
816
+ * Which root-fallback rule {@link Graph.resolve} applies: `"declared"` follows the bundle's own `okf_version`,
817
+ * `"legacy"` forces the OKF 0.2 root fallback on and `"current"` forces it off, whatever the bundle declares.
818
+ *
819
+ * @public
820
+ */
821
+ type FallbackRule = "declared" | "legacy" | "current";
644
822
  /**
645
823
  * Static facade building a {@link LinkGraph} from a loaded bundle (D-6).
646
824
  *
@@ -650,9 +828,21 @@ export declare class Graph {
650
828
  private constructor();
651
829
  /**
652
830
  * Pure. Resolve `raw`, written in the file at bundle-relative `from`, the way the graph does; `field`
653
- * applies the path-field rules (a `sources.resource` descriptor).
831
+ * applies the path-field rules (a `sources.resource` descriptor). `rule` (default `"declared"`) states which
832
+ * root-fallback rule applies; it is applied per call and never cached.
833
+ */
834
+ static readonly resolve: (bundle: LoadedBundle, from: string, raw: string, field?: PathField, rule?: FallbackRule) => LinkResolution;
835
+ /**
836
+ * Pure. The concept that replaces a deprecated concept (OKF 0.3 section 5.4): follow `superseded_by` from `id`
837
+ * through deprecated concepts to the first concept whose derived status is neither `deprecated` nor `unknown`
838
+ * (a `draft` or `stable` concept is current knowledge). `None` when `id` is not a deprecated concept, a link
839
+ * resolves to a non-concept or a missing target, a deprecated concept has no `superseded_by`, the chain ends at
840
+ * an `unknown`-status concept, or the chain revisits a concept (a cycle or a self-reference). Resolution is the
841
+ * one {@link Graph.resolve} performs, so a bare value in a v0.2 bundle resolves through the root fallback.
842
+ *
843
+ * @public
654
844
  */
655
- static readonly resolve: (bundle: LoadedBundle, from: string, raw: string, field?: PathField) => LinkResolution;
845
+ static readonly replacement: (bundle: LoadedBundle, id: ConceptId) => Option.Option<ConceptId>;
656
846
  /**
657
847
  * Pure. Body links come from `document.links`, path fields from the frontmatter (D-23, D-24).
658
848
  * Placeholder `missing` nodes are added before their edge because `Graph.addEdge` throws on an absent endpoint.
@@ -726,6 +916,7 @@ export declare const LintTable: Schema.Struct<{
726
916
  readonly required_key_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
727
917
  readonly field_value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
728
918
  readonly require_verified_unmet: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
919
+ readonly verified_before_change: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
729
920
  readonly family_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
730
921
  readonly computation_runtime_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
731
922
  readonly footnote_source_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -736,16 +927,32 @@ export declare const LintTable: Schema.Struct<{
736
927
  readonly verified_actor_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
737
928
  readonly legacy_timestamp: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
738
929
  readonly config_unknown_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
930
+ readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
739
931
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
740
932
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
933
+ readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
934
+ readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
935
+ readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
741
936
  readonly generated_at_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
742
937
  readonly verified_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
743
938
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
744
939
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
940
+ readonly resource_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
941
+ readonly resource_untracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
942
+ readonly resource_outside_project: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
943
+ readonly superseded_by_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
944
+ readonly superseded_by_unresolved: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
745
945
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
946
+ readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
947
+ readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
746
948
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
747
949
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
748
950
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
951
+ readonly index_metadata_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
952
+ readonly entry_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
953
+ readonly value_malformed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
954
+ readonly value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
955
+ readonly non_concept_unlisted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
749
956
  }>;
750
957
  /**
751
958
  * The `OkfitConfig` struct schema. Exported only so the `OkfitConfigFields`
@@ -758,6 +965,7 @@ declare const okfitConfigFields: Schema.Struct<{
758
965
  readonly bundle: Schema.optionalKey<Schema.Struct<{
759
966
  readonly path: Schema.optionalKey<Schema.String>;
760
967
  readonly profile: Schema.optionalKey<Schema.String>;
968
+ readonly non_concepts: Schema.optionalKey<Schema.$Array<Schema.String>>;
761
969
  }>>;
762
970
  readonly concepts: Schema.optionalKey<Schema.Struct<{
763
971
  readonly required: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -779,6 +987,7 @@ declare const okfitConfigFields: Schema.Struct<{
779
987
  readonly required_key_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
780
988
  readonly field_value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
781
989
  readonly require_verified_unmet: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
990
+ readonly verified_before_change: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
782
991
  readonly family_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
783
992
  readonly computation_runtime_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
784
993
  readonly footnote_source_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -789,16 +998,32 @@ declare const okfitConfigFields: Schema.Struct<{
789
998
  readonly verified_actor_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
790
999
  readonly legacy_timestamp: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
791
1000
  readonly config_unknown_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1001
+ readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
792
1002
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
793
1003
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1004
+ readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1005
+ readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1006
+ readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
794
1007
  readonly generated_at_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
795
1008
  readonly verified_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
796
1009
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
797
1010
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1011
+ readonly resource_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1012
+ readonly resource_untracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1013
+ readonly resource_outside_project: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1014
+ readonly superseded_by_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1015
+ readonly superseded_by_unresolved: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
798
1016
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1017
+ readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1018
+ readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
799
1019
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
800
1020
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
801
1021
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1022
+ readonly index_metadata_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1023
+ readonly entry_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1024
+ readonly value_malformed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1025
+ readonly value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1026
+ readonly non_concept_unlisted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
802
1027
  }>>;
803
1028
  readonly types: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
804
1029
  readonly description: Schema.optionalKey<Schema.String>;
@@ -864,6 +1089,7 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
864
1089
  readonly bundle: Schema.optionalKey<Schema.Struct<{
865
1090
  readonly path: Schema.optionalKey<Schema.String>;
866
1091
  readonly profile: Schema.optionalKey<Schema.String>;
1092
+ readonly non_concepts: Schema.optionalKey<Schema.$Array<Schema.String>>;
867
1093
  }>>;
868
1094
  readonly concepts: Schema.optionalKey<Schema.Struct<{
869
1095
  readonly required: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -885,6 +1111,7 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
885
1111
  readonly required_key_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
886
1112
  readonly field_value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
887
1113
  readonly require_verified_unmet: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1114
+ readonly verified_before_change: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
888
1115
  readonly family_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
889
1116
  readonly computation_runtime_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
890
1117
  readonly footnote_source_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -895,16 +1122,32 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
895
1122
  readonly verified_actor_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
896
1123
  readonly legacy_timestamp: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
897
1124
  readonly config_unknown_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1125
+ readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
898
1126
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
899
1127
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1128
+ readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1129
+ readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1130
+ readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
900
1131
  readonly generated_at_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
901
1132
  readonly verified_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
902
1133
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
903
1134
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1135
+ readonly resource_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1136
+ readonly resource_untracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1137
+ readonly resource_outside_project: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1138
+ readonly superseded_by_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1139
+ readonly superseded_by_unresolved: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
904
1140
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1141
+ readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1142
+ readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
905
1143
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
906
1144
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
907
1145
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1146
+ readonly index_metadata_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1147
+ readonly entry_ignored: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1148
+ readonly value_malformed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1149
+ readonly value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1150
+ readonly non_concept_unlisted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
908
1151
  }>>;
909
1152
  readonly types: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
910
1153
  readonly description: Schema.optionalKey<Schema.String>;
@@ -958,6 +1201,7 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
958
1201
  readonly bundle?: {
959
1202
  readonly path?: string;
960
1203
  readonly profile?: string;
1204
+ readonly non_concepts?: readonly string[];
961
1205
  };
962
1206
  readonly concepts?: {
963
1207
  readonly required?: readonly string[];
@@ -979,6 +1223,7 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
979
1223
  readonly required_key_missing?: "error" | "info" | "off" | "warn";
980
1224
  readonly field_value_unknown?: "error" | "info" | "off" | "warn";
981
1225
  readonly require_verified_unmet?: "error" | "info" | "off" | "warn";
1226
+ readonly verified_before_change?: "error" | "info" | "off" | "warn";
982
1227
  readonly family_invalid?: "error" | "info" | "off" | "warn";
983
1228
  readonly computation_runtime_missing?: "error" | "info" | "off" | "warn";
984
1229
  readonly footnote_source_unknown?: "error" | "info" | "off" | "warn";
@@ -989,16 +1234,32 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
989
1234
  readonly verified_actor_unknown?: "error" | "info" | "off" | "warn";
990
1235
  readonly legacy_timestamp?: "error" | "info" | "off" | "warn";
991
1236
  readonly config_unknown_key?: "error" | "info" | "off" | "warn";
1237
+ readonly config_okf_version_stale?: "error" | "info" | "off" | "warn";
992
1238
  readonly stale?: "error" | "info" | "off" | "warn";
993
1239
  readonly walk_unreadable?: "error" | "info" | "off" | "warn";
1240
+ readonly frontmatter_missing?: "error" | "info" | "off" | "warn";
1241
+ readonly type_missing?: "error" | "info" | "off" | "warn";
1242
+ readonly symlink_escape?: "error" | "info" | "off" | "warn";
994
1243
  readonly generated_at_drift?: "error" | "info" | "off" | "warn";
995
1244
  readonly verified_drift?: "error" | "info" | "off" | "warn";
996
1245
  readonly status_missing?: "error" | "info" | "off" | "warn";
997
1246
  readonly source_resource_missing?: "error" | "info" | "off" | "warn";
1247
+ readonly resource_ignored?: "error" | "info" | "off" | "warn";
1248
+ readonly resource_untracked?: "error" | "info" | "off" | "warn";
1249
+ readonly resource_outside_project?: "error" | "info" | "off" | "warn";
1250
+ readonly superseded_by_orphan?: "error" | "info" | "off" | "warn";
1251
+ readonly superseded_by_unresolved?: "error" | "info" | "off" | "warn";
998
1252
  readonly generated_missing?: "error" | "info" | "off" | "warn";
1253
+ readonly computation_missing?: "error" | "info" | "off" | "warn";
1254
+ readonly generated_at_future?: "error" | "info" | "off" | "warn";
999
1255
  readonly publication_drift?: "error" | "info" | "off" | "warn";
1000
1256
  readonly publication_orphan?: "error" | "info" | "off" | "warn";
1001
1257
  readonly surface_unmatched?: "error" | "info" | "off" | "warn";
1258
+ readonly index_metadata_invalid?: "error" | "info" | "off" | "warn";
1259
+ readonly entry_ignored?: "error" | "info" | "off" | "warn";
1260
+ readonly value_malformed?: "error" | "info" | "off" | "warn";
1261
+ readonly value_unknown?: "error" | "info" | "off" | "warn";
1262
+ readonly non_concept_unlisted?: "error" | "info" | "off" | "warn";
1002
1263
  };
1003
1264
  readonly types?: {
1004
1265
  readonly [x: string]: {
@@ -1039,6 +1300,29 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
1039
1300
  * @public
1040
1301
  */
1041
1302
  export declare class OkfitConfigFile extends OkfitConfigFile_base {}
1303
+ /** A parsed OKF version: the numeric `<major>.<minor>` pair (OKF 0.3 §12). @public */
1304
+ interface OkfVersionNumber {
1305
+ readonly major: number;
1306
+ readonly minor: number;
1307
+ }
1308
+ /**
1309
+ * Reads and compares the OKF version a bundle declares. The declared version is the bundle-root
1310
+ * `index.md`'s `okf_version`; one gate, {@link OkfVersion.legacyFallbacks}, decides whether the v0.2
1311
+ * fallbacks apply. @public
1312
+ */
1313
+ export declare class OkfVersion {
1314
+ private constructor();
1315
+ /** Parses exactly `<major>.<minor>` (no `v`, no patch, no whitespace); anything else is `None`. */
1316
+ static readonly parse: (raw: string) => Option.Option<OkfVersionNumber>;
1317
+ /** Compares numerically, major first, so `0.10` sorts after `0.9`. */
1318
+ static readonly compare: (a: OkfVersionNumber, b: OkfVersionNumber) => -1 | 0 | 1;
1319
+ /** The version the bundle-root `index.md` declares, as written; `None` when there is no root index or no `okf_version`. */
1320
+ static readonly declared: (bundle: LoadedBundle) => Option.Option<string>;
1321
+ /** True when nothing is declared or the declared version parses and is 0.2 or earlier; an unparsable version reads as current. */
1322
+ static readonly allowsLegacyFallbacks: (declared: Option.Option<string>) => boolean;
1323
+ /** Whether the v0.2 fallbacks apply to this bundle: `allowsLegacyFallbacks(declared(bundle))`. */
1324
+ static readonly legacyFallbacks: (bundle: LoadedBundle) => boolean;
1325
+ }
1042
1326
  /**
1043
1327
  * A decoded OKF timestamp: always a UTC instant.
1044
1328
  * @public
@@ -1046,14 +1330,17 @@ export declare class OkfitConfigFile extends OkfitConfigFile_base {}
1046
1330
  export type Timestamp = DateTime.Utc;
1047
1331
  /**
1048
1332
  * ISO 8601 string with an explicit offset (`Z`, `+hh:mm` or `-hh:mm`) to `DateTime.Utc`.
1049
- * Offset-less input fails before parsing so its family surfaces as `family-invalid` (D-15/D-16).
1050
- * Encoding writes `2026-03-01T08:00:00Z` for a whole second and keeps non-zero milliseconds.
1333
+ * A date-only `YYYY-MM-DD` value (OKF 0.3 section 5) reads as the start of that day in UTC; an impossible
1334
+ * calendar day fails. Offset-less date-times fail before parsing and are reported as `value-malformed`.
1335
+ * Encoding always writes a date-time: `2026-03-01T08:00:00Z` for a whole second, non-zero milliseconds kept.
1051
1336
  * @public
1052
1337
  */
1053
1338
  export declare const Timestamp: Schema.Codec<DateTime.Utc, string>;
1054
1339
  /** Options for {@link Validate.lint}; `stale` fires only when `now` is supplied (D-34). @public */
1055
1340
  interface ValidateOptions {
1056
1341
  readonly now?: DateTime.Utc;
1342
+ /** The config file's path, printed in messages that name it; core reads nothing from it. */
1343
+ readonly configPath?: string;
1057
1344
  }
1058
1345
  /** Both tiers. Non-empty `conformance` means CLI exit 2; any `error` in `lint` means exit 1 (spec 3.4). @public */
1059
1346
  interface ValidationReport {
@@ -1075,6 +1362,6 @@ export declare class Validate {
1075
1362
  *
1076
1363
  * @public
1077
1364
  */
1078
- export declare const OKF_SPEC_VERSION: "0.2";
1079
- export type { ActorForm, BundleLoadError, BundleLoadOptions, GraphEdge, GraphLink, GraphNode, LinkResolution, LogEntry, OkfitConfigFields, PathField, RenderIndexOptions, StaleConcept, ValidateOptions, ValidationReport };
1365
+ export declare const OKF_SPEC_VERSION: "0.3";
1366
+ export type { ActorForm, BundleLoadError, BundleLoadOptions, EntryFamily, FallbackRule, GraphEdge, GraphLink, GraphNode, LinkResolution, LogEntry, MalformedStaleAfter, OkfVersionNumber, OkfitConfigFields, PathField, RenderIndexOptions, StaleConcept, ValidateOptions, ValidationReport };
1080
1367
  //# sourceMappingURL=index.d.ts.map