@od-oneapp/config 2026.2.2001-canary.1
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/CHANGELOG.md +25 -0
- package/README.md +830 -0
- package/eslint/__tests__/config-structure.test.mjs +61 -0
- package/eslint/base.mjs +350 -0
- package/eslint/expo.mjs +97 -0
- package/eslint/next-test.mjs +43 -0
- package/eslint/next.mjs +74 -0
- package/eslint/node.mjs +106 -0
- package/eslint/react.mjs +313 -0
- package/eslint/rules/__tests__/no-used-underscore-vars.test.mjs +147 -0
- package/eslint/rules/no-used-underscore-vars.mjs +297 -0
- package/eslint/shared/__tests__/common-ignores.test.mjs +19 -0
- package/eslint/shared/common-ignores.mjs +172 -0
- package/eslint/shared/disabled-type-aware-rules.mjs +35 -0
- package/eslint/shared/file-patterns.mjs +124 -0
- package/eslint/shared/node-globals.mjs +50 -0
- package/eslint/storybook.mjs +81 -0
- package/eslint/test.mjs +298 -0
- package/eslint/utils/__tests__/create-validated-config.test.mjs +42 -0
- package/eslint/utils/__tests__/filter-ts-eslint-configs.test.mjs +57 -0
- package/eslint/utils/__tests__/validate-config.test.mjs +104 -0
- package/eslint/utils/create-validated-config.mjs +69 -0
- package/eslint/utils/filter-ts-eslint-configs.mjs +129 -0
- package/eslint/utils/validate-config.mjs +88 -0
- package/package.json +37 -0
- package/prettier/index.mjs +15 -0
- package/stylelint/index.mjs +129 -0
- package/tsdown/README.md +287 -0
- package/tsdown/base.mjs +77 -0
- package/tsdown/browser.mjs +34 -0
- package/tsdown/client.mjs +32 -0
- package/tsdown/dist.mjs +179 -0
- package/tsdown/index.mjs +53 -0
- package/tsdown/node.mjs +39 -0
- package/tsdown/react.mjs +30 -0
- package/typescript/base.json +52 -0
- package/typescript/dist/__tests__/browser-stub.test.d.ts +2 -0
- package/typescript/dist/__tests__/browser-stub.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/browser-stub.test.js +40 -0
- package/typescript/dist/__tests__/browser-stub.test.js.map +1 -0
- package/typescript/dist/__tests__/runtime/lifecycle.test.d.ts +2 -0
- package/typescript/dist/__tests__/runtime/lifecycle.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/runtime/lifecycle.test.js +149 -0
- package/typescript/dist/__tests__/runtime/lifecycle.test.js.map +1 -0
- package/typescript/dist/__tests__/server/abort-support.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/abort-support.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/abort-support.test.js +333 -0
- package/typescript/dist/__tests__/server/abort-support.test.js.map +1 -0
- package/typescript/dist/__tests__/server/batch-processor.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/batch-processor.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/batch-processor.test.js +173 -0
- package/typescript/dist/__tests__/server/batch-processor.test.js.map +1 -0
- package/typescript/dist/__tests__/server/cache.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/cache.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/cache.test.js +343 -0
- package/typescript/dist/__tests__/server/cache.test.js.map +1 -0
- package/typescript/dist/__tests__/server/circular-deps.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/circular-deps.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/circular-deps.test.js +412 -0
- package/typescript/dist/__tests__/server/circular-deps.test.js.map +1 -0
- package/typescript/dist/__tests__/server/claude-code-env.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/claude-code-env.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/claude-code-env.test.js +387 -0
- package/typescript/dist/__tests__/server/claude-code-env.test.js.map +1 -0
- package/typescript/dist/__tests__/server/code-analysis-tool.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/code-analysis-tool.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/code-analysis-tool.test.js +430 -0
- package/typescript/dist/__tests__/server/code-analysis-tool.test.js.map +1 -0
- package/typescript/dist/__tests__/server/code-transformation.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/code-transformation.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/code-transformation.test.js +173 -0
- package/typescript/dist/__tests__/server/code-transformation.test.js.map +1 -0
- package/typescript/dist/__tests__/server/concurrency.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/concurrency.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/concurrency.test.js +31 -0
- package/typescript/dist/__tests__/server/concurrency.test.js.map +1 -0
- package/typescript/dist/__tests__/server/context.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/context.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/context.test.js +483 -0
- package/typescript/dist/__tests__/server/context.test.js.map +1 -0
- package/typescript/dist/__tests__/server/error-handling.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/error-handling.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/error-handling.test.js +68 -0
- package/typescript/dist/__tests__/server/error-handling.test.js.map +1 -0
- package/typescript/dist/__tests__/server/error-utils.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/error-utils.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/error-utils.test.js +268 -0
- package/typescript/dist/__tests__/server/error-utils.test.js.map +1 -0
- package/typescript/dist/__tests__/server/files.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/files.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/files.test.js +160 -0
- package/typescript/dist/__tests__/server/files.test.js.map +1 -0
- package/typescript/dist/__tests__/server/logger.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/logger.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/logger.test.js +412 -0
- package/typescript/dist/__tests__/server/logger.test.js.map +1 -0
- package/typescript/dist/__tests__/server/path-manager.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/path-manager.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/path-manager.test.js +406 -0
- package/typescript/dist/__tests__/server/path-manager.test.js.map +1 -0
- package/typescript/dist/__tests__/server/retry-operations.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/retry-operations.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/retry-operations.test.js +119 -0
- package/typescript/dist/__tests__/server/retry-operations.test.js.map +1 -0
- package/typescript/dist/__tests__/server/retry.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/retry.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/retry.test.js +70 -0
- package/typescript/dist/__tests__/server/retry.test.js.map +1 -0
- package/typescript/dist/__tests__/server/retryable.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/retryable.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/retryable.test.js +23 -0
- package/typescript/dist/__tests__/server/retryable.test.js.map +1 -0
- package/typescript/dist/__tests__/server/scheduler.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/scheduler.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/scheduler.test.js +14 -0
- package/typescript/dist/__tests__/server/scheduler.test.js.map +1 -0
- package/typescript/dist/__tests__/server/security.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/security.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/security.test.js +286 -0
- package/typescript/dist/__tests__/server/security.test.js.map +1 -0
- package/typescript/dist/__tests__/server/session-management.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/session-management.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/session-management.test.js +399 -0
- package/typescript/dist/__tests__/server/session-management.test.js.map +1 -0
- package/typescript/dist/__tests__/server/session-recovery.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/session-recovery.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/session-recovery.test.js +417 -0
- package/typescript/dist/__tests__/server/session-recovery.test.js.map +1 -0
- package/typescript/dist/__tests__/server/session.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/session.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/session.test.js +102 -0
- package/typescript/dist/__tests__/server/session.test.js.map +1 -0
- package/typescript/dist/__tests__/server/simple-tools.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/simple-tools.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/simple-tools.test.js +56 -0
- package/typescript/dist/__tests__/server/simple-tools.test.js.map +1 -0
- package/typescript/dist/__tests__/server/streaming-utilities.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/streaming-utilities.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/streaming-utilities.test.js +338 -0
- package/typescript/dist/__tests__/server/streaming-utilities.test.js.map +1 -0
- package/typescript/dist/__tests__/server/streams.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/streams.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/streams.test.js +282 -0
- package/typescript/dist/__tests__/server/streams.test.js.map +1 -0
- package/typescript/dist/__tests__/server/stringify-advanced.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/stringify-advanced.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/stringify-advanced.test.js +152 -0
- package/typescript/dist/__tests__/server/stringify-advanced.test.js.map +1 -0
- package/typescript/dist/__tests__/server/structured-clone-tool.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/structured-clone-tool.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/structured-clone-tool.test.js +751 -0
- package/typescript/dist/__tests__/server/structured-clone-tool.test.js.map +1 -0
- package/typescript/dist/__tests__/server/structured-clone.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/structured-clone.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/structured-clone.test.js +305 -0
- package/typescript/dist/__tests__/server/structured-clone.test.js.map +1 -0
- package/typescript/dist/__tests__/server/tool-helpers.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/tool-helpers.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/tool-helpers.test.js +51 -0
- package/typescript/dist/__tests__/server/tool-helpers.test.js.map +1 -0
- package/typescript/dist/__tests__/server/validation.test.d.ts +2 -0
- package/typescript/dist/__tests__/server/validation.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/server/validation.test.js +585 -0
- package/typescript/dist/__tests__/server/validation.test.js.map +1 -0
- package/typescript/dist/__tests__/shared/constants.test.d.ts +2 -0
- package/typescript/dist/__tests__/shared/constants.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/shared/constants.test.js +11 -0
- package/typescript/dist/__tests__/shared/constants.test.js.map +1 -0
- package/typescript/dist/__tests__/shared/environment.test.d.ts +2 -0
- package/typescript/dist/__tests__/shared/environment.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/shared/environment.test.js +279 -0
- package/typescript/dist/__tests__/shared/environment.test.js.map +1 -0
- package/typescript/dist/__tests__/shared/stringify.test.d.ts +2 -0
- package/typescript/dist/__tests__/shared/stringify.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/shared/stringify.test.js +171 -0
- package/typescript/dist/__tests__/shared/stringify.test.js.map +1 -0
- package/typescript/dist/__tests__/shared/timeout.test.d.ts +2 -0
- package/typescript/dist/__tests__/shared/timeout.test.d.ts.map +1 -0
- package/typescript/dist/__tests__/shared/timeout.test.js +262 -0
- package/typescript/dist/__tests__/shared/timeout.test.js.map +1 -0
- package/typescript/dist/src/App.d.ts +3 -0
- package/typescript/dist/src/App.d.ts.map +1 -0
- package/typescript/dist/src/App.js +27 -0
- package/typescript/dist/src/App.js.map +1 -0
- package/typescript/dist/src/components/charts/BenchmarkCard.d.ts +12 -0
- package/typescript/dist/src/components/charts/BenchmarkCard.d.ts.map +1 -0
- package/typescript/dist/src/components/charts/BenchmarkCard.js +23 -0
- package/typescript/dist/src/components/charts/BenchmarkCard.js.map +1 -0
- package/typescript/dist/src/components/charts/ComparisonBar.d.ts +11 -0
- package/typescript/dist/src/components/charts/ComparisonBar.d.ts.map +1 -0
- package/typescript/dist/src/components/charts/ComparisonBar.js +34 -0
- package/typescript/dist/src/components/charts/ComparisonBar.js.map +1 -0
- package/typescript/dist/src/components/charts/PercentileGauge.d.ts +10 -0
- package/typescript/dist/src/components/charts/PercentileGauge.d.ts.map +1 -0
- package/typescript/dist/src/components/charts/PercentileGauge.js +68 -0
- package/typescript/dist/src/components/charts/PercentileGauge.js.map +1 -0
- package/typescript/dist/src/components/charts/index.d.ts +4 -0
- package/typescript/dist/src/components/charts/index.d.ts.map +1 -0
- package/typescript/dist/src/components/charts/index.js +4 -0
- package/typescript/dist/src/components/charts/index.js.map +1 -0
- package/typescript/dist/src/components/filters/FilterPanel.d.ts +9 -0
- package/typescript/dist/src/components/filters/FilterPanel.d.ts.map +1 -0
- package/typescript/dist/src/components/filters/FilterPanel.js +42 -0
- package/typescript/dist/src/components/filters/FilterPanel.js.map +1 -0
- package/typescript/dist/src/components/filters/index.d.ts +2 -0
- package/typescript/dist/src/components/filters/index.d.ts.map +1 -0
- package/typescript/dist/src/components/filters/index.js +2 -0
- package/typescript/dist/src/components/filters/index.js.map +1 -0
- package/typescript/dist/src/components/ui/Button.d.ts +8 -0
- package/typescript/dist/src/components/ui/Button.d.ts.map +1 -0
- package/typescript/dist/src/components/ui/Button.js +16 -0
- package/typescript/dist/src/components/ui/Button.js.map +1 -0
- package/typescript/dist/src/components/ui/Card.d.ts +14 -0
- package/typescript/dist/src/components/ui/Card.d.ts.map +1 -0
- package/typescript/dist/src/components/ui/Card.js +27 -0
- package/typescript/dist/src/components/ui/Card.js.map +1 -0
- package/typescript/dist/src/components/ui/Input.d.ts +9 -0
- package/typescript/dist/src/components/ui/Input.d.ts.map +1 -0
- package/typescript/dist/src/components/ui/Input.js +13 -0
- package/typescript/dist/src/components/ui/Input.js.map +1 -0
- package/typescript/dist/src/components/ui/Select.d.ts +14 -0
- package/typescript/dist/src/components/ui/Select.d.ts.map +1 -0
- package/typescript/dist/src/components/ui/Select.js +13 -0
- package/typescript/dist/src/components/ui/Select.js.map +1 -0
- package/typescript/dist/src/components/ui/index.d.ts +5 -0
- package/typescript/dist/src/components/ui/index.d.ts.map +1 -0
- package/typescript/dist/src/components/ui/index.js +5 -0
- package/typescript/dist/src/components/ui/index.js.map +1 -0
- package/typescript/dist/src/index.d.ts +4 -0
- package/typescript/dist/src/index.d.ts.map +1 -0
- package/typescript/dist/src/index.js +4 -0
- package/typescript/dist/src/index.js.map +1 -0
- package/typescript/dist/src/layouts/MainLayout.d.ts +2 -0
- package/typescript/dist/src/layouts/MainLayout.d.ts.map +1 -0
- package/typescript/dist/src/layouts/MainLayout.js +45 -0
- package/typescript/dist/src/layouts/MainLayout.js.map +1 -0
- package/typescript/dist/src/lib/api/benchmarks.d.ts +87 -0
- package/typescript/dist/src/lib/api/benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/api/benchmarks.js +274 -0
- package/typescript/dist/src/lib/api/benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/api/index.d.ts +2 -0
- package/typescript/dist/src/lib/api/index.d.ts.map +1 -0
- package/typescript/dist/src/lib/api/index.js +2 -0
- package/typescript/dist/src/lib/api/index.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/accident-benchmarks.d.ts +33 -0
- package/typescript/dist/src/lib/mock-data/accident-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/accident-benchmarks.js +124 -0
- package/typescript/dist/src/lib/mock-data/accident-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/basic-life-benchmarks.d.ts +47 -0
- package/typescript/dist/src/lib/mock-data/basic-life-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/basic-life-benchmarks.js +83 -0
- package/typescript/dist/src/lib/mock-data/basic-life-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/critical-illness-benchmarks.d.ts +39 -0
- package/typescript/dist/src/lib/mock-data/critical-illness-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/critical-illness-benchmarks.js +130 -0
- package/typescript/dist/src/lib/mock-data/critical-illness-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/dental-benchmarks.d.ts +42 -0
- package/typescript/dist/src/lib/mock-data/dental-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/dental-benchmarks.js +137 -0
- package/typescript/dist/src/lib/mock-data/dental-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/hospital-indemnity-benchmarks.d.ts +37 -0
- package/typescript/dist/src/lib/mock-data/hospital-indemnity-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/hospital-indemnity-benchmarks.js +128 -0
- package/typescript/dist/src/lib/mock-data/hospital-indemnity-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/index.d.ts +3 -0
- package/typescript/dist/src/lib/mock-data/index.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/index.js +3 -0
- package/typescript/dist/src/lib/mock-data/index.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/ltd-benchmarks.d.ts +59 -0
- package/typescript/dist/src/lib/mock-data/ltd-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/ltd-benchmarks.js +127 -0
- package/typescript/dist/src/lib/mock-data/ltd-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/std-benchmarks.d.ts +51 -0
- package/typescript/dist/src/lib/mock-data/std-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/std-benchmarks.js +111 -0
- package/typescript/dist/src/lib/mock-data/std-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/vision-benchmarks.d.ts +32 -0
- package/typescript/dist/src/lib/mock-data/vision-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/vision-benchmarks.js +151 -0
- package/typescript/dist/src/lib/mock-data/vision-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/mock-data/voluntary-life-benchmarks.d.ts +39 -0
- package/typescript/dist/src/lib/mock-data/voluntary-life-benchmarks.d.ts.map +1 -0
- package/typescript/dist/src/lib/mock-data/voluntary-life-benchmarks.js +97 -0
- package/typescript/dist/src/lib/mock-data/voluntary-life-benchmarks.js.map +1 -0
- package/typescript/dist/src/lib/transformers/api-to-internal.d.ts +42 -0
- package/typescript/dist/src/lib/transformers/api-to-internal.d.ts.map +1 -0
- package/typescript/dist/src/lib/transformers/api-to-internal.js +206 -0
- package/typescript/dist/src/lib/transformers/api-to-internal.js.map +1 -0
- package/typescript/dist/src/lib/transformers/index.d.ts +2 -0
- package/typescript/dist/src/lib/transformers/index.d.ts.map +1 -0
- package/typescript/dist/src/lib/transformers/index.js +2 -0
- package/typescript/dist/src/lib/transformers/index.js.map +1 -0
- package/typescript/dist/src/lib/types/accident.d.ts +46 -0
- package/typescript/dist/src/lib/types/accident.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/accident.js +223 -0
- package/typescript/dist/src/lib/types/accident.js.map +1 -0
- package/typescript/dist/src/lib/types/api-schema.d.ts +476 -0
- package/typescript/dist/src/lib/types/api-schema.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/api-schema.js +2 -0
- package/typescript/dist/src/lib/types/api-schema.js.map +1 -0
- package/typescript/dist/src/lib/types/basic-life.d.ts +30 -0
- package/typescript/dist/src/lib/types/basic-life.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/basic-life.js +137 -0
- package/typescript/dist/src/lib/types/basic-life.js.map +1 -0
- package/typescript/dist/src/lib/types/common.d.ts +99 -0
- package/typescript/dist/src/lib/types/common.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/common.js +29 -0
- package/typescript/dist/src/lib/types/common.js.map +1 -0
- package/typescript/dist/src/lib/types/critical-illness.d.ts +52 -0
- package/typescript/dist/src/lib/types/critical-illness.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/critical-illness.js +254 -0
- package/typescript/dist/src/lib/types/critical-illness.js.map +1 -0
- package/typescript/dist/src/lib/types/dental.d.ts +41 -0
- package/typescript/dist/src/lib/types/dental.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/dental.js +188 -0
- package/typescript/dist/src/lib/types/dental.js.map +1 -0
- package/typescript/dist/src/lib/types/hospital-indemnity.d.ts +41 -0
- package/typescript/dist/src/lib/types/hospital-indemnity.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/hospital-indemnity.js +191 -0
- package/typescript/dist/src/lib/types/hospital-indemnity.js.map +1 -0
- package/typescript/dist/src/lib/types/index.d.ts +12 -0
- package/typescript/dist/src/lib/types/index.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/index.js +12 -0
- package/typescript/dist/src/lib/types/index.js.map +1 -0
- package/typescript/dist/src/lib/types/ltd.d.ts +42 -0
- package/typescript/dist/src/lib/types/ltd.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/ltd.js +200 -0
- package/typescript/dist/src/lib/types/ltd.js.map +1 -0
- package/typescript/dist/src/lib/types/std.d.ts +31 -0
- package/typescript/dist/src/lib/types/std.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/std.js +144 -0
- package/typescript/dist/src/lib/types/std.js.map +1 -0
- package/typescript/dist/src/lib/types/vision.d.ts +31 -0
- package/typescript/dist/src/lib/types/vision.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/vision.js +129 -0
- package/typescript/dist/src/lib/types/vision.js.map +1 -0
- package/typescript/dist/src/lib/types/voluntary-life.d.ts +33 -0
- package/typescript/dist/src/lib/types/voluntary-life.d.ts.map +1 -0
- package/typescript/dist/src/lib/types/voluntary-life.js +144 -0
- package/typescript/dist/src/lib/types/voluntary-life.js.map +1 -0
- package/typescript/dist/src/lib/utils/format.d.ts +11 -0
- package/typescript/dist/src/lib/utils/format.d.ts.map +1 -0
- package/typescript/dist/src/lib/utils/format.js +95 -0
- package/typescript/dist/src/lib/utils/format.js.map +1 -0
- package/typescript/dist/src/lib/utils/index.d.ts +2 -0
- package/typescript/dist/src/lib/utils/index.d.ts.map +1 -0
- package/typescript/dist/src/lib/utils/index.js +2 -0
- package/typescript/dist/src/lib/utils/index.js.map +1 -0
- package/typescript/dist/src/main.d.ts +2 -0
- package/typescript/dist/src/main.d.ts.map +1 -0
- package/typescript/dist/src/main.js +20 -0
- package/typescript/dist/src/main.js.map +1 -0
- package/typescript/dist/src/pages/AccidentComparison.d.ts +2 -0
- package/typescript/dist/src/pages/AccidentComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/AccidentComparison.js +56 -0
- package/typescript/dist/src/pages/AccidentComparison.js.map +1 -0
- package/typescript/dist/src/pages/AccidentExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/AccidentExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/AccidentExplorer.js +29 -0
- package/typescript/dist/src/pages/AccidentExplorer.js.map +1 -0
- package/typescript/dist/src/pages/BasicLifeComparison.d.ts +2 -0
- package/typescript/dist/src/pages/BasicLifeComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/BasicLifeComparison.js +59 -0
- package/typescript/dist/src/pages/BasicLifeComparison.js.map +1 -0
- package/typescript/dist/src/pages/BasicLifeExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/BasicLifeExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/BasicLifeExplorer.js +29 -0
- package/typescript/dist/src/pages/BasicLifeExplorer.js.map +1 -0
- package/typescript/dist/src/pages/CriticalIllnessComparison.d.ts +2 -0
- package/typescript/dist/src/pages/CriticalIllnessComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/CriticalIllnessComparison.js +56 -0
- package/typescript/dist/src/pages/CriticalIllnessComparison.js.map +1 -0
- package/typescript/dist/src/pages/CriticalIllnessExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/CriticalIllnessExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/CriticalIllnessExplorer.js +29 -0
- package/typescript/dist/src/pages/CriticalIllnessExplorer.js.map +1 -0
- package/typescript/dist/src/pages/Dashboard.d.ts +2 -0
- package/typescript/dist/src/pages/Dashboard.d.ts.map +1 -0
- package/typescript/dist/src/pages/Dashboard.js +8 -0
- package/typescript/dist/src/pages/Dashboard.js.map +1 -0
- package/typescript/dist/src/pages/DentalComparison.d.ts +2 -0
- package/typescript/dist/src/pages/DentalComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/DentalComparison.js +64 -0
- package/typescript/dist/src/pages/DentalComparison.js.map +1 -0
- package/typescript/dist/src/pages/DentalExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/DentalExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/DentalExplorer.js +29 -0
- package/typescript/dist/src/pages/DentalExplorer.js.map +1 -0
- package/typescript/dist/src/pages/HospitalIndemnityComparison.d.ts +2 -0
- package/typescript/dist/src/pages/HospitalIndemnityComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/HospitalIndemnityComparison.js +53 -0
- package/typescript/dist/src/pages/HospitalIndemnityComparison.js.map +1 -0
- package/typescript/dist/src/pages/HospitalIndemnityExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/HospitalIndemnityExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/HospitalIndemnityExplorer.js +29 -0
- package/typescript/dist/src/pages/HospitalIndemnityExplorer.js.map +1 -0
- package/typescript/dist/src/pages/LTDComparison.d.ts +2 -0
- package/typescript/dist/src/pages/LTDComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/LTDComparison.js +64 -0
- package/typescript/dist/src/pages/LTDComparison.js.map +1 -0
- package/typescript/dist/src/pages/LTDExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/LTDExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/LTDExplorer.js +29 -0
- package/typescript/dist/src/pages/LTDExplorer.js.map +1 -0
- package/typescript/dist/src/pages/STDComparison.d.ts +2 -0
- package/typescript/dist/src/pages/STDComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/STDComparison.js +58 -0
- package/typescript/dist/src/pages/STDComparison.js.map +1 -0
- package/typescript/dist/src/pages/STDExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/STDExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/STDExplorer.js +29 -0
- package/typescript/dist/src/pages/STDExplorer.js.map +1 -0
- package/typescript/dist/src/pages/VisionComparison.d.ts +2 -0
- package/typescript/dist/src/pages/VisionComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/VisionComparison.js +64 -0
- package/typescript/dist/src/pages/VisionComparison.js.map +1 -0
- package/typescript/dist/src/pages/VisionExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/VisionExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/VisionExplorer.js +29 -0
- package/typescript/dist/src/pages/VisionExplorer.js.map +1 -0
- package/typescript/dist/src/pages/VoluntaryLifeComparison.d.ts +2 -0
- package/typescript/dist/src/pages/VoluntaryLifeComparison.d.ts.map +1 -0
- package/typescript/dist/src/pages/VoluntaryLifeComparison.js +51 -0
- package/typescript/dist/src/pages/VoluntaryLifeComparison.js.map +1 -0
- package/typescript/dist/src/pages/VoluntaryLifeExplorer.d.ts +2 -0
- package/typescript/dist/src/pages/VoluntaryLifeExplorer.d.ts.map +1 -0
- package/typescript/dist/src/pages/VoluntaryLifeExplorer.js +29 -0
- package/typescript/dist/src/pages/VoluntaryLifeExplorer.js.map +1 -0
- package/typescript/dist/src/runtime/index.d.ts +2 -0
- package/typescript/dist/src/runtime/index.d.ts.map +1 -0
- package/typescript/dist/src/runtime/index.js +2 -0
- package/typescript/dist/src/runtime/index.js.map +1 -0
- package/typescript/dist/src/runtime/lifecycle.d.ts +16 -0
- package/typescript/dist/src/runtime/lifecycle.d.ts.map +1 -0
- package/typescript/dist/src/runtime/lifecycle.js +50 -0
- package/typescript/dist/src/runtime/lifecycle.js.map +1 -0
- package/typescript/dist/src/server/abort-support.d.ts +20 -0
- package/typescript/dist/src/server/abort-support.d.ts.map +1 -0
- package/typescript/dist/src/server/abort-support.js +101 -0
- package/typescript/dist/src/server/abort-support.js.map +1 -0
- package/typescript/dist/src/server/advanced-memory-monitor.d.ts +189 -0
- package/typescript/dist/src/server/advanced-memory-monitor.d.ts.map +1 -0
- package/typescript/dist/src/server/advanced-memory-monitor.js +718 -0
- package/typescript/dist/src/server/advanced-memory-monitor.js.map +1 -0
- package/typescript/dist/src/server/architecture-detector.d.ts +72 -0
- package/typescript/dist/src/server/architecture-detector.d.ts.map +1 -0
- package/typescript/dist/src/server/architecture-detector.js +282 -0
- package/typescript/dist/src/server/architecture-detector.js.map +1 -0
- package/typescript/dist/src/server/batch-processor-tool.d.ts +69 -0
- package/typescript/dist/src/server/batch-processor-tool.d.ts.map +1 -0
- package/typescript/dist/src/server/batch-processor-tool.js +651 -0
- package/typescript/dist/src/server/batch-processor-tool.js.map +1 -0
- package/typescript/dist/src/server/batch-processor.d.ts +73 -0
- package/typescript/dist/src/server/batch-processor.d.ts.map +1 -0
- package/typescript/dist/src/server/batch-processor.js +264 -0
- package/typescript/dist/src/server/batch-processor.js.map +1 -0
- package/typescript/dist/src/server/browser-stub.d.ts +18 -0
- package/typescript/dist/src/server/browser-stub.d.ts.map +1 -0
- package/typescript/dist/src/server/browser-stub.js +21 -0
- package/typescript/dist/src/server/browser-stub.js.map +1 -0
- package/typescript/dist/src/server/cache.d.ts +92 -0
- package/typescript/dist/src/server/cache.d.ts.map +1 -0
- package/typescript/dist/src/server/cache.js +217 -0
- package/typescript/dist/src/server/cache.js.map +1 -0
- package/typescript/dist/src/server/circular-deps.d.ts +85 -0
- package/typescript/dist/src/server/circular-deps.d.ts.map +1 -0
- package/typescript/dist/src/server/circular-deps.js +331 -0
- package/typescript/dist/src/server/circular-deps.js.map +1 -0
- package/typescript/dist/src/server/claude-code-env.d.ts +50 -0
- package/typescript/dist/src/server/claude-code-env.d.ts.map +1 -0
- package/typescript/dist/src/server/claude-code-env.js +116 -0
- package/typescript/dist/src/server/claude-code-env.js.map +1 -0
- package/typescript/dist/src/server/code-analysis-tool.d.ts +79 -0
- package/typescript/dist/src/server/code-analysis-tool.d.ts.map +1 -0
- package/typescript/dist/src/server/code-analysis-tool.js +94 -0
- package/typescript/dist/src/server/code-analysis-tool.js.map +1 -0
- package/typescript/dist/src/server/code-analysis.d.ts +16 -0
- package/typescript/dist/src/server/code-analysis.d.ts.map +1 -0
- package/typescript/dist/src/server/code-analysis.js +462 -0
- package/typescript/dist/src/server/code-analysis.js.map +1 -0
- package/typescript/dist/src/server/code-transformation.d.ts +141 -0
- package/typescript/dist/src/server/code-transformation.d.ts.map +1 -0
- package/typescript/dist/src/server/code-transformation.js +918 -0
- package/typescript/dist/src/server/code-transformation.js.map +1 -0
- package/typescript/dist/src/server/comprehensive-code-analysis.d.ts +77 -0
- package/typescript/dist/src/server/comprehensive-code-analysis.d.ts.map +1 -0
- package/typescript/dist/src/server/comprehensive-code-analysis.js +613 -0
- package/typescript/dist/src/server/comprehensive-code-analysis.js.map +1 -0
- package/typescript/dist/src/server/concurrency.d.ts +5 -0
- package/typescript/dist/src/server/concurrency.d.ts.map +1 -0
- package/typescript/dist/src/server/concurrency.js +20 -0
- package/typescript/dist/src/server/concurrency.js.map +1 -0
- package/typescript/dist/src/server/context-manager.d.ts +97 -0
- package/typescript/dist/src/server/context-manager.d.ts.map +1 -0
- package/typescript/dist/src/server/context-manager.js +410 -0
- package/typescript/dist/src/server/context-manager.js.map +1 -0
- package/typescript/dist/src/server/context-session-manager.d.ts +47 -0
- package/typescript/dist/src/server/context-session-manager.d.ts.map +1 -0
- package/typescript/dist/src/server/context-session-manager.js +594 -0
- package/typescript/dist/src/server/context-session-manager.js.map +1 -0
- package/typescript/dist/src/server/context.d.ts +66 -0
- package/typescript/dist/src/server/context.d.ts.map +1 -0
- package/typescript/dist/src/server/context.js +275 -0
- package/typescript/dist/src/server/context.js.map +1 -0
- package/typescript/dist/src/server/dependency-analyzer.d.ts +100 -0
- package/typescript/dist/src/server/dependency-analyzer.d.ts.map +1 -0
- package/typescript/dist/src/server/dependency-analyzer.js +1117 -0
- package/typescript/dist/src/server/dependency-analyzer.js.map +1 -0
- package/typescript/dist/src/server/error-handling.d.ts +106 -0
- package/typescript/dist/src/server/error-handling.d.ts.map +1 -0
- package/typescript/dist/src/server/error-handling.js +363 -0
- package/typescript/dist/src/server/error-handling.js.map +1 -0
- package/typescript/dist/src/server/file-discovery.d.ts +60 -0
- package/typescript/dist/src/server/file-discovery.d.ts.map +1 -0
- package/typescript/dist/src/server/file-discovery.js +282 -0
- package/typescript/dist/src/server/file-discovery.js.map +1 -0
- package/typescript/dist/src/server/file-streaming.d.ts +152 -0
- package/typescript/dist/src/server/file-streaming.d.ts.map +1 -0
- package/typescript/dist/src/server/file-streaming.js +627 -0
- package/typescript/dist/src/server/file-streaming.js.map +1 -0
- package/typescript/dist/src/server/files.d.ts +100 -0
- package/typescript/dist/src/server/files.d.ts.map +1 -0
- package/typescript/dist/src/server/files.js +609 -0
- package/typescript/dist/src/server/files.js.map +1 -0
- package/typescript/dist/src/server/index.d.ts +54 -0
- package/typescript/dist/src/server/index.d.ts.map +1 -0
- package/typescript/dist/src/server/index.js +54 -0
- package/typescript/dist/src/server/index.js.map +1 -0
- package/typescript/dist/src/server/logger.d.ts +95 -0
- package/typescript/dist/src/server/logger.d.ts.map +1 -0
- package/typescript/dist/src/server/logger.js +271 -0
- package/typescript/dist/src/server/logger.js.map +1 -0
- package/typescript/dist/src/server/memory-aware-cache.d.ts +169 -0
- package/typescript/dist/src/server/memory-aware-cache.d.ts.map +1 -0
- package/typescript/dist/src/server/memory-aware-cache.js +655 -0
- package/typescript/dist/src/server/memory-aware-cache.js.map +1 -0
- package/typescript/dist/src/server/memory-monitor-tool.d.ts +46 -0
- package/typescript/dist/src/server/memory-monitor-tool.d.ts.map +1 -0
- package/typescript/dist/src/server/memory-monitor-tool.js +381 -0
- package/typescript/dist/src/server/memory-monitor-tool.js.map +1 -0
- package/typescript/dist/src/server/memory-monitor.d.ts +79 -0
- package/typescript/dist/src/server/memory-monitor.d.ts.map +1 -0
- package/typescript/dist/src/server/memory-monitor.js +333 -0
- package/typescript/dist/src/server/memory-monitor.js.map +1 -0
- package/typescript/dist/src/server/optimization-engine.d.ts +68 -0
- package/typescript/dist/src/server/optimization-engine.d.ts.map +1 -0
- package/typescript/dist/src/server/optimization-engine.js +728 -0
- package/typescript/dist/src/server/optimization-engine.js.map +1 -0
- package/typescript/dist/src/server/path-manager.d.ts +46 -0
- package/typescript/dist/src/server/path-manager.d.ts.map +1 -0
- package/typescript/dist/src/server/path-manager.js +155 -0
- package/typescript/dist/src/server/path-manager.js.map +1 -0
- package/typescript/dist/src/server/pattern-analyzer.d.ts +69 -0
- package/typescript/dist/src/server/pattern-analyzer.d.ts.map +1 -0
- package/typescript/dist/src/server/pattern-analyzer.js +497 -0
- package/typescript/dist/src/server/pattern-analyzer.js.map +1 -0
- package/typescript/dist/src/server/performance-observer.d.ts +61 -0
- package/typescript/dist/src/server/performance-observer.d.ts.map +1 -0
- package/typescript/dist/src/server/performance-observer.js +394 -0
- package/typescript/dist/src/server/performance-observer.js.map +1 -0
- package/typescript/dist/src/server/performance.d.ts +121 -0
- package/typescript/dist/src/server/performance.d.ts.map +1 -0
- package/typescript/dist/src/server/performance.js +520 -0
- package/typescript/dist/src/server/performance.js.map +1 -0
- package/typescript/dist/src/server/report-generator.d.ts +131 -0
- package/typescript/dist/src/server/report-generator.d.ts.map +1 -0
- package/typescript/dist/src/server/report-generator.js +1158 -0
- package/typescript/dist/src/server/report-generator.js.map +1 -0
- package/typescript/dist/src/server/resource-lifecycle-manager.d.ts +231 -0
- package/typescript/dist/src/server/resource-lifecycle-manager.d.ts.map +1 -0
- package/typescript/dist/src/server/resource-lifecycle-manager.js +839 -0
- package/typescript/dist/src/server/resource-lifecycle-manager.js.map +1 -0
- package/typescript/dist/src/server/retry-operations.d.ts +59 -0
- package/typescript/dist/src/server/retry-operations.d.ts.map +1 -0
- package/typescript/dist/src/server/retry-operations.js +68 -0
- package/typescript/dist/src/server/retry-operations.js.map +1 -0
- package/typescript/dist/src/server/retry.d.ts +18 -0
- package/typescript/dist/src/server/retry.d.ts.map +1 -0
- package/typescript/dist/src/server/retry.js +44 -0
- package/typescript/dist/src/server/retry.js.map +1 -0
- package/typescript/dist/src/server/retryable.d.ts +2 -0
- package/typescript/dist/src/server/retryable.d.ts.map +1 -0
- package/typescript/dist/src/server/retryable.js +21 -0
- package/typescript/dist/src/server/retryable.js.map +1 -0
- package/typescript/dist/src/server/scheduler.d.ts +4 -0
- package/typescript/dist/src/server/scheduler.d.ts.map +1 -0
- package/typescript/dist/src/server/scheduler.js +21 -0
- package/typescript/dist/src/server/scheduler.js.map +1 -0
- package/typescript/dist/src/server/security-scanner.d.ts +59 -0
- package/typescript/dist/src/server/security-scanner.d.ts.map +1 -0
- package/typescript/dist/src/server/security-scanner.js +915 -0
- package/typescript/dist/src/server/security-scanner.js.map +1 -0
- package/typescript/dist/src/server/security.d.ts +25 -0
- package/typescript/dist/src/server/security.d.ts.map +1 -0
- package/typescript/dist/src/server/security.js +298 -0
- package/typescript/dist/src/server/security.js.map +1 -0
- package/typescript/dist/src/server/session-management.d.ts +103 -0
- package/typescript/dist/src/server/session-management.d.ts.map +1 -0
- package/typescript/dist/src/server/session-management.js +149 -0
- package/typescript/dist/src/server/session-management.js.map +1 -0
- package/typescript/dist/src/server/session-recovery.d.ts +91 -0
- package/typescript/dist/src/server/session-recovery.d.ts.map +1 -0
- package/typescript/dist/src/server/session-recovery.js +384 -0
- package/typescript/dist/src/server/session-recovery.js.map +1 -0
- package/typescript/dist/src/server/session.d.ts +18 -0
- package/typescript/dist/src/server/session.d.ts.map +1 -0
- package/typescript/dist/src/server/session.js +46 -0
- package/typescript/dist/src/server/session.js.map +1 -0
- package/typescript/dist/src/server/simple-tools.d.ts +15 -0
- package/typescript/dist/src/server/simple-tools.d.ts.map +1 -0
- package/typescript/dist/src/server/simple-tools.js +15 -0
- package/typescript/dist/src/server/simple-tools.js.map +1 -0
- package/typescript/dist/src/server/streaming-utilities.d.ts +107 -0
- package/typescript/dist/src/server/streaming-utilities.d.ts.map +1 -0
- package/typescript/dist/src/server/streaming-utilities.js +822 -0
- package/typescript/dist/src/server/streaming-utilities.js.map +1 -0
- package/typescript/dist/src/server/streams.d.ts +48 -0
- package/typescript/dist/src/server/streams.d.ts.map +1 -0
- package/typescript/dist/src/server/streams.js +489 -0
- package/typescript/dist/src/server/streams.js.map +1 -0
- package/typescript/dist/src/server/stringify-advanced.d.ts +31 -0
- package/typescript/dist/src/server/stringify-advanced.d.ts.map +1 -0
- package/typescript/dist/src/server/stringify-advanced.js +183 -0
- package/typescript/dist/src/server/stringify-advanced.js.map +1 -0
- package/typescript/dist/src/server/structured-clone-tool.d.ts +101 -0
- package/typescript/dist/src/server/structured-clone-tool.d.ts.map +1 -0
- package/typescript/dist/src/server/structured-clone-tool.js +450 -0
- package/typescript/dist/src/server/structured-clone-tool.js.map +1 -0
- package/typescript/dist/src/server/structured-clone.d.ts +59 -0
- package/typescript/dist/src/server/structured-clone.d.ts.map +1 -0
- package/typescript/dist/src/server/structured-clone.js +307 -0
- package/typescript/dist/src/server/structured-clone.js.map +1 -0
- package/typescript/dist/src/server/test-runner.d.ts +78 -0
- package/typescript/dist/src/server/test-runner.d.ts.map +1 -0
- package/typescript/dist/src/server/test-runner.js +1024 -0
- package/typescript/dist/src/server/test-runner.js.map +1 -0
- package/typescript/dist/src/server/tool-helpers.d.ts +6 -0
- package/typescript/dist/src/server/tool-helpers.d.ts.map +1 -0
- package/typescript/dist/src/server/tool-helpers.js +27 -0
- package/typescript/dist/src/server/tool-helpers.js.map +1 -0
- package/typescript/dist/src/server/validation.d.ts +79 -0
- package/typescript/dist/src/server/validation.d.ts.map +1 -0
- package/typescript/dist/src/server/validation.js +613 -0
- package/typescript/dist/src/server/validation.js.map +1 -0
- package/typescript/dist/src/server/worker-pool.d.ts +87 -0
- package/typescript/dist/src/server/worker-pool.d.ts.map +1 -0
- package/typescript/dist/src/server/worker-pool.js +586 -0
- package/typescript/dist/src/server/worker-pool.js.map +1 -0
- package/typescript/dist/src/server/worker-threads.d.ts +95 -0
- package/typescript/dist/src/server/worker-threads.d.ts.map +1 -0
- package/typescript/dist/src/server/worker-threads.js +1074 -0
- package/typescript/dist/src/server/worker-threads.js.map +1 -0
- package/typescript/dist/src/server/workflow-orchestrator.d.ts +122 -0
- package/typescript/dist/src/server/workflow-orchestrator.d.ts.map +1 -0
- package/typescript/dist/src/server/workflow-orchestrator.js +2131 -0
- package/typescript/dist/src/server/workflow-orchestrator.js.map +1 -0
- package/typescript/dist/src/server/worktree-manager.d.ts +70 -0
- package/typescript/dist/src/server/worktree-manager.d.ts.map +1 -0
- package/typescript/dist/src/server/worktree-manager.js +741 -0
- package/typescript/dist/src/server/worktree-manager.js.map +1 -0
- package/typescript/dist/src/shared/constants.d.ts +5 -0
- package/typescript/dist/src/shared/constants.d.ts.map +1 -0
- package/typescript/dist/src/shared/constants.js +5 -0
- package/typescript/dist/src/shared/constants.js.map +1 -0
- package/typescript/dist/src/shared/entity-config.d.ts +76 -0
- package/typescript/dist/src/shared/entity-config.d.ts.map +1 -0
- package/typescript/dist/src/shared/entity-config.js +2 -0
- package/typescript/dist/src/shared/entity-config.js.map +1 -0
- package/typescript/dist/src/shared/environment.d.ts +18 -0
- package/typescript/dist/src/shared/environment.d.ts.map +1 -0
- package/typescript/dist/src/shared/environment.js +39 -0
- package/typescript/dist/src/shared/environment.js.map +1 -0
- package/typescript/dist/src/shared/index.d.ts +6 -0
- package/typescript/dist/src/shared/index.d.ts.map +1 -0
- package/typescript/dist/src/shared/index.js +6 -0
- package/typescript/dist/src/shared/index.js.map +1 -0
- package/typescript/dist/src/shared/stringify.d.ts +16 -0
- package/typescript/dist/src/shared/stringify.d.ts.map +1 -0
- package/typescript/dist/src/shared/stringify.js +195 -0
- package/typescript/dist/src/shared/stringify.js.map +1 -0
- package/typescript/dist/src/shared/timeout.d.ts +27 -0
- package/typescript/dist/src/shared/timeout.d.ts.map +1 -0
- package/typescript/dist/src/shared/timeout.js +196 -0
- package/typescript/dist/src/shared/timeout.js.map +1 -0
- package/typescript/dist/src/types/mcp.d.ts +23 -0
- package/typescript/dist/src/types/mcp.d.ts.map +1 -0
- package/typescript/dist/src/types/mcp.js +2 -0
- package/typescript/dist/src/types/mcp.js.map +1 -0
- package/typescript/dist/tsconfig.tsbuildinfo +1 -0
- package/typescript/dist/vite.config.d.ts +3 -0
- package/typescript/dist/vite.config.d.ts.map +1 -0
- package/typescript/dist/vite.config.js +12 -0
- package/typescript/dist/vite.config.js.map +1 -0
- package/typescript/nextjs.json +17 -0
- package/typescript/node.json +10 -0
- package/typescript/react-native.json +8 -0
- package/typescript/react.json +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-aware-cache.d.ts","sourceRoot":"","sources":["../../../../../core-utils/src/server/memory-aware-cache.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
import { scheduler } from 'node:timers/promises';
|
|
2
|
+
import { logDebug, logError } from '@repo/shared/logs';
|
|
3
|
+
import { LRUCache } from 'lru-cache';
|
|
4
|
+
import { globalAdvancedMemoryMonitor } from './advanced-memory-monitor';
|
|
5
|
+
import { ErrorPatterns } from './error-handling';
|
|
6
|
+
import { enhancedClone, isStructuredCloneAvailable } from './structured-clone';
|
|
7
|
+
import { ok, runTool } from './tool-helpers';
|
|
8
|
+
export class MemoryAwareCache {
|
|
9
|
+
cache;
|
|
10
|
+
options;
|
|
11
|
+
memoryUsage = 0;
|
|
12
|
+
compressionStats = {
|
|
13
|
+
totalCompressed: 0,
|
|
14
|
+
totalSavings: 0,
|
|
15
|
+
compressionRatio: 1.0,
|
|
16
|
+
};
|
|
17
|
+
analytics = {
|
|
18
|
+
hits: 0,
|
|
19
|
+
misses: 0,
|
|
20
|
+
evictions: 0,
|
|
21
|
+
compressions: 0,
|
|
22
|
+
decompressions: 0,
|
|
23
|
+
memoryPressureEvictions: 0,
|
|
24
|
+
weakRefCollections: 0,
|
|
25
|
+
};
|
|
26
|
+
cleanupInterval = null;
|
|
27
|
+
lastMemoryCheck = 0;
|
|
28
|
+
memoryCheckInterval = 30000;
|
|
29
|
+
compressionStream = null;
|
|
30
|
+
constructor(options = {}) {
|
|
31
|
+
this.options = {
|
|
32
|
+
maxSize: options.maxSize ?? 1000,
|
|
33
|
+
maxMemoryMB: options.maxMemoryMB ?? 100,
|
|
34
|
+
ttl: options.ttl || 30 * 60 * 1000,
|
|
35
|
+
enableAnalytics: options.enableAnalytics !== false,
|
|
36
|
+
useWeakRefs: options.useWeakRefs !== false,
|
|
37
|
+
useStructuredClone: options.useStructuredClone !== false && isStructuredCloneAvailable(),
|
|
38
|
+
deepCopy: options.deepCopy !== false,
|
|
39
|
+
memoryPressureThreshold: options.memoryPressureThreshold ?? 75,
|
|
40
|
+
autoEvictOnPressure: options.autoEvictOnPressure !== false,
|
|
41
|
+
enableLeakDetection: options.enableLeakDetection !== false,
|
|
42
|
+
compressionThreshold: options.compressionThreshold ?? 10240,
|
|
43
|
+
persistenceEnabled: options.persistenceEnabled ?? false,
|
|
44
|
+
};
|
|
45
|
+
void this.initializeCompression();
|
|
46
|
+
this.setupCache();
|
|
47
|
+
this.startPeriodicCleanup();
|
|
48
|
+
}
|
|
49
|
+
async initializeCompression() {
|
|
50
|
+
try {
|
|
51
|
+
const { createGzip, createGunzip } = await import('node:zlib');
|
|
52
|
+
this.compressionStream = { createGzip, createGunzip };
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
logDebug('Compression not available');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
setupCache() {
|
|
59
|
+
this.cache = new LRUCache({
|
|
60
|
+
max: this.options.maxSize,
|
|
61
|
+
ttl: this.options.ttl,
|
|
62
|
+
sizeCalculation: (value) => value.size,
|
|
63
|
+
maxSize: this.options.maxMemoryMB * 1024 * 1024,
|
|
64
|
+
dispose: (value, key, reason) => {
|
|
65
|
+
this.handleDisposal(value, key, reason);
|
|
66
|
+
},
|
|
67
|
+
updateAgeOnGet: true,
|
|
68
|
+
updateAgeOnHas: true,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
startPeriodicCleanup() {
|
|
72
|
+
this.cleanupInterval = setInterval(() => {
|
|
73
|
+
void this.performPeriodicMaintenance().catch(error => {
|
|
74
|
+
logError('[MemoryAwareCache] Periodic maintenance error', { error });
|
|
75
|
+
});
|
|
76
|
+
}, this.memoryCheckInterval);
|
|
77
|
+
this.cleanupInterval.unref();
|
|
78
|
+
}
|
|
79
|
+
async performPeriodicMaintenance() {
|
|
80
|
+
await this.cleanupDeadWeakRefs();
|
|
81
|
+
if (this.options.autoEvictOnPressure) {
|
|
82
|
+
await this.checkMemoryPressureAndEvict();
|
|
83
|
+
}
|
|
84
|
+
await this.optimizeCompression();
|
|
85
|
+
}
|
|
86
|
+
async cleanupDeadWeakRefs() {
|
|
87
|
+
let cleaned = 0;
|
|
88
|
+
for (const [key, value] of this.cache.entries()) {
|
|
89
|
+
if (value.weakRef && value.weakRef.deref() === undefined) {
|
|
90
|
+
this.cache.delete(key);
|
|
91
|
+
cleaned++;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (cleaned > 0) {
|
|
95
|
+
this.analytics.weakRefCollections += cleaned;
|
|
96
|
+
logDebug(`Cleaned ${cleaned} dead WeakRef cache entries`, { cleanedCount: cleaned });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async checkMemoryPressureAndEvict() {
|
|
100
|
+
const pressure = globalAdvancedMemoryMonitor.getMemoryPressure();
|
|
101
|
+
if (pressure.heapUtilization > this.options.memoryPressureThreshold) {
|
|
102
|
+
const evictionResult = await this.evictBasedOnMemoryPressure(pressure.level);
|
|
103
|
+
if (evictionResult.evicted) {
|
|
104
|
+
logDebug(`Memory pressure eviction: ${evictionResult.itemsRemoved} items, ${Math.round(evictionResult.memoryFreed / 1024)}KB freed`, {
|
|
105
|
+
itemsRemoved: evictionResult.itemsRemoved,
|
|
106
|
+
memoryFreedKB: Math.round(evictionResult.memoryFreed / 1024),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async optimizeCompression() {
|
|
112
|
+
if (!this.compressionStream)
|
|
113
|
+
return;
|
|
114
|
+
let optimized = 0;
|
|
115
|
+
for (const [_key, value] of this.cache.entries()) {
|
|
116
|
+
if (!value.compressed && value.size > this.options.compressionThreshold) {
|
|
117
|
+
const compressed = await this.compressValue(value.data);
|
|
118
|
+
if (compressed && compressed.size < value.size * 0.8) {
|
|
119
|
+
value.data = compressed.data;
|
|
120
|
+
value.size = compressed.size;
|
|
121
|
+
value.compressed = true;
|
|
122
|
+
this.analytics.compressions++;
|
|
123
|
+
optimized++;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (optimized > 0) {
|
|
128
|
+
logDebug(`Optimized compression for ${optimized} cache entries`, {
|
|
129
|
+
optimizedCount: optimized,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async set(key, value, options = {}) {
|
|
134
|
+
const { ttl, compress = false, trackForLeaks = this.options.enableLeakDetection } = options;
|
|
135
|
+
const size = this.estimateSize(value);
|
|
136
|
+
let processedValue = value;
|
|
137
|
+
let compressed = false;
|
|
138
|
+
let trackingId;
|
|
139
|
+
if ((compress || size > this.options.compressionThreshold) && this.compressionStream) {
|
|
140
|
+
const compressedResult = await this.compressValue(value);
|
|
141
|
+
if (compressedResult && compressedResult.size < size * 0.9) {
|
|
142
|
+
processedValue = compressedResult.data;
|
|
143
|
+
compressed = true;
|
|
144
|
+
this.analytics.compressions++;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (trackForLeaks && typeof value === 'object' && value !== null) {
|
|
148
|
+
trackingId = globalAdvancedMemoryMonitor.trackObject(value, `cache-${String(key)}`, { cacheKey: key, size }, () => {
|
|
149
|
+
this.cache.delete(key);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
let weakRef;
|
|
153
|
+
if (this.options.useWeakRefs && typeof value === 'object' && value !== null) {
|
|
154
|
+
weakRef = new WeakRef(value);
|
|
155
|
+
}
|
|
156
|
+
const cacheValue = {
|
|
157
|
+
data: this.options.deepCopy ? this.deepCloneValue(processedValue) : processedValue,
|
|
158
|
+
size: compressed ? this.estimateSize(processedValue) : size,
|
|
159
|
+
accessCount: 0,
|
|
160
|
+
lastAccessed: Date.now(),
|
|
161
|
+
created: Date.now(),
|
|
162
|
+
compressed,
|
|
163
|
+
weakRef,
|
|
164
|
+
trackingId,
|
|
165
|
+
};
|
|
166
|
+
if (ttl) {
|
|
167
|
+
this.cache.set(key, cacheValue, { ttl });
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.cache.set(key, cacheValue);
|
|
171
|
+
}
|
|
172
|
+
this.memoryUsage += cacheValue.size;
|
|
173
|
+
if (this.options.enableAnalytics) {
|
|
174
|
+
this.analytics.hits++;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
async get(key) {
|
|
178
|
+
const cacheValue = this.cache.get(key);
|
|
179
|
+
if (!cacheValue) {
|
|
180
|
+
if (this.options.enableAnalytics) {
|
|
181
|
+
this.analytics.misses++;
|
|
182
|
+
}
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
if (cacheValue.weakRef) {
|
|
186
|
+
const weakValue = cacheValue.weakRef.deref();
|
|
187
|
+
if (weakValue === undefined) {
|
|
188
|
+
this.cache.delete(key);
|
|
189
|
+
this.analytics.weakRefCollections++;
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
cacheValue.accessCount++;
|
|
194
|
+
cacheValue.lastAccessed = Date.now();
|
|
195
|
+
let value = cacheValue.data;
|
|
196
|
+
if (cacheValue.compressed && this.compressionStream) {
|
|
197
|
+
const decompressed = await this.decompressValue(value);
|
|
198
|
+
if (decompressed) {
|
|
199
|
+
value = decompressed;
|
|
200
|
+
this.analytics.decompressions++;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (this.options.deepCopy) {
|
|
204
|
+
value = this.deepCloneValue(value);
|
|
205
|
+
}
|
|
206
|
+
if (this.options.enableAnalytics) {
|
|
207
|
+
this.analytics.hits++;
|
|
208
|
+
}
|
|
209
|
+
return value;
|
|
210
|
+
}
|
|
211
|
+
has(key) {
|
|
212
|
+
const cacheValue = this.cache.peek(key);
|
|
213
|
+
if (!cacheValue) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
if (cacheValue.weakRef) {
|
|
217
|
+
const weakValue = cacheValue.weakRef.deref();
|
|
218
|
+
if (weakValue === undefined) {
|
|
219
|
+
this.cache.delete(key);
|
|
220
|
+
this.analytics.weakRefCollections++;
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
delete(key) {
|
|
227
|
+
const cacheValue = this.cache.get(key);
|
|
228
|
+
if (cacheValue) {
|
|
229
|
+
this.memoryUsage -= cacheValue.size;
|
|
230
|
+
if (cacheValue.trackingId && this.options.enableLeakDetection) {
|
|
231
|
+
logDebug(`Cleaning up tracked object: ${cacheValue.trackingId}`, {
|
|
232
|
+
trackingId: cacheValue.trackingId,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return this.cache.delete(key);
|
|
237
|
+
}
|
|
238
|
+
async clear() {
|
|
239
|
+
if (this.options.enableLeakDetection) {
|
|
240
|
+
for (const [, value] of this.cache.entries()) {
|
|
241
|
+
if (value.trackingId) {
|
|
242
|
+
logDebug(`Force cleaning tracked object: ${value.trackingId}`, {
|
|
243
|
+
trackingId: value.trackingId,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
this.cache.clear();
|
|
249
|
+
this.memoryUsage = 0;
|
|
250
|
+
if (global.gc) {
|
|
251
|
+
await scheduler.wait(10);
|
|
252
|
+
global.gc();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async evictBasedOnMemoryPressure(pressureLevel) {
|
|
256
|
+
let itemsToEvict = 0;
|
|
257
|
+
const _memoryToFree = 0;
|
|
258
|
+
switch (pressureLevel) {
|
|
259
|
+
case 'emergency':
|
|
260
|
+
itemsToEvict = Math.floor(this.cache.size * 0.8);
|
|
261
|
+
break;
|
|
262
|
+
case 'critical':
|
|
263
|
+
itemsToEvict = Math.floor(this.cache.size * 0.6);
|
|
264
|
+
break;
|
|
265
|
+
case 'high':
|
|
266
|
+
itemsToEvict = Math.floor(this.cache.size * 0.4);
|
|
267
|
+
break;
|
|
268
|
+
case 'elevated':
|
|
269
|
+
itemsToEvict = Math.floor(this.cache.size * 0.2);
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
itemsToEvict = Math.floor(this.cache.size * 0.1);
|
|
273
|
+
}
|
|
274
|
+
if (itemsToEvict === 0) {
|
|
275
|
+
return {
|
|
276
|
+
evicted: false,
|
|
277
|
+
itemsRemoved: 0,
|
|
278
|
+
memoryFreed: 0,
|
|
279
|
+
reason: 'No eviction needed',
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const entries = Array.from(this.cache.entries())
|
|
283
|
+
.map(([key, value]) => ({
|
|
284
|
+
key,
|
|
285
|
+
value,
|
|
286
|
+
priority: this.calculateEvictionPriority(value),
|
|
287
|
+
}))
|
|
288
|
+
.sort((a, b) => a.priority - b.priority);
|
|
289
|
+
let actuallyEvicted = 0;
|
|
290
|
+
let memoryFreed = 0;
|
|
291
|
+
for (let i = 0; i < Math.min(itemsToEvict, entries.length); i++) {
|
|
292
|
+
const entry = entries[i];
|
|
293
|
+
if (!entry) {
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
memoryFreed += entry.value.size;
|
|
297
|
+
if (this.cache.delete(entry.key)) {
|
|
298
|
+
actuallyEvicted++;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
this.analytics.memoryPressureEvictions += actuallyEvicted;
|
|
302
|
+
return {
|
|
303
|
+
evicted: actuallyEvicted > 0,
|
|
304
|
+
itemsRemoved: actuallyEvicted,
|
|
305
|
+
memoryFreed,
|
|
306
|
+
reason: `Memory pressure eviction (${pressureLevel})`,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
calculateEvictionPriority(value) {
|
|
310
|
+
const now = Date.now();
|
|
311
|
+
const age = now - value.created;
|
|
312
|
+
const timeSinceAccess = now - value.lastAccessed;
|
|
313
|
+
const accessFrequency = value.accessCount / Math.max(age, 1);
|
|
314
|
+
const recencyScore = Math.min(timeSinceAccess / 3600000, 1);
|
|
315
|
+
const frequencyScore = 1 - Math.min(accessFrequency * 1000, 1);
|
|
316
|
+
const ageScore = Math.min(age / 86400000, 1);
|
|
317
|
+
const sizeScore = Math.min(value.size / (1024 * 1024), 1);
|
|
318
|
+
return recencyScore * 0.4 + frequencyScore * 0.3 + ageScore * 0.2 + sizeScore * 0.1;
|
|
319
|
+
}
|
|
320
|
+
async compressValue(value) {
|
|
321
|
+
if (!this.compressionStream)
|
|
322
|
+
return null;
|
|
323
|
+
try {
|
|
324
|
+
const serialized = JSON.stringify(value);
|
|
325
|
+
const buffer = Buffer.from(serialized, 'utf8');
|
|
326
|
+
const compressed = buffer.toString('base64');
|
|
327
|
+
return {
|
|
328
|
+
data: compressed,
|
|
329
|
+
size: compressed.length,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
catch {
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
async decompressValue(compressedData) {
|
|
337
|
+
if (!this.compressionStream)
|
|
338
|
+
return null;
|
|
339
|
+
try {
|
|
340
|
+
if (typeof compressedData !== 'string')
|
|
341
|
+
return null;
|
|
342
|
+
const buffer = Buffer.from(compressedData, 'base64');
|
|
343
|
+
const decompressed = buffer.toString('utf8');
|
|
344
|
+
return JSON.parse(decompressed);
|
|
345
|
+
}
|
|
346
|
+
catch {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
deepCloneValue(value) {
|
|
351
|
+
if (!this.options.deepCopy)
|
|
352
|
+
return value;
|
|
353
|
+
const cloneResult = enhancedClone(value, {
|
|
354
|
+
fallbackToJson: true,
|
|
355
|
+
trackPerformance: false,
|
|
356
|
+
});
|
|
357
|
+
return cloneResult.data;
|
|
358
|
+
}
|
|
359
|
+
estimateSize(value) {
|
|
360
|
+
try {
|
|
361
|
+
const jsonStr = JSON.stringify(value);
|
|
362
|
+
return jsonStr.length * 2;
|
|
363
|
+
}
|
|
364
|
+
catch {
|
|
365
|
+
return 64;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
handleDisposal(value, key, reason) {
|
|
369
|
+
this.memoryUsage -= value.size;
|
|
370
|
+
if (this.options.enableAnalytics && reason === 'evict') {
|
|
371
|
+
this.analytics.evictions++;
|
|
372
|
+
}
|
|
373
|
+
if (value.trackingId && this.options.enableLeakDetection) {
|
|
374
|
+
logDebug(`Disposal cleanup for tracked object: ${value.trackingId}`, {
|
|
375
|
+
trackingId: value.trackingId,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
getMemoryStats() {
|
|
380
|
+
let totalWeakRefs = 0;
|
|
381
|
+
let deadWeakRefs = 0;
|
|
382
|
+
let largestItem = 0;
|
|
383
|
+
let totalSize = 0;
|
|
384
|
+
for (const [, value] of this.cache.entries()) {
|
|
385
|
+
if (value.weakRef) {
|
|
386
|
+
totalWeakRefs++;
|
|
387
|
+
if (value.weakRef.deref() === undefined) {
|
|
388
|
+
deadWeakRefs++;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (value.size > largestItem) {
|
|
392
|
+
largestItem = value.size;
|
|
393
|
+
}
|
|
394
|
+
totalSize += value.size;
|
|
395
|
+
}
|
|
396
|
+
const pressure = globalAdvancedMemoryMonitor.getMemoryPressure();
|
|
397
|
+
return {
|
|
398
|
+
totalItems: this.cache.size,
|
|
399
|
+
estimatedMemoryUsage: totalSize,
|
|
400
|
+
averageItemSize: this.cache.size > 0 ? totalSize / this.cache.size : 0,
|
|
401
|
+
largestItem,
|
|
402
|
+
compressionRatio: this.compressionStats.compressionRatio,
|
|
403
|
+
weakRefCount: totalWeakRefs,
|
|
404
|
+
deadWeakRefs,
|
|
405
|
+
memoryPressureLevel: pressure.level,
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
getAnalytics() {
|
|
409
|
+
const hitRate = this.analytics.hits + this.analytics.misses > 0
|
|
410
|
+
? ((this.analytics.hits / (this.analytics.hits + this.analytics.misses)) * 100).toFixed(2)
|
|
411
|
+
: '0';
|
|
412
|
+
return {
|
|
413
|
+
...this.analytics,
|
|
414
|
+
hitRate: `${hitRate}%`,
|
|
415
|
+
currentSize: this.cache.size,
|
|
416
|
+
maxSize: this.options.maxSize,
|
|
417
|
+
memoryUsage: this.memoryUsage,
|
|
418
|
+
maxMemoryMB: this.options.maxMemoryMB,
|
|
419
|
+
compressionStats: this.compressionStats,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
async forceCleanup() {
|
|
423
|
+
const beforeSize = this.cache.size;
|
|
424
|
+
const beforeMemory = this.memoryUsage;
|
|
425
|
+
await this.cleanupDeadWeakRefs();
|
|
426
|
+
const deadWeakRefsRemoved = this.analytics.weakRefCollections;
|
|
427
|
+
const evictionResult = await this.evictBasedOnMemoryPressure('high');
|
|
428
|
+
const afterSize = this.cache.size;
|
|
429
|
+
const afterMemory = this.memoryUsage;
|
|
430
|
+
return {
|
|
431
|
+
cleaned: evictionResult.evicted,
|
|
432
|
+
itemsRemoved: beforeSize - afterSize,
|
|
433
|
+
memoryFreed: beforeMemory - afterMemory,
|
|
434
|
+
deadWeakRefsRemoved,
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
dispose() {
|
|
438
|
+
if (this.cleanupInterval) {
|
|
439
|
+
clearInterval(this.cleanupInterval);
|
|
440
|
+
this.cleanupInterval = null;
|
|
441
|
+
}
|
|
442
|
+
void this.clear();
|
|
443
|
+
logDebug('Memory-aware cache disposed');
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
export class MemoryAwareCacheRegistry {
|
|
447
|
+
caches = new Map();
|
|
448
|
+
create(name, options = {}) {
|
|
449
|
+
if (this.caches.has(name)) {
|
|
450
|
+
const existing = this.caches.get(name);
|
|
451
|
+
if (!existing)
|
|
452
|
+
throw new Error(`Cache '${name}' not found`);
|
|
453
|
+
return existing;
|
|
454
|
+
}
|
|
455
|
+
const cache = new MemoryAwareCache(options);
|
|
456
|
+
this.caches.set(name, cache);
|
|
457
|
+
if (options.enableLeakDetection !== false) {
|
|
458
|
+
globalAdvancedMemoryMonitor.trackObject(cache, `cache-registry-${name}`, {
|
|
459
|
+
cacheName: name,
|
|
460
|
+
options,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
return cache;
|
|
464
|
+
}
|
|
465
|
+
get(name) {
|
|
466
|
+
return this.caches.get(name);
|
|
467
|
+
}
|
|
468
|
+
delete(name) {
|
|
469
|
+
const cache = this.caches.get(name);
|
|
470
|
+
if (cache) {
|
|
471
|
+
cache.dispose();
|
|
472
|
+
return this.caches.delete(name);
|
|
473
|
+
}
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
list() {
|
|
477
|
+
return Array.from(this.caches.keys());
|
|
478
|
+
}
|
|
479
|
+
async cleanupAll() {
|
|
480
|
+
const results = {};
|
|
481
|
+
for (const [name, cache] of this.caches) {
|
|
482
|
+
results[name] = await cache.forceCleanup();
|
|
483
|
+
}
|
|
484
|
+
return results;
|
|
485
|
+
}
|
|
486
|
+
getGlobalStats() {
|
|
487
|
+
let totalItems = 0;
|
|
488
|
+
let totalMemoryUsage = 0;
|
|
489
|
+
for (const [, cache] of this.caches) {
|
|
490
|
+
const stats = cache.getMemoryStats();
|
|
491
|
+
totalItems += stats.totalItems;
|
|
492
|
+
totalMemoryUsage += stats.estimatedMemoryUsage;
|
|
493
|
+
}
|
|
494
|
+
const pressure = globalAdvancedMemoryMonitor.getMemoryPressure();
|
|
495
|
+
return {
|
|
496
|
+
totalCaches: this.caches.size,
|
|
497
|
+
totalItems,
|
|
498
|
+
totalMemoryUsage,
|
|
499
|
+
averageMemoryPerCache: this.caches.size > 0 ? totalMemoryUsage / this.caches.size : 0,
|
|
500
|
+
memoryPressureLevel: pressure.level,
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
async dispose() {
|
|
504
|
+
for (const [, cache] of this.caches) {
|
|
505
|
+
cache.dispose();
|
|
506
|
+
}
|
|
507
|
+
this.caches.clear();
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
export const globalMemoryAwareCacheRegistry = new MemoryAwareCacheRegistry();
|
|
511
|
+
export const memoryAwareCacheTool = {
|
|
512
|
+
name: 'memory_aware_cache',
|
|
513
|
+
description: 'Advanced memory-aware cache with leak prevention and Node.js 22+ optimizations',
|
|
514
|
+
inputSchema: {
|
|
515
|
+
type: 'object',
|
|
516
|
+
properties: {
|
|
517
|
+
action: {
|
|
518
|
+
type: 'string',
|
|
519
|
+
enum: ['create', 'get', 'set', 'delete', 'clear', 'stats', 'cleanup', 'forceGC'],
|
|
520
|
+
description: 'Cache action to perform',
|
|
521
|
+
},
|
|
522
|
+
cacheName: {
|
|
523
|
+
type: 'string',
|
|
524
|
+
description: 'Name of the cache instance',
|
|
525
|
+
},
|
|
526
|
+
key: {
|
|
527
|
+
type: 'string',
|
|
528
|
+
description: 'Cache key',
|
|
529
|
+
},
|
|
530
|
+
value: {
|
|
531
|
+
type: 'object',
|
|
532
|
+
description: 'Cache value',
|
|
533
|
+
},
|
|
534
|
+
options: {
|
|
535
|
+
type: 'object',
|
|
536
|
+
description: 'Cache configuration options',
|
|
537
|
+
},
|
|
538
|
+
cacheOptions: {
|
|
539
|
+
type: 'object',
|
|
540
|
+
description: 'Operation-specific options',
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
required: ['action', 'cacheName'],
|
|
544
|
+
},
|
|
545
|
+
async execute(args) {
|
|
546
|
+
return runTool('memory_aware_cache', args.action, async () => {
|
|
547
|
+
const { action, cacheName } = args;
|
|
548
|
+
switch (action) {
|
|
549
|
+
case 'create': {
|
|
550
|
+
globalMemoryAwareCacheRegistry.create(cacheName, args.options ?? {});
|
|
551
|
+
return ok({
|
|
552
|
+
success: true,
|
|
553
|
+
cacheName,
|
|
554
|
+
message: `Memory-aware cache '${cacheName}' created`,
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
case 'get': {
|
|
558
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
559
|
+
if (!cache) {
|
|
560
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
561
|
+
}
|
|
562
|
+
const value = await cache.get(args.key);
|
|
563
|
+
return ok({
|
|
564
|
+
found: value !== undefined,
|
|
565
|
+
value,
|
|
566
|
+
key: args.key,
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
case 'set': {
|
|
570
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
571
|
+
if (!cache) {
|
|
572
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
573
|
+
}
|
|
574
|
+
await cache.set(args.key, args.value, args.cacheOptions ?? {});
|
|
575
|
+
return ok({
|
|
576
|
+
success: true,
|
|
577
|
+
key: args.key,
|
|
578
|
+
message: 'Value cached successfully',
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
case 'delete': {
|
|
582
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
583
|
+
if (!cache) {
|
|
584
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
585
|
+
}
|
|
586
|
+
const deleted = cache.delete(args.key);
|
|
587
|
+
return ok({
|
|
588
|
+
deleted,
|
|
589
|
+
key: args.key,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
case 'clear': {
|
|
593
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
594
|
+
if (!cache) {
|
|
595
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
596
|
+
}
|
|
597
|
+
await cache.clear();
|
|
598
|
+
return ok({
|
|
599
|
+
success: true,
|
|
600
|
+
message: `Cache '${cacheName}' cleared`,
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
case 'stats': {
|
|
604
|
+
if (cacheName === 'global') {
|
|
605
|
+
const globalStats = globalMemoryAwareCacheRegistry.getGlobalStats();
|
|
606
|
+
return ok(globalStats);
|
|
607
|
+
}
|
|
608
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
609
|
+
if (!cache) {
|
|
610
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
611
|
+
}
|
|
612
|
+
const memoryStats = cache.getMemoryStats();
|
|
613
|
+
const analytics = cache.getAnalytics();
|
|
614
|
+
return ok({
|
|
615
|
+
memoryStats,
|
|
616
|
+
analytics,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
case 'cleanup': {
|
|
620
|
+
if (cacheName === 'all') {
|
|
621
|
+
const results = await globalMemoryAwareCacheRegistry.cleanupAll();
|
|
622
|
+
return ok({
|
|
623
|
+
globalCleanup: true,
|
|
624
|
+
results,
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
const cache = globalMemoryAwareCacheRegistry.get(cacheName);
|
|
628
|
+
if (!cache) {
|
|
629
|
+
throw new Error(`Cache '${cacheName}' not found`);
|
|
630
|
+
}
|
|
631
|
+
const result = await cache.forceCleanup();
|
|
632
|
+
return ok(result);
|
|
633
|
+
}
|
|
634
|
+
case 'forceGC': {
|
|
635
|
+
const gcResult = await globalAdvancedMemoryMonitor.performIntelligentGC({
|
|
636
|
+
forceFullGC: true,
|
|
637
|
+
});
|
|
638
|
+
return ok(gcResult);
|
|
639
|
+
}
|
|
640
|
+
default:
|
|
641
|
+
throw ErrorPatterns.unknownAction(action, [
|
|
642
|
+
'create',
|
|
643
|
+
'get',
|
|
644
|
+
'set',
|
|
645
|
+
'delete',
|
|
646
|
+
'clear',
|
|
647
|
+
'stats',
|
|
648
|
+
'cleanup',
|
|
649
|
+
'forceGC',
|
|
650
|
+
]);
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
},
|
|
654
|
+
};
|
|
655
|
+
//# sourceMappingURL=memory-aware-cache.js.map
|