v0.2.0
Mesh SDK — the canonical agent-multiplayer surface. Locked at this release; further work is consolidation, not expansion.
What’s frozen
The SDK covers exactly three integration shapes. Each has a canonical example in examples/:
- Server agent —
new Ablo({ schema })readsABLO_API_KEY, joins and works. (examples/server-agent.ts) - Browser app — server mints a scoped capability, browser holds it via
new Ablo({ schema, capabilityToken }). No API key in bundle, no session cookies, no allowed-origins registration required. Stripeclient_secretshape. (examples/browser-app.ts) - Sub-agent —
parent.join(child, opts)attenuates from the parent’s capability. (examples/sub-agent.ts)
Ergonomics (package-wide)
Abloclass —import Ablo from '@abloatai/ablo'/new Ablo({ schema }). Matchesnew Stripe()/new OpenAI()/new Anthropic()pattern.createMesh(opts)stays available as the functional alias.- Model-scoped joins —
ablo.matters.join(id, { label })desugars to the genericjoin. Proxy-based so the namespace adapts to any schema. Collisions with reserved admin fields (roles,members,audit,capabilities) throw at construction time. - Flat scope form —
scope: { matters: id }alongside the array form. asalias —{ as: session({...}) }replaces the security-jargononBehalfOf; both still accepted.- Auto-connect —
join()returns a connected participant.autoConnect: falseto opt out. - Duration strings —
ttl: '3m',ttlSeconds: '24h'accepted alongside numbers. - Descriptive generics — every public type uses
TSchema/TAgent/ModelNameinstead ofS/A/K. Zerounknownin public types.
Coordination primitives
- Presence verbs —
participant.presence.editing(target)/viewing(target)/idle(). Plusupdate({...})escape hatch for custom actions. - Intent verbs —
participant.intents.editing(target, opts)/writing(target, opts). Returns anIntentHandlewithSymbol.asyncDisposesoawait using work = ...auto-revokes. - Snapshots —
const snap = await participant.snapshot({ clauses: [id] }). Flat shape:snap.clauses[id](typed from schema viaInferModel, notunknown),snap.stamp,snap.signal(AbortSignal). - Async iterables —
for await (const peers of participant.presence),for await (const openIntents of participant.intents),for await (const delta of participant.deltas).
Env / config
ABLO_API_KEY— required for server-side use.baseURL— optional override for private deployments / local-dev (defaults towss://api.abloatai.com).organizationId— no longer required increateMesh. The API key or session binds the caller to one org; the capability mint response echoes it back.createMeshFromEnv— removed.new Ablo({ schema })auto-reads env.
Test coverage
- 53 mesh unit tests across 8 suites (
__tests__/unit/mesh/) - New E2E test
e2e-browser-capability-token.tsproves the server-mints / browser-holds flow end-to-end - Existing 12 mesh E2E tests (token refresh, watermark, chinese wall, etc.) still pass