@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,718 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
import { freemem, totalmem } from 'node:os';
|
|
3
|
+
import { performance, PerformanceObserver } from 'node:perf_hooks';
|
|
4
|
+
import { scheduler } from 'node:timers/promises';
|
|
5
|
+
import { logDebug, logError, logWarn } from '@repo/shared/logs/client/next';
|
|
6
|
+
import { ErrorPatterns } from './error-handling';
|
|
7
|
+
import { ok, runTool } from './tool-helpers';
|
|
8
|
+
class WeakRefObjectTracker {
|
|
9
|
+
trackedObjects = new Map();
|
|
10
|
+
weakRefs = new Map();
|
|
11
|
+
finalizationRegistry;
|
|
12
|
+
cleanupCallbacks = new Map();
|
|
13
|
+
cleanupInterval = null;
|
|
14
|
+
constructor() {
|
|
15
|
+
this.finalizationRegistry = new FinalizationRegistry((objectId) => {
|
|
16
|
+
this.handleObjectFinalization(objectId);
|
|
17
|
+
});
|
|
18
|
+
this.cleanupInterval = setInterval(() => {
|
|
19
|
+
this.performPeriodicCleanup();
|
|
20
|
+
}, 30000);
|
|
21
|
+
this.cleanupInterval.unref();
|
|
22
|
+
}
|
|
23
|
+
trackObject(obj, type, metadata = {}, cleanupCallback) {
|
|
24
|
+
const id = `${type}-${Date.now()}-${crypto.randomUUID().substring(0, 8)}`;
|
|
25
|
+
const stackTrace = this.captureStackTrace();
|
|
26
|
+
const trackedObj = {
|
|
27
|
+
id,
|
|
28
|
+
type,
|
|
29
|
+
createdAt: Date.now(),
|
|
30
|
+
lastAccessed: Date.now(),
|
|
31
|
+
size: this.estimateObjectSize(obj),
|
|
32
|
+
metadata,
|
|
33
|
+
stackTrace,
|
|
34
|
+
};
|
|
35
|
+
this.trackedObjects.set(id, trackedObj);
|
|
36
|
+
this.weakRefs.set(id, new WeakRef(obj));
|
|
37
|
+
if (cleanupCallback) {
|
|
38
|
+
this.cleanupCallbacks.set(id, cleanupCallback);
|
|
39
|
+
}
|
|
40
|
+
this.finalizationRegistry.register(obj, id, obj);
|
|
41
|
+
return id;
|
|
42
|
+
}
|
|
43
|
+
touchObject(id) {
|
|
44
|
+
const tracked = this.trackedObjects.get(id);
|
|
45
|
+
if (tracked) {
|
|
46
|
+
tracked.lastAccessed = Date.now();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
detectLeakedObjects(ageThresholdMs = 300000) {
|
|
50
|
+
const now = Date.now();
|
|
51
|
+
const leaks = [];
|
|
52
|
+
for (const [id, tracked] of this.trackedObjects.entries()) {
|
|
53
|
+
const age = now - tracked.createdAt;
|
|
54
|
+
const timeSinceAccess = now - tracked.lastAccessed;
|
|
55
|
+
const weakRef = this.weakRefs.get(id);
|
|
56
|
+
const isAlive = weakRef?.deref() !== undefined;
|
|
57
|
+
if (isAlive && age > ageThresholdMs && timeSinceAccess > ageThresholdMs) {
|
|
58
|
+
const severity = this.calculateLeakSeverity(tracked, age, timeSinceAccess);
|
|
59
|
+
leaks.push({
|
|
60
|
+
leakId: id,
|
|
61
|
+
objectType: tracked.type,
|
|
62
|
+
creationTime: tracked.createdAt,
|
|
63
|
+
suspectedLeakTime: tracked.lastAccessed,
|
|
64
|
+
estimatedSize: tracked.size,
|
|
65
|
+
suspectedCause: this.determineSuspectedCause(tracked, age, timeSinceAccess),
|
|
66
|
+
stackTrace: tracked.stackTrace,
|
|
67
|
+
severity,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return leaks;
|
|
72
|
+
}
|
|
73
|
+
forceCleanup(id) {
|
|
74
|
+
const cleanup = this.cleanupCallbacks.get(id);
|
|
75
|
+
if (cleanup) {
|
|
76
|
+
try {
|
|
77
|
+
cleanup();
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
logWarn(`Cleanup callback failed for ${id}`, { error, id });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const removed = this.trackedObjects.delete(id) &&
|
|
84
|
+
this.weakRefs.delete(id) &&
|
|
85
|
+
this.cleanupCallbacks.delete(id);
|
|
86
|
+
return removed;
|
|
87
|
+
}
|
|
88
|
+
handleObjectFinalization(objectId) {
|
|
89
|
+
this.forceCleanup(objectId);
|
|
90
|
+
}
|
|
91
|
+
performPeriodicCleanup() {
|
|
92
|
+
for (const [id, weakRef] of this.weakRefs.entries()) {
|
|
93
|
+
if (weakRef.deref() === undefined) {
|
|
94
|
+
this.forceCleanup(id);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
captureStackTrace() {
|
|
99
|
+
const error = new Error();
|
|
100
|
+
return error.stack?.split('\n').slice(2, 10).join('\n') ?? 'No stack trace available';
|
|
101
|
+
}
|
|
102
|
+
estimateObjectSize(obj) {
|
|
103
|
+
try {
|
|
104
|
+
const jsonStr = JSON.stringify(obj);
|
|
105
|
+
return jsonStr.length * 2;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
calculateLeakSeverity(tracked, age, timeSinceAccess) {
|
|
112
|
+
const sizeScore = tracked.size > 1000000 ? 3 : tracked.size > 100000 ? 2 : 1;
|
|
113
|
+
const ageScore = age > 1800000 ? 3 : age > 900000 ? 2 : 1;
|
|
114
|
+
const accessScore = timeSinceAccess > 1200000 ? 3 : timeSinceAccess > 600000 ? 2 : 1;
|
|
115
|
+
const totalScore = sizeScore + ageScore + accessScore;
|
|
116
|
+
if (totalScore >= 8)
|
|
117
|
+
return 'critical';
|
|
118
|
+
if (totalScore >= 6)
|
|
119
|
+
return 'high';
|
|
120
|
+
if (totalScore >= 4)
|
|
121
|
+
return 'medium';
|
|
122
|
+
return 'low';
|
|
123
|
+
}
|
|
124
|
+
determineSuspectedCause(tracked, age, timeSinceAccess) {
|
|
125
|
+
if (timeSinceAccess > age * 0.8) {
|
|
126
|
+
return 'Object created but never accessed - possible unused allocation';
|
|
127
|
+
}
|
|
128
|
+
if (tracked.type.includes('cache') || tracked.type.includes('Cache')) {
|
|
129
|
+
return 'Cache entry not properly evicted';
|
|
130
|
+
}
|
|
131
|
+
if (tracked.type.includes('event') || tracked.type.includes('Event')) {
|
|
132
|
+
return 'Event listener or handler not properly cleaned up';
|
|
133
|
+
}
|
|
134
|
+
if (tracked.type.includes('stream') || tracked.type.includes('Stream')) {
|
|
135
|
+
return 'Stream not properly closed or destroyed';
|
|
136
|
+
}
|
|
137
|
+
return 'Long-lived object with infrequent access - potential memory leak';
|
|
138
|
+
}
|
|
139
|
+
dispose() {
|
|
140
|
+
if (this.cleanupInterval) {
|
|
141
|
+
clearInterval(this.cleanupInterval);
|
|
142
|
+
this.cleanupInterval = null;
|
|
143
|
+
}
|
|
144
|
+
this.trackedObjects.clear();
|
|
145
|
+
this.weakRefs.clear();
|
|
146
|
+
this.cleanupCallbacks.clear();
|
|
147
|
+
}
|
|
148
|
+
getStats() {
|
|
149
|
+
let aliveCount = 0;
|
|
150
|
+
let deadCount = 0;
|
|
151
|
+
let oldestTime = null;
|
|
152
|
+
let largestSize = 0;
|
|
153
|
+
const typeDistribution = {};
|
|
154
|
+
for (const [id, tracked] of this.trackedObjects.entries()) {
|
|
155
|
+
const weakRef = this.weakRefs.get(id);
|
|
156
|
+
const isAlive = weakRef?.deref() !== undefined;
|
|
157
|
+
if (isAlive) {
|
|
158
|
+
aliveCount++;
|
|
159
|
+
if (oldestTime === null || tracked.createdAt < oldestTime) {
|
|
160
|
+
oldestTime = tracked.createdAt;
|
|
161
|
+
}
|
|
162
|
+
if (tracked.size > largestSize) {
|
|
163
|
+
largestSize = tracked.size;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
deadCount++;
|
|
168
|
+
}
|
|
169
|
+
typeDistribution[tracked.type] = (typeDistribution[tracked.type] || 0) + 1;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
totalTracked: this.trackedObjects.size,
|
|
173
|
+
aliveObjects: aliveCount,
|
|
174
|
+
deadReferences: deadCount,
|
|
175
|
+
oldestObject: oldestTime,
|
|
176
|
+
largestObject: largestSize,
|
|
177
|
+
typeDistribution,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export class AdvancedMemoryMonitor {
|
|
182
|
+
objectTracker = new WeakRefObjectTracker();
|
|
183
|
+
gcObserver = null;
|
|
184
|
+
gcMetrics = [];
|
|
185
|
+
memorySnapshots = [];
|
|
186
|
+
v8Stats = null;
|
|
187
|
+
heapProfiler = null;
|
|
188
|
+
monitoringInterval = null;
|
|
189
|
+
isMonitoring = false;
|
|
190
|
+
memoryMeasurement = null;
|
|
191
|
+
asyncLocalStorage = new AsyncLocalStorage();
|
|
192
|
+
constructor() {
|
|
193
|
+
void this.initializeV8Features();
|
|
194
|
+
this.setupGCObserver();
|
|
195
|
+
}
|
|
196
|
+
async initializeV8Features() {
|
|
197
|
+
try {
|
|
198
|
+
const v8 = await import('node:v8');
|
|
199
|
+
this.v8Stats = v8;
|
|
200
|
+
if (typeof v8.writeHeapSnapshot === 'function') {
|
|
201
|
+
this.heapProfiler = v8;
|
|
202
|
+
}
|
|
203
|
+
try {
|
|
204
|
+
if (typeof performance.measureUserAgentSpecificMemory === 'function') {
|
|
205
|
+
this.memoryMeasurement = performance;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
logDebug('V8 advanced features not available', { error });
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
setupGCObserver() {
|
|
216
|
+
try {
|
|
217
|
+
this.gcObserver = new PerformanceObserver(list => {
|
|
218
|
+
for (const entry of list.getEntries()) {
|
|
219
|
+
if (entry.entryType === 'gc') {
|
|
220
|
+
this.recordGCMetrics(entry);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
this.gcObserver.observe({ entryTypes: ['gc'] });
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
logDebug('GC observation not available', { error });
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
recordGCMetrics(entry) {
|
|
231
|
+
const beforeUsage = entry.detail?.before || process.memoryUsage();
|
|
232
|
+
const afterUsage = process.memoryUsage();
|
|
233
|
+
const gcMetric = {
|
|
234
|
+
gcType: entry.detail?.kind ?? 'unknown',
|
|
235
|
+
duration: entry.duration,
|
|
236
|
+
heapBefore: beforeUsage.heapUsed,
|
|
237
|
+
heapAfter: afterUsage.heapUsed,
|
|
238
|
+
memoryFreed: beforeUsage.heapUsed - afterUsage.heapUsed,
|
|
239
|
+
efficiency: beforeUsage.heapUsed > 0
|
|
240
|
+
? ((beforeUsage.heapUsed - afterUsage.heapUsed) / beforeUsage.heapUsed) * 100
|
|
241
|
+
: 0,
|
|
242
|
+
timestamp: Date.now(),
|
|
243
|
+
};
|
|
244
|
+
this.gcMetrics.push(gcMetric);
|
|
245
|
+
if (this.gcMetrics.length > 100) {
|
|
246
|
+
this.gcMetrics.splice(0, this.gcMetrics.length - 100);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
startMonitoring(intervalMs = 30000) {
|
|
250
|
+
if (this.isMonitoring)
|
|
251
|
+
return;
|
|
252
|
+
this.isMonitoring = true;
|
|
253
|
+
this.monitoringInterval = setInterval(() => {
|
|
254
|
+
this.performMemorySnapshot();
|
|
255
|
+
this.detectMemoryAnomalies();
|
|
256
|
+
}, intervalMs);
|
|
257
|
+
this.monitoringInterval.unref();
|
|
258
|
+
logDebug('Advanced memory monitoring started');
|
|
259
|
+
}
|
|
260
|
+
stopMonitoring() {
|
|
261
|
+
if (this.monitoringInterval) {
|
|
262
|
+
clearInterval(this.monitoringInterval);
|
|
263
|
+
this.monitoringInterval = null;
|
|
264
|
+
}
|
|
265
|
+
this.isMonitoring = false;
|
|
266
|
+
}
|
|
267
|
+
trackObject(obj, type, metadata = {}, cleanupCallback) {
|
|
268
|
+
return this.objectTracker.trackObject(obj, type, metadata, cleanupCallback);
|
|
269
|
+
}
|
|
270
|
+
getMemoryPressure() {
|
|
271
|
+
const usage = process.memoryUsage();
|
|
272
|
+
const systemTotal = totalmem();
|
|
273
|
+
const systemFree = freemem();
|
|
274
|
+
const heapUsage = usage.heapUsed / 1024 / 1024;
|
|
275
|
+
const heapUtilization = (usage.heapUsed / usage.heapTotal) * 100;
|
|
276
|
+
const externalMemory = usage.external / 1024 / 1024;
|
|
277
|
+
const rssMemory = usage.rss / 1024 / 1024;
|
|
278
|
+
const systemMemoryPressure = ((systemTotal - systemFree) / systemTotal) * 100;
|
|
279
|
+
let level = 'optimal';
|
|
280
|
+
let recommendation = 'Memory usage is healthy';
|
|
281
|
+
let actionRequired = false;
|
|
282
|
+
const pressureScore = this.calculatePressureScore(heapUtilization, systemMemoryPressure, heapUsage, externalMemory);
|
|
283
|
+
if (pressureScore >= 90) {
|
|
284
|
+
level = 'emergency';
|
|
285
|
+
recommendation = 'EMERGENCY: Immediate memory cleanup and optimization required';
|
|
286
|
+
actionRequired = true;
|
|
287
|
+
}
|
|
288
|
+
else if (pressureScore >= 80) {
|
|
289
|
+
level = 'critical';
|
|
290
|
+
recommendation = 'Critical memory pressure - immediate action required';
|
|
291
|
+
actionRequired = true;
|
|
292
|
+
}
|
|
293
|
+
else if (pressureScore >= 65) {
|
|
294
|
+
level = 'high';
|
|
295
|
+
recommendation = 'High memory usage - optimization recommended';
|
|
296
|
+
actionRequired = true;
|
|
297
|
+
}
|
|
298
|
+
else if (pressureScore >= 40) {
|
|
299
|
+
level = 'elevated';
|
|
300
|
+
recommendation = 'Elevated memory usage - monitor closely';
|
|
301
|
+
actionRequired = false;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
level,
|
|
305
|
+
heapUsage,
|
|
306
|
+
heapUtilization,
|
|
307
|
+
externalMemory,
|
|
308
|
+
rssMemory,
|
|
309
|
+
systemMemoryPressure,
|
|
310
|
+
recommendation,
|
|
311
|
+
actionRequired,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
calculatePressureScore(heapUtilization, systemPressure, heapUsage, externalMemory) {
|
|
315
|
+
const heapScore = Math.min(heapUtilization * 0.4, 40);
|
|
316
|
+
const systemScore = Math.min(systemPressure * 0.3, 30);
|
|
317
|
+
const sizeScore = Math.min((heapUsage / 500) * 20, 20);
|
|
318
|
+
const externalScore = Math.min((externalMemory / 100) * 10, 10);
|
|
319
|
+
return heapScore + systemScore + sizeScore + externalScore;
|
|
320
|
+
}
|
|
321
|
+
async detectMemoryLeaks(ageThresholdMs = 300000) {
|
|
322
|
+
const leaks = this.objectTracker.detectLeakedObjects(ageThresholdMs);
|
|
323
|
+
if (leaks.length > 0) {
|
|
324
|
+
const heapAnalysis = await this.analyzeHeap();
|
|
325
|
+
for (const leak of leaks) {
|
|
326
|
+
const heapRetainer = heapAnalysis.largestRetainers.find(r => r.type.toLowerCase().includes(leak.objectType.toLowerCase()));
|
|
327
|
+
if (heapRetainer) {
|
|
328
|
+
leak.retentionPath = [
|
|
329
|
+
`Heap retainer: ${heapRetainer.type} (${heapRetainer.count} instances)`,
|
|
330
|
+
];
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return leaks;
|
|
335
|
+
}
|
|
336
|
+
async analyzeHeap() {
|
|
337
|
+
if (!this.v8Stats) {
|
|
338
|
+
return {
|
|
339
|
+
totalObjects: 0,
|
|
340
|
+
leakyObjects: 0,
|
|
341
|
+
cycleDetected: false,
|
|
342
|
+
fragmentationLevel: 0,
|
|
343
|
+
largestRetainers: [],
|
|
344
|
+
recommendations: ['V8 heap analysis not available'],
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
try {
|
|
348
|
+
const heapStats = this.v8Stats.getHeapStatistics();
|
|
349
|
+
const heapSpaceStats = this.v8Stats.getHeapSpaceStatistics();
|
|
350
|
+
const fragmentationLevel = this.calculateFragmentation(heapStats, heapSpaceStats);
|
|
351
|
+
const largestRetainers = this.identifyLargestRetainers(heapSpaceStats);
|
|
352
|
+
const recommendations = [];
|
|
353
|
+
if (fragmentationLevel > 30) {
|
|
354
|
+
recommendations.push('High heap fragmentation detected - consider forced GC');
|
|
355
|
+
}
|
|
356
|
+
if (heapStats.used_heap_size > heapStats.heap_size_limit * 0.8) {
|
|
357
|
+
recommendations.push('Heap usage approaching limit - increase heap size or optimize memory usage');
|
|
358
|
+
}
|
|
359
|
+
const largestRetainer = largestRetainers[0];
|
|
360
|
+
if (largestRetainer && largestRetainer.size > 50 * 1024 * 1024) {
|
|
361
|
+
recommendations.push(`Large memory retainer detected: ${largestRetainer.type} (${Math.round(largestRetainer.size / 1024 / 1024)}MB)`);
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
totalObjects: heapStats.number_of_native_contexts + heapStats.number_of_detached_contexts,
|
|
365
|
+
leakyObjects: 0,
|
|
366
|
+
cycleDetected: false,
|
|
367
|
+
fragmentationLevel,
|
|
368
|
+
largestRetainers,
|
|
369
|
+
recommendations: recommendations.length > 0 ? recommendations : ['Heap analysis looks healthy'],
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
catch (error) {
|
|
373
|
+
return {
|
|
374
|
+
totalObjects: 0,
|
|
375
|
+
leakyObjects: 0,
|
|
376
|
+
cycleDetected: false,
|
|
377
|
+
fragmentationLevel: 0,
|
|
378
|
+
largestRetainers: [],
|
|
379
|
+
recommendations: [
|
|
380
|
+
`Heap analysis failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
381
|
+
],
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
calculateFragmentation(heapStats, _heapSpaceStats) {
|
|
386
|
+
const totalUsed = heapStats.used_heap_size;
|
|
387
|
+
const totalCommitted = heapStats.total_heap_size;
|
|
388
|
+
if (totalCommitted === 0)
|
|
389
|
+
return 0;
|
|
390
|
+
const fragmentation = ((totalCommitted - totalUsed) / totalCommitted) * 100;
|
|
391
|
+
return Math.min(Math.max(fragmentation, 0), 100);
|
|
392
|
+
}
|
|
393
|
+
identifyLargestRetainers(heapSpaceStats) {
|
|
394
|
+
const retainers = heapSpaceStats
|
|
395
|
+
.map(space => ({
|
|
396
|
+
type: space.space_name,
|
|
397
|
+
size: space.space_used_size,
|
|
398
|
+
count: 1,
|
|
399
|
+
}))
|
|
400
|
+
.filter(retainer => retainer.size > 1024 * 1024)
|
|
401
|
+
.sort((a, b) => b.size - a.size)
|
|
402
|
+
.slice(0, 5);
|
|
403
|
+
return retainers;
|
|
404
|
+
}
|
|
405
|
+
performMemorySnapshot() {
|
|
406
|
+
const usage = process.memoryUsage();
|
|
407
|
+
const pressure = this.getMemoryPressure();
|
|
408
|
+
this.memorySnapshots.push({
|
|
409
|
+
timestamp: Date.now(),
|
|
410
|
+
usage,
|
|
411
|
+
pressure,
|
|
412
|
+
});
|
|
413
|
+
if (this.memorySnapshots.length > 100) {
|
|
414
|
+
this.memorySnapshots.splice(0, this.memorySnapshots.length - 100);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
detectMemoryAnomalies() {
|
|
418
|
+
if (this.memorySnapshots.length < 2)
|
|
419
|
+
return;
|
|
420
|
+
const current = this.memorySnapshots[this.memorySnapshots.length - 1];
|
|
421
|
+
const previous = this.memorySnapshots[this.memorySnapshots.length - 2];
|
|
422
|
+
if (!current || !previous)
|
|
423
|
+
return;
|
|
424
|
+
const heapGrowth = current.usage.heapUsed - previous.usage.heapUsed;
|
|
425
|
+
const timeElapsed = current.timestamp - previous.timestamp;
|
|
426
|
+
const growthRate = heapGrowth / timeElapsed;
|
|
427
|
+
if (growthRate > 1000) {
|
|
428
|
+
logWarn(`Rapid memory growth detected: ${Math.round(growthRate)}KB/s`, { growthRate });
|
|
429
|
+
}
|
|
430
|
+
const pressureLevels = ['optimal', 'elevated', 'high', 'critical', 'emergency'];
|
|
431
|
+
const currentLevel = pressureLevels.indexOf(current.pressure.level);
|
|
432
|
+
const previousLevel = pressureLevels.indexOf(previous.pressure.level);
|
|
433
|
+
if (currentLevel > previousLevel + 1) {
|
|
434
|
+
logWarn(`Memory pressure escalation detected: ${previous.pressure.level} → ${current.pressure.level}`, { previousLevel: previous.pressure.level, currentLevel: current.pressure.level });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
async performIntelligentGC(options = {}) {
|
|
438
|
+
const { forceFullGC = false, waitForCompletion = true, maxWaitMs = 5000 } = options;
|
|
439
|
+
const beforeUsage = process.memoryUsage();
|
|
440
|
+
const startTime = performance.now();
|
|
441
|
+
let gcPerformed = false;
|
|
442
|
+
let error;
|
|
443
|
+
try {
|
|
444
|
+
if (global.gc) {
|
|
445
|
+
const passes = forceFullGC ? 3 : 1;
|
|
446
|
+
for (let i = 0; i < passes; i++) {
|
|
447
|
+
global.gc();
|
|
448
|
+
gcPerformed = true;
|
|
449
|
+
if (waitForCompletion && i < passes - 1) {
|
|
450
|
+
await scheduler.wait(Math.min(500, maxWaitMs / passes));
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
if (waitForCompletion) {
|
|
454
|
+
await scheduler.wait(100);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
error = 'Garbage collection not available (run with --expose-gc)';
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
catch (err) {
|
|
462
|
+
error = `GC error: ${err instanceof Error ? err.message : 'Unknown error'}`;
|
|
463
|
+
}
|
|
464
|
+
const endTime = performance.now();
|
|
465
|
+
const afterUsage = process.memoryUsage();
|
|
466
|
+
const memoryFreed = beforeUsage.heapUsed - afterUsage.heapUsed;
|
|
467
|
+
const duration = endTime - startTime;
|
|
468
|
+
const efficiency = beforeUsage.heapUsed > 0 ? (memoryFreed / beforeUsage.heapUsed) * 100 : 0;
|
|
469
|
+
return {
|
|
470
|
+
gcPerformed,
|
|
471
|
+
memoryFreed,
|
|
472
|
+
duration,
|
|
473
|
+
efficiency,
|
|
474
|
+
error,
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
getStats() {
|
|
478
|
+
return this.objectTracker.getStats();
|
|
479
|
+
}
|
|
480
|
+
async getMemoryReport() {
|
|
481
|
+
const pressure = this.getMemoryPressure();
|
|
482
|
+
const leaks = await this.detectMemoryLeaks();
|
|
483
|
+
const heapAnalysis = await this.analyzeHeap();
|
|
484
|
+
const tracking = this.objectTracker.getStats();
|
|
485
|
+
const recentGCs = this.gcMetrics.slice(-10);
|
|
486
|
+
const averageEfficiency = recentGCs.length > 0
|
|
487
|
+
? recentGCs.reduce((sum, gc) => sum + gc.efficiency, 0) / recentGCs.length
|
|
488
|
+
: 0;
|
|
489
|
+
const totalMemoryFreed = recentGCs.reduce((sum, gc) => sum + gc.memoryFreed, 0);
|
|
490
|
+
const recommendations = [];
|
|
491
|
+
if (pressure.actionRequired) {
|
|
492
|
+
recommendations.push(pressure.recommendation);
|
|
493
|
+
}
|
|
494
|
+
if (leaks.length > 0) {
|
|
495
|
+
const criticalLeaks = leaks.filter(l => l.severity === 'critical').length;
|
|
496
|
+
if (criticalLeaks > 0) {
|
|
497
|
+
recommendations.push(`${criticalLeaks} critical memory leaks detected - immediate investigation required`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
if (averageEfficiency < 20 && recentGCs.length >= 3) {
|
|
501
|
+
recommendations.push('Low GC efficiency detected - review memory allocation patterns');
|
|
502
|
+
}
|
|
503
|
+
if (tracking.deadReferences > tracking.aliveObjects * 0.5) {
|
|
504
|
+
recommendations.push('Many dead references detected - improve object lifecycle management');
|
|
505
|
+
}
|
|
506
|
+
recommendations.push(...heapAnalysis.recommendations);
|
|
507
|
+
return {
|
|
508
|
+
pressure,
|
|
509
|
+
leaks,
|
|
510
|
+
heapAnalysis,
|
|
511
|
+
gcMetrics: {
|
|
512
|
+
recentGCs,
|
|
513
|
+
averageEfficiency,
|
|
514
|
+
totalMemoryFreed,
|
|
515
|
+
},
|
|
516
|
+
tracking,
|
|
517
|
+
recommendations: Array.from(new Set(recommendations)),
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
async cleanupLeakedObjects(maxAge = 300000) {
|
|
521
|
+
const leaks = await this.detectMemoryLeaks(maxAge);
|
|
522
|
+
const beforeUsage = process.memoryUsage();
|
|
523
|
+
let cleaned = 0;
|
|
524
|
+
let failed = 0;
|
|
525
|
+
for (const leak of leaks) {
|
|
526
|
+
const success = this.objectTracker.forceCleanup(leak.leakId);
|
|
527
|
+
if (success) {
|
|
528
|
+
cleaned++;
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
failed++;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
await this.performIntelligentGC({ forceFullGC: true });
|
|
535
|
+
const afterUsage = process.memoryUsage();
|
|
536
|
+
const memoryFreed = beforeUsage.heapUsed - afterUsage.heapUsed;
|
|
537
|
+
return {
|
|
538
|
+
cleaned,
|
|
539
|
+
failed,
|
|
540
|
+
memoryFreed,
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
async generateHeapSnapshot(filename) {
|
|
544
|
+
if (!this.heapProfiler) {
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
let snapshotFile;
|
|
548
|
+
try {
|
|
549
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
550
|
+
snapshotFile = filename || `heap-snapshot-${timestamp}.heapsnapshot`;
|
|
551
|
+
this.heapProfiler.writeHeapSnapshot(snapshotFile);
|
|
552
|
+
return snapshotFile;
|
|
553
|
+
}
|
|
554
|
+
catch (error) {
|
|
555
|
+
logError('Failed to generate heap snapshot', { error, snapshotFile });
|
|
556
|
+
return null;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
dispose() {
|
|
560
|
+
this.stopMonitoring();
|
|
561
|
+
if (this.gcObserver) {
|
|
562
|
+
this.gcObserver.disconnect();
|
|
563
|
+
this.gcObserver = null;
|
|
564
|
+
}
|
|
565
|
+
this.objectTracker.dispose();
|
|
566
|
+
this.gcMetrics.length = 0;
|
|
567
|
+
this.memorySnapshots.length = 0;
|
|
568
|
+
this.v8Stats = null;
|
|
569
|
+
this.heapProfiler = null;
|
|
570
|
+
this.memoryMeasurement = null;
|
|
571
|
+
logDebug('Advanced memory monitor disposed');
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
export const globalAdvancedMemoryMonitor = new AdvancedMemoryMonitor();
|
|
575
|
+
export const advancedMemoryMonitorTool = {
|
|
576
|
+
name: 'advanced_memory_monitor',
|
|
577
|
+
description: 'Advanced memory leak detection and management with Node.js 22+ optimizations',
|
|
578
|
+
inputSchema: {
|
|
579
|
+
type: 'object',
|
|
580
|
+
properties: {
|
|
581
|
+
action: {
|
|
582
|
+
type: 'string',
|
|
583
|
+
enum: [
|
|
584
|
+
'startMonitoring',
|
|
585
|
+
'stopMonitoring',
|
|
586
|
+
'getMemoryPressure',
|
|
587
|
+
'detectLeaks',
|
|
588
|
+
'analyzeHeap',
|
|
589
|
+
'performGC',
|
|
590
|
+
'generateReport',
|
|
591
|
+
'cleanupLeaks',
|
|
592
|
+
'generateSnapshot',
|
|
593
|
+
'trackObject',
|
|
594
|
+
],
|
|
595
|
+
description: 'Action to perform',
|
|
596
|
+
},
|
|
597
|
+
intervalMs: {
|
|
598
|
+
type: 'number',
|
|
599
|
+
description: 'Monitoring interval in milliseconds (default: 30000)',
|
|
600
|
+
},
|
|
601
|
+
ageThresholdMs: {
|
|
602
|
+
type: 'number',
|
|
603
|
+
description: 'Age threshold for leak detection in milliseconds (default: 300000)',
|
|
604
|
+
},
|
|
605
|
+
forceFullGC: {
|
|
606
|
+
type: 'boolean',
|
|
607
|
+
description: 'Force full garbage collection (default: false)',
|
|
608
|
+
},
|
|
609
|
+
objectType: {
|
|
610
|
+
type: 'string',
|
|
611
|
+
description: 'Type of object to track',
|
|
612
|
+
},
|
|
613
|
+
objectMetadata: {
|
|
614
|
+
type: 'object',
|
|
615
|
+
description: 'Metadata for tracked object',
|
|
616
|
+
},
|
|
617
|
+
filename: {
|
|
618
|
+
type: 'string',
|
|
619
|
+
description: 'Filename for heap snapshot',
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
required: ['action'],
|
|
623
|
+
},
|
|
624
|
+
async execute(args) {
|
|
625
|
+
return runTool('advanced_memory_monitor', args.action, async () => {
|
|
626
|
+
const { action } = args;
|
|
627
|
+
switch (action) {
|
|
628
|
+
case 'startMonitoring': {
|
|
629
|
+
const intervalMs = args.intervalMs ?? 30000;
|
|
630
|
+
globalAdvancedMemoryMonitor.startMonitoring(intervalMs);
|
|
631
|
+
return ok({
|
|
632
|
+
success: true,
|
|
633
|
+
message: `Advanced memory monitoring started with ${intervalMs}ms interval`,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
case 'stopMonitoring': {
|
|
637
|
+
globalAdvancedMemoryMonitor.stopMonitoring();
|
|
638
|
+
return ok({
|
|
639
|
+
success: true,
|
|
640
|
+
message: 'Advanced memory monitoring stopped',
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
case 'getMemoryPressure': {
|
|
644
|
+
const pressure = globalAdvancedMemoryMonitor.getMemoryPressure();
|
|
645
|
+
return ok(pressure);
|
|
646
|
+
}
|
|
647
|
+
case 'detectLeaks': {
|
|
648
|
+
const ageThresholdMs = args.ageThresholdMs ?? 300000;
|
|
649
|
+
const leaks = await globalAdvancedMemoryMonitor.detectMemoryLeaks(ageThresholdMs);
|
|
650
|
+
return ok({
|
|
651
|
+
totalLeaks: leaks.length,
|
|
652
|
+
criticalLeaks: leaks.filter(l => l.severity === 'critical').length,
|
|
653
|
+
highSeverityLeaks: leaks.filter(l => l.severity === 'high').length,
|
|
654
|
+
leaks,
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
case 'analyzeHeap': {
|
|
658
|
+
const analysis = await globalAdvancedMemoryMonitor.analyzeHeap();
|
|
659
|
+
return ok(analysis);
|
|
660
|
+
}
|
|
661
|
+
case 'performGC': {
|
|
662
|
+
const forceFullGC = args.forceFullGC ?? false;
|
|
663
|
+
const result = await globalAdvancedMemoryMonitor.performIntelligentGC({
|
|
664
|
+
forceFullGC,
|
|
665
|
+
waitForCompletion: true,
|
|
666
|
+
});
|
|
667
|
+
return ok(result);
|
|
668
|
+
}
|
|
669
|
+
case 'generateReport': {
|
|
670
|
+
const report = await globalAdvancedMemoryMonitor.getMemoryReport();
|
|
671
|
+
return ok(report);
|
|
672
|
+
}
|
|
673
|
+
case 'cleanupLeaks': {
|
|
674
|
+
const ageThresholdMs = args.ageThresholdMs ?? 300000;
|
|
675
|
+
const result = await globalAdvancedMemoryMonitor.cleanupLeakedObjects(ageThresholdMs);
|
|
676
|
+
return ok(result);
|
|
677
|
+
}
|
|
678
|
+
case 'generateSnapshot': {
|
|
679
|
+
const { filename } = args;
|
|
680
|
+
const snapshotPath = await globalAdvancedMemoryMonitor.generateHeapSnapshot(filename);
|
|
681
|
+
return ok({
|
|
682
|
+
success: snapshotPath !== null,
|
|
683
|
+
filename: snapshotPath,
|
|
684
|
+
message: snapshotPath
|
|
685
|
+
? `Heap snapshot generated: ${snapshotPath}`
|
|
686
|
+
: 'Failed to generate heap snapshot - V8 profiler not available',
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
case 'trackObject': {
|
|
690
|
+
if (!args.objectType) {
|
|
691
|
+
throw new Error('objectType is required for trackObject action');
|
|
692
|
+
}
|
|
693
|
+
const trackingId = globalAdvancedMemoryMonitor.trackObject({ type: args.objectType, timestamp: Date.now() }, args.objectType, args.objectMetadata ?? {});
|
|
694
|
+
return ok({
|
|
695
|
+
success: true,
|
|
696
|
+
trackingId,
|
|
697
|
+
objectType: args.objectType,
|
|
698
|
+
message: `Object tracking started with ID: ${trackingId}`,
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
default:
|
|
702
|
+
throw ErrorPatterns.unknownAction(action, [
|
|
703
|
+
'startMonitoring',
|
|
704
|
+
'stopMonitoring',
|
|
705
|
+
'getMemoryPressure',
|
|
706
|
+
'detectLeaks',
|
|
707
|
+
'analyzeHeap',
|
|
708
|
+
'performGC',
|
|
709
|
+
'generateReport',
|
|
710
|
+
'cleanupLeaks',
|
|
711
|
+
'generateSnapshot',
|
|
712
|
+
'trackObject',
|
|
713
|
+
]);
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
},
|
|
717
|
+
};
|
|
718
|
+
//# sourceMappingURL=advanced-memory-monitor.js.map
|