@okfit/core 0.8.5 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Diagnostic.js CHANGED
@@ -41,7 +41,10 @@ const LintCode = Schema.Literals([
41
41
  "generated-at-drift",
42
42
  "status-missing",
43
43
  "source-resource-missing",
44
- "generated-missing"
44
+ "generated-missing",
45
+ "publication-drift",
46
+ "publication-orphan",
47
+ "surface-unmatched"
45
48
  ]);
46
49
  /** @public */
47
50
  const DiagnosticCode = Schema.Union([ConformanceCode, LintCode]);
package/OkfitConfig.js CHANGED
@@ -225,6 +225,21 @@ const LintTable = Schema.Struct({
225
225
  title: "generated-missing",
226
226
  description: "A concept has no generated block while actors.agent is configured, so okfit sync cannot stamp generated.at until the block exists (issue #73). Default \"warn\"; silent when actors.agent is unset.",
227
227
  default: "warn"
228
+ })),
229
+ publication_drift: Schema.optionalKey(LintLevel.annotate({
230
+ title: "publication-drift",
231
+ description: "A Publication's renders[].body_sha256 is missing or no longer matches the current body of the concept it names, so the published page may restate stale facts. Default \"warn\".",
232
+ default: "warn"
233
+ })),
234
+ publication_orphan: Schema.optionalKey(LintLevel.annotate({
235
+ title: "publication-orphan",
236
+ description: "A Publication's surface or renders[].path does not resolve to a concept, or renders is not a list of { path, body_sha256 } entries. Default \"error\".",
237
+ default: "error"
238
+ })),
239
+ surface_unmatched: Schema.optionalKey(LintLevel.annotate({
240
+ title: "surface-unmatched",
241
+ description: "A Surface's resource glob matches no file or directory; legitimate in a brand-new monorepo, so it only warns. Default \"warn\".",
242
+ default: "warn"
228
243
  }))
229
244
  }).annotate({
230
245
  title: "Lint severities",
@@ -440,7 +455,10 @@ const LINT_KEY = {
440
455
  "generated-at-drift": "generated_at_drift",
441
456
  "status-missing": "status_missing",
442
457
  "source-resource-missing": "source_resource_missing",
443
- "generated-missing": "generated_missing"
458
+ "generated-missing": "generated_missing",
459
+ "publication-drift": "publication_drift",
460
+ "publication-orphan": "publication_orphan",
461
+ "surface-unmatched": "surface_unmatched"
444
462
  };
445
463
  const DEFAULT_LINT = {
446
464
  broken_links: "warn",
@@ -462,7 +480,10 @@ const DEFAULT_LINT = {
462
480
  generated_at_drift: "warn",
463
481
  status_missing: "off",
464
482
  source_resource_missing: "warn",
465
- generated_missing: "warn"
483
+ generated_missing: "warn",
484
+ publication_drift: "warn",
485
+ publication_orphan: "error",
486
+ surface_unmatched: "warn"
466
487
  };
467
488
  const toSeverity = (level) => level === "warn" ? "warning" : level;
468
489
  const severityFor = (config, code) => {
package/index.d.ts CHANGED
@@ -207,11 +207,11 @@ export declare const ConformanceCode: Schema.Literals<readonly ["frontmatter-mis
207
207
  /** @public */
208
208
  export type ConformanceCode = typeof ConformanceCode.Type;
209
209
  /** Severity from `OkfitConfig` (D-34). @public */
210
- export declare const LintCode: Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing"]>;
210
+ export declare const LintCode: Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched"]>;
211
211
  /** @public */
212
212
  export type LintCode = typeof LintCode.Type;
213
213
  /** @public */
214
- export declare const DiagnosticCode: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing"]>]>;
214
+ export declare const DiagnosticCode: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched"]>]>;
215
215
  /** @public */
216
216
  export type DiagnosticCode = typeof DiagnosticCode.Type;
217
217
  declare const DiagnosticRange_base: Schema.Class<DiagnosticRange, Schema.Struct<{
@@ -245,7 +245,7 @@ export declare class DiagnosticRange extends DiagnosticRange_base {
245
245
  declare const Diagnostic_base: Schema.Class<Diagnostic, Schema.Struct<{
246
246
  readonly file: Schema.String;
247
247
  readonly range: Schema.optionalKey<typeof DiagnosticRange>;
248
- readonly code: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing"]>]>;
248
+ readonly code: Schema.Union<readonly [Schema.Literals<readonly ["frontmatter-missing", "frontmatter-unclosed", "frontmatter-unparseable", "type-missing", "index-frontmatter", "index-malformed", "log-heading-invalid", "log-malformed"]>, Schema.Literals<readonly ["broken-links", "missing-index", "unknown-type", "required-key-missing", "field-value-unknown", "require-verified-unmet", "family-invalid", "computation-runtime-missing", "footnote-source-unknown", "footnote-undefined", "log-frontmatter", "actor-prefix-unknown", "legacy-timestamp", "config-unknown-key", "stale", "walk-unreadable", "generated-at-drift", "status-missing", "source-resource-missing", "generated-missing", "publication-drift", "publication-orphan", "surface-unmatched"]>]>;
249
249
  readonly severity: Schema.Literals<readonly ["error", "warning", "info"]>;
250
250
  readonly message: Schema.String;
251
251
  }>, {}>;
@@ -665,6 +665,9 @@ export declare const LintTable: Schema.Struct<{
665
665
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
666
666
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
667
667
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
668
+ readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
669
+ readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
670
+ readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
668
671
  }>;
669
672
  /**
670
673
  * The `OkfitConfig` struct schema. Exported only so the `OkfitConfigFields`
@@ -715,6 +718,9 @@ declare const okfitConfigFields: Schema.Struct<{
715
718
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
716
719
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
717
720
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
721
+ readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
722
+ readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
723
+ readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
718
724
  }>>;
719
725
  readonly types: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
720
726
  readonly description: Schema.optionalKey<Schema.String>;
@@ -818,6 +824,9 @@ export declare const okfitConfigDocumentFields: Schema.StructWithRest<Schema.Str
818
824
  readonly status_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
819
825
  readonly source_resource_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
820
826
  readonly generated_missing: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
827
+ readonly publication_drift: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
828
+ readonly publication_orphan: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
829
+ readonly surface_unmatched: Schema.optionalKey<Schema.Literals<readonly ["off", "info", "warn", "error"]>>;
821
830
  }>>;
822
831
  readonly types: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
823
832
  readonly description: Schema.optionalKey<Schema.String>;
@@ -906,6 +915,9 @@ declare const OkfitConfigFile_base: import("effect/Context").ServiceClass<OkfitC
906
915
  readonly status_missing?: "error" | "info" | "off" | "warn";
907
916
  readonly source_resource_missing?: "error" | "info" | "off" | "warn";
908
917
  readonly generated_missing?: "error" | "info" | "off" | "warn";
918
+ readonly publication_drift?: "error" | "info" | "off" | "warn";
919
+ readonly publication_orphan?: "error" | "info" | "off" | "warn";
920
+ readonly surface_unmatched?: "error" | "info" | "off" | "warn";
909
921
  };
910
922
  readonly types?: {
911
923
  readonly [x: string]: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okfit/core",
3
- "version": "0.8.5",
3
+ "version": "0.9.0",
4
4
  "private": false,
5
5
  "description": "Spec-level Open Knowledge Format (OKF) v0.2 schemas, bundle loading, graph, derivation, and validation for Effect.",
6
6
  "keywords": [