Skip to content

Releases: gura105/operational-ontology

v0.4.1 — patched transitive dependencies

Choose a tag to compare

@github-actions github-actions released this 13 Sep 05:00
d42ff0f

What changed

  • pnpm-lock.yaml now resolves the packages that @modelcontextprotocol/sdk pulls 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 audit had 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 in package.json are 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

Choose a tag to compare

@gura105 gura105 released this 12 Sep 22:20

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. For Customer → Order, either endpoint determines the direction, so it can be omitted. For Employee → Employee, callers must choose forward or reverse.
  • 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.ts focuses 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.0 from package.json.

Breaking API changes and migration

  • Reads, query and rule callbacks, and write-back meta.target use tagged instances. Access business fields through .properties; use .type and .pk for identity.
  • Replace traverse(linkName, pk, options) with traverse(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) with defineAction(objects, definition), and modify(objectName, pk, changes) with modify(instance, changes).
  • The exported LinkEnd type is replaced by the source-based LinkTarget. New exports also include ObjectInstance, ObjectFilter, LinksFrom, LinkDirections, and TraverseOptions.

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

Choose a tag to compare

@gura105 gura105 released this 11 Sep 19:36

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>, and defineOntology<T> carry the definition's type through.
  • get / search / aggregate complete object type names and return the instance shape the property schema produces; search filters are checked against it.
  • traverse completes 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.
  • execute completes action names and checks params against the action's parameter schema; auditLog filters and load keys 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 OntologyDef keeps 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

Choose a tag to compare

@gura105 gura105 released this 11 Sep 19:36

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.