@abloatai/ablo 0.59.1 → 0.59.2

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.59.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0b2fff7]
8
+ - @abloatai/humans@0.59.2
9
+ - @abloatai/transaction@0.59.2
10
+
3
11
  ## 0.59.1
4
12
 
5
13
  ### Plans recognize completed database migrations
@@ -1 +1 @@
1
- {"version":3,"file":"ai-sdk.js","sourceRoot":"","sources":["../src/ai-sdk.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAYH,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAC5B,KAA2B,EAC3B,UAAwC,EAAE;IAE1C,MAAM,EAAE,OAAO,EAAE,GAAG,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CACjC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CACzE,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,CAAC,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C,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,EACjE,CAAC,CACF,CAAC;IACF,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,0DAA0D,OAAO,EAAE;KAC7E,CAAC;AACJ,CAAC"}
package/docs/agents.md CHANGED
@@ -21,16 +21,49 @@ console.log(matching[0].title);
21
21
  These are observational reads. Use `read({ id })` only when a later Ablo write
22
22
  depends on that exact version and will pass it through `reads`.
23
23
 
24
- An agent is a **reactive** participant: it wakes on something happening, reads
25
- what it needs, writes a result, and goes idle. That's a request/response
26
- workload so agents talk to Ablo over **plain HTTP**, holding no WebSocket. The
27
- credential *is* the identity; the server resolves the org, scope, and actor from
28
- the key on every request.
24
+ Most agents wake on a trigger, read what they need, write a result, and go idle.
25
+ That is a request/response workload, so they use plain HTTP. A resident agent
26
+ that needs pushed deltas, queued-claim grants, or presence selects
27
+ `transport: 'websocket'`. The credential is the identity on both carriers; the
28
+ server resolves the org, scope, and actor from it.
29
29
 
30
- Agents get the stateless plane (HTTP). People when you add the `humans()`
31
- plugin get the live plane (WebSocket: presence, optimistic, sub-100ms).
32
- **Both operate on the same typed, coordinated state and coordinate *with each
33
- other*.**
30
+ Short-lived agents use HTTP. Long-running agents may add a multiplexed
31
+ WebSocket without installing the human materializer. People add the `humans()`
32
+ plugin for a local reactive graph. All three operate on the same typed,
33
+ coordinated state and enter the same server-side commit and claim paths.
34
+
35
+ ```ts
36
+ const ablo = Ablo({
37
+ schema,
38
+ apiKey: process.env.ABLO_API_KEY,
39
+ transport: 'websocket',
40
+ cursorStore,
41
+ });
42
+
43
+ await ablo.ready();
44
+
45
+ for await (const delta of ablo.observe()) {
46
+ await applyToAgentState(delta);
47
+ await delta.checkpoint(); // persist the cursor, then acknowledge it
48
+ }
49
+ ```
50
+
51
+ The selected WebSocket is shared by commits, row claims and releases,
52
+ subscription changes, pushed deltas, presence, and collaboration events.
53
+ Reconnect sends the last checkpointed position, so an uncheckpointed delta is
54
+ eligible for redelivery. An unsupported protocol version closes explicitly
55
+ instead of silently falling back to a different wire dialect.
56
+
57
+ The client retains no delta backlog while `observe()` is inactive. Starting an
58
+ observer requests replay from the durable checkpoint. An active observer has a
59
+ bounded in-memory backlog; if it falls behind that bound, observation fails
60
+ explicitly and can be restarted from the same durable checkpoint.
61
+
62
+ The public operation names do not change with the carrier. For example,
63
+ `ablo.records.update(...)` and `ablo.records.claim(...)` are the same calls on
64
+ HTTP and WebSocket. HTTP remains available for point reads and administrative
65
+ resources; `context().onChange` uses POST/SSE when HTTP is selected and reuses
66
+ the socket when WebSocket is selected.
34
67
 
35
68
  <Note>
36
69
  Agents transact against your **pushed schema**, same as everyone — `ablo.records`
@@ -62,10 +95,9 @@ await ablo.records.update({ id: record.id, data: { status: "done" } });
62
95
 
63
96
  It exposes `get` / `list` / `create` / `update` / `delete`, plus `commits`
64
97
  and `claim`. It does **not** expose stateful-only `local` reads or model
65
- `onChange` subscriptions. Those need a WebSocket, so with `transport: 'http'`
66
- they are compile errors. `context().onChange` is separate: while its listener
67
- is active, it holds one HTTP response open until the context changes or the
68
- listener stops.
98
+ `onChange` subscriptions. `context().onChange` is separate: it reuses the
99
+ selected WebSocket transport, or holds one POST/SSE response until the context
100
+ changes on the HTTP transport.
69
101
 
70
102
  ## Managed scoped agents
71
103
 
@@ -127,6 +127,7 @@ runs. In production that resolves to four rows:
127
127
  |---|---|---|
128
128
  | Server, worker, agent, cron | `sk_` in `ABLO_API_KEY` | Defaults from the environment, so most code passes nothing. |
129
129
  | Serverless function | `sk_` in `ABLO_API_KEY`, with `transport: 'http'` | Stateless request/response; nothing held open across invocations. |
130
+ | Resident agent | restricted `rk_` or agent-scoped credential, with `transport: 'websocket'` | One multiplexed WebSocket per client and Ablo cell; checkpoint durable deltas before acknowledging. |
130
131
  | Browser, read-only | root-bound `pk_` | Publishable, safe to ship, and read-only. |
131
132
  | Browser, writing as the signed-in user | `authEndpoint` | A route on your backend mints a short-lived `ek_` per user. |
132
133
 
package/docs/options.md CHANGED
@@ -160,11 +160,13 @@ workflow or deployment lanes.
160
160
 
161
161
  ## transport
162
162
 
163
- The package-root client uses request/response HTTP. `transport: 'http'` is
164
- accepted but optional.
163
+ The package-root client defaults to request/response HTTP. Select
164
+ `transport: 'websocket'` for a resident agent that needs pushed coordination;
165
+ the model, commit, claim, and context vocabulary stays unchanged.
165
166
 
166
- Live state, presence, and local reads belong to the reactive client described in
167
- the [React guide](./react.md), rather than another value on this option.
167
+ Local materialized state and reactive reads still belong to the human client
168
+ described in the [React guide](./react.md); selecting WebSocket here adds a
169
+ carrier, not the human materializer.
168
170
 
169
171
  ## timeoutMs
170
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abloatai/ablo",
3
- "version": "0.59.1",
3
+ "version": "0.59.2",
4
4
  "description": "The public Ablo SDK for coordinated reads, commits, claims, observation, and reactive applications.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -140,8 +140,8 @@
140
140
  "directory": "packages/ablo"
141
141
  },
142
142
  "dependencies": {
143
- "@abloatai/humans": "^0.59.1",
144
- "@abloatai/transaction": "^0.59.1",
143
+ "@abloatai/humans": "^0.59.2",
144
+ "@abloatai/transaction": "^0.59.2",
145
145
  "zod": "^4.4.3"
146
146
  },
147
147
  "peerDependencies": {