This document defines the normative public API contract for v0 across bindings. It is intentionally signature-free: language-level method/function signatures live in code-level API docs.
- This spec freezes cross-language semantics and invariants.
- This spec does not freeze binding-specific naming, argument ordering, or doc examples.
- The API surface is versioned as
v0. - Compatibility within v0 is additive-only.
- Existing field/operation meanings must not be removed or redefined.
- New fields must be optional with defaults that preserve old behavior.
- New operations are allowed if existing semantics remain stable.
- Any breaking change requires a new major API version.
name("chat"): resolves within the configured pool directory.path("/abs/path/to/pool.plasmite"): direct local path.uri("tcp://host:port/pool/chat"): accepted for forward compatibility.- Local v0 clients reject URI refs with
Usage(remote pool refs are not yet supported through local clients).
- Clients expose pool lifecycle operations: create, open, info, list, delete.
- Pool handles expose message operations: append, get, tail.
list_poolsis scoped to the configured local pool directory.
Messageenvelope semantics matchspec/v0/SPEC.md(seq,time,meta,data).PoolInfoincludes canonical localpathand capacity/bounds diagnostics.PoolInfofields are additive-only within v0.
Errors must carry a stable kind plus structured context when available (for example path, seq, offset).
Bindings must preserve kinds and expose context idiomatically.
Stable v0 kinds:
UsageNotFoundAlreadyExistsBusyPermissionCorruptIoInternal
create_poolcreates a new pool and returnsAlreadyExistsif one already exists.- Local create paths must create parent directories as needed (equivalent to
mkdir -p). open_poolreturnsNotFoundwhen target is missing.delete_poolmay returnBusywhen the pool cannot be removed safely.appendis atomic with respect to pool ordering and returns the committed envelope.getreturnsNotFoundwhenseqis absent/out of range.tailpreserves pool ordering byseq.
- Ordering is strictly by
seqwithin a pool. - Streams support explicit caller cancellation.
- Implementations must respect backpressure and avoid unbounded buffering.
- Once cancellation is observed, no further messages may be delivered.
- Reconnect behavior (for remote transports) must be explicit and must not reorder messages.
A binding is conformant when it implements the operation families above and preserves error kinds/semantics. Conformance suites may rely on CLI spec formatting rules for shared message validation behavior.
- Binding-specific naming, argument ordering, and exact method/function signatures.
- Binding-specific prose examples and convenience helpers.
- CLI contract:
spec/v0/SPEC.md - Remote protocol contract:
spec/remote/v0/SPEC.md