@abloatai/ablo 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,7 +11,7 @@ Capability fields shed their redundant `allowed` prefix to match the surrounding
11
11
  ### Added
12
12
 
13
13
  - `DefineSchemaOptions.identityRoles?: readonly IdentityRole[]` — open registration of identity-anchored sync-group roles on `defineSchema(...)`. Each `IdentityRole` declares `{ kind, template, extract }`: a diagnostic label, a `'<prefix>:{id}'` template, and a pure extractor function from an opaque identity context to zero-or-more ids. No closed enum; consumers fully control both the template strings and the extraction logic.
14
- - `composeIdentitySyncGroups(identity, schema)` exported from `@ablo/sync-engine/schema` — walks the schema's registered `identityRoles`, calls each extractor, and substitutes ids into templates. Stable, deduped output. Returns `[]` when no roles are registered.
14
+ - `composeIdentitySyncGroups(identity, schema)` exported from `@abloatai/ablo/schema` — walks the schema's registered `identityRoles`, calls each extractor, and substitutes ids into templates. Stable, deduped output. Returns `[]` when no roles are registered.
15
15
  - `Schema.identityRoles: readonly IdentityRole[]` — the registered list, accessible on every `defineSchema(...)` result.
16
16
  - New exported types: `IdentityRole`, `IdentityContext`.
17
17
 
@@ -47,7 +47,7 @@ Declarative props absorb every class of lifecycle glue; the status hook returns
47
47
 
48
48
  ### Added
49
49
 
50
- - `<AbloProvider>` — umbrella provider at `@ablo/sync-engine/react`. Props include data config (`schema`, `url`, `userId`, `organizationId`), auth (`capabilityToken` / `apiKey` / session cookie fallback), declarative behavior (`preventUnsavedChanges`, `lostConnectionTimeout`, `postBootstrap`), callbacks (`onSessionExpired`, `onError`, `resolveUsers`), and DI escape hatches.
50
+ - `<AbloProvider>` — umbrella provider at `@abloatai/ablo/react`. Props include data config (`schema`, `url`, `userId`, `organizationId`), auth (`capabilityToken` / `apiKey` / session cookie fallback), declarative behavior (`preventUnsavedChanges`, `lostConnectionTimeout`, `postBootstrap`), callbacks (`onSessionExpired`, `onError`, `resolveUsers`), and DI escape hatches.
51
51
  - `<SyncGroupProvider id="matter:...">` + `useSyncGroup()` — per-entity scope context.
52
52
  - `<ClientSideSuspense fallback={...}>` — gate renders until the engine reports `connected`. Phase-1 non-Suspense; phase-2 upgrades to real Suspense.
53
53
  - `useSyncStatus()` rewritten as a tagged union: `{ name: 'initial' | 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'needs-auth', ... }`. Impossible states are unrepresentable.
@@ -155,7 +155,7 @@ The SDK covers exactly three integration shapes. Each has a canonical example in
155
155
 
156
156
  ### Ergonomics (package-wide)
157
157
 
158
- - **`Ablo` class** — `import Ablo from '@ablo/sync-engine'` / `new Ablo({ schema })`. Matches `new Stripe()` / `new OpenAI()` / `new Anthropic()` pattern. `createMesh(opts)` stays available as the functional alias.
158
+ - **`Ablo` class** — `import Ablo from '@abloatai/ablo'` / `new Ablo({ schema })`. Matches `new Stripe()` / `new OpenAI()` / `new Anthropic()` pattern. `createMesh(opts)` stays available as the functional alias.
159
159
  - **Model-scoped joins** — `ablo.matters.join(id, { label })` desugars to the generic `join`. Proxy-based so the namespace adapts to any schema. Collisions with reserved admin fields (`roles`, `members`, `audit`, `capabilities`) throw at construction time.
160
160
  - **Flat scope form** — `scope: { matters: id }` alongside the array form.
161
161
  - **`as` alias** — `{ as: session({...}) }` replaces the security-jargon `onBehalfOf`; both still accepted.
@@ -199,7 +199,7 @@ Initial release.
199
199
  - **AI Agent SDK**: `SyncAgent` for backend/AI agent participation as first-class sync citizens
200
200
  - **Pluggable auth**: `AuthProvider` interface with built-in API key, JWT, and session providers
201
201
  - **Security**: IndexedDB cleanup on session expiry and sync group revocation
202
- - **Testing utilities**: `@ablo/sync-engine/testing` subpath with mocks, fixtures, and harness
202
+ - **Testing utilities**: `@abloatai/ablo/testing` subpath with mocks, fixtures, and harness
203
203
 
204
204
  ### Test Coverage
205
205
 
package/README.md CHANGED
@@ -13,7 +13,7 @@ schema -> ablo.<model>.create/load/edit/update(...)
13
13
  ## Install
14
14
 
15
15
  ```bash
16
- npm install @ablo/sync-engine
16
+ npm install @abloatai/ablo
17
17
  ```
18
18
 
19
19
  Requires Node 22+ and TypeScript 5+.
@@ -33,8 +33,8 @@ provider. Do not ship `ABLO_API_KEY` in a browser bundle.
33
33
  ## Quick Start
34
34
 
35
35
  ```ts
36
- import Ablo from '@ablo/sync-engine';
37
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
36
+ import Ablo from '@abloatai/ablo';
37
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
38
38
 
39
39
  const schema = defineSchema({
40
40
  weatherReports: model({
package/docs/api-keys.md CHANGED
@@ -3,14 +3,14 @@
3
3
  Trusted runtimes authenticate with an API key.
4
4
 
5
5
  ```ts
6
- import Ablo from '@ablo/sync-engine';
6
+ import Ablo from '@abloatai/ablo';
7
7
 
8
8
  const ablo = Ablo({ apiKey: process.env.ABLO_API_KEY });
9
9
  ```
10
10
 
11
11
  The key identifies the Ablo account. Application code does not pass an organization id; Ablo derives scope from the credential.
12
12
 
13
- Use the root `@ablo/sync-engine` import with a schema for app clients.
13
+ Use the root `@abloatai/ablo` import with a schema for app clients.
14
14
 
15
15
  ## Server-Side API Keys
16
16
 
package/docs/api.md CHANGED
@@ -7,8 +7,8 @@ agents, read [Integration Guide](./integration-guide.md).
7
7
 
8
8
 
9
9
  ```ts
10
- import Ablo from '@ablo/sync-engine';
11
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
10
+ import Ablo from '@abloatai/ablo';
11
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
12
12
 
13
13
  const schema = defineSchema({
14
14
  tasks: model({
@@ -171,7 +171,7 @@ Use `dataSource(...)` only when the customer's app database remains canonical
171
171
  and Ablo should call a signed endpoint instead of storing customer rows itself.
172
172
 
173
173
  ```ts
174
- import { dataSource } from '@ablo/sync-engine';
174
+ import { dataSource } from '@abloatai/ablo';
175
175
  import { schema } from './ablo.schema';
176
176
 
177
177
  export const POST = dataSource({
@@ -104,7 +104,7 @@ behalf-of).
104
104
  ## Create
105
105
 
106
106
  ```ts
107
- import Ablo from '@ablo/sync-engine';
107
+ import Ablo from '@abloatai/ablo';
108
108
 
109
109
  const admin = Ablo({ apiKey: process.env.ABLO_API_KEY });
110
110
 
@@ -5,8 +5,8 @@ This page covers the SDK behavior around options, errors, retries, and runtimes.
5
5
  ## Constructor
6
6
 
7
7
  ```ts
8
- import Ablo from '@ablo/sync-engine';
9
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
8
+ import Ablo from '@abloatai/ablo';
9
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
10
10
 
11
11
  const schema = defineSchema({
12
12
  tasks: model({
@@ -152,7 +152,7 @@ All SDK errors extend `AbloError` and carry a stable `type`.
152
152
  | `AbloBusyError` | Active intent conflicted with `ifBusy: 'fail'` or a busy wait timed out. |
153
153
 
154
154
  ```ts
155
- import { AbloBusyError } from '@ablo/sync-engine';
155
+ import { AbloBusyError } from '@abloatai/ablo';
156
156
 
157
157
  try {
158
158
  await ablo.tasks.update('task_123', { status: 'done' }, { wait: 'confirmed' });
@@ -192,10 +192,10 @@ request bodies that may contain customer data.
192
192
 
193
193
  Only these imports are public SemVer surface:
194
194
 
195
- - `@ablo/sync-engine`
196
- - `@ablo/sync-engine/schema`
197
- - `@ablo/sync-engine/react`
198
- - `@ablo/sync-engine/testing`
195
+ - `@abloatai/ablo`
196
+ - `@abloatai/ablo/schema`
197
+ - `@abloatai/ablo/react`
198
+ - `@abloatai/ablo/testing`
199
199
 
200
200
  `dataSource(...)` is exported from the root package for customer-owned storage
201
201
  adapters. Everything outside the four import paths is internal to Ablo-owned
@@ -13,7 +13,7 @@ app to commit it.
13
13
  Use the SDK with an API key:
14
14
 
15
15
  ```ts
16
- import Ablo from '@ablo/sync-engine';
16
+ import Ablo from '@abloatai/ablo';
17
17
  import { schema } from './ablo.schema';
18
18
 
19
19
  export const ablo = Ablo({
@@ -82,7 +82,7 @@ ABLO_DATA_SOURCE_SIGNING_SECRET=whsec_...
82
82
 
83
83
  ```ts
84
84
  // app/api/ablo/source/route.ts
85
- import { dataSource } from '@ablo/sync-engine';
85
+ import { dataSource } from '@abloatai/ablo';
86
86
  import { schema } from '@/ablo.schema';
87
87
  import { db } from '@/db';
88
88
 
@@ -18,8 +18,8 @@ Use the same schema client the app uses. The worker loads the task, checks activ
18
18
  intents, and writes through `ablo.tasks.update(...)`.
19
19
 
20
20
  ```ts
21
- import Ablo from '@ablo/sync-engine';
22
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
21
+ import Ablo from '@abloatai/ablo';
22
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
23
23
 
24
24
  const schema = defineSchema({
25
25
  tasks: model({
@@ -58,7 +58,7 @@ not the first integration path.
58
58
  ```tsx
59
59
  'use client';
60
60
 
61
- import { useAblo } from '@ablo/sync-engine/react';
61
+ import { useAblo } from '@abloatai/ablo/react';
62
62
 
63
63
  export function TaskRow({ task: serverTask }: Props) {
64
64
  const data = useAblo((ablo) => ablo.tasks.retrieve(serverTask.id)) ?? serverTask;
@@ -3,8 +3,8 @@
3
3
  Use AI SDK for the loop and Ablo for the state boundary inside the tool.
4
4
 
5
5
  ```ts
6
- import Ablo from '@ablo/sync-engine';
7
- import { defineSchema, model, z as schemaZ } from '@ablo/sync-engine/schema';
6
+ import Ablo from '@abloatai/ablo';
7
+ import { defineSchema, model, z as schemaZ } from '@abloatai/ablo/schema';
8
8
  import { streamText, tool } from 'ai';
9
9
  import { z } from 'zod';
10
10
 
@@ -27,7 +27,7 @@ Create a schema for the records that need realtime coordination.
27
27
 
28
28
  ```ts
29
29
  // web/ablo.schema.ts
30
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
30
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
31
31
 
32
32
  export const schema = defineSchema({
33
33
  tasks: model({
@@ -41,7 +41,7 @@ export const schema = defineSchema({
41
41
 
42
42
  ```ts
43
43
  // web/ablo.ts
44
- import Ablo from '@ablo/sync-engine';
44
+ import Ablo from '@abloatai/ablo';
45
45
  import { schema } from './ablo.schema';
46
46
 
47
47
  export const ablo = Ablo({
@@ -57,7 +57,7 @@ model resources without importing server credentials.
57
57
  // web/app/providers.tsx
58
58
  'use client';
59
59
 
60
- import { AbloProvider } from '@ablo/sync-engine/react';
60
+ import { AbloProvider } from '@abloatai/ablo/react';
61
61
  import { schema } from '@/ablo.schema';
62
62
 
63
63
  export function Providers({ children }: { children: React.ReactNode }) {
@@ -73,7 +73,7 @@ subscribe to the same model resource Ablo writes through.
73
73
  ```tsx
74
74
  'use client';
75
75
 
76
- import { useAblo } from '@ablo/sync-engine/react';
76
+ import { useAblo } from '@abloatai/ablo/react';
77
77
 
78
78
  export function TaskRow({ task: serverTask }: { task: Task }) {
79
79
  const task = useAblo((ablo) => ablo.tasks.retrieve(serverTask.id)) ?? serverTask;
@@ -64,7 +64,7 @@ rejects. The action can re-fetch and ask the user to retry.
64
64
  ```tsx
65
65
  'use client';
66
66
 
67
- import { useAblo } from '@ablo/sync-engine/react';
67
+ import { useAblo } from '@abloatai/ablo/react';
68
68
 
69
69
  export function TaskEditor({ task: serverTask }: Props) {
70
70
  const data = useAblo((ablo) => ablo.tasks.retrieve(serverTask.id)) ?? serverTask;
@@ -4,8 +4,8 @@ Most server agents should import the app schema and use the same model methods
4
4
  as the product UI.
5
5
 
6
6
  ```ts
7
- import Ablo from '@ablo/sync-engine';
8
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
7
+ import Ablo from '@abloatai/ablo';
8
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
9
9
 
10
10
  const schema = defineSchema({
11
11
  tasks: model({
package/docs/index.md CHANGED
@@ -87,7 +87,7 @@ query-shaped sync).
87
87
 
88
88
  ## Runtime builds
89
89
 
90
- - `@ablo/sync-engine` — schema-powered sync client for typed model operations, realtime, intents, and receipts.
90
+ - `@abloatai/ablo` — schema-powered sync client for typed model operations, realtime, intents, and receipts.
91
91
  - `Ablo({ apiKey })` — advanced resource client for runtimes that intentionally cannot import a schema.
92
92
 
93
93
  ## More
@@ -40,8 +40,8 @@ together, behind one client.
40
40
  The normal integration is one client:
41
41
 
42
42
  ```ts
43
- import Ablo from '@ablo/sync-engine';
44
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
43
+ import Ablo from '@abloatai/ablo';
44
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
45
45
  ```
46
46
 
47
47
  Declare the models Ablo coordinates, then read and write through
@@ -106,7 +106,7 @@ offline-heavy local cache behavior.
106
106
 
107
107
  ```ts
108
108
  // src/ablo.schema.ts
109
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
109
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
110
110
 
111
111
  export const schema = defineSchema(
112
112
  {
@@ -176,7 +176,7 @@ Trusted runtimes can use `ABLO_API_KEY`.
176
176
 
177
177
  ```ts
178
178
  // src/ablo.ts
179
- import Ablo from '@ablo/sync-engine';
179
+ import Ablo from '@abloatai/ablo';
180
180
  import { schema } from './ablo.schema';
181
181
 
182
182
  export const ablo = Ablo({
@@ -192,7 +192,7 @@ server API key in the bundle.
192
192
  // app/providers.tsx
193
193
  'use client';
194
194
 
195
- import { AbloProvider } from '@ablo/sync-engine/react';
195
+ import { AbloProvider } from '@abloatai/ablo/react';
196
196
  import { schema } from '@/ablo.schema';
197
197
 
198
198
  export function Providers({ children }: { children: React.ReactNode }) {
@@ -259,7 +259,7 @@ In React, selector `useAblo` is the public read API:
259
259
  ```tsx
260
260
  'use client';
261
261
 
262
- import { useAblo } from '@ablo/sync-engine/react';
262
+ import { useAblo } from '@abloatai/ablo/react';
263
263
 
264
264
  export function TaskRow({ task: serverTask }: { task: Task }) {
265
265
  const task = useAblo((ablo) => ablo.tasks.retrieve(serverTask.id)) ?? serverTask;
@@ -369,7 +369,7 @@ Use a Data Source when your app database remains the source of truth.
369
369
 
370
370
  ```ts
371
371
  // app/api/ablo/source/route.ts
372
- import { dataSource } from '@ablo/sync-engine';
372
+ import { dataSource } from '@abloatai/ablo';
373
373
  import { schema } from '@/ablo.schema';
374
374
  import { db } from '@/db';
375
375
 
@@ -9,7 +9,7 @@ Ablo-managed state versus a Data Source that calls your existing API service.
9
9
  ## 1. Install
10
10
 
11
11
  ```bash
12
- npm install @ablo/sync-engine
12
+ npm install @abloatai/ablo
13
13
  ```
14
14
 
15
15
  ## 2. Set a Sandbox Key
@@ -26,8 +26,8 @@ provider with a scoped capability/session route, not a bundled API key.
26
26
  ## 3. Declare a Schema
27
27
 
28
28
  ```ts
29
- import Ablo from '@ablo/sync-engine';
30
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
29
+ import Ablo from '@abloatai/ablo';
30
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
31
31
 
32
32
  const schema = defineSchema({
33
33
  weatherReports: model({
package/docs/react.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # React
2
2
 
3
- The React bindings for `@ablo/sync-engine`. Use them when you want live
3
+ The React bindings for `@abloatai/ablo`. Use them when you want live
4
4
  data on the client without writing fetch + WebSocket plumbing yourself.
5
5
 
6
6
  For the full app structure, including server loads, existing backends, and
@@ -11,7 +11,7 @@ agents, start with [Integration Guide](/docs/integration-guide).
11
11
  The React bindings ship with the main package — no extra install.
12
12
 
13
13
  ```ts
14
- import { useAblo } from '@ablo/sync-engine/react';
14
+ import { useAblo } from '@abloatai/ablo/react';
15
15
  ```
16
16
 
17
17
  ## useAblo — model resource
@@ -19,7 +19,7 @@ import { useAblo } from '@ablo/sync-engine/react';
19
19
  ```tsx
20
20
  'use client';
21
21
 
22
- import { useAblo } from '@ablo/sync-engine/react';
22
+ import { useAblo } from '@abloatai/ablo/react';
23
23
 
24
24
  export function TaskView({ task: serverTask }: { task: { id: string; title: string } }) {
25
25
  const task = useAblo((ablo) => ablo.tasks.retrieve(serverTask.id)) ?? serverTask;
package/docs/roadmap.md CHANGED
@@ -8,7 +8,7 @@ What is shipped, what is next, and what we will not build.
8
8
  - **Capability tokens** — Biscuit-signed, scoped, attenuable, hot-revocable.
9
9
  - **Audit log** — hash-chained per principal, with `delegationChainRoot`.
10
10
  - **MCP transport** — HTTP server at `/api/mcp`.
11
- - **TypeScript SDK** — `@ablo/sync-engine`, with React bindings.
11
+ - **TypeScript SDK** — `@abloatai/ablo`, with React bindings.
12
12
  - **Dashboard** — keys, audit, metrics, allowed origins.
13
13
 
14
14
  ## In flight
@@ -1,11 +1,11 @@
1
- # @ablo/sync-engine Examples
1
+ # @abloatai/ablo Examples
2
2
 
3
3
  The examples teach the same path as the README and docs: declare a schema,
4
4
  create or load typed models, and write through `ablo.<model>`.
5
5
 
6
6
  ```ts
7
- import Ablo from '@ablo/sync-engine';
8
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
7
+ import Ablo from '@abloatai/ablo';
8
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
9
9
 
10
10
  const schema = defineSchema({
11
11
  weatherReports: model({
package/llms.txt CHANGED
@@ -7,8 +7,8 @@ Use AI SDK for the agent loop. Use Ablo when agent reads and writes must persist
7
7
  ## Use this API
8
8
 
9
9
  ```ts
10
- import Ablo from '@ablo/sync-engine';
11
- import { defineSchema, model, z } from '@ablo/sync-engine/schema';
10
+ import Ablo from '@abloatai/ablo';
11
+ import { defineSchema, model, z } from '@abloatai/ablo/schema';
12
12
 
13
13
  const schema = defineSchema({
14
14
  tasks: model({
@@ -108,7 +108,7 @@ Every schema model has a backing store. By default, Ablo stores rows for declare
108
108
  Use `dataSource` from the root import:
109
109
 
110
110
  ```ts
111
- import { dataSource } from '@ablo/sync-engine';
111
+ import { dataSource } from '@abloatai/ablo';
112
112
  ```
113
113
 
114
114
  ## Sandboxes
@@ -133,10 +133,10 @@ two-writer stale/intent smoke test.
133
133
 
134
134
  Import from these public paths only:
135
135
 
136
- - `@ablo/sync-engine` — `Ablo`, errors, typed model resources, intents, `dataSource`, and advanced protocol resources.
137
- - `@ablo/sync-engine/schema` — schema DSL.
138
- - `@ablo/sync-engine/react` — React provider and hooks.
139
- - `@ablo/sync-engine/testing` — test harnesses and mocks.
136
+ - `@abloatai/ablo` — `Ablo`, errors, typed model resources, intents, `dataSource`, and advanced protocol resources.
137
+ - `@abloatai/ablo/schema` — schema DSL.
138
+ - `@abloatai/ablo/react` — React provider and hooks.
139
+ - `@abloatai/ablo/testing` — test harnesses and mocks.
140
140
 
141
141
  Do not teach `/api`, `/agent`, `/ai-sdk`, `/core`, `/realtime`, `/source`, or internal subpaths.
142
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abloatai/ablo",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "State control API for AI agents and collaborative apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",