@okforest/okf 0.8.0 → 0.10.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/dist/index.d.mts CHANGED
@@ -4,6 +4,10 @@ import { Nodes, Root } from "mdast";
4
4
  export declare function visit(node: Nodes, fn: (node: Nodes) => void): void;
5
5
  /** Strip a byte-order mark and normalize line endings to LF. */
6
6
  export declare function normalizeText(text: string): string;
7
+ /** The frontmatter keys OKF defines (§4.1, §5, §10.2). A type's schema
8
+ * describes the type's own fields, so these are left out of it unless it
9
+ * names them. */
10
+ export declare const OKF_FIELDS: readonly string[];
7
11
  /** A value in use and how many concepts use it. */
8
12
  interface Count {
9
13
  value: string;
package/dist/index.mjs CHANGED
@@ -1,4 +1,26 @@
1
1
  import { _ as isRecord, a as outlineTree, c as readTypeSchema, d as isStaleAt, f as isStatus, g as normalizeText, h as globToRegExp, i as isTypeSchemaPath, l as deriveStatus, m as normalizeVerified, n as TYPES_FOLDER, o as parseTree, p as normalizeSources, t as SETTINGS_PATH, u as deriveTrustTier, v as visit } from "./tree-D9AvJ7fw.mjs";
2
+ // src/fields.ts
3
+ /** The frontmatter keys OKF defines (§4.1, §5, §10.2). A type's schema
4
+ * describes the type's own fields, so these are left out of it unless it
5
+ * names them. */
6
+ const OKF_FIELDS = [
7
+ "type",
8
+ "title",
9
+ "description",
10
+ "resource",
11
+ "tags",
12
+ "sources",
13
+ "usage_window",
14
+ "generated",
15
+ "verified",
16
+ "status",
17
+ "stale_after",
18
+ "runtime",
19
+ "parameters",
20
+ "computation",
21
+ "executor",
22
+ "attester"
23
+ ];
2
24
  // src/inventory.ts
3
25
  /** Build the metadata inventory of a tree. Deterministic: no model calls. */
4
26
  function buildInventory(tree, options = {}) {
@@ -136,4 +158,4 @@ function editDistance(a, b, limit) {
136
158
  }
137
159
  return previous[b.length];
138
160
  }
139
- export { SETTINGS_PATH, TYPES_FOLDER, buildInventory, deriveStatus, deriveTrustTier, editDistance, findNearDuplicates, globToRegExp, isRecord, isStaleAt, isStatus, isTypeSchemaPath, normalizeSources, normalizeText, normalizeVerified, outlineTree, parseTree, readTypeSchema, visit };
161
+ export { OKF_FIELDS, SETTINGS_PATH, TYPES_FOLDER, buildInventory, deriveStatus, deriveTrustTier, editDistance, findNearDuplicates, globToRegExp, isRecord, isStaleAt, isStatus, isTypeSchemaPath, normalizeSources, normalizeText, normalizeVerified, outlineTree, parseTree, readTypeSchema, visit };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okforest/okf",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Read an Open Knowledge Format (OKF) v0.2 tree into a model: concepts, frontmatter, links, backlinks, trust tiers, staleness, and a metadata inventory. No SDKs or frameworks; runs in Node, browsers, and Workers.",
5
5
  "keywords": [
6
6
  "okf",