@abloatai/transaction 0.48.0 → 0.49.0
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/CONVENTIONS.md +7 -7
- package/README.md +1 -1
- package/dist/ai-sdk/modelTools.d.ts +1 -1
- package/dist/ai-sdk/modelTools.js +1 -1
- package/dist/ai-sdk/updateTool.d.ts +2 -2
- package/dist/ai-sdk/updateTool.d.ts.map +1 -1
- package/dist/auth/bootstrapScope.d.ts +1 -1
- package/dist/auth/capability.d.ts +32 -10
- package/dist/auth/capability.d.ts.map +1 -1
- package/dist/auth/capability.js +9 -3
- package/dist/auth/capability.js.map +1 -1
- package/dist/auth/capabilityLifecycle.d.ts +2 -2
- package/dist/auth/capabilityLifecycle.d.ts.map +1 -1
- package/dist/auth/capabilityLifecycle.js +3 -2
- package/dist/auth/capabilityLifecycle.js.map +1 -1
- package/dist/auth/identity.d.ts +3 -0
- package/dist/auth/identity.d.ts.map +1 -1
- package/dist/auth/identity.js +13 -1
- package/dist/auth/identity.js.map +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/schemas.d.ts +18 -1
- package/dist/auth/schemas.d.ts.map +1 -1
- package/dist/auth/schemas.js +3 -1
- package/dist/auth/schemas.js.map +1 -1
- package/dist/auth/sessionMint.d.ts.map +1 -1
- package/dist/auth/sessionMint.js +0 -1
- package/dist/auth/sessionMint.js.map +1 -1
- package/dist/commitRecordRuntime.d.ts +30 -0
- package/dist/commitRecordRuntime.d.ts.map +1 -0
- package/dist/commitRecordRuntime.js +188 -0
- package/dist/commitRecordRuntime.js.map +1 -0
- package/dist/coordination/index.d.ts +3 -3
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +2 -2
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/locator.d.ts +5 -0
- package/dist/coordination/locator.d.ts.map +1 -1
- package/dist/coordination/locator.js +12 -0
- package/dist/coordination/locator.js.map +1 -1
- package/dist/coordination/schema.d.ts +205 -15
- package/dist/coordination/schema.d.ts.map +1 -1
- package/dist/coordination/schema.js +88 -47
- package/dist/coordination/schema.js.map +1 -1
- package/dist/coordination/targetConflict.js +1 -1
- package/dist/durableWrites.d.ts +3 -3
- package/dist/durableWrites.d.ts.map +1 -1
- package/dist/durableWrites.js +1 -1
- package/dist/errorCodes.d.ts +20 -1
- package/dist/errorCodes.d.ts.map +1 -1
- package/dist/errorCodes.js +44 -10
- package/dist/errorCodes.js.map +1 -1
- package/dist/errorObservation.d.ts +82 -0
- package/dist/errorObservation.d.ts.map +1 -0
- package/dist/errorObservation.js +101 -0
- package/dist/errorObservation.js.map +1 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/read-set.d.ts +8 -0
- package/dist/internal/read-set.d.ts.map +1 -0
- package/dist/internal/read-set.js +7 -0
- package/dist/internal/read-set.js.map +1 -0
- package/dist/logger.d.ts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +1 -1
- package/dist/readSetContext.d.ts +54 -0
- package/dist/readSetContext.d.ts.map +1 -0
- package/dist/readSetContext.js +98 -0
- package/dist/readSetContext.js.map +1 -0
- package/dist/resources/functionalUpdate.d.ts +13 -3
- package/dist/resources/functionalUpdate.d.ts.map +1 -1
- package/dist/resources/functionalUpdate.js.map +1 -1
- package/dist/resources/httpResources.d.ts +23 -7
- package/dist/resources/httpResources.d.ts.map +1 -1
- package/dist/resources/modelOperations.d.ts +2 -2
- package/dist/resources/modelOperations.js +1 -1
- package/dist/resources/mutationOptions.d.ts +1 -1
- package/dist/resources/mutationOptions.js +1 -1
- package/dist/resources/where.d.ts +1 -1
- package/dist/resources/where.js +1 -1
- package/dist/resources/writeOptionsSchema.d.ts +39 -4
- package/dist/resources/writeOptionsSchema.d.ts.map +1 -1
- package/dist/resources/writeOptionsSchema.js +12 -6
- package/dist/resources/writeOptionsSchema.js.map +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/openapi.d.ts.map +1 -1
- package/dist/schema/openapi.js +41 -7
- package/dist/schema/openapi.js.map +1 -1
- package/dist/server/commit.d.ts +7 -1
- package/dist/server/commit.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/source/adapters/kysely.d.ts.map +1 -1
- package/dist/source/adapters/kysely.js +11 -4
- package/dist/source/adapters/kysely.js.map +1 -1
- package/dist/source/adapters/kyselyMutationCore.d.ts.map +1 -1
- package/dist/source/adapters/kyselyMutationCore.js +14 -2
- package/dist/source/adapters/kyselyMutationCore.js.map +1 -1
- package/dist/source/contract.d.ts +2 -0
- package/dist/source/contract.d.ts.map +1 -1
- package/dist/source/types.d.ts +1 -1
- package/dist/testing/fixtures/httpResponses.d.ts +30 -1
- package/dist/testing/fixtures/httpResponses.d.ts.map +1 -1
- package/dist/testing/fixtures/httpResponses.js +48 -1
- package/dist/testing/fixtures/httpResponses.js.map +1 -1
- package/dist/transactionLayer.d.ts +1 -1
- package/dist/transactions/{settlement → confirmation}/commitEnvelope.d.ts +4 -2
- package/dist/transactions/confirmation/commitEnvelope.d.ts.map +1 -0
- package/dist/transactions/{settlement → confirmation}/commitEnvelope.js +8 -3
- package/dist/transactions/confirmation/commitEnvelope.js.map +1 -0
- package/dist/transactions/confirmation/httpCommitEnvelope.d.ts.map +1 -0
- package/dist/transactions/confirmation/httpCommitEnvelope.js.map +1 -0
- package/dist/transactions/confirmation/idempotencyKey.d.ts.map +1 -0
- package/dist/transactions/confirmation/idempotencyKey.js.map +1 -0
- package/dist/transactions/{settlement → confirmation}/pendingWrite.d.ts +3 -2
- package/dist/transactions/confirmation/pendingWrite.d.ts.map +1 -0
- package/dist/transactions/confirmation/pendingWrite.js.map +1 -0
- package/dist/transport/commitFrames.d.ts +1 -0
- package/dist/transport/commitFrames.d.ts.map +1 -1
- package/dist/transport/commitFrames.js +8 -7
- package/dist/transport/commitFrames.js.map +1 -1
- package/dist/transport/connectionManager.d.ts +1 -1
- package/dist/transport/connectionManager.js +1 -1
- package/dist/transport/httpClient.d.ts +23 -9
- package/dist/transport/httpClient.d.ts.map +1 -1
- package/dist/transport/httpClient.js +134 -15
- package/dist/transport/httpClient.js.map +1 -1
- package/dist/transport/httpOptions.d.ts +9 -1
- package/dist/transport/httpOptions.d.ts.map +1 -1
- package/dist/transport/httpTransport.d.ts +3 -0
- package/dist/transport/httpTransport.d.ts.map +1 -1
- package/dist/transport/httpTransport.js +109 -22
- package/dist/transport/httpTransport.js.map +1 -1
- package/dist/transport/wsFrameHandlers.d.ts +3 -1
- package/dist/transport/wsFrameHandlers.d.ts.map +1 -1
- package/dist/transport/wsFrameHandlers.js +38 -17
- package/dist/transport/wsFrameHandlers.js.map +1 -1
- package/dist/transport/wsTransport.d.ts +3 -0
- package/dist/transport/wsTransport.d.ts.map +1 -1
- package/dist/transport/wsTransport.js +32 -1
- package/dist/transport/wsTransport.js.map +1 -1
- package/dist/utils/json.d.ts +1 -1
- package/dist/utils/json.js +1 -1
- package/dist/wire/accountResponses.d.ts +1 -1
- package/dist/wire/auth.d.ts +2 -2
- package/dist/wire/commit.d.ts +1652 -213
- package/dist/wire/commit.d.ts.map +1 -1
- package/dist/wire/commit.js +196 -132
- package/dist/wire/commit.js.map +1 -1
- package/dist/wire/delta.d.ts +1 -1
- package/dist/wire/errorEnvelope.d.ts +1 -0
- package/dist/wire/errorEnvelope.d.ts.map +1 -1
- package/dist/wire/errorEnvelope.js +1 -0
- package/dist/wire/errorEnvelope.js.map +1 -1
- package/dist/wire/feedCursor.d.ts +1 -1
- package/dist/wire/feedCursor.js +1 -1
- package/dist/wire/feedEvent.d.ts +3 -3
- package/dist/wire/frames.d.ts +8 -4
- package/dist/wire/frames.d.ts.map +1 -1
- package/dist/wire/frames.js +6 -3
- package/dist/wire/frames.js.map +1 -1
- package/dist/wire/inboundFrames.d.ts +44 -4
- package/dist/wire/inboundFrames.d.ts.map +1 -1
- package/dist/wire/index.d.ts +6 -4
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +6 -5
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/modelMutations.d.ts +35 -0
- package/dist/wire/modelMutations.d.ts.map +1 -1
- package/dist/wire/modelMutations.js +9 -2
- package/dist/wire/modelMutations.js.map +1 -1
- package/dist/wire/modelResponses.d.ts +12 -1
- package/dist/wire/modelResponses.d.ts.map +1 -1
- package/dist/wire/modelResponses.js +12 -1
- package/dist/wire/modelResponses.js.map +1 -1
- package/package.json +12 -2
- package/src/ai-sdk/modelTools.ts +1 -1
- package/src/ai-sdk/updateTool.ts +2 -2
- package/src/auth/bootstrapScope.ts +1 -1
- package/src/auth/capability.ts +13 -4
- package/src/auth/capabilityLifecycle.ts +3 -2
- package/src/auth/identity.ts +16 -1
- package/src/auth/index.ts +2 -0
- package/src/auth/schemas.ts +3 -0
- package/src/auth/sessionMint.ts +0 -1
- package/src/commitRecordRuntime.ts +245 -0
- package/src/coordination/index.ts +24 -1
- package/src/coordination/locator.ts +17 -0
- package/src/coordination/schema.ts +114 -49
- package/src/coordination/targetConflict.ts +1 -1
- package/src/durableWrites.ts +3 -3
- package/src/errorCodes.ts +107 -11
- package/src/errorObservation.ts +121 -0
- package/src/errors.ts +5 -1
- package/src/index.ts +8 -1
- package/src/internal/read-set.ts +18 -0
- package/src/logger.ts +1 -1
- package/src/observability.ts +1 -1
- package/src/readSetContext.ts +164 -0
- package/src/resources/functionalUpdate.ts +16 -4
- package/src/resources/httpResources.ts +27 -8
- package/src/resources/modelOperations.ts +2 -2
- package/src/resources/mutationOptions.ts +1 -1
- package/src/resources/where.ts +1 -1
- package/src/resources/writeOptionsSchema.ts +30 -12
- package/src/schema/index.ts +1 -1
- package/src/schema/openapi.ts +48 -7
- package/src/server/commit.ts +7 -1
- package/src/server/index.ts +5 -1
- package/src/source/adapters/kysely.ts +12 -4
- package/src/source/adapters/kyselyMutationCore.ts +14 -2
- package/src/source/types.ts +1 -1
- package/src/testing/fixtures/httpResponses.ts +60 -1
- package/src/transactionLayer.ts +1 -1
- package/src/transactions/{settlement → confirmation}/commitEnvelope.ts +13 -3
- package/src/transport/commitFrames.ts +7 -5
- package/src/transport/connectionManager.ts +1 -1
- package/src/transport/httpClient.ts +256 -29
- package/src/transport/httpOptions.ts +9 -1
- package/src/transport/httpTransport.ts +139 -27
- package/src/transport/wsFrameHandlers.ts +46 -8
- package/src/transport/wsTransport.ts +42 -1
- package/src/utils/json.ts +1 -1
- package/src/wire/commit.ts +248 -147
- package/src/wire/errorEnvelope.ts +1 -0
- package/src/wire/feedCursor.ts +1 -1
- package/src/wire/frames.ts +9 -4
- package/src/wire/index.ts +38 -5
- package/src/wire/modelMutations.ts +16 -2
- package/src/wire/modelResponses.ts +14 -1
- package/dist/transactions/settlement/commitEnvelope.d.ts.map +0 -1
- package/dist/transactions/settlement/commitEnvelope.js.map +0 -1
- package/dist/transactions/settlement/httpCommitEnvelope.d.ts.map +0 -1
- package/dist/transactions/settlement/httpCommitEnvelope.js.map +0 -1
- package/dist/transactions/settlement/idempotencyKey.d.ts.map +0 -1
- package/dist/transactions/settlement/idempotencyKey.js.map +0 -1
- package/dist/transactions/settlement/pendingWrite.d.ts.map +0 -1
- package/dist/transactions/settlement/pendingWrite.js.map +0 -1
- /package/dist/transactions/{settlement → confirmation}/httpCommitEnvelope.d.ts +0 -0
- /package/dist/transactions/{settlement → confirmation}/httpCommitEnvelope.js +0 -0
- /package/dist/transactions/{settlement → confirmation}/idempotencyKey.d.ts +0 -0
- /package/dist/transactions/{settlement → confirmation}/idempotencyKey.js +0 -0
- /package/dist/transactions/{settlement → confirmation}/pendingWrite.js +0 -0
- /package/src/transactions/{settlement → confirmation}/httpCommitEnvelope.ts +0 -0
- /package/src/transactions/{settlement → confirmation}/idempotencyKey.ts +0 -0
- /package/src/transactions/{settlement → confirmation}/pendingWrite.ts +0 -0
package/dist/wire/feedEvent.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const feedEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
41
41
|
delta: z.ZodOptional<z.ZodObject<{
|
|
42
42
|
id: z.ZodNumber;
|
|
43
43
|
data: z.ZodNullable<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodString]>>;
|
|
44
|
+
createdAt: z.ZodString;
|
|
44
45
|
actionType: z.ZodEnum<{
|
|
45
46
|
I: "I";
|
|
46
47
|
U: "U";
|
|
@@ -54,7 +55,6 @@ export declare const feedEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
54
55
|
modelName: z.ZodString;
|
|
55
56
|
modelId: z.ZodString;
|
|
56
57
|
previousData: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodString]>>>;
|
|
57
|
-
createdAt: z.ZodString;
|
|
58
58
|
actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
59
59
|
kind: z.ZodEnum<{
|
|
60
60
|
user: "user";
|
|
@@ -132,10 +132,10 @@ export declare const logListResponseSchema: z.ZodObject<{
|
|
|
132
132
|
delta?: {
|
|
133
133
|
id: number;
|
|
134
134
|
data: string | Record<string, unknown> | null;
|
|
135
|
+
createdAt: string;
|
|
135
136
|
actionType: "I" | "U" | "D" | "A" | "V" | "C" | "G" | "S";
|
|
136
137
|
modelName: string;
|
|
137
138
|
modelId: string;
|
|
138
|
-
createdAt: string;
|
|
139
139
|
previousData?: string | Record<string, unknown> | null | undefined;
|
|
140
140
|
actor?: {
|
|
141
141
|
kind: "user" | "agent" | "system";
|
|
@@ -181,10 +181,10 @@ export declare const logListResponseSchema: z.ZodObject<{
|
|
|
181
181
|
delta?: {
|
|
182
182
|
id: number;
|
|
183
183
|
data: string | Record<string, unknown> | null;
|
|
184
|
+
createdAt: string;
|
|
184
185
|
actionType: "I" | "U" | "D" | "A" | "V" | "C" | "G" | "S";
|
|
185
186
|
modelName: string;
|
|
186
187
|
modelId: string;
|
|
187
|
-
createdAt: string;
|
|
188
188
|
previousData?: string | Record<string, unknown> | null | undefined;
|
|
189
189
|
actor?: {
|
|
190
190
|
kind: "user" | "agent" | "system";
|
package/dist/wire/frames.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const wireCommitOperationSchema: z.ZodObject<{
|
|
|
41
41
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
42
|
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
43
43
|
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
+
claimId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
45
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
46
|
bypass: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
46
47
|
}, z.core.$strip>;
|
|
@@ -70,6 +71,7 @@ export declare const commitOperationSchema: z.ZodObject<{
|
|
|
70
71
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
72
|
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
72
73
|
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
claimId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
75
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
76
|
bypass: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
75
77
|
}, z.core.$strip>;
|
|
@@ -98,15 +100,16 @@ export declare const commitPayloadSchema: z.ZodObject<{
|
|
|
98
100
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
101
|
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
100
102
|
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
claimId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
104
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
102
105
|
bypass: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
103
106
|
}, z.core.$strip>>;
|
|
104
107
|
clientTxId: z.ZodString;
|
|
105
108
|
reads: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
106
|
-
model: z.ZodString;
|
|
107
109
|
id: z.ZodString;
|
|
108
|
-
readAt: z.ZodNumber;
|
|
109
110
|
fields: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
111
|
+
model: z.ZodString;
|
|
112
|
+
readAt: z.ZodNumber;
|
|
110
113
|
onStale: z.ZodOptional<z.ZodEnum<{
|
|
111
114
|
reject: "reject";
|
|
112
115
|
overwrite: "overwrite";
|
|
@@ -160,15 +163,16 @@ export declare const commitMessageSchema: z.ZodObject<{
|
|
|
160
163
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
164
|
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
162
165
|
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
claimId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
167
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
164
168
|
bypass: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
165
169
|
}, z.core.$strip>>;
|
|
166
170
|
clientTxId: z.ZodString;
|
|
167
171
|
reads: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
168
|
-
model: z.ZodString;
|
|
169
172
|
id: z.ZodString;
|
|
170
|
-
readAt: z.ZodNumber;
|
|
171
173
|
fields: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
174
|
+
model: z.ZodString;
|
|
175
|
+
readAt: z.ZodNumber;
|
|
172
176
|
onStale: z.ZodOptional<z.ZodEnum<{
|
|
173
177
|
reject: "reject";
|
|
174
178
|
overwrite: "overwrite";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../src/wire/frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../src/wire/frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAI7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;iBAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAClD,mFAAmF;AACnF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAA4B,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ9B,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,CAAC"}
|
package/dist/wire/frames.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
// The runtime schema primitives are imported straight from the coordination
|
|
15
15
|
// schema module to keep this file's runtime dependencies limited to Zod.
|
|
16
|
-
import { commitOperationSchema as coordinationCommitOperationSchema,
|
|
16
|
+
import { commitOperationSchema as coordinationCommitOperationSchema, MAX_READ_SET_ENTRIES, readDependencyListSchema, readSetProjectionEntryCount, trackDependencyListSchema, } from '../coordination/schema.js';
|
|
17
17
|
// ── Client → Server ────────────────────────────────────────────────────────
|
|
18
18
|
/**
|
|
19
19
|
* A single operation within a commit batch and its authoritative runtime
|
|
@@ -40,8 +40,11 @@ export const commitOperationSchema = wireCommitOperationSchema;
|
|
|
40
40
|
export const commitPayloadSchema = z.object({
|
|
41
41
|
operations: z.array(wireCommitOperationSchema),
|
|
42
42
|
clientTxId: z.string(),
|
|
43
|
-
reads:
|
|
44
|
-
track:
|
|
43
|
+
reads: readDependencyListSchema.nullish(),
|
|
44
|
+
track: trackDependencyListSchema.nullish(),
|
|
45
|
+
}).refine((value) => readSetProjectionEntryCount(value) <= MAX_READ_SET_ENTRIES, {
|
|
46
|
+
path: ['reads'],
|
|
47
|
+
message: `reads and track may contain at most ${MAX_READ_SET_ENTRIES} entries combined`,
|
|
45
48
|
});
|
|
46
49
|
/** A client-to-server frame that asks the server to commit a batch atomically. */
|
|
47
50
|
export const commitMessageSchema = z.object({
|
package/dist/wire/frames.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frames.js","sourceRoot":"","sources":["../../src/wire/frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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AC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,OAAO,EAAE,mBAAmB;CAC7B,CAAC,CAAC"}
|
|
@@ -107,14 +107,33 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
107
107
|
readonly where: "handleMutationResult — it lifts the frame's notifications and missingIds alongside the payload before this can parse";
|
|
108
108
|
readonly checkedBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
109
|
status: z.ZodLiteral<"queued">;
|
|
110
|
+
statusAt: z.ZodISODateTime;
|
|
111
|
+
lastSyncId: z.ZodLiteral<0>;
|
|
110
112
|
correlationId: z.ZodString;
|
|
111
113
|
object: z.ZodLiteral<"commit_receipt">;
|
|
112
114
|
id: z.ZodOptional<z.ZodString>;
|
|
113
115
|
clientTxId: z.ZodString;
|
|
114
116
|
serverTxId: z.ZodString;
|
|
117
|
+
createdAt: z.ZodISODateTime;
|
|
115
118
|
success: z.ZodLiteral<true>;
|
|
116
|
-
lastSyncId: z.ZodNumber;
|
|
117
119
|
ops: z.ZodNumber;
|
|
120
|
+
authority: z.ZodObject<{
|
|
121
|
+
organizationId: z.ZodString;
|
|
122
|
+
projectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
branchId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
syncGroups: z.ZodArray<z.ZodString>;
|
|
125
|
+
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.update` | `${string}.read` | `${string}.create` | `${string}.delete`>>;
|
|
126
|
+
participantKind: z.ZodEnum<{
|
|
127
|
+
user: "user";
|
|
128
|
+
agent: "agent";
|
|
129
|
+
system: "system";
|
|
130
|
+
}>;
|
|
131
|
+
participantId: z.ZodString;
|
|
132
|
+
deliveryPartition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
133
|
+
index: z.ZodNumber;
|
|
134
|
+
count: z.ZodNumber;
|
|
135
|
+
}, z.core.$strip>>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
118
137
|
notifications: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
138
|
object: z.ZodLiteral<"stale_notification">;
|
|
120
139
|
target: z.ZodReadonly<z.ZodObject<{
|
|
@@ -178,16 +197,35 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
178
197
|
}, z.core.$strip>>;
|
|
179
198
|
}, z.core.$strip>], "scope">>>;
|
|
180
199
|
missingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
-
}, z.core.$
|
|
200
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
182
201
|
status: z.ZodLiteral<"confirmed">;
|
|
202
|
+
statusAt: z.ZodISODateTime;
|
|
203
|
+
lastSyncId: z.ZodNumber;
|
|
183
204
|
correlationId: z.ZodOptional<z.ZodString>;
|
|
184
205
|
object: z.ZodLiteral<"commit_receipt">;
|
|
185
206
|
id: z.ZodOptional<z.ZodString>;
|
|
186
207
|
clientTxId: z.ZodString;
|
|
187
208
|
serverTxId: z.ZodString;
|
|
209
|
+
createdAt: z.ZodISODateTime;
|
|
188
210
|
success: z.ZodLiteral<true>;
|
|
189
|
-
lastSyncId: z.ZodNumber;
|
|
190
211
|
ops: z.ZodNumber;
|
|
212
|
+
authority: z.ZodObject<{
|
|
213
|
+
organizationId: z.ZodString;
|
|
214
|
+
projectId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
branchId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
216
|
+
syncGroups: z.ZodArray<z.ZodString>;
|
|
217
|
+
operations: z.ZodArray<z.ZodTemplateLiteral<`${string}.update` | `${string}.read` | `${string}.create` | `${string}.delete`>>;
|
|
218
|
+
participantKind: z.ZodEnum<{
|
|
219
|
+
user: "user";
|
|
220
|
+
agent: "agent";
|
|
221
|
+
system: "system";
|
|
222
|
+
}>;
|
|
223
|
+
participantId: z.ZodString;
|
|
224
|
+
deliveryPartition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
225
|
+
index: z.ZodNumber;
|
|
226
|
+
count: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
}, z.core.$strip>;
|
|
191
229
|
notifications: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
192
230
|
object: z.ZodLiteral<"stale_notification">;
|
|
193
231
|
target: z.ZodReadonly<z.ZodObject<{
|
|
@@ -251,7 +289,7 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
251
289
|
}, z.core.$strip>>;
|
|
252
290
|
}, z.core.$strip>], "scope">>>;
|
|
253
291
|
missingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
|
-
}, z.core.$
|
|
292
|
+
}, z.core.$strict>], "status">;
|
|
255
293
|
};
|
|
256
294
|
readonly claim_ack: {
|
|
257
295
|
readonly validation: "handler";
|
|
@@ -266,6 +304,8 @@ export declare const WS_INBOUND_FRAMES: {
|
|
|
266
304
|
error: z.ZodOptional<z.ZodObject<{
|
|
267
305
|
code: z.ZodString;
|
|
268
306
|
message: z.ZodString;
|
|
307
|
+
request_id: z.ZodOptional<z.ZodString>;
|
|
308
|
+
event_id: z.ZodOptional<z.ZodString>;
|
|
269
309
|
}, z.core.$strip>>;
|
|
270
310
|
}, z.core.$strip>;
|
|
271
311
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inboundFrames.d.ts","sourceRoot":"","sources":["../../src/wire/inboundFrames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;kCAKZ,CAAC;AACzB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,0CAA0C;AAC1C,MAAM,MAAM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AAE,gBAAgB,GACrB,IAAI,IAAI,wBAAwB,CAElC"}
|
package/dist/wire/index.d.ts
CHANGED
|
@@ -31,8 +31,10 @@ export { commitOperationSchema, wireCommitOperationSchema, commitPayloadSchema,
|
|
|
31
31
|
export { PROTOCOL_VERSION, MIN_SUPPORTED_PROTOCOL_VERSION, DEFAULT_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, WS_CLOSE_PROTOCOL_VERSION, PROTOCOL_VERSION_HEADER, protocolVersionProblem, resolveProtocolVersion, } from './protocolVersion.js';
|
|
32
32
|
export type { SupportedProtocolVersion, ProtocolVersionProblem, } from './protocolVersion.js';
|
|
33
33
|
export type { CommitOperation, WireCommitOperation, CommitMessage, MutationResultMessage, } from './frames.js';
|
|
34
|
-
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitStatusSchema, commitWaitSchema,
|
|
35
|
-
export type { CommitOperationBody, CommitRequest, CorrelationId, CommitStatus,
|
|
34
|
+
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitTimestampSchema, queuedStatusSchema, confirmedStatusSchema, rejectedStatusSchema, queuedCommitStatusSchema, confirmedCommitStatusSchema, rejectedCommitStatusSchema, commitStatusSchema, commitWaitSchema, commitReceiptSchema, rejectedCommitReceiptSchema, mutationResultPayloadSchema, mutationResultMessageSchema, commitAckSchema, mutationCommitResultSchema, commitOperationControlShape, commitOperationBodySchema, commitActorSchema, commitAttemptSchema, commitClaimReferenceSchema, commitRecordOperationSchema, commitReceiptEvidenceSchema, commitRequestSchema, commitRecordSchema, commitRecordWhereSchema, commitRecordListOptionsSchema, commitRecordListSchema, } from './commit.js';
|
|
35
|
+
export type { CommitOperationBody, CommitActor, CommitAttempt, CommitClaimReference, CommitRecordOperation, CommitReceiptEvidence, CommitRequest, CommitRecord, CommitRecordWhere, CommitRecordListOptions, CommitRecordList, CorrelationId, CommitStatus, CommitStatusValue, CommitWait, CommitReceiptWire, RejectedCommitReceiptWire, MutationResultPayload, MutationResultMessageWire, CommitAck, MutationCommitResultInput, MutationCommitResult, } from './commit.js';
|
|
36
|
+
export { effectiveAuthoritySchema, } from '../auth/capability.js';
|
|
37
|
+
export type { EffectiveAuthority } from '../auth/capability.js';
|
|
36
38
|
export { participantKindSchema, confirmationStateSchema, syncDeltaActionSchema, wireDeltaDataSchema, participantRefSchema, syncDeltaWireCoreSchema, clientSyncDeltaSchema, serverSyncDeltaSchema, deltaSchema, } from './delta.js';
|
|
37
39
|
export type { ParticipantKind, ConfirmationState, SyncDeltaAction, WireDeltaData, ParticipantRef, SyncDeltaWireCore, ClientSyncDelta, ServerSyncDelta, Delta, } from './delta.js';
|
|
38
40
|
export { AbloError, AbloAuthenticationError, AbloPermissionError, AbloValidationError, AbloRateLimitError, AbloIdempotencyError, AbloConnectionError, AbloNotFoundError, AbloServerError, AbloStaleContextError, AbloContentionError, AbloClaimedError, CapabilityError, AbloSessionError, SyncSessionError, docUrlForCode, translateHttpError, errorFromWire, toAbloError, ERROR_CONTRACT_VERSION, errorCodeSpec, } from '../errors.js';
|
|
@@ -40,8 +42,8 @@ export type { ErrorCode, WireErrorCode, RequiredCapability } from '../errors.js'
|
|
|
40
42
|
export { PING_INTERVAL_MS, LEASE_TTL_MS, WS_BEARER_SUBPROTOCOL_PREFIX, WS_SYNC_SUBPROTOCOL, } from './protocol.js';
|
|
41
43
|
export { DEFAULT_CLAIM_TTL_MS, claimTtlSchema, claimTtlMs, claimTargetSchema, claimRequestSchema, claimHeartbeatRequestSchema, listQuerySchema, claimListQuerySchema, claimStateSchema, claimAcquiredResponseSchema, claimQueuedResponseSchema, claimAcquireResponseSchema, claimHeartbeatReplySchema, claimHeartbeatBatchReplySchema, claimListResponseSchema, claimReorderRequestSchema, claimReorderReplySchema, claimReleaseReplySchema, } from './claims.js';
|
|
42
44
|
export type { ClaimTargetBody, ClaimRequest, ClaimHeartbeatRequest, ListQuery, ClaimListQuery, ClaimState, ClaimAcquiredResponse, ClaimQueuedResponse, ClaimAcquireResponse, ClaimHeartbeatReply, ClaimHeartbeatBatchReply, ClaimListResponse, ClaimReorderRequest, ClaimReorderReply, ClaimReleaseReply, } from './claims.js';
|
|
43
|
-
export { modelReadResponseSchema, modelListResponseSchema, } from './modelResponses.js';
|
|
44
|
-
export type { ModelReadResponse, ModelListResponse } from './modelResponses.js';
|
|
45
|
+
export { modelReadResponseSchema, modelListResponseSchema, modelListEvidenceSchema, } from './modelResponses.js';
|
|
46
|
+
export type { ModelReadResponse, ModelListResponse, ModelListEvidence, } from './modelResponses.js';
|
|
45
47
|
export { fieldTypeSchema, fieldMetaSchema, relationTypeSchema, relationMetaSchema, } from './modelShape.js';
|
|
46
48
|
export type { FieldType, FieldMeta, RelationType, RelationMeta, } from './modelShape.js';
|
|
47
49
|
export { modelMutationRequestSchema } from './modelMutations.js';
|
package/dist/wire/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wire/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,E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4B,EAC5B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EAClC,gCAAgC,EAChC,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
|
package/dist/wire/index.js
CHANGED
|
@@ -32,13 +32,14 @@ export { commitOperationSchema, wireCommitOperationSchema, commitPayloadSchema,
|
|
|
32
32
|
// confirm they can speak to each other, plus the WebSocket close code used to
|
|
33
33
|
// reject a mismatch. See protocolVersion.ts for the changelog and deploy rules.
|
|
34
34
|
export { PROTOCOL_VERSION, MIN_SUPPORTED_PROTOCOL_VERSION, DEFAULT_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, WS_CLOSE_PROTOCOL_VERSION, PROTOCOL_VERSION_HEADER, protocolVersionProblem, resolveProtocolVersion, } from './protocolVersion.js';
|
|
35
|
-
// Commit
|
|
35
|
+
// Commit lifecycle backbone. The transport receipt, server execution cache,
|
|
36
36
|
// and normalized client acknowledgement are different envelopes composed from
|
|
37
|
-
// this one discriminated
|
|
38
|
-
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitStatusSchema, commitWaitSchema,
|
|
37
|
+
// this one discriminated status vocabulary.
|
|
38
|
+
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitTimestampSchema, queuedStatusSchema, confirmedStatusSchema, rejectedStatusSchema, queuedCommitStatusSchema, confirmedCommitStatusSchema, rejectedCommitStatusSchema, commitStatusSchema, commitWaitSchema, commitReceiptSchema, rejectedCommitReceiptSchema, mutationResultPayloadSchema, mutationResultMessageSchema, commitAckSchema, mutationCommitResultSchema,
|
|
39
39
|
// The request side of the same boundary — one definition, which the published
|
|
40
40
|
// OpenAPI reference derives from rather than describing separately.
|
|
41
|
-
commitOperationControlShape, commitOperationBodySchema, commitRequestSchema, } from './commit.js';
|
|
41
|
+
commitOperationControlShape, commitOperationBodySchema, commitActorSchema, commitAttemptSchema, commitClaimReferenceSchema, commitRecordOperationSchema, commitReceiptEvidenceSchema, commitRequestSchema, commitRecordSchema, commitRecordWhereSchema, commitRecordListOptionsSchema, commitRecordListSchema, } from './commit.js';
|
|
42
|
+
export { effectiveAuthoritySchema, } from '../auth/capability.js';
|
|
42
43
|
// The read-path delta contract: the shape the server broadcasts to clients as the
|
|
43
44
|
// payload of a `delta` or `sync_response` frame, together with the shared
|
|
44
45
|
// participant vocabulary it carries. Both ends derive their delta type from these
|
|
@@ -66,7 +67,7 @@ export {
|
|
|
66
67
|
DEFAULT_CLAIM_TTL_MS, claimTtlSchema, claimTtlMs, claimTargetSchema, claimRequestSchema, claimHeartbeatRequestSchema, listQuerySchema, claimListQuerySchema, claimStateSchema, claimAcquiredResponseSchema, claimQueuedResponseSchema, claimAcquireResponseSchema, claimHeartbeatReplySchema, claimHeartbeatBatchReplySchema, claimListResponseSchema, claimReorderRequestSchema, claimReorderReplySchema, claimReleaseReplySchema, } from './claims.js';
|
|
67
68
|
// The model read routes' responses — the envelope around a row, which is
|
|
68
69
|
// protocol, around `data`, which is the caller's schema.
|
|
69
|
-
export { modelReadResponseSchema, modelListResponseSchema, } from './modelResponses.js';
|
|
70
|
+
export { modelReadResponseSchema, modelListResponseSchema, modelListEvidenceSchema, } from './modelResponses.js';
|
|
70
71
|
// What a model is made of — the artifact's own field and relation shapes, which
|
|
71
72
|
// the schema read reports and every other layer derives its types from.
|
|
72
73
|
export { fieldTypeSchema, fieldMetaSchema, relationTypeSchema, relationMetaSchema, } from './modelShape.js';
|
package/dist/wire/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wire/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGrE,8EAA8E;AAC9E,8BAA8B;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,iBAA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,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAqB/B,2EAA2E;AAC3E,wEAAwE;AACxE,sBAAsB;AACtB,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EAClC,gCAAgC,EAChC,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAclC,4EAA4E;AAC5E,8BAA8B;AAC9B,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAS5B,+EAA+E;AAC/E,qDAAqD;AACrD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,WAAW,CAAC"}
|
|
@@ -25,6 +25,41 @@ export declare const modelMutationRequestSchema: z.ZodObject<{
|
|
|
25
25
|
notify: "notify";
|
|
26
26
|
}>>>;
|
|
27
27
|
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
reads: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
fields: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
31
|
+
model: z.ZodString;
|
|
32
|
+
readAt: z.ZodNumber;
|
|
33
|
+
onStale: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
reject: "reject";
|
|
35
|
+
overwrite: "overwrite";
|
|
36
|
+
notify: "notify";
|
|
37
|
+
}>>;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
group: z.ZodTemplateLiteral<`${string}:${string}`>;
|
|
40
|
+
readAt: z.ZodNumber;
|
|
41
|
+
onStale: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
reject: "reject";
|
|
43
|
+
overwrite: "overwrite";
|
|
44
|
+
notify: "notify";
|
|
45
|
+
}>>;
|
|
46
|
+
}, z.core.$strip>]>>>>;
|
|
47
|
+
track: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
model: z.ZodString;
|
|
50
|
+
readAt: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
onStale: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
reject: "reject";
|
|
53
|
+
notify: "notify";
|
|
54
|
+
}>>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
group: z.ZodTemplateLiteral<`${string}:${string}`>;
|
|
57
|
+
readAt: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
onStale: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
reject: "reject";
|
|
60
|
+
notify: "notify";
|
|
61
|
+
}>>;
|
|
62
|
+
}, z.core.$strip>]>>>>;
|
|
28
63
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
29
64
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
30
65
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelMutations.d.ts","sourceRoot":"","sources":["../../src/wire/modelMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"modelMutations.d.ts","sourceRoot":"","sources":["../../src/wire/modelMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* the server validates against this and the reference is generated from it.
|
|
16
16
|
*/
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import { onStaleModeSchema } from '../coordination/schema.js';
|
|
18
|
+
import { onStaleModeSchema, MAX_READ_SET_ENTRIES, readDependencyListSchema, readSetProjectionEntryCount, readSetWatermarkSchema, trackDependencyListSchema, } from '../coordination/schema.js';
|
|
19
19
|
export const modelMutationRequestSchema = z.object({
|
|
20
20
|
/** The record. Its shape is your schema's; everything around it is protocol. */
|
|
21
21
|
data: z.record(z.string(), z.unknown()).nullish(),
|
|
@@ -41,7 +41,11 @@ export const modelMutationRequestSchema = z.object({
|
|
|
41
41
|
* the read. Ablo rejects the write if the row moved in between, which is
|
|
42
42
|
* what makes read → decide → write safe without a lock across the deciding.
|
|
43
43
|
*/
|
|
44
|
-
readAt:
|
|
44
|
+
readAt: readSetWatermarkSchema.nullish(),
|
|
45
|
+
/** Commit-lifetime dependencies checked with the single model operation. */
|
|
46
|
+
reads: readDependencyListSchema.nullish(),
|
|
47
|
+
/** Durable dependencies registered with the single model operation. */
|
|
48
|
+
track: trackDependencyListSchema.nullish(),
|
|
45
49
|
/**
|
|
46
50
|
* The fencing token from the claim's grant. Closes the window `readAt` alone
|
|
47
51
|
* cannot: a lease that lapsed and whose successor came and went.
|
|
@@ -49,5 +53,8 @@ export const modelMutationRequestSchema = z.object({
|
|
|
49
53
|
fenceToken: z.number().nullish(),
|
|
50
54
|
/** @compat HTTP idempotency belongs in the `Idempotency-Key` header. */
|
|
51
55
|
idempotencyKey: z.string().optional(),
|
|
56
|
+
}).refine((value) => readSetProjectionEntryCount(value) <= MAX_READ_SET_ENTRIES, {
|
|
57
|
+
path: ['reads'],
|
|
58
|
+
message: `reads and track may contain at most ${MAX_READ_SET_ENTRIES} entries combined`,
|
|
52
59
|
});
|
|
53
60
|
//# sourceMappingURL=modelMutations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelMutations.js","sourceRoot":"","sources":["../../src/wire/modelMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"modelMutations.js","sourceRoot":"","sources":["../../src/wire/modelMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,gFAAgF;IAChF,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACjD;;;;;;;;;;;OAWG;IACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACxB,gEAAgE;IAChE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC3B,2EAA2E;IAC3E,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAAE;IACpC;;;;OAIG;IACH,MAAM,EAAE,sBAAsB,CAAC,OAAO,EAAE;IACxC,4EAA4E;IAC5E,KAAK,EAAE,wBAAwB,CAAC,OAAO,EAAE;IACzC,uEAAuE;IACvE,KAAK,EAAE,yBAAyB,CAAC,OAAO,EAAE;IAC1C;;;OAGG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAChC,wEAAwE;IACxE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,IAAI,oBAAoB,EAAE;IAC/E,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,OAAO,EAAE,uCAAuC,oBAAoB,mBAAmB;CACxF,CAAC,CAAC"}
|
|
@@ -9,13 +9,20 @@
|
|
|
9
9
|
* pagination — is protocol, and protocol is validated here.
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
|
+
/** Evidence for one row returned by a collection snapshot. */
|
|
13
|
+
export declare const modelListEvidenceSchema: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
stamp: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type ModelListEvidence = z.infer<typeof modelListEvidenceSchema>;
|
|
12
18
|
/**
|
|
13
19
|
* `GET /v1/models/{model}/{id}`.
|
|
14
20
|
*
|
|
15
21
|
* `stamp` is the row's watermark: the log position the read reflects. A write
|
|
16
22
|
* that guards on this premise (`readAt`) is rejected if the row moved on in
|
|
17
23
|
* between, which is what makes a read→decide→write sequence safe without a
|
|
18
|
-
* lock. A missing row
|
|
24
|
+
* lock. A missing row carries `data: null` so its absence watermark survives
|
|
25
|
+
* the transport boundary.
|
|
19
26
|
*/
|
|
20
27
|
export declare const modelReadResponseSchema: z.ZodObject<{
|
|
21
28
|
object: z.ZodLiteral<"model">;
|
|
@@ -74,6 +81,10 @@ export declare const modelListResponseSchema: z.ZodObject<{
|
|
|
74
81
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
75
82
|
model: z.ZodString;
|
|
76
83
|
stamp: z.ZodNumber;
|
|
84
|
+
evidence: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
stamp: z.ZodNumber;
|
|
87
|
+
}, z.core.$strip>>>>;
|
|
77
88
|
}, z.core.$strip>;
|
|
78
89
|
export type ModelListResponse = z.infer<typeof modelListResponseSchema>;
|
|
79
90
|
//# sourceMappingURL=modelResponses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelResponses.d.ts","sourceRoot":"","sources":["../../src/wire/modelResponses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB
|
|
1
|
+
{"version":3,"file":"modelResponses.d.ts","sourceRoot":"","sources":["../../src/wire/modelResponses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAQlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -11,13 +11,19 @@
|
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import { modelClaimSchema } from '../coordination/schema.js';
|
|
13
13
|
import { listEnvelopeSchema } from './listEnvelope.js';
|
|
14
|
+
/** Evidence for one row returned by a collection snapshot. */
|
|
15
|
+
export const modelListEvidenceSchema = z.object({
|
|
16
|
+
id: z.string().min(1),
|
|
17
|
+
stamp: z.number().int().nonnegative(),
|
|
18
|
+
});
|
|
14
19
|
/**
|
|
15
20
|
* `GET /v1/models/{model}/{id}`.
|
|
16
21
|
*
|
|
17
22
|
* `stamp` is the row's watermark: the log position the read reflects. A write
|
|
18
23
|
* that guards on this premise (`readAt`) is rejected if the row moved on in
|
|
19
24
|
* between, which is what makes a read→decide→write sequence safe without a
|
|
20
|
-
* lock. A missing row
|
|
25
|
+
* lock. A missing row carries `data: null` so its absence watermark survives
|
|
26
|
+
* the transport boundary.
|
|
21
27
|
*/
|
|
22
28
|
export const modelReadResponseSchema = z.object({
|
|
23
29
|
object: z.literal('model'),
|
|
@@ -40,5 +46,10 @@ export const modelReadResponseSchema = z.object({
|
|
|
40
46
|
export const modelListResponseSchema = listEnvelopeSchema(z.unknown()).extend({
|
|
41
47
|
model: z.string(),
|
|
42
48
|
stamp: z.number(),
|
|
49
|
+
/**
|
|
50
|
+
* Per-row watermarks captured no later than the collection snapshot. Optional
|
|
51
|
+
* only so a newer client can diagnose an older server explicitly.
|
|
52
|
+
*/
|
|
53
|
+
evidence: z.array(modelListEvidenceSchema).readonly().optional(),
|
|
43
54
|
});
|
|
44
55
|
//# sourceMappingURL=modelResponses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelResponses.js","sourceRoot":"","sources":["../../src/wire/modelResponses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"modelResponses.js","sourceRoot":"","sources":["../../src/wire/modelResponses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACtC,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,8EAA8E;IAC9E,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;IAC5E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abloatai/transaction",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The headless Ablo transaction client and canonical contracts for reads, commits,
|
|
3
|
+
"version": "0.49.0",
|
|
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",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"import": "./dist/errorCodes.js",
|
|
18
18
|
"default": "./dist/errorCodes.js"
|
|
19
19
|
},
|
|
20
|
+
"./errorObservation": {
|
|
21
|
+
"types": "./dist/errorObservation.d.ts",
|
|
22
|
+
"import": "./dist/errorObservation.js",
|
|
23
|
+
"default": "./dist/errorObservation.js"
|
|
24
|
+
},
|
|
20
25
|
"./pricing": {
|
|
21
26
|
"types": "./dist/pricing.d.ts",
|
|
22
27
|
"import": "./dist/pricing.js",
|
|
@@ -27,6 +32,11 @@
|
|
|
27
32
|
"import": "./dist/environment.js",
|
|
28
33
|
"default": "./dist/environment.js"
|
|
29
34
|
},
|
|
35
|
+
"./internal/read-set": {
|
|
36
|
+
"types": "./dist/internal/read-set.d.ts",
|
|
37
|
+
"import": "./dist/internal/read-set.js",
|
|
38
|
+
"default": "./dist/internal/read-set.js"
|
|
39
|
+
},
|
|
30
40
|
"./branches": {
|
|
31
41
|
"types": "./dist/branches.d.ts",
|
|
32
42
|
"import": "./dist/branches.js",
|
package/src/ai-sdk/modelTools.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The AI SDK owns the agent loop. These helpers only expose Ablo's
|
|
5
5
|
* authoritative model operations as tools, preserving the same credential,
|
|
6
|
-
* validation, idempotency, claims, and
|
|
6
|
+
* validation, idempotency, claims, and confirmation behavior as direct SDK use.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { tool, type ToolExecutionOptions } from 'ai';
|
package/src/ai-sdk/updateTool.ts
CHANGED
|
@@ -64,7 +64,7 @@ import type {
|
|
|
64
64
|
ClaimParams,
|
|
65
65
|
ModelUpdateParams,
|
|
66
66
|
} from '../resources/modelOperations.js';
|
|
67
|
-
import type { ModelUpdater,
|
|
67
|
+
import type { ModelUpdater, FunctionalUpdateOptions } from '../resources/functionalUpdate.js';
|
|
68
68
|
import type { HeldClaim } from '../types/streams.js';
|
|
69
69
|
import type { ModelToolOptions } from './toolOptions.js';
|
|
70
70
|
|
|
@@ -118,7 +118,7 @@ export interface UpdateToolModel<T> {
|
|
|
118
118
|
update(
|
|
119
119
|
id: string,
|
|
120
120
|
updater: ModelUpdater<T>,
|
|
121
|
-
options?:
|
|
121
|
+
options?: FunctionalUpdateOptions,
|
|
122
122
|
): Promise<T | undefined>;
|
|
123
123
|
claim(
|
|
124
124
|
params: ClaimSkipParams<T>,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the account scope and the sync groups everything downstream should read under.
|
|
4
4
|
*
|
|
5
5
|
* The core defines the port; the consumer supplies the implementation. That
|
|
6
|
-
* keeps identity resolution — which is
|
|
6
|
+
* keeps identity resolution — which is confirmation's business — from depending on
|
|
7
7
|
* whatever happens to materialise rows on the other side of it (ADR 0016). The
|
|
8
8
|
* reactive engine's `BootstrapFetcher` satisfies this structurally.
|
|
9
9
|
*/
|
package/src/auth/capability.ts
CHANGED
|
@@ -238,12 +238,11 @@ export function grantedOperations(
|
|
|
238
238
|
* and the gates read it — so a session's reported scope and its enforced scope
|
|
239
239
|
* are the same shape by construction.
|
|
240
240
|
*/
|
|
241
|
-
export const
|
|
241
|
+
export const effectiveAuthoritySchema = z.object({
|
|
242
242
|
organizationId: z.string().min(1),
|
|
243
243
|
/** Credential target. Branch id is authoritative; null supports self-hosted identities. */
|
|
244
244
|
projectId: z.string().min(1).nullable().default(null),
|
|
245
245
|
branchId: z.string().min(1).nullable().default(null),
|
|
246
|
-
branchRoot: z.boolean().default(false),
|
|
247
246
|
/**
|
|
248
247
|
* The ROW axis — which sync groups this credential may act within. Read back
|
|
249
248
|
* as plain strings rather than the branded form the request enforces: this is
|
|
@@ -256,7 +255,15 @@ export const capabilityScopeSchema = z.object({
|
|
|
256
255
|
participantId: z.string().min(1),
|
|
257
256
|
deliveryPartition: deliveryPartitionRouteSchema.nullable().default(null),
|
|
258
257
|
});
|
|
259
|
-
export type
|
|
258
|
+
export type EffectiveAuthority = z.infer<typeof effectiveAuthoritySchema>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated Use {@link effectiveAuthoritySchema}. Kept through 0.48.x as
|
|
262
|
+
* the source-compatible name for the same canonical contract.
|
|
263
|
+
*/
|
|
264
|
+
export const capabilityScopeSchema = effectiveAuthoritySchema;
|
|
265
|
+
/** @deprecated Use {@link EffectiveAuthority}. */
|
|
266
|
+
export type CapabilityScope = EffectiveAuthority;
|
|
260
267
|
|
|
261
268
|
/**
|
|
262
269
|
* What `POST /v1/capabilities` answers with — **201**, the credential is minted.
|
|
@@ -279,7 +286,9 @@ export const capabilityMintResponseSchema = z.object({
|
|
|
279
286
|
token: authTokenSchema,
|
|
280
287
|
expiresAt: z.iso.datetime(),
|
|
281
288
|
organizationId: z.string().min(1),
|
|
282
|
-
|
|
289
|
+
/** Plane metadata used by startup; not part of effective authority. */
|
|
290
|
+
branchRoot: z.boolean().default(false),
|
|
291
|
+
scope: effectiveAuthoritySchema,
|
|
283
292
|
userMeta: z.record(z.string(), z.unknown()),
|
|
284
293
|
});
|
|
285
294
|
export type CapabilityMintResponse = z.infer<typeof capabilityMintResponseSchema>;
|