@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
package/dist/shared/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared batch write utilities with UnprocessedItems retry logic
|
|
3
|
-
* Eliminates duplication of the retry pattern across checkpointer, store, and history modules
|
|
4
|
-
*/
|
|
5
|
-
import type { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
|
6
|
-
interface PutWriteRequest {
|
|
7
|
-
PutRequest: {
|
|
8
|
-
Item: object;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
interface DeleteWriteRequest {
|
|
12
|
-
DeleteRequest: {
|
|
13
|
-
Key: object;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
type WriteRequest = PutWriteRequest | DeleteWriteRequest;
|
|
17
|
-
/**
|
|
18
|
-
* Error thrown when `batchWriteWithRetry` / `batchWriteAllWithRetry` exhaust
|
|
19
|
-
* their UnprocessedItems retry budget. Carries enough information for the
|
|
20
|
-
* caller to reason about recovery: how many items persisted before the giveup,
|
|
21
|
-
* how many are still un-acked, and which items remained un-acked.
|
|
22
|
-
*
|
|
23
|
-
* *Partial-success semantics:* DynamoDB's BatchWriteItem is not atomic across
|
|
24
|
-
* items in a batch, and `batchWriteAllWithRetry` issues a sequence of 25-item
|
|
25
|
-
* batches. When this error is thrown, any item not listed in `unprocessed` has
|
|
26
|
-
* already been acked by DynamoDB. Callers that need all-or-nothing must drive
|
|
27
|
-
* reconciliation from `unprocessed` (retry, compensating delete, or surface to
|
|
28
|
-
* the user) — this helper cannot roll back the successful rows for you.
|
|
29
|
-
*/
|
|
30
|
-
export declare class BatchWriteIncompleteError extends Error {
|
|
31
|
-
readonly succeededCount: number;
|
|
32
|
-
readonly unprocessed: WriteRequest[];
|
|
33
|
-
constructor(succeededCount: number, unprocessed: WriteRequest[], retries: number);
|
|
34
|
-
}
|
|
35
|
-
export interface BatchWriteOptions {
|
|
36
|
-
/** Optional AbortSignal — short-circuits retry backoff and rejects with the abort reason. */
|
|
37
|
-
signal?: AbortSignal;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Execute a single batchWrite call with exponential backoff retry for UnprocessedItems.
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* On exhaustion of the UnprocessedItems retry budget this throws a
|
|
44
|
-
* {@link BatchWriteIncompleteError} that carries the un-acked items — items
|
|
45
|
-
* NOT listed there were acked by DynamoDB and persist in the table. There is
|
|
46
|
-
* no rollback: callers that need an all-or-nothing write must use
|
|
47
|
-
* `TransactWriteItems` (capped at 100 items per request) instead of this
|
|
48
|
-
* helper.
|
|
49
|
-
*
|
|
50
|
-
* @param client - DynamoDB Document client
|
|
51
|
-
* @param tableName - Target DynamoDB table name
|
|
52
|
-
* @param requestItems - Array of write requests (PutRequest or DeleteRequest objects)
|
|
53
|
-
* @param options.signal - Optional AbortSignal cancelling in-flight retries
|
|
54
|
-
* @throws {BatchWriteIncompleteError} if retries are exhausted with items still unprocessed
|
|
55
|
-
*/
|
|
56
|
-
export declare function batchWriteWithRetry(client: DynamoDBDocument, tableName: string, requestItems: WriteRequest[], options?: BatchWriteOptions): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Execute batch writes for an arbitrary number of items, chunking into batches of 25.
|
|
59
|
-
*
|
|
60
|
-
* @remarks
|
|
61
|
-
* Each batch is retried independently. On failure of one batch, any preceding
|
|
62
|
-
* batches in the same call have already been acked by DynamoDB. This helper
|
|
63
|
-
* does not span a transaction across batches — see
|
|
64
|
-
* {@link batchWriteWithRetry} for the partial-success contract.
|
|
65
|
-
*
|
|
66
|
-
* @param client - DynamoDB Document client
|
|
67
|
-
* @param tableName - Target DynamoDB table name
|
|
68
|
-
* @param requestItems - Array of write requests (can exceed 25)
|
|
69
|
-
* @param options.signal - Optional AbortSignal cancelling in-flight retries
|
|
70
|
-
* @throws {BatchWriteIncompleteError} if any batch fails after exhausting retries
|
|
71
|
-
*/
|
|
72
|
-
export declare function batchWriteAllWithRetry(client: DynamoDBDocument, tableName: string, requestItems: WriteRequest[], options?: BatchWriteOptions): Promise<void>;
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=batch-write.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch-write.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/batch-write.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,UAAU,eAAe;IACvB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9B;AAED,UAAU,kBAAkB;IAC1B,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAChC;AAED,KAAK,YAAY,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;gBAEzB,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM;CAUjF;AAED,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAAE,EAC5B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,gBAAgB,EACxB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAAE,EAC5B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Shared batch write utilities with UnprocessedItems retry logic
|
|
4
|
-
* Eliminates duplication of the retry pattern across checkpointer, store, and history modules
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.BatchWriteIncompleteError = void 0;
|
|
8
|
-
exports.batchWriteWithRetry = batchWriteWithRetry;
|
|
9
|
-
exports.batchWriteAllWithRetry = batchWriteAllWithRetry;
|
|
10
|
-
const constants_1 = require("./constants");
|
|
11
|
-
const retry_1 = require("./retry");
|
|
12
|
-
const sleep_1 = require("./sleep");
|
|
13
|
-
/**
|
|
14
|
-
* Error thrown when `batchWriteWithRetry` / `batchWriteAllWithRetry` exhaust
|
|
15
|
-
* their UnprocessedItems retry budget. Carries enough information for the
|
|
16
|
-
* caller to reason about recovery: how many items persisted before the giveup,
|
|
17
|
-
* how many are still un-acked, and which items remained un-acked.
|
|
18
|
-
*
|
|
19
|
-
* *Partial-success semantics:* DynamoDB's BatchWriteItem is not atomic across
|
|
20
|
-
* items in a batch, and `batchWriteAllWithRetry` issues a sequence of 25-item
|
|
21
|
-
* batches. When this error is thrown, any item not listed in `unprocessed` has
|
|
22
|
-
* already been acked by DynamoDB. Callers that need all-or-nothing must drive
|
|
23
|
-
* reconciliation from `unprocessed` (retry, compensating delete, or surface to
|
|
24
|
-
* the user) — this helper cannot roll back the successful rows for you.
|
|
25
|
-
*/
|
|
26
|
-
class BatchWriteIncompleteError extends Error {
|
|
27
|
-
succeededCount;
|
|
28
|
-
unprocessed;
|
|
29
|
-
constructor(succeededCount, unprocessed, retries) {
|
|
30
|
-
super(`batchWrite did not drain after ${retries} UnprocessedItems retries: ` +
|
|
31
|
-
`${succeededCount} item(s) persisted, ${unprocessed.length} still un-acked. ` +
|
|
32
|
-
`Inspect err.unprocessed to drive reconciliation.`);
|
|
33
|
-
this.name = 'BatchWriteIncompleteError';
|
|
34
|
-
this.succeededCount = succeededCount;
|
|
35
|
-
this.unprocessed = unprocessed;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.BatchWriteIncompleteError = BatchWriteIncompleteError;
|
|
39
|
-
/**
|
|
40
|
-
* Execute a single batchWrite call with exponential backoff retry for UnprocessedItems.
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* On exhaustion of the UnprocessedItems retry budget this throws a
|
|
44
|
-
* {@link BatchWriteIncompleteError} that carries the un-acked items — items
|
|
45
|
-
* NOT listed there were acked by DynamoDB and persist in the table. There is
|
|
46
|
-
* no rollback: callers that need an all-or-nothing write must use
|
|
47
|
-
* `TransactWriteItems` (capped at 100 items per request) instead of this
|
|
48
|
-
* helper.
|
|
49
|
-
*
|
|
50
|
-
* @param client - DynamoDB Document client
|
|
51
|
-
* @param tableName - Target DynamoDB table name
|
|
52
|
-
* @param requestItems - Array of write requests (PutRequest or DeleteRequest objects)
|
|
53
|
-
* @param options.signal - Optional AbortSignal cancelling in-flight retries
|
|
54
|
-
* @throws {BatchWriteIncompleteError} if retries are exhausted with items still unprocessed
|
|
55
|
-
*/
|
|
56
|
-
async function batchWriteWithRetry(client, tableName, requestItems, options = {}) {
|
|
57
|
-
if (requestItems.length === 0)
|
|
58
|
-
return;
|
|
59
|
-
// Loop over UnprocessedItems OUTSIDE the transient-error retry wrapper.
|
|
60
|
-
// This way a ThrottlingException during an UnprocessedItems follow-up call
|
|
61
|
-
// doesn't cause the outer loop to re-submit items that already succeeded —
|
|
62
|
-
// which would be an idempotency problem for DeleteRequests against items
|
|
63
|
-
// that have since been recreated.
|
|
64
|
-
const initialCount = requestItems.length;
|
|
65
|
-
let pending = requestItems;
|
|
66
|
-
let retryDelay = sleep_1.INITIAL_BACKOFF_DELAY_MS;
|
|
67
|
-
let retryCount = 0;
|
|
68
|
-
while (pending.length > 0) {
|
|
69
|
-
const result = await (0, retry_1.withDynamoDBRetry)(async () => {
|
|
70
|
-
return await client.batchWrite({
|
|
71
|
-
RequestItems: { [tableName]: pending },
|
|
72
|
-
});
|
|
73
|
-
}, { signal: options.signal });
|
|
74
|
-
const unprocessed = result.UnprocessedItems?.[tableName] ?? [];
|
|
75
|
-
if (unprocessed.length === 0)
|
|
76
|
-
return;
|
|
77
|
-
retryCount++;
|
|
78
|
-
if (retryCount > constants_1.MAX_UNPROCESSED_RETRIES) {
|
|
79
|
-
throw new BatchWriteIncompleteError(initialCount - unprocessed.length, unprocessed, constants_1.MAX_UNPROCESSED_RETRIES);
|
|
80
|
-
}
|
|
81
|
-
// Full jitter so concurrent batch writers don't re-pressure the partition together.
|
|
82
|
-
await (0, sleep_1.sleep)((0, sleep_1.fullJitter)(retryDelay), options.signal);
|
|
83
|
-
retryDelay = (0, sleep_1.nextBackoffDelay)(retryDelay);
|
|
84
|
-
pending = unprocessed;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Execute batch writes for an arbitrary number of items, chunking into batches of 25.
|
|
89
|
-
*
|
|
90
|
-
* @remarks
|
|
91
|
-
* Each batch is retried independently. On failure of one batch, any preceding
|
|
92
|
-
* batches in the same call have already been acked by DynamoDB. This helper
|
|
93
|
-
* does not span a transaction across batches — see
|
|
94
|
-
* {@link batchWriteWithRetry} for the partial-success contract.
|
|
95
|
-
*
|
|
96
|
-
* @param client - DynamoDB Document client
|
|
97
|
-
* @param tableName - Target DynamoDB table name
|
|
98
|
-
* @param requestItems - Array of write requests (can exceed 25)
|
|
99
|
-
* @param options.signal - Optional AbortSignal cancelling in-flight retries
|
|
100
|
-
* @throws {BatchWriteIncompleteError} if any batch fails after exhausting retries
|
|
101
|
-
*/
|
|
102
|
-
async function batchWriteAllWithRetry(client, tableName, requestItems, options = {}) {
|
|
103
|
-
if (requestItems.length === 0)
|
|
104
|
-
return;
|
|
105
|
-
for (let i = 0; i < requestItems.length; i += constants_1.BATCH_WRITE_MAX) {
|
|
106
|
-
const batch = requestItems.slice(i, i + constants_1.BATCH_WRITE_MAX);
|
|
107
|
-
await batchWriteWithRetry(client, tableName, batch, options);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=batch-write.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch-write.js","sourceRoot":"","sources":["../../../src/shared/utils/batch-write.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAqEH,kDA4CC;AAiBD,wDAYC;AA1ID,2CAAuE;AACvE,mCAA4C;AAC5C,mCAAwF;AAYxF;;;;;;;;;;;;GAYG;AACH,MAAa,yBAA0B,SAAQ,KAAK;IACzC,cAAc,CAAS;IACvB,WAAW,CAAiB;IAErC,YAAY,cAAsB,EAAE,WAA2B,EAAE,OAAe;QAC9E,KAAK,CACH,kCAAkC,OAAO,6BAA6B;YACpE,GAAG,cAAc,uBAAuB,WAAW,CAAC,MAAM,mBAAmB;YAC7E,kDAAkD,CACrD,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF;AAdD,8DAcC;AAOD;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,UAAU,mBAAmB,CACvC,MAAwB,EACxB,SAAiB,EACjB,YAA4B,EAC5B,UAA6B,EAAE;IAE/B,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEtC,wEAAwE;IACxE,2EAA2E;IAC3E,2EAA2E;IAC3E,yEAAyE;IACzE,kCAAkC;IAClC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC;IACzC,IAAI,OAAO,GAAmB,YAAY,CAAC;IAC3C,IAAI,UAAU,GAAG,gCAAwB,CAAC;IAC1C,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAiB,EACpC,KAAK,IAAI,EAAE;YACT,OAAO,MAAM,MAAM,CAAC,UAAU,CAAC;gBAC7B,YAAY,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE;aACvC,CAAC,CAAC;QACL,CAAC,EACD,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAC3B,CAAC;QAEF,MAAM,WAAW,GAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAgC,IAAI,EAAE,CAAC;QAC/F,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAErC,UAAU,EAAE,CAAC;QACb,IAAI,UAAU,GAAG,mCAAuB,EAAE,CAAC;YACzC,MAAM,IAAI,yBAAyB,CACjC,YAAY,GAAG,WAAW,CAAC,MAAM,EACjC,WAAW,EACX,mCAAuB,CACxB,CAAC;QACJ,CAAC;QACD,oFAAoF;QACpF,MAAM,IAAA,aAAK,EAAC,IAAA,kBAAU,EAAC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACpD,UAAU,GAAG,IAAA,wBAAgB,EAAC,UAAU,CAAC,CAAC;QAC1C,OAAO,GAAG,WAAW,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,sBAAsB,CAC1C,MAAwB,EACxB,SAAiB,EACjB,YAA4B,EAC5B,UAA6B,EAAE;IAE/B,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,2BAAe,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,2BAAe,CAAC,CAAC;QACzD,MAAM,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared DynamoDB client resolution for DynamoDBSaver / DynamoDBStore /
|
|
3
|
-
* DynamoDBChatMessageHistory.
|
|
4
|
-
*
|
|
5
|
-
* Each module supports two construction modes:
|
|
6
|
-
* 1. Pass `client` (pre-built DynamoDBDocument): we do not own it and skip cleanup.
|
|
7
|
-
* 2. Pass `clientConfig` (or nothing): we build our own client and own its lifecycle.
|
|
8
|
-
*
|
|
9
|
-
* This helper captures the if/else and the `ownsClient` flag in one place.
|
|
10
|
-
*/
|
|
11
|
-
import { DynamoDBClient, type DynamoDBClientConfig } from '@aws-sdk/client-dynamodb';
|
|
12
|
-
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
|
13
|
-
export interface ResolvedDynamoDBClient {
|
|
14
|
-
/** Underlying DynamoDB client — undefined when an external client was injected. */
|
|
15
|
-
ddbClient: DynamoDBClient | undefined;
|
|
16
|
-
/** DocumentClient wrapper used for all operations. */
|
|
17
|
-
client: DynamoDBDocument;
|
|
18
|
-
/** True when this library owns the underlying client and must destroy it. */
|
|
19
|
-
ownsClient: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare function resolveDynamoDBClient(options: {
|
|
22
|
-
client?: DynamoDBDocument;
|
|
23
|
-
clientConfig?: DynamoDBClientConfig;
|
|
24
|
-
}): ResolvedDynamoDBClient;
|
|
25
|
-
//# sourceMappingURL=client-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/client-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,mFAAmF;IACnF,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,sDAAsD;IACtD,MAAM,EAAE,gBAAgB,CAAC;IACzB,6EAA6E;IAC7E,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,GAAG,sBAAsB,CAMzB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Shared DynamoDB client resolution for DynamoDBSaver / DynamoDBStore /
|
|
4
|
-
* DynamoDBChatMessageHistory.
|
|
5
|
-
*
|
|
6
|
-
* Each module supports two construction modes:
|
|
7
|
-
* 1. Pass `client` (pre-built DynamoDBDocument): we do not own it and skip cleanup.
|
|
8
|
-
* 2. Pass `clientConfig` (or nothing): we build our own client and own its lifecycle.
|
|
9
|
-
*
|
|
10
|
-
* This helper captures the if/else and the `ownsClient` flag in one place.
|
|
11
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.resolveDynamoDBClient = resolveDynamoDBClient;
|
|
14
|
-
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
15
|
-
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
|
|
16
|
-
function resolveDynamoDBClient(options) {
|
|
17
|
-
if (options.client) {
|
|
18
|
-
return { ddbClient: undefined, client: options.client, ownsClient: false };
|
|
19
|
-
}
|
|
20
|
-
const ddbClient = new client_dynamodb_1.DynamoDBClient(options.clientConfig || {});
|
|
21
|
-
return { ddbClient, client: lib_dynamodb_1.DynamoDBDocument.from(ddbClient), ownsClient: true };
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=client-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-factory.js","sourceRoot":"","sources":["../../../src/shared/utils/client-factory.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAcH,sDASC;AArBD,8DAAqF;AACrF,wDAAyD;AAWzD,SAAgB,qBAAqB,CAAC,OAGrC;IACC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IAC7E,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,gCAAc,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;IACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,+BAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checkpoint compression utility using Node.js built-in zlib
|
|
3
|
-
* Provides transparent gzip compression/decompression with smart thresholds
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Configuration for checkpoint compression
|
|
7
|
-
*/
|
|
8
|
-
export interface CompressionConfig {
|
|
9
|
-
/** Whether compression is enabled (default: false) */
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
/** Minimum payload size in bytes to trigger compression (default: 1024 = 1KB) */
|
|
12
|
-
minSizeBytes?: number;
|
|
13
|
-
/** Gzip compression level 1-9 (default: 6 = balanced speed/ratio) */
|
|
14
|
-
level?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Hard cap on decompressed output size in bytes (default: 50 MiB).
|
|
17
|
-
* Protects against gzip-bomb payloads. Decompression throws if the output
|
|
18
|
-
* would exceed this cap.
|
|
19
|
-
*/
|
|
20
|
-
maxDecompressedBytes?: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Compressor for checkpoint data using gzip
|
|
24
|
-
*
|
|
25
|
-
* Features:
|
|
26
|
-
* - Smart threshold: skips compression for payloads below `minSizeBytes`
|
|
27
|
-
* - Auto-detection: `decompress()` transparently handles both compressed and uncompressed data
|
|
28
|
-
* - Zero dependencies: uses Node.js built-in `zlib`
|
|
29
|
-
*/
|
|
30
|
-
export declare class Compressor {
|
|
31
|
-
private readonly minSizeBytes;
|
|
32
|
-
private readonly level;
|
|
33
|
-
private readonly maxDecompressedBytes;
|
|
34
|
-
constructor(config: CompressionConfig);
|
|
35
|
-
/**
|
|
36
|
-
* Compress data if above the minimum size threshold
|
|
37
|
-
*
|
|
38
|
-
* @param data - Raw data to compress
|
|
39
|
-
* @returns Compressed data (gzip) or original data if below threshold
|
|
40
|
-
*/
|
|
41
|
-
compress(data: Uint8Array): Promise<Uint8Array>;
|
|
42
|
-
/**
|
|
43
|
-
* Decompress data if it is library-compressed, otherwise passthrough.
|
|
44
|
-
*
|
|
45
|
-
* Detection order:
|
|
46
|
-
* 1. LGC marker: new-format payloads produced by compress() above.
|
|
47
|
-
* 2. Gzip magic: legacy payloads from before the marker was introduced;
|
|
48
|
-
* decompressed for backward compatibility.
|
|
49
|
-
*
|
|
50
|
-
* Raw user binary that happens to start with the gzip magic bytes is still at
|
|
51
|
-
* risk under (2), but new writes use the marker and will be unambiguous.
|
|
52
|
-
*
|
|
53
|
-
* @param data - Potentially compressed data
|
|
54
|
-
* @returns Decompressed data
|
|
55
|
-
*/
|
|
56
|
-
decompress(data: Uint8Array): Promise<Uint8Array>;
|
|
57
|
-
/**
|
|
58
|
-
* Check if data carries the library's compression marker.
|
|
59
|
-
*/
|
|
60
|
-
static hasCompressedMarker(data: Uint8Array): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Check if data starts with the gzip magic number (legacy-format detection).
|
|
63
|
-
*/
|
|
64
|
-
static isGzipped(data: Uint8Array): boolean;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=compressor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressor.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/compressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiCH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;gBAElC,MAAM,EAAE,iBAAiB;IAMrC;;;;;OAKG;IACG,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAqBrD;;;;;;;;;;;;;OAaG;IACG,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IA8BvD;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAQrD;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;CAG5C"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Checkpoint compression utility using Node.js built-in zlib
|
|
4
|
-
* Provides transparent gzip compression/decompression with smart thresholds
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.Compressor = void 0;
|
|
8
|
-
const node_util_1 = require("node:util");
|
|
9
|
-
const node_zlib_1 = require("node:zlib");
|
|
10
|
-
const gzipAsync = (0, node_util_1.promisify)(node_zlib_1.gzip);
|
|
11
|
-
const gunzipAsync = (0, node_util_1.promisify)(node_zlib_1.gunzip);
|
|
12
|
-
/** Gzip magic number bytes for auto-detection of legacy payloads */
|
|
13
|
-
const GZIP_MAGIC = new Uint8Array([0x1f, 0x8b]);
|
|
14
|
-
/**
|
|
15
|
-
* 3-byte marker stamped at the start of new compressed payloads. Unambiguously
|
|
16
|
-
* identifies "this is library-compressed" so we do not try to gunzip raw binary
|
|
17
|
-
* that happens to start with the gzip magic bytes. Legacy payloads (pre-marker)
|
|
18
|
-
* are still decompressed on a gzip-magic fallback — see `decompress()`.
|
|
19
|
-
*
|
|
20
|
-
* Bytes 0x4C 0x47 0x43 spell "LGC" (LangGraph-Compressed).
|
|
21
|
-
*/
|
|
22
|
-
const COMPRESSED_MARKER = new Uint8Array([0x4c, 0x47, 0x43]);
|
|
23
|
-
/**
|
|
24
|
-
* Default maximum decompressed output size: 50 MiB.
|
|
25
|
-
*
|
|
26
|
-
* Guards against "gzip bomb" payloads that are small on disk / in DynamoDB but
|
|
27
|
-
* expand to multi-gigabyte buffers that would OOM the process. Raise this via
|
|
28
|
-
* `CompressionConfig.maxDecompressedBytes` only if a legitimate workload needs
|
|
29
|
-
* larger checkpoints (remember: a DynamoDB item is hard-capped at 400 KB, so
|
|
30
|
-
* values above this threshold must originate from S3 offloading and should be
|
|
31
|
-
* treated with the same scrutiny).
|
|
32
|
-
*/
|
|
33
|
-
const DEFAULT_MAX_DECOMPRESSED_BYTES = 50 * 1024 * 1024;
|
|
34
|
-
/**
|
|
35
|
-
* Compressor for checkpoint data using gzip
|
|
36
|
-
*
|
|
37
|
-
* Features:
|
|
38
|
-
* - Smart threshold: skips compression for payloads below `minSizeBytes`
|
|
39
|
-
* - Auto-detection: `decompress()` transparently handles both compressed and uncompressed data
|
|
40
|
-
* - Zero dependencies: uses Node.js built-in `zlib`
|
|
41
|
-
*/
|
|
42
|
-
class Compressor {
|
|
43
|
-
minSizeBytes;
|
|
44
|
-
level;
|
|
45
|
-
maxDecompressedBytes;
|
|
46
|
-
constructor(config) {
|
|
47
|
-
this.minSizeBytes = config.minSizeBytes ?? 1024;
|
|
48
|
-
this.level = config.level ?? 6;
|
|
49
|
-
this.maxDecompressedBytes = config.maxDecompressedBytes ?? DEFAULT_MAX_DECOMPRESSED_BYTES;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Compress data if above the minimum size threshold
|
|
53
|
-
*
|
|
54
|
-
* @param data - Raw data to compress
|
|
55
|
-
* @returns Compressed data (gzip) or original data if below threshold
|
|
56
|
-
*/
|
|
57
|
-
async compress(data) {
|
|
58
|
-
if (data.length < this.minSizeBytes) {
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
const compressed = new Uint8Array(await gzipAsync(data, { level: this.level }));
|
|
62
|
-
// Only use compressed output if it saves enough space to pay for the 3-byte
|
|
63
|
-
// marker overhead plus a reasonable margin (10%). Avoids data expansion for
|
|
64
|
-
// already-compressed or random binary payloads.
|
|
65
|
-
if (compressed.length + COMPRESSED_MARKER.length >= data.length * 0.9) {
|
|
66
|
-
return data;
|
|
67
|
-
}
|
|
68
|
-
// Prepend the LGC marker so decompress() can unambiguously identify our output.
|
|
69
|
-
const out = new Uint8Array(COMPRESSED_MARKER.length + compressed.length);
|
|
70
|
-
out.set(COMPRESSED_MARKER, 0);
|
|
71
|
-
out.set(compressed, COMPRESSED_MARKER.length);
|
|
72
|
-
return out;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Decompress data if it is library-compressed, otherwise passthrough.
|
|
76
|
-
*
|
|
77
|
-
* Detection order:
|
|
78
|
-
* 1. LGC marker: new-format payloads produced by compress() above.
|
|
79
|
-
* 2. Gzip magic: legacy payloads from before the marker was introduced;
|
|
80
|
-
* decompressed for backward compatibility.
|
|
81
|
-
*
|
|
82
|
-
* Raw user binary that happens to start with the gzip magic bytes is still at
|
|
83
|
-
* risk under (2), but new writes use the marker and will be unambiguous.
|
|
84
|
-
*
|
|
85
|
-
* @param data - Potentially compressed data
|
|
86
|
-
* @returns Decompressed data
|
|
87
|
-
*/
|
|
88
|
-
async decompress(data) {
|
|
89
|
-
// zlib rejects with an ERR_BUFFER_TOO_LARGE when the decompressed output
|
|
90
|
-
// would exceed maxOutputLength — caps memory use on hostile gzip-bomb input.
|
|
91
|
-
const opts = { maxOutputLength: this.maxDecompressedBytes };
|
|
92
|
-
try {
|
|
93
|
-
if (Compressor.hasCompressedMarker(data)) {
|
|
94
|
-
const payload = data.subarray(COMPRESSED_MARKER.length);
|
|
95
|
-
return new Uint8Array(await gunzipAsync(payload, opts));
|
|
96
|
-
}
|
|
97
|
-
if (Compressor.isGzipped(data)) {
|
|
98
|
-
// Legacy, pre-marker payload
|
|
99
|
-
return new Uint8Array(await gunzipAsync(data, opts));
|
|
100
|
-
}
|
|
101
|
-
return data;
|
|
102
|
-
}
|
|
103
|
-
catch (err) {
|
|
104
|
-
if (err &&
|
|
105
|
-
typeof err === 'object' &&
|
|
106
|
-
err.code === 'ERR_BUFFER_TOO_LARGE') {
|
|
107
|
-
throw new Error(`Refusing to decompress payload: decompressed output would exceed ${this.maxDecompressedBytes} bytes. ` +
|
|
108
|
-
`Raise Compressor's maxDecompressedBytes if this limit is too low.`, { cause: err });
|
|
109
|
-
}
|
|
110
|
-
throw err;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Check if data carries the library's compression marker.
|
|
115
|
-
*/
|
|
116
|
-
static hasCompressedMarker(data) {
|
|
117
|
-
if (data.length < COMPRESSED_MARKER.length)
|
|
118
|
-
return false;
|
|
119
|
-
for (let i = 0; i < COMPRESSED_MARKER.length; i++) {
|
|
120
|
-
if (data[i] !== COMPRESSED_MARKER[i])
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Check if data starts with the gzip magic number (legacy-format detection).
|
|
127
|
-
*/
|
|
128
|
-
static isGzipped(data) {
|
|
129
|
-
return data.length >= 2 && data[0] === GZIP_MAGIC[0] && data[1] === GZIP_MAGIC[1];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.Compressor = Compressor;
|
|
133
|
-
//# sourceMappingURL=compressor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compressor.js","sourceRoot":"","sources":["../../../src/shared/utils/compressor.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared constants for validation across store and checkpointer
|
|
3
|
-
*/
|
|
4
|
-
export declare const MAX_TTL_DAYS: number;
|
|
5
|
-
export declare const MAX_LOOP_ITERATIONS = 1000;
|
|
6
|
-
export declare const MAX_TOTAL_ITEMS_IN_MEMORY = 10000;
|
|
7
|
-
export declare const BATCH_WRITE_MAX = 25;
|
|
8
|
-
export declare const MAX_UNPROCESSED_RETRIES = 10;
|
|
9
|
-
/**
|
|
10
|
-
* Validate TTL days (shared logic)
|
|
11
|
-
*/
|
|
12
|
-
export declare function validateTTLDays(ttlDays: number | undefined): void;
|
|
13
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,YAAY,QAAU,CAAC;AAKpC,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAC/C,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAgBjE"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Shared constants for validation across store and checkpointer
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MAX_UNPROCESSED_RETRIES = exports.BATCH_WRITE_MAX = exports.MAX_TOTAL_ITEMS_IN_MEMORY = exports.MAX_LOOP_ITERATIONS = exports.MAX_TTL_DAYS = void 0;
|
|
7
|
-
exports.validateTTLDays = validateTTLDays;
|
|
8
|
-
// Common DynamoDB limits
|
|
9
|
-
exports.MAX_TTL_DAYS = 365 * 5; // 5 years
|
|
10
|
-
// A DynamoDB Query page is bounded by ~1MB. 1000 iterations × 1MB = ~1GB of data,
|
|
11
|
-
// which is well beyond MAX_TOTAL_ITEMS_IN_MEMORY anyway, so the lower memory cap
|
|
12
|
-
// stays the real guard. Previously 100 — too tight for long chat histories or
|
|
13
|
-
// filter-heavy searches where many pages yield few matching items.
|
|
14
|
-
exports.MAX_LOOP_ITERATIONS = 1000;
|
|
15
|
-
exports.MAX_TOTAL_ITEMS_IN_MEMORY = 10000; // Maximum items to collect in memory
|
|
16
|
-
exports.BATCH_WRITE_MAX = 25; // DynamoDB BatchWriteItem limit per request
|
|
17
|
-
exports.MAX_UNPROCESSED_RETRIES = 10; // Maximum retries for UnprocessedItems loops
|
|
18
|
-
/**
|
|
19
|
-
* Validate TTL days (shared logic)
|
|
20
|
-
*/
|
|
21
|
-
function validateTTLDays(ttlDays) {
|
|
22
|
-
if (ttlDays === undefined) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (typeof ttlDays !== 'number' || !Number.isInteger(ttlDays)) {
|
|
26
|
-
throw new Error('TTL days must be an integer');
|
|
27
|
-
}
|
|
28
|
-
if (ttlDays <= 0) {
|
|
29
|
-
throw new Error('TTL days must be positive');
|
|
30
|
-
}
|
|
31
|
-
if (ttlDays > exports.MAX_TTL_DAYS) {
|
|
32
|
-
throw new Error(`TTL days cannot exceed ${exports.MAX_TTL_DAYS}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/shared/utils/constants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgBH,0CAgBC;AA9BD,yBAAyB;AACZ,QAAA,YAAY,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,UAAU;AAC/C,kFAAkF;AAClF,iFAAiF;AACjF,8EAA8E;AAC9E,mEAAmE;AACtD,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAC3B,QAAA,yBAAyB,GAAG,KAAK,CAAC,CAAC,qCAAqC;AACxE,QAAA,eAAe,GAAG,EAAE,CAAC,CAAC,4CAA4C;AAClE,QAAA,uBAAuB,GAAG,EAAE,CAAC,CAAC,6CAA6C;AAExF;;GAEG;AACH,SAAgB,eAAe,CAAC,OAA2B;IACzD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,OAAO,GAAG,oBAAY,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,0BAA0B,oBAAY,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities and types
|
|
3
|
-
*/
|
|
4
|
-
export * from './compressor';
|
|
5
|
-
export * from './constants';
|
|
6
|
-
export * from './logger';
|
|
7
|
-
export * from './retry';
|
|
8
|
-
export * from './s3-offloader';
|
|
9
|
-
export * from './s3-orphans';
|
|
10
|
-
export * from './batch-write';
|
|
11
|
-
export * from './client-factory';
|
|
12
|
-
export * from './sleep';
|
|
13
|
-
export * from './ttl';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Shared utilities and types
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("./compressor"), exports);
|
|
21
|
-
__exportStar(require("./constants"), exports);
|
|
22
|
-
__exportStar(require("./logger"), exports);
|
|
23
|
-
__exportStar(require("./retry"), exports);
|
|
24
|
-
__exportStar(require("./s3-offloader"), exports);
|
|
25
|
-
__exportStar(require("./s3-orphans"), exports);
|
|
26
|
-
__exportStar(require("./batch-write"), exports);
|
|
27
|
-
__exportStar(require("./client-factory"), exports);
|
|
28
|
-
__exportStar(require("./sleep"), exports);
|
|
29
|
-
__exportStar(require("./ttl"), exports);
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,iDAA+B;AAC/B,+CAA6B;AAC7B,gDAA8B;AAC9B,mDAAiC;AACjC,0CAAwB;AACxB,wCAAsB"}
|