@abloatai/ablo 0.20.1 → 0.20.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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Extend the `HeldClaim` return type to the HTTP transport. 0.20.1 fixed `await using` on the WebSocket client's `claim()` but missed the stateless HTTP client (`HttpClaimApi`) used by server-side agents, which still returned the looser `Claim<T>`. Both transports' `claim()` now return `HeldClaim<T>`, so `await using held = await ablo.<model>.claim(...)` typechecks regardless of transport.
8
+
3
9
  ## 0.20.1
4
10
 
5
11
  ### Patch Changes
@@ -29,7 +29,7 @@ import type { SyncWebSocket } from '../sync/SyncWebSocket.js';
29
29
  import type { SyncGroupInput } from '../schema/roles.js';
30
30
  import { type SyncStatus } from '../BaseSyncedStore.js';
31
31
  import type { ClaimStream, ClaimWaitOptions, PresenceStream, Snapshot } from '../types/streams.js';
32
- import type { Claim, Duration } from '../types/streams.js';
32
+ import type { Claim, HeldClaim, Duration } from '../types/streams.js';
33
33
  import { type AbloApi, type AbloApiClientOptions, type AbloApiClaims } from './ApiClient.js';
34
34
  import { type AbloHttpClient, type AbloHttpClientOptions } from './httpClient.js';
35
35
  /**
@@ -544,7 +544,7 @@ export interface ModelMutationOptions extends ClaimedOptions {
544
544
  * wrapper that statelessness forces. `claim({ id })` is identical (already async
545
545
  * on both); `state`/`queue`/`reorder`/`release` are the awaited form.
546
546
  */
547
- export type HttpClaimApi<T = Record<string, unknown>> = ((params: ClaimParams<T>) => Promise<Claim<T>>) & {
547
+ export type HttpClaimApi<T = Record<string, unknown>> = ((params: ClaimParams<T>) => Promise<HeldClaim<T>>) & {
548
548
  [K in keyof ClaimReadApi<T>]: AwaitedClaimMethod<ClaimReadApi<T>[K]>;
549
549
  };
550
550
  export interface ModelClient<T = Record<string, unknown>> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abloatai/ablo",
3
- "version": "0.20.1",
3
+ "version": "0.20.2",
4
4
  "description": "The Collaboration Layer For AI Agents",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",