Releases: gura105/operational-ontology
Release list
v0.4.1 — patched transitive dependencies
What changed
pnpm-lock.yamlnow resolves the packages that@modelcontextprotocol/sdkpulls in transitively to their patched versions: fast-uri 3.1.7, hono 4.13.7, @hono/node-server 1.19.17, ip-address 10.7.0, and qs 6.16.0.pnpm audithad reported 19 advisories against these packages (7 high, 11 moderate, 1 low), including CVE-2026-16221 (fast-uri host confusion). Every fix falls within the ranges the SDK already declares, so the dependencies listed inpackage.jsonare unchanged.- The Release workflow no longer configures pnpm caching in its Node setup step, which it never used.
API changes and migration
None. The public API, examples, and documentation are unchanged from v0.4.0. The MCP server announces version 0.4.1 from package.json.
Exposure
Practical exposure was low: the example MCP server uses the stdio transport only, and fast-uri is used by ajv for JSON Schema uri format checks rather than for host validation. The refresh keeps pnpm audit clean for anyone who installs the project.
Validation
pnpm typecheck, all 73 tests, pnpm demo, and pnpm audit (0 advisories) pass.
Implemented in PR #13; reported in #12.
Full diff: v0.4.0...v0.4.1
v0.4.0 — tagged instances and source-based traversal
What changed
Object instances now carry their identity as { type, pk, properties }. The same value can be read, passed to traversal, used in action rules, and supplied to modify.
traverse(source, linkName, options)derives available links, valid directions, and result types from the source instance and the model. ForCustomer → Order, either endpoint determines the direction, so it can be omitted. ForEmployee → Employee, callers must chooseforwardorreverse.- Traversal re-reads the source under the caller's actor and checks visibility at both endpoints. Supplied properties do not determine identity or visibility.
defineAction(objects, definition)types the target instance and params in action callbacks.modify(instance, changes)checks the changed properties against that instance's type.- Model definitions and derived types live in
src/model.ts;src/core.tsfocuses on runtime behavior. Concrete examples, descriptive type parameters, and adjacent accepted/rejected type tests explain the inference rules. - Both READMEs focus on the motivation, definition, runnable example, and code-reading path, retaining the semantic-layer comparison and conceptual FAQs. The bilingual implementation notes cover API contracts and implementation rationale.
- The orders example and generated MCP schemas use the same instance contract. The MCP server announces version
0.4.0frompackage.json.
Breaking API changes and migration
- Reads, query and rule callbacks, and write-back
meta.targetuse tagged instances. Access business fields through.properties; use.typeand.pkfor identity. - Replace
traverse(linkName, pk, options)withtraverse(instance, linkName, options). A link between distinct types follows the direction determined by the source; a link whose endpoints have the same type requires an explicit direction. Results remain arrays. - Replace
defineAction(definition)withdefineAction(objects, definition), andmodify(objectName, pk, changes)withmodify(instance, changes). - The exported
LinkEndtype is replaced by the source-basedLinkTarget. New exports also includeObjectInstance,ObjectFilter,LinksFrom,LinkDirections, andTraverseOptions.
Stored rows and audit edit payloads retain their previous format.
Deferred
Object sets and pivot remain for a later phase. Definition references remain names; create, link, and unlink payloads are checked at runtime rather than inferred from the model.
Validation
pnpm typecheck, all 73 tests, and pnpm demo pass.
Implemented in PR #4.
Full diff: v0.3.0...v0.4.0
v0.3.0 — the model types the runtime's call sites
What changed
The runtime's call sites are typed by the model they were built from, without changing how a model is written.
Runtime<T>,createRuntime<T>, anddefineOntology<T>carry the definition's type through.get/search/aggregatecomplete object type names and return the instance shape the property schema produces;searchfilters are checked against it.traversecompletes link names. Its result type is decided by the link's ends and the shape of the options: absent, forward; a required'reverse', the from side;'forward', the to side; an optional'reverse'or a union of option shapes, both sides as a union. Two review findings shaped this rule, and both are pinned by tests.executecompletes action names and checks params against the action's parameter schema;auditLogfilters andloadkeys are checked too. Rows in a snapshot stay physical — the schema validates them at runtime, as before.LinkTypeDef<From, To>keeps the literal names of its ends.- A definition typed only as
OntologyDefkeeps the untyped contract: string names, open records. - New exported types:
ObjectName,LinkName,ActionName,Direction,ObjectOf,LinkEnd,ParamsOf. - The MCP server announces the package version, read from
package.json; a test pins it.
Breaking for TypeScript callers
Explicit type arguments on reads — rt.get<{ status: string }>('Order', …) — are no longer accepted. The type comes from the model; drop the argument.
Not in this version
Rule contexts inside actions (ctx.object, edit payloads) and the from / to / object references between definitions are still untyped. That is the next version.
Full diff: v0.2.0...v0.3.0
v0.2.0
Tagged retroactively on the last commit of the v0.2 line, so that v0.2.0...v0.3.0 compares.
This version removed mechanisms that enforced vows beyond the four properties — canonical-form storage checks, foreign-transaction detection, targetless actions, property-mirrored links, deletes — and replaced them with declared contracts, keeping the runtime readable in one sitting. Nothing in the four properties was lost.