Skip to content

Commit 229810a

Browse files
committed
test: add search, memory, and admin HTTP integration tests; update README/CHANGELOG
1 parent 3cf104a commit 229810a

5 files changed

Lines changed: 689 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
### Added
12+
- Moonshot HTTP modules under `streamline_sdk`:
13+
- `branches_admin.BranchesClient` (M5)
14+
- `contracts.ContractsClient` (M4)
15+
- `attestation.AttestationClient` (M4)
16+
- `search.SearchClient` (M2)
17+
- `memory.MemoryClient` (M1)
18+
- Each client is sync-friendly and uses `httpx` under the hood.
19+
1120
### Added
1221
- Admin: `cluster_info()` — cluster overview including broker list
1322
- Admin: `consumer_group_lag()` / `consumer_group_topic_lag()` — consumer group lag monitoring

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,55 @@ Run any example:
324324
python examples/basic_usage.py
325325
```
326326

327+
## Moonshot Features
328+
329+
> ⚠️ **Experimental** — These features require Streamline server 0.3.0+ with moonshot feature flags enabled.
330+
331+
### Semantic Search
332+
333+
Query topics by meaning instead of offset. Requires a topic created with `semantic.embed=true`.
334+
335+
```python
336+
results = await consumer.search("logs.app", "payment failure", k=10)
337+
for hit in results:
338+
print(f"[p{hit.partition}] offset={hit.offset} score={hit.score:.2f}")
339+
```
340+
341+
### Attestation Verification
342+
343+
Verify cryptographic provenance attestations attached to records by data contracts.
344+
345+
```python
346+
from streamline_sdk import StreamlineVerifier
347+
348+
verifier = StreamlineVerifier(public_key_bytes)
349+
result = verifier.verify(record)
350+
print(f"Verified: {result.verified}, Producer: {result.producer_id}")
351+
```
352+
353+
### Agent Memory (MCP)
354+
355+
Use Streamline as persistent memory for AI agents via the MCP protocol.
356+
357+
```python
358+
from streamline_sdk import MemoryClient
359+
360+
memory = MemoryClient("http://localhost:9094/mcp/v1")
361+
await memory.remember("user prefers dark mode", tags=["preferences"])
362+
results = await memory.recall("user preferences", k=5)
363+
```
364+
365+
### Branched Streams
366+
367+
Create topic branches for replay, A/B testing, or counterfactual analysis.
368+
369+
```python
370+
branch = await admin.create_branch("events", "experiment-v2")
371+
# Consume from the branch independently
372+
async for msg in consumer.consume(branch.topic):
373+
process(msg)
374+
```
375+
327376
## Contributing
328377

329378
Contributions are welcome! Please see the [organization contributing guide](https://github.com/streamlinelabs/.github/blob/main/CONTRIBUTING.md) for guidelines.

0 commit comments

Comments
 (0)