@okfit/engine 0.16.3 → 0.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/config/anchor.js +1 -2
  2. package/config/layer.js +1 -2
  3. package/config/resolve.js +1 -2
  4. package/context/run.js +1 -2
  5. package/edits/FrontmatterEdits.js +1 -2
  6. package/errors.js +1 -2
  7. package/external/ExternalReferences.js +1 -2
  8. package/graph/run.js +1 -2
  9. package/index.d.ts +0 -80
  10. package/init/scaffold.js +1 -2
  11. package/move/references.js +1 -2
  12. package/move/run.js +1 -2
  13. package/overlay/documents.js +1 -2
  14. package/overlay/layer.js +1 -2
  15. package/package.json +18 -18
  16. package/platform.js +1 -2
  17. package/query/ConceptQuery.js +1 -2
  18. package/render/context.js +1 -2
  19. package/render/distribution.js +1 -2
  20. package/render/exit.js +1 -2
  21. package/render/graph.js +1 -2
  22. package/render/json.js +1 -2
  23. package/render/move.js +1 -2
  24. package/render/query.js +1 -2
  25. package/render/sort.js +1 -2
  26. package/render/stale.js +1 -2
  27. package/render/sync.js +1 -2
  28. package/render/verify.js +1 -2
  29. package/session/BundleSession.js +1 -2
  30. package/session/concept.js +1 -2
  31. package/session/diff.js +1 -2
  32. package/session/range.js +2 -3
  33. package/stale/run.js +1 -2
  34. package/sync/generated.js +1 -2
  35. package/sync/index.js +1 -2
  36. package/sync/log.js +1 -2
  37. package/sync/publication.js +1 -2
  38. package/sync/run.js +1 -2
  39. package/sync/write.js +1 -2
  40. package/targets/inside.js +1 -2
  41. package/targets/resolve.js +1 -2
  42. package/trust/run.js +1 -2
  43. package/validate/resources.js +1 -2
  44. package/validate/run.js +1 -2
  45. package/validate/surfaces.js +1 -2
  46. package/verify/diff.js +1 -2
  47. package/verify/integrity.js +1 -2
  48. package/verify/locate.js +1 -2
  49. package/verify/revoke.js +1 -2
  50. package/verify/run.js +1 -2
  51. package/verify/select.js +1 -2
  52. package/verify/splice.js +1 -2
  53. package/version.js +2 -3
package/config/anchor.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/config/anchor.ts
1
+ // src/config/anchor.ts
2
2
  /**
3
3
  * The explicit `--config` anchor rule (C-8): the parent of `.config` "if the
4
4
  * file sits in a `.config` directory, else the file's directory", with no
@@ -53,5 +53,4 @@ const resolveProjectRoot = (input) => {
53
53
  */
54
54
  const resolveBundleRoot = (projectRoot, config, path) => path.resolve(projectRoot, config.bundle?.path ?? "okf");
55
55
 
56
- //#endregion
57
56
  export { resolveBundleRoot, resolveProjectRoot };
package/config/layer.js CHANGED
@@ -4,7 +4,7 @@ import { ConfigCodecError, ConfigResolver, ConfigValidationError, MergeStrategy,
4
4
  import { OkfitConfig, OkfitConfigFile } from "@okfit/core";
5
5
  import { Cause, Effect, FileSystem, Option, Result } from "effect";
6
6
 
7
- //#region src/config/layer.ts
7
+ // src/config/layer.ts
8
8
  /**
9
9
  * The `OkfitConfigFile` layer for one invocation (K-9 to K-11, K-57, C-6),
10
10
  * now one `AppConfig.layer(OkfitConfigFile, ...)` call in both branches; only
@@ -125,5 +125,4 @@ const provideConfig = (options) => (effect) => Effect.gen(function* () {
125
125
  }));
126
126
  });
127
127
 
128
- //#endregion
129
128
  export { buildConfigLayer, provideConfig };
package/config/resolve.js CHANGED
@@ -3,7 +3,7 @@ import { OKF_SPEC_VERSION, OkfitConfig, OkfitConfigFile } from "@okfit/core";
3
3
  import { Console, Effect, Option, Path } from "effect";
4
4
  import { Profiles } from "@okfit/profiles";
5
5
 
6
- //#region src/config/resolve.ts
6
+ // src/config/resolve.ts
7
7
  /**
8
8
  * `OkfitConfig.DEFAULTS.bundle.profile` is `"software-project"` at runtime
9
9
  * (the frozen literal always sets it), but `bundle` and `profile` are both
@@ -63,5 +63,4 @@ const resolveProjectConfig = (input) => Effect.gen(function* () {
63
63
  };
64
64
  });
65
65
 
66
- //#endregion
67
66
  export { DEFAULT_PROFILE_NAME, resolveProjectConfig };
package/context/run.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Effect, FileSystem, Path } from "effect";
2
2
 
3
- //#region src/context/run.ts
3
+ // src/context/run.ts
4
4
  /**
5
5
  * The whole of `context`'s filesystem work: join `index.md` onto the bundle
6
6
  * root and stat it. Loading a bundle and running conformance/lint checks
@@ -31,5 +31,4 @@ const runContext = (options) => Effect.gen(function* () {
31
31
  };
32
32
  });
33
33
 
34
- //#endregion
35
34
  export { runContext };
@@ -5,7 +5,7 @@ import { DiagnosticRange } from "@okfit/core";
5
5
  import { Effect, Result, Runtime, Schema } from "effect";
6
6
  import { MarkdownDocument, MarkdownEdit } from "@effected/markdown";
7
7
 
8
- //#region src/edits/FrontmatterEdits.ts
8
+ // src/edits/FrontmatterEdits.ts
9
9
  /**
10
10
  * A top-level frontmatter key `FrontmatterEdits` was asked to edit turned
11
11
  * out to be a shape it cannot splice: `shape` is whichever locator string
@@ -203,5 +203,4 @@ var FrontmatterEdits = class {
203
203
  });
204
204
  };
205
205
 
206
- //#endregion
207
206
  export { FrontmatterEdits, UnsupportedFrontmatterError };
package/errors.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Runtime, Schema } from "effect";
2
2
 
3
- //#region src/errors.ts
3
+ // src/errors.ts
4
4
  /**
5
5
  * `--config <path>` named a path that does not exist. Every `ConfigResolver`
6
6
  * has a `never` error channel and `explicitPath` absorbs a missing target
@@ -348,5 +348,4 @@ var MoveError = class extends Schema.TaggedError()("MoveError", {
348
348
  }
349
349
  };
350
350
 
351
- //#endregion
352
351
  export { ConfigMalformedError, ConfigPathNotFoundError, DocumentPathError, InitOverwriteError, MoveError, QueryConceptNotFoundError, QuerySelectionError, QueryUnknownVocabularyError, SyncPlanStaleError, SyncPublicationConflictError, SyncStagedLogError, TargetFailure, TargetResolutionError, VerifyConceptNotFoundError, VerifyNothingToRevokeError, VerifySelectionError, VerifyUnsupportedFrontmatterError };
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect, Layer, Option, Schema } from "effect";
2
2
 
3
- //#region src/external/ExternalReferences.ts
3
+ // src/external/ExternalReferences.ts
4
4
  /**
5
5
  * Reachability of an external reference: `unknown` means never checked.
6
6
  *
@@ -37,5 +37,4 @@ var ExternalReferences = class ExternalReferences extends Context.Service()("@ok
37
37
  })) });
38
38
  };
39
39
 
40
- //#endregion
41
40
  export { ExternalReferences, ReferenceCheck, ReferenceState };
package/graph/run.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Bundle, Graph } from "@okfit/core";
2
2
  import { Effect } from "effect";
3
3
 
4
- //#region src/graph/run.ts
4
+ // src/graph/run.ts
5
5
  /**
6
6
  * Load the bundle and build its link graph (D-6, D-26). Pure over the
7
7
  * loaded bundle once loading succeeds; `okfit graph` always exits `0`.
@@ -16,5 +16,4 @@ const runGraph = (options) => Effect.gen(function* () {
16
16
  };
17
17
  });
18
18
 
19
- //#endregion
20
19
  export { runGraph };
package/index.d.ts CHANGED
@@ -9,7 +9,6 @@ import * as NodeServices from "@effect/platform-node/NodeServices";
9
9
  import { Distribution as Distribution$1 } from "@effected/engine";
10
10
  import { Git, GitCommandError, UnknownRefError } from "@effected/git";
11
11
  import { ChildProcessSpawner } from "effect/process";
12
- //#region src/config/anchor.d.ts
13
12
  /**
14
13
  * What {@link resolveProjectRoot} needs about the winning discovery source
15
14
  * (K-12, K-58). Narrower than `@effected/config-file`'s own
@@ -70,8 +69,6 @@ export declare const resolveProjectRoot: (input: {
70
69
  * @public
71
70
  */
72
71
  export declare const resolveBundleRoot: (projectRoot: string, config: OkfitConfig, path: Path.Path) => string;
73
- //#endregion
74
- //#region src/errors.d.ts
75
72
  declare const ConfigPathNotFoundError_base: Schema.Class<ConfigPathNotFoundError, Schema.TaggedStruct<"ConfigPathNotFoundError", {
76
73
  readonly path: Schema.String;
77
74
  }>, import("effect/Cause").YieldableError>;
@@ -339,8 +336,6 @@ export declare class MoveError extends MoveError_base {
339
336
  readonly [Runtime.errorExitCode] = 64;
340
337
  get message(): string;
341
338
  }
342
- //#endregion
343
- //#region src/config/layer.d.ts
344
339
  /**
345
340
  * The `OkfitConfigFile` layer for one invocation (K-9 to K-11, K-57, C-6),
346
341
  * now one `AppConfig.layer(OkfitConfigFile, ...)` call in both branches; only
@@ -425,8 +420,6 @@ export declare const provideConfig: (options: {
425
420
  readonly discoveryCwd: string;
426
421
  readonly systemConfigDir?: string;
427
422
  }) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | ConfigPathNotFoundError | ConfigMalformedError | PlatformError.PlatformError, Exclude<R, OkfitConfigFile> | FileSystem.FileSystem | Path.Path | AppDirs | Xdg>;
428
- //#endregion
429
- //#region src/config/resolve.d.ts
430
423
  /**
431
424
  * `OkfitConfig.DEFAULTS.bundle.profile` is `"software-project"` at runtime
432
425
  * (the frozen literal always sets it), but `bundle` and `profile` are both
@@ -481,8 +474,6 @@ interface ResolveProjectConfigInput {
481
474
  * @public
482
475
  */
483
476
  export declare const resolveProjectConfig: (input: ResolveProjectConfigInput) => Effect.Effect<ResolvedProjectConfig, ConfigReadError, OkfitConfigFile | Path.Path>;
484
- //#endregion
485
- //#region src/context/run.d.ts
486
477
  /** @public */
487
478
  interface ContextRunOptions {
488
479
  readonly bundleRoot: string;
@@ -513,8 +504,6 @@ interface ContextResult {
513
504
  * @public
514
505
  */
515
506
  export declare const runContext: (options: ContextRunOptions) => Effect.Effect<ContextResult, never, FileSystem.FileSystem | Path.Path>;
516
- //#endregion
517
- //#region src/edits/FrontmatterEdits.d.ts
518
507
  declare const UnsupportedFrontmatterError_base: Schema.Class<UnsupportedFrontmatterError, Schema.TaggedStruct<"UnsupportedFrontmatterError", {
519
508
  readonly key: Schema.String;
520
509
  readonly shape: Schema.String;
@@ -585,8 +574,6 @@ export declare class FrontmatterEdits {
585
574
  */
586
575
  static readonly rendersDigests: (source: string, digests: ReadonlyArray<string | undefined>) => Effect.Effect<ReadonlyArray<MarkdownEdit>, YamlParseError | UnsupportedFrontmatterError>;
587
576
  }
588
- //#endregion
589
- //#region src/external/ExternalReferences.d.ts
590
577
  /**
591
578
  * Reachability of an external reference: `unknown` means never checked.
592
579
  *
@@ -621,8 +608,6 @@ export declare class ExternalReferences extends ExternalReferences_base {
621
608
  /** Answers `unknown`, never checked, for every url. */
622
609
  static readonly layerNoop: Layer.Layer<ExternalReferences>;
623
610
  }
624
- //#endregion
625
- //#region src/graph/run.d.ts
626
611
  /** @public */
627
612
  interface GraphRunOptions {
628
613
  /** Absolute bundle root; `Bundle.load` never reads cwd (D-8). */
@@ -640,8 +625,6 @@ interface GraphRunResult {
640
625
  * @public
641
626
  */
642
627
  export declare const runGraph: (options: GraphRunOptions) => Effect.Effect<GraphRunResult, BundleLoadError, FileSystem.FileSystem | Path.Path>;
643
- //#endregion
644
- //#region src/init/scaffold.d.ts
645
628
  /** `.config/okfit.toml`, relative to the project root (C-10). @public */
646
629
  export declare const CONFIG_RELATIVE_PATH = ".config/okfit.toml";
647
630
  /** @public */
@@ -706,8 +689,6 @@ export declare const targetPaths: (options: ScaffoldOptions) => ReadonlyArray<st
706
689
  * @public
707
690
  */
708
691
  export declare const files: (options: ScaffoldOptions) => Effect.Effect<ReadonlyArray<ScaffoldFile>, MarkdownParseError | FrontmatterWriteError>;
709
- //#endregion
710
- //#region src/move/references.d.ts
711
692
  /**
712
693
  * One reference's value text inside a file: whole-file offsets, quotes excluded. `field` is set for
713
694
  * the frontmatter fields core resolves with path-field rules (`resource`, `sources.resource`, ...).
@@ -767,8 +748,6 @@ export declare const rewriteReference: (raw: string, options: {
767
748
  /** The reference is a body link inside angle brackets, so its path may hold whitespace. */
768
749
  readonly angle?: boolean;
769
750
  }) => string | undefined;
770
- //#endregion
771
- //#region src/move/run.d.ts
772
751
  /**
773
752
  * What `okfit mv` will do. `from` and `to` are bundle-relative `.md` paths, `fromPath` and `toPath`
774
753
  * their absolute forms. `edits` holds the post-move path, the edit count and the full new text of
@@ -827,8 +806,6 @@ export declare const runMove: (options: RunMoveOptions) => Effect.Effect<{
827
806
  readonly bundleRoot: string;
828
807
  readonly dryRun: boolean;
829
808
  }, PlanError, Crypto.Crypto | FileSystem.FileSystem | Path.Path>;
830
- //#endregion
831
- //#region src/overlay/documents.d.ts
832
809
  /**
833
810
  * One unsaved document: `path` is bundle-relative posix (`metrics/churn.md`),
834
811
  * `text` the full file contents.
@@ -860,8 +837,6 @@ export declare const resolveDocumentPath: (path: Path.Path, root: string, relati
860
837
  * @public
861
838
  */
862
839
  export declare const provideDocuments: (root: string, documents: ReadonlyArray<DocumentInput>) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E | DocumentPathError, R | FileSystem.FileSystem | Path.Path>;
863
- //#endregion
864
- //#region src/overlay/layer.d.ts
865
840
  /**
866
841
  * One open, possibly unsaved, document: its full text and the editor's version.
867
842
  *
@@ -916,8 +891,6 @@ export declare const makeOverlayFileSystem: (underlying: FileSystem.FileSystem,
916
891
  * @public
917
892
  */
918
893
  export declare const layerOverlayFileSystem: Layer.Layer<FileSystem.FileSystem, never, FileSystem.FileSystem | OverlayDocuments>;
919
- //#endregion
920
- //#region src/platform.d.ts
921
894
  /**
922
895
  * K-9/K-11: `AppDirs.layer(options)` requires `Xdg | FileSystem | Path`, so
923
896
  * `Layer.provide(Xdg.layer)` alone does not close it.
@@ -934,8 +907,6 @@ export declare const layerOverlayFileSystem: Layer.Layer<FileSystem.FileSystem,
934
907
  * @public
935
908
  */
936
909
  export declare const OkfitPlatform: Layer.Layer<AppDirs | Xdg | NodeServices.NodeServices, import("@effected/xdg").XdgEnvError, never>;
937
- //#endregion
938
- //#region src/query/ConceptQuery.d.ts
939
910
  /**
940
911
  * Filter for {@link ConceptQuery.list}. Every field is optional; an absent
941
912
  * field does not constrain.
@@ -994,8 +965,6 @@ export declare const ConceptQuery: {
994
965
  readonly incoming: ReadonlyArray<ConceptNeighbor>;
995
966
  }, QueryConceptNotFoundError>;
996
967
  };
997
- //#endregion
998
- //#region src/render/context.d.ts
999
968
  /** One enumerated value of a `fields[]` entry. @public */
1000
969
  export declare const ContextFieldValue: Schema.Struct<{
1001
970
  readonly name: Schema.String;
@@ -1165,8 +1134,6 @@ export declare const contextEnvelope: (input: {
1165
1134
  /** Present only under `--trust`; absent becomes `null` on the wire. */
1166
1135
  readonly trust?: ContextTrust;
1167
1136
  }) => ContextEnvelope;
1168
- //#endregion
1169
- //#region src/render/distribution.d.ts
1170
1137
  /**
1171
1138
  * The meta-package an okfit report's bins were installed through -- e.g.
1172
1139
  * `@okfit/plugin` -- threaded into `main(options)` by that package's bin
@@ -1190,8 +1157,6 @@ export declare const DistributionField: import("effect/Schema").NullOr<import("e
1190
1157
  }>>;
1191
1158
  /** @public */
1192
1159
  export type DistributionField = typeof DistributionField.Type;
1193
- //#endregion
1194
- //#region src/render/sort.d.ts
1195
1160
  /** Which producer a diagnostic came from; the JSON envelope's `source` (K-21). @public */
1196
1161
  type DiagnosticSource = "core.conformance" | "core.lint" | "profile";
1197
1162
  /**
@@ -1230,8 +1195,6 @@ export declare const collect: (conformance: ReadonlyArray<Diagnostic>, lint: Rea
1230
1195
  * @public
1231
1196
  */
1232
1197
  export declare const sort: (diagnostics: ReadonlyArray<RenderedDiagnostic>) => ReadonlyArray<RenderedDiagnostic>;
1233
- //#endregion
1234
- //#region src/render/exit.d.ts
1235
1198
  /** @public */
1236
1199
  interface Tally {
1237
1200
  readonly conformanceErrors: number;
@@ -1260,8 +1223,6 @@ export declare const tally: (diagnostics: ReadonlyArray<RenderedDiagnostic>) =>
1260
1223
  * @public
1261
1224
  */
1262
1225
  export declare const forDiagnostics: (diagnostics: ReadonlyArray<RenderedDiagnostic>) => 0 | 1 | 2;
1263
- //#endregion
1264
- //#region src/render/graph.d.ts
1265
1226
  /** One entry of the `nodes` array. @public */
1266
1227
  export declare const GraphNodeEnvelope: Schema.Struct<{
1267
1228
  readonly id: Schema.String;
@@ -1339,8 +1300,6 @@ export declare const graphEnvelope: (input: {
1339
1300
  readonly edges: ReadonlyArray<GraphLink>;
1340
1301
  readonly distribution?: Distribution;
1341
1302
  }) => GraphEnvelope;
1342
- //#endregion
1343
- //#region src/render/json.d.ts
1344
1303
  /** One entry of the `diagnostics` array (K-21). @public */
1345
1304
  export declare const JsonDiagnostic: Schema.Struct<{
1346
1305
  readonly source: Schema.Literals<readonly ["core.conformance", "core.lint", "profile"]>;
@@ -1457,8 +1416,6 @@ export declare const json: (input: {
1457
1416
  }) => JsonEnvelope;
1458
1417
  /** K-22. `tag` is the error's `_tag` when it has one, else its constructor name. @public */
1459
1418
  export declare const jsonError: (error: unknown, okfitVersion: string, distribution?: Distribution) => JsonErrorEnvelope;
1460
- //#endregion
1461
- //#region src/render/move.d.ts
1462
1419
  /**
1463
1420
  * `okfit mv`'s success envelope, schema 1, snake_case. `from`/`to` are bundle-relative paths, `path`
1464
1421
  * the display form of the destination; `edits` lists every file that changes (post-move path) with
@@ -1505,8 +1462,6 @@ export declare const moveEnvelope: (input: {
1505
1462
  readonly drifts: ReadonlyArray<string>;
1506
1463
  readonly distribution?: Distribution;
1507
1464
  }) => MoveEnvelope;
1508
- //#endregion
1509
- //#region src/render/query.d.ts
1510
1465
  /**
1511
1466
  * Why a human verification no longer binds, as the wire reports it. `edited_by`
1512
1467
  * and `edited_at` are the latest human entry's actor and instant, `null` when
@@ -1706,8 +1661,6 @@ export declare const queryNeighborsEnvelope: (input: {
1706
1661
  readonly incoming: ReadonlyArray<QueryNeighbor>;
1707
1662
  readonly distribution?: Distribution;
1708
1663
  }) => QueryNeighborsEnvelope;
1709
- //#endregion
1710
- //#region src/render/stale.d.ts
1711
1664
  /** One entry of the `items` array. @public */
1712
1665
  export declare const StaleItem: Schema.Struct<{
1713
1666
  readonly id: Schema.String;
@@ -1775,8 +1728,6 @@ export declare const staleEnvelope: (input: {
1775
1728
  readonly items: ReadonlyArray<StaleConcept>;
1776
1729
  readonly distribution?: Distribution;
1777
1730
  }) => StaleEnvelope;
1778
- //#endregion
1779
- //#region src/sync/write.d.ts
1780
1731
  /**
1781
1732
  * A write a sync mode would perform: the plan half of plan/apply. `target` is
1782
1733
  * the absolute path handed to `writeAtomic`; `contents` the full text. `before`
@@ -1791,8 +1742,6 @@ interface PendingWrite {
1791
1742
  readonly contents: string;
1792
1743
  readonly before?: string | null;
1793
1744
  }
1794
- //#endregion
1795
- //#region src/sync/run.d.ts
1796
1745
  /** The three families `okfit sync` regenerates (contract §5). @public */
1797
1746
  type SyncMode = "generated" | "index" | "log";
1798
1747
  /**
@@ -1896,8 +1845,6 @@ export declare const applySyncPlan: (plan: SyncPlan) => Effect.Effect<{
1896
1845
  * @public
1897
1846
  */
1898
1847
  export declare const runSync: (options: SyncOptions) => Effect.Effect<SyncResult, BundleLoadError | GeneratedAtError | SyncStagedLogError | SyncPlanStaleError, Git | GitHistory | FileSystem.FileSystem | Path.Path | Crypto.Crypto>;
1899
- //#endregion
1900
- //#region src/render/sync.d.ts
1901
1848
  /** @public */
1902
1849
  export declare const SyncModeEnvelope: Schema.Struct<{
1903
1850
  readonly selected: Schema.Boolean;
@@ -2006,8 +1953,6 @@ export declare const syncEnvelope: (input: {
2006
1953
  readonly publication?: PublicationEnvelope;
2007
1954
  readonly distribution?: Distribution;
2008
1955
  }) => SyncEnvelope;
2009
- //#endregion
2010
- //#region src/verify/select.d.ts
2011
1956
  /**
2012
1957
  * Why a candidate concept was skipped by batch selection: `"draft"` and
2013
1958
  * `"deprecated"` mirror `status`, `"already-verified"` means the actor's
@@ -2093,8 +2038,6 @@ export declare const selectStaleCandidates: (bundle: LoadedBundle, items: Readon
2093
2038
  * @public
2094
2039
  */
2095
2040
  export declare const resolveBatchTypes: (config: OkfitConfig, types: ReadonlyArray<string>) => Effect.Effect<ReadonlySet<string>, VerifySelectionError>;
2096
- //#endregion
2097
- //#region src/render/verify.d.ts
2098
2041
  /**
2099
2042
  * V-11's success envelope, schema 1, snake_case — the same convention as
2100
2043
  * `render/json.ts`'s `JsonEnvelope`. Identical in shape for a dry run,
@@ -2245,8 +2188,6 @@ export declare const revokeEnvelope: (input: {
2245
2188
  readonly dryRun: boolean;
2246
2189
  readonly distribution?: Distribution;
2247
2190
  }) => RevokeEnvelope;
2248
- //#endregion
2249
- //#region src/session/BundleSession.d.ts
2250
2191
  /**
2251
2192
  * One bundle root's fixed inputs; `config` and `profile` come from the caller's
2252
2193
  * `resolveProjectConfig`.
@@ -2329,8 +2270,6 @@ export declare class BundleSession extends BundleSession_base {
2329
2270
  /** Build a session; the returned operations need no services. */
2330
2271
  static readonly make: (options: BundleSessionOptions) => Effect.Effect<BundleSessionShape, never, BundleSessionServices>;
2331
2272
  }
2332
- //#endregion
2333
- //#region src/session/concept.d.ts
2334
2273
  /**
2335
2274
  * The loaded concept at `absolutePath`, if any. `absolutePath` must already sit under
2336
2275
  * `bundle.root` (a real resolved path, never re-resolved here: `@okfit/core`'s own
@@ -2343,8 +2282,6 @@ export declare class BundleSession extends BundleSession_base {
2343
2282
  * @public
2344
2283
  */
2345
2284
  export declare const conceptFor: (bundle: LoadedBundle, absolutePath: string) => Option.Option<LoadedConcept>;
2346
- //#endregion
2347
- //#region src/session/range.d.ts
2348
2285
  /**
2349
2286
  * Give a range-less diagnostic somewhere to point (spec 4.3): the concept's
2350
2287
  * frontmatter block when the file loaded as a concept with frontmatter, else a
@@ -2356,8 +2293,6 @@ export declare const conceptFor: (bundle: LoadedBundle, absolutePath: string) =>
2356
2293
  * @public
2357
2294
  */
2358
2295
  export declare const withFallbackRange: (bundle: LoadedBundle, diagnostic: RenderedDiagnostic) => RenderedDiagnostic;
2359
- //#endregion
2360
- //#region src/stale/run.d.ts
2361
2296
  /** @public */
2362
2297
  interface StaleRunOptions {
2363
2298
  /** Absolute bundle root; `Bundle.load` never reads cwd (D-8). */
@@ -2380,8 +2315,6 @@ interface StaleRunResult {
2380
2315
  * @public
2381
2316
  */
2382
2317
  export declare const runStale: (options: StaleRunOptions) => Effect.Effect<StaleRunResult, BundleLoadError, FileSystem.FileSystem | Path.Path>;
2383
- //#endregion
2384
- //#region src/sync/publication.d.ts
2385
2318
  declare const PublicationNotFoundError_base: Schema.Class<PublicationNotFoundError, Schema.TaggedStruct<"PublicationNotFoundError", {
2386
2319
  readonly id: Schema.String;
2387
2320
  readonly publication: Schema.optionalKey<Schema.String>;
@@ -2423,8 +2356,6 @@ export declare const stampPublication: (options: {
2423
2356
  readonly id: string;
2424
2357
  readonly dryRun: boolean;
2425
2358
  }) => Effect.Effect<PublicationEnvelope, PublicationNotFoundError | NotAPublicationError | BundleLoadError | YamlParseError | UnsupportedFrontmatterError | PlatformError.PlatformError, FileSystem.FileSystem | Path.Path | Crypto.Crypto>;
2426
- //#endregion
2427
- //#region src/targets/resolve.d.ts
2428
2359
  /**
2429
2360
  * One resolved concept target: the argument as typed, the bundle-relative
2430
2361
  * posix file path, and the concept id (absent only for a non-concept file
@@ -2456,8 +2387,6 @@ export declare class Targets {
2456
2387
  /** The nearest concept id to `arg`: a unique basename match first, else the closest by edit distance. */
2457
2388
  static readonly suggest: (arg: string, bundle: LoadedBundle) => string | undefined;
2458
2389
  }
2459
- //#endregion
2460
- //#region src/trust/run.d.ts
2461
2390
  /** @public */
2462
2391
  interface ContextTrustOptions {
2463
2392
  readonly bundleRoot: string;
@@ -2476,8 +2405,6 @@ interface ContextTrustOptions {
2476
2405
  * @public
2477
2406
  */
2478
2407
  export declare const runContextTrust: (options: ContextTrustOptions) => Effect.Effect<ContextTrust, BundleLoadError | PlatformError.PlatformError, FileSystem.FileSystem | Path.Path | Crypto.Crypto>;
2479
- //#endregion
2480
- //#region src/validate/run.d.ts
2481
2408
  declare const Now_base: Context.ServiceClass<Now, "@okfit/engine/Now", DateTime.Utc>;
2482
2409
  /**
2483
2410
  * K-47's ambient clock. `bin.ts` resolves `OKFIT_NOW` (or the wall clock)
@@ -2561,8 +2488,6 @@ interface RunResult {
2561
2488
  * @public
2562
2489
  */
2563
2490
  export declare const run: (options: RunOptions) => Effect.Effect<RunResult, BundleLoadError | GitHistoryError | GitCommandError | UnknownRefError | PlatformError.PlatformError, FileSystem.FileSystem | Path.Path | Git | GitHistory | Crypto.Crypto>;
2564
- //#endregion
2565
- //#region src/verify/diff.d.ts
2566
2491
  /**
2567
2492
  * What changed in a concept file since a human last verified it.
2568
2493
  *
@@ -2619,8 +2544,6 @@ export declare const changeSince: (options: {
2619
2544
  baseline: string;
2620
2545
  patch: string;
2621
2546
  }, GitCommandError, ChildProcessSpawner.ChildProcessSpawner | Git | Path.Path>;
2622
- //#endregion
2623
- //#region src/verify/run.d.ts
2624
2547
  /** @internal */
2625
2548
  interface VerifyOptions {
2626
2549
  readonly id: string;
@@ -2958,8 +2881,6 @@ export declare const loadStaleCandidates: (options: PickerCandidatesOptions & {
2958
2881
  * @public
2959
2882
  */
2960
2883
  export declare const loadPreviews: (candidates: readonly PickerCandidate[]) => Effect.Effect<ReadonlyMap<string, ChangeSince>, never, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("@effected/git").Git | Path.Path>;
2961
- //#endregion
2962
- //#region src/version.d.ts
2963
2884
  /**
2964
2885
  * The version this engine reports as `engine_version` in every JSON
2965
2886
  * envelope. `@savvy-web/bundler` replaces `process.env.__PACKAGE_VERSION__`
@@ -2973,6 +2894,5 @@ export declare const loadPreviews: (candidates: readonly PickerCandidate[]) => E
2973
2894
  * @public
2974
2895
  */
2975
2896
  export declare const ENGINE_VERSION: string;
2976
- //#endregion
2977
2897
  export type { AttestableSelection, BundleSessionOptions, BundleSessionServices, BundleSessionShape, ChangeSince, ConceptFilter, ConceptLink, ConceptNeighbor, ContextResult, ContextRunOptions, ContextTrustOptions, DiagnosticSource, DiscoveredConfig, Distribution, DocumentInput, DriftInspection, ExternalReferencesShape, GraphRunOptions, GraphRunResult, MovePlan, OverlayDocument, OverlayDocumentsShape, PendingWrite, PickerCandidate, PickerCandidatesOptions, PlanError, PlanMoveOptions, Reference, RenderedDiagnostic, ResolveProjectConfigInput, ResolvedProjectConfig, ResolvedTarget, RevalidateError, RevalidateOptions, RevalidateResult, RevalidateTier, RevokeIdsOptions, RevokeOptions, RevokeResult, RunMoveOptions, RunOptions, RunResult, ScaffoldFile, ScaffoldOptions, StaleRunOptions, StaleRunResult, SyncMode, SyncModeResult, SyncOptions, SyncPlan, SyncResult, Tally, UnlocatableReference, VerifyBatchOptions, VerifyBatchResult, VerifyBatchSkipReason, VerifyIdsOptions, VerifyOptions, VerifyResult, WatchedFilesOutcome };
2978
2898
  //# sourceMappingURL=index.d.ts.map
package/init/scaffold.js CHANGED
@@ -2,7 +2,7 @@ import { Concept, ConceptId, Derive, LoadedConcept, OKF_SPEC_VERSION } from "@ok
2
2
  import { Effect, Option, Schema } from "effect";
3
3
  import { MarkdownDocument, MarkdownFrontmatter, MarkdownParseOptions, YamlFrontmatter } from "@effected/markdown";
4
4
 
5
- //#region src/init/scaffold.ts
5
+ // src/init/scaffold.ts
6
6
  /** `.config/okfit.toml`, relative to the project root (C-10). @public */
7
7
  const CONFIG_RELATIVE_PATH = ".config/okfit.toml";
8
8
  /**
@@ -168,5 +168,4 @@ const files = (options) => Effect.gen(function* () {
168
168
  ];
169
169
  });
170
170
 
171
- //#endregion
172
171
  export { CONFIG_RELATIVE_PATH, PROJECT_CONFIG_NAMES, configValue, files, targetPaths };
@@ -1,7 +1,7 @@
1
1
  import { DiagnosticRange, Graph } from "@okfit/core";
2
2
  import { posix } from "node:path";
3
3
 
4
- //#region src/move/references.ts
4
+ // src/move/references.ts
5
5
  const SCHEME = /^[a-z][a-z0-9+.-]+:/i;
6
6
  const isUrl = (raw) => raw.includes("://") || SCHEME.test(raw);
7
7
  const splitSuffix = (raw) => {
@@ -263,5 +263,4 @@ const rewriteReference = (raw, options) => {
263
263
  return written === pathPart ? void 0 : `${written}${suffix}`;
264
264
  };
265
265
 
266
- //#endregion
267
266
  export { referencesOf, rewriteReference };
package/move/run.js CHANGED
@@ -9,7 +9,7 @@ import { Trust } from "@okfit/profiles";
9
9
  import { MarkdownEdit } from "@effected/markdown";
10
10
  import { posix } from "node:path";
11
11
 
12
- //#region src/move/run.ts
12
+ // src/move/run.ts
13
13
  const withMd = (value) => value.endsWith(".md") ? value : `${value}.md`;
14
14
  /**
15
15
  * The destination's bundle-relative path (R5'): the cwd-relative path (inside the bundle) or the id
@@ -208,5 +208,4 @@ const runMove = Effect.fn("okfit/move/run")(function* (options) {
208
208
  };
209
209
  });
210
210
 
211
- //#endregion
212
211
  export { planMove, runMove };
@@ -2,7 +2,7 @@ import { DocumentPathError } from "../errors.js";
2
2
  import { OverlayDocuments, makeOverlayFileSystem } from "./layer.js";
3
3
  import { Effect, FileSystem, Path, Result } from "effect";
4
4
 
5
- //#region src/overlay/documents.ts
5
+ // src/overlay/documents.ts
6
6
  /**
7
7
  * Resolve a bundle-relative posix path to the absolute key `Bundle.load` will
8
8
  * read (`path.join(root, relative)`, which also normalizes `.`/`..`), or say
@@ -57,5 +57,4 @@ const provideDocuments = (root, documents) => (self) => documents.length === 0 ?
57
57
  return yield* self.pipe(Effect.provideService(FileSystem.FileSystem, makeOverlayFileSystem(underlying, overlay)));
58
58
  });
59
59
 
60
- //#endregion
61
60
  export { provideDocuments, resolveDocumentPath };
package/overlay/layer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ByteSize, Context, Effect, FileSystem, Layer, Option } from "effect";
2
2
 
3
- //#region src/overlay/layer.ts
3
+ // src/overlay/layer.ts
4
4
  /**
5
5
  * Editor buffers that shadow the filesystem (spec 3.2). Mutable by design: an
6
6
  * LSP server changes it on every keystroke-level `didChange`.
@@ -105,5 +105,4 @@ const layerOverlayFileSystem = Layer.effect(FileSystem.FileSystem, Effect.gen(fu
105
105
  return makeOverlayFileSystem(underlying, documents);
106
106
  }));
107
107
 
108
- //#endregion
109
108
  export { OverlayDocuments, layerOverlayFileSystem, makeOverlayFileSystem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okfit/engine",
3
- "version": "0.16.3",
3
+ "version": "0.16.5",
4
4
  "private": false,
5
5
  "description": "The okfit engine: platform layer, config discovery, and the validate, verify, sync, init and context programs shared by the okfit CLI and MCP server.",
6
6
  "keywords": [
@@ -34,23 +34,23 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@effect/platform-node": "^4.0.5",
38
- "@effected/app": "^0.24.0",
39
- "@effected/config-file": "^0.17.0",
40
- "@effected/engine": "^0.7.0",
41
- "@effected/git": "^0.23.0",
42
- "@effected/glob": "^0.13.0",
43
- "@effected/jsonc": "^0.18.0",
44
- "@effected/markdown": "^0.19.0",
45
- "@effected/schemastore": "^0.24.0",
46
- "@effected/store": "^0.16.0",
47
- "@effected/toml": "^0.14.0",
48
- "@effected/walker": "^0.18.0",
49
- "@effected/xdg": "^0.12.0",
50
- "@effected/yaml": "^0.22.0",
51
- "@okfit/core": "0.11.3",
52
- "@okfit/profiles": "0.10.4",
53
- "effect": "^4.0.5"
37
+ "@effect/platform-node": "^4.0.6",
38
+ "@effected/app": "^0.26.0",
39
+ "@effected/config-file": "^0.19.1",
40
+ "@effected/engine": "^0.8.0",
41
+ "@effected/git": "^0.25.0",
42
+ "@effected/glob": "^0.14.0",
43
+ "@effected/jsonc": "^0.20.0",
44
+ "@effected/markdown": "^0.22.0",
45
+ "@effected/schemastore": "^0.26.1",
46
+ "@effected/store": "^0.18.0",
47
+ "@effected/toml": "^0.16.0",
48
+ "@effected/walker": "^0.19.0",
49
+ "@effected/xdg": "^0.14.1",
50
+ "@effected/yaml": "^0.25.0",
51
+ "@okfit/core": "0.11.5",
52
+ "@okfit/profiles": "0.10.6",
53
+ "effect": "^4.0.6"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=24.11.0"
package/platform.js CHANGED
@@ -2,7 +2,7 @@ import { Layer } from "effect";
2
2
  import * as NodeServices from "@effect/platform-node/NodeServices";
3
3
  import { AppDirs, Xdg } from "@effected/xdg";
4
4
 
5
- //#region src/platform.ts
5
+ // src/platform.ts
6
6
  /**
7
7
  * The XDG application namespace for every okfit program. The CLI and the
8
8
  * MCP server MUST resolve the same user-level config directory; a literal
@@ -28,5 +28,4 @@ const OKFIT_APP_NAMESPACE = "okfit";
28
28
  */
29
29
  const OkfitPlatform = Layer.mergeAll(Xdg.layer, AppDirs.layer({ namespace: OKFIT_APP_NAMESPACE }).pipe(Layer.provide(Xdg.layer))).pipe(Layer.provideMerge(NodeServices.layer));
30
30
 
31
- //#endregion
32
31
  export { OKFIT_APP_NAMESPACE, OkfitPlatform };
@@ -2,7 +2,7 @@ import { QueryConceptNotFoundError, QueryUnknownVocabularyError } from "../error
2
2
  import { ConceptId, Derive, Graph } from "@okfit/core";
3
3
  import { Effect, Option } from "effect";
4
4
 
5
- //#region src/query/ConceptQuery.ts
5
+ // src/query/ConceptQuery.ts
6
6
  const byId = (a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
7
7
  const resolve = (bundle, rawId) => Effect.gen(function* () {
8
8
  const normalized = ConceptId.normalize(rawId);
@@ -109,5 +109,4 @@ const ConceptQuery = {
109
109
  })
110
110
  };
111
111
 
112
- //#endregion
113
112
  export { ConceptQuery };
package/render/context.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CONFIG_SCHEMA_VERSION } from "@okfit/core";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/render/context.ts
4
+ // src/render/context.ts
5
5
  /** One enumerated value of a `fields[]` entry. @public */
6
6
  const ContextFieldValue = Schema.Struct({
7
7
  name: Schema.String,
@@ -143,5 +143,4 @@ const contextEnvelope = (input) => ({
143
143
  trust: input.trust ?? null
144
144
  });
145
145
 
146
- //#endregion
147
146
  export { ContextEnvelope, ContextField, ContextFieldValue, ContextTag, ContextTrust, ContextType, contextEnvelope };
@@ -1,8 +1,7 @@
1
1
  import { DistributionField } from "@effected/engine";
2
2
 
3
- //#region src/render/distribution.ts
3
+ // src/render/distribution.ts
4
4
  /** Every envelope's `distribution` field: a `Distribution` or `null`. @public */
5
5
  const DistributionField$1 = DistributionField;
6
6
 
7
- //#endregion
8
7
  export { DistributionField$1 as DistributionField };
package/render/exit.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/render/exit.ts
1
+ // src/render/exit.ts
2
2
  /**
3
3
  * One pass over the collected diagnostics. `core.conformance` entries are
4
4
  * always severity `error` (D-33); the counts are still taken from `severity`
@@ -49,5 +49,4 @@ const forDiagnostics = (diagnostics) => {
49
49
  return t.conformanceErrors > 0 ? 2 : t.lintErrors + t.profileErrors > 0 ? 1 : 0;
50
50
  };
51
51
 
52
- //#endregion
53
52
  export { forDiagnostics, tally };
package/render/graph.js CHANGED
@@ -2,7 +2,7 @@ import { DistributionField } from "./distribution.js";
2
2
  import { ENGINE_VERSION } from "../version.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/render/graph.ts
5
+ // src/render/graph.ts
6
6
  /** One entry of the `nodes` array. @public */
7
7
  const GraphNodeEnvelope = Schema.Struct({
8
8
  id: Schema.String,
@@ -79,5 +79,4 @@ const graphEnvelope = (input) => ({
79
79
  edges: input.edges.map(toEdge)
80
80
  });
81
81
 
82
- //#endregion
83
82
  export { GraphEdgeEnvelope, GraphEnvelope, GraphNodeEnvelope, GraphSummary, graphEnvelope };
package/render/json.js CHANGED
@@ -5,7 +5,7 @@ import { sort } from "./sort.js";
5
5
  import { DiagnosticRange, DiagnosticSeverity } from "@okfit/core";
6
6
  import { Runtime, Schema } from "effect";
7
7
 
8
- //#region src/render/json.ts
8
+ // src/render/json.ts
9
9
  /** One entry of the `diagnostics` array (K-21). @public */
10
10
  const JsonDiagnostic = Schema.Struct({
11
11
  source: Schema.Literals([
@@ -160,5 +160,4 @@ const jsonError = (error, okfitVersion, distribution) => ({
160
160
  }
161
161
  });
162
162
 
163
- //#endregion
164
163
  export { JsonDiagnostic, JsonEnvelope, JsonErrorEnvelope, JsonSummary, json, jsonError };
package/render/move.js CHANGED
@@ -2,7 +2,7 @@ import { DistributionField } from "./distribution.js";
2
2
  import { ENGINE_VERSION } from "../version.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/render/move.ts
5
+ // src/render/move.ts
6
6
  /**
7
7
  * `okfit mv`'s success envelope, schema 1, snake_case. `from`/`to` are bundle-relative paths, `path`
8
8
  * the display form of the destination; `edits` lists every file that changes (post-move path) with
@@ -48,5 +48,4 @@ const moveEnvelope = (input) => ({
48
48
  exit_code: 0
49
49
  });
50
50
 
51
- //#endregion
52
51
  export { MoveEnvelope, moveEnvelope };
package/render/query.js CHANGED
@@ -4,7 +4,7 @@ import { Derive, GraphNodeKind, Status } from "@okfit/core";
4
4
  import { Schema } from "effect";
5
5
  import { DriftReason } from "@okfit/profiles";
6
6
 
7
- //#region src/render/query.ts
7
+ // src/render/query.ts
8
8
  /**
9
9
  * Why a human verification no longer binds, as the wire reports it. `edited_by`
10
10
  * and `edited_at` are the latest human entry's actor and instant, `null` when
@@ -147,5 +147,4 @@ const queryNeighborsEnvelope = (input) => ({
147
147
  incoming: input.incoming
148
148
  });
149
149
 
150
- //#endregion
151
150
  export { ConceptSummary, QueryGetEnvelope, QueryLink, QueryListEnvelope, QueryNeighbor, QueryNeighborsEnvelope, TrustDrift, queryGetEnvelope, queryListEnvelope, queryNeighborsEnvelope, signalFor, toConceptSummary, toTrustDrift };
package/render/sort.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/render/sort.ts
1
+ // src/render/sort.ts
2
2
  const toRendered = (source) => (entry) => ({
3
3
  source,
4
4
  file: entry.file,
@@ -42,5 +42,4 @@ const sort = (diagnostics) => diagnostics.toSorted((a, b) => {
42
42
  return 0;
43
43
  });
44
44
 
45
- //#endregion
46
45
  export { collect, sort };
package/render/stale.js CHANGED
@@ -2,7 +2,7 @@ import { DistributionField } from "./distribution.js";
2
2
  import { ENGINE_VERSION } from "../version.js";
3
3
  import { DateTime, Schema } from "effect";
4
4
 
5
- //#region src/render/stale.ts
5
+ // src/render/stale.ts
6
6
  /** One entry of the `items` array. @public */
7
7
  const StaleItem = Schema.Struct({
8
8
  id: Schema.String,
@@ -64,5 +64,4 @@ const staleEnvelope = (input) => ({
64
64
  }))
65
65
  });
66
66
 
67
- //#endregion
68
67
  export { StaleEnvelope, StaleItem, StaleSummary, staleEnvelope };
package/render/sync.js CHANGED
@@ -3,7 +3,7 @@ import { ENGINE_VERSION } from "../version.js";
3
3
  import { SkipReason } from "../sync/run.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/render/sync.ts
6
+ // src/render/sync.ts
7
7
  /** @public */
8
8
  const SyncModeEnvelope = Schema.Struct({
9
9
  selected: Schema.Boolean,
@@ -92,5 +92,4 @@ const syncEnvelope = (input) => ({
92
92
  ...input.publication === void 0 ? {} : { publication: input.publication }
93
93
  });
94
94
 
95
- //#endregion
96
95
  export { PublicationEnvelope, SyncEnvelope, SyncModeEnvelope, syncEnvelope };
package/render/verify.js CHANGED
@@ -4,7 +4,7 @@ import { Status } from "@okfit/core";
4
4
  import { Schema } from "effect";
5
5
  import { DriftReason } from "@okfit/profiles";
6
6
 
7
- //#region src/render/verify.ts
7
+ // src/render/verify.ts
8
8
  /**
9
9
  * V-11's success envelope, schema 1, snake_case — the same convention as
10
10
  * `render/json.ts`'s `JsonEnvelope`. Identical in shape for a dry run,
@@ -146,5 +146,4 @@ const revokeEnvelope = (input) => ({
146
146
  exit_code: 0
147
147
  });
148
148
 
149
- //#endregion
150
149
  export { RevokeEnvelope, VerifyBatchEnvelope, VerifyEnvelope, revokeEnvelope, verifyBatchEnvelope, verifyEnvelope };
@@ -7,7 +7,7 @@ import { withFallbackRange } from "./range.js";
7
7
  import { Graph } from "@okfit/core";
8
8
  import { Context, Effect, FileSystem, Option, Path, Ref, Semaphore } from "effect";
9
9
 
10
- //#region src/session/BundleSession.ts
10
+ // src/session/BundleSession.ts
11
11
  const CONFIG_BASENAMES = new Set(PROJECT_CONFIG_NAMES.map((name) => name.slice(name.lastIndexOf("/") + 1)));
12
12
  /**
13
13
  * One bundle root's editor state (spec 4): open-document overlay, last loaded
@@ -65,5 +65,4 @@ var BundleSession = class BundleSession extends Context.Service()("@okfit/engine
65
65
  });
66
66
  };
67
67
 
68
- //#endregion
69
68
  export { BundleSession };
@@ -1,7 +1,7 @@
1
1
  import { ConceptId } from "@okfit/core";
2
2
  import { Option } from "effect";
3
3
 
4
- //#region src/session/concept.ts
4
+ // src/session/concept.ts
5
5
  /** Backslashes to forward slashes; the rest of this module treats every path as already resolved. */
6
6
  const posixOf = (value) => value.split("\\").join("/");
7
7
  /** Drops every trailing `/` without a regex (a `/\/+$/` pattern is quadratic on a long run of slashes). */
@@ -30,5 +30,4 @@ const conceptFor = (bundle, absolutePath) => {
30
30
  return Option.flatMap(ConceptId.fromPath(relative), (id) => Option.fromUndefinedOr(bundle.concepts.get(id)));
31
31
  };
32
32
 
33
- //#endregion
34
33
  export { conceptFor };
package/session/diff.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/session/diff.ts
1
+ // src/session/diff.ts
2
2
  /**
3
3
  * Group `diagnostics` by `file`, keeping input order within each file.
4
4
  *
@@ -40,5 +40,4 @@ const diffDiagnostics = (previous, next) => {
40
40
  return changed;
41
41
  };
42
42
 
43
- //#endregion
44
43
  export { diffDiagnostics, groupByFile };
package/session/range.js CHANGED
@@ -2,7 +2,7 @@ import { conceptFor } from "./concept.js";
2
2
  import { DiagnosticRange } from "@okfit/core";
3
3
  import { Option } from "effect";
4
4
 
5
- //#region src/session/range.ts
5
+ // src/session/range.ts
6
6
  const FILE_START = DiagnosticRange.make({
7
7
  offset: 0,
8
8
  length: 0,
@@ -22,7 +22,7 @@ const FILE_START = DiagnosticRange.make({
22
22
  const withFallbackRange = (bundle, diagnostic) => {
23
23
  if (diagnostic.range !== void 0 || diagnostic.file === "") return diagnostic;
24
24
  const concept = Option.getOrUndefined(conceptFor(bundle, `${bundle.root}/${diagnostic.file}`));
25
- const node = concept?.document.frontmatter;
25
+ const node = concept === void 0 ? void 0 : Option.getOrUndefined(concept.document.frontmatter);
26
26
  if (concept === void 0 || node === void 0) return {
27
27
  ...diagnostic,
28
28
  range: FILE_START
@@ -33,5 +33,4 @@ const withFallbackRange = (bundle, diagnostic) => {
33
33
  };
34
34
  };
35
35
 
36
- //#endregion
37
36
  export { withFallbackRange };
package/stale/run.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Bundle, Derive } from "@okfit/core";
2
2
  import { Effect } from "effect";
3
3
 
4
- //#region src/stale/run.ts
4
+ // src/stale/run.ts
5
5
  /**
6
6
  * Load the bundle and derive the stale report against `now` (D-10, D-36:
7
7
  * `Derive.staleReport` is pure and takes `now` as an argument, never a
@@ -18,5 +18,4 @@ const runStale = (options) => Effect.gen(function* () {
18
18
  };
19
19
  });
20
20
 
21
- //#endregion
22
21
  export { runStale };
package/sync/generated.js CHANGED
@@ -8,7 +8,7 @@ import { Effect, FileSystem, Path, Schema } from "effect";
8
8
  import { Derivation, PUBLICATION_TYPE } from "@okfit/profiles";
9
9
  import { MarkdownEdit } from "@effected/markdown";
10
10
 
11
- //#region src/sync/generated.ts
11
+ // src/sync/generated.ts
12
12
  /**
13
13
  * The five `SkipReason` members contract §6.2's algorithm can actually
14
14
  * produce — a strict subset of contract §5's six-member `SkipReason`
@@ -203,5 +203,4 @@ const syncGenerated = Effect.fn("okfit/sync/syncGenerated")(function* (bundle, o
203
203
  };
204
204
  });
205
205
 
206
- //#endregion
207
206
  export { syncGenerated };
package/sync/index.js CHANGED
@@ -2,7 +2,7 @@ import { writeAtomic } from "./write.js";
2
2
  import { Derive, OKF_SPEC_VERSION } from "@okfit/core";
3
3
  import { Effect, FileSystem, Path } from "effect";
4
4
 
5
- //#region src/sync/index.ts
5
+ // src/sync/index.ts
6
6
  /**
7
7
  * Immediate child directories of `dir`, unioned from `bundle.directories`
8
8
  * and `bundle.indexes.keys()` -- the same union `Derive.synthesizeIndex`
@@ -74,5 +74,4 @@ const syncIndex = Effect.fn("okfit/sync/syncIndex")(function* (bundle, dryRun, p
74
74
  };
75
75
  });
76
76
 
77
- //#endregion
78
77
  export { syncIndex };
package/sync/log.js CHANGED
@@ -2,7 +2,7 @@ import { writeAtomic } from "./write.js";
2
2
  import { Derive } from "@okfit/core";
3
3
  import { DateTime, Effect, FileSystem, Path } from "effect";
4
4
 
5
- //#region src/sync/log.ts
5
+ // src/sync/log.ts
6
6
  const byTitle = (a, b) => a.title < b.title ? -1 : a.title > b.title ? 1 : 0;
7
7
  const renderItem = (item) => item.added ? `Added ${item.title}` : `Updated ${item.title}`;
8
8
  /**
@@ -150,5 +150,4 @@ const syncLog = Effect.fn("okfit/sync/syncLog")(function* (bundle, provenance, d
150
150
  };
151
151
  });
152
152
 
153
- //#endregion
154
153
  export { logWindow, mergeLog, syncLog, wantsLogEntry };
@@ -5,7 +5,7 @@ import { Effect, Option, Path, Runtime, Schema } from "effect";
5
5
  import { Derivation, PUBLICATION_TYPE, Publications } from "@okfit/profiles";
6
6
  import { MarkdownEdit } from "@effected/markdown";
7
7
 
8
- //#region src/sync/publication.ts
8
+ // src/sync/publication.ts
9
9
  /**
10
10
  * No concept answers to `id` -- or one of a Publication's `renders` paths
11
11
  * resolves to no concept, in which case `id` names that missing source.
@@ -94,5 +94,4 @@ const stampPublication = (options) => Effect.gen(function* () {
94
94
  };
95
95
  });
96
96
 
97
- //#endregion
98
97
  export { NotAPublicationError, PublicationNotFoundError, stampPublication };
package/sync/run.js CHANGED
@@ -8,7 +8,7 @@ import { DateTime, Effect, FileSystem, Path, Schema } from "effect";
8
8
  import { Derivation } from "@okfit/profiles";
9
9
  import { Git } from "@effected/git";
10
10
 
11
- //#region src/sync/run.ts
11
+ // src/sync/run.ts
12
12
  /**
13
13
  * S-14: a closed union, not free text. The human renderer maps each member
14
14
  * to one fixed sentence (`render/sync.ts#humanSync`); the JSON envelope's
@@ -179,5 +179,4 @@ const runSync = Effect.fn("okfit/sync/runSync")(function* (options) {
179
179
  return yield* applySyncPlan(plan);
180
180
  });
181
181
 
182
- //#endregion
183
182
  export { SkipReason, applySyncPlan, planSync, runSync };
package/sync/write.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Effect, FileSystem, Option, Path } from "effect";
2
2
  import { randomUUID } from "node:crypto";
3
3
 
4
- //#region src/sync/write.ts
4
+ // src/sync/write.ts
5
5
  /**
6
6
  * S-33: the one atomic write every sync mode shares. Resolves `target`'s
7
7
  * real path first when it already exists (so a symlinked
@@ -44,5 +44,4 @@ const writeAtomic = Effect.fn("okfit/sync/writeAtomic")(function* (target, conte
44
44
  })), Effect.tap(() => fs.rename(tempPath, resolved)), Effect.onError(() => fs.remove(tempPath, { force: true }).pipe(Effect.ignore)));
45
45
  });
46
46
 
47
- //#endregion
48
47
  export { writeAtomic };
package/targets/inside.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/targets/inside.ts
1
+ // src/targets/inside.ts
2
2
  /**
3
3
  * The posix path of `absolute` relative to `root` (`""` for the root itself), or `undefined` when it
4
4
  * lies outside. Only a `..` segment escapes: a file named `..draft.md` is inside.
@@ -11,5 +11,4 @@ const relativeInside = (path, root, absolute) => {
11
11
  return relative.split(path.sep).join("/");
12
12
  };
13
13
 
14
- //#endregion
15
14
  export { relativeInside };
@@ -4,7 +4,7 @@ import { ConceptId } from "@okfit/core";
4
4
  import { Effect, FileSystem, Option, Path } from "effect";
5
5
  import { posix } from "node:path";
6
6
 
7
- //#region src/targets/resolve.ts
7
+ // src/targets/resolve.ts
8
8
  const levenshtein = (a, b) => {
9
9
  const row = Array.from({ length: b.length + 1 }, (_, i) => i);
10
10
  for (let i = 1; i <= a.length; i++) {
@@ -142,5 +142,4 @@ var Targets = class {
142
142
  static suggest = suggest;
143
143
  };
144
144
 
145
- //#endregion
146
145
  export { Targets };
package/trust/run.js CHANGED
@@ -2,7 +2,7 @@ import { Bundle } from "@okfit/core";
2
2
  import { Effect } from "effect";
3
3
  import { Trust } from "@okfit/profiles";
4
4
 
5
- //#region src/trust/run.ts
5
+ // src/trust/run.ts
6
6
  const FIRST = 5;
7
7
  /**
8
8
  * The opt-in half of `context`: load the bundle and fold `Trust.signals`
@@ -28,5 +28,4 @@ const runContextTrust = (options) => Effect.gen(function* () {
28
28
  };
29
29
  });
30
30
 
31
- //#endregion
32
31
  export { runContextTrust };
@@ -1,7 +1,7 @@
1
1
  import { Diagnostic, DiagnosticRange, OkfitConfig } from "@okfit/core";
2
2
  import { Effect, FileSystem, Path } from "effect";
3
3
 
4
- //#region src/validate/resources.ts
4
+ // src/validate/resources.ts
5
5
  /** A `resource`/`sources[].resource` value that names a URL, not a bundle-relative path (D-24). */
6
6
  const SCHEME_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;
7
7
  /** Glob metacharacters, extglob openers included, that mark a value as a pattern rather than a literal path. */
@@ -85,5 +85,4 @@ const lintResources = (bundle, config) => Effect.gen(function* () {
85
85
  return diagnostics;
86
86
  });
87
87
 
88
- //#endregion
89
88
  export { GLOB_RE, lintResources };
package/validate/run.js CHANGED
@@ -4,7 +4,7 @@ import { Bundle, OkfitConfig, Validate } from "@okfit/core";
4
4
  import { Context, Effect, Option } from "effect";
5
5
  import { Provenance, Publications, Trust } from "@okfit/profiles";
6
6
 
7
- //#region src/validate/run.ts
7
+ // src/validate/run.ts
8
8
  /**
9
9
  * K-47's ambient clock. `bin.ts` resolves `OKFIT_NOW` (or the wall clock)
10
10
  * exactly once and provides it with `Effect.provideService(Now, value)`
@@ -82,5 +82,4 @@ const run = (options) => Effect.gen(function* () {
82
82
  };
83
83
  });
84
84
 
85
- //#endregion
86
85
  export { Now, run };
@@ -4,7 +4,7 @@ import { Effect, FileSystem, Path, Result } from "effect";
4
4
  import { SURFACE_TYPE } from "@okfit/profiles";
5
5
  import { GlobPattern } from "@effected/glob";
6
6
 
7
- //#region src/validate/surfaces.ts
7
+ // src/validate/surfaces.ts
8
8
  /**
9
9
  * Lists `root` breadth-first, only as deep as `segments` (the glob's remaining
10
10
  * segments) can match, or without a bound when the pattern contains `**`.
@@ -94,5 +94,4 @@ const lintSurfaces = (bundle, config) => Effect.gen(function* () {
94
94
  return diagnostics;
95
95
  });
96
96
 
97
- //#endregion
98
97
  export { lintSurfaces };
package/verify/diff.js CHANGED
@@ -2,7 +2,7 @@ import { DateTime, Effect, Path } from "effect";
2
2
  import { Git, GitCommandError } from "@effected/git";
3
3
  import { ChildProcess, ChildProcessSpawner } from "effect/process";
4
4
 
5
- //#region src/verify/diff.ts
5
+ // src/verify/diff.ts
6
6
  /**
7
7
  * The patch between the version of `file` a human verified (`at`) and what is
8
8
  * on disk now.
@@ -59,5 +59,4 @@ const changeSince = Effect.fn("okfit/verify/changeSince")(function* (options) {
59
59
  };
60
60
  });
61
61
 
62
- //#endregion
63
62
  export { changeSince };
@@ -4,7 +4,7 @@ import { Effect, Option, Schema } from "effect";
4
4
  import { MarkdownEdit } from "@effected/markdown";
5
5
  import { YamlAlias, YamlMap, YamlScalar, YamlSeq } from "@effected/yaml";
6
6
 
7
- //#region src/verify/integrity.ts
7
+ // src/verify/integrity.ts
8
8
  const decodeIntegrity = Schema.decodeUnknownOption(Integrity);
9
9
  /**
10
10
  * The plain value of `node` with every plain scalar kept as its source text:
@@ -305,5 +305,4 @@ const removeLine = (located) => MarkdownEdit.make({
305
305
  content: ""
306
306
  });
307
307
 
308
- //#endregion
309
308
  export { formatDigest, locateIntegrity, locateLegacyBodySha256, removeIntegrityVerified, removeLine, renderIntegrity, spliceIntegrity, spliceIntegrityGenerated, spliceIntegrityVerified };
package/verify/locate.js CHANGED
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { FrontmatterSource } from "@effected/markdown";
3
3
  import { YamlAlias, YamlDocument, YamlMap, YamlScalar, YamlSeq } from "@effected/yaml";
4
4
 
5
- //#region src/verify/locate.ts
5
+ // src/verify/locate.ts
6
6
  /**
7
7
  * Strip a leading BOM before anything else; the caller re-prepends `bom`
8
8
  * verbatim on write (V-15). `FrontmatterSource.split`'s own remarks require
@@ -374,5 +374,4 @@ const locateVerifiedAt = Effect.fn("okfit/verify/locateVerifiedAt")(function* (s
374
374
  };
375
375
  });
376
376
 
377
- //#endregion
378
377
  export { detectNewline, documentNewline, hasMergeKey, indentAt, locate, locateGenerated, locateGeneratedBlock, locateTopLevelScalar, locateVerifiedAt, parseTopLevelMapping, stripBom };
package/verify/revoke.js CHANGED
@@ -2,7 +2,7 @@ import { hasMergeKey, parseTopLevelMapping } from "./locate.js";
2
2
  import { Effect } from "effect";
3
3
  import { YamlAlias, YamlMap, YamlScalar, YamlSeq } from "@effected/yaml";
4
4
 
5
- //#region src/verify/revoke.ts
5
+ // src/verify/revoke.ts
6
6
  const byActor = (actor) => (map) => map.items.some((entry) => entry.key instanceof YamlScalar && entry.key.value === "by" && entry.value instanceof YamlScalar && entry.value.value === actor);
7
7
  /**
8
8
  * Locate every top-level `verified` entry whose `by` is `actor`. See
@@ -97,5 +97,4 @@ const locateVerifiedEntries = Effect.fn("okfit/verify/locateVerifiedEntries")(fu
97
97
  };
98
98
  });
99
99
 
100
- //#endregion
101
100
  export { locateVerifiedEntries };
package/verify/run.js CHANGED
@@ -10,7 +10,7 @@ import { DateTime, Effect, FileSystem, Option, Path, Schema } from "effect";
10
10
  import { Derivation, Trust } from "@okfit/profiles";
11
11
  import { MarkdownEdit } from "@effected/markdown";
12
12
 
13
- //#region src/verify/run.ts
13
+ // src/verify/run.ts
14
14
  /**
15
15
  * The only four diagnostic codes that can co-occur with a MISSING
16
16
  * `concepts` entry (V-9, contract §12 note 10): `Bundle.ts:143/164/175/186`
@@ -464,5 +464,4 @@ const loadPreviews = Effect.fn("okfit/verify/loadPreviews")(function* (candidate
464
464
  return previews;
465
465
  });
466
466
 
467
- //#endregion
468
467
  export { inspectDrift, loadPickerCandidates, loadPreviews, loadStaleCandidates, runRevoke, runRevokeIds, runVerify, runVerifyBatch, runVerifyIds };
package/verify/select.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VerifySelectionError } from "../errors.js";
2
2
  import { DateTime, Effect } from "effect";
3
3
 
4
- //#region src/verify/select.ts
4
+ // src/verify/select.ts
5
5
  /**
6
6
  * Whether `concept` is verified by `actor` AND that verification still binds
7
7
  * its content: the signal is `current` and `integrity.verified` names `actor`.
@@ -128,5 +128,4 @@ const resolveBatchTypes = (config, types) => {
128
128
  return Effect.succeed(new Set(types));
129
129
  };
130
130
 
131
- //#endregion
132
131
  export { resolveBatchTypes, selectAttestable, selectPickerCandidates, selectStaleCandidates };
package/verify/splice.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MarkdownEdit } from "@effected/markdown";
2
2
 
3
- //#region src/verify/splice.ts
3
+ // src/verify/splice.ts
4
4
  /** `value` wrapped in the quote style the scalar it replaces already uses. @internal */
5
5
  const quoteLike = (quote, value) => quote === "single-quoted" ? `'${value}'` : quote === "double-quoted" ? `"${value}"` : value;
6
6
  /** Prefix two spaces to every line but the first, joining with `newline` (V-13). */
@@ -146,5 +146,4 @@ const orderVerifyEdits = (verifiedEdit, statusEdit, integrityEdit) => {
146
146
  ].toSorted((a, b) => a.offset - b.offset || rank(a) - rank(b)));
147
147
  };
148
148
 
149
- //#endregion
150
149
  export { mergeSameOffset, orderVerifyEdits, quoteLike, splice, spliceGenerated, spliceGeneratedBlock, spliceTopLevelScalar };
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/version.ts
1
+ // src/version.ts
2
2
  /**
3
3
  * The version this engine reports as `engine_version` in every JSON
4
4
  * envelope. `@savvy-web/bundler` replaces `process.env.__PACKAGE_VERSION__`
@@ -11,7 +11,6 @@
11
11
  *
12
12
  * @public
13
13
  */
14
- const ENGINE_VERSION = "0.16.3";
14
+ const ENGINE_VERSION = "0.16.5";
15
15
 
16
- //#endregion
17
16
  export { ENGINE_VERSION };