opencode-rehydar 0.14.2 → 0.14.3
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/dist/browser.d.ts +54 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +74 -0
- package/dist/browser.js.map +1 -0
- package/dist/core/anonymizer.d.ts +309 -0
- package/dist/core/anonymizer.d.ts.map +1 -0
- package/dist/core/anonymizer.js +555 -0
- package/dist/core/anonymizer.js.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/crypto/index.d.ts +6 -0
- package/dist/crypto/index.d.ts.map +1 -0
- package/dist/crypto/index.js +6 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/crypto/pii-map-crypto.d.ts +114 -0
- package/dist/crypto/pii-map-crypto.d.ts.map +1 -0
- package/dist/crypto/pii-map-crypto.js +228 -0
- package/dist/crypto/pii-map-crypto.js.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/ner/bio-decoder.d.ts +64 -0
- package/dist/ner/bio-decoder.d.ts.map +1 -0
- package/dist/ner/bio-decoder.js +218 -0
- package/dist/ner/bio-decoder.js.map +1 -0
- package/dist/ner/index.d.ts +12 -0
- package/dist/ner/index.d.ts.map +1 -0
- package/dist/ner/index.js +12 -0
- package/dist/ner/index.js.map +1 -0
- package/dist/ner/inference-server-client.d.ts +81 -0
- package/dist/ner/inference-server-client.d.ts.map +1 -0
- package/dist/ner/inference-server-client.js +120 -0
- package/dist/ner/inference-server-client.js.map +1 -0
- package/dist/ner/inference-server-ner-model.d.ts +43 -0
- package/dist/ner/inference-server-ner-model.d.ts.map +1 -0
- package/dist/ner/inference-server-ner-model.js +119 -0
- package/dist/ner/inference-server-ner-model.js.map +1 -0
- package/dist/ner/model-manager.d.ts +111 -0
- package/dist/ner/model-manager.d.ts.map +1 -0
- package/dist/ner/model-manager.js +334 -0
- package/dist/ner/model-manager.js.map +1 -0
- package/dist/ner/ner-model.d.ts +172 -0
- package/dist/ner/ner-model.d.ts.map +1 -0
- package/dist/ner/ner-model.js +514 -0
- package/dist/ner/ner-model.js.map +1 -0
- package/dist/ner/onnx-runtime.browser.d.ts +46 -0
- package/dist/ner/onnx-runtime.browser.d.ts.map +1 -0
- package/dist/ner/onnx-runtime.browser.js +90 -0
- package/dist/ner/onnx-runtime.browser.js.map +1 -0
- package/dist/ner/onnx-runtime.d.ts +72 -0
- package/dist/ner/onnx-runtime.d.ts.map +1 -0
- package/dist/ner/onnx-runtime.js +132 -0
- package/dist/ner/onnx-runtime.js.map +1 -0
- package/dist/ner/token-window.d.ts +19 -0
- package/dist/ner/token-window.d.ts.map +1 -0
- package/dist/ner/token-window.js +101 -0
- package/dist/ner/token-window.js.map +1 -0
- package/dist/ner/tokenizer.d.ts +142 -0
- package/dist/ner/tokenizer.d.ts.map +1 -0
- package/dist/ner/tokenizer.js +362 -0
- package/dist/ner/tokenizer.js.map +1 -0
- package/dist/opencode-plugin/git-identity.d.ts +3 -0
- package/dist/opencode-plugin/git-identity.d.ts.map +1 -0
- package/dist/opencode-plugin/git-identity.js +37 -0
- package/dist/opencode-plugin/git-identity.js.map +1 -0
- package/dist/opencode-plugin/github-username.d.ts +3 -0
- package/dist/opencode-plugin/github-username.d.ts.map +1 -0
- package/dist/opencode-plugin/github-username.js +41 -0
- package/dist/opencode-plugin/github-username.js.map +1 -0
- package/dist/opencode-plugin/identity-recognizer.d.ts +5 -0
- package/dist/opencode-plugin/identity-recognizer.d.ts.map +1 -0
- package/dist/opencode-plugin/identity-recognizer.js +21 -0
- package/dist/opencode-plugin/identity-recognizer.js.map +1 -0
- package/dist/opencode-plugin/index.d.ts +7 -0
- package/dist/opencode-plugin/index.d.ts.map +1 -0
- package/dist/opencode-plugin/index.js +6 -0
- package/dist/opencode-plugin/index.js.map +1 -0
- package/dist/opencode-plugin/plugin.d.ts +39 -0
- package/dist/opencode-plugin/plugin.d.ts.map +1 -0
- package/dist/opencode-plugin/plugin.js +294 -0
- package/dist/opencode-plugin/plugin.js.map +1 -0
- package/dist/opencode-plugin/types.d.ts +33 -0
- package/dist/opencode-plugin/types.d.ts.map +1 -0
- package/dist/opencode-plugin/types.js +5 -0
- package/dist/opencode-plugin/types.js.map +1 -0
- package/dist/opencode-plugin/v2/anon-state.d.ts +12 -0
- package/dist/opencode-plugin/v2/anon-state.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/anon-state.js +14 -0
- package/dist/opencode-plugin/v2/anon-state.js.map +1 -0
- package/dist/opencode-plugin/v2/deep-rehydrate.d.ts +13 -0
- package/dist/opencode-plugin/v2/deep-rehydrate.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/deep-rehydrate.js +33 -0
- package/dist/opencode-plugin/v2/deep-rehydrate.js.map +1 -0
- package/dist/opencode-plugin/v2/index.d.ts +17 -0
- package/dist/opencode-plugin/v2/index.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/index.js +17 -0
- package/dist/opencode-plugin/v2/index.js.map +1 -0
- package/dist/opencode-plugin/v2/logger.d.ts +24 -0
- package/dist/opencode-plugin/v2/logger.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/logger.js +73 -0
- package/dist/opencode-plugin/v2/logger.js.map +1 -0
- package/dist/opencode-plugin/v2/options.d.ts +63 -0
- package/dist/opencode-plugin/v2/options.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/options.js +183 -0
- package/dist/opencode-plugin/v2/options.js.map +1 -0
- package/dist/opencode-plugin/v2/register-hooks.d.ts +43 -0
- package/dist/opencode-plugin/v2/register-hooks.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/register-hooks.js +160 -0
- package/dist/opencode-plugin/v2/register-hooks.js.map +1 -0
- package/dist/opencode-plugin/v2/rehydrate-tail.d.ts +101 -0
- package/dist/opencode-plugin/v2/rehydrate-tail.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/rehydrate-tail.js +147 -0
- package/dist/opencode-plugin/v2/rehydrate-tail.js.map +1 -0
- package/dist/opencode-plugin/v2/response-rehydrate.d.ts +78 -0
- package/dist/opencode-plugin/v2/response-rehydrate.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/response-rehydrate.js +210 -0
- package/dist/opencode-plugin/v2/response-rehydrate.js.map +1 -0
- package/dist/opencode-plugin/v2/scrub-messages.d.ts +39 -0
- package/dist/opencode-plugin/v2/scrub-messages.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/scrub-messages.js +260 -0
- package/dist/opencode-plugin/v2/scrub-messages.js.map +1 -0
- package/dist/opencode-plugin/v2/sessions.d.ts +17 -0
- package/dist/opencode-plugin/v2/sessions.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/sessions.js +23 -0
- package/dist/opencode-plugin/v2/sessions.js.map +1 -0
- package/dist/opencode-plugin/v2/sse.d.ts +101 -0
- package/dist/opencode-plugin/v2/sse.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/sse.js +235 -0
- package/dist/opencode-plugin/v2/sse.js.map +1 -0
- package/dist/opencode-plugin/v2/types.d.ts +188 -0
- package/dist/opencode-plugin/v2/types.d.ts.map +1 -0
- package/dist/opencode-plugin/v2/types.js +10 -0
- package/dist/opencode-plugin/v2/types.js.map +1 -0
- package/dist/opencode-plugin/vcs-command.d.ts +3 -0
- package/dist/opencode-plugin/vcs-command.d.ts.map +1 -0
- package/dist/opencode-plugin/vcs-command.js +34 -0
- package/dist/opencode-plugin/vcs-command.js.map +1 -0
- package/dist/pipeline/index.d.ts +12 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +12 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/prenormalize.d.ts +48 -0
- package/dist/pipeline/prenormalize.d.ts.map +1 -0
- package/dist/pipeline/prenormalize.js +94 -0
- package/dist/pipeline/prenormalize.js.map +1 -0
- package/dist/pipeline/resolver.d.ts +56 -0
- package/dist/pipeline/resolver.d.ts.map +1 -0
- package/dist/pipeline/resolver.js +239 -0
- package/dist/pipeline/resolver.js.map +1 -0
- package/dist/pipeline/semantic-data-loader.d.ts +171 -0
- package/dist/pipeline/semantic-data-loader.d.ts.map +1 -0
- package/dist/pipeline/semantic-data-loader.js +677 -0
- package/dist/pipeline/semantic-data-loader.js.map +1 -0
- package/dist/pipeline/semantic-enricher.d.ts +112 -0
- package/dist/pipeline/semantic-enricher.d.ts.map +1 -0
- package/dist/pipeline/semantic-enricher.js +322 -0
- package/dist/pipeline/semantic-enricher.js.map +1 -0
- package/dist/pipeline/tagger.d.ts +121 -0
- package/dist/pipeline/tagger.d.ts.map +1 -0
- package/dist/pipeline/tagger.js +545 -0
- package/dist/pipeline/tagger.js.map +1 -0
- package/dist/pipeline/title-extractor.d.ts +79 -0
- package/dist/pipeline/title-extractor.d.ts.map +1 -0
- package/dist/pipeline/title-extractor.js +801 -0
- package/dist/pipeline/title-extractor.js.map +1 -0
- package/dist/pipeline/validator.d.ts +65 -0
- package/dist/pipeline/validator.d.ts.map +1 -0
- package/dist/pipeline/validator.js +292 -0
- package/dist/pipeline/validator.js.map +1 -0
- package/dist/proxy/index.d.ts +13 -0
- package/dist/proxy/index.d.ts.map +1 -0
- package/dist/proxy/index.js +12 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/proxy/providers/anthropic.d.ts +28 -0
- package/dist/proxy/providers/anthropic.d.ts.map +1 -0
- package/dist/proxy/providers/anthropic.js +265 -0
- package/dist/proxy/providers/anthropic.js.map +1 -0
- package/dist/proxy/providers/index.d.ts +19 -0
- package/dist/proxy/providers/index.d.ts.map +1 -0
- package/dist/proxy/providers/index.js +41 -0
- package/dist/proxy/providers/index.js.map +1 -0
- package/dist/proxy/providers/openai.d.ts +27 -0
- package/dist/proxy/providers/openai.d.ts.map +1 -0
- package/dist/proxy/providers/openai.js +203 -0
- package/dist/proxy/providers/openai.js.map +1 -0
- package/dist/proxy/providers/streaming-tool-loop.d.ts +12 -0
- package/dist/proxy/providers/streaming-tool-loop.d.ts.map +1 -0
- package/dist/proxy/providers/streaming-tool-loop.js +223 -0
- package/dist/proxy/providers/streaming-tool-loop.js.map +1 -0
- package/dist/proxy/providers/types.d.ts +109 -0
- package/dist/proxy/providers/types.d.ts.map +1 -0
- package/dist/proxy/providers/types.js +2 -0
- package/dist/proxy/providers/types.js.map +1 -0
- package/dist/proxy/proxy-server.d.ts +61 -0
- package/dist/proxy/proxy-server.d.ts.map +1 -0
- package/dist/proxy/proxy-server.js +146 -0
- package/dist/proxy/proxy-server.js.map +1 -0
- package/dist/proxy/rehydra-fetch.d.ts +35 -0
- package/dist/proxy/rehydra-fetch.d.ts.map +1 -0
- package/dist/proxy/rehydra-fetch.js +631 -0
- package/dist/proxy/rehydra-fetch.js.map +1 -0
- package/dist/proxy/rehydra-proxy.d.ts +40 -0
- package/dist/proxy/rehydra-proxy.d.ts.map +1 -0
- package/dist/proxy/rehydra-proxy.js +150 -0
- package/dist/proxy/rehydra-proxy.js.map +1 -0
- package/dist/proxy/sse-parser.d.ts +59 -0
- package/dist/proxy/sse-parser.d.ts.map +1 -0
- package/dist/proxy/sse-parser.js +112 -0
- package/dist/proxy/sse-parser.js.map +1 -0
- package/dist/proxy/system-instruction.d.ts +19 -0
- package/dist/proxy/system-instruction.d.ts.map +1 -0
- package/dist/proxy/system-instruction.js +33 -0
- package/dist/proxy/system-instruction.js.map +1 -0
- package/dist/proxy/tool-loop-stream.d.ts +7 -0
- package/dist/proxy/tool-loop-stream.d.ts.map +1 -0
- package/dist/proxy/tool-loop-stream.js +65 -0
- package/dist/proxy/tool-loop-stream.js.map +1 -0
- package/dist/proxy/types.d.ts +138 -0
- package/dist/proxy/types.d.ts.map +1 -0
- package/dist/proxy/types.js +5 -0
- package/dist/proxy/types.js.map +1 -0
- package/dist/proxy/wrap-client.d.ts +47 -0
- package/dist/proxy/wrap-client.d.ts.map +1 -0
- package/dist/proxy/wrap-client.js +70 -0
- package/dist/proxy/wrap-client.js.map +1 -0
- package/dist/recognizers/address.d.ts +2 -0
- package/dist/recognizers/address.d.ts.map +1 -0
- package/dist/recognizers/address.js +23 -0
- package/dist/recognizers/address.js.map +1 -0
- package/dist/recognizers/base.d.ts +78 -0
- package/dist/recognizers/base.d.ts.map +1 -0
- package/dist/recognizers/base.js +100 -0
- package/dist/recognizers/base.js.map +1 -0
- package/dist/recognizers/bic-swift.d.ts +10 -0
- package/dist/recognizers/bic-swift.d.ts.map +1 -0
- package/dist/recognizers/bic-swift.js +107 -0
- package/dist/recognizers/bic-swift.js.map +1 -0
- package/dist/recognizers/credit-card.d.ts +32 -0
- package/dist/recognizers/credit-card.d.ts.map +1 -0
- package/dist/recognizers/credit-card.js +160 -0
- package/dist/recognizers/credit-card.js.map +1 -0
- package/dist/recognizers/custom-id.d.ts +28 -0
- package/dist/recognizers/custom-id.d.ts.map +1 -0
- package/dist/recognizers/custom-id.js +116 -0
- package/dist/recognizers/custom-id.js.map +1 -0
- package/dist/recognizers/date.d.ts +10 -0
- package/dist/recognizers/date.d.ts.map +1 -0
- package/dist/recognizers/date.js +228 -0
- package/dist/recognizers/date.js.map +1 -0
- package/dist/recognizers/email.d.ts +10 -0
- package/dist/recognizers/email.d.ts.map +1 -0
- package/dist/recognizers/email.js +75 -0
- package/dist/recognizers/email.js.map +1 -0
- package/dist/recognizers/iban.d.ts +14 -0
- package/dist/recognizers/iban.d.ts.map +1 -0
- package/dist/recognizers/iban.js +67 -0
- package/dist/recognizers/iban.js.map +1 -0
- package/dist/recognizers/index.d.ts +25 -0
- package/dist/recognizers/index.d.ts.map +1 -0
- package/dist/recognizers/index.js +53 -0
- package/dist/recognizers/index.js.map +1 -0
- package/dist/recognizers/ip-address.d.ts +14 -0
- package/dist/recognizers/ip-address.d.ts.map +1 -0
- package/dist/recognizers/ip-address.js +183 -0
- package/dist/recognizers/ip-address.js.map +1 -0
- package/dist/recognizers/phone.d.ts +10 -0
- package/dist/recognizers/phone.d.ts.map +1 -0
- package/dist/recognizers/phone.js +145 -0
- package/dist/recognizers/phone.js.map +1 -0
- package/dist/recognizers/postal-code.d.ts +16 -0
- package/dist/recognizers/postal-code.d.ts.map +1 -0
- package/dist/recognizers/postal-code.js +42 -0
- package/dist/recognizers/postal-code.js.map +1 -0
- package/dist/recognizers/registry.d.ts +59 -0
- package/dist/recognizers/registry.d.ts.map +1 -0
- package/dist/recognizers/registry.js +113 -0
- package/dist/recognizers/registry.js.map +1 -0
- package/dist/recognizers/secrets/api-key.d.ts +6 -0
- package/dist/recognizers/secrets/api-key.d.ts.map +1 -0
- package/dist/recognizers/secrets/api-key.js +40 -0
- package/dist/recognizers/secrets/api-key.js.map +1 -0
- package/dist/recognizers/secrets/aws-credentials.d.ts +7 -0
- package/dist/recognizers/secrets/aws-credentials.d.ts.map +1 -0
- package/dist/recognizers/secrets/aws-credentials.js +68 -0
- package/dist/recognizers/secrets/aws-credentials.js.map +1 -0
- package/dist/recognizers/secrets/config-secret.d.ts +8 -0
- package/dist/recognizers/secrets/config-secret.d.ts.map +1 -0
- package/dist/recognizers/secrets/config-secret.js +59 -0
- package/dist/recognizers/secrets/config-secret.js.map +1 -0
- package/dist/recognizers/secrets/connection-string.d.ts +6 -0
- package/dist/recognizers/secrets/connection-string.d.ts.map +1 -0
- package/dist/recognizers/secrets/connection-string.js +40 -0
- package/dist/recognizers/secrets/connection-string.js.map +1 -0
- package/dist/recognizers/secrets/env-var.d.ts +8 -0
- package/dist/recognizers/secrets/env-var.d.ts.map +1 -0
- package/dist/recognizers/secrets/env-var.js +54 -0
- package/dist/recognizers/secrets/env-var.js.map +1 -0
- package/dist/recognizers/secrets/index.d.ts +22 -0
- package/dist/recognizers/secrets/index.d.ts.map +1 -0
- package/dist/recognizers/secrets/index.js +41 -0
- package/dist/recognizers/secrets/index.js.map +1 -0
- package/dist/recognizers/secrets/jwt.d.ts +6 -0
- package/dist/recognizers/secrets/jwt.d.ts.map +1 -0
- package/dist/recognizers/secrets/jwt.js +47 -0
- package/dist/recognizers/secrets/jwt.js.map +1 -0
- package/dist/recognizers/secrets/key-patterns.d.ts +10 -0
- package/dist/recognizers/secrets/key-patterns.d.ts.map +1 -0
- package/dist/recognizers/secrets/key-patterns.js +15 -0
- package/dist/recognizers/secrets/key-patterns.js.map +1 -0
- package/dist/recognizers/secrets/literal-value.d.ts +10 -0
- package/dist/recognizers/secrets/literal-value.d.ts.map +1 -0
- package/dist/recognizers/secrets/literal-value.js +48 -0
- package/dist/recognizers/secrets/literal-value.js.map +1 -0
- package/dist/recognizers/secrets/private-key.d.ts +6 -0
- package/dist/recognizers/secrets/private-key.d.ts.map +1 -0
- package/dist/recognizers/secrets/private-key.js +16 -0
- package/dist/recognizers/secrets/private-key.js.map +1 -0
- package/dist/recognizers/url.d.ts +14 -0
- package/dist/recognizers/url.d.ts.map +1 -0
- package/dist/recognizers/url.js +121 -0
- package/dist/recognizers/url.js.map +1 -0
- package/dist/storage/browser.d.ts +13 -0
- package/dist/storage/browser.d.ts.map +1 -0
- package/dist/storage/browser.js +13 -0
- package/dist/storage/browser.js.map +1 -0
- package/dist/storage/in-memory.d.ts +60 -0
- package/dist/storage/in-memory.d.ts.map +1 -0
- package/dist/storage/in-memory.js +108 -0
- package/dist/storage/in-memory.js.map +1 -0
- package/dist/storage/index.d.ts +11 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +11 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/indexeddb.d.ts +69 -0
- package/dist/storage/indexeddb.d.ts.map +1 -0
- package/dist/storage/indexeddb.js +274 -0
- package/dist/storage/indexeddb.js.map +1 -0
- package/dist/storage/session-base.d.ts +34 -0
- package/dist/storage/session-base.d.ts.map +1 -0
- package/dist/storage/session-base.js +122 -0
- package/dist/storage/session-base.js.map +1 -0
- package/dist/storage/session.d.ts +19 -0
- package/dist/storage/session.d.ts.map +1 -0
- package/dist/storage/session.js +31 -0
- package/dist/storage/session.js.map +1 -0
- package/dist/storage/sqlite.d.ts +80 -0
- package/dist/storage/sqlite.d.ts.map +1 -0
- package/dist/storage/sqlite.js +255 -0
- package/dist/storage/sqlite.js.map +1 -0
- package/dist/storage/types.d.ts +208 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +6 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/streaming/anonymizer-stream.d.ts +63 -0
- package/dist/streaming/anonymizer-stream.d.ts.map +1 -0
- package/dist/streaming/anonymizer-stream.js +184 -0
- package/dist/streaming/anonymizer-stream.js.map +1 -0
- package/dist/streaming/index.d.ts +9 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/index.js +8 -0
- package/dist/streaming/index.js.map +1 -0
- package/dist/streaming/sentence-buffer.d.ts +78 -0
- package/dist/streaming/sentence-buffer.d.ts.map +1 -0
- package/dist/streaming/sentence-buffer.js +239 -0
- package/dist/streaming/sentence-buffer.js.map +1 -0
- package/dist/streaming/stream-factory.d.ts +38 -0
- package/dist/streaming/stream-factory.d.ts.map +1 -0
- package/dist/streaming/stream-factory.js +69 -0
- package/dist/streaming/stream-factory.js.map +1 -0
- package/dist/streaming/types.d.ts +121 -0
- package/dist/streaming/types.d.ts.map +1 -0
- package/dist/streaming/types.js +5 -0
- package/dist/streaming/types.js.map +1 -0
- package/dist/types/index.d.ts +269 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +95 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/pii-types.d.ts +64 -0
- package/dist/types/pii-types.d.ts.map +1 -0
- package/dist/types/pii-types.js +153 -0
- package/dist/types/pii-types.js.map +1 -0
- package/dist/utils/iban-checksum.d.ts +23 -0
- package/dist/utils/iban-checksum.d.ts.map +1 -0
- package/dist/utils/iban-checksum.js +106 -0
- package/dist/utils/iban-checksum.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/json-walk.d.ts +21 -0
- package/dist/utils/json-walk.d.ts.map +1 -0
- package/dist/utils/json-walk.js +44 -0
- package/dist/utils/json-walk.js.map +1 -0
- package/dist/utils/luhn.d.ts +17 -0
- package/dist/utils/luhn.d.ts.map +1 -0
- package/dist/utils/luhn.js +55 -0
- package/dist/utils/luhn.js.map +1 -0
- package/dist/utils/offsets.d.ts +86 -0
- package/dist/utils/offsets.d.ts.map +1 -0
- package/dist/utils/offsets.js +124 -0
- package/dist/utils/offsets.js.map +1 -0
- package/dist/utils/path.d.ts +34 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +96 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/regex.d.ts +11 -0
- package/dist/utils/regex.d.ts.map +1 -0
- package/dist/utils/regex.js +14 -0
- package/dist/utils/regex.js.map +1 -0
- package/dist/utils/storage-browser.d.ts +51 -0
- package/dist/utils/storage-browser.d.ts.map +1 -0
- package/dist/utils/storage-browser.js +381 -0
- package/dist/utils/storage-browser.js.map +1 -0
- package/dist/utils/storage-node.d.ts +51 -0
- package/dist/utils/storage-node.d.ts.map +1 -0
- package/dist/utils/storage-node.js +153 -0
- package/dist/utils/storage-node.js.map +1 -0
- package/dist/utils/storage.browser.d.ts +75 -0
- package/dist/utils/storage.browser.d.ts.map +1 -0
- package/dist/utils/storage.browser.js +69 -0
- package/dist/utils/storage.browser.js.map +1 -0
- package/dist/utils/storage.d.ts +73 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/utils/storage.js +69 -0
- package/dist/utils/storage.js.map +1 -0
- package/index.js +6 -4
- package/package.json +19 -5
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Abstraction Layer - Browser-Only Version
|
|
3
|
+
*
|
|
4
|
+
* This module provides the same interface as storage.ts but only includes
|
|
5
|
+
* the browser implementation. It's used by the browser entry point to avoid
|
|
6
|
+
* bundler warnings about Node.js modules.
|
|
7
|
+
*
|
|
8
|
+
* DO NOT import storage-node.js here - that's the whole point!
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Storage provider interface
|
|
12
|
+
* Implementations exist for Node.js (fs) and browser (IndexedDB/OPFS)
|
|
13
|
+
*/
|
|
14
|
+
export interface StorageProvider {
|
|
15
|
+
/**
|
|
16
|
+
* Reads a file as binary data
|
|
17
|
+
*/
|
|
18
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
19
|
+
/**
|
|
20
|
+
* Reads a file as text
|
|
21
|
+
* @param encoding - Character encoding (default: 'utf-8', also supports 'latin1')
|
|
22
|
+
*/
|
|
23
|
+
readTextFile(path: string, encoding?: string): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Writes data to a file
|
|
26
|
+
* Creates parent directories if they don't exist
|
|
27
|
+
*/
|
|
28
|
+
writeFile(path: string, data: Uint8Array | string): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Checks if a file or directory exists
|
|
31
|
+
*/
|
|
32
|
+
exists(path: string): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a directory (and parent directories if needed)
|
|
35
|
+
*/
|
|
36
|
+
mkdir(path: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Removes a file or directory
|
|
39
|
+
*/
|
|
40
|
+
rm(path: string, options?: {
|
|
41
|
+
recursive?: boolean;
|
|
42
|
+
force?: boolean;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the cache directory path for a given subdirectory
|
|
46
|
+
* @param subdir - Subdirectory name (e.g., 'models', 'semantic-data')
|
|
47
|
+
*/
|
|
48
|
+
getCacheDir(subdir: string): string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Detects if running in Node.js environment
|
|
52
|
+
*/
|
|
53
|
+
export declare function isNode(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Detects if running in browser environment
|
|
56
|
+
*/
|
|
57
|
+
export declare function isBrowser(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Detects if running in a Web Worker
|
|
60
|
+
*/
|
|
61
|
+
export declare function isWebWorker(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the browser storage provider
|
|
64
|
+
* Browser-only version - always returns BrowserStorageProvider
|
|
65
|
+
*/
|
|
66
|
+
export declare function getStorageProvider(): Promise<StorageProvider>;
|
|
67
|
+
/**
|
|
68
|
+
* Resets the storage provider (useful for testing)
|
|
69
|
+
*/
|
|
70
|
+
export declare function resetStorageProvider(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Sets a custom storage provider (useful for testing)
|
|
73
|
+
*/
|
|
74
|
+
export declare function setStorageProvider(provider: StorageProvider): void;
|
|
75
|
+
//# sourceMappingURL=storage.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.browser.d.ts","sourceRoot":"","sources":["../../src/utils/storage.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;OAEG;IACH,EAAE,CACA,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GACjD,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACrC;AAMD;;GAEG;AACH,wBAAgB,MAAM,IAAI,OAAO,CAMhC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAInC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAMrC;AAQD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC,CAkB7D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAElE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Abstraction Layer - Browser-Only Version
|
|
3
|
+
*
|
|
4
|
+
* This module provides the same interface as storage.ts but only includes
|
|
5
|
+
* the browser implementation. It's used by the browser entry point to avoid
|
|
6
|
+
* bundler warnings about Node.js modules.
|
|
7
|
+
*
|
|
8
|
+
* DO NOT import storage-node.js here - that's the whole point!
|
|
9
|
+
*/
|
|
10
|
+
import { BrowserStorageProvider } from "./storage-browser.js";
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Runtime Detection
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Detects if running in Node.js environment
|
|
16
|
+
*/
|
|
17
|
+
export function isNode() {
|
|
18
|
+
return (typeof process !== "undefined" &&
|
|
19
|
+
process.versions !== undefined &&
|
|
20
|
+
process.versions.node !== undefined);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Detects if running in browser environment
|
|
24
|
+
*/
|
|
25
|
+
export function isBrowser() {
|
|
26
|
+
return (typeof window !== "undefined" && typeof window.document !== "undefined");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Detects if running in a Web Worker
|
|
30
|
+
*/
|
|
31
|
+
export function isWebWorker() {
|
|
32
|
+
return (typeof self !== "undefined" &&
|
|
33
|
+
typeof self
|
|
34
|
+
.WorkerGlobalScope !== "undefined");
|
|
35
|
+
}
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// Storage Provider Singleton
|
|
38
|
+
// ============================================================================
|
|
39
|
+
let storageProviderInstance = null;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the browser storage provider
|
|
42
|
+
* Browser-only version - always returns BrowserStorageProvider
|
|
43
|
+
*/
|
|
44
|
+
export function getStorageProvider() {
|
|
45
|
+
if (storageProviderInstance !== null) {
|
|
46
|
+
return Promise.resolve(storageProviderInstance);
|
|
47
|
+
}
|
|
48
|
+
if (isNode()) {
|
|
49
|
+
// In browser build, we shouldn't hit this path
|
|
50
|
+
// But if we do (e.g., SSR), throw a clear error
|
|
51
|
+
return Promise.reject(new Error("Node.js environment detected but using browser-only storage module.\n" +
|
|
52
|
+
"Import from 'rehydra' (not 'rehydra/browser') for Node.js support."));
|
|
53
|
+
}
|
|
54
|
+
storageProviderInstance = new BrowserStorageProvider();
|
|
55
|
+
return Promise.resolve(storageProviderInstance);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resets the storage provider (useful for testing)
|
|
59
|
+
*/
|
|
60
|
+
export function resetStorageProvider() {
|
|
61
|
+
storageProviderInstance = null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Sets a custom storage provider (useful for testing)
|
|
65
|
+
*/
|
|
66
|
+
export function setStorageProvider(provider) {
|
|
67
|
+
storageProviderInstance = provider;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=storage.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.browser.js","sourceRoot":"","sources":["../../src/utils/storage.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAiD9D,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,CACL,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAO,CAAC,QAAQ,KAAK,SAAS;QAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,CACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CACxE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,OAAO,IAAI,KAAK,WAAW;QAC3B,OAAQ,IAAmD;aACxD,iBAAiB,KAAK,WAAW,CACrC,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,IAAI,uBAAuB,GAA2B,IAAI,CAAC;AAE3D;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,uBAAuB,KAAK,IAAI,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,MAAM,EAAE,EAAE,CAAC;QACb,+CAA+C;QAC/C,gDAAgD;QAChD,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CACP,uEAAuE;YACrE,oEAAoE,CACvE,CACF,CAAC;IACJ,CAAC;IAED,uBAAuB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IACvD,OAAO,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,uBAAuB,GAAG,IAAI,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAyB;IAC1D,uBAAuB,GAAG,QAAQ,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Abstraction Layer
|
|
3
|
+
* Provides a unified interface for file storage across Node.js and browser environments
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Storage provider interface
|
|
7
|
+
* Implementations exist for Node.js (fs) and browser (IndexedDB/OPFS)
|
|
8
|
+
*/
|
|
9
|
+
export interface StorageProvider {
|
|
10
|
+
/**
|
|
11
|
+
* Reads a file as binary data
|
|
12
|
+
*/
|
|
13
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
14
|
+
/**
|
|
15
|
+
* Reads a file as text
|
|
16
|
+
* @param encoding - Character encoding (default: 'utf-8', also supports 'latin1')
|
|
17
|
+
*/
|
|
18
|
+
readTextFile(path: string, encoding?: string): Promise<string>;
|
|
19
|
+
/** Resolve file paths/globs relative to a directory. Optional for virtual storage.
|
|
20
|
+
* Node discovery skips node_modules, .git, and symbolic links. */
|
|
21
|
+
resolveFiles?(patterns: string[], baseDirectory?: string): Promise<string[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Writes data to a file
|
|
24
|
+
* Creates parent directories if they don't exist
|
|
25
|
+
*/
|
|
26
|
+
writeFile(path: string, data: Uint8Array | string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Checks if a file or directory exists
|
|
29
|
+
*/
|
|
30
|
+
exists(path: string): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a directory (and parent directories if needed)
|
|
33
|
+
*/
|
|
34
|
+
mkdir(path: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Removes a file or directory
|
|
37
|
+
*/
|
|
38
|
+
rm(path: string, options?: {
|
|
39
|
+
recursive?: boolean;
|
|
40
|
+
force?: boolean;
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the cache directory path for a given subdirectory
|
|
44
|
+
* @param subdir - Subdirectory name (e.g., 'models', 'semantic-data')
|
|
45
|
+
*/
|
|
46
|
+
getCacheDir(subdir: string): string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Detects if running in Node.js environment
|
|
50
|
+
*/
|
|
51
|
+
export declare function isNode(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Detects if running in browser environment
|
|
54
|
+
*/
|
|
55
|
+
export declare function isBrowser(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Detects if running in a Web Worker
|
|
58
|
+
*/
|
|
59
|
+
export declare function isWebWorker(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the appropriate storage provider for the current environment
|
|
62
|
+
* Uses lazy loading to avoid importing unnecessary modules
|
|
63
|
+
*/
|
|
64
|
+
export declare function getStorageProvider(): Promise<StorageProvider>;
|
|
65
|
+
/**
|
|
66
|
+
* Resets the storage provider (useful for testing)
|
|
67
|
+
*/
|
|
68
|
+
export declare function resetStorageProvider(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets a custom storage provider (useful for testing)
|
|
71
|
+
*/
|
|
72
|
+
export declare function setStorageProvider(provider: StorageProvider): void;
|
|
73
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE5C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D;sEACkE;IAClE,YAAY,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7E;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;OAEG;IACH,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpF;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACrC;AAMD;;GAEG;AACH,wBAAgB,MAAM,IAAI,OAAO,CAMhC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAKnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAKrC;AAQD;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC,CAoBnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAElE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Abstraction Layer
|
|
3
|
+
* Provides a unified interface for file storage across Node.js and browser environments
|
|
4
|
+
*/
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Runtime Detection
|
|
7
|
+
// ============================================================================
|
|
8
|
+
/**
|
|
9
|
+
* Detects if running in Node.js environment
|
|
10
|
+
*/
|
|
11
|
+
export function isNode() {
|
|
12
|
+
return (typeof process !== "undefined" &&
|
|
13
|
+
process.versions !== undefined &&
|
|
14
|
+
process.versions.node !== undefined);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Detects if running in browser environment
|
|
18
|
+
*/
|
|
19
|
+
export function isBrowser() {
|
|
20
|
+
return (typeof window !== "undefined" &&
|
|
21
|
+
typeof window.document !== "undefined");
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Detects if running in a Web Worker
|
|
25
|
+
*/
|
|
26
|
+
export function isWebWorker() {
|
|
27
|
+
return (typeof self !== "undefined" &&
|
|
28
|
+
typeof self.WorkerGlobalScope !== "undefined");
|
|
29
|
+
}
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Storage Provider Singleton
|
|
32
|
+
// ============================================================================
|
|
33
|
+
let storageProviderInstance = null;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the appropriate storage provider for the current environment
|
|
36
|
+
* Uses lazy loading to avoid importing unnecessary modules
|
|
37
|
+
*/
|
|
38
|
+
export async function getStorageProvider() {
|
|
39
|
+
if (storageProviderInstance !== null) {
|
|
40
|
+
return storageProviderInstance;
|
|
41
|
+
}
|
|
42
|
+
if (isNode()) {
|
|
43
|
+
// Dynamically import Node.js storage provider
|
|
44
|
+
const { NodeStorageProvider } = await import(/* @vite-ignore */ "./storage-node.js");
|
|
45
|
+
storageProviderInstance = new NodeStorageProvider();
|
|
46
|
+
}
|
|
47
|
+
else if (isBrowser() || isWebWorker()) {
|
|
48
|
+
// Dynamically import browser storage provider
|
|
49
|
+
const { BrowserStorageProvider } = await import(/* @vite-ignore */ "./storage-browser.js");
|
|
50
|
+
storageProviderInstance = new BrowserStorageProvider();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw new Error("Unsupported environment: neither Node.js nor browser detected");
|
|
54
|
+
}
|
|
55
|
+
return storageProviderInstance;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resets the storage provider (useful for testing)
|
|
59
|
+
*/
|
|
60
|
+
export function resetStorageProvider() {
|
|
61
|
+
storageProviderInstance = null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Sets a custom storage provider (useful for testing)
|
|
65
|
+
*/
|
|
66
|
+
export function setStorageProvider(provider) {
|
|
67
|
+
storageProviderInstance = provider;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkDH,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,CACL,OAAO,OAAO,KAAK,WAAW;QAC9B,OAAO,CAAC,QAAQ,KAAK,SAAS;QAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,CACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,OAAO,MAAM,KAAK,WAAW;QAC7B,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CACvC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,OAAO,IAAI,KAAK,WAAW;QAC3B,OAAQ,IAAmD,CAAC,iBAAiB,KAAK,WAAW,CAC9F,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,IAAI,uBAAuB,GAA2B,IAAI,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,uBAAuB,KAAK,IAAI,EAAE,CAAC;QACrC,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,IAAI,MAAM,EAAE,EAAE,CAAC;QACb,8CAA8C;QAC9C,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;QACrF,uBAAuB,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACtD,CAAC;SAAM,IAAI,SAAS,EAAE,IAAI,WAAW,EAAE,EAAE,CAAC;QACxC,8CAA8C;QAC9C,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;QAC3F,uBAAuB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;IACJ,CAAC;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,uBAAuB,GAAG,IAAI,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAyB;IAC1D,uBAAuB,GAAG,QAAQ,CAAC;AACrC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
1
|
+
// Load the built V2 SDK from the sibling bundled `dist/` directory. The
|
|
2
|
+
// plugin package copies its slice of the root `dist/opencode-plugin/` output
|
|
3
|
+
// into `./dist/` during the `prepublishOnly` step, so this works both in the
|
|
4
|
+
// monorepo (where `./dist/` is a fresh copy of `../../dist/opencode-plugin/`)
|
|
5
|
+
// and from a published npm install (where `./dist/` ships inside the tarball).
|
|
6
|
+
const sdk = await import("./dist/opencode-plugin/index.js");
|
|
5
7
|
const sdkDefault = sdk.default;
|
|
6
8
|
const sdkPlugin = sdk.plugin;
|
|
7
9
|
const sdkCreate = sdk.createRehydraPlugin;
|
package/package.json
CHANGED
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-rehydar",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "Rehydra OpenCode plugin — anonymizes secrets in LLM context using native plugin hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
|
+
"imports": {
|
|
9
|
+
"#storage": {
|
|
10
|
+
"node": "./dist/utils/storage.js",
|
|
11
|
+
"default": "./dist/utils/storage.js"
|
|
12
|
+
},
|
|
13
|
+
"#onnx-runtime": {
|
|
14
|
+
"node": "./dist/ner/onnx-runtime.js",
|
|
15
|
+
"default": "./dist/ner/onnx-runtime.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
8
18
|
"files": [
|
|
9
19
|
"index.js",
|
|
10
20
|
"index.d.ts",
|
|
21
|
+
"dist/",
|
|
11
22
|
"README.md",
|
|
12
23
|
"README.en.md"
|
|
13
24
|
],
|
|
14
25
|
"scripts": {
|
|
15
|
-
"prepublishOnly": "
|
|
26
|
+
"prepublishOnly": "node ./scripts/sync-dist.mjs",
|
|
27
|
+
"version:patch": "npm version patch -m \"%s\"",
|
|
28
|
+
"version:minor": "npm version minor -m \"%s\"",
|
|
29
|
+
"version:major": "npm version major -m \"%s\""
|
|
16
30
|
},
|
|
17
31
|
"keywords": [
|
|
18
32
|
"anonymization",
|
|
@@ -30,10 +44,10 @@
|
|
|
30
44
|
"url": "git+https://github.com/EightDoor/opencode-rehydra-sdk.git",
|
|
31
45
|
"directory": "packages/opencode-plugin"
|
|
32
46
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"opencode-rehydra-core": "^0.14.0"
|
|
35
|
-
},
|
|
36
47
|
"engines": {
|
|
37
48
|
"node": ">=18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"fast-glob": "^3.3.3"
|
|
38
52
|
}
|
|
39
53
|
}
|