Notable changes to hive-spi. Format follows Keep a Changelog; versioning follows Semantic Versioning.
This file starts at 1.0.0. Earlier history is in the git log and the release tags (v0.1.0 through v0.2.1).
The public contract is the protocol names and their method signatures, the
schemas in hive-spi.schema.*, and the slot / provider injection APIs.
Removing a protocol, renaming a method, or changing an existing method's arity
is major. Adding a protocol, including an optional extension protocol, is
minor. Adding a method to an existing protocol is major, because every
implementation must grow it; new behaviour arrives as a new optional protocol
instead.
The library declares no third-party runtime dependencies, so it cannot contribute a version conflict to a consumer's tree.
hive-spi.artifact.record: ArtifactRecord, one swarm work product as
data (path, kind, sha256, bytes, UTC instant, lane, optional run, card,
mode, retention), so a lane's files can be registered, queried and expired
through hive memory instead of living in ad hoc folders. Pure leaf: schemas,
a total from-manifest-line mapper for the lines the funeraria harness
already appends to artifacts.manifest.edn (unqualified keys map onto the
qualified record), record->tags, sha12, valid? and explain.
ArtifactKind is closed (:screenshot :transcript :log :table :patch :data :report-binary :other). A line with an unknown kind is refused;
a registry must quarantine the file it names and never reap it.LaneId and CardId are tag-safe ([A-Za-z0-9][A-Za-z0-9._-]{0,127});
a bad id is an error value, never slugged, so record->tags cannot
inject a comma, colon or newline into a stored tag.AbsolutePath is lexically
normalised (no ., .., //, NUL, CR or LF); containment under the
artifact root is the registry's check.from-manifest-line is total over sorted maps, string keys and non-map
input, drops nil optional keys, maps #inst values to ISO-8601 UTC text,
refuses an integer mode (600 and 0600 cannot be told apart), refuses a
misspelt sensitive flag instead of dropping it, and bounds the strings,
keywords and numbers it echoes in an error. RunId is tag-safe like
LaneId. Every refusal names its rule. Order records by the parsed
instant, not the string.
Additive: a new namespace, no existing name changes.hive-spi.await.*: the single-shot await probe contract, so a concrete
await source ships as an addon and the host's poll engine waits on it
without naming its backend.
ports: IProbeSource (descriptor, parse-spec, probe!,
judge), ISecretScheme (scheme, valid-id?, resolve!, bounded by
the scheme itself) and IPollScheduler (schedule-repeating!,
shutdown!), plus the SourceDescriptor, Shape, Timing,
ProbeCtx, Observation, Verdict and ErrorKeyword schemas. The
clock is hive-spi.time.ports/IClock.registry: sources keyed by descriptor :type, schemes by name.
port->protocol is checked on register, and a malformed descriptor or
scheme name throws :await/invalid-provider.spec: the pure shared rules: kw-keys, closed-spec /
unknown-keys (closed at EVERY depth, so a key nested under a known
one is refused), refusal, allowed! (default deny), the comparators,
compare-values, the timing checks and closed-schema?.catalog: source type and secret scheme to addon, as data;
missing-source / missing-scheme name the addon to install.bounded-regex: time-bounded matching for caller-supplied regexes,
moved from the host.conformance: defconformance / run-conformance over
IProbeSource, including the nested-unknown-key and no-secret cases.stub: a stub source, secret scheme and manual scheduler, run through
the suite in this repo's tests.
The await namespaces ship as source and stay out of
:aot/source-namespaces.Guard rule scope. GuardRule takes two optional keys,
:rule/projects #{string} and :rule/agent-kinds #{keyword}, and
GuardEvent takes the matching optional :project/ids (the touched HCR
project plus its ancestors) and :agent/kind (:coordinator, :ling,
:human-session, ...). hive-spi.guard.rule/candidate? now also checks
applies-to-projects? and applies-to-agent-kind?. A scope that is absent
or empty means everywhere, so existing rules are unchanged. A scoped rule
never fires on an event whose host left those keys unresolved.
hive-spi.schema.typed-contract/ann-op: (tc/ann-op f) after (m/=> f ..)
derives the Typed Clojure t/ann from the registered contract, so the malli
and typed rungs share one source. It expands to nil unless the run sets
-Dhive.spi.typed=true with typed.clojure loaded (the :typed alias sets
the property), refuses a var with no contract, and defines no var.
hive-spi.schema.typed/contract-schema and contract-ann-form expose the
lookup and the projection.
Every public defn with an m/=> contract under src now carries
(tc/ann-op f): 439 forms in 80 namespaces, inserted by
dev/gen_typed_ann.clj (babashka, idempotent).
schema->type projects [:? T] params to one arity per choice and a
trailing [:* T] / [:+ T] to a rest arg, so optional and variadic
contracts give t/IFn arities instead of a positional Seqable.
hive-spi.memory.entry/try-parse and instant-parsers: timestamp parsing
as an ordered parser vector answering a hive-dsl Result
(:timestamp/blank, :timestamp/unparseable with the parsers tried).
parse-instant keeps its nil-on-miss contract on top of it. Only a
DateTimeParseException moves to the next parser; any other throwable is
a defect and propagates.
hive-spi.provider/via-capable takes the call as one opts map,
(via-capable reg subject {:subject-key .. :capability .. :f ..}). The
positional five-argument arity is kept and delegates.
hive-spi.memory.conformance/skip-reason: the pure skip decision the
runner reports. Skips are now logged through hive-spi.log.ports instead
of printed to stdout.
hive-spi.working-memory: the shared working-memory contract for a swarm
subgroup coordinating on one kanban card or epic. IWorkingMemoryStore
(get-entry, put-cas!, watch!, delta-since) with a per-key REVISION a
compare-and-set is judged against and a delta that RE-DELIVERS an edited key
(which a timestamp or append-only cursor would miss); IConsolidation
(consolidate!, the terminal-entry fold into long-term memory) and
IActivation (activate, the bundle a spawned ling starts from).
hive-spi.working-memory.ports carries the WorkingEntry and delta schemas;
.entry the pure entry helpers; .lifecycle the status transitions as a
CLOSED data table; .registry the single-slot injection point; and
.conformance the executable store contract. Contracts only — no engine,
no backend, no IO; the reference in-memory store is test-only. Minor: new
protocols, so nothing existing changes.
hive-spi.embeddings.space: the EmbeddingSpace value layer, moved here
from hive-mcp.embeddings.space so a vector-store backend can stamp, admit
and audit collections with no host on the classpath (->space,
space-id, check-compatible!, space->metadata, metadata->space,
admit, audit, and the EmbeddingSpace, SpaceId, Admission,
AuditRow schemas). Pure; no dependencies beyond malli.
hive-spi.vector.host-services: what a vector-store backend asks of its
host, as data. The host publishes capability keyword -> fn
(register-services!); a backend calls through soft (resolved at call
time, with a declared fallback) or invoke. catalog documents the
contract: the active embedding provider, per-type routing and spaces,
query shaping, config lookup, federated ingest search, the process-wide
embedding gate, and the host's named-collection port. Lets a backend addon
depend on hive-spi alone instead of resolving host symbols by name.
hive-spi.projection.ports: FloorProjection (project-floor), the
floor-lane projection of a host's catchup drain, behind a single slot
(set-projection!, get-projection, projection-set?,
clear-projection!) and the host call site project-or-identity, which
sends the entry whole when nothing is installed. With
hive-spi.projection.stub and hive-spi.projection.conformance, a suite
checking the port's laws (address kept, never a pointer, never grows,
idempotent) that an outside projection runs against itself.
hive-spi.swarm.dispatch: ITaskDispatcher (dispatch-task!,
capabilities), the optional IDispatcherHealth, and a priority registry
(register-dispatcher!, unregister-dispatcher!, registered). With
hive-spi.swarm.dispatch.stub and hive-spi.swarm.dispatch.conformance, a
suite an outside dispatcher runs against itself.
hive-spi.swarm.ports.agent-context: ICallerIdContext, an optional
extension of the installed agent context answering the caller id of the
tool call in flight (the identity enclave scoping keys on), and the
current-caller-id reader, which answers nil for the Noop, for a context
without the extension, and when the host's lookup throws.
hive-spi.agent.run-control: host-neutral run-control ports, one
capability per protocol (IRunSubmit, IRunContinue, IRunAwait,
IRunObserve, IRunCancel, IRunCleanup), with malli shapes (RunSpec,
RunHandle, RunStatus, RunOutcome, Cursor, TranscriptRef) and
optional :run/task-id / :run/attempt correlation that a handle echoes
unchanged. The shapes and arities are those of
hive-agent.ports.run-control, so hive-agent can adopt the ports without
changing a caller.
hive-spi.agent.transcript: ITranscriptQuery, the read-only, path-blind
side of an agent transcript (transcript-since, query-by-agent), plus
evidence?, which is false for an entry marked :transcript/truncated?.
hive-spi.agent.conformance: the TCK for both ports, shipped in src so an
adapter in another repo can run it (defconformance, run-conformance).
hive-spi.agent.stub is the in-memory reference implementation that passes
it.
hive-spi.agent.conformance: the :await-ms option (default
default-await-ms, 1000) sets how long a case waits in await-run for a
run it has ended or cancelled.
hive-spi.agent.conformance: the await and cancel cases now require
:run/final-cursor to be the cursor of the last transcript entry, so an
outcome pointing past the transcript no longer passes. A case about an
optional port (IRunCancel, IRunCleanup, IRunContinue) that the
implementation does not satisfy is reported under :skipped with a reason,
not under :ran.hive-spi.agent.stub: concurrent submit! calls get distinct run ids (the
id is minted in the swap that files the run); finish! leaves an already
terminal run as it is and files nothing for an unknown handle; await-run
with a non-numeric timeout answers the err :run/invalid-timeout instead of
throwing.hive-spi.memory.ports: IMemoryStoreScan, a port for complete
enumeration of a memory store, with matching conformance checks and stub
support. IMemoryStore is now guarded against redefinition on reload.No contract change. The jar is published to Clojars AOT-compiled
(:clojars-aot), with optional integrations shipped as source.
hive-spi.swarm.guards logs through hive-spi.log.ports instead of
requiring timbre.
hive-spi.memory.conformance, hive-spi.memory.entry,
hive-spi.memory.stub: an IMemoryStore conformance suite, entry helpers
and an atom-backed stub.hive-spi.catchup.registry: a catchup block contribution registry.hive-spi.kanban, hive-spi.kanban.registry, hive-spi.kanban.stub: the
IKanbanRead / IKanbanWrite port, its registry and a recording stub.hive-spi.memory.decorate: a store decorator chain in the memory registry,
and :embed-text in the store contract.hive-spi.memory.ports: IMemoryStoreRoutingEmbedText, relocation that
embeds the caller's text.hive-spi.native: portable native ports, hive-cabi/v1 schemas, loader registry and conformance observations.
hive-spi.swarm.dispatch-context: IDispatchContext with its two values,
TextContext and RefContext, and ->text-context, ->ref-context,
ensure-context. It is the dispatch-context protocol hive-mcp carried as
hive-mcp.protocols.dispatch, made host-free: a RefContext takes its
reconstruction function as data and resolves no host namespace, and one
built without a function resolves to its prompt and references unexpanded.
resolve-context never throws; a throwing reconstruction is reported
inside the resolved prompt. A new protocol, so minor.
hive-spi.swarm.ports.memory-scope: IDiscPropagation, an optional
extension of the installed memory-scope port, and content-changed!, the
function consumers call. A swarm that sees a claimed file's content change
tells the host with a cause keyword (:hash-mismatch); the host owns what
that cause weighs and what it spreads to. content-changed! answers nil
for the Noop, for a host that lacks the extension and for a host whose
propagation throws. IProjectScope, IDiscStaleness and noop are
untouched, so every existing implementation keeps working. Minor.
hive-spi.memory.conformance: the executable IMemoryStore contract, as data
(cases) with two projections, defconformance (one deftest per case) and
run-conformance. Covers every IMemoryStore method, every documented
query-entries opt, the expiry and duplicate paths, the degraded semantic
branch, and each role protocol when the store satisfies it.
hive-spi.memory.stub: atom-backed reference store that passes the suite;
an optional :embedder turns its semantic branch on.
hive-spi.memory.entry: pure entry helpers (type tokens, ISO parsing,
expiry predicates, reference filter, ordering, projection).
hive-spi.memory.ports/degraded-search-result: the value search-similar
returns when supports-semantic-search? is false.
hive-spi.catchup.registry: a contribution registry for catchup blocks.
A contributor (a host domain or an addon) registers
{:block/id kw :block/fn (fn [ctx]) :block/order int}; the host calls
compose with a context and receives {:blocks {id value} :failed {id message}}, blocks run in :block/order and a throwing block never aborts
the others. Minor: a new seam, nothing existing changed.
hive-spi.kanban: the kanban port. IKanbanRead (list-tasks,
get-task) and IKanbanWrite (transition!, create-task!), the malli
schemas for their arguments and results (Task, ListQuery,
TransitionRequest, CreateRequest, TransitionResult, CreateResult),
and conformance, the cases every provider and every double must pass.
hive-spi.kanban.registry keys the two roles separately and fronts them
with a facade that degrades to Noops (reads empty, writes
{:err {:error :kanban/provider-unavailable}}) when nothing is
registered. hive-spi.kanban.stub is a recording, atom-backed double held
to the same conformance. hive-mcp carries this port host-local as
hive-mcp.spi.kanban; this is its library home. New protocols, so minor.
{:count n :deleted-ids [...]}, search-similar returns a sequential and the
degraded value when unsupported, :type compares by name, :tags are a set.hive-spi.schema.derive: a throwing projection no longer takes the
compile-op bundle down.hive-spi.vector.ports, hive-spi.vector.memory: a vendor-neutral port
for a named vector collection.hive-spi.swarm.protocol, hive-spi.swarm.bootstrap: the swarm registry
and bootstrap protocols.hive-spi.swarm.agent, hive-spi.swarm.agent-types,
hive-spi.swarm.spawn-modes: IAgent and the agent-type / spawn-mode
registries.hive-spi.swarm.ports.events, hive-spi.swarm.ports.memory-scope,
hive-spi.swarm.ports.agent-context, hive-spi.swarm.ports.ling-host:
host ports for events, scope, agent context and ling host.hive-spi.swarm.ports.messaging: a platform-agnostic messaging port with
inbox sinks.hive-spi.swarm.guards: the swarm process-role guards.hive-spi.swarm.ling-strategy, hive-spi.swarm.spawn-store,
hive-spi.swarm.ledger: the ling-strategy, spawn-store and ledger
contracts.stop-dag! returns the scheduler's stop summary, and reports a host
failure as {:stopped false :error}.hive-spi.vessel: IRenderer, a presentation-only renderer port.:cljs arm of seven .cljc namespaces named JVM-only primitives
(requiring-resolve, format, *err*, java.time, System); each now
loads on ClojureScript.hive-spi.ingest.model, hive-spi.ingest.ports,
hive-spi.ingest.registry, hive-spi.ingest.tck: the seam that lets a
closed ingest pipeline take community providers.The seam stopped moving. Nothing in the contract changed for this release. 1.0.0 is the promise that it will not change silently from here, made because hive-mcp cannot promise stability over ports that do not promise it.
CHANGELOG.md (this file) and a ## Versioning section in the README
stating what a major, minor and patch bump each mean for an implementor.src/hive_spi/workflow/ports.cljc and seven protocols
(IPlanCompiler, IPlanGraph, ITaskBoard, IHeadlessDispatcher,
IWorkflowStore, IEffectHandler, IIntrospectable) that no longer exist
under those names. The workflow seam is IWorkflowEngine and
IWorkflowPersistence in hive-spi.workflow.engine, plus IDispatchStrategy
in hive-spi.workflow.strategy. The Ports section now lists every port
family that actually ships, and the Layout tree matches the repository.Can you improve this documentation? These fine people already did:
Pedro Gomes Branquinho & Pedro G. BranquinhoEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |