@abloatai/transaction 0.59.0 → 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/dist/auth/capability.d.ts +15 -15
- package/dist/auth/capabilityLifecycle.d.ts +2 -2
- package/dist/auth/credentialEndpoint.js.map +1 -1
- package/dist/auth/credentialSource.js.map +1 -1
- package/dist/auth/identity.js.map +1 -1
- package/dist/auth/schemas.d.ts +5 -5
- package/dist/auth/sessionIssuanceProtocol.d.ts +8 -8
- package/dist/auth/sessionIssuanceProtocol.d.ts.map +1 -1
- package/dist/branches.d.ts +38 -38
- package/dist/claims/contract.d.ts +27 -27
- package/dist/claims/eventContract.d.ts +18 -18
- package/dist/claims/routes.d.ts +9 -9
- package/dist/claims/routes.d.ts.map +1 -1
- package/dist/claims/trace.d.ts.map +1 -1
- package/dist/claims/trace.js.map +1 -1
- package/dist/client/ablo.d.ts +6 -5
- package/dist/client/ablo.d.ts.map +1 -1
- package/dist/client/ablo.js +0 -8
- package/dist/client/ablo.js.map +1 -1
- package/dist/client/resources/httpResources.js.map +1 -1
- package/dist/client/resources/modelOperations.d.ts +6 -6
- package/dist/client/resources/modelOperations.d.ts.map +1 -1
- package/dist/client/resources/where.d.ts +12 -12
- package/dist/client/surface.d.ts +2 -2
- package/dist/client/surface.d.ts.map +1 -1
- package/dist/client/surface.js +7 -0
- package/dist/client/surface.js.map +1 -1
- package/dist/commit/confirmation/commitEnvelope.d.ts +7 -7
- package/dist/commit/confirmation/httpCommitEnvelope.d.ts +1 -1
- package/dist/commit/confirmation/pendingWrite.d.ts +5 -5
- package/dist/commit/contract.d.ts +249 -249
- package/dist/commit/contract.d.ts.map +1 -1
- package/dist/commit/recordRuntime.d.ts +3 -2
- package/dist/commit/recordRuntime.d.ts.map +1 -1
- package/dist/commit/recordRuntime.js +1 -0
- package/dist/commit/recordRuntime.js.map +1 -1
- package/dist/coordination/schema.d.ts +54 -54
- package/dist/coordination/schema.js.map +1 -1
- package/dist/environment.d.ts +3 -3
- package/dist/environment.d.ts.map +1 -1
- package/dist/environment.js.map +1 -1
- package/dist/errorCodes.d.ts +6 -5
- package/dist/errorCodes.d.ts.map +1 -1
- package/dist/errorCodes.js +2 -1
- package/dist/errorCodes.js.map +1 -1
- package/dist/errorObservation.d.ts +14 -14
- package/dist/errors.d.ts +11 -11
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/observation/contract.d.ts +34 -34
- package/dist/observation/feedContract.d.ts +86 -86
- package/dist/observation/persistence/syncDeltaRow.d.ts +23 -23
- package/dist/observation/persistence/syncDeltaRow.d.ts.map +1 -1
- package/dist/pricing.d.ts +12 -12
- package/dist/schema/audit.js.map +1 -1
- package/dist/schema/ddl.js.map +1 -1
- package/dist/schema/ddlLock.js.map +1 -1
- package/dist/schema/deployment/contracts.d.ts +64 -64
- package/dist/schema/deployment/index.d.ts.map +1 -1
- package/dist/schema/deployment/index.js +52 -3
- package/dist/schema/deployment/index.js.map +1 -1
- package/dist/schema/deployment/reconcile.d.ts +2 -2
- package/dist/schema/deployment/reconcile.d.ts.map +1 -1
- package/dist/schema/deployment/reconcile.js +98 -6
- package/dist/schema/deployment/reconcile.js.map +1 -1
- package/dist/schema/diff.js.map +1 -1
- package/dist/schema/field.d.ts +1 -1
- package/dist/schema/field.d.ts.map +1 -1
- package/dist/schema/loadStrategy.d.ts +2 -2
- package/dist/schema/loadStrategy.d.ts.map +1 -1
- package/dist/schema/openapi.js.map +1 -1
- package/dist/schema/relation.d.ts +3 -3
- package/dist/schema/relation.d.ts.map +1 -1
- package/dist/schema/residency.d.ts +1 -1
- package/dist/schema/roles.d.ts +1 -1
- package/dist/schema/roles.d.ts.map +1 -1
- package/dist/schema/roles.js.map +1 -1
- package/dist/schema/schema.d.ts +1 -1
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/serialize.js.map +1 -1
- package/dist/schema/sugar.d.ts.map +1 -1
- package/dist/schema/tenancy.d.ts +2 -2
- package/dist/server/storageMode.d.ts +1 -1
- package/dist/source/adapters/adapterProfile.d.ts +6 -6
- package/dist/source/adapters/conformance.js.map +1 -1
- package/dist/source/adapters/contract.d.ts +14 -14
- package/dist/source/adapters/kysely.js.map +1 -1
- package/dist/source/adapters/memory.js.map +1 -1
- package/dist/source/adapters/prisma.js.map +1 -1
- package/dist/source/connector/client.d.ts.map +1 -1
- package/dist/source/connector/client.js.map +1 -1
- package/dist/source/connector/protocol.d.ts.map +1 -1
- package/dist/source/delivery/pushQueue.d.ts.map +1 -1
- package/dist/source/delivery/pushQueue.js.map +1 -1
- package/dist/source/endpoint/signing.d.ts +4 -4
- package/dist/source/endpoint/signing.d.ts.map +1 -1
- package/dist/source/outbox/contract.d.ts +4 -4
- package/dist/testing/fixtures/httpResponses.d.ts +2 -2
- package/dist/testing/fixtures/httpResponses.d.ts.map +1 -1
- package/dist/testing/fixtures/httpResponses.js.map +1 -1
- package/dist/transport/connection/credentialLifecycle.d.ts.map +1 -1
- package/dist/transport/connection/credentialLifecycle.js.map +1 -1
- package/dist/transport/connection/manager.d.ts.map +1 -1
- package/dist/transport/connection/manager.js.map +1 -1
- package/dist/transport/connection/networkProbe.d.ts +18 -5
- package/dist/transport/connection/networkProbe.d.ts.map +1 -1
- package/dist/transport/connection/networkProbe.js.map +1 -1
- package/dist/transport/http/client.d.ts +37 -1
- package/dist/transport/http/client.d.ts.map +1 -1
- package/dist/transport/http/client.js +117 -2
- package/dist/transport/http/client.js.map +1 -1
- package/dist/transport/http/transport.d.ts +21 -0
- package/dist/transport/http/transport.d.ts.map +1 -1
- package/dist/transport/http/transport.js +93 -5
- package/dist/transport/http/transport.js.map +1 -1
- package/dist/transport/websocket/commitFrames.d.ts +4 -3
- package/dist/transport/websocket/commitFrames.d.ts.map +1 -1
- package/dist/transport/websocket/commitFrames.js +1 -0
- package/dist/transport/websocket/commitFrames.js.map +1 -1
- package/dist/transport/websocket/contextSubscription.d.ts +6 -0
- package/dist/transport/websocket/contextSubscription.d.ts.map +1 -0
- package/dist/transport/websocket/contextSubscription.js +45 -0
- package/dist/transport/websocket/contextSubscription.js.map +1 -0
- package/dist/transport/websocket/heartbeat.d.ts.map +1 -1
- package/dist/transport/websocket/heartbeat.js.map +1 -1
- package/dist/transport/websocket/session.d.ts +4 -0
- package/dist/transport/websocket/session.d.ts.map +1 -0
- package/dist/transport/websocket/session.js +385 -0
- package/dist/transport/websocket/session.js.map +1 -0
- package/dist/transport/websocket/sessionContract.d.ts +89 -0
- package/dist/transport/websocket/sessionContract.d.ts.map +1 -0
- package/dist/transport/websocket/sessionContract.js +2 -0
- package/dist/transport/websocket/sessionContract.js.map +1 -0
- package/dist/transport/websocket/transport.d.ts +22 -0
- package/dist/transport/websocket/transport.d.ts.map +1 -1
- package/dist/transport/websocket/transport.js +63 -1
- package/dist/transport/websocket/transport.js.map +1 -1
- package/dist/wire/accountResponses.d.ts +31 -31
- package/dist/wire/auth.d.ts +3 -3
- package/dist/wire/bootstrapReason.d.ts +2 -2
- package/dist/wire/dataSourceResponses.d.ts +2 -2
- package/dist/wire/dataSourceResponses.d.ts.map +1 -1
- package/dist/wire/frames.d.ts +8 -8
- package/dist/wire/inboundFrames.d.ts +56 -56
- package/dist/wire/inboundFrames.d.ts.map +1 -1
- package/dist/wire/listEnvelope.js.map +1 -1
- package/dist/wire/modelResponses.d.ts +2 -2
- package/dist/wire/modelShape.d.ts +4 -4
- package/dist/wire/pricing.d.ts +3 -3
- package/dist/wire/protocolVersion.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/client/ablo.ts +10 -5
- package/src/client/surface.ts +8 -1
- package/src/commit/recordRuntime.ts +4 -2
- package/src/errorCodes.ts +5 -1
- package/src/errors.ts +18 -1
- package/src/index.ts +1 -0
- package/src/schema/deployment/index.ts +54 -3
- package/src/schema/deployment/reconcile.ts +122 -6
- package/src/transport/http/client.ts +171 -4
- package/src/transport/http/transport.ts +126 -4
- package/src/transport/websocket/commitFrames.ts +5 -3
- package/src/transport/websocket/contextSubscription.ts +55 -0
- package/src/transport/websocket/session.ts +467 -0
- package/src/transport/websocket/sessionContract.ts +115 -0
- package/src/transport/websocket/transport.ts +72 -0
|
@@ -59,27 +59,27 @@ export type InboundFrameContract =
|
|
|
59
59
|
*/
|
|
60
60
|
export declare const WS_INBOUND_FRAMES: {
|
|
61
61
|
readonly ping: {
|
|
62
|
-
readonly validation:
|
|
63
|
-
readonly where:
|
|
62
|
+
readonly validation: 'handler';
|
|
63
|
+
readonly where: 'dispatchWsFrame — ignored, no payload';
|
|
64
64
|
};
|
|
65
65
|
readonly pong: {
|
|
66
|
-
readonly validation:
|
|
67
|
-
readonly where:
|
|
66
|
+
readonly validation: 'handler';
|
|
67
|
+
readonly where: 'dispatchWsFrame — ignored, no payload';
|
|
68
68
|
};
|
|
69
69
|
readonly delta: {
|
|
70
|
-
readonly validation:
|
|
71
|
-
readonly where:
|
|
70
|
+
readonly validation: 'handler';
|
|
71
|
+
readonly where: 'the materialiser parses each delta as it applies it';
|
|
72
72
|
readonly checkedBy: z.ZodObject<{
|
|
73
73
|
id: z.ZodNumber;
|
|
74
74
|
actionType: z.ZodEnum<{
|
|
75
75
|
A: "A";
|
|
76
|
-
I: "I";
|
|
77
|
-
U: "U";
|
|
78
|
-
D: "D";
|
|
79
|
-
V: "V";
|
|
80
76
|
C: "C";
|
|
77
|
+
D: "D";
|
|
81
78
|
G: "G";
|
|
79
|
+
I: "I";
|
|
82
80
|
S: "S";
|
|
81
|
+
U: "U";
|
|
82
|
+
V: "V";
|
|
83
83
|
}>;
|
|
84
84
|
modelName: z.ZodString;
|
|
85
85
|
modelId: z.ZodString;
|
|
@@ -95,16 +95,16 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
95
95
|
}, z.core.$strip>;
|
|
96
96
|
};
|
|
97
97
|
readonly sync_response: {
|
|
98
|
-
readonly validation:
|
|
99
|
-
readonly where:
|
|
98
|
+
readonly validation: 'handler';
|
|
99
|
+
readonly where: 'the reactive engine validates it while advancing its resume cursor';
|
|
100
100
|
};
|
|
101
101
|
readonly bootstrap_response: {
|
|
102
|
-
readonly validation:
|
|
103
|
-
readonly where:
|
|
102
|
+
readonly validation: 'handler';
|
|
103
|
+
readonly where: 'the reactive engine validates the bootstrap payload as it applies it';
|
|
104
104
|
};
|
|
105
105
|
readonly mutation_result: {
|
|
106
|
-
readonly validation:
|
|
107
|
-
readonly where:
|
|
106
|
+
readonly validation: 'handler';
|
|
107
|
+
readonly where: 'handleMutationResult — it validates missingIds alongside the payload before this can parse';
|
|
108
108
|
readonly checkedBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
109
|
status: z.ZodLiteral<"queued">;
|
|
110
110
|
statusAt: z.ZodISODateTime;
|
|
@@ -122,11 +122,11 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
122
122
|
projectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
123
123
|
branchId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
124
124
|
syncGroups: z.ZodArray<z.ZodString>;
|
|
125
|
-
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.
|
|
125
|
+
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.create` | `${string}.delete` | `${string}.read` | `${string}.update`>>;
|
|
126
126
|
participantKind: z.ZodEnum<{
|
|
127
|
-
user: "user";
|
|
128
127
|
agent: "agent";
|
|
129
128
|
system: "system";
|
|
129
|
+
user: "user";
|
|
130
130
|
}>;
|
|
131
131
|
participantId: z.ZodString;
|
|
132
132
|
deliveryPartition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
@@ -138,11 +138,11 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
138
138
|
operationResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
139
139
|
transactionId: z.ZodString;
|
|
140
140
|
outcome: z.ZodEnum<{
|
|
141
|
-
deleted: "deleted";
|
|
142
|
-
created: "created";
|
|
143
|
-
updated: "updated";
|
|
144
141
|
archived: "archived";
|
|
142
|
+
created: "created";
|
|
143
|
+
deleted: "deleted";
|
|
145
144
|
unarchived: "unarchived";
|
|
145
|
+
updated: "updated";
|
|
146
146
|
}>;
|
|
147
147
|
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
148
148
|
}, z.core.$strict>>>;
|
|
@@ -163,11 +163,11 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
163
163
|
projectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
164
164
|
branchId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
165
165
|
syncGroups: z.ZodArray<z.ZodString>;
|
|
166
|
-
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.
|
|
166
|
+
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.create` | `${string}.delete` | `${string}.read` | `${string}.update`>>;
|
|
167
167
|
participantKind: z.ZodEnum<{
|
|
168
|
-
user: "user";
|
|
169
168
|
agent: "agent";
|
|
170
169
|
system: "system";
|
|
170
|
+
user: "user";
|
|
171
171
|
}>;
|
|
172
172
|
participantId: z.ZodString;
|
|
173
173
|
deliveryPartition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
@@ -179,23 +179,23 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
179
179
|
operationResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
180
180
|
transactionId: z.ZodString;
|
|
181
181
|
outcome: z.ZodEnum<{
|
|
182
|
-
deleted: "deleted";
|
|
183
|
-
created: "created";
|
|
184
|
-
updated: "updated";
|
|
185
182
|
archived: "archived";
|
|
183
|
+
created: "created";
|
|
184
|
+
deleted: "deleted";
|
|
186
185
|
unarchived: "unarchived";
|
|
186
|
+
updated: "updated";
|
|
187
187
|
}>;
|
|
188
188
|
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
189
189
|
}, z.core.$strict>>>;
|
|
190
190
|
}, z.core.$strict>], "status">;
|
|
191
191
|
};
|
|
192
192
|
readonly claim_ack: {
|
|
193
|
-
readonly validation:
|
|
194
|
-
readonly where:
|
|
193
|
+
readonly validation: 'handler';
|
|
194
|
+
readonly where: 'handleClaimAck narrows field by field, because a rejection carries a typed capability error it has to re-raise as CapabilityError';
|
|
195
195
|
};
|
|
196
196
|
readonly subscription_ack: {
|
|
197
|
-
readonly validation:
|
|
198
|
-
readonly where:
|
|
197
|
+
readonly validation: 'handler';
|
|
198
|
+
readonly where: 'handleSubscriptionAck';
|
|
199
199
|
readonly checkedBy: z.ZodObject<{
|
|
200
200
|
success: z.ZodBoolean;
|
|
201
201
|
syncGroups: z.ZodArray<z.ZodString>;
|
|
@@ -208,12 +208,12 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
208
208
|
}, z.core.$strip>;
|
|
209
209
|
};
|
|
210
210
|
readonly presence_update: {
|
|
211
|
-
readonly validation:
|
|
211
|
+
readonly validation: 'schema';
|
|
212
212
|
readonly payload: z.ZodObject<{
|
|
213
213
|
kind: z.ZodEnum<{
|
|
214
214
|
enter: "enter";
|
|
215
|
-
update: "update";
|
|
216
215
|
leave: "leave";
|
|
216
|
+
update: "update";
|
|
217
217
|
}>;
|
|
218
218
|
userId: z.ZodString;
|
|
219
219
|
syncGroups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -234,9 +234,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
234
234
|
}, z.core.$strip>>;
|
|
235
235
|
isAgent: z.ZodOptional<z.ZodBoolean>;
|
|
236
236
|
participantKind: z.ZodOptional<z.ZodPreprocess<z.ZodEnum<{
|
|
237
|
-
user: "user";
|
|
238
237
|
agent: "agent";
|
|
239
238
|
system: "system";
|
|
239
|
+
user: "user";
|
|
240
240
|
}>>>;
|
|
241
241
|
activeClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
242
|
entityType: z.ZodString;
|
|
@@ -244,24 +244,24 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
244
244
|
field: z.ZodOptional<z.ZodString>;
|
|
245
245
|
fields: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
246
246
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
247
|
+
fenceToken: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
acquiredAt: z.ZodOptional<z.ZodNumber>;
|
|
247
249
|
claimId: z.ZodString;
|
|
248
250
|
description: z.ZodOptional<z.ZodString>;
|
|
249
251
|
declaredAt: z.ZodNumber;
|
|
250
252
|
expiresAt: z.ZodNumber;
|
|
251
253
|
onBehalfOfId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
252
254
|
onBehalfOfKind: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodEnum<{
|
|
253
|
-
user: "user";
|
|
254
255
|
agent: "agent";
|
|
255
256
|
system: "system";
|
|
257
|
+
user: "user";
|
|
256
258
|
}>>>>;
|
|
257
259
|
capabilityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
-
fenceToken: z.ZodOptional<z.ZodNumber>;
|
|
259
|
-
acquiredAt: z.ZodOptional<z.ZodNumber>;
|
|
260
260
|
status: z.ZodOptional<z.ZodEnum<{
|
|
261
261
|
active: "active";
|
|
262
|
+
canceled: "canceled";
|
|
262
263
|
committed: "committed";
|
|
263
264
|
expired: "expired";
|
|
264
|
-
canceled: "canceled";
|
|
265
265
|
}>>;
|
|
266
266
|
error: z.ZodOptional<z.ZodObject<{
|
|
267
267
|
code: z.ZodString;
|
|
@@ -281,9 +281,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
281
281
|
expiresAt: z.ZodNumber;
|
|
282
282
|
onBehalfOfId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
283
283
|
onBehalfOfKind: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodEnum<{
|
|
284
|
-
user: "user";
|
|
285
284
|
agent: "agent";
|
|
286
285
|
system: "system";
|
|
286
|
+
user: "user";
|
|
287
287
|
}>>>>;
|
|
288
288
|
capabilityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
289
289
|
}, z.core.$strip>>;
|
|
@@ -293,20 +293,20 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
293
293
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
294
294
|
};
|
|
295
295
|
readonly claim_expired: {
|
|
296
|
-
readonly validation:
|
|
296
|
+
readonly validation: 'schema';
|
|
297
297
|
readonly payload: z.ZodObject<{
|
|
298
298
|
claimId: z.ZodString;
|
|
299
299
|
}, z.core.$strip>;
|
|
300
300
|
};
|
|
301
301
|
readonly claim_rejected: {
|
|
302
|
-
readonly validation:
|
|
302
|
+
readonly validation: 'schema';
|
|
303
303
|
readonly payload: z.ZodObject<{
|
|
304
304
|
claimId: z.ZodString;
|
|
305
305
|
reason: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
306
|
+
capability_denied: "capability_denied";
|
|
306
307
|
conflict: "conflict";
|
|
307
|
-
expired: "expired";
|
|
308
308
|
coordination_unavailable: "coordination_unavailable";
|
|
309
|
-
|
|
309
|
+
expired: "expired";
|
|
310
310
|
invalid_target: "invalid_target";
|
|
311
311
|
preempted: "preempted";
|
|
312
312
|
}>>>;
|
|
@@ -319,9 +319,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
319
319
|
}, z.core.$strip>>;
|
|
320
320
|
heldBy: z.ZodOptional<z.ZodString>;
|
|
321
321
|
heldByKind: z.ZodOptional<z.ZodPreprocess<z.ZodEnum<{
|
|
322
|
-
user: "user";
|
|
323
322
|
agent: "agent";
|
|
324
323
|
system: "system";
|
|
324
|
+
user: "user";
|
|
325
325
|
}>>>;
|
|
326
326
|
heldByClaimId: z.ZodOptional<z.ZodString>;
|
|
327
327
|
heldByExpiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -337,9 +337,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
337
337
|
expiresAt: z.ZodNumber;
|
|
338
338
|
onBehalfOfId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
339
|
onBehalfOfKind: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodEnum<{
|
|
340
|
-
user: "user";
|
|
341
340
|
agent: "agent";
|
|
342
341
|
system: "system";
|
|
342
|
+
user: "user";
|
|
343
343
|
}>>>>;
|
|
344
344
|
capabilityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
345
|
}, z.core.$strip>>;
|
|
@@ -347,7 +347,7 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
347
347
|
}, z.core.$strip>;
|
|
348
348
|
};
|
|
349
349
|
readonly claim_acquired: {
|
|
350
|
-
readonly validation:
|
|
350
|
+
readonly validation: 'schema';
|
|
351
351
|
readonly payload: z.ZodObject<{
|
|
352
352
|
claimId: z.ZodString;
|
|
353
353
|
fenceToken: z.ZodOptional<z.ZodNumber>;
|
|
@@ -362,7 +362,7 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
362
362
|
}, z.core.$strip>;
|
|
363
363
|
};
|
|
364
364
|
readonly claim_queued: {
|
|
365
|
-
readonly validation:
|
|
365
|
+
readonly validation: 'schema';
|
|
366
366
|
readonly payload: z.ZodObject<{
|
|
367
367
|
claimId: z.ZodString;
|
|
368
368
|
target: z.ZodOptional<z.ZodObject<{
|
|
@@ -374,9 +374,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
374
374
|
}, z.core.$strip>>;
|
|
375
375
|
heldBy: z.ZodOptional<z.ZodString>;
|
|
376
376
|
heldByKind: z.ZodOptional<z.ZodPreprocess<z.ZodEnum<{
|
|
377
|
-
user: "user";
|
|
378
377
|
agent: "agent";
|
|
379
378
|
system: "system";
|
|
379
|
+
user: "user";
|
|
380
380
|
}>>>;
|
|
381
381
|
heldByClaimId: z.ZodOptional<z.ZodString>;
|
|
382
382
|
heldByExpiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -392,26 +392,26 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
392
392
|
expiresAt: z.ZodNumber;
|
|
393
393
|
onBehalfOfId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
394
394
|
onBehalfOfKind: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodEnum<{
|
|
395
|
-
user: "user";
|
|
396
395
|
agent: "agent";
|
|
397
396
|
system: "system";
|
|
397
|
+
user: "user";
|
|
398
398
|
}>>>>;
|
|
399
399
|
capabilityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
400
400
|
}, z.core.$strip>>;
|
|
401
401
|
message: z.ZodOptional<z.ZodString>;
|
|
402
402
|
position: z.ZodNumber;
|
|
403
403
|
reason: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
404
|
+
capability_denied: "capability_denied";
|
|
404
405
|
conflict: "conflict";
|
|
405
|
-
expired: "expired";
|
|
406
406
|
coordination_unavailable: "coordination_unavailable";
|
|
407
|
-
|
|
407
|
+
expired: "expired";
|
|
408
408
|
invalid_target: "invalid_target";
|
|
409
409
|
preempted: "preempted";
|
|
410
410
|
}>>>>;
|
|
411
411
|
}, z.core.$strip>;
|
|
412
412
|
};
|
|
413
413
|
readonly claim_granted: {
|
|
414
|
-
readonly validation:
|
|
414
|
+
readonly validation: 'schema';
|
|
415
415
|
readonly payload: z.ZodObject<{
|
|
416
416
|
claimId: z.ZodString;
|
|
417
417
|
fenceToken: z.ZodOptional<z.ZodNumber>;
|
|
@@ -426,7 +426,7 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
426
426
|
}, z.core.$strip>;
|
|
427
427
|
};
|
|
428
428
|
readonly claim_lost: {
|
|
429
|
-
readonly validation:
|
|
429
|
+
readonly validation: 'schema';
|
|
430
430
|
readonly payload: z.ZodObject<{
|
|
431
431
|
claimId: z.ZodString;
|
|
432
432
|
reason: z.ZodEnum<{
|
|
@@ -443,7 +443,7 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
443
443
|
}, z.core.$strip>;
|
|
444
444
|
};
|
|
445
445
|
readonly claim_queue: {
|
|
446
|
-
readonly validation:
|
|
446
|
+
readonly validation: 'schema';
|
|
447
447
|
readonly payload: z.ZodObject<{
|
|
448
448
|
target: z.ZodObject<{
|
|
449
449
|
type: z.ZodString;
|
|
@@ -463,9 +463,9 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
463
463
|
description: z.ZodDefault<z.ZodString>;
|
|
464
464
|
heldBy: z.ZodOptional<z.ZodString>;
|
|
465
465
|
participantKind: z.ZodOptional<z.ZodPreprocess<z.ZodEnum<{
|
|
466
|
-
user: "user";
|
|
467
466
|
agent: "agent";
|
|
468
467
|
system: "system";
|
|
468
|
+
user: "user";
|
|
469
469
|
}>>>;
|
|
470
470
|
position: z.ZodNumber;
|
|
471
471
|
expiresAt: z.ZodNumber;
|
|
@@ -473,13 +473,13 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
473
473
|
}, z.core.$strip>;
|
|
474
474
|
};
|
|
475
475
|
readonly claim_heartbeat_ack: {
|
|
476
|
-
readonly validation:
|
|
476
|
+
readonly validation: 'schema';
|
|
477
477
|
readonly payload: z.ZodObject<{
|
|
478
478
|
claimId: z.ZodString;
|
|
479
479
|
status: z.ZodEnum<{
|
|
480
|
-
queued: "queued";
|
|
481
480
|
held: "held";
|
|
482
481
|
lost: "lost";
|
|
482
|
+
queued: "queued";
|
|
483
483
|
}>;
|
|
484
484
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
485
485
|
position: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inboundFrames.d.ts","sourceRoot":"","sources":["../../src/wire/inboundFrames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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AC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CAAC;AACL,CAAC;AAMD;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAkB,EAClB,IAAI,GAAsD,EAAE;IAE5D,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI;QACJ,QAAQ,EAAE,IAAI,CAAC,OAAO,IAAI,KAAK;QAC/B,WAAW,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -34,15 +34,15 @@ export declare const modelReadResponseSchema: z.ZodObject<{
|
|
|
34
34
|
id: z.ZodString;
|
|
35
35
|
actor: z.ZodString;
|
|
36
36
|
participantKind: z.ZodPreprocess<z.ZodEnum<{
|
|
37
|
-
user: "user";
|
|
38
37
|
agent: "agent";
|
|
39
38
|
system: "system";
|
|
39
|
+
user: "user";
|
|
40
40
|
}>>;
|
|
41
41
|
onBehalfOfId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
42
|
onBehalfOfKind: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodEnum<{
|
|
43
|
-
user: "user";
|
|
44
43
|
agent: "agent";
|
|
45
44
|
system: "system";
|
|
45
|
+
user: "user";
|
|
46
46
|
}>>>>;
|
|
47
47
|
capabilityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
48
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -25,23 +25,23 @@ import { z } from 'zod';
|
|
|
25
25
|
* narrow one of these; they do not add a member.
|
|
26
26
|
*/
|
|
27
27
|
export declare const fieldTypeSchema: z.ZodEnum<{
|
|
28
|
-
string: "string";
|
|
29
|
-
number: "number";
|
|
30
28
|
boolean: "boolean";
|
|
31
29
|
date: "date";
|
|
32
30
|
enum: "enum";
|
|
33
31
|
json: "json";
|
|
32
|
+
number: "number";
|
|
33
|
+
string: "string";
|
|
34
34
|
}>;
|
|
35
35
|
export type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
36
36
|
/** One field of a model, as the schema artifact records it. */
|
|
37
37
|
export declare const fieldMetaSchema: z.ZodObject<{
|
|
38
38
|
type: z.ZodEnum<{
|
|
39
|
-
string: "string";
|
|
40
|
-
number: "number";
|
|
41
39
|
boolean: "boolean";
|
|
42
40
|
date: "date";
|
|
43
41
|
enum: "enum";
|
|
44
42
|
json: "json";
|
|
43
|
+
number: "number";
|
|
44
|
+
string: "string";
|
|
45
45
|
}>;
|
|
46
46
|
isOptional: z.ZodBoolean;
|
|
47
47
|
isIndexed: z.ZodBoolean;
|
package/dist/wire/pricing.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
export declare const planTierSchema: z.ZodEnum<{
|
|
10
|
+
enterprise: "enterprise";
|
|
10
11
|
free: "free";
|
|
11
12
|
scale: "scale";
|
|
12
|
-
enterprise: "enterprise";
|
|
13
13
|
}>;
|
|
14
14
|
export type PlanTier = z.infer<typeof planTierSchema>;
|
|
15
15
|
/**
|
|
@@ -24,10 +24,10 @@ export type PlanTier = z.infer<typeof planTierSchema>;
|
|
|
24
24
|
* the act of connecting.
|
|
25
25
|
*/
|
|
26
26
|
export declare const meterEventSchema: z.ZodEnum<{
|
|
27
|
+
"api.bootstraps": "api.bootstraps";
|
|
28
|
+
"api.claim_creates": "api.claim_creates";
|
|
27
29
|
"api.commit_ops": "api.commit_ops";
|
|
28
30
|
"api.model_reads": "api.model_reads";
|
|
29
|
-
"api.claim_creates": "api.claim_creates";
|
|
30
|
-
"api.bootstraps": "api.bootstraps";
|
|
31
31
|
}>;
|
|
32
32
|
export type MeterEvent = z.infer<typeof meterEventSchema>;
|
|
33
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocolVersion.d.ts","sourceRoot":"","sources":["../../src/wire/protocolVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"protocolVersion.d.ts","sourceRoot":"","sources":["../../src/wire/protocolVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,YAAI,CAAC,CAAU,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,eAAe,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,sBAAsB,GAAG,IAAI,CAO/B;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,wBAAwB,GAAG,IAAI,CAGjC;AAED,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abloatai/transaction",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.2",
|
|
4
4
|
"description": "The headless Ablo transaction client and canonical contracts for reads, commits, confirmation, claims, and durable observation.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -292,6 +292,7 @@
|
|
|
292
292
|
"prepack": "npm run build && node ../ablo/scripts/strip-source-condition.mjs",
|
|
293
293
|
"postpack": "node ../ablo/scripts/restore-source-condition.mjs",
|
|
294
294
|
"pack:check": "node ../ablo/scripts/pack-check.mjs",
|
|
295
|
+
"pack:smoke:websocket": "node scripts/packed-websocket-smoke.mjs",
|
|
295
296
|
"lint:pkg": "publint",
|
|
296
297
|
"test": "vitest run src/client/headless.test.ts && jest",
|
|
297
298
|
"typecheck": "tsc --noEmit && tsc -p typetests/tsconfig.json"
|
package/src/client/ablo.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
import {
|
|
24
24
|
createAbloHttpClient,
|
|
25
25
|
type AbloHttpClient,
|
|
26
|
+
type AbloWebSocketClient,
|
|
26
27
|
} from '../transport/http/client.js';
|
|
27
28
|
import type { SchemaRecord } from '../schema/schema.js';
|
|
28
29
|
import type { PublicAbloOptions } from './surface.js';
|
|
@@ -34,14 +35,18 @@ import type * as _Http from './resources/httpResources.js';
|
|
|
34
35
|
/**
|
|
35
36
|
* Create a coordination-layer client in one call.
|
|
36
37
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* factory and may be omitted. The duplex transport joins this slot when the
|
|
40
|
-
* socket carve lands (ADR 0016, follow-up 3a).
|
|
38
|
+
* HTTP is the default. A resident process may select `transport: 'websocket'`
|
|
39
|
+
* without changing the model, commit, or claim vocabulary.
|
|
41
40
|
*/
|
|
41
|
+
export function Ablo<const S extends SchemaRecord>(
|
|
42
|
+
options: PublicAbloOptions<S> & { readonly transport: 'websocket' },
|
|
43
|
+
): AbloWebSocketClient<S>;
|
|
44
|
+
export function Ablo<const S extends SchemaRecord>(
|
|
45
|
+
options: PublicAbloOptions<S>,
|
|
46
|
+
): AbloHttpClient<S>;
|
|
42
47
|
export function Ablo<const S extends SchemaRecord>(
|
|
43
48
|
options: PublicAbloOptions<S>,
|
|
44
|
-
): AbloHttpClient<S> {
|
|
49
|
+
): AbloHttpClient<S> | AbloWebSocketClient<S> {
|
|
45
50
|
return createAbloHttpClient(options);
|
|
46
51
|
}
|
|
47
52
|
|
package/src/client/surface.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type PublicAbloOptions<S extends SchemaRecord = SchemaRecord> = Omit<
|
|
|
14
14
|
AbloHttpClientOptions<S>,
|
|
15
15
|
'onCommitReceipt' | 'transport'
|
|
16
16
|
> & {
|
|
17
|
-
readonly transport?: 'http';
|
|
17
|
+
readonly transport?: 'http' | 'websocket';
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const PUBLIC_ABLO_OPTION_KEYS = [
|
|
@@ -36,6 +36,13 @@ export const PUBLIC_ABLO_OPTION_KEYS = [
|
|
|
36
36
|
'commitOutboxScope',
|
|
37
37
|
'transport',
|
|
38
38
|
'timeoutMs',
|
|
39
|
+
'syncGroups',
|
|
40
|
+
'collaborationEvents',
|
|
41
|
+
'cursorStore',
|
|
42
|
+
'cursorKey',
|
|
43
|
+
'reconnectDelay',
|
|
44
|
+
'maxReconnectDelay',
|
|
45
|
+
'connectTimeoutMs',
|
|
39
46
|
] as const;
|
|
40
47
|
|
|
41
48
|
type Equal<A, B> =
|
|
@@ -21,8 +21,9 @@ interface WebSocketCommitObservation {
|
|
|
21
21
|
readonly operations: readonly {
|
|
22
22
|
readonly type: string;
|
|
23
23
|
readonly model: string;
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly input?: Record<string, unknown
|
|
24
|
+
readonly id: string | null;
|
|
25
|
+
readonly input?: Record<string, unknown> | null;
|
|
26
|
+
readonly where?: Record<string, unknown> | null;
|
|
26
27
|
readonly claimId?: string | null;
|
|
27
28
|
readonly readAt?: number | null;
|
|
28
29
|
readonly fenceToken?: number | null;
|
|
@@ -149,6 +150,7 @@ export function recordWebSocketCommitReceipt(
|
|
|
149
150
|
model: operation.model,
|
|
150
151
|
id: operation.id,
|
|
151
152
|
...(operation.input ? { data: operation.input } : {}),
|
|
153
|
+
...(operation.where ? { where: operation.where } : {}),
|
|
152
154
|
...(operation.claimId ? { claimId: operation.claimId } : {}),
|
|
153
155
|
...(typeof operation.readAt === 'number' ? { readAt: operation.readAt } : {}),
|
|
154
156
|
...(typeof operation.fenceToken === 'number'
|
package/src/errorCodes.ts
CHANGED
|
@@ -39,7 +39,7 @@ import { z } from 'zod';
|
|
|
39
39
|
* error documentation and returned on the `Ablo-Version` response header, so a
|
|
40
40
|
* consumer can detect when its expected contract has drifted from the server's.
|
|
41
41
|
*/
|
|
42
|
-
export const ERROR_CONTRACT_VERSION = '2026-08-
|
|
42
|
+
export const ERROR_CONTRACT_VERSION = '2026-08-30';
|
|
43
43
|
|
|
44
44
|
/** A coarse grouping of error codes, used to organize metrics and documentation. */
|
|
45
45
|
export type ErrorCategory =
|
|
@@ -1238,6 +1238,10 @@ export const ERROR_CODES = {
|
|
|
1238
1238
|
false,
|
|
1239
1239
|
'The offline grace window expired before this commit could be sent, so it was not applied. Re-apply the change once the connection returns.'
|
|
1240
1240
|
),
|
|
1241
|
+
observation_buffer_overflow: client(
|
|
1242
|
+
'transport',
|
|
1243
|
+
'A WebSocket observer fell behind its bounded in-memory backlog. Restart observation to replay from the last durable checkpoint.'
|
|
1244
|
+
),
|
|
1241
1245
|
queue_too_deep: wire(
|
|
1242
1246
|
'transport',
|
|
1243
1247
|
503,
|
package/src/errors.ts
CHANGED
|
@@ -871,6 +871,19 @@ function detailsFromBody(body: unknown): Record<string, unknown> | undefined {
|
|
|
871
871
|
return Object.keys(rest).length > 0 ? rest : undefined;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
|
+
function detailsFromNestedError(
|
|
875
|
+
nested: NestedErrorShape | undefined,
|
|
876
|
+
): Record<string, unknown> | undefined {
|
|
877
|
+
if (!nested) return undefined;
|
|
878
|
+
const extras = detailsFromBody(nested) ?? {};
|
|
879
|
+
delete extras.details;
|
|
880
|
+
const direct = typeof nested.details === 'object' && nested.details !== null
|
|
881
|
+
? nested.details as Record<string, unknown>
|
|
882
|
+
: {};
|
|
883
|
+
const merged = { ...extras, ...direct };
|
|
884
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
885
|
+
}
|
|
886
|
+
|
|
874
887
|
export function translateHttpError(
|
|
875
888
|
status: number,
|
|
876
889
|
body: unknown,
|
|
@@ -911,6 +924,10 @@ export function translateHttpError(
|
|
|
911
924
|
typeof body === 'object' && body !== null && 'request_id' in body
|
|
912
925
|
? (body as { request_id?: unknown }).request_id
|
|
913
926
|
: undefined;
|
|
927
|
+
const details = {
|
|
928
|
+
...(detailsFromBody(body) ?? {}),
|
|
929
|
+
...(detailsFromNestedError(nested) ?? {}),
|
|
930
|
+
};
|
|
914
931
|
|
|
915
932
|
return errorFromWire(message, {
|
|
916
933
|
code,
|
|
@@ -918,7 +935,7 @@ export function translateHttpError(
|
|
|
918
935
|
requestId: requestId ?? (typeof bodyRequestId === 'string' ? bodyRequestId : undefined),
|
|
919
936
|
requiredCapability,
|
|
920
937
|
claims,
|
|
921
|
-
details:
|
|
938
|
+
details: Object.keys(details).length > 0 ? details : undefined,
|
|
922
939
|
});
|
|
923
940
|
}
|
|
924
941
|
|