@abloatai/ablo 0.9.1 → 0.9.3
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/AGENTS.md +84 -0
- package/CHANGELOG.md +40 -0
- package/README.md +53 -27
- package/dist/BaseSyncedStore.d.ts +2 -36
- package/dist/BaseSyncedStore.js +11 -55
- package/dist/NetworkMonitor.js +4 -1
- package/dist/SyncClient.d.ts +22 -5
- package/dist/SyncClient.js +77 -0
- package/dist/SyncEngineContext.js +5 -1
- package/dist/agent/index.js +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/auth/index.js +3 -1
- package/dist/cli.cjs +302645 -0
- package/dist/client/Ablo.d.ts +19 -52
- package/dist/client/Ablo.js +30 -106
- package/dist/client/ApiClient.d.ts +1 -113
- package/dist/client/ApiClient.js +39 -238
- package/dist/client/auth.js +32 -2
- package/dist/client/createInternalComponents.js +1 -1
- package/dist/client/createModelProxy.d.ts +9 -0
- package/dist/client/createModelProxy.js +34 -10
- package/dist/client/httpClient.d.ts +5 -6
- package/dist/client/httpClient.js +2 -3
- package/dist/client/index.d.ts +1 -1
- package/dist/client/persistence.d.ts +6 -1
- package/dist/client/persistence.js +1 -1
- package/dist/client/registerDataSource.d.ts +4 -4
- package/dist/client/registerDataSource.js +39 -31
- package/dist/client/writeOptionsSchema.d.ts +50 -0
- package/dist/client/writeOptionsSchema.js +57 -0
- package/dist/core/index.d.ts +18 -26
- package/dist/core/index.js +22 -46
- package/dist/errorCodes.d.ts +13 -0
- package/dist/errorCodes.js +19 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -1
- package/dist/interfaces/index.d.ts +14 -4
- package/dist/mutators/UndoManager.d.ts +48 -5
- package/dist/mutators/UndoManager.js +166 -1
- package/dist/react/AbloProvider.d.ts +18 -8
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/useUndoScope.js +7 -0
- package/dist/schema/ddl.js +2 -1
- package/dist/schema/field.js +2 -1
- package/dist/schema/serialize.js +2 -1
- package/dist/server/commit.d.ts +4 -5
- package/dist/server/storage-mode.d.ts +7 -0
- package/dist/server/storage-mode.js +6 -0
- package/dist/source/adapters/drizzle.js +3 -2
- package/dist/source/adapters/kysely.d.ts +68 -0
- package/dist/source/adapters/kysely.js +210 -0
- package/dist/source/adapters/memory.js +2 -1
- package/dist/source/adapters/prisma.js +3 -2
- package/dist/source/index.js +2 -1
- package/dist/transactions/TransactionQueue.d.ts +6 -7
- package/dist/transactions/TransactionQueue.js +33 -9
- package/dist/types/streams.d.ts +2 -1
- package/dist/utils/duration.js +3 -2
- package/dist/wire/frames.d.ts +6 -8
- package/docs/api.md +1 -1
- package/docs/cli.md +17 -4
- package/docs/client-behavior.md +1 -1
- package/docs/data-sources.md +129 -125
- package/docs/examples/ai-sdk-tool.md +11 -5
- package/docs/examples/existing-python-backend.md +26 -4
- package/docs/examples/nextjs.md +3 -2
- package/docs/examples/scoped-agent.md +38 -11
- package/docs/guarantees.md +2 -2
- package/docs/identity.md +86 -59
- package/docs/index.md +2 -2
- package/docs/integration-guide.md +89 -61
- package/docs/mcp.md +1 -1
- package/docs/quickstart.md +84 -37
- package/docs/react.md +39 -28
- package/docs/schema-contract.md +2 -4
- package/llms-full.txt +360 -0
- package/llms.txt +30 -18
- package/package.json +23 -3
|
@@ -43,7 +43,11 @@ export const noopAnalytics = {
|
|
|
43
43
|
/** Browser-native online status provider */
|
|
44
44
|
export const browserOnlineStatus = {
|
|
45
45
|
isOnline() {
|
|
46
|
-
|
|
46
|
+
// Only `navigator.onLine === false` is the MDN-reliable "definitely offline"
|
|
47
|
+
// signal. Don't use `!navigator.onLine`: Node 18+ exposes a global
|
|
48
|
+
// `navigator` whose `onLine` is `undefined`, which `!` would read as offline —
|
|
49
|
+
// wedging every Node/server client (agents, worker, MCP) into a false offline.
|
|
50
|
+
return !(typeof navigator !== 'undefined' && navigator.onLine === false);
|
|
47
51
|
},
|
|
48
52
|
};
|
|
49
53
|
/** Session error detector — delegates to SyncSessionError so detection is
|
package/dist/agent/index.js
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
// const ctx: Agent.Context = { perception };
|
|
123
123
|
// const s: Agent.SessionOptions = { ... };
|
|
124
124
|
//
|
|
125
|
-
// Everything else (Activity, Claim,
|
|
125
|
+
// Everything else (Activity, Claim, Peer, ActiveIntent, ...)
|
|
126
126
|
// lives on the `Ablo.*` namespace via
|
|
127
127
|
// `import type { Ablo } from '@abloatai/ablo'`.
|
|
128
128
|
export { Agent } from './Agent.js';
|
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 AbloApiIntents, type
|
|
7
|
+
export { createProtocolClient, createProtocolClient as Ablo, type AbloApi, type AbloApiClientOptions, type AbloApiIntents, type Capability, type CapabilityCreateOptions, type CapabilityParticipantKind, type CapabilityRecord, type CapabilityResource, type CapabilityRevocation, type CapabilityScope, } from '../client/ApiClient.js';
|
|
8
8
|
export type { CommitCreateOptions, CommitOperationInput, CommitReceipt, CommitWait, IntentCreateOptions, IntentHandle, IntentWaitOptions, 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;
|
package/dist/auth/index.js
CHANGED
|
@@ -15,7 +15,9 @@ import { parseCapabilityExchangeResponse, parseIdentityResolveResponse, } from '
|
|
|
15
15
|
import { AbloAuthenticationError, hasWireCode, translateHttpError } from '../errors.js';
|
|
16
16
|
export async function exchangeApiKey(options) {
|
|
17
17
|
if (!options.apiKey) {
|
|
18
|
-
throw new AbloAuthenticationError('
|
|
18
|
+
throw new AbloAuthenticationError('No API key found. Set ABLO_API_KEY in your environment — `npx ablo login` ' +
|
|
19
|
+
'then `npx ablo dev` writes it into .env.local for you — or pass ' +
|
|
20
|
+
'`apiKey` to Ablo({ ... }) directly.', { code: 'apikey_missing' });
|
|
19
21
|
}
|
|
20
22
|
if (!options.baseUrl) {
|
|
21
23
|
throw new AbloAuthenticationError('baseUrl is required for capability exchange', { code: 'base_url_missing' });
|