Liking cljdoc? Tell your friends :D

hive-proximum.store

Datahike-backed IMemoryStore + IMemoryStoreTemporal for hive-proximum.

Bitemporal design:

  • Every write is a new Datahike transaction (immutable fact log)
  • Updates add new facts; old values preserved in history
  • Deletes set :entry/deleted? true (tombstone, never hard-delete)
  • Temporal queries use d/as-of and d/history for time-travel

Protocol extension uses extend (function, not macro) over the hive-spi.memory.ports protocols; no dependency on hive-mcp.

Seal readiness: store-status declares :capabilities [:embed-text] and the transient :embed-text is never persisted (strip-transient); IMemoryStoreScan's scan-ids enumerates every live id from one immutable db snapshot.

Backend: Datahike 0.8.1667 (matches hive-mcp/hive-knowledge)

Datahike-backed IMemoryStore + IMemoryStoreTemporal for hive-proximum.

Bitemporal design:
- Every write is a new Datahike transaction (immutable fact log)
- Updates add new facts; old values preserved in history
- Deletes set :entry/deleted? true (tombstone, never hard-delete)
- Temporal queries use d/as-of and d/history for time-travel

Protocol extension uses `extend` (function, not macro) over the
hive-spi.memory.ports protocols; no dependency on hive-mcp.

Seal readiness: store-status declares :capabilities [:embed-text] and the
transient :embed-text is never persisted (`strip-transient`);
IMemoryStoreScan's scan-ids enumerates every live id from one immutable
db snapshot.

Backend: Datahike 0.8.1667 (matches hive-mcp/hive-knowledge)
raw docstring

capabilitiesclj

What callers may rely on beyond the IMemoryStore port, declared under :capabilities in store-status (the hive-spi.memory.decorate contract).

:embed-text an entry's transient :embed-text is never persisted, under any spelling or depth (strip-transient). This store does not embed (supports-semantic-search? is false), so there is no index the ciphertext of a sealing decorator could reach; the text it hands over is dropped.

What callers may rely on beyond the IMemoryStore port, declared under
:capabilities in store-status (the hive-spi.memory.decorate contract).

:embed-text  an entry's transient :embed-text is never persisted, under
             any spelling or depth (`strip-transient`). This store does
             not embed (supports-semantic-search? is false), so there is
             no index the ciphertext of a sealing decorator could reach;
             the text it hands over is dropped.
sourceraw docstring

create-storeclj

(create-store)
(create-store opts)

Create a ProximumStore instance. Does NOT connect immediately (lazy). Options: :backend - :memory (default) or :file :path - file path for :file backend (default: data/proximum/datahike) :config - raw Datahike config map (overrides :backend/:path)

Create a ProximumStore instance. Does NOT connect immediately (lazy).
Options:
  :backend  - :memory (default) or :file
  :path     - file path for :file backend (default: data/proximum/datahike)
  :config   - raw Datahike config map (overrides :backend/:path)
sourceraw docstring

create-stub-storeclj

(create-stub-store)

Create a ProximumStore. Replaces the old stub. Uses in-memory Datahike backend by default.

Create a ProximumStore. Replaces the old stub.
Uses in-memory Datahike backend by default.
sourceraw docstring

ensure-conn!clj

(ensure-conn! {:keys [conn-atom cfg]})

Ensure Datahike connection is established. Returns conn.

Ensure Datahike connection is established. Returns conn.
sourceraw docstring

entity->mapclj

(entity->map e)

Convert Datahike entity map to clean entry map.

:entry/content is stored as a JSON-encoded string by add-entry! / update-entry! (see entry->tx-data). Parse it back to a Clojure map on read so callers (e.g. kanban transitions) see structured content without round-tripping through json/read-str. Non-JSON content (legacy plain strings) is returned as-is.

Convert Datahike entity map to clean entry map.

`:entry/content` is stored as a JSON-encoded string by `add-entry!` /
`update-entry!` (see `entry->tx-data`). Parse it back to a Clojure map
on read so callers (e.g. kanban transitions) see structured content
without round-tripping through `json/read-str`. Non-JSON content
(legacy plain strings) is returned as-is.
sourceraw docstring

entry->tx-dataclj

(entry->tx-data raw-entry)

Convert entry map to Datahike transaction data.

:entry/content is canonically JSON-encoded so entity->map on read can deserialize back to a Clojure map. Pre-encoded strings (e.g. JSON produced by memory-kanban) pass through untouched.

The transient :embed-text is stripped first, at every depth (strip-transient), so it never reaches the fact log. The expiry is taken from :expires-at, or from the port's ISO-8601 :expires string.

Convert entry map to Datahike transaction data.

`:entry/content` is canonically JSON-encoded so `entity->map` on read
can deserialize back to a Clojure map. Pre-encoded strings (e.g. JSON
produced by `memory-kanban`) pass through untouched.

The transient :embed-text is stripped first, at every depth
(`strip-transient`), so it never reaches the fact log. The expiry is
taken from :expires-at, or from the port's ISO-8601 :expires string.
sourceraw docstring

entry-schemaclj

source

extend-store-protocols!clj

(extend-store-protocols!)

Extend ProximumStore with IMemoryStore, IMemoryStoreScan and IMemoryStoreTemporal, the hive-spi.memory.ports protocols (hive-mcp's hive-mcp.protocols.memory re-exports the same protocol values). Uses extend (function). Safe to call multiple times (idempotent via atom guard).

Extend ProximumStore with IMemoryStore, IMemoryStoreScan and
IMemoryStoreTemporal, the hive-spi.memory.ports protocols (hive-mcp's
hive-mcp.protocols.memory re-exports the same protocol values).
Uses `extend` (function).
Safe to call multiple times (idempotent via atom guard).
sourceraw docstring

make-datahike-configclj

(make-datahike-config)
(make-datahike-config {:keys [backend path]
                       :or {backend :memory path "data/proximum/datahike"}})

Build Datahike config map. Supports :memory and :file backends.

Build Datahike config map. Supports :memory and :file backends.
sourceraw docstring

pull-entryclj

(pull-entry db id)

Pull an entry from db, return nil if deleted or not found.

Pull an entry from db, return nil if deleted or not found.
sourceraw docstring

pull-entry-rawclj

(pull-entry-raw db id)

Pull an entry from db, including deleted entries.

Pull an entry from db, including deleted entries.
sourceraw docstring

scan-idsclj

(scan-ids store {:keys [include-expired?]})

Every live (not tombstoned) entry id in STORE, each once. Opts: :include-expired? (default false) also lists entries whose expiry has passed. One Datahike db value is an immutable snapshot, so a single read is the whole store; a failure to read it throws, it never answers short.

Every live (not tombstoned) entry id in STORE, each once. Opts:
:include-expired? (default false) also lists entries whose expiry has
passed. One Datahike db value is an immutable snapshot, so a single read
is the whole store; a failure to read it throws, it never answers short.
sourceraw docstring

strip-transientclj

(strip-transient x)

X without its transient embed-text keys, at every depth: dropped from X when X is a map and from every map nested in X, through maps, sequences and sets. :embed-text is embedding input only; persisting it would store the plaintext a sealing decorator encrypted. A value with nothing to drop comes back identical, and a collection holding no collection is not walked.

X without its transient embed-text keys, at every depth: dropped from X
when X is a map and from every map nested in X, through maps, sequences
and sets. :embed-text is embedding input only; persisting it would store
the plaintext a sealing decorator encrypted. A value with nothing to drop
comes back identical, and a collection holding no collection is not
walked.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close