@superbee/core 0.1.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/backend.d.ts +77 -0
- package/dist/backend.d.ts.map +1 -0
- package/dist/backend.js +380 -0
- package/dist/backend.js.map +1 -0
- package/dist/bundle.d.ts +38 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +107 -0
- package/dist/bundle.js.map +1 -0
- package/dist/content-type.d.ts +72 -0
- package/dist/content-type.d.ts.map +1 -0
- package/dist/content-type.js +149 -0
- package/dist/content-type.js.map +1 -0
- package/dist/document-mutation.d.ts +83 -0
- package/dist/document-mutation.d.ts.map +1 -0
- package/dist/document-mutation.js +319 -0
- package/dist/document-mutation.js.map +1 -0
- package/dist/document-precondition.d.ts +62 -0
- package/dist/document-precondition.d.ts.map +1 -0
- package/dist/document-precondition.js +134 -0
- package/dist/document-precondition.js.map +1 -0
- package/dist/document-write-policy.d.ts +42 -0
- package/dist/document-write-policy.d.ts.map +1 -0
- package/dist/document-write-policy.js +134 -0
- package/dist/document-write-policy.js.map +1 -0
- package/dist/engine.d.ts +48 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +209 -0
- package/dist/engine.js.map +1 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +50 -0
- package/dist/errors.js.map +1 -0
- package/dist/filesystem-identity.d.ts +208 -0
- package/dist/filesystem-identity.d.ts.map +1 -0
- package/dist/filesystem-identity.js +675 -0
- package/dist/filesystem-identity.js.map +1 -0
- package/dist/filesystem-lock.d.ts +65 -0
- package/dist/filesystem-lock.d.ts.map +1 -0
- package/dist/filesystem-lock.js +460 -0
- package/dist/filesystem-lock.js.map +1 -0
- package/dist/freshness.d.ts +31 -0
- package/dist/freshness.d.ts.map +1 -0
- package/dist/freshness.js +98 -0
- package/dist/freshness.js.map +1 -0
- package/dist/frontmatter-contract.d.ts +17 -0
- package/dist/frontmatter-contract.d.ts.map +1 -0
- package/dist/frontmatter-contract.js +29 -0
- package/dist/frontmatter-contract.js.map +1 -0
- package/dist/frontmatter.d.ts +30 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +115 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/index-marker.d.ts +3 -0
- package/dist/index-marker.d.ts.map +1 -0
- package/dist/index-marker.js +3 -0
- package/dist/index-marker.js.map +1 -0
- package/dist/index-projection.d.ts +79 -0
- package/dist/index-projection.d.ts.map +1 -0
- package/dist/index-projection.js +245 -0
- package/dist/index-projection.js.map +1 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +110 -0
- package/dist/index.js.map +1 -0
- package/dist/kinds-load.d.ts +13 -0
- package/dist/kinds-load.d.ts.map +1 -0
- package/dist/kinds-load.js +34 -0
- package/dist/kinds-load.js.map +1 -0
- package/dist/kinds.d.ts +241 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +1001 -0
- package/dist/kinds.js.map +1 -0
- package/dist/links.d.ts +62 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +203 -0
- package/dist/links.js.map +1 -0
- package/dist/meaningful-change-time.d.ts +11 -0
- package/dist/meaningful-change-time.d.ts.map +1 -0
- package/dist/meaningful-change-time.js +16 -0
- package/dist/meaningful-change-time.js.map +1 -0
- package/dist/memory-backend.d.ts +55 -0
- package/dist/memory-backend.d.ts.map +1 -0
- package/dist/memory-backend.js +214 -0
- package/dist/memory-backend.js.map +1 -0
- package/dist/mutation-attribution.d.ts +19 -0
- package/dist/mutation-attribution.d.ts.map +1 -0
- package/dist/mutation-attribution.js +34 -0
- package/dist/mutation-attribution.js.map +1 -0
- package/dist/mutation.d.ts +89 -0
- package/dist/mutation.d.ts.map +1 -0
- package/dist/mutation.js +94 -0
- package/dist/mutation.js.map +1 -0
- package/dist/page.d.ts +87 -0
- package/dist/page.d.ts.map +1 -0
- package/dist/page.js +151 -0
- package/dist/page.js.map +1 -0
- package/dist/paths.d.ts +78 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +148 -0
- package/dist/paths.js.map +1 -0
- package/dist/portable-frontmatter.d.ts +8 -0
- package/dist/portable-frontmatter.d.ts.map +1 -0
- package/dist/portable-frontmatter.js +35 -0
- package/dist/portable-frontmatter.js.map +1 -0
- package/dist/publication-filesystem.d.ts +6 -0
- package/dist/publication-filesystem.d.ts.map +1 -0
- package/dist/publication-filesystem.js +6 -0
- package/dist/publication-filesystem.js.map +1 -0
- package/dist/query-filter.d.ts +12 -0
- package/dist/query-filter.d.ts.map +1 -0
- package/dist/query-filter.js +29 -0
- package/dist/query-filter.js.map +1 -0
- package/dist/query-selection.d.ts +25 -0
- package/dist/query-selection.d.ts.map +1 -0
- package/dist/query-selection.js +48 -0
- package/dist/query-selection.js.map +1 -0
- package/dist/remote-backend.d.ts +152 -0
- package/dist/remote-backend.d.ts.map +1 -0
- package/dist/remote-backend.js +505 -0
- package/dist/remote-backend.js.map +1 -0
- package/dist/remote.d.ts +4 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +3 -0
- package/dist/remote.js.map +1 -0
- package/dist/storage.d.ts +7 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +6 -0
- package/dist/storage.js.map +1 -0
- package/dist/types.d.ts +438 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +22 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +12 -0
- package/dist/validation.js.map +1 -0
- package/dist/version-transport.d.ts +13 -0
- package/dist/version-transport.d.ts.map +1 -0
- package/dist/version-transport.js +26 -0
- package/dist/version-transport.js.map +1 -0
- package/dist/versioning.d.ts +48 -0
- package/dist/versioning.d.ts.map +1 -0
- package/dist/versioning.js +62 -0
- package/dist/versioning.js.map +1 -0
- package/package.json +84 -0
package/dist/kinds.d.ts
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import type { ValidationWarning } from "./validation.js";
|
|
2
|
+
import type { ConceptId, Frontmatter, OkfDocument } from "./types.js";
|
|
3
|
+
/** The bundle-relative prefix a kind convention doc MUST live under to be discovered. */
|
|
4
|
+
export declare const CONVENTIONS_PREFIX = "conventions/";
|
|
5
|
+
/** The OKF `type` value a kind convention doc itself carries. */
|
|
6
|
+
export declare const CONVENTION_TYPE = "Convention";
|
|
7
|
+
/** A kind's declared required/optional fields and any enum-restricted field values. */
|
|
8
|
+
export interface KindFields {
|
|
9
|
+
/** Field names that MUST be present and non-empty on an instance. */
|
|
10
|
+
required: string[];
|
|
11
|
+
/** Field names that MAY be present on an instance. */
|
|
12
|
+
optional: string[];
|
|
13
|
+
/** `fieldName -> allowed values` for fields restricted to an enumerated set. */
|
|
14
|
+
values: Record<string, string[]>;
|
|
15
|
+
/** Human guidance for allowed enum values: `fieldName -> value -> description`. */
|
|
16
|
+
valueDescriptions?: Record<string, Record<string, string>>;
|
|
17
|
+
/**
|
|
18
|
+
* `fieldName -> terminal values` (a subset of that field's `values` enum, when declared) — the
|
|
19
|
+
* states past which an instance is "done" (task board `tasks/status-terminal-declaration.md`).
|
|
20
|
+
* Consumed via {@link isTerminal}, the ONE derivation every consumer (list's `--open`, the
|
|
21
|
+
* `status` sweep's exclusion + sort) calls. Empty map when the kind declares no terminal set.
|
|
22
|
+
*/
|
|
23
|
+
terminal: Record<string, string[]>;
|
|
24
|
+
/** Human guidance for declared fields: `fieldName -> description`. */
|
|
25
|
+
descriptions: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A kind's DECLARED claim vocabulary (`claim:` on the convention doc): which field records who
|
|
29
|
+
* owns an instance, and which field records its claim state. Declared by the BUNDLE so no
|
|
30
|
+
* consumer has to spell a workflow word ("assignee", "in_progress") into product code.
|
|
31
|
+
*
|
|
32
|
+
* The names here are as authored — LOGICAL. Resolve them onto the edition's real frontmatter keys
|
|
33
|
+
* with {@link claimCoordinates}; never read frontmatter by the declared name directly.
|
|
34
|
+
*
|
|
35
|
+
* Only the two coordinates are represented: the first consumer (sync's ownership report) needs
|
|
36
|
+
* exactly them. The block's value vocabulary (`claimed`/`unclaimed`/`released`) is deliberately
|
|
37
|
+
* not parsed yet, and an unrecognized key inside `claim:` is IGNORED rather than warned about —
|
|
38
|
+
* warning on it would be wrong the moment the rest of the block lands.
|
|
39
|
+
*/
|
|
40
|
+
export interface KindClaimPolicy {
|
|
41
|
+
/** Declared field recording who owns an instance (`claim.owner_field`). */
|
|
42
|
+
ownerField?: string;
|
|
43
|
+
/** Declared field recording an instance's claim state (`claim.state_field`). */
|
|
44
|
+
stateField?: string;
|
|
45
|
+
}
|
|
46
|
+
/** A parsed kind convention: the governed `type` plus its declared shape. */
|
|
47
|
+
export interface KindConvention {
|
|
48
|
+
/** Concept id of the convention doc itself (e.g. `conventions/roadmap-item`). */
|
|
49
|
+
id: ConceptId;
|
|
50
|
+
/** Display title (defaults to `governs` when the convention doc omits one). */
|
|
51
|
+
title: string;
|
|
52
|
+
/** The `type` value this convention governs (required, non-empty — malformed docs are skipped). */
|
|
53
|
+
governs: string;
|
|
54
|
+
/** Human-readable purpose and intended use of this kind. */
|
|
55
|
+
description?: string;
|
|
56
|
+
/** Canonical bundle-relative path prefix for instances of this kind, if declared. */
|
|
57
|
+
path?: string;
|
|
58
|
+
fields: KindFields;
|
|
59
|
+
/**
|
|
60
|
+
* The typed-edge vocabulary this kind declares as link SOURCE: `link type name -> allowed
|
|
61
|
+
* target kind` (decision `decisions/typed-links-carrier`, 2026-07-07: a link whose display
|
|
62
|
+
* text exactly matches a declared type is a typed edge; every other link is an untyped
|
|
63
|
+
* citation). Discovery-only at this layer — write-time validation is a future consumer.
|
|
64
|
+
*/
|
|
65
|
+
links?: Record<string, string>;
|
|
66
|
+
/** Human guidance for declared outbound relationships: `link type name -> description`. */
|
|
67
|
+
linkDescriptions?: Record<string, string>;
|
|
68
|
+
/**
|
|
69
|
+
* Inbound-link expectations this kind declares on ITSELF as link TARGET: `link type name ->
|
|
70
|
+
* expected SOURCE kind` (e.g. a `Task` declaring `expects_inbound: {contains: "Roadmap Item"}`
|
|
71
|
+
* means every Task instance is expected to carry at least one inbound edge whose text is
|
|
72
|
+
* exactly `contains` from a doc of type `Roadmap Item`). Discovery-only at this layer — the
|
|
73
|
+
* `status` graph-lint sweep (`missing_expected_links`) is the write-side consumer; write-time
|
|
74
|
+
* validation is never enforced by this key.
|
|
75
|
+
*/
|
|
76
|
+
expectsInbound?: Record<string, string>;
|
|
77
|
+
/** Expected body-section headings (level-1 `# Heading`), if declared. Scaffold + lint only. */
|
|
78
|
+
sections?: string[];
|
|
79
|
+
/** Raw declared horizon string (`<n>(m|h|d)`), if present — parse via {@link freshnessHorizonMs}. */
|
|
80
|
+
freshnessHorizon?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Browse/listing display hint: when `true`, a browse UI collapses this kind's instances behind a
|
|
83
|
+
* toggle by default — for a transient/background kind (e.g. Context Note) whose volume would
|
|
84
|
+
* otherwise swamp durable knowledge. Absent → expanded. Bundle-DECLARED so the shell never
|
|
85
|
+
* privileges a kind by name; display-only, no engine behavior. Set from `browse_collapsed: true`.
|
|
86
|
+
*/
|
|
87
|
+
browseCollapsed?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The bundle-declared claim vocabulary, when this kind declares one. Absent for every kind that
|
|
90
|
+
* does not — a bundle with no `claim:` declaration behaves exactly as it did before the key
|
|
91
|
+
* existed.
|
|
92
|
+
*/
|
|
93
|
+
claim?: KindClaimPolicy;
|
|
94
|
+
}
|
|
95
|
+
/** The result of {@link loadKinds}: the built registry plus any non-fatal warnings collected along the way. */
|
|
96
|
+
export interface KindRegistry {
|
|
97
|
+
/** `governs -> KindConvention`. On a duplicate `governs`, the first-by-id declaration wins. */
|
|
98
|
+
kinds: Map<string, KindConvention>;
|
|
99
|
+
/** Malformed/duplicate/unparseable conventions are SKIPPED, never thrown — collected here instead. */
|
|
100
|
+
warnings: ValidationWarning[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Build the one authoritative Kind registry from already-selected convention documents.
|
|
104
|
+
* Callers own discovery; this pure half owns parsing, warnings, and first-by-id duplicate
|
|
105
|
+
* resolution so prospective registries cannot drift from {@link loadKinds} semantics.
|
|
106
|
+
*/
|
|
107
|
+
export declare function buildKindRegistry(docs: readonly OkfDocument[], initialWarnings?: readonly ValidationWarning[]): KindRegistry;
|
|
108
|
+
/** Stable product-level name for a Kind's workflow progress field. */
|
|
109
|
+
export declare const PROGRESS_STATUS_FIELD = "progress_status";
|
|
110
|
+
/** Producer-qualified v0.2 storage coordinate for Superbee workflow progress. */
|
|
111
|
+
export declare const SUPERBEE_PROGRESS_STATUS_FIELD = "superbee_progress_status";
|
|
112
|
+
/** Physical coordinate used for Superbee's logical workflow-progress field in one OKF edition. */
|
|
113
|
+
export declare function progressStatusStorageField(okfVersion: string | undefined): "status" | typeof SUPERBEE_PROGRESS_STATUS_FIELD | undefined;
|
|
114
|
+
/** A logical Kind field and the concrete frontmatter key that stores it in this OKF edition. */
|
|
115
|
+
export interface KindFieldCoordinate {
|
|
116
|
+
logicalField: string;
|
|
117
|
+
storageField: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Compile the declaration-driven workflow-progress coordinate for one Kind. Missing root version
|
|
121
|
+
* means v0.1 (OKF's compatibility default). Values never activate this mapping.
|
|
122
|
+
*/
|
|
123
|
+
export declare function progressStatusCoordinate(okfVersion: string | undefined, kind: KindConvention): KindFieldCoordinate | undefined;
|
|
124
|
+
/** Resolve an agent-facing Kind field to its declared storage coordinate. */
|
|
125
|
+
export declare function resolveKindFieldCoordinate(okfVersion: string | undefined, kind: KindConvention, field: string): KindFieldCoordinate | undefined;
|
|
126
|
+
/** A kind's claim vocabulary resolved onto the frontmatter keys that actually store it. */
|
|
127
|
+
export interface KindClaimCoordinates {
|
|
128
|
+
/** Storage key recording the owner, when declared AND resolvable on this kind. */
|
|
129
|
+
ownerField?: string;
|
|
130
|
+
/** Storage key recording the claim state, when declared AND resolvable on this kind. */
|
|
131
|
+
stateField?: string;
|
|
132
|
+
/** Every resolved coordinate, de-duplicated — the set a consumer compares two versions over. */
|
|
133
|
+
fields: string[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Resolve a Kind's declared claim vocabulary onto this bundle edition's storage coordinates
|
|
137
|
+
* through the ONE field resolver ({@link resolveKindFieldCoordinate}), so a logical declaration
|
|
138
|
+
* (`state_field: progress_status`) lands on the edition's real key. A declared name the Kind does
|
|
139
|
+
* not actually carry resolves to NOTHING and is dropped: a consumer then compares no coordinate
|
|
140
|
+
* at all rather than a key that can never match. Undefined when the Kind declares no `claim:`
|
|
141
|
+
* block, or when nothing in it resolves.
|
|
142
|
+
*/
|
|
143
|
+
export declare function claimCoordinates(okfVersion: string | undefined, kind: KindConvention): KindClaimCoordinates | undefined;
|
|
144
|
+
/** Declared authoring names plus the logical progress alias, when this Kind proves one exists. */
|
|
145
|
+
export declare function kindInputFieldNames(okfVersion: string | undefined, kind: KindConvention): string[];
|
|
146
|
+
/** Read a declared logical or physical Kind field without changing the stored frontmatter. */
|
|
147
|
+
export declare function readKindField(okfVersion: string | undefined, kind: KindConvention, frontmatter: Frontmatter, field: string): unknown;
|
|
148
|
+
/**
|
|
149
|
+
* Add logical field aliases to a product-facing projection while preserving every raw key. Generic
|
|
150
|
+
* document reads remain raw; only Kind-aware product surfaces call this helper.
|
|
151
|
+
*/
|
|
152
|
+
export declare function projectLogicalKindFields(okfVersion: string | undefined, kind: KindConvention, frontmatter: Frontmatter): Frontmatter;
|
|
153
|
+
/**
|
|
154
|
+
* Project a parsed Kind convention into Superbee's authoring vocabulary. Stored convention bytes
|
|
155
|
+
* remain untouched; product-facing schema/help surfaces use this view so an edition-specific
|
|
156
|
+
* workflow coordinate never becomes something an author has to learn.
|
|
157
|
+
*/
|
|
158
|
+
export declare function projectKindForAuthoring(okfVersion: string | undefined, kind: KindConvention): KindConvention;
|
|
159
|
+
/** Project Kind-validation findings into the same authoring vocabulary as the Kind schema. */
|
|
160
|
+
export declare function projectKindValidationWarnings(okfVersion: string | undefined, kind: KindConvention, warnings: ValidationWarning[]): ValidationWarning[];
|
|
161
|
+
/**
|
|
162
|
+
* Field names the CLI reserves for its own machinery and can never treat as a kind-declared
|
|
163
|
+
* field: `type` is stamped from `kind.governs` (a kind declaring it as a field would let
|
|
164
|
+
* `new --type <v>` silently overwrite the governed type it just validated against), and
|
|
165
|
+
* `dir`/`remote`/`json`/`help` are consumed by every command's common flag handling before a
|
|
166
|
+
* `--<field> <value>` pair ever reaches kind-field mapping. `body` and `body-file` are `new`'s
|
|
167
|
+
* complete-body inline and file channels. Declaring any of them would make the field permanently
|
|
168
|
+
* unreachable, not merely confusing. Filtered out of `required`/`optional`/`values` at parse time
|
|
169
|
+
* with a collected warning — never silently accepted.
|
|
170
|
+
*/
|
|
171
|
+
export declare const RESERVED_KIND_FIELD_NAMES: readonly ["type", "dir", "remote", "json", "help", "body", "body-file"];
|
|
172
|
+
/** Split a body into `{ headingText: sectionContent }` by its level-1 headings. */
|
|
173
|
+
export declare function splitSections(body: string): Record<string, string>;
|
|
174
|
+
/** Parse one convention doc into a {@link KindConvention}, or a reason it was skipped. */
|
|
175
|
+
export declare function parseConventionDoc(doc: OkfDocument): ({
|
|
176
|
+
ok: true;
|
|
177
|
+
kind: KindConvention;
|
|
178
|
+
reservedFieldsIgnored: string[];
|
|
179
|
+
reservedFieldPaths: string[];
|
|
180
|
+
} | {
|
|
181
|
+
ok: false;
|
|
182
|
+
reason: string;
|
|
183
|
+
}) & {
|
|
184
|
+
warnings: ValidationWarning[];
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Parse a kind's declared `freshness_horizon` (`<n>(m|h|d)`) to milliseconds, or
|
|
188
|
+
* `undefined` if the kind declares none or it is malformed. This FEEDS the existing
|
|
189
|
+
* {@link FreshnessOptions.maxAgeMs} at the CLI layer — it does not fork `freshness()`.
|
|
190
|
+
*/
|
|
191
|
+
export declare function freshnessHorizonMs(kind: KindConvention): number | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* True when a required-field value counts as "present" (non-empty string / non-empty array / any
|
|
194
|
+
* other defined value). Exported so consumers that must AGREE with validation's presence predicate
|
|
195
|
+
* (e.g. the CLI's `kind draft` inference) reuse this one authority instead of forking it.
|
|
196
|
+
*/
|
|
197
|
+
export declare function isPresent(value: unknown): boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Validate `doc` against `kind`: required fields present + non-empty, enum-restricted
|
|
200
|
+
* field values within the declared allowed set, and declared body `sections` present
|
|
201
|
+
* (reusing the ONE heading splitter, {@link splitSections} — no second heading parser).
|
|
202
|
+
* Returns core's EXISTING {@link ValidationWarning} shape; never throws. Purely
|
|
203
|
+
* additive derivation — callers (the CLI) decide whether a warning blocks a write.
|
|
204
|
+
*/
|
|
205
|
+
export declare function validateAgainstKind(doc: OkfDocument, kind: KindConvention): ValidationWarning[];
|
|
206
|
+
/** Result of validating a document through a bundle's already-loaded kind registry. */
|
|
207
|
+
export interface RegistryValidationResult {
|
|
208
|
+
/** The governing kind, when the document's type is declared in this registry. */
|
|
209
|
+
kind?: KindConvention;
|
|
210
|
+
warnings: ValidationWarning[];
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Apply edition-aware legacy timestamp defaulting before evaluating the governing kind. v0.1
|
|
214
|
+
* retains the historical default on every write; v0.2 defaults it only when the bundle-local Kind
|
|
215
|
+
* explicitly requires that extension. The registry is supplied by the caller so mutation does
|
|
216
|
+
* not perform hidden discovery.
|
|
217
|
+
*/
|
|
218
|
+
export declare function defaultTimestampAndValidateAgainstRegistry(doc: OkfDocument, registry: KindRegistry, options?: {
|
|
219
|
+
okfVersion?: string;
|
|
220
|
+
now?: () => string;
|
|
221
|
+
}): RegistryValidationResult;
|
|
222
|
+
/**
|
|
223
|
+
* True iff `frontmatter` carries a terminal value on any field `kind.fields.terminal` declares
|
|
224
|
+
* (task board `tasks/status-terminal-declaration.md`) — THE one derivation every consumer calls
|
|
225
|
+
* (list's `--open`, the `status` sweep's exclusion + sort fallback). Coercion mirrors
|
|
226
|
+
* `validateAgainstKind`'s enum check: `String(v)` per element, so an unquoted YAML scalar still
|
|
227
|
+
* matches, and an array field matches on ANY-member semantics: ONE terminal value anywhere in an
|
|
228
|
+
* array field marks the whole doc terminal (a doc with `status: [done, doing]` IS terminal), so
|
|
229
|
+
* multi-valued fields should only declare terminal values whose mere presence means "closed". A
|
|
230
|
+
* kind with an empty `fields.terminal` (no declaration), or a doc missing every declared terminal
|
|
231
|
+
* field, is never terminal — not-terminal is the safe default.
|
|
232
|
+
*/
|
|
233
|
+
export declare function isTerminal(kind: KindConvention, frontmatter: Frontmatter): boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Build the OKF concept document for a kind convention (the shape a `Convention` doc
|
|
236
|
+
* takes on disk — used to serialize any KindConvention to its on-disk Convention-doc form
|
|
237
|
+
* (e.g. by the CLI's recipe machinery)). `timestamp` is the caller's ISO instant (kept
|
|
238
|
+
* explicit rather than defaulted here, since `writeDocVersioned` already guarantees one).
|
|
239
|
+
*/
|
|
240
|
+
export declare function kindConventionDoc(kind: KindConvention, prose: string, timestamp: string): OkfDocument;
|
|
241
|
+
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtE,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,iEAAiE;AACjE,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,uFAAuF;AACvF,MAAM,WAAW,UAAU;IACzB,q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