okf 0.5.0
okf: ^0.5.0 copied to clipboard
A format-first Dart toolkit for reading, validating, writing, indexing, and graphing Open Knowledge Format bundles.
0.5.0 #
- Adopt OKF revision
62432a0: every timestamp is an ISO 8601 datetime with a UTC offset. A date-only or offset-less value raises the non-blockingokf/timestamp-without-offsetadvisory naming the exact field, andOkfSpecValidation.isConformantis unchanged, so a bundle that validates today still validates.okf validate --strictis the exception: it escalates advisories to failures, so it starts failing on date-only timestamps it used to accept. Runokf format --migrate-timestampson those bundles, or drop--strictuntil you have. - Compare staleness as an instant rather than a local calendar day.
stale_afterwas read as a calendar date and compared in the caller's local zone; it is now an instant, stale whennow >= stale_after. East of UTC a concept goes stale later than before — two hours in Berlin, twelve in Auckland — and west of UTC it can now become stale on the previous local day. Callers in UTC see no change. - Add
okf format --migrate-timestamps, which rewrites date-only values toT00:00:00Zand reports every change. It is opt-in, idempotent, writes nothing under--check, and leaves offset-less datetimes alone rather than guessing a zone for them. Migrating a date-onlyverified.atcan raise a concept'strust_tierfromunverifiedtohuman-reviewed, because the verification now carries a usable time; that change is visible inokf graph. - Reject impossible timestamps through one strict parser.
2026-02-30previously rolled over into March 2 and was accepted; it is now rejected everywhere. Date values still read as midnight UTC forstale_after,usage_windowandlast_modified, where a date has always been valid.generated.atandverified[].athave always required a time, so a date-only value there carries no instant and does not count as a verification.
0.4.2 #
- No changes to the package. This release completes the deployment pipeline:
the macOS job now holds the
contents: writepermission its uploads need, so 0.4.1's macOS archives and Homebrew formula, which were published by hand, are produced by CI again.
0.4.1 #
- Use Ack schemas for graph-query parsing and generated, typed MCP arguments. Each input schema owns runtime constraints and the advertised JSON Schema. Partial updates retain omitted fields, and OKF Spec findings and tolerant metadata behavior remain unchanged. Concept IDs stay encoded as strings, and invalid IDs and graph-query fields are reported with their specific paths and validation reasons.
- Generate equality, hashing,
copyWith, diagnostic strings, and JSON adapters for index entries, log entries, and legacy citation values with Ack. Use the generated copies when normalizing writable index and log entries, and verify all generated model parts in CI. Const constructors, tolerant parsing, Markdown output, and optional v0.1 citation compatibility are preserved; concept IDs, diagnostics, and documents retain their existing validated constructors and custom formatting. - Consolidate internal rule metadata, execution context, and YAML value helpers while preserving the public package exports. Remove redundant construction wrappers and use normal constructors where direct initialization suffices. Align IO, MCP, and rule tests with their source modules and consolidate the index/log contract suites without changing their assertions.
- Classify local graph targets containing raw or percent-encoded C1 control characters as invalid, matching bundle-path validation, instead of unresolved.
- Raise the minimum supported Dart SDK from 3.4 to 3.9 for Ack 1.2.
0.3.0 #
- Narrow MCP
list-conceptswith optionalprefix,type, andqueryparameters:prefixnames a bundle area,typekeeps one concept type, andqueryis a case-insensitive substring over concept IDs and titles. A filtered listing that matches nothing reports the type and area vocabulary the bundle actually holds, so a caller corrects its filters in one round trip. - Serialize MCP tool results exactly once, as the JSON text block. Results no
longer carry a duplicate
structuredContentcopy, which doubled every result on the wire; a client that readstructuredContentreads the text block instead. - Drop the
pathfield from MCP concept summaries and lookups; it is always the concept ID plus the.mdsuffix. - Match graph
path_prefixes(CLI--path-prefix) per whole path segment through the newOkfConceptId.isWithin: a value names a concept or a directory, soarchitecturematchesarchitectureand everything underarchitecture/, and no longer the unrelatedarchitecture-notes. A value that named a full document path, such asnotes/beta.md, becomes the concept ID,notes/beta.
0.2.0 #
- Add the engine contract types: findings, the immutable OKF Spec report and conformance judgment, adapter verdicts, change descriptions, and index/log entries.
- Pin the finding ID grammar to lowercase kebab-case
<namespace>/<code>and holdOkfReportfindings in one canonical order on every surface: path, line, column, ID, severity, message. - Move
OkfIndexEntryinto the index/log model and add value equality to index and log entries. - Add
OkfIndexDocumentandOkfLogDocument, which parse and emit theindex.mdandlog.mdentry format. The index generator and the reserved file rules consume them instead of carrying their own copy of the format. - Namespace every Spec finding as
okf/<code>and expose read-only rule descriptors while keeping execution fixed insideOkfSpecValidator. Validation text and JSON now project the shared Report, bundle load failures are findings, and CLI exit status is judged by the Verdict.okf validate --strictfails on advisories;--warnings-as-errorsremains as an alias. - Add prepared bundle changes as the single safe write path for create, update, link, and deprecate operations. Preparation validates a complete immutable candidate with the closed Spec validator; commit detects stale source state and writes the exact prepared files transactionally.
- Add composable graph filters for concept type, path prefix, and edge resolution.
- Version and document the graph JSON schema.
- Add
okf mcp, a Model Context Protocol server over stdio with thelist-concepts,lookup-concept,query-graph, andvalidatetools. Itsvalidatetool returns the same Report and Verdict as the command line, andquery-graphtakes the graph filter vocabulary as its input schema. - Add the
create-conceptandupdate-conceptMCP write tools, thin adapters overOkfBundleChangeApplier: one call writes the concept and maintains theindex.mdandlog.mdentries atomically. A Spec-invalid candidate is refused with the Report the command line prints for the same state and leaves no file changed, while input that describes no bundle state is a plain tool error. Updates managetype,title,description,tags, andbody, and retain every other frontmatter field. - Add the
link-conceptsanddeprecate-conceptMCP write tools, completing the fixed tool surface. A link records the relationship on the source concept; an absent target is accepted and remains an unresolved graph edge. A deprecation setsstatus: deprecated. Both update the concept andlog.mdin the same operation and share the write path's refusal and tool-error tiers. - Breaking:
okf validate --output jsonreplaces thevalid,error_count,warning_count, anddiagnosticsfields with the Report projection — afindingsarray whose entries carryid,severity,message, andlocation. - Breaking: remove
OkfDiagnosticandOkfValidationReport(withisValid,errorCount, andwarningCount) in favor ofOkfFinding,OkfReport, and the closedOkfSpecValidator. - Enforce one non-normalizing POSIX grammar across bundle inventories, concept IDs, and file-system adapters.
- Snapshot bundle change descriptions faithfully, keeping frontmatter value
types, key order, and the body verbatim, and reject YAML values no change
kind can represent with
ArgumentError. - Validate relationship names, and escape control characters in one-line finding text while retaining raw locations and messages in JSON.
- Add the CI gate: releases attach
dart compile exebinaries for Linux and macOS, and a composite GitHub Action pins an engine version, downloads the matching attested binary from an immutable release, and runs OKF Spec validation as a single invocation whose exit code decides the job. - Define the index link destination grammar (ADR-0008): destinations are
percent-encoded — generated links now encode parentheses too — and
CommonMark angle-bracket destinations (
(<…>)) parse and normalize to the encoded spelling, so reference filenames with spaces and parentheses are writable and parseable. Plain destinations carrying raw whitespace, parentheses, or angle brackets surface the new advisoryokf/non-portable-index-link, andOkfIndexDocumentrejects them withArgumentErrorinstead of emitting a line CommonMark cannot read. - Fix graph target resolution crashing the host process on link targets that
fail percent-decoding: a segment with no
%(raw non-ASCII such as an em dash in a reference filename) now resolves against the bundle as already decoded, and a segment with a genuinely malformed escape resolves as aninvalidedge. - Classify prose
sources[].resourcedescriptors that contain slashes ("extracted PDF/OOXML text") asdescriptorgraph edges: whitespace or a backtick now marks a source resource as prose before the slash test, since genuine link paths percent-encode whitespace (ADR-0008).
0.1.2 #
- Move package ownership to the verified
concepta.devpublisher. - Update repository and issue links for the
conceptadevorganization.
0.1.1 #
- Remove development-only and copied third-party test artifacts.
- Replace copied fixtures with independently authored compatibility tests.
0.1.0 #
- Initial implementation of the Open Knowledge Format v0.2.
- Parse, write, validate, index, and graph OKF bundles.
- Add the
okfcommand-line interface.