@abloatai/ablo 0.9.7 → 0.9.8

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Docs: add a Version History & Migration Guide, bring the changelog current, and sync doc trees. Drop the dormant `causedByTaskId` from the audit-row docs and fix the `ablo mode` argument vocabulary.
8
+
3
9
  ## 0.9.7
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -32,6 +32,7 @@ non-JavaScript services. Every confirmed change shows up everywhere, and active
32
32
  claims are visible while the work is still in progress.
33
33
 
34
34
  [Get started ↓](#quick-start) · point your coding agent at the shipped `llms.txt`
35
+ · **upgrading?** see the [Version History & Migration Guide](./docs/migration.md)
35
36
 
36
37
  It works with the auth and database you already have. **Your database is the
37
38
  system of record — Ablo never hosts your data.** Ablo is the transaction layer
@@ -412,6 +413,7 @@ contract; there are no retry or timeout knobs to tune.
412
413
 
413
414
  ## Production Reference
414
415
 
416
+ - [Version History & Migration Guide](./docs/migration.md) — every breaking change, what to change, and which version introduced it. Read before bumping a minor.
415
417
  - [Identity & Sync Groups](./docs/identity.md) — use your own authentication; tell Ablo who's connecting and how org / team / user map to sync-group scope.
416
418
  - [Schema Contract](./docs/schema-contract.md) — one schema becomes typed model clients, React reads, agent writes, Data Source shape, and schema push.
417
419
  - [Guarantees](./docs/guarantees.md) — confirmed writes, stale-write protection, claim coordination, and agent lifecycle.
package/docs/api.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # API
2
2
 
3
+ > **Upgrading?** Every breaking change and its migration is on the
4
+ > [Version History & Migration Guide](./migration.md).
5
+
3
6
  This is the per-method reference for reading and writing rows that stay in
4
7
  sync across sessions. You declare your models once, then call the same
5
8
  `ablo.<model>` methods from React, a server action, or an agent — and every
package/docs/audit.md CHANGED
@@ -16,10 +16,9 @@ Every commit becomes one row.
16
16
  actorId: string,
17
17
  onBehalfOfKind: 'user' | 'agent' | 'system' | null,
18
18
  onBehalfOfId: string | null,
19
- credentialId: string | null, // the API key/credential used for the write
20
- credentialLabel: string | null, // its human-readable name, for scanning the log
19
+ capabilityId: string | null, // the API key/capability used for the write
20
+ capabilityLabel: string | null, // its human-readable name, for scanning the log
21
21
  delegationChainRoot: string | null, // always points at a human
22
- causedByRunId: string | null, // the agent run that produced this write — group every change from one run
23
22
  actionType: string, // e.g. 'weatherReport.update'
24
23
  modelName: string | null, // e.g. 'claude-opus-4-7'
25
24
  diffSummary: unknown,
@@ -0,0 +1,217 @@
1
+ # Version History & Migration Guide
2
+
3
+ The breaking-changes-first companion to the [Changelog](../CHANGELOG.md). The
4
+ changelog tells the story of each release; this page tells you exactly what to
5
+ change when you upgrade.
6
+
7
+ > Ablo is pre-1.0, so minor versions (`0.x.0`) may carry breaking changes. Patch
8
+ > versions (`0.x.y`) never do. Pin a minor and read this page before bumping it.
9
+
10
+ ## Breaking changes at a glance
11
+
12
+ | Version | What changed | What to do |
13
+ |---|---|---|
14
+ | **0.9.2** | `turn` primitive + agent-work `tasks` resource removed | Coordinate with `claim`; mint a scoped session instead of `agent().run()` |
15
+ | **0.9.2** | `intents` deprecated in favor of `claim` | Use `ablo.<model>.claim`; `ablo.intents` is now `@internal` |
16
+ | **0.9.0** | One options object per verb | `update(id, data, opts)` → `update({ id, data, ...opts })` |
17
+ | **0.9.0** | `claim` returns a disposable handle | `await using claim = await ablo.x.claim({ id })` |
18
+ | **0.8.0** | Flat coordination methods removed | `ablo.x.claimState(id)` → `ablo.x.claim.state({ id })` |
19
+ | **0.7.0** | Legacy React hooks removed | `useQuery`/`useOne`/`useMutate`/`useReader` → `useAblo()` + `ablo.<model>.*` |
20
+ | **0.6.0** | `subscribe` → `onChange`; `Resource` → `Model` rename | Rename listeners and `ablo.resource()` → `ablo.model()` |
21
+ | **0.5.0** | Intent-handle method renames | `acquire`→`claim`, `acquireOrAwait`→`claimOrWait`, … |
22
+ | **0.3.0** | `<SyncProvider>` / `createAbloContext()` / `withSync` removed | Use the umbrella `<AbloProvider>` |
23
+
24
+ ---
25
+
26
+ ## 0.9.2 — `turn` / agent-`tasks` removed; `intents` deprecated
27
+
28
+ The SDK's coordination surface is now exactly two things: `ablo.<model>` writes
29
+ and `claim`. The parallel `turn` / agent-`tasks` mechanism was redundant —
30
+ `claim` already serializes writers **and** carries the causal link (its `intent`
31
+ id rides on every guarded write), and the server stamps `actor` / `onBehalfOf` /
32
+ `capabilityId` onto every delta from the auth context.
33
+
34
+ **Removed:** `engine.beginTurn()`, the `Turn` handle and `Ablo.Turn` type,
35
+ `AbloApi.beginTurn`, `CommitCreateOptions.causedByTaskId`, the `agent().run()`
36
+ helper, and the agent/task type family (`Agent`, `AgentOptions`,
37
+ `AgentRunResult`, `Task`, `TaskResource`, …).
38
+
39
+ > **Note:** `ablo.tasks` is — and always was — the schema `tasks` **model**
40
+ > proxy. Only the agent-work *resource* of the same name was removed. If you have
41
+ > a `tasks` model in your schema, it is unaffected.
42
+
43
+ ```diff
44
+ - const turn = await engine.beginTurn();
45
+ - await Ablo({ apiKey }).agent(agentId, opts).run(prompt, handler);
46
+ + // Mint a scoped credential, then claim + write under it.
47
+ + const { token } = await ablo.sessions.create({ agent: { id: agentId } });
48
+ + const agent = Ablo({ schema, apiKey: token });
49
+ + await using claim = await agent.tasks.claim({ id });
50
+ + await agent.tasks.update({ id, data: { status: 'done' }, wait: 'confirmed' });
51
+ ```
52
+
53
+ Per-run token/cost now lives in Langfuse, not an `agent_tasks` table. The only
54
+ capability the client loses is the audit pane's "show everything this exact
55
+ prompt produced" filter (it keyed off `caused_by_task_id`); new writes leave that
56
+ column `null`. The server-side `agent_tasks` table, the `caused_by_task_id` delta
57
+ column, and the `agent_actions_log` hash-chain are intentionally **kept but
58
+ dormant** — they are load-bearing for the tamper-evident audit chain. The dead
59
+ `/v1/tasks` and `/api/agent/turn` route handlers were removed.
60
+
61
+ ### `intents` → `claim`
62
+
63
+ ```diff
64
+ - const lock = ablo.intents.editing(target);
65
+ + await using claim = await ablo.documents.claim({ id });
66
+ ```
67
+
68
+ `ablo.intents` still exists but is marked `@internal`. Use `ablo.<model>.claim`
69
+ everywhere you coordinate concurrent work.
70
+
71
+ ---
72
+
73
+ ## 0.9.0 — one options object per verb; disposable `claim`
74
+
75
+ Every model verb takes a single options object, so the id, the data, and every
76
+ modifier are named siblings. Reactive local reads stay on the synchronous
77
+ `get(id)`.
78
+
79
+ ```diff
80
+ - await ablo.tasks.update(id, { status: 'done' }, { wait: 'confirmed' })
81
+ + await ablo.tasks.update({ id, data: { status: 'done' }, wait: 'confirmed' })
82
+
83
+ - await ablo.tasks.retrieve(id)
84
+ + await ablo.tasks.retrieve({ id })
85
+
86
+ - useAblo((ablo) => ablo.tasks.retrieve(id)) ?? serverTask
87
+ + useAblo((ablo) => ablo.tasks.get(id)) ?? serverTask
88
+ ```
89
+
90
+ `claim` now returns a disposable handle instead of taking a callback. The handle
91
+ exposes the fresh row on `.data` and releases on scope exit.
92
+
93
+ ```diff
94
+ - await ablo.tasks.claim(id, async (task) => {
95
+ - await ablo.tasks.update(task.id, { status: 'in_review' })
96
+ - })
97
+ + await using claim = await ablo.tasks.claim({ id })
98
+ + const task = claim.data
99
+ + await ablo.tasks.update({ id: task.id, data: { status: 'in_review' } })
100
+ ```
101
+
102
+ `claim.state`, `claim.queue`, `claim.release`, and `claim.reorder` also take the
103
+ options object.
104
+
105
+ ---
106
+
107
+ ## 0.8.0 — callable `claim` namespace
108
+
109
+ The flat coordination methods are gone; everything lives under `claim`.
110
+
111
+ ```diff
112
+ - await ablo.task.claimState(id)
113
+ - await ablo.task.release(id)
114
+ + await ablo.task.claim.state(id)
115
+ + await ablo.task.claim.release(id)
116
+ ```
117
+
118
+ This release also added the `databaseUrl` option for the direct Postgres
119
+ connector — additive, no migration required.
120
+
121
+ ---
122
+
123
+ ## 0.7.0 — legacy React hooks removed
124
+
125
+ The query/mutation hooks were replaced by the single `useAblo()` accessor over
126
+ typed model methods.
127
+
128
+ ```diff
129
+ - const { data } = useQuery('task', { where: { done: false } })
130
+ + const ablo = useAblo()
131
+ + const tasks = ablo.task.list({ where: { done: false } })
132
+ ```
133
+
134
+ Removed: `useQuery`, `useOne`, `useMutate`, `useReader`. The `MutateActions`,
135
+ `ReaderActions`, and `ReaderFindOptions` types are still exported for callers
136
+ that reference them. This release also replaced the `{ error, reason }` error
137
+ shape with the canonical `{ type, code, message, doc_url, request_id }` envelope.
138
+
139
+ > **Note:** This — not 0.9.x — is the release where `useAblo()` became the one
140
+ > React read path. If you are coming from a 0.6.x or earlier app, this is your
141
+ > biggest hook migration.
142
+
143
+ ---
144
+
145
+ ## 0.6.0 — `onChange` and the Resource → Model rename
146
+
147
+ ```diff
148
+ - ablo.tasks.subscribe(cb)
149
+ + ablo.tasks.onChange(cb)
150
+
151
+ - ablo.resource('tasks')
152
+ + ablo.model('tasks')
153
+ ```
154
+
155
+ Also renamed: `Ablo.Resource.*` → `Ablo.Model.*`, `ModelTarget.resource` →
156
+ `ModelTarget.model`, and error code `resource_not_found` → `model_not_found`.
157
+ (`subscribe` is reserved for an upcoming scope-grant verb.)
158
+
159
+ ---
160
+
161
+ ## 0.5.0 — intent-handle method renames
162
+
163
+ On the model intent handle (`ablo.<model>.intent(id)`):
164
+
165
+ ```diff
166
+ - handle.acquire() + handle.claim()
167
+ - handle.acquireOrAwait() + handle.claimOrWait()
168
+ - handle.settled() + handle.whenFree()
169
+ - handle.release() + handle.finish()
170
+ - handle.revoke() + handle.cancel()
171
+ ```
172
+
173
+ The lower-level `IntentHandle` / `IntentLeaseHandle` (`ablo.intents.*`) were
174
+ unchanged at this release. (They were later folded under `claim` in 0.9.2.)
175
+
176
+ ---
177
+
178
+ ## 0.3.0 — umbrella `<AbloProvider>`
179
+
180
+ One provider component now owns the full React lifecycle. `<SyncProvider>`,
181
+ `createAbloContext()`, and `withSync` were removed.
182
+
183
+ ```diff
184
+ - const { AbloProvider, useAblo } = createAbloContext<typeof schema>();
185
+ - <SyncProvider store={sync._store} organizationId={orgId}>
186
+ - <AbloProvider ablo={ablo}>{children}</AbloProvider>
187
+ - </SyncProvider>
188
+ + <AbloProvider schema={schema} url={url} userId={userId} organizationId={orgId}>
189
+ + {children}
190
+ + </AbloProvider>
191
+ ```
192
+
193
+ `useSyncStatus()` changed from six booleans to a tagged union:
194
+
195
+ ```diff
196
+ - const { isReady } = useSyncStatus()
197
+ + const isReady = useSyncStatus().name === 'connected'
198
+ ```
199
+
200
+ Import `observer` from `mobx-react-lite` directly if you used `withSync`.
201
+
202
+ ---
203
+
204
+ ## The `intent` → `claim` evolution
205
+
206
+ Coordination has converged on one verb over several releases. If you are reading
207
+ old code or old docs, this is the through-line:
208
+
209
+ | Release | State of coordination |
210
+ |---|---|
211
+ | 0.4.0 | `ablo.<model>.intent(id)` introduced — per-entity intent handle |
212
+ | 0.5.0 | Intent-handle methods renamed to claim vocabulary (`acquire`→`claim`, …) |
213
+ | 0.8.0 | Callable `claim` namespace (`claim(id)`, `claim.state`, `claim.queue`, …) |
214
+ | 0.9.0 | `claim` returns an `await using` disposable handle |
215
+ | 0.9.2 | `intents` deprecated and made `@internal` — **`claim` is the one coordination API** |
216
+
217
+ For the full chronological history, see the [Changelog](../CHANGELOG.md).
package/llms.txt CHANGED
@@ -183,4 +183,4 @@ Do not teach `/api`, `/agent`, `/ai-sdk`, `/core`, `/realtime`, or internal subp
183
183
  - Adopt an existing DB: `npx ablo pull prisma [path]` / `npx ablo pull drizzle <module>`.
184
184
  - `npx ablo push --no-watch` pushes the schema (sandbox) AND writes `ABLO_API_KEY` to `.env.local` (default watches forever); `npx ablo logs --no-follow` (default tails forever); `npx ablo mode sandbox|production` (always pass the arg). `npx ablo push`/`status`/`pull`/`check`/`generate` are one-shot.
185
185
 
186
- Canonical docs to read before integrating: `quickstart`, `schema-contract`, `integration-guide`, `guarantees`, `client-behavior`, `data-sources`, `examples/existing-python-backend`, `api`, `examples/ai-sdk-tool`, and `examples/server-agent`.
186
+ Canonical docs to read before integrating: `quickstart`, `schema-contract`, `integration-guide`, `guarantees`, `client-behavior`, `data-sources`, `examples/existing-python-backend`, `api`, `examples/ai-sdk-tool`, and `examples/server-agent`. When upgrading an existing integration, read `migration` — every breaking change, what to change, and which version introduced it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abloatai/ablo",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "State control API for AI agents and collaborative apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",