@abloatai/transaction 0.37.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 +83 -0
- package/README.md +48 -0
- package/dist/ablo.d.ts +90 -0
- package/dist/ablo.d.ts.map +1 -0
- package/dist/ablo.js +34 -0
- package/dist/ablo.js.map +1 -0
- package/dist/ai-sdk/coordinatedTool.d.ts +123 -0
- package/dist/ai-sdk/coordinatedTool.d.ts.map +1 -0
- package/dist/ai-sdk/coordinatedTool.js +135 -0
- package/dist/ai-sdk/coordinatedTool.js.map +1 -0
- package/dist/ai-sdk/index.d.ts +2 -0
- package/dist/ai-sdk/index.d.ts.map +1 -0
- package/dist/ai-sdk/index.js +2 -0
- package/dist/ai-sdk/index.js.map +1 -0
- package/dist/auth/apiKey.d.ts +154 -0
- package/dist/auth/apiKey.d.ts.map +1 -0
- package/dist/auth/apiKey.js +408 -0
- package/dist/auth/apiKey.js.map +1 -0
- package/dist/auth/bootstrapScope.d.ts +16 -0
- package/dist/auth/bootstrapScope.d.ts.map +1 -0
- package/dist/auth/bootstrapScope.js +2 -0
- package/dist/auth/bootstrapScope.js.map +1 -0
- package/dist/auth/browserCredentialSafety.d.ts +7 -0
- package/dist/auth/browserCredentialSafety.d.ts.map +1 -0
- package/dist/auth/browserCredentialSafety.js +29 -0
- package/dist/auth/browserCredentialSafety.js.map +1 -0
- package/dist/auth/capability.d.ts +241 -0
- package/dist/auth/capability.d.ts.map +1 -0
- package/dist/auth/capability.js +253 -0
- package/dist/auth/capability.js.map +1 -0
- package/dist/auth/capabilityLifecycle.d.ts +47 -0
- package/dist/auth/capabilityLifecycle.d.ts.map +1 -0
- package/dist/auth/capabilityLifecycle.js +108 -0
- package/dist/auth/capabilityLifecycle.js.map +1 -0
- package/dist/auth/credentialEndpoint.d.ts +10 -0
- package/dist/auth/credentialEndpoint.d.ts.map +1 -0
- package/dist/auth/credentialEndpoint.js +58 -0
- package/dist/auth/credentialEndpoint.js.map +1 -0
- package/dist/auth/credentialEndpointProtocol.d.ts +24 -0
- package/dist/auth/credentialEndpointProtocol.d.ts.map +1 -0
- package/dist/auth/credentialEndpointProtocol.js +34 -0
- package/dist/auth/credentialEndpointProtocol.js.map +1 -0
- package/dist/auth/credentialKind.d.ts +4 -0
- package/dist/auth/credentialKind.d.ts.map +1 -0
- package/dist/auth/credentialKind.js +15 -0
- package/dist/auth/credentialKind.js.map +1 -0
- package/dist/auth/credentialPolicy.d.ts +141 -0
- package/dist/auth/credentialPolicy.d.ts.map +1 -0
- package/dist/auth/credentialPolicy.js +113 -0
- package/dist/auth/credentialPolicy.js.map +1 -0
- package/dist/auth/credentialResult.d.ts +7 -0
- package/dist/auth/credentialResult.d.ts.map +1 -0
- package/dist/auth/credentialResult.js +9 -0
- package/dist/auth/credentialResult.js.map +1 -0
- package/dist/auth/credentialSource.d.ts +31 -0
- package/dist/auth/credentialSource.d.ts.map +1 -0
- package/dist/auth/credentialSource.js +56 -0
- package/dist/auth/credentialSource.js.map +1 -0
- package/dist/auth/hostedEndpoints.d.ts +22 -0
- package/dist/auth/hostedEndpoints.d.ts.map +1 -0
- package/dist/auth/hostedEndpoints.js +22 -0
- package/dist/auth/hostedEndpoints.js.map +1 -0
- package/dist/auth/identity.d.ts +62 -0
- package/dist/auth/identity.d.ts.map +1 -0
- package/dist/auth/identity.js +224 -0
- package/dist/auth/identity.js.map +1 -0
- package/dist/auth/index.d.ts +189 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +312 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/schemas.d.ts +41 -0
- package/dist/auth/schemas.d.ts.map +1 -0
- package/dist/auth/schemas.js +69 -0
- package/dist/auth/schemas.js.map +1 -0
- package/dist/auth/sessionMint.d.ts +29 -0
- package/dist/auth/sessionMint.d.ts.map +1 -0
- package/dist/auth/sessionMint.js +92 -0
- package/dist/auth/sessionMint.js.map +1 -0
- package/dist/auth/token.d.ts +4 -0
- package/dist/auth/token.d.ts.map +1 -0
- package/dist/auth/token.js +4 -0
- package/dist/auth/token.js.map +1 -0
- package/dist/batching/index.d.ts +56 -0
- package/dist/batching/index.d.ts.map +1 -0
- package/dist/batching/index.js +148 -0
- package/dist/batching/index.js.map +1 -0
- package/dist/coordination/awaitClaimGrant.d.ts +57 -0
- package/dist/coordination/awaitClaimGrant.d.ts.map +1 -0
- package/dist/coordination/awaitClaimGrant.js +138 -0
- package/dist/coordination/awaitClaimGrant.js.map +1 -0
- package/dist/coordination/claimHeartbeatLoop.d.ts +85 -0
- package/dist/coordination/claimHeartbeatLoop.d.ts.map +1 -0
- package/dist/coordination/claimHeartbeatLoop.js +109 -0
- package/dist/coordination/claimHeartbeatLoop.js.map +1 -0
- package/dist/coordination/claimMeta.d.ts +50 -0
- package/dist/coordination/claimMeta.d.ts.map +1 -0
- package/dist/coordination/claimMeta.js +53 -0
- package/dist/coordination/claimMeta.js.map +1 -0
- package/dist/coordination/events.d.ts +75 -0
- package/dist/coordination/events.d.ts.map +1 -0
- package/dist/coordination/events.js +8 -0
- package/dist/coordination/events.js.map +1 -0
- package/dist/coordination/index.d.ts +20 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +46 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/locator.d.ts +106 -0
- package/dist/coordination/locator.d.ts.map +1 -0
- package/dist/coordination/locator.js +110 -0
- package/dist/coordination/locator.js.map +1 -0
- package/dist/coordination/schema.d.ts +1332 -0
- package/dist/coordination/schema.d.ts.map +1 -0
- package/dist/coordination/schema.js +1137 -0
- package/dist/coordination/schema.js.map +1 -0
- package/dist/coordination/targetConflict.d.ts +3 -0
- package/dist/coordination/targetConflict.d.ts.map +1 -0
- package/dist/coordination/targetConflict.js +74 -0
- package/dist/coordination/targetConflict.js.map +1 -0
- package/dist/coordination/trace.d.ts +79 -0
- package/dist/coordination/trace.d.ts.map +1 -0
- package/dist/coordination/trace.js +139 -0
- package/dist/coordination/trace.js.map +1 -0
- package/dist/docs/catalog.d.ts +73 -0
- package/dist/docs/catalog.d.ts.map +1 -0
- package/dist/docs/catalog.js +231 -0
- package/dist/docs/catalog.js.map +1 -0
- package/dist/docs/index.d.ts +11 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +11 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/durableWrites.d.ts +63 -0
- package/dist/durableWrites.d.ts.map +1 -0
- package/dist/durableWrites.js +72 -0
- package/dist/durableWrites.js.map +1 -0
- package/dist/environment.d.ts +106 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +109 -0
- package/dist/environment.js.map +1 -0
- package/dist/errorCodes.d.ts +411 -0
- package/dist/errorCodes.d.ts.map +1 -0
- package/dist/errorCodes.js +500 -0
- package/dist/errorCodes.js.map +1 -0
- package/dist/errors.d.ts +429 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +687 -0
- package/dist/errors.js.map +1 -0
- package/dist/footprint.d.ts +112 -0
- package/dist/footprint.d.ts.map +1 -0
- package/dist/footprint.js +0 -0
- package/dist/footprint.js.map +1 -0
- package/dist/headlessClient.d.ts +10 -0
- package/dist/headlessClient.d.ts.map +1 -0
- package/dist/headlessClient.js +114 -0
- package/dist/headlessClient.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/keys/index.d.ts +88 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +208 -0
- package/dist/keys/index.js.map +1 -0
- package/dist/log/syncDeltaRow.d.ts +159 -0
- package/dist/log/syncDeltaRow.d.ts.map +1 -0
- package/dist/log/syncDeltaRow.js +96 -0
- package/dist/log/syncDeltaRow.js.map +1 -0
- package/dist/logger.d.ts +17 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +8 -0
- package/dist/logger.js.map +1 -0
- package/dist/observability.d.ts +54 -0
- package/dist/observability.d.ts.map +1 -0
- package/dist/observability.js +20 -0
- package/dist/observability.js.map +1 -0
- package/dist/policy/types.d.ts +218 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/policy/types.js +127 -0
- package/dist/policy/types.js.map +1 -0
- package/dist/resources/functionalUpdate.d.ts +80 -0
- package/dist/resources/functionalUpdate.d.ts.map +1 -0
- package/dist/resources/functionalUpdate.js +88 -0
- package/dist/resources/functionalUpdate.js.map +1 -0
- package/dist/resources/httpResources.d.ts +449 -0
- package/dist/resources/httpResources.d.ts.map +1 -0
- package/dist/resources/httpResources.js +8 -0
- package/dist/resources/httpResources.js.map +1 -0
- package/dist/resources/modelOperations.d.ts +380 -0
- package/dist/resources/modelOperations.d.ts.map +1 -0
- package/dist/resources/modelOperations.js +13 -0
- package/dist/resources/modelOperations.js.map +1 -0
- package/dist/resources/mutationOptions.d.ts +67 -0
- package/dist/resources/mutationOptions.d.ts.map +1 -0
- package/dist/resources/mutationOptions.js +10 -0
- package/dist/resources/mutationOptions.js.map +1 -0
- package/dist/resources/where.d.ts +102 -0
- package/dist/resources/where.d.ts.map +1 -0
- package/dist/resources/where.js +116 -0
- package/dist/resources/where.js.map +1 -0
- package/dist/resources/writeOptionsSchema.d.ts +48 -0
- package/dist/resources/writeOptionsSchema.d.ts.map +1 -0
- package/dist/resources/writeOptionsSchema.js +74 -0
- package/dist/resources/writeOptionsSchema.js.map +1 -0
- package/dist/schema/coordination.d.ts +113 -0
- package/dist/schema/coordination.d.ts.map +1 -0
- package/dist/schema/coordination.js +134 -0
- package/dist/schema/coordination.js.map +1 -0
- package/dist/schema/ddl.d.ts +98 -0
- package/dist/schema/ddl.d.ts.map +1 -0
- package/dist/schema/ddl.js +492 -0
- package/dist/schema/ddl.js.map +1 -0
- package/dist/schema/ddlLock.d.ts +36 -0
- package/dist/schema/ddlLock.d.ts.map +1 -0
- package/dist/schema/ddlLock.js +47 -0
- package/dist/schema/ddlLock.js.map +1 -0
- package/dist/schema/diff.d.ts +226 -0
- package/dist/schema/diff.d.ts.map +1 -0
- package/dist/schema/diff.js +290 -0
- package/dist/schema/diff.js.map +1 -0
- package/dist/schema/field.d.ts +121 -0
- package/dist/schema/field.d.ts.map +1 -0
- package/dist/schema/field.js +266 -0
- package/dist/schema/field.js.map +1 -0
- package/dist/schema/fieldRef.d.ts +58 -0
- package/dist/schema/fieldRef.d.ts.map +1 -0
- package/dist/schema/fieldRef.js +26 -0
- package/dist/schema/fieldRef.js.map +1 -0
- package/dist/schema/generate.d.ts +20 -0
- package/dist/schema/generate.d.ts.map +1 -0
- package/dist/schema/generate.js +87 -0
- package/dist/schema/generate.js.map +1 -0
- package/dist/schema/index.d.ts +43 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +81 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/loadStrategy.d.ts +46 -0
- package/dist/schema/loadStrategy.d.ts.map +1 -0
- package/dist/schema/loadStrategy.js +47 -0
- package/dist/schema/loadStrategy.js.map +1 -0
- package/dist/schema/model.d.ts +380 -0
- package/dist/schema/model.d.ts.map +1 -0
- package/dist/schema/model.js +124 -0
- package/dist/schema/model.js.map +1 -0
- package/dist/schema/openapi.d.ts +59 -0
- package/dist/schema/openapi.d.ts.map +1 -0
- package/dist/schema/openapi.js +508 -0
- package/dist/schema/openapi.js.map +1 -0
- package/dist/schema/queries.d.ts +202 -0
- package/dist/schema/queries.d.ts.map +1 -0
- package/dist/schema/queries.js +144 -0
- package/dist/schema/queries.js.map +1 -0
- package/dist/schema/relation.d.ts +205 -0
- package/dist/schema/relation.d.ts.map +1 -0
- package/dist/schema/relation.js +105 -0
- package/dist/schema/relation.js.map +1 -0
- package/dist/schema/residency.d.ts +30 -0
- package/dist/schema/residency.d.ts.map +1 -0
- package/dist/schema/residency.js +26 -0
- package/dist/schema/residency.js.map +1 -0
- package/dist/schema/roles.d.ts +250 -0
- package/dist/schema/roles.d.ts.map +1 -0
- package/dist/schema/roles.js +231 -0
- package/dist/schema/roles.js.map +1 -0
- package/dist/schema/schema.d.ts +352 -0
- package/dist/schema/schema.d.ts.map +1 -0
- package/dist/schema/schema.js +326 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/schema/select.d.ts +41 -0
- package/dist/schema/select.d.ts.map +1 -0
- package/dist/schema/select.js +91 -0
- package/dist/schema/select.js.map +1 -0
- package/dist/schema/serialize.d.ts +116 -0
- package/dist/schema/serialize.d.ts.map +1 -0
- package/dist/schema/serialize.js +278 -0
- package/dist/schema/serialize.js.map +1 -0
- package/dist/schema/sugar.d.ts +110 -0
- package/dist/schema/sugar.d.ts.map +1 -0
- package/dist/schema/sugar.js +84 -0
- package/dist/schema/sugar.js.map +1 -0
- package/dist/schema/tenancy.d.ts +140 -0
- package/dist/schema/tenancy.d.ts.map +1 -0
- package/dist/schema/tenancy.js +191 -0
- package/dist/schema/tenancy.js.map +1 -0
- package/dist/server/adapter.d.ts +174 -0
- package/dist/server/adapter.d.ts.map +1 -0
- package/dist/server/adapter.js +19 -0
- package/dist/server/adapter.js.map +1 -0
- package/dist/server/commit.d.ts +108 -0
- package/dist/server/commit.d.ts.map +1 -0
- package/dist/server/commit.js +2 -0
- package/dist/server/commit.js.map +1 -0
- package/dist/server/index.d.ts +15 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/readConfig.d.ts +81 -0
- package/dist/server/readConfig.d.ts.map +1 -0
- package/dist/server/readConfig.js +9 -0
- package/dist/server/readConfig.js.map +1 -0
- package/dist/server/storageMode.d.ts +24 -0
- package/dist/server/storageMode.d.ts.map +1 -0
- package/dist/server/storageMode.js +18 -0
- package/dist/server/storageMode.js.map +1 -0
- package/dist/source/adapter.d.ts +84 -0
- package/dist/source/adapter.d.ts.map +1 -0
- package/dist/source/adapter.js +25 -0
- package/dist/source/adapter.js.map +1 -0
- package/dist/source/adapters/drizzle.d.ts +49 -0
- package/dist/source/adapters/drizzle.d.ts.map +1 -0
- package/dist/source/adapters/drizzle.js +220 -0
- package/dist/source/adapters/drizzle.js.map +1 -0
- package/dist/source/adapters/kysely.d.ts +43 -0
- package/dist/source/adapters/kysely.d.ts.map +1 -0
- package/dist/source/adapters/kysely.js +206 -0
- package/dist/source/adapters/kysely.js.map +1 -0
- package/dist/source/adapters/kyselyMutationCore.d.ts +77 -0
- package/dist/source/adapters/kyselyMutationCore.d.ts.map +1 -0
- package/dist/source/adapters/kyselyMutationCore.js +126 -0
- package/dist/source/adapters/kyselyMutationCore.js.map +1 -0
- package/dist/source/adapters/memory.d.ts +14 -0
- package/dist/source/adapters/memory.d.ts.map +1 -0
- package/dist/source/adapters/memory.js +131 -0
- package/dist/source/adapters/memory.js.map +1 -0
- package/dist/source/adapters/prisma.d.ts +64 -0
- package/dist/source/adapters/prisma.d.ts.map +1 -0
- package/dist/source/adapters/prisma.js +203 -0
- package/dist/source/adapters/prisma.js.map +1 -0
- package/dist/source/conformance.d.ts +38 -0
- package/dist/source/conformance.d.ts.map +1 -0
- package/dist/source/conformance.js +216 -0
- package/dist/source/conformance.js.map +1 -0
- package/dist/source/connector.d.ts +96 -0
- package/dist/source/connector.d.ts.map +1 -0
- package/dist/source/connector.js +267 -0
- package/dist/source/connector.js.map +1 -0
- package/dist/source/connectorProtocol.d.ts +155 -0
- package/dist/source/connectorProtocol.d.ts.map +1 -0
- package/dist/source/connectorProtocol.js +164 -0
- package/dist/source/connectorProtocol.js.map +1 -0
- package/dist/source/contract.d.ts +196 -0
- package/dist/source/contract.d.ts.map +1 -0
- package/dist/source/contract.js +165 -0
- package/dist/source/contract.js.map +1 -0
- package/dist/source/drizzle.d.ts +2 -0
- package/dist/source/drizzle.d.ts.map +1 -0
- package/dist/source/drizzle.js +2 -0
- package/dist/source/drizzle.js.map +1 -0
- package/dist/source/factory.d.ts +93 -0
- package/dist/source/factory.d.ts.map +1 -0
- package/dist/source/factory.js +287 -0
- package/dist/source/factory.js.map +1 -0
- package/dist/source/idempotency.d.ts +62 -0
- package/dist/source/idempotency.d.ts.map +1 -0
- package/dist/source/idempotency.js +145 -0
- package/dist/source/idempotency.js.map +1 -0
- package/dist/source/index.d.ts +24 -0
- package/dist/source/index.d.ts.map +1 -0
- package/dist/source/index.js +29 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/kysely.d.ts +3 -0
- package/dist/source/kysely.d.ts.map +1 -0
- package/dist/source/kysely.js +3 -0
- package/dist/source/kysely.js.map +1 -0
- package/dist/source/migrations.d.ts +22 -0
- package/dist/source/migrations.d.ts.map +1 -0
- package/dist/source/migrations.js +104 -0
- package/dist/source/migrations.js.map +1 -0
- package/dist/source/next.d.ts +33 -0
- package/dist/source/next.d.ts.map +1 -0
- package/dist/source/next.js +26 -0
- package/dist/source/next.js.map +1 -0
- package/dist/source/pushQueue.d.ts +135 -0
- package/dist/source/pushQueue.d.ts.map +1 -0
- package/dist/source/pushQueue.js +257 -0
- package/dist/source/pushQueue.js.map +1 -0
- package/dist/source/signing.d.ts +93 -0
- package/dist/source/signing.d.ts.map +1 -0
- package/dist/source/signing.js +163 -0
- package/dist/source/signing.js.map +1 -0
- package/dist/source/types.d.ts +402 -0
- package/dist/source/types.d.ts.map +1 -0
- package/dist/source/types.js +60 -0
- package/dist/source/types.js.map +1 -0
- package/dist/syncLog/contract.d.ts +21 -0
- package/dist/syncLog/contract.d.ts.map +1 -0
- package/dist/syncLog/contract.js +20 -0
- package/dist/syncLog/contract.js.map +1 -0
- package/dist/syncLog/index.d.ts +2 -0
- package/dist/syncLog/index.d.ts.map +1 -0
- package/dist/syncLog/index.js +2 -0
- package/dist/syncLog/index.js.map +1 -0
- package/dist/testing/fixtures/httpResponses.d.ts +74 -0
- package/dist/testing/fixtures/httpResponses.d.ts.map +1 -0
- package/dist/testing/fixtures/httpResponses.js +102 -0
- package/dist/testing/fixtures/httpResponses.js.map +1 -0
- package/dist/transactionLayer.d.ts +110 -0
- package/dist/transactionLayer.d.ts.map +1 -0
- package/dist/transactionLayer.js +25 -0
- package/dist/transactionLayer.js.map +1 -0
- package/dist/transactions/settlement/commitEnvelope.d.ts +144 -0
- package/dist/transactions/settlement/commitEnvelope.d.ts.map +1 -0
- package/dist/transactions/settlement/commitEnvelope.js +162 -0
- package/dist/transactions/settlement/commitEnvelope.js.map +1 -0
- package/dist/transactions/settlement/httpCommitEnvelope.d.ts +54 -0
- package/dist/transactions/settlement/httpCommitEnvelope.d.ts.map +1 -0
- package/dist/transactions/settlement/httpCommitEnvelope.js +208 -0
- package/dist/transactions/settlement/httpCommitEnvelope.js.map +1 -0
- package/dist/transactions/settlement/idempotencyKey.d.ts +11 -0
- package/dist/transactions/settlement/idempotencyKey.d.ts.map +1 -0
- package/dist/transactions/settlement/idempotencyKey.js +10 -0
- package/dist/transactions/settlement/idempotencyKey.js.map +1 -0
- package/dist/transactions/settlement/pendingWrite.d.ts +113 -0
- package/dist/transactions/settlement/pendingWrite.d.ts.map +1 -0
- package/dist/transactions/settlement/pendingWrite.js +21 -0
- package/dist/transactions/settlement/pendingWrite.js.map +1 -0
- package/dist/transport/commitFrames.d.ts +91 -0
- package/dist/transport/commitFrames.d.ts.map +1 -0
- package/dist/transport/commitFrames.js +135 -0
- package/dist/transport/commitFrames.js.map +1 -0
- package/dist/transport/connectionManager.d.ts +216 -0
- package/dist/transport/connectionManager.d.ts.map +1 -0
- package/dist/transport/connectionManager.js +674 -0
- package/dist/transport/connectionManager.js.map +1 -0
- package/dist/transport/credentialLifecycle.d.ts +178 -0
- package/dist/transport/credentialLifecycle.d.ts.map +1 -0
- package/dist/transport/credentialLifecycle.js +324 -0
- package/dist/transport/credentialLifecycle.js.map +1 -0
- package/dist/transport/heartbeat.d.ts +66 -0
- package/dist/transport/heartbeat.d.ts.map +1 -0
- package/dist/transport/heartbeat.js +94 -0
- package/dist/transport/heartbeat.js.map +1 -0
- package/dist/transport/httpClient.d.ts +143 -0
- package/dist/transport/httpClient.d.ts.map +1 -0
- package/dist/transport/httpClient.js +150 -0
- package/dist/transport/httpClient.js.map +1 -0
- package/dist/transport/httpFeed.d.ts +4 -0
- package/dist/transport/httpFeed.d.ts.map +1 -0
- package/dist/transport/httpFeed.js +94 -0
- package/dist/transport/httpFeed.js.map +1 -0
- package/dist/transport/httpOptions.d.ts +34 -0
- package/dist/transport/httpOptions.d.ts.map +1 -0
- package/dist/transport/httpOptions.js +13 -0
- package/dist/transport/httpOptions.js.map +1 -0
- package/dist/transport/httpTransport.d.ts +68 -0
- package/dist/transport/httpTransport.d.ts.map +1 -0
- package/dist/transport/httpTransport.js +1433 -0
- package/dist/transport/httpTransport.js.map +1 -0
- package/dist/transport/networkProbe.d.ts +85 -0
- package/dist/transport/networkProbe.d.ts.map +1 -0
- package/dist/transport/networkProbe.js +208 -0
- package/dist/transport/networkProbe.js.map +1 -0
- package/dist/transport/wsFrameHandlers.d.ts +129 -0
- package/dist/transport/wsFrameHandlers.d.ts.map +1 -0
- package/dist/transport/wsFrameHandlers.js +429 -0
- package/dist/transport/wsFrameHandlers.js.map +1 -0
- package/dist/transport/wsTransport.d.ts +575 -0
- package/dist/transport/wsTransport.d.ts.map +1 -0
- package/dist/transport/wsTransport.js +1024 -0
- package/dist/transport/wsTransport.js.map +1 -0
- package/dist/types/assertExact.d.ts +18 -0
- package/dist/types/assertExact.d.ts.map +1 -0
- package/dist/types/assertExact.js +2 -0
- package/dist/types/assertExact.js.map +1 -0
- package/dist/types/global.d.ts +108 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/global.js +41 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/index.d.ts +206 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +57 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/modelData.d.ts +11 -0
- package/dist/types/modelData.d.ts.map +1 -0
- package/dist/types/modelData.js +10 -0
- package/dist/types/modelData.js.map +1 -0
- package/dist/types/participant.d.ts +21 -0
- package/dist/types/participant.d.ts.map +1 -0
- package/dist/types/participant.js +11 -0
- package/dist/types/participant.js.map +1 -0
- package/dist/types/streams.d.ts +545 -0
- package/dist/types/streams.d.ts.map +1 -0
- package/dist/types/streams.js +12 -0
- package/dist/types/streams.js.map +1 -0
- package/dist/utils/asyncIterator.d.ts +35 -0
- package/dist/utils/asyncIterator.d.ts.map +1 -0
- package/dist/utils/asyncIterator.js +136 -0
- package/dist/utils/asyncIterator.js.map +1 -0
- package/dist/utils/duration.d.ts +51 -0
- package/dist/utils/duration.d.ts.map +1 -0
- package/dist/utils/duration.js +78 -0
- package/dist/utils/duration.js.map +1 -0
- package/dist/utils/json.d.ts +58 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +277 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/webhooks/events.d.ts +44 -0
- package/dist/webhooks/events.d.ts.map +1 -0
- package/dist/webhooks/events.js +43 -0
- package/dist/webhooks/events.js.map +1 -0
- package/dist/webhooks/index.d.ts +9 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/index.js +9 -0
- package/dist/webhooks/index.js.map +1 -0
- package/dist/wire/accountResponses.d.ts +463 -0
- package/dist/wire/accountResponses.d.ts.map +1 -0
- package/dist/wire/accountResponses.js +294 -0
- package/dist/wire/accountResponses.js.map +1 -0
- package/dist/wire/auth.d.ts +57 -0
- package/dist/wire/auth.d.ts.map +1 -0
- package/dist/wire/auth.js +71 -0
- package/dist/wire/auth.js.map +1 -0
- package/dist/wire/bootstrapReason.d.ts +10 -0
- package/dist/wire/bootstrapReason.d.ts.map +1 -0
- package/dist/wire/bootstrapReason.js +9 -0
- package/dist/wire/bootstrapReason.js.map +1 -0
- package/dist/wire/claimEvent.d.ts +70 -0
- package/dist/wire/claimEvent.d.ts.map +1 -0
- package/dist/wire/claimEvent.js +74 -0
- package/dist/wire/claimEvent.js.map +1 -0
- package/dist/wire/claims.d.ts +475 -0
- package/dist/wire/claims.d.ts.map +1 -0
- package/dist/wire/claims.js +326 -0
- package/dist/wire/claims.js.map +1 -0
- package/dist/wire/commit.d.ts +604 -0
- package/dist/wire/commit.d.ts.map +1 -0
- package/dist/wire/commit.js +322 -0
- package/dist/wire/commit.js.map +1 -0
- package/dist/wire/delta.d.ts +251 -0
- package/dist/wire/delta.d.ts.map +1 -0
- package/dist/wire/delta.js +148 -0
- package/dist/wire/delta.js.map +1 -0
- package/dist/wire/errorEnvelope.d.ts +73 -0
- package/dist/wire/errorEnvelope.d.ts.map +1 -0
- package/dist/wire/errorEnvelope.js +124 -0
- package/dist/wire/errorEnvelope.js.map +1 -0
- package/dist/wire/feedCursor.d.ts +61 -0
- package/dist/wire/feedCursor.d.ts.map +1 -0
- package/dist/wire/feedCursor.js +83 -0
- package/dist/wire/feedCursor.js.map +1 -0
- package/dist/wire/feedEvent.d.ts +264 -0
- package/dist/wire/feedEvent.d.ts.map +1 -0
- package/dist/wire/feedEvent.js +66 -0
- package/dist/wire/feedEvent.js.map +1 -0
- package/dist/wire/frames.d.ts +195 -0
- package/dist/wire/frames.d.ts.map +1 -0
- package/dist/wire/frames.js +51 -0
- package/dist/wire/frames.js.map +1 -0
- package/dist/wire/inboundFrames.d.ts +490 -0
- package/dist/wire/inboundFrames.d.ts.map +1 -0
- package/dist/wire/inboundFrames.js +117 -0
- package/dist/wire/inboundFrames.js.map +1 -0
- package/dist/wire/index.d.ts +55 -0
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +84 -0
- package/dist/wire/index.js.map +1 -0
- package/dist/wire/listEnvelope.d.ts +38 -0
- package/dist/wire/listEnvelope.d.ts.map +1 -0
- package/dist/wire/listEnvelope.js +43 -0
- package/dist/wire/listEnvelope.js.map +1 -0
- package/dist/wire/modelMutations.d.ts +32 -0
- package/dist/wire/modelMutations.d.ts.map +1 -0
- package/dist/wire/modelMutations.js +53 -0
- package/dist/wire/modelMutations.js.map +1 -0
- package/dist/wire/modelResponses.d.ts +79 -0
- package/dist/wire/modelResponses.d.ts.map +1 -0
- package/dist/wire/modelResponses.js +44 -0
- package/dist/wire/modelResponses.js.map +1 -0
- package/dist/wire/modelShape.d.ts +79 -0
- package/dist/wire/modelShape.d.ts.map +1 -0
- package/dist/wire/modelShape.js +75 -0
- package/dist/wire/modelShape.js.map +1 -0
- package/dist/wire/protocol.d.ts +39 -0
- package/dist/wire/protocol.d.ts.map +1 -0
- package/dist/wire/protocol.js +39 -0
- package/dist/wire/protocol.js.map +1 -0
- package/dist/wire/protocolVersion.d.ts +74 -0
- package/dist/wire/protocolVersion.d.ts.map +1 -0
- package/dist/wire/protocolVersion.js +84 -0
- package/dist/wire/protocolVersion.js.map +1 -0
- package/package.json +187 -0
- package/src/ablo.ts +139 -0
- package/src/ai-sdk/coordinatedTool.ts +214 -0
- package/src/ai-sdk/index.ts +7 -0
- package/src/auth/apiKey.ts +540 -0
- package/src/auth/bootstrapScope.ts +15 -0
- package/src/auth/browserCredentialSafety.ts +48 -0
- package/src/auth/capability.ts +326 -0
- package/src/auth/capabilityLifecycle.ts +174 -0
- package/src/auth/credentialEndpoint.ts +79 -0
- package/src/auth/credentialEndpointProtocol.ts +51 -0
- package/src/auth/credentialKind.ts +20 -0
- package/src/auth/credentialPolicy.ts +244 -0
- package/src/auth/credentialResult.ts +23 -0
- package/src/auth/credentialSource.ts +99 -0
- package/src/auth/hostedEndpoints.ts +24 -0
- package/src/auth/identity.ts +330 -0
- package/src/auth/index.ts +592 -0
- package/src/auth/schemas.ts +94 -0
- package/src/auth/sessionMint.ts +126 -0
- package/src/auth/token.ts +4 -0
- package/src/batching/index.ts +200 -0
- package/src/coordination/awaitClaimGrant.ts +243 -0
- package/src/coordination/claimHeartbeatLoop.ts +165 -0
- package/src/coordination/claimMeta.ts +56 -0
- package/src/coordination/events.ts +86 -0
- package/src/coordination/index.ts +181 -0
- package/src/coordination/locator.ts +200 -0
- package/src/coordination/schema.ts +1346 -0
- package/src/coordination/targetConflict.ts +85 -0
- package/src/coordination/trace.ts +173 -0
- package/src/docs/catalog.ts +274 -0
- package/src/docs/index.ts +18 -0
- package/src/durableWrites.ts +134 -0
- package/src/environment.ts +132 -0
- package/src/errorCodes.ts +1591 -0
- package/src/errors.ts +918 -0
- package/src/footprint.ts +0 -0
- package/src/headlessClient.ts +161 -0
- package/src/index.ts +52 -0
- package/src/keys/index.ts +254 -0
- package/src/log/syncDeltaRow.ts +119 -0
- package/src/logger.ts +22 -0
- package/src/observability.ts +85 -0
- package/src/policy/types.ts +292 -0
- package/src/resources/functionalUpdate.ts +151 -0
- package/src/resources/httpResources.ts +520 -0
- package/src/resources/modelOperations.ts +444 -0
- package/src/resources/mutationOptions.ts +66 -0
- package/src/resources/where.ts +160 -0
- package/src/resources/writeOptionsSchema.ts +91 -0
- package/src/schema/coordination.ts +161 -0
- package/src/schema/ddl.ts +593 -0
- package/src/schema/ddlLock.ts +53 -0
- package/src/schema/diff.ts +489 -0
- package/src/schema/field.ts +321 -0
- package/src/schema/fieldRef.ts +88 -0
- package/src/schema/generate.ts +95 -0
- package/src/schema/index.ts +278 -0
- package/src/schema/loadStrategy.ts +52 -0
- package/src/schema/model.ts +476 -0
- package/src/schema/openapi.ts +658 -0
- package/src/schema/queries.ts +273 -0
- package/src/schema/relation.ts +291 -0
- package/src/schema/residency.ts +30 -0
- package/src/schema/roles.ts +325 -0
- package/src/schema/schema.ts +825 -0
- package/src/schema/select.ts +115 -0
- package/src/schema/serialize.ts +373 -0
- package/src/schema/sugar.ts +194 -0
- package/src/schema/tenancy.ts +221 -0
- package/src/server/adapter.ts +203 -0
- package/src/server/commit.ts +109 -0
- package/src/server/index.ts +26 -0
- package/src/server/readConfig.ts +82 -0
- package/src/server/storageMode.ts +20 -0
- package/src/source/adapter.ts +85 -0
- package/src/source/adapters/drizzle.ts +291 -0
- package/src/source/adapters/kysely.ts +346 -0
- package/src/source/adapters/kyselyMutationCore.ts +220 -0
- package/src/source/adapters/memory.ts +154 -0
- package/src/source/adapters/prisma.ts +282 -0
- package/src/source/conformance.ts +287 -0
- package/src/source/connector.ts +394 -0
- package/src/source/connectorProtocol.ts +189 -0
- package/src/source/contract.ts +221 -0
- package/src/source/drizzle.ts +1 -0
- package/src/source/factory.ts +444 -0
- package/src/source/idempotency.ts +189 -0
- package/src/source/index.ts +182 -0
- package/src/source/kysely.ts +2 -0
- package/src/source/migrations.ts +109 -0
- package/src/source/next.ts +38 -0
- package/src/source/pushQueue.ts +368 -0
- package/src/source/signing.ts +279 -0
- package/src/source/types.ts +502 -0
- package/src/syncLog/contract.ts +32 -0
- package/src/syncLog/index.ts +1 -0
- package/src/testing/fixtures/httpResponses.ts +155 -0
- package/src/transactionLayer.ts +122 -0
- package/src/transactions/settlement/commitEnvelope.ts +192 -0
- package/src/transactions/settlement/httpCommitEnvelope.ts +250 -0
- package/src/transactions/settlement/idempotencyKey.ts +11 -0
- package/src/transactions/settlement/pendingWrite.ts +24 -0
- package/src/transport/commitFrames.ts +225 -0
- package/src/transport/connectionManager.ts +856 -0
- package/src/transport/credentialLifecycle.ts +389 -0
- package/src/transport/heartbeat.ts +118 -0
- package/src/transport/httpClient.ts +354 -0
- package/src/transport/httpFeed.ts +111 -0
- package/src/transport/httpOptions.ts +41 -0
- package/src/transport/httpTransport.ts +1976 -0
- package/src/transport/networkProbe.ts +249 -0
- package/src/transport/wsFrameHandlers.ts +619 -0
- package/src/transport/wsTransport.ts +1491 -0
- package/src/types/assertExact.ts +17 -0
- package/src/types/global.ts +123 -0
- package/src/types/index.ts +270 -0
- package/src/types/modelData.ts +11 -0
- package/src/types/participant.ts +22 -0
- package/src/types/streams.ts +702 -0
- package/src/utils/asyncIterator.ts +141 -0
- package/src/utils/duration.ts +88 -0
- package/src/utils/json.ts +281 -0
- package/src/webhooks/events.ts +96 -0
- package/src/webhooks/index.ts +12 -0
- package/src/wire/accountResponses.ts +328 -0
- package/src/wire/auth.ts +86 -0
- package/src/wire/bootstrapReason.ts +10 -0
- package/src/wire/claimEvent.ts +85 -0
- package/src/wire/claims.ts +370 -0
- package/src/wire/commit.ts +379 -0
- package/src/wire/delta.ts +173 -0
- package/src/wire/errorEnvelope.ts +133 -0
- package/src/wire/feedCursor.ts +91 -0
- package/src/wire/feedEvent.ts +74 -0
- package/src/wire/frames.ts +77 -0
- package/src/wire/inboundFrames.ts +182 -0
- package/src/wire/index.ts +328 -0
- package/src/wire/listEnvelope.ts +51 -0
- package/src/wire/modelMutations.ts +55 -0
- package/src/wire/modelResponses.ts +48 -0
- package/src/wire/modelShape.ts +83 -0
- package/src/wire/protocol.ts +39 -0
- package/src/wire/protocolVersion.ts +97 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The where-clause grammar carried by a filtered read.
|
|
3
|
+
*
|
|
4
|
+
* A `where` is a flat list of `[column, operator, value]` conditions combined
|
|
5
|
+
* with AND. The protocol carries no model-specific logic: the server compiles a
|
|
6
|
+
* condition against your schema, so adding a model or relation is a schema
|
|
7
|
+
* change rather than a server change.
|
|
8
|
+
*
|
|
9
|
+
* The `IN` operator lets you batch a read by any column, including a foreign
|
|
10
|
+
* key — for example, fetching every block whose `sectionId` falls in a set of ids.
|
|
11
|
+
*
|
|
12
|
+
* These types describe the *request*, not any local copy of the rows it returns,
|
|
13
|
+
* so they live with the settlement core rather than the reactive consumer.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { AbloValidationError } from '../errors.js';
|
|
17
|
+
/**
|
|
18
|
+
* The comparison operators a {@link WhereClause} may use: equality and
|
|
19
|
+
* inequality, ordering, set membership (`IN` / `NOT IN`), null checks
|
|
20
|
+
* (`IS` / `IS NOT`), and case-sensitive or case-insensitive pattern
|
|
21
|
+
* matching (`LIKE`, `ILIKE`, and their negations).
|
|
22
|
+
*/
|
|
23
|
+
export const whereOpSchema = z.enum([
|
|
24
|
+
'=',
|
|
25
|
+
'!=',
|
|
26
|
+
'<',
|
|
27
|
+
'<=',
|
|
28
|
+
'>',
|
|
29
|
+
'>=',
|
|
30
|
+
'IN',
|
|
31
|
+
'NOT IN',
|
|
32
|
+
'IS',
|
|
33
|
+
'IS NOT',
|
|
34
|
+
'LIKE',
|
|
35
|
+
'NOT LIKE',
|
|
36
|
+
'ILIKE',
|
|
37
|
+
'NOT ILIKE',
|
|
38
|
+
]);
|
|
39
|
+
/**
|
|
40
|
+
* How each operator binds its operand — the classification a compiler needs
|
|
41
|
+
* before it can render or evaluate a condition: a scalar on the right, an array
|
|
42
|
+
* to expand, or a null check with no operand at all. `LIKE_OPS` is the subset
|
|
43
|
+
* whose operand is a pattern and therefore needs pattern validation.
|
|
44
|
+
*
|
|
45
|
+
* These live here, beside the operators, because every consumer of the grammar
|
|
46
|
+
* needs the same split and there is more than one consumer: a where clause is
|
|
47
|
+
* compiled to SQL on a hosted plane and evaluated in memory against the log on
|
|
48
|
+
* a source plane. Two hand-maintained copies of this split meant the same
|
|
49
|
+
* request could be accepted by one plane and rejected by the other — and the
|
|
50
|
+
* pattern-safety set existed on only one of them.
|
|
51
|
+
*/
|
|
52
|
+
export const WHERE_SCALAR_OPS = new Set([
|
|
53
|
+
'=',
|
|
54
|
+
'!=',
|
|
55
|
+
'<',
|
|
56
|
+
'<=',
|
|
57
|
+
'>',
|
|
58
|
+
'>=',
|
|
59
|
+
'LIKE',
|
|
60
|
+
'NOT LIKE',
|
|
61
|
+
'ILIKE',
|
|
62
|
+
'NOT ILIKE',
|
|
63
|
+
]);
|
|
64
|
+
export const WHERE_ARRAY_OPS = new Set(['IN', 'NOT IN']);
|
|
65
|
+
export const WHERE_NULL_OPS = new Set(['IS', 'IS NOT']);
|
|
66
|
+
export const WHERE_LIKE_OPS = new Set([
|
|
67
|
+
'LIKE',
|
|
68
|
+
'NOT LIKE',
|
|
69
|
+
'ILIKE',
|
|
70
|
+
'NOT ILIKE',
|
|
71
|
+
]);
|
|
72
|
+
/**
|
|
73
|
+
* Does this operator accept this operand? The rule the sets above imply, stated
|
|
74
|
+
* once and thrown once.
|
|
75
|
+
*
|
|
76
|
+
* The sets were collapsed here because two copies of the split let one plane
|
|
77
|
+
* accept a request the other refused. The check that consumes them stayed
|
|
78
|
+
* duplicated — the SQL compiler and the log-plane evaluator each carried their
|
|
79
|
+
* own arity tests and their own wording — which leaves the same gap one step
|
|
80
|
+
* further along: relax `IN` in one evaluator and a request succeeds against a
|
|
81
|
+
* hosted plane and fails against a connected one, with no test in a position to
|
|
82
|
+
* notice.
|
|
83
|
+
*
|
|
84
|
+
* Returns the classification the caller needs next, so the check and the branch
|
|
85
|
+
* are the same statement rather than two that can disagree.
|
|
86
|
+
*/
|
|
87
|
+
export function classifyWhereOperand(op, value) {
|
|
88
|
+
if (WHERE_NULL_OPS.has(op)) {
|
|
89
|
+
if (value !== null) {
|
|
90
|
+
throw new AbloValidationError(`${op} only supports null RHS`, {
|
|
91
|
+
code: 'query_unsupported_operator',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return 'null';
|
|
95
|
+
}
|
|
96
|
+
if (WHERE_ARRAY_OPS.has(op)) {
|
|
97
|
+
if (!Array.isArray(value)) {
|
|
98
|
+
throw new AbloValidationError(`${op} requires an array RHS`, {
|
|
99
|
+
code: 'query_unsupported_operator',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return 'array';
|
|
103
|
+
}
|
|
104
|
+
if (WHERE_SCALAR_OPS.has(op)) {
|
|
105
|
+
if (Array.isArray(value)) {
|
|
106
|
+
throw new AbloValidationError(`${op} requires a scalar RHS`, {
|
|
107
|
+
code: 'query_unsupported_operator',
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return 'scalar';
|
|
111
|
+
}
|
|
112
|
+
throw new AbloValidationError(`unsupported operator: ${op}`, {
|
|
113
|
+
code: 'query_unsupported_operator',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=where.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/resources/where.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB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CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,mBAAmB,CAAC,GAAG,EAAE,wBAAwB,EAAE;gBAC3D,IAAI,EAAE,4BAA4B;aACnC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,mBAAmB,CAAC,GAAG,EAAE,wBAAwB,EAAE;gBAC3D,IAAI,EAAE,4BAA4B;aACnC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,mBAAmB,CAAC,yBAAyB,EAAE,EAAE,EAAE;QAC3D,IAAI,EAAE,4BAA4B;KACnC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Zod schema for write options — the settings accepted by every write
|
|
3
|
+
* entry point, including `ablo.<model>.create/update/delete`, `commits.create`,
|
|
4
|
+
* and the HTTP write routes. Each of those boundaries validates against this
|
|
5
|
+
* one schema, so a caller who passes, say, `onStale: 'rejct'` fails right away
|
|
6
|
+
* with a typed {@link AbloValidationError} at the call site instead of silently
|
|
7
|
+
* or with a 400 from the server.
|
|
8
|
+
*
|
|
9
|
+
* The schema is the runtime counterpart of the {@link MutationOptions}
|
|
10
|
+
* interface. A compile-time check at the bottom of this file asserts that the
|
|
11
|
+
* two describe the same shape, so they cannot drift apart.
|
|
12
|
+
*
|
|
13
|
+
* Validation only inspects; it never transforms. Callers keep the exact options
|
|
14
|
+
* object they passed in. This matters because the `claim` field can hold a live
|
|
15
|
+
* claim handle whose `release` and `revoke` functions must survive, so the code
|
|
16
|
+
* asserts the shape rather than replacing the value with a parsed copy.
|
|
17
|
+
*/
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
import { onStaleModeSchema } from '../coordination/schema.js';
|
|
20
|
+
export { onStaleModeSchema };
|
|
21
|
+
export declare const writeOptionsSchema: z.ZodObject<{
|
|
22
|
+
idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
label: z.ZodOptional<z.ZodString>;
|
|
24
|
+
wait: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
queued: "queued";
|
|
26
|
+
confirmed: "confirmed";
|
|
27
|
+
}>>;
|
|
28
|
+
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
29
|
+
onStale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
30
|
+
reject: "reject";
|
|
31
|
+
overwrite: "overwrite";
|
|
32
|
+
notify: "notify";
|
|
33
|
+
}>>>;
|
|
34
|
+
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
claim: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
}, z.core.$loose>]>>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type WriteOptionsInput = z.infer<typeof writeOptionsSchema>;
|
|
40
|
+
/**
|
|
41
|
+
* Validates a write-options object against {@link writeOptionsSchema}. On
|
|
42
|
+
* failure it throws a typed {@link AbloValidationError} — with
|
|
43
|
+
* `code: 'write_options_invalid'` and a `param` pointing at the offending
|
|
44
|
+
* field — and on success returns nothing, leaving the caller's original object
|
|
45
|
+
* untouched. A `null` or `undefined` value passes.
|
|
46
|
+
*/
|
|
47
|
+
export declare function assertWriteOptions(value: unknown, context?: string): void;
|
|
48
|
+
//# sourceMappingURL=writeOptionsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeOptionsSchema.d.ts","sourceRoot":"","sources":["../../src/resources/writeOptionsSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAoB7B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAezE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Zod schema for write options — the settings accepted by every write
|
|
3
|
+
* entry point, including `ablo.<model>.create/update/delete`, `commits.create`,
|
|
4
|
+
* and the HTTP write routes. Each of those boundaries validates against this
|
|
5
|
+
* one schema, so a caller who passes, say, `onStale: 'rejct'` fails right away
|
|
6
|
+
* with a typed {@link AbloValidationError} at the call site instead of silently
|
|
7
|
+
* or with a 400 from the server.
|
|
8
|
+
*
|
|
9
|
+
* The schema is the runtime counterpart of the {@link MutationOptions}
|
|
10
|
+
* interface. A compile-time check at the bottom of this file asserts that the
|
|
11
|
+
* two describe the same shape, so they cannot drift apart.
|
|
12
|
+
*
|
|
13
|
+
* Validation only inspects; it never transforms. Callers keep the exact options
|
|
14
|
+
* object they passed in. This matters because the `claim` field can hold a live
|
|
15
|
+
* claim handle whose `release` and `revoke` functions must survive, so the code
|
|
16
|
+
* asserts the shape rather than replacing the value with a parsed copy.
|
|
17
|
+
*/
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
import { AbloValidationError } from '../errors.js';
|
|
20
|
+
import { commitWaitSchema } from '../wire/commit.js';
|
|
21
|
+
import { onStaleModeSchema } from '../coordination/schema.js';
|
|
22
|
+
// Re-exported, not redeclared. `coordination/schema.ts` owns this enum — it is
|
|
23
|
+
// what the wire schemas and the server validate against — while the published
|
|
24
|
+
// SDK barrel exports the name from this module. Declaring it twice put a second
|
|
25
|
+
// object behind the public export that agreed with the canonical one only by
|
|
26
|
+
// both happening to list the same three strings.
|
|
27
|
+
export { onStaleModeSchema };
|
|
28
|
+
export const writeOptionsSchema = z.object({
|
|
29
|
+
/** Idempotency key the server records in `mutation_log` to make retries
|
|
30
|
+
* safe; `null` opts out of that protection. */
|
|
31
|
+
idempotencyKey: z.string().min(1).max(255).nullish(),
|
|
32
|
+
/** Human-readable audit tag, persisted to `mutation_log.label`. */
|
|
33
|
+
label: z.string().max(255).optional(),
|
|
34
|
+
/** Resolve when queued locally (default) or once the server confirms. */
|
|
35
|
+
wait: commitWaitSchema.optional(),
|
|
36
|
+
/** Stale guard: the sync watermark the caller's reasoning was based on. */
|
|
37
|
+
readAt: z.number().int().nonnegative().nullish(),
|
|
38
|
+
/** What the server does when the target moved past `readAt`. */
|
|
39
|
+
onStale: onStaleModeSchema.nullish(),
|
|
40
|
+
/** The held claim's fencing token (Option B), sourced from the claim handle
|
|
41
|
+
* rather than set by hand; the server validates it against the entity's
|
|
42
|
+
* high-water. Kept in the schema so it stays aligned with `MutationOptions`
|
|
43
|
+
* (the drift guard below) and a malformed token is rejected at the boundary. */
|
|
44
|
+
fenceToken: z.number().nullish(),
|
|
45
|
+
/** The claim this write belongs to — either a claim id, or a live claim
|
|
46
|
+
* handle whose `release`/`revoke` functions are preserved untouched. */
|
|
47
|
+
claim: z.union([z.string(), z.looseObject({ id: z.string() })]).nullish(),
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Validates a write-options object against {@link writeOptionsSchema}. On
|
|
51
|
+
* failure it throws a typed {@link AbloValidationError} — with
|
|
52
|
+
* `code: 'write_options_invalid'` and a `param` pointing at the offending
|
|
53
|
+
* field — and on success returns nothing, leaving the caller's original object
|
|
54
|
+
* untouched. A `null` or `undefined` value passes.
|
|
55
|
+
*/
|
|
56
|
+
export function assertWriteOptions(value, context) {
|
|
57
|
+
if (value == null)
|
|
58
|
+
return;
|
|
59
|
+
const result = writeOptionsSchema.safeParse(value);
|
|
60
|
+
if (result.success)
|
|
61
|
+
return;
|
|
62
|
+
const issue = result.error.issues[0];
|
|
63
|
+
const path = issue?.path.map(String).join('.') ?? '';
|
|
64
|
+
throw new AbloValidationError(`Invalid write options${context ? ` on \`${context}\`` : ''}${path ? ` at \`${path}\`` : ''}: ${issue?.message ?? 'failed validation'}.`, {
|
|
65
|
+
code: 'write_options_invalid',
|
|
66
|
+
...(path ? { param: path } : {}),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const _writeOptionsContractInSync = [
|
|
70
|
+
true,
|
|
71
|
+
true,
|
|
72
|
+
];
|
|
73
|
+
void _writeOptionsContractInSync;
|
|
74
|
+
//# sourceMappingURL=writeOptionsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeOptionsSchema.js","sourceRoot":"","sources":["../../src/resources/writeOptionsSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,+EAA+E;AAC/E,8EAA8E;AAC9E,gFAAgF;AAChF,6EAA6E;AAC7E,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC;oDACgD;IAChD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE;IACpD,mEAAmE;IACnE,KAA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AAO,IAAI,mBAAmB,GAAG,EAC7C;QACE,IAAI,EAAE,uBAAuB;QAC7B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjC,CACF,CAAC;AACJ,CAAC;AASD,MAAM,2BAA2B,GAA6D;IAC5F,IAAI;IACJ,IAAI;CACL,CAAC;AACF,KAAK,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authoring helpers for a model's `conflict` axis — the setting that decides
|
|
3
|
+
* what happens when two writers touch the same row. Instead of writing a raw
|
|
4
|
+
* disposition map, you name the rules the way the rest of the schema DSL reads
|
|
5
|
+
* (`relation.belongsTo()`, `field.string()`), and chain them the way a field
|
|
6
|
+
* chains its own modifiers:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { coordination } from '@abloatai/transaction/schema';
|
|
10
|
+
*
|
|
11
|
+
* conflict: coordination.humansOverwrite().agentsReject()
|
|
12
|
+
* // → { user: 'overwrite', agent: 'reject' } (a human's write wins, an agent's yields)
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Each rule is named for the disposition it applies — drawn from the same
|
|
16
|
+
* `overwrite | reject | notify` vocabulary the write guards use (`onStale`) —
|
|
17
|
+
* and every one of them is also available as a standalone function, which
|
|
18
|
+
* {@link coordination} merges when the rules are assembled dynamically rather
|
|
19
|
+
* than written out:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* conflict: coordination(humansOverwrite(), agentsReject())
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Either way the result is plain, serializable data that the engine reads at
|
|
26
|
+
* commit time. The `humans`/`agents` wording belongs to the author; the `user`/
|
|
27
|
+
* `agent`/`system` keys belong to the wire, and this module is the one place
|
|
28
|
+
* the two are mapped to each other.
|
|
29
|
+
*/
|
|
30
|
+
import type { ConflictAxis } from '../policy/types.js';
|
|
31
|
+
/**
|
|
32
|
+
* One coordination rule: a partial {@link ConflictAxis} produced by a
|
|
33
|
+
* disposition helper below. Compose with {@link coordination}.
|
|
34
|
+
*/
|
|
35
|
+
export type ConflictRule = ConflictAxis;
|
|
36
|
+
/** A human's conflicting write wins and overwrites the other; it is never blocked. Among humans this gives last-write-wins. */
|
|
37
|
+
export declare const humansOverwrite: () => ConflictRule;
|
|
38
|
+
/** A human's conflicting write is rejected, yielding to a held claim or a stale snapshot. */
|
|
39
|
+
export declare const humansReject: () => ConflictRule;
|
|
40
|
+
/** A human's stale write triggers a notification: it re-reads and re-applies rather than clobbering. */
|
|
41
|
+
export declare const humansNotify: () => ConflictRule;
|
|
42
|
+
/** An agent's conflicting write wins and overwrites the other (rarely what you want). */
|
|
43
|
+
export declare const agentsOverwrite: () => ConflictRule;
|
|
44
|
+
/** An agent's conflicting write is rejected, yielding to a held claim or a stale snapshot. */
|
|
45
|
+
export declare const agentsReject: () => ConflictRule;
|
|
46
|
+
/** An agent's stale write triggers a notification: it re-reads and re-applies rather than clobbering. */
|
|
47
|
+
export declare const agentsNotify: () => ConflictRule;
|
|
48
|
+
/** A system or automation write wins and overwrites the other. */
|
|
49
|
+
export declare const systemOverwrite: () => ConflictRule;
|
|
50
|
+
/** A system or automation write is rejected. */
|
|
51
|
+
export declare const systemReject: () => ConflictRule;
|
|
52
|
+
/** A system or automation stale write triggers a notification: it re-reads and re-applies. */
|
|
53
|
+
export declare const systemNotify: () => ConflictRule;
|
|
54
|
+
/**
|
|
55
|
+
* A conflict axis that is still open to more rules. Every method applies one
|
|
56
|
+
* disposition and hands back a new axis, so a model's whole stance reads as a
|
|
57
|
+
* single sentence and the reader never has to hold a merge in their head.
|
|
58
|
+
*
|
|
59
|
+
* Each method delegates to the standalone rule of the same name, so a
|
|
60
|
+
* disposition map like `{ user: 'overwrite' }` is written in exactly one place
|
|
61
|
+
* no matter which authoring style a schema uses. Dispositions are own
|
|
62
|
+
* enumerable properties and the methods live on the prototype, so an axis
|
|
63
|
+
* serializes to the same plain object the server has always received.
|
|
64
|
+
*/
|
|
65
|
+
declare class CoordinationAxis implements ConflictAxis {
|
|
66
|
+
readonly user?: ConflictAxis['user'];
|
|
67
|
+
readonly agent?: ConflictAxis['agent'];
|
|
68
|
+
readonly system?: ConflictAxis['system'];
|
|
69
|
+
constructor(axis: ConflictAxis);
|
|
70
|
+
/** Apply one more rule, later winning on a repeated kind. */
|
|
71
|
+
private and;
|
|
72
|
+
humansOverwrite(): CoordinationAxis;
|
|
73
|
+
humansReject(): CoordinationAxis;
|
|
74
|
+
humansNotify(): CoordinationAxis;
|
|
75
|
+
agentsOverwrite(): CoordinationAxis;
|
|
76
|
+
agentsReject(): CoordinationAxis;
|
|
77
|
+
agentsNotify(): CoordinationAxis;
|
|
78
|
+
systemOverwrite(): CoordinationAxis;
|
|
79
|
+
systemReject(): CoordinationAxis;
|
|
80
|
+
systemNotify(): CoordinationAxis;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Merges coordination rules into a single {@link ConflictAxis}. Later rules win
|
|
84
|
+
* on key collisions, and a committer kind you leave out falls through to the
|
|
85
|
+
* engine's default at commit time.
|
|
86
|
+
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* coordination(humansOverwrite(), agentsReject()) // → { user: 'overwrite', agent: 'reject' }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
declare function mergeRules(...rules: readonly ConflictRule[]): ConflictAxis;
|
|
92
|
+
/**
|
|
93
|
+
* The coordination vocabulary, reachable through one name. Call it to merge
|
|
94
|
+
* rules you have assembled; reach through it to start a chain.
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* conflict: coordination.humansOverwrite().agentsReject()
|
|
98
|
+
* conflict: coordination(humansOverwrite(), agentsReject())
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare const coordination: typeof mergeRules & {
|
|
102
|
+
humansOverwrite: () => CoordinationAxis;
|
|
103
|
+
humansReject: () => CoordinationAxis;
|
|
104
|
+
humansNotify: () => CoordinationAxis;
|
|
105
|
+
agentsOverwrite: () => CoordinationAxis;
|
|
106
|
+
agentsReject: () => CoordinationAxis;
|
|
107
|
+
agentsNotify: () => CoordinationAxis;
|
|
108
|
+
systemOverwrite: () => CoordinationAxis;
|
|
109
|
+
systemReject: () => CoordinationAxis;
|
|
110
|
+
systemNotify: () => CoordinationAxis;
|
|
111
|
+
};
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=coordination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination.d.ts","sourceRoot":"","sources":["../../src/schema/coordination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AAGxC,+HAA+H;AAC/H,eAAO,MAAM,eAAe,QAAO,YAAuC,CAAC;AAC3E,6FAA6F;AAC7F,eAAO,MAAM,YAAY,QAAO,YAAoC,CAAC;AACrE,wGAAwG;AACxG,eAAO,MAAM,YAAY,QAAO,YAAoC,CAAC;AAGrE,yFAAyF;AACzF,eAAO,MAAM,eAAe,QAAO,YAAwC,CAAC;AAC5E,8FAA8F;AAC9F,eAAO,MAAM,YAAY,QAAO,YAAqC,CAAC;AACtE,yGAAyG;AACzG,eAAO,MAAM,YAAY,QAAO,YAAqC,CAAC;AAGtE,kEAAkE;AAClE,eAAO,MAAM,eAAe,QAAO,YAAyC,CAAC;AAC7E,gDAAgD;AAChD,eAAO,MAAM,YAAY,QAAO,YAAsC,CAAC;AACvE,8FAA8F;AAC9F,eAAO,MAAM,YAAY,QAAO,YAAsC,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,cAAM,gBAAiB,YAAW,YAAY;IAM5C,SAAiB,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7C,SAAiB,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/C,SAAiB,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAErC,IAAI,EAAE,YAAY;IAO9B,6DAA6D;IAC7D,OAAO,CAAC,GAAG;IAQX,eAAe,IAAI,gBAAgB;IAGnC,YAAY,IAAI,gBAAgB;IAGhC,YAAY,IAAI,gBAAgB;IAGhC,eAAe,IAAI,gBAAgB;IAGnC,YAAY,IAAI,gBAAgB;IAGhC,YAAY,IAAI,gBAAgB;IAGhC,eAAe,IAAI,gBAAgB;IAGnC,YAAY,IAAI,gBAAgB;IAGhC,YAAY,IAAI,gBAAgB;CAGjC;AAED;;;;;;;;GAQG;AACH,iBAAS,UAAU,CAAC,GAAG,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,CAEnE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;2BACF,gBAAgB;wBACnB,gBAAgB;wBAChB,gBAAgB;2BACb,gBAAgB;wBACnB,gBAAgB;wBAChB,gBAAgB;2BACb,gBAAgB;wBACnB,gBAAgB;wBAChB,gBAAgB;CAClC,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authoring helpers for a model's `conflict` axis — the setting that decides
|
|
3
|
+
* what happens when two writers touch the same row. Instead of writing a raw
|
|
4
|
+
* disposition map, you name the rules the way the rest of the schema DSL reads
|
|
5
|
+
* (`relation.belongsTo()`, `field.string()`), and chain them the way a field
|
|
6
|
+
* chains its own modifiers:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { coordination } from '@abloatai/transaction/schema';
|
|
10
|
+
*
|
|
11
|
+
* conflict: coordination.humansOverwrite().agentsReject()
|
|
12
|
+
* // → { user: 'overwrite', agent: 'reject' } (a human's write wins, an agent's yields)
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Each rule is named for the disposition it applies — drawn from the same
|
|
16
|
+
* `overwrite | reject | notify` vocabulary the write guards use (`onStale`) —
|
|
17
|
+
* and every one of them is also available as a standalone function, which
|
|
18
|
+
* {@link coordination} merges when the rules are assembled dynamically rather
|
|
19
|
+
* than written out:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* conflict: coordination(humansOverwrite(), agentsReject())
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Either way the result is plain, serializable data that the engine reads at
|
|
26
|
+
* commit time. The `humans`/`agents` wording belongs to the author; the `user`/
|
|
27
|
+
* `agent`/`system` keys belong to the wire, and this module is the one place
|
|
28
|
+
* the two are mapped to each other.
|
|
29
|
+
*/
|
|
30
|
+
// ── Humans (user sessions) ──────────────────────────────────────────────
|
|
31
|
+
/** A human's conflicting write wins and overwrites the other; it is never blocked. Among humans this gives last-write-wins. */
|
|
32
|
+
export const humansOverwrite = () => ({ user: 'overwrite' });
|
|
33
|
+
/** A human's conflicting write is rejected, yielding to a held claim or a stale snapshot. */
|
|
34
|
+
export const humansReject = () => ({ user: 'reject' });
|
|
35
|
+
/** A human's stale write triggers a notification: it re-reads and re-applies rather than clobbering. */
|
|
36
|
+
export const humansNotify = () => ({ user: 'notify' });
|
|
37
|
+
// ── Agents (AI) ─────────────────────────────────────────────────────────
|
|
38
|
+
/** An agent's conflicting write wins and overwrites the other (rarely what you want). */
|
|
39
|
+
export const agentsOverwrite = () => ({ agent: 'overwrite' });
|
|
40
|
+
/** An agent's conflicting write is rejected, yielding to a held claim or a stale snapshot. */
|
|
41
|
+
export const agentsReject = () => ({ agent: 'reject' });
|
|
42
|
+
/** An agent's stale write triggers a notification: it re-reads and re-applies rather than clobbering. */
|
|
43
|
+
export const agentsNotify = () => ({ agent: 'notify' });
|
|
44
|
+
// ── System / automation ─────────────────────────────────────────────────
|
|
45
|
+
/** A system or automation write wins and overwrites the other. */
|
|
46
|
+
export const systemOverwrite = () => ({ system: 'overwrite' });
|
|
47
|
+
/** A system or automation write is rejected. */
|
|
48
|
+
export const systemReject = () => ({ system: 'reject' });
|
|
49
|
+
/** A system or automation stale write triggers a notification: it re-reads and re-applies. */
|
|
50
|
+
export const systemNotify = () => ({ system: 'notify' });
|
|
51
|
+
/**
|
|
52
|
+
* A conflict axis that is still open to more rules. Every method applies one
|
|
53
|
+
* disposition and hands back a new axis, so a model's whole stance reads as a
|
|
54
|
+
* single sentence and the reader never has to hold a merge in their head.
|
|
55
|
+
*
|
|
56
|
+
* Each method delegates to the standalone rule of the same name, so a
|
|
57
|
+
* disposition map like `{ user: 'overwrite' }` is written in exactly one place
|
|
58
|
+
* no matter which authoring style a schema uses. Dispositions are own
|
|
59
|
+
* enumerable properties and the methods live on the prototype, so an axis
|
|
60
|
+
* serializes to the same plain object the server has always received.
|
|
61
|
+
*/
|
|
62
|
+
class CoordinationAxis {
|
|
63
|
+
constructor(axis) {
|
|
64
|
+
Object.assign(this, Object.fromEntries(Object.entries(axis).filter(([, mode]) => mode !== undefined)));
|
|
65
|
+
}
|
|
66
|
+
/** Apply one more rule, later winning on a repeated kind. */
|
|
67
|
+
and(rule) {
|
|
68
|
+
// Assigned rather than spread, and for the reason the merge form below
|
|
69
|
+
// assigns too: what carries forward is the dispositions, which are own
|
|
70
|
+
// enumerable properties. The chaining methods live on the prototype and the
|
|
71
|
+
// constructor puts them back, so a chain accumulates nothing but data.
|
|
72
|
+
return new CoordinationAxis(Object.assign({}, this, rule));
|
|
73
|
+
}
|
|
74
|
+
humansOverwrite() {
|
|
75
|
+
return this.and(humansOverwrite());
|
|
76
|
+
}
|
|
77
|
+
humansReject() {
|
|
78
|
+
return this.and(humansReject());
|
|
79
|
+
}
|
|
80
|
+
humansNotify() {
|
|
81
|
+
return this.and(humansNotify());
|
|
82
|
+
}
|
|
83
|
+
agentsOverwrite() {
|
|
84
|
+
return this.and(agentsOverwrite());
|
|
85
|
+
}
|
|
86
|
+
agentsReject() {
|
|
87
|
+
return this.and(agentsReject());
|
|
88
|
+
}
|
|
89
|
+
agentsNotify() {
|
|
90
|
+
return this.and(agentsNotify());
|
|
91
|
+
}
|
|
92
|
+
systemOverwrite() {
|
|
93
|
+
return this.and(systemOverwrite());
|
|
94
|
+
}
|
|
95
|
+
systemReject() {
|
|
96
|
+
return this.and(systemReject());
|
|
97
|
+
}
|
|
98
|
+
systemNotify() {
|
|
99
|
+
return this.and(systemNotify());
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Merges coordination rules into a single {@link ConflictAxis}. Later rules win
|
|
104
|
+
* on key collisions, and a committer kind you leave out falls through to the
|
|
105
|
+
* engine's default at commit time.
|
|
106
|
+
*
|
|
107
|
+
* ```ts
|
|
108
|
+
* coordination(humansOverwrite(), agentsReject()) // → { user: 'overwrite', agent: 'reject' }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
function mergeRules(...rules) {
|
|
112
|
+
return Object.assign({}, ...rules);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The coordination vocabulary, reachable through one name. Call it to merge
|
|
116
|
+
* rules you have assembled; reach through it to start a chain.
|
|
117
|
+
*
|
|
118
|
+
* ```ts
|
|
119
|
+
* conflict: coordination.humansOverwrite().agentsReject()
|
|
120
|
+
* conflict: coordination(humansOverwrite(), agentsReject())
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export const coordination = Object.assign(mergeRules, {
|
|
124
|
+
humansOverwrite: () => new CoordinationAxis(humansOverwrite()),
|
|
125
|
+
humansReject: () => new CoordinationAxis(humansReject()),
|
|
126
|
+
humansNotify: () => new CoordinationAxis(humansNotify()),
|
|
127
|
+
agentsOverwrite: () => new CoordinationAxis(agentsOverwrite()),
|
|
128
|
+
agentsReject: () => new CoordinationAxis(agentsReject()),
|
|
129
|
+
agentsNotify: () => new CoordinationAxis(agentsNotify()),
|
|
130
|
+
systemOverwrite: () => new CoordinationAxis(systemOverwrite()),
|
|
131
|
+
systemReject: () => new CoordinationAxis(systemReject()),
|
|
132
|
+
systemNotify: () => new CoordinationAxis(systemNotify()),
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=coordination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination.js","sourceRoot":"","sources":["../../src/schema/coordination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH,2EAA2E;AAC3E,+HAA+H;AAC/H,MAAM,CAAC,MAAM,eAAe,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC3E,6FAA6F;AAC7F,MAAM,CAAC,MAAM,YAAY,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACrE,wGAAwG;AACxG,MAAM,CAAC,MAAM,YAAY,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AAErE,2EAA2E;AAC3E,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AAC5E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,YAAY,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AACtE,yGAAyG;AACzG,MAAM,CAAC,MAAM,YAAY,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AAEtE,2EAA2E;AAC3E,kEAAkE;AAClE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAiB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AAC7E,gDAAgD;AAChD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAiB,EAAE,CAAC,C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ema built with `defineSchema(...)` and serialized to
|
|
4
|
+
* {@link SchemaJSON} is the single source of truth, and this module lowers it to
|
|
5
|
+
* ordered SQL strings.
|
|
6
|
+
*
|
|
7
|
+
* The same generators run wherever tables are created — in a hosted server
|
|
8
|
+
* applying them to the Postgres it manages, and in the `ablo migrate` CLI
|
|
9
|
+
* applying them to a customer's own Postgres — so the SQL, from column types to
|
|
10
|
+
* row-level security to enum checks, is identical no matter who runs it.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is pure: it returns strings and touches no database. The
|
|
13
|
+
* execution side — the transaction and advisory lock that actually run the
|
|
14
|
+
* statements — lives with each caller, because it is coupled to that caller's
|
|
15
|
+
* Postgres client and error types.
|
|
16
|
+
*
|
|
17
|
+
* - {@link generateProvisionPlan} builds an additive, idempotent plan (CREATE
|
|
18
|
+
* and ADD … IF NOT EXISTS, plus row-level security) that never loses data —
|
|
19
|
+
* the "create my tables" primitive.
|
|
20
|
+
* - {@link generateMigrationPlan} is its destructive-aware counterpart, driven
|
|
21
|
+
* by a {@link diffSchema} step list: drops, renames, type casts, and
|
|
22
|
+
* backfills.
|
|
23
|
+
*/
|
|
24
|
+
import type { SchemaJSON, ModelJSON } from './serialize.js';
|
|
25
|
+
import type { MigrationStep, BackfillValue } from './diff.js';
|
|
26
|
+
export interface ProvisionPlan {
|
|
27
|
+
/** The Postgres schema the tables live in (`app_<id>` or `public`). */
|
|
28
|
+
readonly appSchema: string;
|
|
29
|
+
/** Ordered, idempotent DDL statements. Safe to run repeatedly. Executors run
|
|
30
|
+
* these together in one transaction. */
|
|
31
|
+
readonly statements: readonly string[];
|
|
32
|
+
/** Post-commit, non-transactional DDL (`VALIDATE CONSTRAINT`, `CREATE INDEX
|
|
33
|
+
* CONCURRENTLY`) — run after {@link statements} commit, each outside any
|
|
34
|
+
* transaction, best-effort. Keeps the lock-heavy and scan-heavy work off the
|
|
35
|
+
* main transaction so adding a foreign key never freezes a large, live table.
|
|
36
|
+
* Optional: when absent, there is nothing to run. */
|
|
37
|
+
readonly concurrent?: readonly string[];
|
|
38
|
+
}
|
|
39
|
+
export interface ProvisionOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Emit `DEFERRABLE INITIALLY DEFERRED` foreign-key constraints for the
|
|
42
|
+
* belongsTo relations that opt in; see {@link foreignKeyStatements} for exactly
|
|
43
|
+
* which relations qualify. Off by default, so soft references keep out-of-order
|
|
44
|
+
* sync robust. Turn it on for a customer's own database, where a clean,
|
|
45
|
+
* navigable relational schema is wanted and the database starts empty, so a
|
|
46
|
+
* constraint has nothing to fail against.
|
|
47
|
+
*/
|
|
48
|
+
readonly foreignKeys?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface MigrationPlan {
|
|
51
|
+
/** The app Postgres schema the DDL targets (`app_<id>` or `public`). */
|
|
52
|
+
readonly appSchema: string;
|
|
53
|
+
/** Ordered DDL statements (expand → contract). Run in one transaction. */
|
|
54
|
+
readonly statements: readonly string[];
|
|
55
|
+
/** Post-commit, non-transactional DDL — see {@link ProvisionPlan.concurrent}. */
|
|
56
|
+
readonly concurrent?: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/** Per-app schema name for an app (organization) id. */
|
|
59
|
+
export declare function appSchemaName(organizationId: string): string;
|
|
60
|
+
export declare function camelToSnake(identifier: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Converts snake_case to camelCase — the inverse of {@link camelToSnake}. This
|
|
63
|
+
* is the read-side translation: a column read back from a customer's own
|
|
64
|
+
* database maps to the same JavaScript field the SDK wrote, so
|
|
65
|
+
* `camelToSnake('operatorId') === 'operator_id'` and
|
|
66
|
+
* `snakeToCamel('operator_id') === 'operatorId'` round-trip.
|
|
67
|
+
*/
|
|
68
|
+
export declare function snakeToCamel(identifier: string): string;
|
|
69
|
+
/** Quote an identifier (defense-in-depth; inputs are already slug/snake). */
|
|
70
|
+
export declare function q(identifier: string): string;
|
|
71
|
+
export declare function sqlType(fieldType: ModelJSON['fields'][string]['type']): string;
|
|
72
|
+
/**
|
|
73
|
+
* Builds the additive, idempotent provisioning plan for an app. Pure — it does
|
|
74
|
+
* not touch a database.
|
|
75
|
+
*
|
|
76
|
+
* `targetSchema` is where the tables live: a per-app Postgres schema such as
|
|
77
|
+
* `app_<id>`, or `public` when the database itself is the isolation boundary
|
|
78
|
+
* (for example a customer's own database). For `public` the `CREATE SCHEMA`
|
|
79
|
+
* statement is skipped, since it always exists.
|
|
80
|
+
*/
|
|
81
|
+
export declare function generateProvisionPlan(schema: SchemaJSON, targetSchema: string, opts?: ProvisionOptions): ProvisionPlan;
|
|
82
|
+
/**
|
|
83
|
+
* Lower an ordered migration step list to DDL. `next` is the schema being pushed
|
|
84
|
+
* (the target column shapes are read from it), `prev` the active one (used to
|
|
85
|
+
* resolve the *old* table name on a model rename).
|
|
86
|
+
*/
|
|
87
|
+
export declare function generateMigrationPlan(steps: readonly MigrationStep[], opts: {
|
|
88
|
+
readonly prev: SchemaJSON | null;
|
|
89
|
+
readonly next: SchemaJSON;
|
|
90
|
+
readonly targetSchema: string;
|
|
91
|
+
/** Constant seed values that let a required-field add / made-required step
|
|
92
|
+
* set NOT NULL on a non-empty table. Keyed by (model, field). */
|
|
93
|
+
readonly backfills?: readonly BackfillValue[];
|
|
94
|
+
/** Emit deferrable foreign-key constraints for the relations that opt in.
|
|
95
|
+
* Off by default — see {@link ProvisionOptions.foreignKeys}. */
|
|
96
|
+
readonly foreignKeys?: boolean;
|
|
97
|
+
}): MigrationPlan;
|
|
98
|
+
//# sourceMappingURL=ddl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl.d.ts","sourceRoot":"","sources":["../../src/schema/ddl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAa,MAAM,WAAW,CAAC;AAIzE,MA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