@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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CheckpointerContext } from '../internal/setup';
|
|
2
2
|
/**
|
|
3
|
-
* Delete
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Delete every checkpoint, payload, and write for a thread (all share the
|
|
4
|
+
* thread's partition), best-effort deleting any offloaded S3 objects. Streams
|
|
5
|
+
* the partition with unbounded pagination and flushes deletes in batches, so a
|
|
6
|
+
* thread of any size is deleted to completion with bounded memory — never
|
|
7
|
+
* silently truncated at the in-memory page caps.
|
|
7
8
|
*/
|
|
8
|
-
export declare
|
|
9
|
+
export declare function deleteThread(context: CheckpointerContext, threadId: string): Promise<void>;
|
|
9
10
|
//# sourceMappingURL=delete-thread.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-thread.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/delete-thread.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-thread.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/delete-thread.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA4C7D;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAehG"}
|
|
@@ -1,160 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// We don't set a per-query Limit — DynamoDB's default 1 MB page is far more
|
|
19
|
-
// efficient than many small 100-item queries. The real safeguard is the
|
|
20
|
-
// MAX_DELETE_BATCH_SIZE total-item cap below.
|
|
21
|
-
const allItems = [];
|
|
22
|
-
let lastEvaluatedKey;
|
|
23
|
-
let iterationCount = 0;
|
|
24
|
-
// Deliberately higher than `MAX_LOOP_ITERATIONS` used in list()/search: deletes
|
|
25
|
-
// must walk every page of a thread (there's no early-exit when a user limit is
|
|
26
|
-
// satisfied), so the bound is set to "effectively unbounded for practical
|
|
27
|
-
// workloads". The real guard is MAX_DELETE_BATCH_SIZE total items held in memory.
|
|
28
|
-
const MAX_DELETE_PAGES = 10_000;
|
|
29
|
-
do {
|
|
30
|
-
iterationCount++;
|
|
31
|
-
if (iterationCount > MAX_DELETE_PAGES) {
|
|
32
|
-
throw new Error(`deleteThread scanned more than ${MAX_DELETE_PAGES} DynamoDB pages without completing. ` +
|
|
33
|
-
`The thread has an extreme number of checkpoints — investigate before retrying.`);
|
|
34
|
-
}
|
|
35
|
-
const result = await (0, shared_1.withDynamoDBRetry)(async () => {
|
|
36
|
-
return await params.client.query({
|
|
37
|
-
TableName: params.checkpointsTableName,
|
|
38
|
-
KeyConditionExpression: 'thread_id = :thread_id',
|
|
39
|
-
ExpressionAttributeValues: {
|
|
40
|
-
':thread_id': params.threadId,
|
|
41
|
-
},
|
|
42
|
-
ExclusiveStartKey: lastEvaluatedKey,
|
|
43
|
-
});
|
|
44
|
-
}, { signal: params.signal });
|
|
45
|
-
if (result.Items && result.Items.length > 0) {
|
|
46
|
-
allItems.push(...result.Items);
|
|
47
|
-
// Safety check: prevent deleting too many items at once
|
|
48
|
-
if (allItems.length > utils_1.CheckpointerValidationConstants.MAX_DELETE_BATCH_SIZE) {
|
|
49
|
-
throw new Error(`Thread has too many items (>${utils_1.CheckpointerValidationConstants.MAX_DELETE_BATCH_SIZE}). Delete operation aborted for safety.`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
lastEvaluatedKey = result.LastEvaluatedKey;
|
|
53
|
-
} while (lastEvaluatedKey);
|
|
54
|
-
if (allItems.length === 0) {
|
|
55
|
-
return; // Nothing to delete
|
|
56
|
-
}
|
|
57
|
-
// Separate metadata items from payload items
|
|
58
|
-
const metadataItems = [];
|
|
59
|
-
for (const item of allItems) {
|
|
60
|
-
// Skip items without checkpoint_id or those with PAYLOAD# prefix
|
|
61
|
-
const ckptId = item.checkpoint_id;
|
|
62
|
-
if (typeof ckptId === 'string' && !ckptId.startsWith(types_1.PAYLOAD_SK_PREFIX)) {
|
|
63
|
-
metadataItems.push(item);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Collect S3 keys from metadata items only (payload items don't carry S3 refs)
|
|
67
|
-
const s3KeysToDelete = [];
|
|
68
|
-
if (params.s3Offloader) {
|
|
69
|
-
for (const item of metadataItems) {
|
|
70
|
-
if (item.s3_checkpoint_key) {
|
|
71
|
-
s3KeysToDelete.push(item.s3_checkpoint_key);
|
|
72
|
-
}
|
|
73
|
-
if (item.s3_metadata_key) {
|
|
74
|
-
s3KeysToDelete.push(item.s3_metadata_key);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// Delete ALL items (metadata + payload) using their actual PK+SK
|
|
79
|
-
const checkpointDeleteRequests = allItems.map((item) => ({
|
|
80
|
-
DeleteRequest: {
|
|
81
|
-
Key: {
|
|
82
|
-
thread_id: item.thread_id,
|
|
83
|
-
checkpoint_id: item.checkpoint_id,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
}));
|
|
87
|
-
await (0, shared_1.batchWriteAllWithRetry)(params.client, params.checkpointsTableName, checkpointDeleteRequests, { signal: params.signal });
|
|
88
|
-
// Fetch writes for metadata items only (payload items don't have associated writes)
|
|
89
|
-
const allWriteDeleteRequests = [];
|
|
90
|
-
const QUERY_CONCURRENCY = 10;
|
|
91
|
-
for (let i = 0; i < metadataItems.length; i += QUERY_CONCURRENCY) {
|
|
92
|
-
const checkpointBatch = metadataItems.slice(i, i + QUERY_CONCURRENCY);
|
|
93
|
-
const writesResults = await Promise.all(checkpointBatch.map((checkpoint) => queryAllWritesForCheckpoint(params.client, params.writesTableName, checkpoint)));
|
|
94
|
-
for (const writeItems of writesResults) {
|
|
95
|
-
if (writeItems.length > 0) {
|
|
96
|
-
const deleteRequests = writeItems.map((item) => ({
|
|
97
|
-
DeleteRequest: {
|
|
98
|
-
Key: {
|
|
99
|
-
thread_id_checkpoint_id_checkpoint_ns: item.thread_id_checkpoint_id_checkpoint_ns,
|
|
100
|
-
task_id_idx: item.task_id_idx,
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
}));
|
|
104
|
-
allWriteDeleteRequests.push(...deleteRequests);
|
|
105
|
-
// Collect S3 keys from write items
|
|
106
|
-
if (params.s3Offloader) {
|
|
107
|
-
for (const item of writeItems) {
|
|
108
|
-
if (item.s3_value_key) {
|
|
109
|
-
s3KeysToDelete.push(item.s3_value_key);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
3
|
+
exports.deleteThread = deleteThread;
|
|
4
|
+
const descriptor_keys_1 = require("../../shared/codec/descriptor-keys");
|
|
5
|
+
const orphans_1 = require("../../shared/codec/s3/orphans");
|
|
6
|
+
const constants_1 = require("../../shared/constants");
|
|
7
|
+
const batch_write_1 = require("../../shared/dynamodb/batch-write");
|
|
8
|
+
const paginate_1 = require("../../shared/dynamodb/paginate");
|
|
9
|
+
const primitives_1 = require("../../shared/validation/primitives");
|
|
10
|
+
const keys_1 = require("../internal/keys");
|
|
11
|
+
const query_1 = require("../internal/query");
|
|
12
|
+
/** Append an item's delete key and any offloaded payload descriptors to the buffer. */
|
|
13
|
+
function bufferItem(buffer, item) {
|
|
14
|
+
buffer.keys.push({ PK: item.PK, SK: item.SK });
|
|
15
|
+
for (const descriptor of [item.metadata, item.checkpoint, item.value]) {
|
|
16
|
+
if (descriptor)
|
|
17
|
+
buffer.descriptors.push(descriptor);
|
|
115
18
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
19
|
+
}
|
|
20
|
+
/** Delete the buffered keys and best-effort clean their S3 objects, then clear it. */
|
|
21
|
+
async function flushBuffer(context, buffer) {
|
|
22
|
+
if (buffer.keys.length === 0)
|
|
23
|
+
return;
|
|
24
|
+
await (0, batch_write_1.batchWriteAll)(context.client, context.tableName, buffer.keys.map((Key) => ({ DeleteRequest: { Key } })));
|
|
25
|
+
if (context.offloader) {
|
|
26
|
+
await (0, orphans_1.cleanUpS3Orphans)(context.offloader, (0, descriptor_keys_1.collectS3Keys)(buffer.descriptors), 'deleteThread', context.logger);
|
|
123
27
|
}
|
|
124
|
-
|
|
125
|
-
|
|
28
|
+
buffer.keys = [];
|
|
29
|
+
buffer.descriptors = [];
|
|
30
|
+
}
|
|
126
31
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @param checkpoint - Checkpoint metadata item
|
|
133
|
-
* @returns All write items for this checkpoint
|
|
32
|
+
* Delete every checkpoint, payload, and write for a thread (all share the
|
|
33
|
+
* thread's partition), best-effort deleting any offloaded S3 objects. Streams
|
|
34
|
+
* the partition with unbounded pagination and flushes deletes in batches, so a
|
|
35
|
+
* thread of any size is deleted to completion with bounded memory — never
|
|
36
|
+
* silently truncated at the in-memory page caps.
|
|
134
37
|
*/
|
|
135
|
-
async function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
if (result.Items) {
|
|
154
|
-
allItems.push(...result.Items);
|
|
155
|
-
}
|
|
156
|
-
lastKey = result.LastEvaluatedKey;
|
|
157
|
-
} while (lastKey);
|
|
158
|
-
return allItems;
|
|
38
|
+
async function deleteThread(context, threadId) {
|
|
39
|
+
(0, primitives_1.validateNonEmptyString)(threadId, 'threadId');
|
|
40
|
+
const params = (0, query_1.partitionQuery)(context.tableName, (0, keys_1.partitionKey)(threadId));
|
|
41
|
+
const buffer = { keys: [], descriptors: [] };
|
|
42
|
+
const pages = (0, paginate_1.paginateQuery)({
|
|
43
|
+
client: context.client,
|
|
44
|
+
params,
|
|
45
|
+
maxItems: Number.POSITIVE_INFINITY,
|
|
46
|
+
maxIterations: Number.POSITIVE_INFINITY,
|
|
47
|
+
});
|
|
48
|
+
for await (const raw of pages) {
|
|
49
|
+
bufferItem(buffer, raw);
|
|
50
|
+
if (buffer.keys.length >= constants_1.BATCH_WRITE_MAX)
|
|
51
|
+
await flushBuffer(context, buffer);
|
|
52
|
+
}
|
|
53
|
+
await flushBuffer(context, buffer);
|
|
159
54
|
}
|
|
160
55
|
//# sourceMappingURL=delete-thread.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-thread.js","sourceRoot":"","sources":["../../../src/checkpointer/actions/delete-thread.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-thread.js","sourceRoot":"","sources":["../../../src/checkpointer/actions/delete-thread.ts"],"names":[],"mappings":";;AA4DA,oCAeC;AA1ED,wEAAmE;AACnE,2DAAiE;AACjE,sDAAyD;AACzD,mEAAkE;AAClE,6DAA+D;AAC/D,mEAA4E;AAC5E,2CAAgD;AAChD,6CAAmD;AAiBnD,uFAAuF;AACvF,SAAS,UAAU,CAAC,MAAoB,EAAE,IAAmB;IAC3D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,MAAM,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACtE,IAAI,UAAU;YAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,KAAK,UAAU,WAAW,CAAC,OAA4B,EAAE,MAAoB;IAC3E,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACrC,MAAM,IAAA,2BAAa,EACjB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,SAAS,EACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CACvD,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,MAAM,IAAA,0BAAgB,EACpB,OAAO,CAAC,SAAS,EACjB,IAAA,+BAAa,EAAC,MAAM,CAAC,WAAW,CAAC,EACjC,cAAc,EACd,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAAC,OAA4B,EAAE,QAAgB;IAC/E,IAAA,mCAAsB,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAA,sBAAc,EAAC,OAAO,CAAC,SAAS,EAAE,IAAA,mBAAY,EAAC,QAAQ,CAAC,CAAC,CAAC;IACzE,MAAM,MAAM,GAAiB,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,IAAA,wBAAa,EAAC;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM;QACN,QAAQ,EAAE,MAAM,CAAC,iBAAiB;QAClC,aAAa,EAAE,MAAM,CAAC,iBAAiB;KACxC,CAAC,CAAC;IACH,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QAC9B,UAAU,CAAC,MAAM,EAAE,GAAoB,CAAC,CAAC;QACzC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,2BAAe;YAAE,MAAM,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IACD,MAAM,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
1
2
|
import type { CheckpointTuple } from '@langchain/langgraph-checkpoint';
|
|
2
|
-
import {
|
|
3
|
+
import type { CheckpointerContext } from '../internal/setup';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 1. Metadata item (SK = checkpoint_id) — contains metadata, S3 refs, type
|
|
8
|
-
* 2. Payload item (SK = PAYLOAD#checkpoint_id) — contains the heavy checkpoint blob
|
|
9
|
-
*
|
|
10
|
-
* For backward compatibility, also handles legacy single-item format where the
|
|
11
|
-
* checkpoint blob is stored inline on the metadata item.
|
|
12
|
-
*
|
|
13
|
-
* @param params - Parameters for the get tuple operation
|
|
14
|
-
* @returns CheckpointTuple if found, undefined otherwise
|
|
15
|
-
* @throws Error if operation fails
|
|
5
|
+
* Load a checkpoint tuple: the target checkpoint (by id, or the newest in the
|
|
6
|
+
* namespace), its metadata, its pending writes, and a parent config when the
|
|
7
|
+
* checkpoint has a parent. Returns undefined when no matching checkpoint exists.
|
|
16
8
|
*/
|
|
17
|
-
export declare
|
|
9
|
+
export declare function getCheckpointTuple(context: CheckpointerContext, config: RunnableConfig): Promise<CheckpointTuple | undefined>;
|
|
18
10
|
//# sourceMappingURL=get-tuple.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-tuple.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/get-tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"get-tuple.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/get-tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAKtC"}
|
|
@@ -1,172 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const validate_configurable_1 = require("./validate-configurable");
|
|
8
|
-
const writer_1 = require("./writer");
|
|
3
|
+
exports.getCheckpointTuple = getCheckpointTuple;
|
|
4
|
+
const assemble_1 = require("../internal/assemble");
|
|
5
|
+
const configurable_1 = require("../internal/configurable");
|
|
6
|
+
const fetch_1 = require("../internal/fetch");
|
|
9
7
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* 1. Metadata item (SK = checkpoint_id) — contains metadata, S3 refs, type
|
|
14
|
-
* 2. Payload item (SK = PAYLOAD#checkpoint_id) — contains the heavy checkpoint blob
|
|
15
|
-
*
|
|
16
|
-
* For backward compatibility, also handles legacy single-item format where the
|
|
17
|
-
* checkpoint blob is stored inline on the metadata item.
|
|
18
|
-
*
|
|
19
|
-
* @param params - Parameters for the get tuple operation
|
|
20
|
-
* @returns CheckpointTuple if found, undefined otherwise
|
|
21
|
-
* @throws Error if operation fails
|
|
8
|
+
* Load a checkpoint tuple: the target checkpoint (by id, or the newest in the
|
|
9
|
+
* namespace), its metadata, its pending writes, and a parent config when the
|
|
10
|
+
* checkpoint has a parent. Returns undefined when no matching checkpoint exists.
|
|
22
11
|
*/
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return await params.client.get({
|
|
28
|
-
TableName: params.checkpointsTableName,
|
|
29
|
-
Key: {
|
|
30
|
-
thread_id: configurable.thread_id,
|
|
31
|
-
checkpoint_id: configurable.checkpoint_id,
|
|
32
|
-
},
|
|
33
|
-
ConsistentRead: true,
|
|
34
|
-
});
|
|
35
|
-
}, { signal: params.signal });
|
|
36
|
-
return item.Item;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
// Select metadata items only. We cannot bound by `checkpoint_id` in the
|
|
40
|
-
// KeyCondition — any attempt to exclude payload items via `checkpoint_id
|
|
41
|
-
// < 'PAYLOAD#'` silently drops metadata whose IDs sort lexicographically
|
|
42
|
-
// above `PAYLOAD#` (e.g. anything starting with a lowercase letter,
|
|
43
|
-
// which includes common IDs like `ckpt-1`, `checkpoint-2`, etc.), and
|
|
44
|
-
// DynamoDB forbids primary-key attributes inside FilterExpression.
|
|
45
|
-
// Instead, filter on the non-key `type` attribute that only metadata
|
|
46
|
-
// items carry (`attribute_exists(#type)`). Payload items are never
|
|
47
|
-
// returned, regardless of user ID character set.
|
|
48
|
-
//
|
|
49
|
-
// Because Limit applies *before* FilterExpression in DynamoDB, when
|
|
50
|
-
// mixing metadata and payload pages we fetch a larger page and paginate
|
|
51
|
-
// until a metadata item is found. For high-volume threads the ordering
|
|
52
|
-
// still surfaces the newest metadata within the first 1-2 pages.
|
|
53
|
-
const hasNsFilter = !!configurable.checkpoint_ns;
|
|
54
|
-
const filterParts = ['attribute_exists(#type)'];
|
|
55
|
-
if (hasNsFilter)
|
|
56
|
-
filterParts.push('checkpoint_ns = :checkpoint_ns');
|
|
57
|
-
const expressionValues = {
|
|
58
|
-
':thread_id': configurable.thread_id,
|
|
59
|
-
...(hasNsFilter && { ':checkpoint_ns': configurable.checkpoint_ns }),
|
|
60
|
-
};
|
|
61
|
-
let lastKey;
|
|
62
|
-
do {
|
|
63
|
-
const result = await (0, shared_1.withDynamoDBRetry)(async () => {
|
|
64
|
-
return await params.client.query({
|
|
65
|
-
TableName: params.checkpointsTableName,
|
|
66
|
-
KeyConditionExpression: 'thread_id = :thread_id',
|
|
67
|
-
ExpressionAttributeValues: expressionValues,
|
|
68
|
-
ExpressionAttributeNames: { '#type': 'type' },
|
|
69
|
-
FilterExpression: filterParts.join(' AND '),
|
|
70
|
-
ConsistentRead: true,
|
|
71
|
-
ScanIndexForward: false, // Descending — newest first
|
|
72
|
-
ExclusiveStartKey: lastKey,
|
|
73
|
-
});
|
|
74
|
-
}, { signal: params.signal });
|
|
75
|
-
const items = result.Items;
|
|
76
|
-
if (items && items.length > 0) {
|
|
77
|
-
return items[0];
|
|
78
|
-
}
|
|
79
|
-
lastKey = result.LastEvaluatedKey;
|
|
80
|
-
} while (lastKey);
|
|
81
|
-
return undefined;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const item = await getItem((0, validate_configurable_1.validateConfigurable)(params.config.configurable));
|
|
85
|
-
if (!item) {
|
|
12
|
+
async function getCheckpointTuple(context, config) {
|
|
13
|
+
const { threadId, checkpointNs, checkpointId } = (0, configurable_1.readConfigurable)(config);
|
|
14
|
+
const meta = await (0, fetch_1.fetchTargetMeta)(context, threadId, checkpointNs, checkpointId);
|
|
15
|
+
if (!meta)
|
|
86
16
|
return undefined;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// Optimization: if checkpoint data is stored in S3, skip the payload fetch —
|
|
90
|
-
// deserializeCheckpointTuple will download the real data from S3.
|
|
91
|
-
let checkpointData;
|
|
92
|
-
if (item.s3_checkpoint_key) {
|
|
93
|
-
// S3 offloaded — real data will be fetched by deserializeCheckpointTuple
|
|
94
|
-
checkpointData = new Uint8Array(0);
|
|
95
|
-
}
|
|
96
|
-
else if (item.checkpoint && item.checkpoint.length > 0) {
|
|
97
|
-
// Legacy single-item format — checkpoint blob is inline
|
|
98
|
-
checkpointData = item.checkpoint;
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
// New split format — fetch payload item separately.
|
|
102
|
-
// ConsistentRead must match the metadata read above: without it, a freshly-written
|
|
103
|
-
// payload can be missing from an eventually-consistent read even though the metadata
|
|
104
|
-
// item said it exists, producing spurious "payload not found" errors under write load.
|
|
105
|
-
const payloadResult = await (0, shared_1.withDynamoDBRetry)(async () => {
|
|
106
|
-
return await params.client.get({
|
|
107
|
-
TableName: params.checkpointsTableName,
|
|
108
|
-
Key: {
|
|
109
|
-
thread_id: item.thread_id,
|
|
110
|
-
checkpoint_id: `${types_1.PAYLOAD_SK_PREFIX}${item.checkpoint_id}`,
|
|
111
|
-
},
|
|
112
|
-
ConsistentRead: true,
|
|
113
|
-
});
|
|
114
|
-
}, { signal: params.signal });
|
|
115
|
-
const payloadItem = payloadResult.Item;
|
|
116
|
-
if (!payloadItem) {
|
|
117
|
-
throw new Error(`Checkpoint payload item not found for thread_id=${item.thread_id}, checkpoint_id=${item.checkpoint_id}`);
|
|
118
|
-
}
|
|
119
|
-
checkpointData = payloadItem.checkpoint;
|
|
120
|
-
}
|
|
121
|
-
// Get pending writes for this checkpoint (with pagination for large result sets)
|
|
122
|
-
const allWriteItems = [];
|
|
123
|
-
let writesLastEvaluatedKey;
|
|
124
|
-
do {
|
|
125
|
-
// ConsistentRead is required here: putWrites races with getTuple under concurrent
|
|
126
|
-
// workers, and an eventually-consistent Query can return a stale view that omits
|
|
127
|
-
// writes that have already been acked.
|
|
128
|
-
const writesResult = await (0, shared_1.withDynamoDBRetry)(async () => {
|
|
129
|
-
return await params.client.query({
|
|
130
|
-
TableName: params.writesTableName,
|
|
131
|
-
KeyConditionExpression: 'thread_id_checkpoint_id_checkpoint_ns = :thread_id_checkpoint_id_checkpoint_ns',
|
|
132
|
-
ExpressionAttributeValues: {
|
|
133
|
-
':thread_id_checkpoint_id_checkpoint_ns': writer_1.Writer.getPartitionKey(item),
|
|
134
|
-
},
|
|
135
|
-
ConsistentRead: true,
|
|
136
|
-
ExclusiveStartKey: writesLastEvaluatedKey,
|
|
137
|
-
});
|
|
138
|
-
}, { signal: params.signal });
|
|
139
|
-
if (writesResult.Items) {
|
|
140
|
-
allWriteItems.push(...writesResult.Items);
|
|
141
|
-
}
|
|
142
|
-
writesLastEvaluatedKey = writesResult.LastEvaluatedKey;
|
|
143
|
-
} while (writesLastEvaluatedKey);
|
|
144
|
-
// Deserialize pending writes in parallel. Each write may involve an S3 download
|
|
145
|
-
// plus decompress + serde — sequential awaits in a hot path were measurable on
|
|
146
|
-
// checkpoints with many offloaded writes.
|
|
147
|
-
const pendingWrites = await Promise.all(allWriteItems.map(async (writeItem) => {
|
|
148
|
-
const write = writer_1.Writer.fromDynamoDBItem(writeItem);
|
|
149
|
-
let rawValue = write.value;
|
|
150
|
-
if (writeItem.s3_value_key) {
|
|
151
|
-
if (!params.s3Offloader) {
|
|
152
|
-
throw new Error(`Pending write references S3 key '${writeItem.s3_value_key}' but no S3 offloader is configured. ` +
|
|
153
|
-
`Pass s3OffloadConfig when constructing DynamoDBSaver to read offloaded writes.`);
|
|
154
|
-
}
|
|
155
|
-
rawValue = await params.s3Offloader.download(writeItem.s3_value_key);
|
|
156
|
-
}
|
|
157
|
-
const writeValue = params.compressor
|
|
158
|
-
? await params.compressor.decompress(rawValue)
|
|
159
|
-
: rawValue;
|
|
160
|
-
const value = await params.serde.loadsTyped(write.type, writeValue);
|
|
161
|
-
return [write.task_id, write.channel, value];
|
|
162
|
-
}));
|
|
163
|
-
// Deserialize the checkpoint tuple from metadata item + payload data
|
|
164
|
-
const checkpointTuple = await (0, utils_1.deserializeCheckpointTuple)(item, checkpointData, params.serde, params.compressor, params.s3Offloader);
|
|
165
|
-
// Add pending writes to the tuple
|
|
166
|
-
return {
|
|
167
|
-
...checkpointTuple,
|
|
168
|
-
pendingWrites,
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
exports.getTupleAction = getTupleAction;
|
|
17
|
+
return (0, assemble_1.assembleTuple)(context, threadId, checkpointNs, meta);
|
|
18
|
+
}
|
|
172
19
|
//# sourceMappingURL=get-tuple.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-tuple.js","sourceRoot":"","sources":["../../../src/checkpointer/actions/get-tuple.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-tuple.js","sourceRoot":"","sources":["../../../src/checkpointer/actions/get-tuple.ts"],"names":[],"mappings":";;AAaA,gDAQC;AAlBD,mDAAqD;AACrD,2DAA4D;AAC5D,6CAAoD;AAGpD;;;;GAIG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAA4B,EAC5B,MAAsB;IAEtB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,IAAA,+BAAgB,EAAC,MAAM,CAAC,CAAC;IAC1E,MAAM,IAAI,GAAG,MAAM,IAAA,uBAAe,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IAClF,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,IAAA,wBAAa,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
2
|
+
import type { CheckpointListOptions, CheckpointTuple } from '@langchain/langgraph-checkpoint';
|
|
3
|
+
import type { CheckpointerContext } from '../internal/setup';
|
|
4
|
+
/**
|
|
5
|
+
* Yield checkpoint tuples for a thread/namespace, newest first. Honors
|
|
6
|
+
* `options.before` (only checkpoints older than the given id), `options.filter`
|
|
7
|
+
* (metadata equality), and `options.limit` (max tuples yielded).
|
|
8
|
+
*/
|
|
9
|
+
export declare function listCheckpoints(context: CheckpointerContext, config: RunnableConfig, options?: CheckpointListOptions): AsyncGenerator<CheckpointTuple>;
|
|
10
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAS9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA2B7D;;;;GAIG;AACH,wBAAuB,eAAe,CACpC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,cAAc,CAAC,eAAe,CAAC,CAoBjC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listCheckpoints = listCheckpoints;
|
|
4
|
+
const paginate_1 = require("../../shared/dynamodb/paginate");
|
|
5
|
+
const assemble_1 = require("../internal/assemble");
|
|
6
|
+
const configurable_1 = require("../internal/configurable");
|
|
7
|
+
const filter_match_1 = require("../internal/filter-match");
|
|
8
|
+
const item_reader_1 = require("../internal/item-reader");
|
|
9
|
+
const keys_1 = require("../internal/keys");
|
|
10
|
+
const query_1 = require("../internal/query");
|
|
11
|
+
/** Read list options into a flat, typed shape. */
|
|
12
|
+
function readListOptions(options) {
|
|
13
|
+
return {
|
|
14
|
+
before: options?.before?.configurable?.checkpoint_id,
|
|
15
|
+
filter: options?.filter,
|
|
16
|
+
limit: options?.limit,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** True when `meta` passes the (optional) metadata-equality filter. */
|
|
20
|
+
async function passesMetadataFilter(context, meta, filter) {
|
|
21
|
+
if (!filter)
|
|
22
|
+
return true;
|
|
23
|
+
const metadata = (await (0, item_reader_1.readMetadata)(context, meta));
|
|
24
|
+
return (0, filter_match_1.matchesFilter)(metadata, filter);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Yield checkpoint tuples for a thread/namespace, newest first. Honors
|
|
28
|
+
* `options.before` (only checkpoints older than the given id), `options.filter`
|
|
29
|
+
* (metadata equality), and `options.limit` (max tuples yielded).
|
|
30
|
+
*/
|
|
31
|
+
async function* listCheckpoints(context, config, options) {
|
|
32
|
+
const { threadId, checkpointNs } = (0, configurable_1.readConfigurable)(config);
|
|
33
|
+
const { before, filter, limit } = readListOptions(options);
|
|
34
|
+
const params = (0, query_1.beginsWithQuery)(context.tableName, (0, keys_1.partitionKey)(threadId), (0, keys_1.metaSortKeyPrefix)(checkpointNs));
|
|
35
|
+
let yielded = 0;
|
|
36
|
+
for await (const raw of (0, paginate_1.paginateQuery)({ client: context.client, params })) {
|
|
37
|
+
if (limit !== undefined && yielded >= limit)
|
|
38
|
+
return;
|
|
39
|
+
const meta = raw;
|
|
40
|
+
if (before !== undefined && meta.checkpointId >= before)
|
|
41
|
+
continue;
|
|
42
|
+
if (!(await passesMetadataFilter(context, meta, filter)))
|
|
43
|
+
continue;
|
|
44
|
+
const tuple = await (0, assemble_1.assembleTuple)(context, threadId, checkpointNs, meta);
|
|
45
|
+
if (tuple) {
|
|
46
|
+
yield tuple;
|
|
47
|
+
yielded += 1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/checkpointer/actions/list.ts"],"names":[],"mappings":";;AA0CA,0CAwBC;AA/DD,6DAA+D;AAC/D,mDAAqD;AACrD,2DAA4D;AAC5D,2DAA2E;AAC3E,yDAAuD;AACvD,2CAAmE;AACnE,6CAAoD;AAIpD,kDAAkD;AAClD,SAAS,eAAe,CAAC,OAA+B;IAKtD,OAAO;QACL,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAmC;QAC1E,MAAM,EAAE,OAAO,EAAE,MAAiD;QAClE,KAAK,EAAE,OAAO,EAAE,KAAK;KACtB,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,KAAK,UAAU,oBAAoB,CACjC,OAA4B,EAC5B,IAAwB,EACxB,MAA+C;IAE/C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,0BAAY,EAAC,OAAO,EAAE,IAAI,CAAC,CAAgC,CAAC;IACpF,OAAO,IAAA,4BAAa,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAED;;;;GAIG;AACI,KAAK,SAAS,CAAC,CAAC,eAAe,CACpC,OAA4B,EAC5B,MAAsB,EACtB,OAA+B;IAE/B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,+BAAgB,EAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAA,uBAAe,EAC5B,OAAO,CAAC,SAAS,EACjB,IAAA,mBAAY,EAAC,QAAQ,CAAC,EACtB,IAAA,wBAAiB,EAAC,YAAY,CAAC,CAChC,CAAC;IACF,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAA,wBAAa,EAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC1E,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK;YAAE,OAAO;QACpD,MAAM,IAAI,GAAG,GAAyB,CAAC;QACvC,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,IAAI,MAAM;YAAE,SAAS;QAClE,IAAI,CAAC,CAAC,MAAM,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAAE,SAAS;QACnE,MAAM,KAAK,GAAG,MAAM,IAAA,wBAAa,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;QACzE,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,KAAK,CAAC;YACZ,OAAO,IAAI,CAAC,CAAC;QACf,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RunnableConfig } from '@langchain/core/runnables';
|
|
2
|
+
import type { PendingWrite } from '@langchain/langgraph-checkpoint';
|
|
3
|
+
import type { CheckpointerContext } from '../internal/setup';
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param params - Parameters for the put writes operation
|
|
6
|
-
* @throws Error if validation fails or operation fails
|
|
5
|
+
* Persist a task's intermediate writes for a checkpoint as one item per write.
|
|
6
|
+
* Requires `checkpoint_id` in the config — writes always attach to a checkpoint.
|
|
7
7
|
*/
|
|
8
|
-
export declare
|
|
8
|
+
export declare function putWrites(context: CheckpointerContext, config: RunnableConfig, writes: PendingWrite[], taskId: string): Promise<void>;
|
|
9
9
|
//# sourceMappingURL=put-writes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put-writes.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/put-writes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"put-writes.d.ts","sourceRoot":"","sources":["../../../src/checkpointer/actions/put-writes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AASpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|