@farukada/aws-langgraph-dynamodb-ts 0.2.0 → 0.3.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/README.md +226 -510
- package/dist/checkpointer/actions/delete-thread.d.ts +7 -6
- package/dist/checkpointer/actions/delete-thread.d.ts.map +1 -1
- package/dist/checkpointer/actions/delete-thread.js +47 -152
- package/dist/checkpointer/actions/delete-thread.js.map +1 -1
- package/dist/checkpointer/actions/get-tuple.d.ts +6 -14
- package/dist/checkpointer/actions/get-tuple.d.ts.map +1 -1
- package/dist/checkpointer/actions/get-tuple.js +13 -166
- package/dist/checkpointer/actions/get-tuple.js.map +1 -1
- package/dist/checkpointer/actions/list.d.ts +10 -0
- package/dist/checkpointer/actions/list.d.ts.map +1 -0
- package/dist/checkpointer/actions/list.js +51 -0
- package/dist/checkpointer/actions/list.js.map +1 -0
- package/dist/checkpointer/actions/put-writes.d.ts +6 -6
- package/dist/checkpointer/actions/put-writes.d.ts.map +1 -1
- package/dist/checkpointer/actions/put-writes.js +26 -75
- package/dist/checkpointer/actions/put-writes.js.map +1 -1
- package/dist/checkpointer/actions/put.d.ts +6 -11
- package/dist/checkpointer/actions/put.d.ts.map +1 -1
- package/dist/checkpointer/actions/put.js +29 -161
- package/dist/checkpointer/actions/put.js.map +1 -1
- package/dist/checkpointer/internal/assemble.d.ts +10 -0
- package/dist/checkpointer/internal/assemble.d.ts.map +1 -0
- package/dist/checkpointer/internal/assemble.js +37 -0
- package/dist/checkpointer/internal/assemble.js.map +1 -0
- package/dist/checkpointer/internal/configurable.d.ts +13 -0
- package/dist/checkpointer/internal/configurable.d.ts.map +1 -0
- package/dist/checkpointer/internal/configurable.js +23 -0
- package/dist/checkpointer/internal/configurable.js.map +1 -0
- package/dist/checkpointer/internal/fetch.d.ts +10 -0
- package/dist/checkpointer/internal/fetch.d.ts.map +1 -0
- package/dist/checkpointer/internal/fetch.js +46 -0
- package/dist/checkpointer/internal/fetch.js.map +1 -0
- package/dist/checkpointer/internal/filter-match.d.ts +12 -0
- package/dist/checkpointer/internal/filter-match.d.ts.map +1 -0
- package/dist/checkpointer/internal/filter-match.js +14 -0
- package/dist/checkpointer/internal/filter-match.js.map +1 -0
- package/dist/checkpointer/internal/item-reader.d.ts +10 -0
- package/dist/checkpointer/internal/item-reader.d.ts.map +1 -0
- package/dist/checkpointer/internal/item-reader.js +26 -0
- package/dist/checkpointer/internal/item-reader.js.map +1 -0
- package/dist/checkpointer/internal/item-writer.d.ts +14 -0
- package/dist/checkpointer/internal/item-writer.d.ts.map +1 -0
- package/dist/checkpointer/internal/item-writer.js +68 -0
- package/dist/checkpointer/internal/item-writer.js.map +1 -0
- package/dist/checkpointer/internal/keys.d.ts +15 -0
- package/dist/checkpointer/internal/keys.d.ts.map +1 -0
- package/dist/checkpointer/internal/keys.js +52 -0
- package/dist/checkpointer/internal/keys.js.map +1 -0
- package/dist/checkpointer/internal/query.d.ts +16 -0
- package/dist/checkpointer/internal/query.d.ts.map +1 -0
- package/dist/checkpointer/internal/query.js +33 -0
- package/dist/checkpointer/internal/query.js.map +1 -0
- package/dist/checkpointer/internal/setup.d.ts +31 -0
- package/dist/checkpointer/internal/setup.d.ts.map +1 -0
- package/dist/checkpointer/internal/setup.js +29 -0
- package/dist/checkpointer/internal/setup.js.map +1 -0
- package/dist/checkpointer/internal/validation.d.ts +9 -0
- package/dist/checkpointer/internal/validation.d.ts.map +1 -0
- package/dist/checkpointer/internal/validation.js +28 -0
- package/dist/checkpointer/internal/validation.js.map +1 -0
- package/dist/checkpointer/saver.d.ts +21 -0
- package/dist/checkpointer/saver.d.ts.map +1 -0
- package/dist/checkpointer/saver.js +49 -0
- package/dist/checkpointer/saver.js.map +1 -0
- package/dist/checkpointer/types.d.ts +43 -0
- package/dist/checkpointer/types.d.ts.map +1 -0
- package/dist/{store/types/index.js → checkpointer/types.js} +1 -1
- package/dist/checkpointer/types.js.map +1 -0
- package/dist/factory/factory.d.ts +41 -0
- package/dist/factory/factory.d.ts.map +1 -0
- package/dist/factory/factory.js +49 -0
- package/dist/factory/factory.js.map +1 -0
- package/dist/history/actions/add-messages.d.ts +12 -7
- package/dist/history/actions/add-messages.d.ts.map +1 -1
- package/dist/history/actions/add-messages.js +50 -48
- package/dist/history/actions/add-messages.js.map +1 -1
- package/dist/history/actions/clear.d.ts +5 -11
- package/dist/history/actions/clear.d.ts.map +1 -1
- package/dist/history/actions/clear.js +28 -62
- package/dist/history/actions/clear.js.map +1 -1
- package/dist/history/actions/get-messages.d.ts +6 -13
- package/dist/history/actions/get-messages.d.ts.map +1 -1
- package/dist/history/actions/get-messages.js +23 -59
- package/dist/history/actions/get-messages.js.map +1 -1
- package/dist/history/actions/list-sessions.d.ts +6 -22
- package/dist/history/actions/list-sessions.d.ts.map +1 -1
- package/dist/history/actions/list-sessions.js +26 -69
- package/dist/history/actions/list-sessions.js.map +1 -1
- package/dist/history/actions/reconcile-count.d.ts +10 -0
- package/dist/history/actions/reconcile-count.d.ts.map +1 -0
- package/dist/history/actions/reconcile-count.js +39 -0
- package/dist/history/actions/reconcile-count.js.map +1 -0
- package/dist/history/chat-message-history.d.ts +36 -0
- package/dist/history/chat-message-history.d.ts.map +1 -0
- package/dist/history/chat-message-history.js +67 -0
- package/dist/history/chat-message-history.js.map +1 -0
- package/dist/history/internal/append-saga.d.ts +17 -0
- package/dist/history/internal/append-saga.d.ts.map +1 -0
- package/dist/history/internal/append-saga.js +94 -0
- package/dist/history/internal/append-saga.js.map +1 -0
- package/dist/history/internal/item-mapper.d.ts +12 -0
- package/dist/history/internal/item-mapper.d.ts.map +1 -0
- package/dist/history/internal/item-mapper.js +33 -0
- package/dist/history/internal/item-mapper.js.map +1 -0
- package/dist/history/internal/keys.d.ts +9 -0
- package/dist/history/internal/keys.d.ts.map +1 -0
- package/dist/history/internal/keys.js +22 -0
- package/dist/history/internal/keys.js.map +1 -0
- package/dist/history/internal/message-chunker.d.ts +14 -0
- package/dist/history/internal/message-chunker.d.ts.map +1 -0
- package/dist/history/internal/message-chunker.js +60 -0
- package/dist/history/internal/message-chunker.js.map +1 -0
- package/dist/history/internal/message-transaction.d.ts +17 -0
- package/dist/history/internal/message-transaction.d.ts.map +1 -0
- package/dist/history/internal/message-transaction.js +27 -0
- package/dist/history/internal/message-transaction.js.map +1 -0
- package/dist/history/internal/query.d.ts +6 -0
- package/dist/history/internal/query.d.ts.map +1 -0
- package/dist/history/internal/query.js +28 -0
- package/dist/history/internal/query.js.map +1 -0
- package/dist/history/internal/session-update.d.ts +20 -0
- package/dist/history/internal/session-update.d.ts.map +1 -0
- package/dist/history/internal/session-update.js +46 -0
- package/dist/history/internal/session-update.js.map +1 -0
- package/dist/history/internal/setup.d.ts +28 -0
- package/dist/history/internal/setup.d.ts.map +1 -0
- package/dist/history/internal/setup.js +27 -0
- package/dist/history/internal/setup.js.map +1 -0
- package/dist/history/internal/title-generator.d.ts +7 -0
- package/dist/history/internal/title-generator.d.ts.map +1 -0
- package/dist/history/internal/title-generator.js +16 -0
- package/dist/history/internal/title-generator.js.map +1 -0
- package/dist/history/internal/ttl-anchor.d.ts +12 -0
- package/dist/history/internal/ttl-anchor.d.ts.map +1 -0
- package/dist/history/internal/ttl-anchor.js +26 -0
- package/dist/history/internal/ttl-anchor.js.map +1 -0
- package/dist/history/session-adapter.d.ts +10 -26
- package/dist/history/session-adapter.d.ts.map +1 -1
- package/dist/history/session-adapter.js +15 -57
- package/dist/history/session-adapter.js.map +1 -1
- package/dist/history/types.d.ts +36 -0
- package/dist/history/types.d.ts.map +1 -0
- package/dist/history/types.js +3 -0
- package/dist/history/types.js.map +1 -0
- package/dist/index.d.ts +18 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -16
- package/dist/index.js.map +1 -1
- package/dist/shared/clock.d.ts +3 -0
- package/dist/shared/clock.d.ts.map +1 -0
- package/dist/shared/clock.js +8 -0
- package/dist/shared/clock.js.map +1 -0
- package/dist/shared/codec/codec.d.ts +44 -0
- package/dist/shared/codec/codec.d.ts.map +1 -0
- package/dist/shared/codec/codec.js +44 -0
- package/dist/shared/codec/codec.js.map +1 -0
- package/dist/shared/codec/compression.d.ts +25 -0
- package/dist/shared/codec/compression.d.ts.map +1 -0
- package/dist/shared/codec/compression.js +49 -0
- package/dist/shared/codec/compression.js.map +1 -0
- package/dist/shared/codec/descriptor-keys.d.ts +4 -0
- package/dist/shared/codec/descriptor-keys.d.ts.map +1 -0
- package/dist/shared/codec/descriptor-keys.js +14 -0
- package/dist/shared/codec/descriptor-keys.js.map +1 -0
- package/dist/shared/codec/json-serde.d.ts +8 -0
- package/dist/shared/codec/json-serde.d.ts.map +1 -0
- package/dist/shared/codec/json-serde.js +18 -0
- package/dist/shared/codec/json-serde.js.map +1 -0
- package/dist/shared/codec/s3/client.d.ts +6 -0
- package/dist/shared/codec/s3/client.d.ts.map +1 -0
- package/dist/shared/codec/s3/client.js +18 -0
- package/dist/shared/codec/s3/client.js.map +1 -0
- package/dist/shared/codec/s3/config.d.ts +16 -0
- package/dist/shared/codec/s3/config.d.ts.map +1 -0
- package/dist/shared/codec/s3/config.js +14 -0
- package/dist/shared/codec/s3/config.js.map +1 -0
- package/dist/shared/codec/s3/delete.d.ts +8 -0
- package/dist/shared/codec/s3/delete.d.ts.map +1 -0
- package/dist/shared/codec/s3/delete.js +29 -0
- package/dist/shared/codec/s3/delete.js.map +1 -0
- package/dist/shared/codec/s3/lifecycle.d.ts +8 -0
- package/dist/shared/codec/s3/lifecycle.d.ts.map +1 -0
- package/dist/shared/codec/s3/lifecycle.js +47 -0
- package/dist/shared/codec/s3/lifecycle.js.map +1 -0
- package/dist/shared/codec/s3/offloader.d.ts +33 -0
- package/dist/shared/codec/s3/offloader.d.ts.map +1 -0
- package/dist/shared/codec/s3/offloader.js +80 -0
- package/dist/shared/codec/s3/offloader.js.map +1 -0
- package/dist/shared/codec/s3/orphans.d.ts +16 -0
- package/dist/shared/codec/s3/orphans.d.ts.map +1 -0
- package/dist/shared/codec/s3/orphans.js +73 -0
- package/dist/shared/codec/s3/orphans.js.map +1 -0
- package/dist/shared/codec/s3/read-write.d.ts +14 -0
- package/dist/shared/codec/s3/read-write.d.ts.map +1 -0
- package/dist/shared/codec/s3/read-write.js +42 -0
- package/dist/shared/codec/s3/read-write.js.map +1 -0
- package/dist/shared/constants.d.ts +37 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +40 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/dynamodb/backoff.d.ts +15 -0
- package/dist/shared/dynamodb/backoff.d.ts.map +1 -0
- package/dist/shared/dynamodb/backoff.js +48 -0
- package/dist/shared/dynamodb/backoff.js.map +1 -0
- package/dist/shared/dynamodb/batch-write.d.ts +10 -0
- package/dist/shared/dynamodb/batch-write.d.ts.map +1 -0
- package/dist/shared/dynamodb/batch-write.js +17 -0
- package/dist/shared/dynamodb/batch-write.js.map +1 -0
- package/dist/shared/dynamodb/client.d.ts +21 -0
- package/dist/shared/dynamodb/client.d.ts.map +1 -0
- package/dist/shared/dynamodb/client.js +19 -0
- package/dist/shared/dynamodb/client.js.map +1 -0
- package/dist/shared/dynamodb/drain-unprocessed.d.ts +15 -0
- package/dist/shared/dynamodb/drain-unprocessed.d.ts.map +1 -0
- package/dist/shared/dynamodb/drain-unprocessed.js +35 -0
- package/dist/shared/dynamodb/drain-unprocessed.js.map +1 -0
- package/dist/shared/dynamodb/paginate-core.d.ts +22 -0
- package/dist/shared/dynamodb/paginate-core.d.ts.map +1 -0
- package/dist/shared/dynamodb/paginate-core.js +52 -0
- package/dist/shared/dynamodb/paginate-core.js.map +1 -0
- package/dist/shared/dynamodb/paginate.d.ts +15 -0
- package/dist/shared/dynamodb/paginate.d.ts.map +1 -0
- package/dist/shared/dynamodb/paginate.js +20 -0
- package/dist/shared/dynamodb/paginate.js.map +1 -0
- package/dist/shared/dynamodb/retry-classifier.d.ts +9 -0
- package/dist/shared/dynamodb/retry-classifier.d.ts.map +1 -0
- package/dist/shared/dynamodb/retry-classifier.js +75 -0
- package/dist/shared/dynamodb/retry-classifier.js.map +1 -0
- package/dist/shared/dynamodb/retry.d.ts +18 -0
- package/dist/shared/dynamodb/retry.d.ts.map +1 -0
- package/dist/shared/dynamodb/retry.js +53 -0
- package/dist/shared/dynamodb/retry.js.map +1 -0
- package/dist/shared/dynamodb/scan.d.ts +15 -0
- package/dist/shared/dynamodb/scan.d.ts.map +1 -0
- package/dist/shared/dynamodb/scan.js +20 -0
- package/dist/shared/dynamodb/scan.js.map +1 -0
- package/dist/shared/dynamodb/types.d.ts +24 -0
- package/dist/shared/dynamodb/types.d.ts.map +1 -0
- package/dist/shared/dynamodb/types.js +3 -0
- package/dist/shared/dynamodb/types.js.map +1 -0
- package/dist/shared/errors/base-error.d.ts +22 -0
- package/dist/shared/errors/base-error.d.ts.map +1 -0
- package/dist/shared/errors/base-error.js +28 -0
- package/dist/shared/errors/base-error.js.map +1 -0
- package/dist/shared/errors/error-code.d.ts +13 -0
- package/dist/shared/errors/error-code.d.ts.map +1 -0
- package/dist/shared/errors/error-code.js +17 -0
- package/dist/shared/errors/error-code.js.map +1 -0
- package/dist/shared/errors/errors.d.ts +47 -0
- package/dist/shared/errors/errors.d.ts.map +1 -0
- package/dist/shared/errors/errors.js +82 -0
- package/dist/shared/errors/errors.js.map +1 -0
- package/dist/shared/errors/wrap-error.d.ts +16 -0
- package/dist/shared/errors/wrap-error.d.ts.map +1 -0
- package/dist/shared/errors/wrap-error.js +30 -0
- package/dist/shared/errors/wrap-error.js.map +1 -0
- package/dist/shared/logging/logger.d.ts +14 -0
- package/dist/shared/logging/logger.d.ts.map +1 -0
- package/dist/shared/logging/logger.js +16 -0
- package/dist/shared/logging/logger.js.map +1 -0
- package/dist/shared/logging/redaction.d.ts +19 -0
- package/dist/shared/logging/redaction.d.ts.map +1 -0
- package/dist/shared/logging/redaction.js +67 -0
- package/dist/shared/logging/redaction.js.map +1 -0
- package/dist/shared/options.d.ts +32 -0
- package/dist/shared/options.d.ts.map +1 -0
- package/dist/shared/options.js +3 -0
- package/dist/shared/options.js.map +1 -0
- package/dist/shared/ulid.d.ts +10 -0
- package/dist/shared/ulid.d.ts.map +1 -0
- package/dist/shared/ulid.js +65 -0
- package/dist/shared/ulid.js.map +1 -0
- package/dist/shared/validation/primitives.d.ts +17 -0
- package/dist/shared/validation/primitives.d.ts.map +1 -0
- package/dist/shared/validation/primitives.js +71 -0
- package/dist/shared/validation/primitives.js.map +1 -0
- package/dist/shared/validation/ttl.d.ts +16 -0
- package/dist/shared/validation/ttl.d.ts.map +1 -0
- package/dist/shared/validation/ttl.js +26 -0
- package/dist/shared/validation/ttl.js.map +1 -0
- package/dist/store/actions/get.d.ts +5 -0
- package/dist/store/actions/get.d.ts.map +1 -0
- package/dist/store/actions/get.js +21 -0
- package/dist/store/actions/get.js.map +1 -0
- package/dist/store/actions/list-namespaces.d.ts +9 -0
- package/dist/store/actions/list-namespaces.d.ts.map +1 -0
- package/dist/store/actions/list-namespaces.js +46 -0
- package/dist/store/actions/list-namespaces.js.map +1 -0
- package/dist/store/actions/put.d.ts +11 -0
- package/dist/store/actions/put.d.ts.map +1 -0
- package/dist/store/actions/put.js +81 -0
- package/dist/store/actions/put.js.map +1 -0
- package/dist/store/actions/reconcile-vector-index.d.ts +17 -0
- package/dist/store/actions/reconcile-vector-index.d.ts.map +1 -0
- package/dist/store/actions/reconcile-vector-index.js +27 -0
- package/dist/store/actions/reconcile-vector-index.js.map +1 -0
- package/dist/store/actions/search.d.ts +10 -0
- package/dist/store/actions/search.d.ts.map +1 -0
- package/dist/store/actions/search.js +72 -0
- package/dist/store/actions/search.js.map +1 -0
- package/dist/store/internal/filter.d.ts +10 -0
- package/dist/store/internal/filter.d.ts.map +1 -0
- package/dist/store/internal/filter.js +37 -0
- package/dist/store/internal/filter.js.map +1 -0
- package/dist/store/internal/index-reconcile.d.ts +22 -0
- package/dist/store/internal/index-reconcile.d.ts.map +1 -0
- package/dist/store/internal/index-reconcile.js +68 -0
- package/dist/store/internal/index-reconcile.js.map +1 -0
- package/dist/store/internal/index-sync.d.ts +11 -0
- package/dist/store/internal/index-sync.d.ts.map +1 -0
- package/dist/store/internal/index-sync.js +26 -0
- package/dist/store/internal/index-sync.js.map +1 -0
- package/dist/store/internal/item-mapper.d.ts +23 -0
- package/dist/store/internal/item-mapper.d.ts.map +1 -0
- package/dist/store/internal/item-mapper.js +51 -0
- package/dist/store/internal/item-mapper.js.map +1 -0
- package/dist/store/internal/keys.d.ts +18 -0
- package/dist/store/internal/keys.d.ts.map +1 -0
- package/dist/store/internal/keys.js +36 -0
- package/dist/store/internal/keys.js.map +1 -0
- package/dist/store/internal/namespace-match.d.ts +12 -0
- package/dist/store/internal/namespace-match.d.ts.map +1 -0
- package/dist/store/internal/namespace-match.js +41 -0
- package/dist/store/internal/namespace-match.js.map +1 -0
- package/dist/store/internal/query.d.ts +6 -0
- package/dist/store/internal/query.d.ts.map +1 -0
- package/dist/store/internal/query.js +32 -0
- package/dist/store/internal/query.js.map +1 -0
- package/dist/store/internal/ranker.d.ts +13 -0
- package/dist/store/internal/ranker.d.ts.map +1 -0
- package/dist/store/internal/ranker.js +29 -0
- package/dist/store/internal/ranker.js.map +1 -0
- package/dist/store/internal/semantic-search.d.ts +13 -0
- package/dist/store/internal/semantic-search.d.ts.map +1 -0
- package/dist/store/internal/semantic-search.js +47 -0
- package/dist/store/internal/semantic-search.js.map +1 -0
- package/dist/store/internal/setup.d.ts +31 -0
- package/dist/store/internal/setup.d.ts.map +1 -0
- package/dist/store/internal/setup.js +29 -0
- package/dist/store/internal/setup.js.map +1 -0
- package/dist/store/internal/validation.d.ts +7 -0
- package/dist/store/internal/validation.d.ts.map +1 -0
- package/dist/store/internal/validation.js +26 -0
- package/dist/store/internal/validation.js.map +1 -0
- package/dist/store/store.d.ts +24 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +58 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/types.d.ts +28 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +3 -0
- package/dist/store/types.js.map +1 -0
- package/dist/store/vector-backend.d.ts +27 -0
- package/dist/store/vector-backend.d.ts.map +1 -0
- package/dist/store/vector-backend.js +3 -0
- package/dist/store/vector-backend.js.map +1 -0
- package/package.json +32 -30
- package/dist/checkpointer/actions/index.d.ts +0 -5
- package/dist/checkpointer/actions/index.d.ts.map +0 -1
- package/dist/checkpointer/actions/index.js +0 -21
- package/dist/checkpointer/actions/index.js.map +0 -1
- package/dist/checkpointer/actions/validate-configurable.d.ts +0 -10
- package/dist/checkpointer/actions/validate-configurable.d.ts.map +0 -1
- package/dist/checkpointer/actions/validate-configurable.js +0 -39
- package/dist/checkpointer/actions/validate-configurable.js.map +0 -1
- package/dist/checkpointer/actions/writer.d.ts +0 -52
- package/dist/checkpointer/actions/writer.d.ts.map +0 -1
- package/dist/checkpointer/actions/writer.js +0 -109
- package/dist/checkpointer/actions/writer.js.map +0 -1
- package/dist/checkpointer/index.d.ts +0 -118
- package/dist/checkpointer/index.d.ts.map +0 -1
- package/dist/checkpointer/index.js +0 -393
- package/dist/checkpointer/index.js.map +0 -1
- package/dist/checkpointer/types/index.d.ts +0 -232
- package/dist/checkpointer/types/index.d.ts.map +0 -1
- package/dist/checkpointer/types/index.js +0 -13
- package/dist/checkpointer/types/index.js.map +0 -1
- package/dist/checkpointer/utils/deserialization.d.ts +0 -20
- package/dist/checkpointer/utils/deserialization.d.ts.map +0 -1
- package/dist/checkpointer/utils/deserialization.js +0 -81
- package/dist/checkpointer/utils/deserialization.js.map +0 -1
- package/dist/checkpointer/utils/index.d.ts +0 -7
- package/dist/checkpointer/utils/index.d.ts.map +0 -1
- package/dist/checkpointer/utils/index.js +0 -27
- package/dist/checkpointer/utils/index.js.map +0 -1
- package/dist/checkpointer/utils/validation.d.ts +0 -48
- package/dist/checkpointer/utils/validation.d.ts.map +0 -1
- package/dist/checkpointer/utils/validation.js +0 -235
- package/dist/checkpointer/utils/validation.js.map +0 -1
- package/dist/factory.d.ts +0 -153
- package/dist/factory.d.ts.map +0 -1
- package/dist/factory.js +0 -206
- package/dist/factory.js.map +0 -1
- package/dist/history/actions/add-message.d.ts +0 -10
- package/dist/history/actions/add-message.d.ts.map +0 -1
- package/dist/history/actions/add-message.js +0 -24
- package/dist/history/actions/add-message.js.map +0 -1
- package/dist/history/actions/index.d.ts +0 -9
- package/dist/history/actions/index.d.ts.map +0 -1
- package/dist/history/actions/index.js +0 -17
- package/dist/history/actions/index.js.map +0 -1
- package/dist/history/index.d.ts +0 -118
- package/dist/history/index.d.ts.map +0 -1
- package/dist/history/index.js +0 -179
- package/dist/history/index.js.map +0 -1
- package/dist/history/types/index.d.ts +0 -184
- package/dist/history/types/index.d.ts.map +0 -1
- package/dist/history/types/index.js +0 -7
- package/dist/history/types/index.js.map +0 -1
- package/dist/history/utils/index.d.ts +0 -9
- package/dist/history/utils/index.d.ts.map +0 -1
- package/dist/history/utils/index.js +0 -27
- package/dist/history/utils/index.js.map +0 -1
- package/dist/history/utils/optimistic-retry.d.ts +0 -31
- package/dist/history/utils/optimistic-retry.d.ts.map +0 -1
- package/dist/history/utils/optimistic-retry.js +0 -74
- package/dist/history/utils/optimistic-retry.js.map +0 -1
- package/dist/history/utils/title-generator.d.ts +0 -12
- package/dist/history/utils/title-generator.d.ts.map +0 -1
- package/dist/history/utils/title-generator.js +0 -57
- package/dist/history/utils/title-generator.js.map +0 -1
- package/dist/history/utils/update-expression-builder.d.ts +0 -55
- package/dist/history/utils/update-expression-builder.d.ts.map +0 -1
- package/dist/history/utils/update-expression-builder.js +0 -112
- package/dist/history/utils/update-expression-builder.js.map +0 -1
- package/dist/history/utils/validation.d.ts +0 -68
- package/dist/history/utils/validation.d.ts.map +0 -1
- package/dist/history/utils/validation.js +0 -213
- package/dist/history/utils/validation.js.map +0 -1
- package/dist/shared/index.d.ts +0 -5
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/index.js +0 -21
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/utils/batch-write.d.ts +0 -74
- package/dist/shared/utils/batch-write.d.ts.map +0 -1
- package/dist/shared/utils/batch-write.js +0 -110
- package/dist/shared/utils/batch-write.js.map +0 -1
- package/dist/shared/utils/client-factory.d.ts +0 -25
- package/dist/shared/utils/client-factory.d.ts.map +0 -1
- package/dist/shared/utils/client-factory.js +0 -23
- package/dist/shared/utils/client-factory.js.map +0 -1
- package/dist/shared/utils/compressor.d.ts +0 -66
- package/dist/shared/utils/compressor.d.ts.map +0 -1
- package/dist/shared/utils/compressor.js +0 -133
- package/dist/shared/utils/compressor.js.map +0 -1
- package/dist/shared/utils/constants.d.ts +0 -13
- package/dist/shared/utils/constants.d.ts.map +0 -1
- package/dist/shared/utils/constants.js +0 -35
- package/dist/shared/utils/constants.js.map +0 -1
- package/dist/shared/utils/index.d.ts +0 -14
- package/dist/shared/utils/index.d.ts.map +0 -1
- package/dist/shared/utils/index.js +0 -30
- package/dist/shared/utils/index.js.map +0 -1
- package/dist/shared/utils/logger.d.ts +0 -75
- package/dist/shared/utils/logger.d.ts.map +0 -1
- package/dist/shared/utils/logger.js +0 -148
- package/dist/shared/utils/logger.js.map +0 -1
- package/dist/shared/utils/retry.d.ts +0 -26
- package/dist/shared/utils/retry.d.ts.map +0 -1
- package/dist/shared/utils/retry.js +0 -169
- package/dist/shared/utils/retry.js.map +0 -1
- package/dist/shared/utils/s3-offloader.d.ts +0 -153
- package/dist/shared/utils/s3-offloader.d.ts.map +0 -1
- package/dist/shared/utils/s3-offloader.js +0 -281
- package/dist/shared/utils/s3-offloader.js.map +0 -1
- package/dist/shared/utils/s3-orphans.d.ts +0 -16
- package/dist/shared/utils/s3-orphans.d.ts.map +0 -1
- package/dist/shared/utils/s3-orphans.js +0 -79
- package/dist/shared/utils/s3-orphans.js.map +0 -1
- package/dist/shared/utils/sleep.d.ts +0 -48
- package/dist/shared/utils/sleep.d.ts.map +0 -1
- package/dist/shared/utils/sleep.js +0 -82
- package/dist/shared/utils/sleep.js.map +0 -1
- package/dist/shared/utils/ttl.d.ts +0 -24
- package/dist/shared/utils/ttl.d.ts.map +0 -1
- package/dist/shared/utils/ttl.js +0 -43
- package/dist/shared/utils/ttl.js.map +0 -1
- package/dist/store/actions/get-operation.d.ts +0 -11
- package/dist/store/actions/get-operation.d.ts.map +0 -1
- package/dist/store/actions/get-operation.js +0 -42
- package/dist/store/actions/get-operation.js.map +0 -1
- package/dist/store/actions/index.d.ts +0 -5
- package/dist/store/actions/index.d.ts.map +0 -1
- package/dist/store/actions/index.js +0 -21
- package/dist/store/actions/index.js.map +0 -1
- package/dist/store/actions/list-namespaces-operation.d.ts +0 -10
- package/dist/store/actions/list-namespaces-operation.d.ts.map +0 -1
- package/dist/store/actions/list-namespaces-operation.js +0 -227
- package/dist/store/actions/list-namespaces-operation.js.map +0 -1
- package/dist/store/actions/put-operation.d.ts +0 -9
- package/dist/store/actions/put-operation.d.ts.map +0 -1
- package/dist/store/actions/put-operation.js +0 -107
- package/dist/store/actions/put-operation.js.map +0 -1
- package/dist/store/actions/search-operation.d.ts +0 -17
- package/dist/store/actions/search-operation.d.ts.map +0 -1
- package/dist/store/actions/search-operation.js +0 -203
- package/dist/store/actions/search-operation.js.map +0 -1
- package/dist/store/index.d.ts +0 -82
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -172
- package/dist/store/index.js.map +0 -1
- package/dist/store/types/index.d.ts +0 -131
- package/dist/store/types/index.d.ts.map +0 -1
- package/dist/store/types/index.js.map +0 -1
- package/dist/store/utils/filter.d.ts +0 -16
- package/dist/store/utils/filter.d.ts.map +0 -1
- package/dist/store/utils/filter.js +0 -133
- package/dist/store/utils/filter.js.map +0 -1
- package/dist/store/utils/index.d.ts +0 -7
- package/dist/store/utils/index.d.ts.map +0 -1
- package/dist/store/utils/index.js +0 -27
- package/dist/store/utils/index.js.map +0 -1
- package/dist/store/utils/validation.d.ts +0 -61
- package/dist/store/utils/validation.d.ts.map +0 -1
- package/dist/store/utils/validation.js +0 -260
- package/dist/store/utils/validation.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DynamoDBClient, DynamoDBClientConfig } from '@aws-sdk/client-dynamodb';
|
|
2
|
+
import type { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
|
3
|
+
import type { CompressionConfig } from './codec/compression';
|
|
4
|
+
import type { S3OffloadConfig } from './codec/s3/config';
|
|
5
|
+
import type { Logger } from './logging/logger';
|
|
6
|
+
import type { TtlOption } from './validation/ttl';
|
|
7
|
+
/**
|
|
8
|
+
* Options common to every adapter (the unified options shape). An adapter
|
|
9
|
+
* either reuses an injected `client` or builds one from `clientConfig`.
|
|
10
|
+
*/
|
|
11
|
+
export interface BaseAdapterOptions {
|
|
12
|
+
/** DynamoDB table name. */
|
|
13
|
+
tableName: string;
|
|
14
|
+
/** Pre-built DocumentClient to reuse; when set, the adapter does not own it. */
|
|
15
|
+
client?: DynamoDBDocument;
|
|
16
|
+
/** Config used to build a client when `client` is not provided. */
|
|
17
|
+
clientConfig?: DynamoDBClientConfig;
|
|
18
|
+
/** Factory seam for constructing the underlying client (testing). */
|
|
19
|
+
createClient?: (config: DynamoDBClientConfig) => DynamoDBClient;
|
|
20
|
+
/** Optional time-to-live applied to written items. */
|
|
21
|
+
ttl?: TtlOption;
|
|
22
|
+
/** Optional per-instance logger (defaults to a silent logger). */
|
|
23
|
+
logger?: Logger;
|
|
24
|
+
}
|
|
25
|
+
/** Options enabling payload compression and/or S3 offloading. */
|
|
26
|
+
export interface CodecOptions {
|
|
27
|
+
/** Gzip compression configuration. */
|
|
28
|
+
compression?: CompressionConfig;
|
|
29
|
+
/** S3 offload configuration for payloads over DynamoDB's item limit. */
|
|
30
|
+
s3?: S3OffloadConfig;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/shared/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,mEAAmE;IACnE,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,qEAAqE;IACrE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,cAAc,CAAC;IAChE,sDAAsD;IACtD,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,iEAAiE;AACjE,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,wEAAwE;IACxE,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/shared/options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a monotonic ULID generator: lexicographically sortable 26-char ids
|
|
3
|
+
* whose first 10 chars encode the millisecond timestamp. Ids strictly increase
|
|
4
|
+
* even when the clock regresses or the same-millisecond random space overflows:
|
|
5
|
+
* any non-advancing clock reuses the last timestamp and increments the random
|
|
6
|
+
* component, carrying into the timestamp on overflow. `now`/`rng` are seams for
|
|
7
|
+
* deterministic tests.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createUlidFactory(now?: () => number, rng?: () => number): () => string;
|
|
10
|
+
//# sourceMappingURL=ulid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ulid.d.ts","sourceRoot":"","sources":["../../src/shared/ulid.ts"],"names":[],"mappings":"AAyCA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,GAAE,MAAM,MAAiB,EAC5B,GAAG,GAAE,MAAM,MAAoB,GAC9B,MAAM,MAAM,CAmBd"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUlidFactory = createUlidFactory;
|
|
4
|
+
const ENCODING = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
5
|
+
const ENCODING_LEN = 32;
|
|
6
|
+
const TIME_CHARS = 10;
|
|
7
|
+
const RANDOM_CHARS = 16;
|
|
8
|
+
function encodeTime(timeMs) {
|
|
9
|
+
let remaining = Math.floor(timeMs);
|
|
10
|
+
let out = '';
|
|
11
|
+
for (let i = 0; i < TIME_CHARS; i++) {
|
|
12
|
+
out = ENCODING[remaining % ENCODING_LEN] + out;
|
|
13
|
+
remaining = Math.floor(remaining / ENCODING_LEN);
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
function randomDigits(rng) {
|
|
18
|
+
const digits = [];
|
|
19
|
+
for (let i = 0; i < RANDOM_CHARS; i++) {
|
|
20
|
+
digits.push(Math.floor(rng() * ENCODING_LEN));
|
|
21
|
+
}
|
|
22
|
+
return digits;
|
|
23
|
+
}
|
|
24
|
+
function incrementDigits(digits) {
|
|
25
|
+
const next = [...digits];
|
|
26
|
+
for (let i = RANDOM_CHARS - 1; i >= 0; i--) {
|
|
27
|
+
if (next[i] < ENCODING_LEN - 1) {
|
|
28
|
+
next[i] += 1;
|
|
29
|
+
return { digits: next, overflowed: false };
|
|
30
|
+
}
|
|
31
|
+
next[i] = 0;
|
|
32
|
+
}
|
|
33
|
+
return { digits: next, overflowed: true };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Build a monotonic ULID generator: lexicographically sortable 26-char ids
|
|
37
|
+
* whose first 10 chars encode the millisecond timestamp. Ids strictly increase
|
|
38
|
+
* even when the clock regresses or the same-millisecond random space overflows:
|
|
39
|
+
* any non-advancing clock reuses the last timestamp and increments the random
|
|
40
|
+
* component, carrying into the timestamp on overflow. `now`/`rng` are seams for
|
|
41
|
+
* deterministic tests.
|
|
42
|
+
*/
|
|
43
|
+
function createUlidFactory(now = Date.now, rng = Math.random) {
|
|
44
|
+
let lastTime = -1;
|
|
45
|
+
let lastRandom = [];
|
|
46
|
+
return () => {
|
|
47
|
+
const time = now();
|
|
48
|
+
if (time > lastTime) {
|
|
49
|
+
lastTime = time;
|
|
50
|
+
lastRandom = randomDigits(rng);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const result = incrementDigits(lastRandom);
|
|
54
|
+
if (result.overflowed) {
|
|
55
|
+
lastTime += 1;
|
|
56
|
+
lastRandom = randomDigits(rng);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
lastRandom = result.digits;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return encodeTime(lastTime) + lastRandom.map((digit) => ENCODING[digit]).join('');
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=ulid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ulid.js","sourceRoot":"","sources":["../../src/shared/ulid.ts"],"names":[],"mappings":";;AAiDA,8CAsBC;AAvED,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AACpD,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,YAAY,G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AAE,IAAI,EAAE,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,MAAoB,IAAI,CAAC,GAAG,EAC5B,MAAoB,IAAI,CAAC,MAAM;IAE/B,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC;IAClB,IAAI,UAAU,GAAa,EAAE,CAAC;IAC9B,OAAO,GAAG,EAAE;QACV,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;QACnB,IAAI,IAAI,GAAG,QAAQ,EAAE,CAAC;YACpB,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;gBACtB,QAAQ,IAAI,CAAC,CAAC;gBACd,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC7B,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Redactable } from '../logging/redaction';
|
|
2
|
+
/** Throw {@link ValidationError} unless `value` is a non-empty string. */
|
|
3
|
+
export declare function validateNonEmptyString(value: string, field: string): void;
|
|
4
|
+
/** Throw {@link ValidationError} unless `value` is an integer within bounds. */
|
|
5
|
+
export declare function validateInteger(value: number, field: string, bounds?: {
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
}): void;
|
|
9
|
+
/** Throw {@link ValidationError} unless `value` is a non-empty array. */
|
|
10
|
+
export declare function validateNonEmptyArray<T>(value: T[], field: string): void;
|
|
11
|
+
/** Throw {@link ValidationError} if `value` contains an ASCII control character. */
|
|
12
|
+
export declare function assertNoControlChars(value: string, field: string): void;
|
|
13
|
+
/** Throw {@link ValidationError} if `value` contains the reserved `separator`. */
|
|
14
|
+
export declare function assertNoSeparator(value: string, separator: string, field: string): void;
|
|
15
|
+
/** Throw {@link ValidationError} if nested-array depth exceeds `maxDepth`. */
|
|
16
|
+
export declare function validateArrayMaxDepth(value: Redactable[], field: string, maxDepth: number): void;
|
|
17
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/shared/validation/primitives.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIzE;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1C,IAAI,CAUN;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIxE;AAaD,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIvE;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOvF;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAahG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateNonEmptyString = validateNonEmptyString;
|
|
4
|
+
exports.validateInteger = validateInteger;
|
|
5
|
+
exports.validateNonEmptyArray = validateNonEmptyArray;
|
|
6
|
+
exports.assertNoControlChars = assertNoControlChars;
|
|
7
|
+
exports.assertNoSeparator = assertNoSeparator;
|
|
8
|
+
exports.validateArrayMaxDepth = validateArrayMaxDepth;
|
|
9
|
+
const errors_1 = require("../errors/errors");
|
|
10
|
+
/** Throw {@link ValidationError} unless `value` is a non-empty string. */
|
|
11
|
+
function validateNonEmptyString(value, field) {
|
|
12
|
+
if (typeof value !== 'string' || value.length === 0) {
|
|
13
|
+
throw new errors_1.ValidationError(`${field} must be a non-empty string`, field);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/** Throw {@link ValidationError} unless `value` is an integer within bounds. */
|
|
17
|
+
function validateInteger(value, field, bounds = {}) {
|
|
18
|
+
if (typeof value !== 'number' || !Number.isInteger(value)) {
|
|
19
|
+
throw new errors_1.ValidationError(`${field} must be an integer`, field);
|
|
20
|
+
}
|
|
21
|
+
if (bounds.min !== undefined && value < bounds.min) {
|
|
22
|
+
throw new errors_1.ValidationError(`${field} must be >= ${bounds.min}`, field);
|
|
23
|
+
}
|
|
24
|
+
if (bounds.max !== undefined && value > bounds.max) {
|
|
25
|
+
throw new errors_1.ValidationError(`${field} must be <= ${bounds.max}`, field);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Throw {@link ValidationError} unless `value` is a non-empty array. */
|
|
29
|
+
function validateNonEmptyArray(value, field) {
|
|
30
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
31
|
+
throw new errors_1.ValidationError(`${field} must be a non-empty array`, field);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** Return `true` if `value` contains any ASCII control character. */
|
|
35
|
+
function hasControlChar(value) {
|
|
36
|
+
for (let i = 0; i < value.length; i++) {
|
|
37
|
+
const code = value.charCodeAt(i);
|
|
38
|
+
if (code <= 0x1f || code === 0x7f) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
/** Throw {@link ValidationError} if `value` contains an ASCII control character. */
|
|
45
|
+
function assertNoControlChars(value, field) {
|
|
46
|
+
if (hasControlChar(value)) {
|
|
47
|
+
throw new errors_1.ValidationError(`${field} must not contain control characters`, field);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Throw {@link ValidationError} if `value` contains the reserved `separator`. */
|
|
51
|
+
function assertNoSeparator(value, separator, field) {
|
|
52
|
+
if (value.includes(separator)) {
|
|
53
|
+
throw new errors_1.ValidationError(`${field} must not contain the reserved "${separator}" separator`, field);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Throw {@link ValidationError} if nested-array depth exceeds `maxDepth`. */
|
|
57
|
+
function validateArrayMaxDepth(value, field, maxDepth) {
|
|
58
|
+
const depthOf = (node, depth) => {
|
|
59
|
+
if (!Array.isArray(node)) {
|
|
60
|
+
return depth;
|
|
61
|
+
}
|
|
62
|
+
if (depth > maxDepth) {
|
|
63
|
+
return depth;
|
|
64
|
+
}
|
|
65
|
+
return node.reduce((max, child) => Math.max(max, depthOf(child, depth + 1)), depth);
|
|
66
|
+
};
|
|
67
|
+
if (depthOf(value, 0) > maxDepth) {
|
|
68
|
+
throw new errors_1.ValidationError(`${field} exceeds maximum array depth of ${maxDepth}`, field);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","s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AI,CAAC,MAAM,CAAS,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC,CAAC;IACF,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,wBAAe,CAAC,GAAG,KAAK,mCAAmC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Time-to-live expressed in whole days or whole seconds. */
|
|
2
|
+
export type TtlOption = {
|
|
3
|
+
days: number;
|
|
4
|
+
} | {
|
|
5
|
+
seconds: number;
|
|
6
|
+
};
|
|
7
|
+
/** Validate a {@link TtlOption} and resolve it to a positive number of seconds. */
|
|
8
|
+
export declare function resolveTtlSeconds(ttl: TtlOption): number;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a {@link TtlOption} into a DynamoDB TTL attribute value: the Unix
|
|
11
|
+
* epoch (seconds) at which the item expires.
|
|
12
|
+
*
|
|
13
|
+
* @param now - Clock seam returning epoch milliseconds. Defaults to `Date.now`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function calculateTtlTimestamp(ttl: TtlOption, now?: () => number): number;
|
|
16
|
+
//# sourceMappingURL=ttl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttl.d.ts","sourceRoot":"","sources":["../../../src/shared/validation/ttl.ts"],"names":[],"mappings":"AAKA,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,MAAiB,GAAG,MAAM,CAE1F"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveTtlSeconds = resolveTtlSeconds;
|
|
4
|
+
exports.calculateTtlTimestamp = calculateTtlTimestamp;
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const primitives_1 = require("./primitives");
|
|
7
|
+
const SECONDS_PER_DAY = 24 * 60 * 60;
|
|
8
|
+
/** Validate a {@link TtlOption} and resolve it to a positive number of seconds. */
|
|
9
|
+
function resolveTtlSeconds(ttl) {
|
|
10
|
+
if ('days' in ttl) {
|
|
11
|
+
(0, primitives_1.validateInteger)(ttl.days, 'ttl.days', { min: 1, max: constants_1.MAX_TTL_DAYS });
|
|
12
|
+
return ttl.days * SECONDS_PER_DAY;
|
|
13
|
+
}
|
|
14
|
+
(0, primitives_1.validateInteger)(ttl.seconds, 'ttl.seconds', { min: 1, max: constants_1.MAX_TTL_SECONDS });
|
|
15
|
+
return ttl.seconds;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolve a {@link TtlOption} into a DynamoDB TTL attribute value: the Unix
|
|
19
|
+
* epoch (seconds) at which the item expires.
|
|
20
|
+
*
|
|
21
|
+
* @param now - Clock seam returning epoch milliseconds. Defaults to `Date.now`.
|
|
22
|
+
*/
|
|
23
|
+
function calculateTtlTimestamp(ttl, now = Date.now) {
|
|
24
|
+
return Math.floor(now() / 1000) + resolveTtlSeconds(ttl);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ttl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttl.js","sourceRoot":"","sources":["../../../src/shared/validation/ttl.ts"],"names":[],"mappings":";;AASA,8CAOC;AAQD,sDAEC;AA1BD,4CAA6D;AAC7D,6CAA+C;AAE/C,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAKrC,mFAAmF;AACnF,SAAgB,iBAAiB,CAAC,GAAc;IAC9C,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;QAClB,IAAA,4BAAe,EAAC,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,wBAAY,EAAE,CAAC,CAAC;QACrE,OAAO,GAAG,CAAC,IAAI,GAAG,eAAe,CAAC;IACpC,CAAC;IACD,IAAA,4BAAe,EAAC,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,2BAAe,EAAE,CAAC,CAAC;IAC9E,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,GAAc,EAAE,MAAoB,IAAI,CAAC,GAAG;IAChF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Item } from '@langchain/langgraph-checkpoint';
|
|
2
|
+
import type { StoreContext } from '../internal/setup';
|
|
3
|
+
/** Retrieve a single item by namespace and key (strongly consistent), or null. */
|
|
4
|
+
export declare function getItem(context: StoreContext, namespace: string[], key: string): Promise<Item | null>;
|
|
5
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/store/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAK5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,kFAAkF;AAClF,wBAAsB,OAAO,CAC3B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EAAE,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAYtB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getItem = getItem;
|
|
4
|
+
const retry_1 = require("../../shared/dynamodb/retry");
|
|
5
|
+
const item_mapper_1 = require("../internal/item-mapper");
|
|
6
|
+
const keys_1 = require("../internal/keys");
|
|
7
|
+
const validation_1 = require("../internal/validation");
|
|
8
|
+
/** Retrieve a single item by namespace and key (strongly consistent), or null. */
|
|
9
|
+
async function getItem(context, namespace, key) {
|
|
10
|
+
(0, validation_1.validateNamespace)(namespace);
|
|
11
|
+
(0, validation_1.validateKey)(key);
|
|
12
|
+
const result = await (0, retry_1.withDynamoDBRetry)(() => context.client.get({
|
|
13
|
+
TableName: context.tableName,
|
|
14
|
+
Key: { PK: (0, keys_1.partitionKey)(namespace), SK: (0, keys_1.sortKey)(namespace, key) },
|
|
15
|
+
ConsistentRead: true,
|
|
16
|
+
}));
|
|
17
|
+
if (!result.Item)
|
|
18
|
+
return null;
|
|
19
|
+
return (0, item_mapper_1.readStoreItem)(context, result.Item);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/store/actions/get.ts"],"names":[],"mappings":";;AAUA,0BAgBC;AAxBD,uDAAgE;AAChE,yDAAwD;AACxD,2CAAyD;AAEzD,uDAAwE;AAGxE,kFAAkF;AAC3E,KAAK,UAAU,OAAO,CAC3B,OAAqB,EACrB,SAAmB,EACnB,GAAW;IAEX,IAAA,8BAAiB,EAAC,SAAS,CAAC,CAAC;IAC7B,IAAA,wBAAW,EAAC,GAAG,CAAC,CAAC;IACjB,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAiB,EAAC,GAAG,EAAE,CAC1C,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,GAAG,EAAE,EAAE,EAAE,EAAE,IAAA,mBAAY,EAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAA,cAAO,EAAC,SAAS,EAAE,GAAG,CAAC,EAAE;QACjE,cAAc,EAAE,IAAI;KACrB,CAAC,CACH,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,IAAA,2BAAa,EAAC,OAAO,EAAE,MAAM,CAAC,IAAuB,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ListNamespacesOperation } from '@langchain/langgraph-checkpoint';
|
|
2
|
+
import type { StoreContext } from '../internal/setup';
|
|
3
|
+
/**
|
|
4
|
+
* List distinct namespaces (truncated to `maxDepth`) that satisfy every match
|
|
5
|
+
* condition, sorted, with offset/limit applied. A concrete prefix root scopes
|
|
6
|
+
* the read to a native Query; otherwise it falls back to a filtered Scan.
|
|
7
|
+
*/
|
|
8
|
+
export declare function listNamespaces(context: StoreContext, op: ListNamespacesOperation): Promise<string[][]>;
|
|
9
|
+
//# sourceMappingURL=list-namespaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-namespaces.d.ts","sourceRoot":"","sources":["../../../src/store/actions/list-namespaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAQ/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWtD;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAsBrB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listNamespaces = listNamespaces;
|
|
4
|
+
const paginate_1 = require("../../shared/dynamodb/paginate");
|
|
5
|
+
const scan_1 = require("../../shared/dynamodb/scan");
|
|
6
|
+
const item_mapper_1 = require("../internal/item-mapper");
|
|
7
|
+
const keys_1 = require("../internal/keys");
|
|
8
|
+
const namespace_match_1 = require("../internal/namespace-match");
|
|
9
|
+
const query_1 = require("../internal/query");
|
|
10
|
+
const validation_1 = require("../internal/validation");
|
|
11
|
+
function namespaceSource(context, op) {
|
|
12
|
+
const root = (0, namespace_match_1.prefixRoot)(op.matchConditions);
|
|
13
|
+
if (root.length > 0) {
|
|
14
|
+
return (0, paginate_1.paginateQuery)({ client: context.client, params: (0, query_1.scopedQuery)(context.tableName, root) });
|
|
15
|
+
}
|
|
16
|
+
return (0, scan_1.paginateScan)({ client: context.client, params: (0, query_1.storeScan)(context.tableName) });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List distinct namespaces (truncated to `maxDepth`) that satisfy every match
|
|
20
|
+
* condition, sorted, with offset/limit applied. A concrete prefix root scopes
|
|
21
|
+
* the read to a native Query; otherwise it falls back to a filtered Scan.
|
|
22
|
+
*/
|
|
23
|
+
async function listNamespaces(context, op) {
|
|
24
|
+
(0, validation_1.validatePaging)(op.offset, op.limit);
|
|
25
|
+
const seen = new Set();
|
|
26
|
+
const namespaces = [];
|
|
27
|
+
for await (const raw of namespaceSource(context, op)) {
|
|
28
|
+
const record = (0, item_mapper_1.narrowStoreRecord)(raw);
|
|
29
|
+
if (!record)
|
|
30
|
+
continue;
|
|
31
|
+
const namespace = record.namespace;
|
|
32
|
+
if (op.matchConditions &&
|
|
33
|
+
!op.matchConditions.every((condition) => (0, namespace_match_1.matchNamespace)(namespace, condition))) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const truncated = (0, namespace_match_1.truncateDepth)(namespace, op.maxDepth);
|
|
37
|
+
const dedupeKey = truncated.join(keys_1.NAMESPACE_SEPARATOR);
|
|
38
|
+
if (seen.has(dedupeKey))
|
|
39
|
+
continue;
|
|
40
|
+
seen.add(dedupeKey);
|
|
41
|
+
namespaces.push(truncated);
|
|
42
|
+
}
|
|
43
|
+
namespaces.sort((a, b) => a.join(keys_1.NAMESPACE_SEPARATOR).localeCompare(b.join(keys_1.NAMESPACE_SEPARATOR)));
|
|
44
|
+
return namespaces.slice(op.offset, op.offset + op.limit);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=list-namespaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-namespaces.js","sourceRoot":"","sources":["../../../src/store/actions/list-namespaces.ts"],"names":[],"mappings":";;AAwBA,wCAyBC;AA/CD,6DAA+D;AAC/D,qDAA0D;AAC1D,yDAA4D;AAC5D,2CAAuD;AACvD,iEAAwF;AACxF,6CAA2D;AAE3D,uDAAwD;AAExD,SAAS,eAAe,CAAC,OAAqB,EAAE,EAA2B;IACzE,MAAM,IAAI,GAAG,IAAA,4BAAU,EAAC,EAAE,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,IAAA,wBAAa,EAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAA,mBAAW,EAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,IAAA,mBAAY,EAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAA,iBAAS,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAClC,OAAqB,EACrB,EAA2B;IAE3B,IAAA,2BAAc,EAAC,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|
|
1
|
+
import type { PutOperation } from '@langchain/langgraph-checkpoint';
|
|
2
|
+
import type { StoreContext } from '../internal/setup';
|
|
3
|
+
/**
|
|
4
|
+
* Store, update, or delete an item. A null value deletes; otherwise the value
|
|
5
|
+
* is encoded (with optional compression/S3 offload), `createdAt` is preserved
|
|
6
|
+
* across updates, and an embedding is computed when indexing is enabled. When a
|
|
7
|
+
* `vectorBackend` is configured the embedding is sent there (and not stored on
|
|
8
|
+
* the item); DynamoDB always holds the canonical item.
|
|
9
|
+
*/
|
|
10
|
+
export declare function putItem(context: StoreContext, op: PutOperation): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=put.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put.d.ts","sourceRoot":"","sources":["../../../src/store/actions/put.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAYpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiEtD;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBpF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.putItem = putItem;
|
|
4
|
+
const clock_1 = require("../../shared/clock");
|
|
5
|
+
const descriptor_keys_1 = require("../../shared/codec/descriptor-keys");
|
|
6
|
+
const orphans_1 = require("../../shared/codec/s3/orphans");
|
|
7
|
+
const retry_1 = require("../../shared/dynamodb/retry");
|
|
8
|
+
const ttl_1 = require("../../shared/validation/ttl");
|
|
9
|
+
const index_sync_1 = require("../internal/index-sync");
|
|
10
|
+
const item_mapper_1 = require("../internal/item-mapper");
|
|
11
|
+
const keys_1 = require("../internal/keys");
|
|
12
|
+
const semantic_search_1 = require("../internal/semantic-search");
|
|
13
|
+
const validation_1 = require("../internal/validation");
|
|
14
|
+
async function readCreatedAt(context, pk, sk) {
|
|
15
|
+
const existing = await (0, retry_1.withDynamoDBRetry)(() => context.client.get({
|
|
16
|
+
TableName: context.tableName,
|
|
17
|
+
Key: { PK: pk, SK: sk },
|
|
18
|
+
ConsistentRead: true,
|
|
19
|
+
ProjectionExpression: '#c',
|
|
20
|
+
ExpressionAttributeNames: { '#c': 'createdAt' },
|
|
21
|
+
}));
|
|
22
|
+
return existing.Item?.createdAt;
|
|
23
|
+
}
|
|
24
|
+
/** Delete the item and, when a vector backend is configured, drop its vector. */
|
|
25
|
+
async function deleteStoreItem(context, op, pk, sk) {
|
|
26
|
+
await (0, retry_1.withDynamoDBRetry)(() => context.client.delete({ TableName: context.tableName, Key: { PK: pk, SK: sk } }));
|
|
27
|
+
if (context.vectorBackend) {
|
|
28
|
+
await (0, index_sync_1.syncVectorIndex)(context.vectorBackend, op.namespace, op.key, undefined, context.logger);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Compute the embedding for a put, honoring `op.index` (false disables it). */
|
|
32
|
+
async function resolveEmbedding(context, op, value) {
|
|
33
|
+
if (op.index === false)
|
|
34
|
+
return undefined;
|
|
35
|
+
return (0, semantic_search_1.embedValue)(context, value, Array.isArray(op.index) ? op.index : undefined);
|
|
36
|
+
}
|
|
37
|
+
/** Put the record; on failure best-effort clean any S3 objects it referenced. */
|
|
38
|
+
async function persistRecord(context, record) {
|
|
39
|
+
try {
|
|
40
|
+
await (0, retry_1.withDynamoDBRetry)(() => context.client.put({ TableName: context.tableName, Item: record }));
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (context.offloader) {
|
|
44
|
+
await (0, orphans_1.cleanUpS3Orphans)(context.offloader, (0, descriptor_keys_1.collectS3Keys)([record.value]), 'store.put', context.logger);
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Store, update, or delete an item. A null value deletes; otherwise the value
|
|
51
|
+
* is encoded (with optional compression/S3 offload), `createdAt` is preserved
|
|
52
|
+
* across updates, and an embedding is computed when indexing is enabled. When a
|
|
53
|
+
* `vectorBackend` is configured the embedding is sent there (and not stored on
|
|
54
|
+
* the item); DynamoDB always holds the canonical item.
|
|
55
|
+
*/
|
|
56
|
+
async function putItem(context, op) {
|
|
57
|
+
(0, validation_1.validateNamespace)(op.namespace);
|
|
58
|
+
(0, validation_1.validateKey)(op.key);
|
|
59
|
+
const pk = (0, keys_1.partitionKey)(op.namespace);
|
|
60
|
+
const sk = (0, keys_1.sortKey)(op.namespace, op.key);
|
|
61
|
+
if (op.value === null) {
|
|
62
|
+
await deleteStoreItem(context, op, pk, sk);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const value = op.value;
|
|
66
|
+
const timestamp = (0, clock_1.nowIso)();
|
|
67
|
+
const createdAt = (await readCreatedAt(context, pk, sk)) ?? timestamp;
|
|
68
|
+
const embedding = await resolveEmbedding(context, op, value);
|
|
69
|
+
const ttlTimestamp = context.ttl ? (0, ttl_1.calculateTtlTimestamp)(context.ttl) : undefined;
|
|
70
|
+
const record = await (0, item_mapper_1.buildStoreItem)(context, op.namespace, op.key, value, {
|
|
71
|
+
createdAt,
|
|
72
|
+
updatedAt: timestamp,
|
|
73
|
+
embedding: context.vectorBackend ? undefined : embedding,
|
|
74
|
+
ttlTimestamp,
|
|
75
|
+
});
|
|
76
|
+
await persistRecord(context, record);
|
|
77
|
+
if (context.vectorBackend) {
|
|
78
|
+
await (0, index_sync_1.syncVectorIndex)(context.vectorBackend, op.namespace, op.key, embedding, context.logger);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=put.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put.js","sourceRoot":"","sources":["../../../src/store/actions/put.ts"],"names":[],"mappings":";;AAoFA,0BAwBC;AA1GD,8CAA4C;A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,EAAE,CAAC,CAAC;QAC3C,OAAO;IACT,CAAC;IACD,MAAM,KAAK,GAAG,EAAE,CAAC,KAAkC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAA,cAAM,GAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,CAAC,MAAM,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,SAAS,CAAC;IACtE,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAA,2BAAqB,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAc,EAAC,OAAO,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE;QACxE,SAAS;QACT,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACxD,YAAY;KACb,CAAC,CAAC;IACH,MAAM,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,MAAM,IAAA,4BAAe,EAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAChG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoreContext } from '../internal/setup';
|
|
2
|
+
/** Counts returned by {@link reconcileVectorIndex}. */
|
|
3
|
+
export interface VectorReconcileResult {
|
|
4
|
+
upserted: number;
|
|
5
|
+
pruned: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Repair the vector backend against the canonical DynamoDB items under
|
|
9
|
+
* `namespacePrefix`: re-push every live embedding, and — when the backend
|
|
10
|
+
* implements {@link VectorBackend.listKeys} — prune vectors with no canonical
|
|
11
|
+
* item. A maintenance tool for backend drift; run it when the namespace is
|
|
12
|
+
* idle. Re-embeds with the store's configured fields, so per-put `index` field
|
|
13
|
+
* overrides are not reproduced. Requires a configured `index` and
|
|
14
|
+
* `vectorBackend`; the prefix must be a non-empty namespace.
|
|
15
|
+
*/
|
|
16
|
+
export declare function reconcileVectorIndex(context: StoreContext, namespacePrefix: string[]): Promise<VectorReconcileResult>;
|
|
17
|
+
//# sourceMappingURL=reconcile-vector-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-vector-index.d.ts","sourceRoot":"","sources":["../../../src/store/actions/reconcile-vector-index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,YAAY,EACrB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAUhC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reconcileVectorIndex = reconcileVectorIndex;
|
|
4
|
+
const errors_1 = require("../../shared/errors/errors");
|
|
5
|
+
const index_reconcile_1 = require("../internal/index-reconcile");
|
|
6
|
+
const validation_1 = require("../internal/validation");
|
|
7
|
+
/**
|
|
8
|
+
* Repair the vector backend against the canonical DynamoDB items under
|
|
9
|
+
* `namespacePrefix`: re-push every live embedding, and — when the backend
|
|
10
|
+
* implements {@link VectorBackend.listKeys} — prune vectors with no canonical
|
|
11
|
+
* item. A maintenance tool for backend drift; run it when the namespace is
|
|
12
|
+
* idle. Re-embeds with the store's configured fields, so per-put `index` field
|
|
13
|
+
* overrides are not reproduced. Requires a configured `index` and
|
|
14
|
+
* `vectorBackend`; the prefix must be a non-empty namespace.
|
|
15
|
+
*/
|
|
16
|
+
async function reconcileVectorIndex(context, namespacePrefix) {
|
|
17
|
+
(0, validation_1.validateNamespace)(namespacePrefix);
|
|
18
|
+
if (!context.index || !context.vectorBackend) {
|
|
19
|
+
throw new errors_1.ValidationError('reconcileVectorIndex requires a configured index and vectorBackend');
|
|
20
|
+
}
|
|
21
|
+
const backend = context.vectorBackend;
|
|
22
|
+
const targets = await (0, index_reconcile_1.collectReconcileTargets)(context, namespacePrefix);
|
|
23
|
+
const upserted = await (0, index_reconcile_1.pushEmbeddings)(backend, targets);
|
|
24
|
+
const pruned = await (0, index_reconcile_1.pruneOrphans)(context, backend, namespacePrefix, targets);
|
|
25
|
+
return { upserted, pruned };
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=reconcile-vector-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-vector-index.js","sourceRoot":"","sources":["../../../src/store/actions/reconcile-vector-index.ts"],"names":[],"mappings":";;AAoBA,oDAaC;AAjCD,uDAA6D;AAC7D,iEAAoG;AAEpG,uDAA2D;AAQ3D;;;;;;;;GAQG;AACI,KAAK,UAAU,oBAAoB,CACxC,OAAqB,EACrB,eAAyB;IAEzB,IAAA,8BAAiB,EAAC,eAAe,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC7C,MAAM,IAAI,wBAAe,CAAC,oEAAoE,CAAC,CAAC;IAClG,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,IAAA,yCAAuB,EAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAc,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAY,EAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SearchItem, SearchOperation } from '@langchain/langgraph-checkpoint';
|
|
2
|
+
import type { StoreContext } from '../internal/setup';
|
|
3
|
+
/**
|
|
4
|
+
* Search items under a namespace prefix: metadata filtering plus optional
|
|
5
|
+
* semantic ranking. A non-empty prefix uses a native Query; an empty prefix
|
|
6
|
+
* falls back to a (filtered) Scan. Semantic ranking uses the configured
|
|
7
|
+
* VectorBackend when present, else an in-memory cosine ranking (capped).
|
|
8
|
+
*/
|
|
9
|
+
export declare function searchItems(context: StoreContext, op: SearchOperation): Promise<SearchItem[]>;
|
|
10
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/store/actions/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,UAAU,EACV,eAAe,EAChB,MAAM,iCAAiC,CAAC;AASzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuDtD;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBvB"}
|