@abloatai/ablo 0.10.1 → 0.11.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 +34 -0
- package/README.md +63 -23
- package/dist/BaseSyncedStore.d.ts +75 -0
- package/dist/BaseSyncedStore.js +193 -8
- package/dist/Database.d.ts +10 -2
- package/dist/Database.js +15 -1
- package/dist/SyncClient.d.ts +12 -1
- package/dist/SyncClient.js +110 -26
- package/dist/agent/Agent.d.ts +9 -9
- package/dist/agent/Agent.js +16 -16
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/types.js +1 -1
- package/dist/ai-sdk/{intent-broadcast.d.ts → claim-broadcast.d.ts} +10 -10
- package/dist/ai-sdk/{intent-broadcast.js → claim-broadcast.js} +6 -6
- package/dist/ai-sdk/coordination-context.d.ts +9 -9
- package/dist/ai-sdk/coordination-context.js +8 -8
- package/dist/ai-sdk/index.d.ts +1 -1
- package/dist/ai-sdk/index.js +1 -1
- package/dist/ai-sdk/wrap.d.ts +4 -4
- package/dist/ai-sdk/wrap.js +4 -4
- package/dist/api/index.d.ts +2 -2
- package/dist/cli.cjs +369 -67
- package/dist/client/Ablo.d.ts +30 -63
- package/dist/client/Ablo.js +124 -103
- package/dist/client/ApiClient.d.ts +6 -5
- package/dist/client/ApiClient.js +86 -62
- package/dist/client/auth.d.ts +9 -4
- package/dist/client/auth.js +40 -5
- package/dist/client/createModelProxy.d.ts +41 -54
- package/dist/client/createModelProxy.js +123 -20
- package/dist/client/httpClient.d.ts +2 -0
- package/dist/client/httpClient.js +1 -1
- package/dist/client/index.d.ts +3 -3
- package/dist/client/writeOptionsSchema.d.ts +4 -4
- package/dist/client/writeOptionsSchema.js +4 -4
- package/dist/coordination/schema.d.ts +249 -38
- package/dist/coordination/schema.js +172 -39
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -4
- package/dist/errorCodes.d.ts +9 -9
- package/dist/errorCodes.js +16 -16
- package/dist/errors.d.ts +51 -2
- package/dist/errors.js +94 -5
- package/dist/interfaces/index.d.ts +8 -4
- package/dist/policy/index.d.ts +1 -1
- package/dist/policy/types.d.ts +13 -13
- package/dist/policy/types.js +8 -8
- package/dist/react/AbloProvider.d.ts +51 -4
- package/dist/react/AbloProvider.js +95 -11
- package/dist/react/context.d.ts +26 -9
- package/dist/react/context.js +2 -2
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/react/useAblo.js +5 -5
- package/dist/react/{useIntent.d.ts → useClaim.d.ts} +9 -9
- package/dist/react/useClaim.js +42 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/schema.d.ts +3 -3
- package/dist/schema/sugar.d.ts +3 -3
- package/dist/schema/sugar.js +3 -3
- package/dist/schema/sync-delta-wire.d.ts +8 -8
- package/dist/server/commit.d.ts +2 -2
- package/dist/sync/AreaOfInterestManager.d.ts +162 -0
- package/dist/sync/AreaOfInterestManager.js +233 -0
- package/dist/sync/BootstrapHelper.d.ts +9 -1
- package/dist/sync/BootstrapHelper.js +15 -5
- package/dist/sync/NetworkProbe.d.ts +1 -1
- package/dist/sync/NetworkProbe.js +1 -1
- package/dist/sync/SyncWebSocket.d.ts +59 -25
- package/dist/sync/SyncWebSocket.js +123 -26
- package/dist/sync/awaitClaimGrant.d.ts +40 -0
- package/dist/sync/awaitClaimGrant.js +86 -0
- package/dist/sync/createClaimStream.d.ts +34 -0
- package/dist/sync/{createIntentStream.js → createClaimStream.js} +92 -81
- package/dist/sync/createPresenceStream.js +3 -2
- package/dist/sync/participants.d.ts +10 -10
- package/dist/sync/participants.js +17 -10
- package/dist/sync/schemas.d.ts +8 -8
- package/dist/transactions/TransactionQueue.d.ts +23 -0
- package/dist/transactions/TransactionQueue.js +186 -12
- package/dist/types/global.d.ts +18 -13
- package/dist/types/global.js +11 -6
- package/dist/types/index.d.ts +9 -7
- package/dist/types/index.js +2 -2
- package/dist/types/streams.d.ts +114 -98
- package/dist/types/streams.js +1 -1
- package/dist/utils/asyncIterator.d.ts +1 -1
- package/dist/utils/asyncIterator.js +1 -1
- package/dist/wire/frames.d.ts +2 -2
- package/docs/api.md +3 -3
- package/docs/client-behavior.md +6 -3
- package/docs/coordination.md +13 -3
- package/docs/data-sources.md +29 -9
- package/docs/migration.md +40 -0
- package/docs/quickstart.md +61 -33
- package/docs/react.md +46 -0
- package/llms-full.txt +25 -8
- package/llms.txt +11 -9
- package/package.json +3 -2
- package/dist/react/useIntent.js +0 -42
- package/dist/sync/awaitIntentGrant.d.ts +0 -40
- package/dist/sync/awaitIntentGrant.js +0 -62
- package/dist/sync/createIntentStream.d.ts +0 -34
package/dist/ai-sdk/index.d.ts
CHANGED
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
* to one entity before any tool is chosen; tool implementations stay exactly
|
|
73
73
|
* the same.
|
|
74
74
|
*/
|
|
75
|
-
export {
|
|
75
|
+
export { claimBroadcastMiddleware, type ClaimTarget, type ClaimBroadcastMiddlewareOptions, } from './claim-broadcast.js';
|
|
76
76
|
export { coordinationContextMiddleware, type CoordinationContextMiddlewareOptions, } from './coordination-context.js';
|
|
77
77
|
export { wrapWithMultiplayer, type WrapWithMultiplayerOptions } from './wrap.js';
|
package/dist/ai-sdk/index.js
CHANGED
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
* to one entity before any tool is chosen; tool implementations stay exactly
|
|
73
73
|
* the same.
|
|
74
74
|
*/
|
|
75
|
-
export {
|
|
75
|
+
export { claimBroadcastMiddleware, } from './claim-broadcast.js';
|
|
76
76
|
export { coordinationContextMiddleware, } from './coordination-context.js';
|
|
77
77
|
export { wrapWithMultiplayer } from './wrap.js';
|
package/dist/ai-sdk/wrap.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ import { wrapLanguageModel } from 'ai';
|
|
|
31
31
|
import type { LanguageModelV3, LanguageModelV3Middleware } from '@ai-sdk/provider';
|
|
32
32
|
import type { Ablo } from '../client/Ablo.js';
|
|
33
33
|
import type { SchemaRecord } from '../schema/schema.js';
|
|
34
|
-
import { type
|
|
34
|
+
import { type ClaimTarget } from './claim-broadcast.js';
|
|
35
35
|
export interface WrapWithMultiplayerOptions {
|
|
36
36
|
/** The base language model to wrap. Consumer brings their own. */
|
|
37
37
|
readonly model: LanguageModelV3;
|
|
38
38
|
/** Connected SyncAgent. Null = pass-through wrap (no broadcast, no read). */
|
|
39
39
|
readonly agent: Ablo<SchemaRecord> | null;
|
|
40
40
|
/** Target entity. Null = pass-through wrap. */
|
|
41
|
-
readonly target:
|
|
41
|
+
readonly target: ClaimTarget | null;
|
|
42
42
|
/**
|
|
43
43
|
* Optional action verb for the broadcast. Default `'edit'`.
|
|
44
44
|
* Convention: `'edit'`, `'read'`, `'review'`, `'generate'`.
|
|
@@ -50,11 +50,11 @@ export interface WrapWithMultiplayerOptions {
|
|
|
50
50
|
*/
|
|
51
51
|
readonly description?: string;
|
|
52
52
|
/**
|
|
53
|
-
* Optional
|
|
53
|
+
* Optional claimIds to exclude from the coordination-context
|
|
54
54
|
* read — typically the caller's own claim if they're composing
|
|
55
55
|
* multiple wrappings. Most consumers leave this empty.
|
|
56
56
|
*/
|
|
57
|
-
readonly
|
|
57
|
+
readonly excludeClaimIds?: readonly string[];
|
|
58
58
|
/**
|
|
59
59
|
* Optional extra middleware to compose. Runs in the order given,
|
|
60
60
|
* INSIDE the multiplayer middlewares (so the multiplayer wrap is
|
package/dist/ai-sdk/wrap.js
CHANGED
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
import { wrapLanguageModel } from 'ai';
|
|
31
|
-
import {
|
|
31
|
+
import { claimBroadcastMiddleware, } from './claim-broadcast.js';
|
|
32
32
|
import { coordinationContextMiddleware } from './coordination-context.js';
|
|
33
33
|
export function wrapWithMultiplayer(options) {
|
|
34
|
-
const { model, agent, target, action, description,
|
|
34
|
+
const { model, agent, target, action, description, excludeClaimIds, extraMiddleware } = options;
|
|
35
35
|
return wrapLanguageModel({
|
|
36
36
|
model,
|
|
37
37
|
middleware: [
|
|
38
|
-
coordinationContextMiddleware({ agent, target,
|
|
39
|
-
|
|
38
|
+
coordinationContextMiddleware({ agent, target, excludeClaimIds }),
|
|
39
|
+
claimBroadcastMiddleware({ agent, target, action, description }),
|
|
40
40
|
...(extraMiddleware ?? []),
|
|
41
41
|
],
|
|
42
42
|
});
|
package/dist/api/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Use this build for serverless functions, scripts, and backends that want
|
|
5
5
|
* model reads/writes and commits over HTTP without the realtime sync runtime.
|
|
6
6
|
*/
|
|
7
|
-
export { createProtocolClient, createProtocolClient as Ablo, type AbloApi, type AbloApiClientOptions, type
|
|
8
|
-
export type { CommitCreateOptions, CommitOperationInput, CommitReceipt, CommitWait,
|
|
7
|
+
export { createProtocolClient, createProtocolClient as Ablo, type AbloApi, type AbloApiClientOptions, type AbloApiClaims, type Capability, type CapabilityCreateOptions, type CapabilityParticipantKind, type CapabilityRecord, type CapabilityResource, type CapabilityRevocation, type CapabilityScope, } from '../client/ApiClient.js';
|
|
8
|
+
export type { CommitCreateOptions, CommitOperationInput, CommitReceipt, CommitWait, ClaimCreateOptions, ClaimHandle, ClaimWaitOptions, ClaimedOptions, IfClaimedPolicy, ModelClient, ModelClaim, ModelMutationOptions, ModelReadOptions, ModelRead, ModelTarget, } from '../client/Ablo.js';
|
|
9
9
|
import { createProtocolClient } from '../client/ApiClient.js';
|
|
10
10
|
export default createProtocolClient;
|