feat: add secret manager, tool registry, idempotency middleware, and …#456
Open
dev-chinasa wants to merge 1 commit into
Open
feat: add secret manager, tool registry, idempotency middleware, and …#456dev-chinasa wants to merge 1 commit into
dev-chinasa wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #437
closes #438
closes #440
closes #441
PR Description
Summary
What I changed
Secrets (encrypted-at-rest store + migration script): Added a simple encrypted store using AES-256-GCM and a migration helper.
data/secrets.json;SECRET_MASTER_KEYenv var is used for encryption. Migration readsdata/plain_secrets.jsonand writes encrypted entries.Tool registry (governed capability registry): Added a metadata-backed registry with versioning, deprecation flags, and startup validation.
data/tool_registry.json. Startup validation logs warnings for duplicates/deprecations.Idempotency framework (durable replay-safe semantics): Added file-backed idempotency store and Express middleware to provide replay-safety for mutating requests.
Idempotency-Keyheader for POST/PUT/PATCH; replays stored responses or persists responses for later replay. Store persisted todata/idempotency.json.Observability (propagation helpers): Added helper for injecting correlation/tracing headers into outgoing calls and leveraged existing context utilities.
injectTracingHeaders()returns the correlation headers to forward to downstream tools/HTTP/LLM/blockchain calls.Wiring / Startup: