@okfit/core 0.15.0 → 0.17.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.
@@ -0,0 +1,46 @@
1
+ import { GitRemote } from "@effected/git";
2
+ import { Option } from "effect";
3
+
4
+ // src/RepoIdentity.ts
5
+ const WHITESPACE = /\s/;
6
+ const collapseTrailingSlashes = (value) => {
7
+ let end = value.length;
8
+ while (end > 1 && value.charCodeAt(end - 1) === 47 && value.charCodeAt(end - 2) === 47) end--;
9
+ return end === value.length ? value : value.slice(0, end);
10
+ };
11
+ /**
12
+ * Canonical repository identity: `host/owner/name`, lower-case, with no `.git` suffix and no trailing slash.
13
+ * Accepts `owner/name` shorthand (GitHub), URL remotes (user, port and `[::1]` hosts allowed), and scp-like
14
+ * `git@host:owner/name` remotes. Pure string work with no `node:` imports. @public
15
+ *
16
+ * @remarks
17
+ * The address is read by `GitRemote.parseIdentity` from `@effected/git` (URL, scp or path form, as git reads it, so
18
+ * an IPv6 literal and the scp-versus-path ambiguity are decided there) with `defaultHost: "github.com"`,
19
+ * `foldCase: "always"`, `minSegments: 2` and `strict: true`: a scheme-less path is exactly `owner/name` shorthand or
20
+ * `host/owner/name`, and the path needs at least two segments after the host. okfit's own rule is the pre-check: a value
21
+ * carrying whitespace, `?` or `#` does not normalise, and a run of trailing slashes is collapsed to one before the kit
22
+ * reads it (`strict` takes one on a URL, scp or scheme-less `host/owner/name/` address, and the shorthand `owner/name/` has no identity). Under `strict` an empty, bare `.git` or doubled-`.git` name has no
23
+ * identity either. An owner containing a dot is not shorthand (`my.group/proj`), because the kit reads a first segment
24
+ * holding a dot as a host; it needs its host spelled out, as in `gitlab.com/my.group/proj`.
25
+ */
26
+ var RepoIdentity = class RepoIdentity {
27
+ constructor() {}
28
+ /** The canonical identity of a repository reference, or `None` when it does not normalise. */
29
+ static normalize = (value) => {
30
+ if (value === "" || WHITESPACE.test(value) || value.includes("?") || value.includes("#")) return Option.none();
31
+ return Option.map(GitRemote.parseIdentity(collapseTrailingSlashes(value), {
32
+ defaultHost: "github.com",
33
+ foldCase: "always",
34
+ minSegments: 2,
35
+ strict: true
36
+ }), String);
37
+ };
38
+ /** True when both values normalize and the identities match. */
39
+ static equals = (a, b) => {
40
+ const left = RepoIdentity.normalize(a);
41
+ const right = RepoIdentity.normalize(b);
42
+ return Option.isSome(left) && Option.isSome(right) && left.value === right.value;
43
+ };
44
+ };
45
+
46
+ export { RepoIdentity };
package/index.d.ts CHANGED
@@ -282,6 +282,14 @@ export declare class Concept extends Concept_base {
282
282
  * when `raw[family]` is not a list.
283
283
  */
284
284
  static entryPath(concept: Concept, family: EntryFamily, position: number): ReadonlyArray<string | number>;
285
+ /**
286
+ * OKF 0.3 §11.2 rule 1: `undefined`, `null`, an empty string and an empty list read as absent.
287
+ *
288
+ * @remarks
289
+ * A mapping, `{}` included, is not absent. A family the decoder ignores (a `generated` without a readable
290
+ * `by`) reads as absent through the decoded `Concept`, not through this predicate.
291
+ */
292
+ static isAbsent(value: unknown): boolean;
285
293
  }
286
294
  /** A posix bundle-relative path with `.md` stripped and no leading slash (D-12). @public */
287
295
  export type ConceptId = string & Brand.Brand<"ConceptId">;
@@ -305,11 +313,11 @@ export declare const ConformanceCode: Schema.Literals<readonly ["frontmatter-unc
305
313
  /** @public */
306
314
  export type ConformanceCode = typeof ConformanceCode.Type;
307
315
  /** Severity from `OkfitConfig` (D-34). @public */
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"]>;
316
+ 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", "read-changed", "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", "reference-not-mounted", "reference-missing", "reference-undeclared", "reference-local-only", "config-misplaced-key", "config-local-tracked", "bundle-config-invalid"]>;
309
317
  /** @public */
310
318
  export type LintCode = typeof LintCode.Type;
311
319
  /** @public */
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"]>]>;
320
+ 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", "read-changed", "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", "reference-not-mounted", "reference-missing", "reference-undeclared", "reference-local-only", "config-misplaced-key", "config-local-tracked", "bundle-config-invalid"]>]>;
313
321
  /** @public */
314
322
  export type DiagnosticCode = typeof DiagnosticCode.Type;
315
323
  declare const DiagnosticRange_base: Schema.Class<DiagnosticRange, Schema.Struct<{
@@ -339,11 +347,20 @@ export declare class DiagnosticRange extends DiagnosticRange_base {
339
347
  * @public
340
348
  */
341
349
  static readonly forFrontmatterPath: (document: MarkdownDocument, path: ReadonlyArray<string | number>) => DiagnosticRange | undefined;
350
+ /**
351
+ * Maps a frontmatter YAML path to the range of its last segment's own key inside `document.source`, or `undefined`
352
+ * when the document has no frontmatter block, the path does not end in a written mapping key, or the key is not
353
+ * there. For a caller that edits a key whose value has no text of its own (a bare `body:` or `body: !!null`, which
354
+ * {@link DiagnosticRange.forFrontmatterPath} reports as the whole block), so it can still find where the value goes.
355
+ *
356
+ * @public
357
+ */
358
+ static readonly forFrontmatterKey: (document: MarkdownDocument, path: ReadonlyArray<string | number>) => DiagnosticRange | undefined;
342
359
  }
343
360
  declare const Diagnostic_base: Schema.Class<Diagnostic, Schema.Struct<{
344
361
  readonly file: Schema.String;
345
362
  readonly range: Schema.optionalKey<typeof DiagnosticRange>;
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"]>]>;
363
+ 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", "read-changed", "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", "reference-not-mounted", "reference-missing", "reference-undeclared", "reference-local-only", "config-misplaced-key", "config-local-tracked", "bundle-config-invalid"]>]>;
347
364
  readonly severity: Schema.Literals<readonly ["error", "warning", "info"]>;
348
365
  readonly message: Schema.String;
349
366
  }>, {}>;
@@ -380,6 +397,8 @@ declare const IndexDocument_base: Schema.Class<IndexDocument, Schema.Struct<{
380
397
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
381
398
  readonly frontmatter: Schema.optionalKey<Schema.String>;
382
399
  readonly sections: Schema.$Array<typeof IndexSection>;
400
+ /** The file's text as the load read it (a leading byte-order mark dropped); absent on a hand-built document. */
401
+ readonly source: Schema.optionalKey<Schema.String>;
383
402
  }>, {}>;
384
403
  /**
385
404
  * A parsed `index.md` (D-21). The metadata fields are present only on the bundle root (OKF 0.3 section 8.1):
@@ -406,6 +425,8 @@ declare const LogDocument_base: Schema.Class<LogDocument, Schema.Struct<{
406
425
  readonly dir: Schema.String;
407
426
  readonly title: Schema.optionalKey<Schema.String>;
408
427
  readonly groups: Schema.$Array<typeof LogGroup>;
428
+ /** The file's text as the load read it (a leading byte-order mark dropped); absent on a hand-built document. */
429
+ readonly source: Schema.optionalKey<Schema.String>;
409
430
  }>, {}>;
410
431
  /**
411
432
  * A parsed `log.md` (D-21).
@@ -471,7 +492,7 @@ interface BundleLoadOptions {
471
492
  readonly includeHidden?: boolean;
472
493
  /** Directory levels below the root to descend; positive integer, default 256; exceeding it fails with `BundleDepthExceededError`. */
473
494
  readonly maxDepth?: number;
474
- /** Directory names never descended (default `["node_modules", ".git"]`). */
495
+ /** Directory names never descended (default `["node_modules", ".git"]`); a symbolic link with one of these names is skipped unread, while a regular file with one is still loaded. */
475
496
  readonly prune?: ReadonlyArray<string>;
476
497
  }
477
498
  declare const LoadedConcept_base: Schema.Class<LoadedConcept, Schema.Struct<{
@@ -549,9 +570,75 @@ export declare class Bundle {
549
570
  * fails: every bad file becomes a diagnostic and loading continues (spec 8). A walk
550
571
  * that descends past `options.maxDepth` fails typed with `BundleDepthExceededError`
551
572
  * (W-1) rather than being silently truncated.
573
+ *
574
+ * A symbolic link is never followed out of the bundle (OKF 0.3 section 3.2 rule 5). A file link that leaves
575
+ * it, a directory link that leaves it (nothing under it is read), and a link of either kind whose resolution
576
+ * fails (dangling, a loop, an unreadable target) each record a `symlink-escape` warning at their own path
577
+ * (a pruned name, `node_modules` by default, is silent for a file link and a directory link alike and the link is never read; hidden names are checked only under `includeHidden`); a directory link that stays inside is never walked and
578
+ * records nothing. Each Markdown file is read confined (`readConfinedString`): a file that becomes a link out of
579
+ * the bundle between the link check and the read is refused as `symlink-escape`, and one that changed under the
580
+ * read (`changed`) is recorded `read-changed` ("try again") and left out of that load. A race through a directory above
581
+ * the file can still win (spencerbeggs/okfit#524).
552
582
  */
553
583
  static readonly load: (options: BundleLoadOptions) => Effect.Effect<LoadedBundle, BundleLoadError, FileSystem.FileSystem | Path.Path>;
554
584
  }
585
+ /**
586
+ * The transient wording every surface uses for a file that changed under a read: the quoted `subject` (a path or
587
+ * a concept file name) followed by `changed while it was read; try again`. One spelling, so the CLI, the MCP server
588
+ * and `ConfinementError` never drift. It is never an escape verdict.
589
+ *
590
+ * @public
591
+ */
592
+ export declare const changedWhileRead: (subject: string) => string;
593
+ declare const ConfinementError_base: Schema.Class<ConfinementError, Schema.TaggedStruct<"ConfinementError", {
594
+ readonly root: Schema.String;
595
+ /** The path that was read, as it was given. */
596
+ readonly path: Schema.String;
597
+ readonly reason: Schema.Literals<readonly ["outside", "unresolvable", "changed"]>;
598
+ }>, import("effect/Cause").YieldableError>;
599
+ /**
600
+ * A file read was refused (OKF 0.3 section 3.2).
601
+ *
602
+ * `reason` says why: `outside` (a link on the path resolves outside the root), `unresolvable` (a link on the path
603
+ * dangles or cannot be resolved) or `changed` (the path no longer names the file that was opened, or what it names
604
+ * could not be compared: it was swapped, replaced or removed while it was read, so reading again may succeed). Only
605
+ * `outside` and `unresolvable` mean the path leaves the bundle; `changed` is transient and never an escape verdict.
606
+ *
607
+ * @public
608
+ */
609
+ export declare class ConfinementError extends ConfinementError_base {
610
+ get message(): string;
611
+ }
612
+ /**
613
+ * Read the file `target` (an absolute path) under `root` confined to it, so a link swapped in after a check is not
614
+ * read: open the file, resolve the path with `confineReal` (every link on it, at the file or at a directory above
615
+ * it), require that the path still exists (`realPath`), then require that the open file is the file the resolved
616
+ * path names (`dev` and `ino` of the open file's `stat` against `lstat` of the real path, which must itself be a
617
+ * file and not a link). The bytes come from the open file, never from a second open of the path.
618
+ *
619
+ * The guarantee is exact about one case: a link at the file itself, swapped in at any moment during the read, is
620
+ * refused. A race through a directory above the file can still win, because the open and the resolution are
621
+ * separate steps on the path (spencerbeggs/okfit#524); there is no retry, which would only widen that window.
622
+ *
623
+ * It fails with {@link ConfinementError} (`outside` or `unresolvable` when a link on the path leaves the root or
624
+ * dangles; `changed` when the path no longer names the file that was opened, or either stat lacks an `ino`), and
625
+ * with the `PlatformError` of the open or the read otherwise. A missing file is that `PlatformError` (`NotFound`)
626
+ * unless a link on its path escapes or dangles. A hard link to a file under the root is a file under the root
627
+ * (OKF 0.3 section 3.2) and is read.
628
+ *
629
+ * Only reads are confined this way. A write stays a check followed by `writeAtomic`.
630
+ *
631
+ * @public
632
+ */
633
+ export declare const readConfinedBytes: (root: string, target: string) => Effect.Effect<Uint8Array<ArrayBuffer>, ConfinementError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | import("effect/Path").Path>;
634
+ /**
635
+ * {@link readConfinedBytes} decoded as UTF-8. A leading byte-order mark is dropped, as Effect's
636
+ * `FileSystem.readFileString` (a `TextDecoder`) drops it, so the loader reads a BOM file as it always did and a
637
+ * writer gives the BOM back.
638
+ *
639
+ * @public
640
+ */
641
+ export declare const readConfinedString: (root: string, target: string) => Effect.Effect<string, ConfinementError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | import("effect/Path").Path>;
555
642
  /**
556
643
  * Concept lifecycle status. Absent on a concept means `stable` (`Derive.status`).
557
644
  * @public
@@ -718,6 +805,13 @@ export declare class Derive {
718
805
  * @public
719
806
  */
720
807
  export declare const GENERATED_AT_TOLERANCE: Duration.Duration;
808
+ /**
809
+ * {@link GENERATED_AT_TOLERANCE} in words ("5 minutes"), for messages. Derived from the constant with
810
+ * `DurationWords.format`, so changing the tolerance changes every message that names it.
811
+ *
812
+ * @public
813
+ */
814
+ export declare const GENERATED_AT_TOLERANCE_TEXT: string;
721
815
  /**
722
816
  * Whether `generatedAt` is more than {@link GENERATED_AT_TOLERANCE} later than `now`. Exactly the tolerance is not
723
817
  * future; one millisecond more is.
@@ -861,50 +955,6 @@ export declare const LintLevel: Schema.Literals<readonly ["off", "info", "warn",
861
955
  * @public
862
956
  */
863
957
  export type LintLevel = typeof LintLevel.Type;
864
- /**
865
- * `lifecycle.default_stale_after` codec: `^(\d+)(h|d|w)$` or Effect's
866
- * `"<n> <unit>"` form decodes to a `Duration` (D-30). Encoding emits the
867
- * shortest exact `w`/`d`/`h` spelling, otherwise `"<n> millis"`.
868
- *
869
- * @remarks
870
- * `@effected/toml` has no duration syntax and `Schema.DurationFromString`
871
- * rejects `"90d"`, so this is core's own codec (effected-yaml-toml-config-file-app.md §2).
872
- *
873
- * @public
874
- */
875
- export declare const StaleAfterDuration: Schema.Codec<Duration.Duration, string>;
876
- /**
877
- * A `types.<Name>.fields.<key>` declaration (spec 4.2): a description plus
878
- * either an enum of values with descriptions or `kind = "path"`.
879
- * @public
880
- */
881
- export declare const FieldDeclaration: Schema.Struct<{
882
- readonly description: Schema.String;
883
- readonly values: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
884
- readonly kind: Schema.optionalKey<Schema.Literal<"path">>;
885
- }>;
886
- /**
887
- * A `types.<Name>` declaration (spec 4.2).
888
- * @public
889
- */
890
- export declare const TypeDeclaration: Schema.Struct<{
891
- readonly description: Schema.optionalKey<Schema.String>;
892
- readonly guidance: Schema.optionalKey<Schema.String>;
893
- readonly required: Schema.optionalKey<Schema.$Array<Schema.String>>;
894
- readonly require_verified: Schema.optionalKey<Schema.Boolean>;
895
- readonly fields: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
896
- readonly description: Schema.String;
897
- readonly values: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
898
- readonly kind: Schema.optionalKey<Schema.Literal<"path">>;
899
- }>>>;
900
- }>;
901
- /**
902
- * A `tags.<name>` declaration (spec 4.2).
903
- * @public
904
- */
905
- export declare const TagDeclaration: Schema.Struct<{
906
- readonly description: Schema.optionalKey<Schema.String>;
907
- }>;
908
958
  /**
909
959
  * The `[lint]` table: one optional `LintLevel` per lint code, snake_case (D-34).
910
960
  * @public
@@ -930,6 +980,7 @@ export declare const LintTable: Schema.Struct<{
930
980
  readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
931
981
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
932
982
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
983
+ readonly read_changed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
933
984
  readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
934
985
  readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
935
986
  readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -945,6 +996,13 @@ export declare const LintTable: Schema.Struct<{
945
996
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
946
997
  readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
947
998
  readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
999
+ readonly reference_not_mounted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1000
+ readonly reference_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1001
+ readonly reference_undeclared: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1002
+ readonly reference_local_only: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1003
+ readonly config_misplaced_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1004
+ readonly config_local_tracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1005
+ readonly bundle_config_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
948
1006
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
949
1007
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
950
1008
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -954,6 +1012,61 @@ export declare const LintTable: Schema.Struct<{
954
1012
  readonly value_unknown: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
955
1013
  readonly non_concept_unlisted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
956
1014
  }>;
1015
+ /**
1016
+ * `lifecycle.default_stale_after` codec: `^(\d+)(h|d|w)$` or Effect's
1017
+ * `"<n> <unit>"` form decodes to a `Duration` (D-30). Encoding emits the
1018
+ * shortest exact `w`/`d`/`h` spelling, otherwise `"<n> millis"`.
1019
+ *
1020
+ * @remarks
1021
+ * `@effected/toml` has no duration syntax and `Schema.DurationFromString`
1022
+ * rejects `"90d"`, so this is core's own codec (effected-yaml-toml-config-file-app.md §2).
1023
+ *
1024
+ * @public
1025
+ */
1026
+ export declare const StaleAfterDuration: Schema.Codec<Duration.Duration, string>;
1027
+ /**
1028
+ * A `types.<Name>.fields.<key>` declaration (spec 4.2): a description plus
1029
+ * either an enum of values with descriptions or `kind = "path"`.
1030
+ * @public
1031
+ */
1032
+ export declare const FieldDeclaration: Schema.Struct<{
1033
+ readonly description: Schema.String;
1034
+ readonly values: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
1035
+ readonly kind: Schema.optionalKey<Schema.Literal<"path">>;
1036
+ }>;
1037
+ /**
1038
+ * A `types.<Name>` declaration (spec 4.2).
1039
+ * @public
1040
+ */
1041
+ export declare const TypeDeclaration: Schema.Struct<{
1042
+ readonly description: Schema.optionalKey<Schema.String>;
1043
+ readonly guidance: Schema.optionalKey<Schema.String>;
1044
+ readonly required: Schema.optionalKey<Schema.$Array<Schema.String>>;
1045
+ readonly require_verified: Schema.optionalKey<Schema.Boolean>;
1046
+ readonly fields: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1047
+ readonly description: Schema.String;
1048
+ readonly values: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
1049
+ readonly kind: Schema.optionalKey<Schema.Literal<"path">>;
1050
+ }>>>;
1051
+ }>;
1052
+ /**
1053
+ * A `tags.<name>` declaration (spec 4.2).
1054
+ * @public
1055
+ */
1056
+ export declare const TagDeclaration: Schema.Struct<{
1057
+ readonly description: Schema.optionalKey<Schema.String>;
1058
+ }>;
1059
+ /**
1060
+ * What an agent may do with a bundle or checkout.
1061
+ *
1062
+ * @public
1063
+ */
1064
+ export declare const Access: Schema.Literals<readonly ["read", "read-write"]>;
1065
+ /**
1066
+ * The type of `Access`.
1067
+ * @public
1068
+ */
1069
+ export type Access = typeof Access.Type;
957
1070
  /**
958
1071
  * The `OkfitConfig` struct schema. Exported only so the `OkfitConfigFields`
959
1072
  * type below is reachable from the rollup; the barrel never re-exports this
@@ -962,7 +1075,9 @@ export declare const LintTable: Schema.Struct<{
962
1075
  */
963
1076
  declare const okfitConfigFields: Schema.Struct<{
964
1077
  readonly okf_version: Schema.optionalKey<Schema.String>;
1078
+ readonly repo: Schema.optionalKey<Schema.String>;
965
1079
  readonly bundle: Schema.optionalKey<Schema.Struct<{
1080
+ readonly name: Schema.optionalKey<Schema.String>;
966
1081
  readonly path: Schema.optionalKey<Schema.String>;
967
1082
  readonly profile: Schema.optionalKey<Schema.String>;
968
1083
  readonly non_concepts: Schema.optionalKey<Schema.$Array<Schema.String>>;
@@ -1001,6 +1116,7 @@ declare const okfitConfigFields: Schema.Struct<{
1001
1116
  readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1002
1117
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1003
1118
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1119
+ readonly read_changed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1004
1120
  readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1005
1121
  readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1006
1122
  readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -1016,6 +1132,13 @@ declare const okfitConfigFields: Schema.Struct<{
1016
1132
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1017
1133
  readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1018
1134
  readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1135
+ readonly reference_not_mounted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1136
+ readonly reference_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1137
+ readonly reference_undeclared: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1138
+ readonly reference_local_only: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1139
+ readonly config_misplaced_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1140
+ readonly config_local_tracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1141
+ readonly bundle_config_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1019
1142
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1020
1143
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1021
1144
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -1039,6 +1162,36 @@ declare const okfitConfigFields: Schema.Struct<{
1039
1162
  readonly tags: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1040
1163
  readonly description: Schema.optionalKey<Schema.String>;
1041
1164
  }>>>;
1165
+ readonly bundle_set: Schema.optionalKey<Schema.Struct<{
1166
+ readonly discover: Schema.$Array<Schema.String>;
1167
+ }>>;
1168
+ readonly bundles: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1169
+ readonly path: Schema.String;
1170
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["read", "read-write"]>>;
1171
+ }>>>;
1172
+ readonly checkouts: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1173
+ readonly repo: Schema.String;
1174
+ readonly path: Schema.String;
1175
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["submodule", "clone", "path"]>>;
1176
+ readonly branch: Schema.optionalKey<Schema.String>;
1177
+ readonly url: Schema.optionalKey<Schema.String>;
1178
+ readonly bundles: Schema.optionalKey<Schema.$Array<Schema.String>>;
1179
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["read", "read-write"]>>;
1180
+ readonly purpose: Schema.optionalKey<Schema.String>;
1181
+ readonly layout: Schema.optionalKey<Schema.String>;
1182
+ readonly start_here: Schema.optionalKey<Schema.String>;
1183
+ }>>>;
1184
+ readonly references: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1185
+ readonly repo: Schema.String;
1186
+ readonly path: Schema.optionalKey<Schema.String>;
1187
+ }>>>;
1188
+ readonly contribute: Schema.optionalKey<Schema.Struct<{
1189
+ readonly flow: Schema.optionalKey<Schema.Literals<readonly ["pull-request", "push"]>>;
1190
+ readonly branch: Schema.optionalKey<Schema.String>;
1191
+ readonly merge: Schema.optionalKey<Schema.Literals<readonly ["auto-squash", "squash", "none"]>>;
1192
+ readonly signed: Schema.optionalKey<Schema.Boolean>;
1193
+ readonly needs_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
1194
+ }>>;
1042
1195
  readonly extensions: Schema.$Record<Schema.String, Schema.Unknown>;
1043
1196
  }>;
1044
1197
  /**
@@ -1086,11 +1239,43 @@ export declare const SCHEMA_DIRECTIVE: string;
1086
1239
  */
1087
1240
  export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Struct<{
1088
1241
  readonly okf_version: Schema.optionalKey<Schema.String>;
1242
+ readonly repo: Schema.optionalKey<Schema.String>;
1089
1243
  readonly bundle: Schema.optionalKey<Schema.Struct<{
1244
+ readonly name: Schema.optionalKey<Schema.String>;
1090
1245
  readonly path: Schema.optionalKey<Schema.String>;
1091
1246
  readonly profile: Schema.optionalKey<Schema.String>;
1092
1247
  readonly non_concepts: Schema.optionalKey<Schema.$Array<Schema.String>>;
1093
1248
  }>>;
1249
+ readonly bundle_set: Schema.optionalKey<Schema.Struct<{
1250
+ readonly discover: Schema.$Array<Schema.String>;
1251
+ }>>;
1252
+ readonly bundles: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1253
+ readonly path: Schema.String;
1254
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["read", "read-write"]>>;
1255
+ }>>>;
1256
+ readonly checkouts: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1257
+ readonly repo: Schema.String;
1258
+ readonly path: Schema.String;
1259
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["submodule", "clone", "path"]>>;
1260
+ readonly branch: Schema.optionalKey<Schema.String>;
1261
+ readonly url: Schema.optionalKey<Schema.String>;
1262
+ readonly bundles: Schema.optionalKey<Schema.$Array<Schema.String>>;
1263
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["read", "read-write"]>>;
1264
+ readonly purpose: Schema.optionalKey<Schema.String>;
1265
+ readonly layout: Schema.optionalKey<Schema.String>;
1266
+ readonly start_here: Schema.optionalKey<Schema.String>;
1267
+ }>>>;
1268
+ readonly references: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
1269
+ readonly repo: Schema.String;
1270
+ readonly path: Schema.optionalKey<Schema.String>;
1271
+ }>>>;
1272
+ readonly contribute: Schema.optionalKey<Schema.Struct<{
1273
+ readonly flow: Schema.optionalKey<Schema.Literals<readonly ["pull-request", "push"]>>;
1274
+ readonly branch: Schema.optionalKey<Schema.String>;
1275
+ readonly merge: Schema.optionalKey<Schema.Literals<readonly ["auto-squash", "squash", "none"]>>;
1276
+ readonly signed: Schema.optionalKey<Schema.Boolean>;
1277
+ readonly needs_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
1278
+ }>>;
1094
1279
  readonly concepts: Schema.optionalKey<Schema.Struct<{
1095
1280
  readonly required: Schema.optionalKey<Schema.$Array<Schema.String>>;
1096
1281
  readonly tags: Schema.optionalKey<Schema.Struct<{
@@ -1125,6 +1310,7 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
1125
1310
  readonly config_okf_version_stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1126
1311
  readonly stale: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1127
1312
  readonly walk_unreadable: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1313
+ readonly read_changed: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1128
1314
  readonly frontmatter_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1129
1315
  readonly type_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1130
1316
  readonly symlink_escape: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -1140,6 +1326,13 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
1140
1326
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1141
1327
  readonly computation_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1142
1328
  readonly generated_at_future: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1329
+ readonly reference_not_mounted: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1330
+ readonly reference_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1331
+ readonly reference_undeclared: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1332
+ readonly reference_local_only: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1333
+ readonly config_misplaced_key: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1334
+ readonly config_local_tracked: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1335
+ readonly bundle_config_invalid: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1143
1336
  readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1144
1337
  readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
1145
1338
  readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
@@ -1198,7 +1391,9 @@ export declare const OkfitConfig: Schema.Codec<OkfitConfig, Record<string, unkno
1198
1391
  };
1199
1392
  declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitConfigFile, "@okfit/core/OkfitConfigFile", import("@effected/config-file").ConfigFileShape<{
1200
1393
  readonly okf_version?: string;
1394
+ readonly repo?: string;
1201
1395
  readonly bundle?: {
1396
+ readonly name?: string;
1202
1397
  readonly path?: string;
1203
1398
  readonly profile?: string;
1204
1399
  readonly non_concepts?: readonly string[];
@@ -1237,6 +1432,7 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
1237
1432
  readonly config_okf_version_stale?: "error" | "info" | "off" | "warn";
1238
1433
  readonly stale?: "error" | "info" | "off" | "warn";
1239
1434
  readonly walk_unreadable?: "error" | "info" | "off" | "warn";
1435
+ readonly read_changed?: "error" | "info" | "off" | "warn";
1240
1436
  readonly frontmatter_missing?: "error" | "info" | "off" | "warn";
1241
1437
  readonly type_missing?: "error" | "info" | "off" | "warn";
1242
1438
  readonly symlink_escape?: "error" | "info" | "off" | "warn";
@@ -1252,6 +1448,13 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
1252
1448
  readonly generated_missing?: "error" | "info" | "off" | "warn";
1253
1449
  readonly computation_missing?: "error" | "info" | "off" | "warn";
1254
1450
  readonly generated_at_future?: "error" | "info" | "off" | "warn";
1451
+ readonly reference_not_mounted?: "error" | "info" | "off" | "warn";
1452
+ readonly reference_missing?: "error" | "info" | "off" | "warn";
1453
+ readonly reference_undeclared?: "error" | "info" | "off" | "warn";
1454
+ readonly reference_local_only?: "error" | "info" | "off" | "warn";
1455
+ readonly config_misplaced_key?: "error" | "info" | "off" | "warn";
1456
+ readonly config_local_tracked?: "error" | "info" | "off" | "warn";
1457
+ readonly bundle_config_invalid?: "error" | "info" | "off" | "warn";
1255
1458
  readonly publication_drift?: "error" | "info" | "off" | "warn";
1256
1459
  readonly publication_orphan?: "error" | "info" | "off" | "warn";
1257
1460
  readonly surface_unmatched?: "error" | "info" | "off" | "warn";
@@ -1283,6 +1486,42 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
1283
1486
  readonly description?: string;
1284
1487
  };
1285
1488
  };
1489
+ readonly bundle_set?: {
1490
+ readonly discover: readonly string[];
1491
+ };
1492
+ readonly bundles?: {
1493
+ readonly [x: string]: {
1494
+ readonly path: string;
1495
+ readonly access?: "read" | "read-write";
1496
+ };
1497
+ };
1498
+ readonly checkouts?: {
1499
+ readonly [x: string]: {
1500
+ readonly repo: string;
1501
+ readonly path: string;
1502
+ readonly kind?: "clone" | "path" | "submodule";
1503
+ readonly branch?: string;
1504
+ readonly url?: string;
1505
+ readonly bundles?: readonly string[];
1506
+ readonly access?: "read" | "read-write";
1507
+ readonly purpose?: string;
1508
+ readonly layout?: string;
1509
+ readonly start_here?: string;
1510
+ };
1511
+ };
1512
+ readonly references?: {
1513
+ readonly [x: string]: {
1514
+ readonly repo: string;
1515
+ readonly path?: string;
1516
+ };
1517
+ };
1518
+ readonly contribute?: {
1519
+ readonly flow?: "pull-request" | "push";
1520
+ readonly branch?: string;
1521
+ readonly merge?: "auto-squash" | "none" | "squash";
1522
+ readonly signed?: boolean;
1523
+ readonly needs_approval?: readonly string[];
1524
+ };
1286
1525
  readonly extensions: {
1287
1526
  readonly [x: string]: unknown;
1288
1527
  };
@@ -1316,13 +1555,61 @@ export declare class OkfVersion {
1316
1555
  static readonly parse: (raw: string) => Option.Option<OkfVersionNumber>;
1317
1556
  /** Compares numerically, major first, so `0.10` sorts after `0.9`. */
1318
1557
  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`. */
1558
+ /**
1559
+ * The version the bundle-root `index.md` declares, as written; `None` when there is no root index or no `okf_version`.
1560
+ * An unquoted number is its source text (`0.10`, not `0.1`).
1561
+ */
1320
1562
  static readonly declared: (bundle: LoadedBundle) => Option.Option<string>;
1321
1563
  /** True when nothing is declared or the declared version parses and is 0.2 or earlier; an unparsable version reads as current. */
1322
1564
  static readonly allowsLegacyFallbacks: (declared: Option.Option<string>) => boolean;
1323
1565
  /** Whether the v0.2 fallbacks apply to this bundle: `allowsLegacyFallbacks(declared(bundle))`. */
1324
1566
  static readonly legacyFallbacks: (bundle: LoadedBundle) => boolean;
1325
1567
  }
1568
+ /** A parsed named reference: the declared reference name and the path inside its root. @public */
1569
+ interface NamedReference {
1570
+ readonly name: string;
1571
+ readonly path: string;
1572
+ }
1573
+ /**
1574
+ * Named-reference parsing: `name:path` where `name` is a declared reference root.
1575
+ * URL schemes are reserved so a link such as `https://x.dev` is never read as a reference. @public
1576
+ */
1577
+ export declare class Reference {
1578
+ private constructor();
1579
+ /** URL schemes a reference name may not take. */
1580
+ static readonly RESERVED_SCHEMES: ReadonlySet<string>;
1581
+ /**
1582
+ * The shape of a valid name, as a Unicode-mode RegExp so a JSON Schema `pattern` can be derived from it.
1583
+ * The reserved schemes are excluded separately, by {@link Reference.isValidName}.
1584
+ */
1585
+ static readonly NAME_PATTERN: RegExp;
1586
+ /** Lower-case letter first, then letters, digits or hyphens, two to 32 characters, not reserved; two characters minimum so a drive letter is never a name. */
1587
+ static readonly isValidName: (name: string) => boolean;
1588
+ /** `Some` only when the text before the first `:` is a declared name and the rest does not start with `//`. */
1589
+ static readonly parse: (value: string, names: ReadonlySet<string>) => Option.Option<NamedReference>;
1590
+ }
1591
+ /**
1592
+ * Canonical repository identity: `host/owner/name`, lower-case, with no `.git` suffix and no trailing slash.
1593
+ * Accepts `owner/name` shorthand (GitHub), URL remotes (user, port and `[::1]` hosts allowed), and scp-like
1594
+ * `git@host:owner/name` remotes. Pure string work with no `node:` imports. @public
1595
+ *
1596
+ * @remarks
1597
+ * The address is read by `GitRemote.parseIdentity` from `@effected/git` (URL, scp or path form, as git reads it, so
1598
+ * an IPv6 literal and the scp-versus-path ambiguity are decided there) with `defaultHost: "github.com"`,
1599
+ * `foldCase: "always"`, `minSegments: 2` and `strict: true`: a scheme-less path is exactly `owner/name` shorthand or
1600
+ * `host/owner/name`, and the path needs at least two segments after the host. okfit's own rule is the pre-check: a value
1601
+ * carrying whitespace, `?` or `#` does not normalise, and a run of trailing slashes is collapsed to one before the kit
1602
+ * reads it (`strict` takes one on a URL, scp or scheme-less `host/owner/name/` address, and the shorthand `owner/name/` has no identity). Under `strict` an empty, bare `.git` or doubled-`.git` name has no
1603
+ * identity either. An owner containing a dot is not shorthand (`my.group/proj`), because the kit reads a first segment
1604
+ * holding a dot as a host; it needs its host spelled out, as in `gitlab.com/my.group/proj`.
1605
+ */
1606
+ export declare class RepoIdentity {
1607
+ private constructor();
1608
+ /** The canonical identity of a repository reference, or `None` when it does not normalise. */
1609
+ static readonly normalize: (value: string) => Option.Option<string>;
1610
+ /** True when both values normalize and the identities match. */
1611
+ static readonly equals: (a: string, b: string) => boolean;
1612
+ }
1326
1613
  /**
1327
1614
  * A decoded OKF timestamp: always a UTC instant.
1328
1615
  * @public
@@ -1363,5 +1650,5 @@ export declare class Validate {
1363
1650
  * @public
1364
1651
  */
1365
1652
  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 };
1653
+ export type { ActorForm, BundleLoadError, BundleLoadOptions, EntryFamily, FallbackRule, GraphEdge, GraphLink, GraphNode, LinkResolution, LogEntry, MalformedStaleAfter, NamedReference, OkfVersionNumber, OkfitConfigFields, PathField, RenderIndexOptions, StaleConcept, ValidateOptions, ValidationReport };
1367
1654
  //# sourceMappingURL=index.d.ts.map