HMX-V: Protocol Versioning Specification
Protocol: Hippocortex Memory Protocol (HMX)
Component: HMX-V (Versioning)
Version: HMX-1.0
Status: Stable
1. Overview
This document defines the versioning strategy for the Hippocortex Memory Protocol (HMX). It covers version identifiers, negotiation between systems, backward compatibility guarantees, and schema evolution rules.
2. Version Identifier Format
HMX-{major}.{minor}
- Major: Incremented for breaking changes. Systems MUST NOT interoperate across different major versions without explicit migration.
- Minor: Incremented for backward-compatible additions. A system supporting
HMX-1.2MUST accept data fromHMX-1.0andHMX-1.1.
Current Version
HMX-1.0
Validation Pattern
^HMX-\d+\.\d+$
Version Comparison
Versions are compared numerically: HMX-1.10 > HMX-1.9 > HMX-1.0.
3. Version Negotiation
When two systems exchange HMX data, they MUST negotiate a compatible version.
3.1 Protocol
- Producer includes
hmx_versionin every message/object - Consumer checks
hmx_versionagainst its supported range - Decision matrix:
| Producer Version | Consumer Supports | Result |
|---|---|---|
| Same major + minor ≤ consumer | ✅ Accept | Process normally |
| Same major + minor > consumer | ⚠️ Accept with warning | Ignore unknown fields |
| Different major | ❌ Reject | Return version mismatch error |
3.2 API Negotiation
For HTTP APIs, version negotiation uses headers:
# Request
Accept: application/vnd.hmx+json; version=1.0
# Response
Content-Type: application/vnd.hmx+json; version=1.0
X-HMX-Version: HMX-1.0
X-HMX-Min-Version: HMX-1.0
X-HMX-Max-Version: HMX-1.0
3.3 Streaming Negotiation
For streaming protocols (WebSocket, SSE, message queues):
- First message MUST be a version handshake:
{
"type": "hmx_handshake",
"supported_versions": ["HMX-1.0"],
"preferred_version": "HMX-1.0"
}
- Receiver responds with selected version:
{
"type": "hmx_handshake_ack",
"selected_version": "HMX-1.0"
}
- All subsequent messages use the selected version.
4. Backward Compatibility Rules
4.1 Minor Version Guarantees
Within a major version, the following are guaranteed:
| Action | Allowed? | Notes |
|---|---|---|
| Add new optional field | ✅ Yes | Consumers MUST ignore unknown fields |
| Add new enum value | ✅ Yes | Consumers SHOULD handle unknown enum values gracefully |
| Add new event type | ✅ Yes | Custom types use x-{vendor}-{type} namespace |
| Add new artifact type | ✅ Yes | Custom types use x-{vendor}-{type} namespace |
| Add new section type | ✅ Yes | Unknown sections are treated as evidence |
| Remove a required field | ❌ No | Breaking change → major version bump |
| Rename a field | ❌ No | Breaking change → major version bump |
| Change a field type | ❌ No | Breaking change → major version bump |
| Narrow an enum | ❌ No | Breaking change → major version bump |
| Change validation rules to be stricter | ❌ No | Breaking change → major version bump |
4.2 Wire Format Rules
- Unknown fields MUST be preserved when forwarding data (no field stripping)
- Unknown enum values MUST NOT cause rejection (store as-is)
- Missing optional fields have no default — they are simply absent
- Null vs. absent:
nulland absent are treated identically for optional fields
4.3 Deprecation Process
- Field is marked
deprecatedin schema docs (minor version) - Field is ignored but still accepted for 2 minor versions
- Field is removed in the next major version
5. Schema Evolution
5.1 Adding Fields
New optional fields can be added in any minor version:
// HMX-1.0
{
"hmx_version": "HMX-1.0",
"event_id": "...",
"event_type": "message"
}
// HMX-1.1 (added priority field)
{
"hmx_version": "HMX-1.1",
"event_id": "...",
"event_type": "message",
"priority": "high"
}
A HMX-1.0 consumer receiving HMX-1.1 data MUST ignore the unknown priority field.
5.2 Extending Enums
New enum values can be added in minor versions:
// HMX-1.0 event types
message, tool_call, tool_result, file_edit, ...
// HMX-1.1 adds
planning, reflection
A HMX-1.0 consumer receiving event_type: "planning" SHOULD:
- Accept the event without error
- Store it with the unknown type preserved
- Log a warning if desired
5.3 Content Schema Evolution
The content field in events and artifacts uses duck typing. New content schemas are added without changing the protocol version — the event_type / artifact_type discriminator determines interpretation.
5.4 Migration Transforms
When upgrading across minor versions, migrations are typically no-ops (additive only). Cross-major migrations require explicit transforms:
interface MigrationTransform {
from_version: string; // e.g., "HMX-1.0"
to_version: string; // e.g., "HMX-2.0"
transform(data: unknown): unknown;
}
6. Component Version Matrix
Each HMX component has its own internal schema version in addition to the protocol version:
| Component | Protocol Version | Schema Version | Field |
|---|---|---|---|
| Events (HMX-E) | hmx_version | — | Part of protocol version |
| Artifacts (HMX-A) | hmx_version | — | Part of protocol version |
| Fingerprints (HMX-F) | hmx_version | fingerprint_version | Independent, currently 1 |
| Context Packs (HMX-C) | hmx_version | — | Part of protocol version |
| Fingerprint Envelope | hmx_version | envelope_version | Independent, currently 1 |
Version Independence
fingerprint_versionandenvelope_versioncan increment independently ofhmx_version- A
HMX-1.0system may encounterfingerprint_version: 2— it should attempt best-effort import - The protocol version is the primary compatibility gate
7. Version Support Policy
| Version | Status | Support |
|---|---|---|
| HMX-1.0 | Current | Full support |
Planned Lifecycle
- Active: Full support, receives minor updates
- Maintenance: Security fixes only, no new features
- End of Life: No longer supported, migration required
Support timeline (planned):
- Active support: 2 years from release
- Maintenance: 1 additional year
- EOL: 3 years after initial release
8. Implementation Requirements
Producers
- MUST include
hmx_versionon every emitted object - MUST produce valid data according to the declared version's schema
- SHOULD support emitting data in older minor versions if requested
Consumers
- MUST check
hmx_versionbefore processing - MUST reject data with an unsupported major version
- MUST accept data from any supported minor version (≤ their own)
- MUST NOT reject data with unknown optional fields
- SHOULD log warnings for unknown fields or enum values
- SHOULD store data with version metadata for future migration
Libraries/SDKs
- MUST export version constants:
HMX_VERSION,HMX_MAJOR,HMX_MINOR - MUST provide version comparison utilities
- MUST provide version negotiation helpers
- SHOULD provide migration transform registry
9. Version Negotiation API
TypeScript Reference
interface VersionInfo {
readonly full: string; // "HMX-1.0"
readonly major: number; // 1
readonly minor: number; // 0
}
function parseVersion(version: string): VersionInfo | null;
function isCompatible(producer: string, consumer: string): boolean;
function negotiateVersion(
supported: string[],
requested: string
): string | null;
Compatibility Rules
isCompatible("HMX-1.0", "HMX-1.0") → true // exact match
isCompatible("HMX-1.0", "HMX-1.2") → true // consumer is newer
isCompatible("HMX-1.2", "HMX-1.0") → true // minor mismatch OK (forward compat)
isCompatible("HMX-1.0", "HMX-2.0") → false // major mismatch
isCompatible("HMX-2.0", "HMX-1.0") → false // major mismatch
10. Changelog
HMX-1.0 (2026-03-14)
- Initial release
- Event specification (HMX-E)
- Artifact specification (HMX-A)
- Fingerprint specification (HMX-F)
- Context Pack specification (HMX-C)
- Versioning specification (HMX-V)