@abloatai/transaction 0.51.0 → 0.52.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/dist/ablo.d.ts +1 -1
- package/dist/ablo.js +1 -1
- package/dist/ai-sdk/updateTool.d.ts +1 -1
- package/dist/ai-sdk/updateTool.js +1 -1
- package/dist/auth/capability.d.ts +2 -2
- package/dist/auth/capability.js +1 -1
- package/dist/auth/index.d.ts +6 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +25 -20
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/schemas.d.ts +24 -1
- package/dist/auth/schemas.d.ts.map +1 -1
- package/dist/auth/schemas.js +8 -2
- package/dist/auth/schemas.js.map +1 -1
- package/dist/auth/sessionIssuanceProtocol.d.ts +41 -0
- package/dist/auth/sessionIssuanceProtocol.d.ts.map +1 -0
- package/dist/auth/sessionIssuanceProtocol.js +48 -0
- package/dist/auth/sessionIssuanceProtocol.js.map +1 -0
- package/dist/auth/sessionMint.js +2 -2
- package/dist/branches.d.ts +4 -4
- package/dist/coordination/schema.d.ts +3 -2
- package/dist/coordination/schema.d.ts.map +1 -1
- package/dist/coordination/schema.js +7 -2
- package/dist/coordination/schema.js.map +1 -1
- package/dist/errorCodes.d.ts +3 -2
- package/dist/errorCodes.d.ts.map +1 -1
- package/dist/errorCodes.js +4 -3
- package/dist/errorCodes.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/resources/httpResources.d.ts +3 -2
- package/dist/resources/httpResources.d.ts.map +1 -1
- package/dist/resources/modelOperations.d.ts +6 -6
- package/dist/schema/ddl.d.ts.map +1 -1
- package/dist/schema/ddl.js +9 -12
- package/dist/schema/ddl.js.map +1 -1
- package/dist/schema/field.d.ts +3 -3
- package/dist/schema/field.js +2 -2
- package/dist/schema/fieldRef.d.ts +1 -1
- package/dist/schema/generate.d.ts +2 -3
- package/dist/schema/generate.d.ts.map +1 -1
- package/dist/schema/generate.js +2 -8
- package/dist/schema/generate.js.map +1 -1
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.js +3 -3
- package/dist/schema/model.d.ts +7 -7
- package/dist/schema/model.js +2 -2
- package/dist/schema/openapi.d.ts.map +1 -1
- package/dist/schema/openapi.js +4 -7
- package/dist/schema/openapi.js.map +1 -1
- package/dist/schema/queries.d.ts +1 -1
- package/dist/schema/queries.js +1 -1
- package/dist/schema/relation.d.ts +8 -8
- package/dist/schema/relation.js +5 -5
- package/dist/schema/schema.d.ts +24 -37
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +15 -28
- package/dist/schema/schema.js.map +1 -1
- package/dist/schema/sugar.d.ts +7 -7
- package/dist/schema/sugar.js +5 -5
- package/dist/server/commit.d.ts +5 -1
- package/dist/server/commit.d.ts.map +1 -1
- package/dist/source/adapters/drizzle.d.ts.map +1 -1
- package/dist/source/adapters/drizzle.js +5 -0
- package/dist/source/adapters/drizzle.js.map +1 -1
- package/dist/source/adapters/kysely.d.ts.map +1 -1
- package/dist/source/adapters/kysely.js +33 -8
- package/dist/source/adapters/kysely.js.map +1 -1
- package/dist/source/adapters/kyselyMutationCore.d.ts +1 -1
- package/dist/source/adapters/kyselyMutationCore.d.ts.map +1 -1
- package/dist/source/adapters/kyselyMutationCore.js +58 -20
- package/dist/source/adapters/kyselyMutationCore.js.map +1 -1
- package/dist/source/adapters/memory.d.ts.map +1 -1
- package/dist/source/adapters/memory.js +5 -0
- package/dist/source/adapters/memory.js.map +1 -1
- package/dist/source/adapters/prisma.d.ts.map +1 -1
- package/dist/source/adapters/prisma.js +6 -1
- package/dist/source/adapters/prisma.js.map +1 -1
- package/dist/source/conformance.js +21 -21
- package/dist/source/contract.d.ts +17 -0
- package/dist/source/contract.d.ts.map +1 -1
- package/dist/source/contract.js +31 -0
- package/dist/source/contract.js.map +1 -1
- package/dist/source/index.d.ts +1 -1
- package/dist/source/index.d.ts.map +1 -1
- package/dist/source/index.js +1 -1
- package/dist/source/index.js.map +1 -1
- package/dist/source/types.d.ts +1 -0
- package/dist/source/types.d.ts.map +1 -1
- package/dist/source/types.js.map +1 -1
- package/dist/transactionLayer.d.ts +3 -3
- package/dist/transactionLayer.js +3 -3
- package/dist/transport/httpClient.d.ts +6 -2
- package/dist/transport/httpClient.d.ts.map +1 -1
- package/dist/transport/httpClient.js.map +1 -1
- package/dist/transport/httpTransport.d.ts +1 -0
- package/dist/transport/httpTransport.d.ts.map +1 -1
- package/dist/transport/httpTransport.js +50 -4
- package/dist/transport/httpTransport.js.map +1 -1
- package/dist/transport/wsFrameHandlers.d.ts.map +1 -1
- package/dist/transport/wsFrameHandlers.js +3 -0
- package/dist/transport/wsFrameHandlers.js.map +1 -1
- package/dist/types/streams.d.ts +2 -2
- package/dist/wire/accountResponses.js +2 -2
- package/dist/wire/accountResponses.js.map +1 -1
- package/dist/wire/commit.d.ts +144 -0
- package/dist/wire/commit.d.ts.map +1 -1
- package/dist/wire/commit.js +22 -1
- package/dist/wire/commit.js.map +1 -1
- package/dist/wire/frames.d.ts +4 -0
- package/dist/wire/frames.d.ts.map +1 -1
- package/dist/wire/inboundFrames.d.ts +22 -0
- package/dist/wire/inboundFrames.d.ts.map +1 -1
- package/dist/wire/index.d.ts +2 -2
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +1 -1
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/protocol.d.ts +1 -1
- package/dist/wire/protocol.js +1 -1
- package/package.json +1 -1
- package/src/ablo.ts +1 -1
- package/src/ai-sdk/updateTool.ts +1 -1
- package/src/auth/capability.ts +3 -3
- package/src/auth/index.ts +51 -20
- package/src/auth/schemas.ts +16 -2
- package/src/auth/sessionIssuanceProtocol.ts +57 -0
- package/src/auth/sessionMint.ts +2 -2
- package/src/coordination/schema.ts +7 -2
- package/src/errorCodes.ts +10 -4
- package/src/errors.ts +1 -1
- package/src/resources/httpResources.ts +3 -2
- package/src/resources/modelOperations.ts +6 -6
- package/src/schema/ddl.ts +9 -13
- package/src/schema/field.ts +3 -3
- package/src/schema/fieldRef.ts +1 -1
- package/src/schema/generate.ts +2 -8
- package/src/schema/index.ts +3 -3
- package/src/schema/model.ts +7 -7
- package/src/schema/openapi.ts +4 -7
- package/src/schema/queries.ts +1 -1
- package/src/schema/relation.ts +8 -8
- package/src/schema/residency.ts +0 -1
- package/src/schema/schema.ts +33 -58
- package/src/schema/sugar.ts +7 -7
- package/src/server/commit.ts +5 -1
- package/src/source/adapters/drizzle.ts +5 -0
- package/src/source/adapters/kysely.ts +48 -10
- package/src/source/adapters/kyselyMutationCore.ts +69 -22
- package/src/source/adapters/memory.ts +5 -0
- package/src/source/adapters/prisma.ts +6 -1
- package/src/source/conformance.ts +21 -21
- package/src/source/contract.ts +34 -0
- package/src/source/index.ts +2 -0
- package/src/source/types.ts +1 -0
- package/src/transactionLayer.ts +3 -3
- package/src/transport/httpClient.ts +6 -2
- package/src/transport/httpTransport.ts +59 -4
- package/src/transport/wsFrameHandlers.ts +3 -0
- package/src/types/global.ts +1 -1
- package/src/types/streams.ts +2 -2
- package/src/wire/accountResponses.ts +2 -2
- package/src/wire/commit.ts +31 -1
- package/src/wire/index.ts +3 -0
- package/src/wire/protocol.ts +1 -1
|
@@ -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,oBAAoB;AAC9B,wDAAwD;AACtD;IAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAAC,QA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ire/index.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ 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, 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';
|
|
34
|
+
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitTimestampSchema, queuedStatusSchema, confirmedStatusSchema, rejectedStatusSchema, queuedCommitStatusSchema, confirmedCommitStatusSchema, rejectedCommitStatusSchema, commitStatusSchema, commitWaitSchema, commitReceiptSchema, commitOperationOutcomeSchema, commitOperationResultSchema, rejectedCommitReceiptSchema, mutationResultPayloadSchema, mutationResultMessageSchema, commitAckSchema, mutationCommitResultSchema, commitOperationControlShape, commitOperationBodySchema, commitActorSchema, commitAttemptSchema, commitClaimReferenceSchema, commitRecordOperationSchema, commitReceiptEvidenceSchema, commitRequestSchema, commitRecordSchema, commitRecordWhereSchema, commitRecordListOptionsSchema, commitRecordListSchema, } from './commit.js';
|
|
35
|
+
export type { CommitOperationBody, CommitOperationResult, 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
36
|
export { effectiveAuthoritySchema, } from '../auth/capability.js';
|
|
37
37
|
export type { EffectiveAuthority } from '../auth/capability.js';
|
|
38
38
|
export { participantKindSchema, confirmationStateSchema, syncDeltaActionSchema, wireDeltaDataSchema, participantRefSchema, syncDeltaWireCoreSchema, clientSyncDeltaSchema, serverSyncDeltaSchema, deltaSchema, } from './delta.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,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AC5B,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
|
@@ -35,7 +35,7 @@ export { PROTOCOL_VERSION, MIN_SUPPORTED_PROTOCOL_VERSION, DEFAULT_PROTOCOL_VERS
|
|
|
35
35
|
// Commit lifecycle backbone. The transport receipt, server execution cache,
|
|
36
36
|
// and normalized client acknowledgement are different envelopes composed from
|
|
37
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,
|
|
38
|
+
export { COMMIT_CORRELATION_ID_MAX_LENGTH, correlationIdSchema, commitTimestampSchema, queuedStatusSchema, confirmedStatusSchema, rejectedStatusSchema, queuedCommitStatusSchema, confirmedCommitStatusSchema, rejectedCommitStatusSchema, commitStatusSchema, commitWaitSchema, commitReceiptSchema, commitOperationOutcomeSchema, commitOperationResultSchema, 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
41
|
commitOperationControlShape, commitOperationBodySchema, commitActorSchema, commitAttemptSchema, commitClaimReferenceSchema, commitRecordOperationSchema, commitReceiptEvidenceSchema, commitRequestSchema, commitRecordSchema, commitRecordWhereSchema, commitRecordListOptionsSchema, commitRecordListSchema, } from './commit.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,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,cAAc;AACd,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,2EAA2E;AAC3E,8EAA8E;AAC9E,gFAAgF;AAChF,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,G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BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,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"}
|
package/dist/wire/protocol.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* The lease is three ping intervals long and is renewed on every ping, so a
|
|
17
17
|
* live holder always has at least two intervals of runway and a silent one
|
|
18
18
|
* lapses about two missed pings after it stops renewing. The window measures
|
|
19
|
-
* liveness, not how long a
|
|
19
|
+
* liveness, not how long a item may run: widening the lease without also
|
|
20
20
|
* widening the ping makes holders flap, and neither value should be redefined
|
|
21
21
|
* anywhere else.
|
|
22
22
|
*/
|
package/dist/wire/protocol.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* The lease is three ping intervals long and is renewed on every ping, so a
|
|
17
17
|
* live holder always has at least two intervals of runway and a silent one
|
|
18
18
|
* lapses about two missed pings after it stops renewing. The window measures
|
|
19
|
-
* liveness, not how long a
|
|
19
|
+
* liveness, not how long a item may run: widening the lease without also
|
|
20
20
|
* widening the ping makes holders flap, and neither value should be redefined
|
|
21
21
|
* anywhere else.
|
|
22
22
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abloatai/transaction",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
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",
|
package/src/ablo.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import { schema } from './schema';
|
|
13
13
|
*
|
|
14
14
|
* const ablo = Ablo({ schema, apiKey: process.env.ABLO_API_KEY, transport: 'http' });
|
|
15
|
-
* await ablo.
|
|
15
|
+
* await ablo.items.update({ id: itemId, data: { status: 'done' } });
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* The reactive materialiser — local store, live queries, presence rendering —
|
package/src/ai-sdk/updateTool.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* import { updateTool } from '@abloatai/ablo/ai-sdk';
|
|
15
15
|
* import { z } from 'zod';
|
|
16
16
|
*
|
|
17
|
-
* const saveSection = updateTool(ablo.
|
|
17
|
+
* const saveSection = updateTool(ablo.records, {
|
|
18
18
|
* description: 'Save your section into the shared document.',
|
|
19
19
|
* inputSchema: z.object({ text: z.string() }),
|
|
20
20
|
* id: () => DOC_ID,
|
package/src/auth/capability.ts
CHANGED
|
@@ -76,8 +76,8 @@ export type NonEmptyCapabilityOperations = readonly [
|
|
|
76
76
|
/**
|
|
77
77
|
* `can`, narrowed to one schema's model names. A projection of
|
|
78
78
|
* {@link capabilityCanSchema} — the value type is the operation enum, the key
|
|
79
|
-
* domain is the schema's models, so `can: {
|
|
80
|
-
* compile against a schema with no `
|
|
79
|
+
* domain is the schema's models, so `can: { items: ['update'] }` fails to
|
|
80
|
+
* compile against a schema with no `items` model.
|
|
81
81
|
*/
|
|
82
82
|
export type CapabilityCan<S> = {
|
|
83
83
|
[K in keyof S & string]: Readonly<Record<K, NonEmptyCapabilityOperations>> &
|
|
@@ -320,7 +320,7 @@ export const capabilityRequestSchema = z.object({
|
|
|
320
320
|
* time, so it is rejected loudly at the boundary.
|
|
321
321
|
*/
|
|
322
322
|
syncGroups: z.array(syncGroupInputSchema).readonly().optional(),
|
|
323
|
-
/** The VERB axis, as `model.verb` — e.g. `
|
|
323
|
+
/** The VERB axis, as `model.verb` — e.g. `items.update`. */
|
|
324
324
|
operations: z.array(grantedOperationSchema).readonly().optional(),
|
|
325
325
|
ttlSeconds: z.number().int().positive(),
|
|
326
326
|
label: z.string().min(1).optional(),
|
package/src/auth/index.ts
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import {
|
|
13
13
|
type EphemeralKeyResponse,
|
|
14
14
|
type IdentityResolveResponse,
|
|
15
|
+
type SessionCredentialMetadata,
|
|
16
|
+
type SessionCredentialRevocationRequest,
|
|
15
17
|
parseCapabilityMintResponse,
|
|
16
18
|
parseEphemeralKeyResponse,
|
|
17
19
|
parseIdentityResolveResponse,
|
|
@@ -39,6 +41,26 @@ export type CapabilityExchangeResponse = CapabilityMintResponse;
|
|
|
39
41
|
export type {
|
|
40
42
|
EphemeralKeyResponse,
|
|
41
43
|
IdentityResolveResponse,
|
|
44
|
+
SessionCredentialMetadata,
|
|
45
|
+
SessionCredentialRevocationRequest,
|
|
46
|
+
} from './schemas.js';
|
|
47
|
+
export {
|
|
48
|
+
buildSessionIssuanceMacMessage,
|
|
49
|
+
canonicalizeSessionIssuanceBody,
|
|
50
|
+
opaqueSessionFingerprintSchema,
|
|
51
|
+
sha256HexSchema,
|
|
52
|
+
SESSION_ISSUANCE_HEADERS,
|
|
53
|
+
SESSION_ISSUANCE_MAC_VERSION,
|
|
54
|
+
SESSION_ISSUANCE_PATHS,
|
|
55
|
+
SESSION_ISSUANCE_SLOT_VERSION,
|
|
56
|
+
sessionIssuanceMacHeadersSchema,
|
|
57
|
+
sessionIssuanceMacMessageSchema,
|
|
58
|
+
type SessionIssuanceMacHeaders,
|
|
59
|
+
type SessionIssuanceMacMessage,
|
|
60
|
+
} from './sessionIssuanceProtocol.js';
|
|
61
|
+
export {
|
|
62
|
+
SessionCredentialMetadataSchema,
|
|
63
|
+
SessionCredentialRevocationRequestSchema,
|
|
42
64
|
} from './schemas.js';
|
|
43
65
|
export { parseCapabilityMintResponse } from './schemas.js';
|
|
44
66
|
export {
|
|
@@ -99,6 +121,10 @@ export type {
|
|
|
99
121
|
// A re-export does not bind the name in this module, and the mint request type
|
|
100
122
|
// below needs it.
|
|
101
123
|
import type { CapabilityOperation } from './capability.js';
|
|
124
|
+
import {
|
|
125
|
+
ephemeralKeyRequestSchema,
|
|
126
|
+
type EphemeralKeyRequest,
|
|
127
|
+
} from '../wire/auth.js';
|
|
102
128
|
|
|
103
129
|
export interface ExchangeApiKeyRequest {
|
|
104
130
|
readonly apiKey: string;
|
|
@@ -265,6 +291,30 @@ export type MintUserSessionRequest = MintUserSessionBase & {
|
|
|
265
291
|
readonly controlPlaneOnly?: true;
|
|
266
292
|
};
|
|
267
293
|
|
|
294
|
+
/** Canonical wire projection shared by the SDK and first-party issuer. */
|
|
295
|
+
export function buildMintUserSessionRequest(
|
|
296
|
+
options: MintUserSessionRequest,
|
|
297
|
+
): EphemeralKeyRequest {
|
|
298
|
+
return ephemeralKeyRequestSchema.parse({
|
|
299
|
+
user: { id: options.userId },
|
|
300
|
+
...(options.organizationId ? { organizationId: options.organizationId } : {}),
|
|
301
|
+
...(options.schemaProject
|
|
302
|
+
? {
|
|
303
|
+
schemaProjectId: options.schemaProject.projectId,
|
|
304
|
+
schemaOwnerOrgId: options.schemaProject.organizationId,
|
|
305
|
+
}
|
|
306
|
+
: {}),
|
|
307
|
+
...(options.syncGroups ? { syncGroups: options.syncGroups } : {}),
|
|
308
|
+
...(options.controlPlaneOnly
|
|
309
|
+
? { controlPlaneOnly: true }
|
|
310
|
+
: options.operations
|
|
311
|
+
? { operations: options.operations }
|
|
312
|
+
: { activeSchemaOperations: options.activeSchemaOperations }),
|
|
313
|
+
ttlSeconds: options.ttlSeconds,
|
|
314
|
+
...(options.label ? { label: options.label } : {}),
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
268
318
|
/**
|
|
269
319
|
* Mints an end-user session key (an `ek_` key) by calling
|
|
270
320
|
* `POST /v1/ephemeral_keys`, using your secret key as authorization. Your
|
|
@@ -322,26 +372,7 @@ export async function mintUserSessionKey(
|
|
|
322
372
|
'Content-Type': 'application/json',
|
|
323
373
|
Authorization: `Bearer ${options.apiKey}`,
|
|
324
374
|
},
|
|
325
|
-
body: JSON.stringify(
|
|
326
|
-
user: { id: options.userId },
|
|
327
|
-
...(options.organizationId ? { organizationId: options.organizationId } : {}),
|
|
328
|
-
// The public option is project-centric; map it to the flat wire keys the
|
|
329
|
-
// endpoint expects.
|
|
330
|
-
...(options.schemaProject
|
|
331
|
-
? {
|
|
332
|
-
schemaProjectId: options.schemaProject.projectId,
|
|
333
|
-
schemaOwnerOrgId: options.schemaProject.organizationId,
|
|
334
|
-
}
|
|
335
|
-
: {}),
|
|
336
|
-
...(options.syncGroups ? { syncGroups: options.syncGroups } : {}),
|
|
337
|
-
...(options.controlPlaneOnly
|
|
338
|
-
? { controlPlaneOnly: true }
|
|
339
|
-
: options.operations
|
|
340
|
-
? { operations: options.operations }
|
|
341
|
-
: { activeSchemaOperations: options.activeSchemaOperations }),
|
|
342
|
-
ttlSeconds: options.ttlSeconds,
|
|
343
|
-
...(options.label ? { label: options.label } : {}),
|
|
344
|
-
}),
|
|
375
|
+
body: JSON.stringify(buildMintUserSessionRequest(options)),
|
|
345
376
|
signal: controller.signal,
|
|
346
377
|
});
|
|
347
378
|
} catch (err) {
|
package/src/auth/schemas.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { AbloAuthenticationError } from '../errors.js';
|
|
10
10
|
import { authTokenSchema } from './token.js';
|
|
11
11
|
import { deliveryPartitionRouteSchema } from './deliveryPartition.js';
|
|
12
|
+
import { opaqueSessionFingerprintSchema } from './sessionIssuanceProtocol.js';
|
|
12
13
|
|
|
13
14
|
// Not a second enum. The auth responses carry the same participant vocabulary
|
|
14
15
|
// the coordination plane parses, so they validate against the same schema — a
|
|
@@ -40,10 +41,9 @@ export type IdentityResolveResponse = z.infer<typeof IdentityResolveResponseSche
|
|
|
40
41
|
* block. It still echoes the effective operations stored on the key so the
|
|
41
42
|
* client reports enforced authority rather than reconstructing it from input.
|
|
42
43
|
*/
|
|
43
|
-
export const
|
|
44
|
+
export const SessionCredentialMetadataSchema = z.object({
|
|
44
45
|
object: z.literal('ephemeral_key').optional(),
|
|
45
46
|
id: z.string().min(1),
|
|
46
|
-
token: authTokenSchema,
|
|
47
47
|
expiresAt: z.string().min(1),
|
|
48
48
|
organizationId: z.string().min(1),
|
|
49
49
|
participantId: z.string().min(1),
|
|
@@ -67,6 +67,20 @@ export const EphemeralKeyResponseSchema = z.object({
|
|
|
67
67
|
},
|
|
68
68
|
);
|
|
69
69
|
|
|
70
|
+
/** Persistable/replayable projection of the canonical mint response. */
|
|
71
|
+
export type SessionCredentialMetadata = z.infer<typeof SessionCredentialMetadataSchema>;
|
|
72
|
+
|
|
73
|
+
export const SessionCredentialRevocationRequestSchema = z.object({
|
|
74
|
+
parentSessionHash: opaqueSessionFingerprintSchema,
|
|
75
|
+
});
|
|
76
|
+
export type SessionCredentialRevocationRequest = z.infer<
|
|
77
|
+
typeof SessionCredentialRevocationRequestSchema
|
|
78
|
+
>;
|
|
79
|
+
|
|
80
|
+
export const EphemeralKeyResponseSchema = SessionCredentialMetadataSchema.safeExtend({
|
|
81
|
+
token: authTokenSchema,
|
|
82
|
+
});
|
|
83
|
+
|
|
70
84
|
export type EphemeralKeyResponse = z.infer<typeof EphemeralKeyResponseSchema>;
|
|
71
85
|
|
|
72
86
|
function formatIssues(error: z.ZodError): string {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { stableStringify } from '../utils/json.js';
|
|
3
|
+
|
|
4
|
+
/** Bump only with a coordinated MAC-message protocol rollout. */
|
|
5
|
+
export const SESSION_ISSUANCE_MAC_VERSION = 'v1' as const;
|
|
6
|
+
/** Bump whenever canonical mint semantics change incompatibly. */
|
|
7
|
+
export const SESSION_ISSUANCE_SLOT_VERSION = 'v1' as const;
|
|
8
|
+
|
|
9
|
+
export const SESSION_ISSUANCE_PATHS = {
|
|
10
|
+
mint: '/api/v1/ephemeral_keys',
|
|
11
|
+
revoke: '/api/v1/internal/session-credentials/revoke',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export const SESSION_ISSUANCE_HEADERS = {
|
|
15
|
+
slotKey: 'ablo-session-slot',
|
|
16
|
+
parentSessionHash: 'ablo-parent-session',
|
|
17
|
+
timestamp: 'ablo-session-issuance-timestamp',
|
|
18
|
+
mac: 'ablo-session-issuance-mac',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export const sha256HexSchema = z.string().regex(/^[a-f0-9]{64}$/);
|
|
22
|
+
export const opaqueSessionFingerprintSchema = sha256HexSchema;
|
|
23
|
+
|
|
24
|
+
export const sessionIssuanceMacHeadersSchema = z.object({
|
|
25
|
+
timestamp: z.string().regex(/^\d{13}$/),
|
|
26
|
+
mac: sha256HexSchema,
|
|
27
|
+
});
|
|
28
|
+
export type SessionIssuanceMacHeaders = z.infer<typeof sessionIssuanceMacHeadersSchema>;
|
|
29
|
+
|
|
30
|
+
export const sessionIssuanceMacMessageSchema = z.object({
|
|
31
|
+
method: z.enum(['POST']),
|
|
32
|
+
path: z.enum([SESSION_ISSUANCE_PATHS.mint, SESSION_ISSUANCE_PATHS.revoke]),
|
|
33
|
+
timestamp: z.string().regex(/^\d{13}$/),
|
|
34
|
+
bodySha256: sha256HexSchema,
|
|
35
|
+
slotKey: opaqueSessionFingerprintSchema.optional(),
|
|
36
|
+
parentSessionHash: opaqueSessionFingerprintSchema,
|
|
37
|
+
});
|
|
38
|
+
export type SessionIssuanceMacMessage = z.infer<typeof sessionIssuanceMacMessageSchema>;
|
|
39
|
+
|
|
40
|
+
/** One canonical JSON representation for slot derivation and request MACs. */
|
|
41
|
+
export function canonicalizeSessionIssuanceBody(body: unknown): string {
|
|
42
|
+
return stableStringify(body);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Canonical, bounded KMS GenerateMac/VerifyMac message (well below 4 KiB). */
|
|
46
|
+
export function buildSessionIssuanceMacMessage(input: SessionIssuanceMacMessage): Uint8Array {
|
|
47
|
+
const value = sessionIssuanceMacMessageSchema.parse(input);
|
|
48
|
+
return new TextEncoder().encode([
|
|
49
|
+
`ablo-session-issuance:${SESSION_ISSUANCE_MAC_VERSION}`,
|
|
50
|
+
value.method,
|
|
51
|
+
value.path,
|
|
52
|
+
value.timestamp,
|
|
53
|
+
value.bodySha256,
|
|
54
|
+
value.slotKey ?? '',
|
|
55
|
+
value.parentSessionHash,
|
|
56
|
+
].join('\n'));
|
|
57
|
+
}
|
package/src/auth/sessionMint.ts
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* participant with `invalid_participant_kind`.
|
|
14
14
|
* `{ agent }` → POST /v1/capabilities, returning an `rk_` key scoped to exactly
|
|
15
15
|
* the operations named in `can`. For example
|
|
16
|
-
* `can: {
|
|
17
|
-
* `
|
|
16
|
+
* `can: { items: ['update'] }` becomes the wire allowlist entry
|
|
17
|
+
* `items.update`, which the server matches against the model's
|
|
18
18
|
* registered names.
|
|
19
19
|
*
|
|
20
20
|
* The caller supplies the already-resolved secret key and base URL in
|
|
@@ -61,7 +61,7 @@ export function part(name: string): ClaimPart {
|
|
|
61
61
|
* The wire spelling of a part name, from whichever spelling the caller used.
|
|
62
62
|
*
|
|
63
63
|
* Three, because they are three different promises. A {@link FieldRef} —
|
|
64
|
-
* `schema.fields.
|
|
64
|
+
* `schema.fields.items.status` — is a field the schema declares, so a name that
|
|
65
65
|
* does not exist never compiles. `part('B2')` is a name the schema does not
|
|
66
66
|
* know and says so. A bare string is neither, and survives only because the
|
|
67
67
|
* erased `SchemaRecord` view and untyped callers still need it.
|
|
@@ -330,7 +330,7 @@ const syncIdSchema = z.number().int().nonnegative();
|
|
|
330
330
|
*
|
|
331
331
|
* • `self` — the row that moved IS the group's scope root.
|
|
332
332
|
* • `parent` — it sits one declared containment edge below the root.
|
|
333
|
-
* • `transitive` — the root is ≥2 hops up (`comment →
|
|
333
|
+
* • `transitive` — the root is ≥2 hops up (`comment → item → project`).
|
|
334
334
|
*/
|
|
335
335
|
export const stalePropagationSchema = z
|
|
336
336
|
.object({
|
|
@@ -1417,6 +1417,11 @@ export const commitOperationSchema = writeGuardSchema.extend({
|
|
|
1417
1417
|
model: z.string(),
|
|
1418
1418
|
id: z.string().nullish(),
|
|
1419
1419
|
input: z.record(z.string(), z.unknown()).nullish(),
|
|
1420
|
+
/** Equality conditions evaluated atomically by the writing database. */
|
|
1421
|
+
where: z
|
|
1422
|
+
.record(z.string().min(1), z.unknown())
|
|
1423
|
+
.refine((value) => Object.keys(value).length > 0, 'where must name at least one field')
|
|
1424
|
+
.nullish(),
|
|
1420
1425
|
/** Per-op client tx id, echoed on the broadcast delta. */
|
|
1421
1426
|
transactionId: z.string().nullish(),
|
|
1422
1427
|
/**
|
package/src/errorCodes.ts
CHANGED
|
@@ -604,6 +604,12 @@ export const ERROR_CODES = {
|
|
|
604
604
|
false,
|
|
605
605
|
'An earlier attempt under this idempotency key was pinned to a different source transport. Restore that route and retry the same key; Ablo will not switch a possibly committed write.'
|
|
606
606
|
),
|
|
607
|
+
precondition_failed: wire(
|
|
608
|
+
'conflict',
|
|
609
|
+
409,
|
|
610
|
+
false,
|
|
611
|
+
'A conditional operation did not match the current database row. The complete atomic commit was rejected and no operation in the batch was applied.'
|
|
612
|
+
),
|
|
607
613
|
idempotency_key_too_long: wire(
|
|
608
614
|
'validation',
|
|
609
615
|
400,
|
|
@@ -815,11 +821,11 @@ export const ERROR_CODES = {
|
|
|
815
821
|
false,
|
|
816
822
|
'The branch has no endpoint Data Source for this connector to serve. Run `ablo dev --local` with the current CLI, which registers the connector-only source before opening the socket.'
|
|
817
823
|
),
|
|
818
|
-
|
|
824
|
+
item_id_missing: wire(
|
|
819
825
|
'server',
|
|
820
826
|
502,
|
|
821
827
|
true,
|
|
822
|
-
'The
|
|
828
|
+
'The item-create response arrived without an item id, so the result cannot be used. Retry the request.'
|
|
823
829
|
),
|
|
824
830
|
|
|
825
831
|
// ── data integrity / database constraints ──────────────────────────
|
|
@@ -918,7 +924,7 @@ export const ERROR_CODES = {
|
|
|
918
924
|
),
|
|
919
925
|
schema_reserved_field: client(
|
|
920
926
|
'schema',
|
|
921
|
-
'A model
|
|
927
|
+
'A model declared `id`, the one universal field Ablo supplies. Remove it from the declared application fields.'
|
|
922
928
|
),
|
|
923
929
|
schema_grants_shape_invalid: wire(
|
|
924
930
|
'schema',
|
|
@@ -1647,7 +1653,7 @@ export const ERROR_CODES = {
|
|
|
1647
1653
|
false,
|
|
1648
1654
|
'Uploads are not configured on this deployment: the upload storage bucket and CDN domain are unset.'
|
|
1649
1655
|
),
|
|
1650
|
-
|
|
1656
|
+
item_id_required: wire('validation', 400, false, 'An item id is required for this request.'),
|
|
1651
1657
|
claim_id_required: wire('validation', 400, false, 'A claim id is required for this request.'),
|
|
1652
1658
|
commit_operation_action_required: wire(
|
|
1653
1659
|
'validation',
|
package/src/errors.ts
CHANGED
|
@@ -67,7 +67,7 @@ export class AbloError extends Error {
|
|
|
67
67
|
/** Opaque id of the exact private observation associated with this error. */
|
|
68
68
|
readonly eventId?: string;
|
|
69
69
|
/** The specific input that caused the error, as a model or field path such as
|
|
70
|
-
* `'
|
|
70
|
+
* `'archiveMember.grants.subject'`, so tooling can point at the exact
|
|
71
71
|
* offending value. */
|
|
72
72
|
readonly param?: string;
|
|
73
73
|
/** A link to the documentation for this error's {@link code}. When not set
|
|
@@ -170,6 +170,7 @@ export interface CommitOperationInput {
|
|
|
170
170
|
readonly model: string;
|
|
171
171
|
readonly id?: string | null;
|
|
172
172
|
readonly data?: Record<string, unknown> | null;
|
|
173
|
+
readonly where?: Record<string, unknown> | null;
|
|
173
174
|
readonly transactionId?: string | null;
|
|
174
175
|
/** Claim identity derived from a held claim; not an application id. */
|
|
175
176
|
readonly claimId?: string | null;
|
|
@@ -432,8 +433,8 @@ export interface CreateUserSessionParams<S extends SchemaRecord> {
|
|
|
432
433
|
|
|
433
434
|
/** Mint params for a scoped **agent** session — mints a restricted `rk_` token
|
|
434
435
|
* gated to exactly the operations named in `can`. `can` is typed off your
|
|
435
|
-
* schema (no magic `'
|
|
436
|
-
* — the SDK serializes each entry to the wire allowlist (`
|
|
436
|
+
* schema (no magic `'item.update'` strings): `{ Item: ['update'], Report: ['read'] }`
|
|
437
|
+
* — the SDK serializes each entry to the wire allowlist (`item.update`). */
|
|
437
438
|
export interface CreateAgentSessionParams<S extends SchemaRecord> {
|
|
438
439
|
/** Your agent. `id` becomes the token's `participantId`. */
|
|
439
440
|
agent: { id: string };
|
|
@@ -256,7 +256,7 @@ export interface ClaimTargetOptions<T = Record<string, unknown>> {
|
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
258
|
* Narrow the claim to Zod-declared fields of the row. Return one field
|
|
259
|
-
* directly or an array for several: `fields: (
|
|
259
|
+
* directly or an array for several: `fields: (item) => item.status`.
|
|
260
260
|
*
|
|
261
261
|
* Exclusion follows the target: claims on the same row conflict only where
|
|
262
262
|
* their sets intersect, so a holder on `['title']` and a holder on
|
|
@@ -313,7 +313,7 @@ export interface ClaimTargetOptions<T = Record<string, unknown>> {
|
|
|
313
313
|
* @deprecated Prefer `contention: { signal }`.
|
|
314
314
|
*
|
|
315
315
|
* Abort a pending wait from outside — the same signal that cancels
|
|
316
|
-
* everything else in the program, so a cancelled agent
|
|
316
|
+
* everything else in the program, so a cancelled agent item or an unmounted
|
|
317
317
|
* component takes its queued claim with it. Rejects with
|
|
318
318
|
* {@link AbloClaimedError} (`claim_wait_aborted`); over HTTP the abort also
|
|
319
319
|
* leaves the line. Ignored once the grant has arrived — a held lease is
|
|
@@ -327,7 +327,7 @@ export interface ClaimTargetOptions<T = Record<string, unknown>> {
|
|
|
327
327
|
ttl?: Duration;
|
|
328
328
|
/**
|
|
329
329
|
* Keep the lease alive for the duration of real work by beating on a
|
|
330
|
-
* cadence — the pattern for background workers whose
|
|
330
|
+
* cadence — the pattern for background workers whose item outlives the
|
|
331
331
|
* crash-cleanup TTL. `true` beats every third of the TTL (so two beats can
|
|
332
332
|
* fail before the lease is at risk, and a crashed worker's lease still
|
|
333
333
|
* lapses within one beat window); a duration such as `'2m'` sets the
|
|
@@ -431,12 +431,12 @@ export type ClaimSkipOptions<T = Record<string, unknown>> =
|
|
|
431
431
|
* write and the SDK acquires/releases around that one mutation:
|
|
432
432
|
*
|
|
433
433
|
* ```ts
|
|
434
|
-
* await ablo.
|
|
434
|
+
* await ablo.items.update({
|
|
435
435
|
* id,
|
|
436
436
|
* data: { title },
|
|
437
437
|
* claim: {
|
|
438
|
-
* fields: (
|
|
439
|
-
* description: 'Renaming the
|
|
438
|
+
* fields: (item) => item.title,
|
|
439
|
+
* description: 'Renaming the item to match the project brief.',
|
|
440
440
|
* },
|
|
441
441
|
* });
|
|
442
442
|
* ```
|
package/src/schema/ddl.ts
CHANGED
|
@@ -117,7 +117,7 @@ export function sqlType(fieldType: ModelJSON['fields'][string]['type']): string
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
const BASE_COLUMNS = new Set(['id'
|
|
120
|
+
const BASE_COLUMNS = new Set(['id']);
|
|
121
121
|
|
|
122
122
|
// ── Foreign keys (relation-driven, sync-safe) ────────────────────────────────
|
|
123
123
|
|
|
@@ -154,11 +154,11 @@ interface ForeignKeyDdl {
|
|
|
154
154
|
* in by setting `{ fk: true }`.
|
|
155
155
|
*
|
|
156
156
|
* The `fk` marker is deliberately separate from `parent`: `parent` controls
|
|
157
|
-
* sync-group fan-out and visibility, while `fk` requests
|
|
157
|
+
* sync-group fan-out and visibility, while `fk` requests database referential
|
|
158
158
|
* integrity in the database. A relation sets `fk` only when its target lives in
|
|
159
159
|
* the same database, is written in the same commit, and is a strong, contained
|
|
160
160
|
* entity. Soft references — provenance or template pointers such as
|
|
161
|
-
* `
|
|
161
|
+
* `sourceDocumentId` or `templateId` — stay plain columns; a hard foreign key there
|
|
162
162
|
* would reject a write that points across scopes or at an absent row and break
|
|
163
163
|
* sync.
|
|
164
164
|
*
|
|
@@ -204,7 +204,7 @@ function foreignKeyStatements(
|
|
|
204
204
|
// The model's provisioned column set — guard so a relation whose FK field
|
|
205
205
|
// isn't actually declared (no column) never produces a broken ALTER.
|
|
206
206
|
const orgCol = tenancyColumn(resolveTenancy(model));
|
|
207
|
-
const columns = new Set<string>(['id'
|
|
207
|
+
const columns = new Set<string>(['id']);
|
|
208
208
|
if (orgCol) columns.add(orgCol);
|
|
209
209
|
for (const [fieldName, meta] of Object.entries(model.fields)) {
|
|
210
210
|
columns.add(meta.column ?? camelToSnake(fieldName));
|
|
@@ -275,8 +275,7 @@ export function generateProvisionPlan(
|
|
|
275
275
|
// declared boundary is what makes the set of tables a customer's own
|
|
276
276
|
// database receives derivable instead of hand-coded.
|
|
277
277
|
if ((model.plane ?? 'tenant') === 'control') continue;
|
|
278
|
-
|
|
279
|
-
// Default the physical table to the model key when `tableName` is omitted —
|
|
278
|
+
// Default the database table to the model key when `tableName` is omitted —
|
|
280
279
|
// same fallback the migration path uses (`tableOfModel: m.tableName ?? key`).
|
|
281
280
|
// Without this, a schema that doesn't set `tableName` (e.g. the `ablo init`
|
|
282
281
|
// starter) provisions zero tables.
|
|
@@ -294,13 +293,10 @@ export function generateProvisionPlan(
|
|
|
294
293
|
// no tenancy column — they're scoped via a parent FK or not at all.
|
|
295
294
|
const orgCol = tenancyColumn(resolveTenancy(model));
|
|
296
295
|
const baseColumns = [
|
|
297
|
-
` ${q('id')} TEXT PRIMARY KEY
|
|
298
|
-
...(orgCol ? [` ${q(orgCol)} TEXT NOT NULL
|
|
299
|
-
` ${q('created_by')} TEXT,`,
|
|
300
|
-
` ${q('created_at')} TIMESTAMPTZ NOT NULL DEFAULT NOW(),`,
|
|
301
|
-
` ${q('updated_at')} TIMESTAMPTZ NOT NULL DEFAULT NOW()`,
|
|
296
|
+
` ${q('id')} TEXT PRIMARY KEY`,
|
|
297
|
+
...(orgCol ? [` ${q(orgCol)} TEXT NOT NULL`] : []),
|
|
302
298
|
];
|
|
303
|
-
statements.push(`CREATE TABLE IF NOT EXISTS ${qt} (\n${baseColumns.join('
|
|
299
|
+
statements.push(`CREATE TABLE IF NOT EXISTS ${qt} (\n${baseColumns.join(',\n')}\n);`);
|
|
304
300
|
|
|
305
301
|
for (const [fieldName, meta] of Object.entries(model.fields)) {
|
|
306
302
|
const col = meta.column ?? camelToSnake(fieldName);
|
|
@@ -458,7 +454,7 @@ export function generateMigrationPlan(
|
|
|
458
454
|
case 'rename_model': {
|
|
459
455
|
const fromTable = tableOfModel(prev, step.from);
|
|
460
456
|
const toTable = tableOfModel(next, step.to);
|
|
461
|
-
// A logical model rename only needs SQL when the
|
|
457
|
+
// A logical model rename only needs SQL when the database table name
|
|
462
458
|
// actually changes; if tableName is unchanged the rename is metadata.
|
|
463
459
|
if (fromTable && toTable && fromTable !== toTable) {
|
|
464
460
|
statements.push(`ALTER TABLE ${qtFor(fromTable)} RENAME TO ${q(toTable)};`);
|
package/src/schema/field.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Usage:
|
|
10
10
|
* import { field } from '@abloatai/transaction/schema';
|
|
11
11
|
*
|
|
12
|
-
* const
|
|
12
|
+
* const items = model({
|
|
13
13
|
* title: field.string(),
|
|
14
14
|
* projectId: field.string().indexed(), // fluent chain
|
|
15
15
|
* priority: field.number().optional(),
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Or use Zod directly (no metadata, but still works):
|
|
20
20
|
* import { z } from 'zod';
|
|
21
21
|
*
|
|
22
|
-
* const
|
|
22
|
+
* const items = model({
|
|
23
23
|
* title: z.string(),
|
|
24
24
|
* });
|
|
25
25
|
*/
|
|
@@ -199,7 +199,7 @@ export function resolveFieldMeta(schema: z.ZodType): FieldMeta {
|
|
|
199
199
|
|
|
200
200
|
/** A Zod schema returned by a {@link field} builder — the underlying Zod type plus
|
|
201
201
|
* two chainable methods: `indexed()` marks the field for a database index, and
|
|
202
|
-
* `from(column)` overrides the
|
|
202
|
+
* `from(column)` overrides the database column name it maps to. */
|
|
203
203
|
export type FieldBuilder<T extends z.ZodType> = T & {
|
|
204
204
|
indexed(): FieldBuilder<T>;
|
|
205
205
|
from(column: string): FieldBuilder<T>;
|
package/src/schema/fieldRef.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* `string`.
|
|
25
25
|
*
|
|
26
26
|
* `model` rides along so a reference carries where it came from. Claiming
|
|
27
|
-
* `users.email` through `ablo.
|
|
27
|
+
* `users.email` through `ablo.items` is a mistake nothing can currently see.
|
|
28
28
|
*/
|
|
29
29
|
export interface FieldRef<
|
|
30
30
|
Model extends string = string,
|