@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,839 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
import { EventEmitter } from 'node:events';
|
|
3
|
+
import { logDebug, logError } from '@repo/shared/logs';
|
|
4
|
+
import { globalAdvancedMemoryMonitor } from './advanced-memory-monitor';
|
|
5
|
+
import { ErrorPatterns } from './error-handling';
|
|
6
|
+
export class ResourceLifecycleManager extends EventEmitter {
|
|
7
|
+
resources = new Map();
|
|
8
|
+
cleanupCallbacks = new Map();
|
|
9
|
+
weakRefs = new Map();
|
|
10
|
+
finalizationRegistry;
|
|
11
|
+
hooks = {};
|
|
12
|
+
cleanupStrategies = [];
|
|
13
|
+
leakPatterns = [];
|
|
14
|
+
asyncLocalStorage = new AsyncLocalStorage();
|
|
15
|
+
monitoringInterval = null;
|
|
16
|
+
isMonitoring = false;
|
|
17
|
+
lastCleanupCheck = 0;
|
|
18
|
+
cleanupCheckInterval = 60000;
|
|
19
|
+
stats = {
|
|
20
|
+
totalCreated: 0,
|
|
21
|
+
totalCleaned: 0,
|
|
22
|
+
totalLeaks: 0,
|
|
23
|
+
cleanupFailures: 0,
|
|
24
|
+
averageLifetime: 0,
|
|
25
|
+
};
|
|
26
|
+
constructor(options = {}) {
|
|
27
|
+
super();
|
|
28
|
+
this.hooks = options.hooks ?? {};
|
|
29
|
+
this.cleanupCheckInterval = options.cleanupInterval ?? 60000;
|
|
30
|
+
this.finalizationRegistry = new FinalizationRegistry((resourceId) => {
|
|
31
|
+
this.handleResourceFinalization(resourceId);
|
|
32
|
+
});
|
|
33
|
+
this.initializeDefaultStrategies();
|
|
34
|
+
this.initializeLeakPatterns();
|
|
35
|
+
if (options.enableMonitoring !== false) {
|
|
36
|
+
this.startMonitoring();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
initializeDefaultStrategies() {
|
|
40
|
+
this.addCleanupStrategy({
|
|
41
|
+
name: 'age-based',
|
|
42
|
+
description: 'Clean up resources older than threshold',
|
|
43
|
+
condition: resource => {
|
|
44
|
+
const age = Date.now() - resource.createdAt;
|
|
45
|
+
const maxAge = this.getMaxAgeForPriority(resource.priority);
|
|
46
|
+
return age > maxAge;
|
|
47
|
+
},
|
|
48
|
+
priority: 3,
|
|
49
|
+
action: async (resource) => {
|
|
50
|
+
logDebug(`Age-based cleanup for resource ${resource.id}`, {
|
|
51
|
+
resourceId: resource.id,
|
|
52
|
+
resourceType: resource.type,
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
this.addCleanupStrategy({
|
|
57
|
+
name: 'inactivity-based',
|
|
58
|
+
description: 'Clean up inactive resources',
|
|
59
|
+
condition: resource => {
|
|
60
|
+
const inactivity = Date.now() - resource.lastUsed;
|
|
61
|
+
const maxInactivity = this.getMaxInactivityForPriority(resource.priority);
|
|
62
|
+
return inactivity > maxInactivity;
|
|
63
|
+
},
|
|
64
|
+
priority: 2,
|
|
65
|
+
action: async (resource) => {
|
|
66
|
+
logDebug(`Inactivity-based cleanup for resource ${resource.id}`, {
|
|
67
|
+
resourceId: resource.id,
|
|
68
|
+
resourceType: resource.type,
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
this.addCleanupStrategy({
|
|
73
|
+
name: 'memory-pressure',
|
|
74
|
+
description: 'Clean up resources during high memory pressure',
|
|
75
|
+
condition: resource => {
|
|
76
|
+
const pressure = globalAdvancedMemoryMonitor.getMemoryPressure();
|
|
77
|
+
if (pressure.level === 'critical' || pressure.level === 'emergency') {
|
|
78
|
+
return resource.priority !== 'critical';
|
|
79
|
+
}
|
|
80
|
+
if (pressure.level === 'high') {
|
|
81
|
+
return resource.priority === 'low';
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
},
|
|
85
|
+
priority: 1,
|
|
86
|
+
action: async (resource) => {
|
|
87
|
+
logDebug(`Memory pressure cleanup for resource ${resource.id}`, {
|
|
88
|
+
resourceId: resource.id,
|
|
89
|
+
resourceType: resource.type,
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
this.addCleanupStrategy({
|
|
94
|
+
name: 'orphaned-dependencies',
|
|
95
|
+
description: 'Clean up resources with no active dependencies',
|
|
96
|
+
condition: resource => {
|
|
97
|
+
if (resource.dependencies.length === 0)
|
|
98
|
+
return false;
|
|
99
|
+
return resource.dependencies.every(depId => !this.resources.has(depId));
|
|
100
|
+
},
|
|
101
|
+
priority: 4,
|
|
102
|
+
action: async (resource) => {
|
|
103
|
+
logDebug(`Orphaned dependency cleanup for resource ${resource.id}`, {
|
|
104
|
+
resourceId: resource.id,
|
|
105
|
+
resourceType: resource.type,
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
initializeLeakPatterns() {
|
|
111
|
+
this.leakPatterns.push({
|
|
112
|
+
pattern: 'long-lived-inactive',
|
|
113
|
+
description: "Resources that are old and haven't been used recently",
|
|
114
|
+
severity: 'medium',
|
|
115
|
+
detectionLogic: (resources) => {
|
|
116
|
+
return resources.some(r => {
|
|
117
|
+
const age = Date.now() - r.createdAt;
|
|
118
|
+
const inactivity = Date.now() - r.lastUsed;
|
|
119
|
+
return age > 3600000 && inactivity > 1800000;
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
recommendedAction: 'Review resource usage patterns and implement proper cleanup',
|
|
123
|
+
});
|
|
124
|
+
const detectCircularDeps = resources => {
|
|
125
|
+
return this.detectCircularDependencies(resources);
|
|
126
|
+
};
|
|
127
|
+
this.leakPatterns.push({
|
|
128
|
+
pattern: 'circular-dependencies',
|
|
129
|
+
description: 'Resources with circular dependency chains',
|
|
130
|
+
severity: 'high',
|
|
131
|
+
detectionLogic: detectCircularDeps,
|
|
132
|
+
recommendedAction: 'Break circular dependencies or implement WeakRef patterns',
|
|
133
|
+
});
|
|
134
|
+
this.leakPatterns.push({
|
|
135
|
+
pattern: 'exponential-growth',
|
|
136
|
+
description: 'Rapid increase in resource count of same type',
|
|
137
|
+
severity: 'critical',
|
|
138
|
+
detectionLogic: (resources) => {
|
|
139
|
+
const typeGroups = this.groupResourcesByType(resources);
|
|
140
|
+
return Object.values(typeGroups).some(group => group.length > 100);
|
|
141
|
+
},
|
|
142
|
+
recommendedAction: 'Implement resource pooling or stricter cleanup policies',
|
|
143
|
+
});
|
|
144
|
+
this.leakPatterns.push({
|
|
145
|
+
pattern: 'memory-heavy-accumulation',
|
|
146
|
+
description: 'Accumulation of large resources',
|
|
147
|
+
severity: 'high',
|
|
148
|
+
detectionLogic: (resources) => {
|
|
149
|
+
const totalSize = resources.reduce((sum, r) => sum + r.size, 0);
|
|
150
|
+
const largeResources = resources.filter(r => r.size > 10 * 1024 * 1024);
|
|
151
|
+
return largeResources.length > 5 || totalSize > 100 * 1024 * 1024;
|
|
152
|
+
},
|
|
153
|
+
recommendedAction: 'Implement streaming or pagination for large data resources',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
registerResource(object, metadata, cleanupCallbacks) {
|
|
157
|
+
const id = `${metadata.type}-${Date.now()}-${crypto.randomUUID().substring(0, 8)}`;
|
|
158
|
+
const resource = {
|
|
159
|
+
...metadata,
|
|
160
|
+
id,
|
|
161
|
+
createdAt: Date.now(),
|
|
162
|
+
lastUsed: Date.now(),
|
|
163
|
+
dependents: [],
|
|
164
|
+
};
|
|
165
|
+
this.resources.set(id, resource);
|
|
166
|
+
if (cleanupCallbacks && cleanupCallbacks.length > 0) {
|
|
167
|
+
this.cleanupCallbacks.set(id, cleanupCallbacks);
|
|
168
|
+
}
|
|
169
|
+
this.weakRefs.set(id, new WeakRef(object));
|
|
170
|
+
this.finalizationRegistry.register(object, id, object);
|
|
171
|
+
globalAdvancedMemoryMonitor.trackObject(object, `lifecycle-${metadata.type}`, {
|
|
172
|
+
resourceId: id,
|
|
173
|
+
resourceType: metadata.type,
|
|
174
|
+
resourceName: metadata.name,
|
|
175
|
+
});
|
|
176
|
+
for (const depId of resource.dependencies) {
|
|
177
|
+
const dep = this.resources.get(depId);
|
|
178
|
+
if (dep) {
|
|
179
|
+
dep.dependents.push(id);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
this.stats.totalCreated++;
|
|
183
|
+
if (this.hooks.onResourceCreated) {
|
|
184
|
+
this.hooks.onResourceCreated(resource);
|
|
185
|
+
}
|
|
186
|
+
this.emit('resourceCreated', resource);
|
|
187
|
+
return id;
|
|
188
|
+
}
|
|
189
|
+
touchResource(resourceId) {
|
|
190
|
+
const resource = this.resources.get(resourceId);
|
|
191
|
+
if (!resource)
|
|
192
|
+
return false;
|
|
193
|
+
resource.lastUsed = Date.now();
|
|
194
|
+
if (this.hooks.onResourceAccessed) {
|
|
195
|
+
this.hooks.onResourceAccessed(resource);
|
|
196
|
+
}
|
|
197
|
+
this.emit('resourceAccessed', resource);
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
updateResource(resourceId, changes) {
|
|
201
|
+
const resource = this.resources.get(resourceId);
|
|
202
|
+
if (!resource)
|
|
203
|
+
return false;
|
|
204
|
+
const immutableFields = ['id', 'createdAt'];
|
|
205
|
+
const allowedChanges = Object.fromEntries(Object.entries(changes).filter(([key]) => !immutableFields.includes(key)));
|
|
206
|
+
Object.assign(resource, allowedChanges);
|
|
207
|
+
if (this.hooks.onResourceUpdated) {
|
|
208
|
+
this.hooks.onResourceUpdated(resource, allowedChanges);
|
|
209
|
+
}
|
|
210
|
+
this.emit('resourceUpdated', resource, allowedChanges);
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
getResource(resourceId) {
|
|
214
|
+
return this.resources.get(resourceId);
|
|
215
|
+
}
|
|
216
|
+
getResourcesByType(type) {
|
|
217
|
+
return Array.from(this.resources.values()).filter(r => r.type === type);
|
|
218
|
+
}
|
|
219
|
+
getResourcesByTags(tags) {
|
|
220
|
+
return Array.from(this.resources.values()).filter(resource => tags.some(tag => resource.tags.includes(tag)));
|
|
221
|
+
}
|
|
222
|
+
startMonitoring() {
|
|
223
|
+
if (this.isMonitoring)
|
|
224
|
+
return;
|
|
225
|
+
this.isMonitoring = true;
|
|
226
|
+
this.monitoringInterval = setInterval(() => {
|
|
227
|
+
void this.performMonitoringCycle().catch(error => {
|
|
228
|
+
logError('[ResourceLifecycleManager] Monitoring cycle error', { error });
|
|
229
|
+
});
|
|
230
|
+
}, this.cleanupCheckInterval);
|
|
231
|
+
this.monitoringInterval.unref();
|
|
232
|
+
logDebug('Resource lifecycle monitoring started');
|
|
233
|
+
}
|
|
234
|
+
stopMonitoring() {
|
|
235
|
+
if (!this.isMonitoring)
|
|
236
|
+
return;
|
|
237
|
+
if (this.monitoringInterval) {
|
|
238
|
+
clearInterval(this.monitoringInterval);
|
|
239
|
+
this.monitoringInterval = null;
|
|
240
|
+
}
|
|
241
|
+
this.isMonitoring = false;
|
|
242
|
+
logDebug('Resource lifecycle monitoring stopped');
|
|
243
|
+
}
|
|
244
|
+
async performMonitoringCycle() {
|
|
245
|
+
const now = Date.now();
|
|
246
|
+
if (now - this.lastCleanupCheck < this.cleanupCheckInterval * 0.5) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
this.lastCleanupCheck = now;
|
|
250
|
+
try {
|
|
251
|
+
await this.cleanupDeadReferences();
|
|
252
|
+
await this.detectLeaks();
|
|
253
|
+
await this.applyCleanupStrategies();
|
|
254
|
+
this.updateStatistics();
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
logError('Error in resource monitoring cycle', { error });
|
|
258
|
+
this.emit('monitoringError', error);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
async cleanupDeadReferences() {
|
|
262
|
+
let cleaned = 0;
|
|
263
|
+
for (const [resourceId, weakRef] of this.weakRefs.entries()) {
|
|
264
|
+
if (weakRef.deref() === undefined) {
|
|
265
|
+
await this.cleanupResource(resourceId, 'garbage-collected');
|
|
266
|
+
cleaned++;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (cleaned > 0) {
|
|
270
|
+
logDebug(`Cleaned up ${cleaned} dead resource references`, { cleanedCount: cleaned });
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
async detectLeaks() {
|
|
274
|
+
const resources = Array.from(this.resources.values());
|
|
275
|
+
const detectedLeaks = [];
|
|
276
|
+
for (const pattern of this.leakPatterns) {
|
|
277
|
+
if (pattern.detectionLogic(resources)) {
|
|
278
|
+
const matchingResources = this.findResourcesMatchingPattern(pattern, resources);
|
|
279
|
+
for (const resource of matchingResources) {
|
|
280
|
+
const leak = {
|
|
281
|
+
resourceId: resource.id,
|
|
282
|
+
pattern: pattern.pattern,
|
|
283
|
+
severity: pattern.severity,
|
|
284
|
+
description: pattern.description,
|
|
285
|
+
detectedAt: Date.now(),
|
|
286
|
+
ageMs: Date.now() - resource.createdAt,
|
|
287
|
+
inactivityMs: Date.now() - resource.lastUsed,
|
|
288
|
+
suspectedCause: this.determineSuspectedCause(resource),
|
|
289
|
+
recommendedAction: pattern.recommendedAction,
|
|
290
|
+
};
|
|
291
|
+
detectedLeaks.push(leak);
|
|
292
|
+
if (this.hooks.onLeakDetected) {
|
|
293
|
+
void this.hooks.onLeakDetected(leak);
|
|
294
|
+
}
|
|
295
|
+
this.emit('leakDetected', leak);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
this.stats.totalLeaks += detectedLeaks.length;
|
|
300
|
+
}
|
|
301
|
+
findResourcesMatchingPattern(pattern, resources) {
|
|
302
|
+
const now = Date.now();
|
|
303
|
+
switch (pattern.pattern) {
|
|
304
|
+
case 'long-lived-inactive':
|
|
305
|
+
return resources.filter(r => {
|
|
306
|
+
const age = now - r.createdAt;
|
|
307
|
+
const inactivity = now - r.lastUsed;
|
|
308
|
+
return age > 3600000 && inactivity > 1800000;
|
|
309
|
+
});
|
|
310
|
+
case 'memory-heavy-accumulation':
|
|
311
|
+
return resources.filter(r => r.size > 10 * 1024 * 1024);
|
|
312
|
+
default:
|
|
313
|
+
return [];
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
determineSuspectedCause(resource) {
|
|
317
|
+
const age = Date.now() - resource.createdAt;
|
|
318
|
+
const inactivity = Date.now() - resource.lastUsed;
|
|
319
|
+
if (inactivity > age * 0.9) {
|
|
320
|
+
return 'Resource created but rarely used - possible over-allocation';
|
|
321
|
+
}
|
|
322
|
+
if (resource.dependencies.length > 0) {
|
|
323
|
+
return 'Resource with dependencies not properly cleaned up';
|
|
324
|
+
}
|
|
325
|
+
if (resource.size > 5 * 1024 * 1024) {
|
|
326
|
+
return 'Large resource not released - possible memory leak';
|
|
327
|
+
}
|
|
328
|
+
return 'Long-lived resource without recent activity';
|
|
329
|
+
}
|
|
330
|
+
async applyCleanupStrategies() {
|
|
331
|
+
const resources = Array.from(this.resources.values());
|
|
332
|
+
const sortedStrategies = [...this.cleanupStrategies].sort((a, b) => a.priority - b.priority);
|
|
333
|
+
for (const strategy of sortedStrategies) {
|
|
334
|
+
const candidateResources = resources.filter(strategy.condition);
|
|
335
|
+
for (const resource of candidateResources) {
|
|
336
|
+
try {
|
|
337
|
+
await strategy.action(resource);
|
|
338
|
+
await this.cleanupResource(resource.id, strategy.name);
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
logError(`Cleanup strategy '${strategy.name}' failed for resource ${resource.id}`, {
|
|
342
|
+
error,
|
|
343
|
+
strategyName: strategy.name,
|
|
344
|
+
resourceId: resource.id,
|
|
345
|
+
});
|
|
346
|
+
this.stats.cleanupFailures++;
|
|
347
|
+
if (this.hooks.onCleanupFailed) {
|
|
348
|
+
void this.hooks.onCleanupFailed(resource, error);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
async cleanupResource(resourceId, reason) {
|
|
355
|
+
const resource = this.resources.get(resourceId);
|
|
356
|
+
if (!resource)
|
|
357
|
+
return;
|
|
358
|
+
try {
|
|
359
|
+
const callbacks = this.cleanupCallbacks.get(resourceId);
|
|
360
|
+
if (callbacks) {
|
|
361
|
+
for (const callback of callbacks) {
|
|
362
|
+
await callback(resource);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
for (const dependentId of resource.dependents) {
|
|
366
|
+
await this.cleanupResource(dependentId, `dependency-${reason}`);
|
|
367
|
+
}
|
|
368
|
+
this.resources.delete(resourceId);
|
|
369
|
+
this.cleanupCallbacks.delete(resourceId);
|
|
370
|
+
this.weakRefs.delete(resourceId);
|
|
371
|
+
this.stats.totalCleaned++;
|
|
372
|
+
const lifetime = Date.now() - resource.createdAt;
|
|
373
|
+
const previousAverage = this.stats.averageLifetime;
|
|
374
|
+
const previousCount = this.stats.totalCleaned - 1;
|
|
375
|
+
const numerator = previousAverage * previousCount + lifetime;
|
|
376
|
+
const denominator = this.stats.totalCleaned;
|
|
377
|
+
const newAverage = numerator / denominator;
|
|
378
|
+
this.stats.averageLifetime = newAverage;
|
|
379
|
+
if (this.hooks.onResourceCleaned) {
|
|
380
|
+
void this.hooks.onResourceCleaned(resource);
|
|
381
|
+
}
|
|
382
|
+
this.emit('resourceCleaned', resource, reason);
|
|
383
|
+
logDebug(`Resource ${resourceId} cleaned up`, {
|
|
384
|
+
resourceId,
|
|
385
|
+
resourceType: resource.type,
|
|
386
|
+
reason,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
catch (error) {
|
|
390
|
+
logError(`Failed to cleanup resource ${resourceId}`, { error, resourceId, reason });
|
|
391
|
+
this.stats.cleanupFailures++;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
handleResourceFinalization(resourceId) {
|
|
395
|
+
void this.cleanupResource(resourceId, 'finalization');
|
|
396
|
+
}
|
|
397
|
+
updateStatistics() {
|
|
398
|
+
const activeResources = Array.from(this.resources.values());
|
|
399
|
+
if (activeResources.length > 0) {
|
|
400
|
+
const now = Date.now();
|
|
401
|
+
const totalLifetime = activeResources.reduce((sum, r) => sum + (now - r.createdAt), 0);
|
|
402
|
+
const currentAverageLifetime = totalLifetime / activeResources.length;
|
|
403
|
+
this.stats.averageLifetime = this.stats.averageLifetime * 0.8 + currentAverageLifetime * 0.2;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
detectCircularDependencies(resources) {
|
|
407
|
+
const visited = new Set();
|
|
408
|
+
const recursionStack = new Set();
|
|
409
|
+
const hasCycle = (resourceId) => {
|
|
410
|
+
if (recursionStack.has(resourceId))
|
|
411
|
+
return true;
|
|
412
|
+
if (visited.has(resourceId))
|
|
413
|
+
return false;
|
|
414
|
+
visited.add(resourceId);
|
|
415
|
+
recursionStack.add(resourceId);
|
|
416
|
+
const resource = this.resources.get(resourceId);
|
|
417
|
+
if (resource) {
|
|
418
|
+
for (const depId of resource.dependencies) {
|
|
419
|
+
if (hasCycle(depId))
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
recursionStack.delete(resourceId);
|
|
424
|
+
return false;
|
|
425
|
+
};
|
|
426
|
+
return resources.some(resource => hasCycle(resource.id));
|
|
427
|
+
}
|
|
428
|
+
groupResourcesByType(resources) {
|
|
429
|
+
return resources.reduce((groups, resource) => {
|
|
430
|
+
const { type } = resource;
|
|
431
|
+
if (!groups[type]) {
|
|
432
|
+
groups[type] = [];
|
|
433
|
+
}
|
|
434
|
+
groups[type].push(resource);
|
|
435
|
+
return groups;
|
|
436
|
+
}, {});
|
|
437
|
+
}
|
|
438
|
+
getMaxAgeForPriority(priority) {
|
|
439
|
+
switch (priority) {
|
|
440
|
+
case 'low':
|
|
441
|
+
return 1800000;
|
|
442
|
+
case 'medium':
|
|
443
|
+
return 3600000;
|
|
444
|
+
case 'high':
|
|
445
|
+
return 7200000;
|
|
446
|
+
case 'critical':
|
|
447
|
+
return 86400000;
|
|
448
|
+
default:
|
|
449
|
+
return 3600000;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
getMaxInactivityForPriority(priority) {
|
|
453
|
+
switch (priority) {
|
|
454
|
+
case 'low':
|
|
455
|
+
return 600000;
|
|
456
|
+
case 'medium':
|
|
457
|
+
return 1800000;
|
|
458
|
+
case 'high':
|
|
459
|
+
return 3600000;
|
|
460
|
+
case 'critical':
|
|
461
|
+
return 7200000;
|
|
462
|
+
default:
|
|
463
|
+
return 1800000;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
addCleanupStrategy(strategy) {
|
|
467
|
+
this.cleanupStrategies.push(strategy);
|
|
468
|
+
}
|
|
469
|
+
addLeakPattern(pattern) {
|
|
470
|
+
this.leakPatterns.push(pattern);
|
|
471
|
+
}
|
|
472
|
+
async forceCleanup(criteria = {}) {
|
|
473
|
+
const resources = Array.from(this.resources.values());
|
|
474
|
+
const toCleanup = [];
|
|
475
|
+
const now = Date.now();
|
|
476
|
+
for (const resource of resources) {
|
|
477
|
+
let shouldCleanup = true;
|
|
478
|
+
if (criteria.type && resource.type !== criteria.type) {
|
|
479
|
+
shouldCleanup = false;
|
|
480
|
+
}
|
|
481
|
+
if (criteria.tags && !criteria.tags.some(tag => resource.tags.includes(tag))) {
|
|
482
|
+
shouldCleanup = false;
|
|
483
|
+
}
|
|
484
|
+
if (criteria.olderThan && now - resource.createdAt < criteria.olderThan) {
|
|
485
|
+
shouldCleanup = false;
|
|
486
|
+
}
|
|
487
|
+
if (criteria.inactiveLongerThan && now - resource.lastUsed < criteria.inactiveLongerThan) {
|
|
488
|
+
shouldCleanup = false;
|
|
489
|
+
}
|
|
490
|
+
if (criteria.priority && resource.priority !== criteria.priority) {
|
|
491
|
+
shouldCleanup = false;
|
|
492
|
+
}
|
|
493
|
+
if (shouldCleanup) {
|
|
494
|
+
toCleanup.push(resource);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
let cleaned = 0;
|
|
498
|
+
let failed = 0;
|
|
499
|
+
const errors = [];
|
|
500
|
+
for (const resource of toCleanup) {
|
|
501
|
+
try {
|
|
502
|
+
await this.cleanupResource(resource.id, 'forced-cleanup');
|
|
503
|
+
cleaned++;
|
|
504
|
+
}
|
|
505
|
+
catch (error) {
|
|
506
|
+
failed++;
|
|
507
|
+
errors.push(`${resource.id}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return { cleaned, failed, errors };
|
|
511
|
+
}
|
|
512
|
+
getStatistics() {
|
|
513
|
+
const resources = Array.from(this.resources.values());
|
|
514
|
+
const now = Date.now();
|
|
515
|
+
const byType = {};
|
|
516
|
+
const byPriority = {};
|
|
517
|
+
let totalAge = 0;
|
|
518
|
+
let totalInactivity = 0;
|
|
519
|
+
let totalSize = 0;
|
|
520
|
+
for (const resource of resources) {
|
|
521
|
+
byType[resource.type] = (byType[resource.type] || 0) + 1;
|
|
522
|
+
byPriority[resource.priority] = (byPriority[resource.priority] || 0) + 1;
|
|
523
|
+
totalAge += now - resource.createdAt;
|
|
524
|
+
totalInactivity += now - resource.lastUsed;
|
|
525
|
+
totalSize += resource.size;
|
|
526
|
+
}
|
|
527
|
+
const leakPatternMatches = this.leakPatterns.map(pattern => ({
|
|
528
|
+
pattern: pattern.pattern,
|
|
529
|
+
matches: this.findResourcesMatchingPattern(pattern, resources).length,
|
|
530
|
+
}));
|
|
531
|
+
return {
|
|
532
|
+
resources: {
|
|
533
|
+
total: resources.length,
|
|
534
|
+
byType,
|
|
535
|
+
byPriority,
|
|
536
|
+
averageAge: resources.length > 0 ? totalAge / resources.length : 0,
|
|
537
|
+
averageInactivity: resources.length > 0 ? totalInactivity / resources.length : 0,
|
|
538
|
+
totalSize,
|
|
539
|
+
},
|
|
540
|
+
lifecycle: { ...this.stats },
|
|
541
|
+
leakPatterns: leakPatternMatches,
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
async dispose() {
|
|
545
|
+
this.stopMonitoring();
|
|
546
|
+
await this.forceCleanup();
|
|
547
|
+
this.resources.clear();
|
|
548
|
+
this.cleanupCallbacks.clear();
|
|
549
|
+
this.weakRefs.clear();
|
|
550
|
+
this.removeAllListeners();
|
|
551
|
+
logDebug('Resource lifecycle manager disposed');
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
export const globalResourceLifecycleManager = new ResourceLifecycleManager({
|
|
555
|
+
enableMonitoring: true,
|
|
556
|
+
});
|
|
557
|
+
export const resourceLifecycleManagerTool = {
|
|
558
|
+
name: 'resource_lifecycle_manager',
|
|
559
|
+
description: 'Advanced resource lifecycle management with leak detection and automatic cleanup',
|
|
560
|
+
inputSchema: {
|
|
561
|
+
type: 'object',
|
|
562
|
+
properties: {
|
|
563
|
+
action: {
|
|
564
|
+
type: 'string',
|
|
565
|
+
enum: [
|
|
566
|
+
'register',
|
|
567
|
+
'touch',
|
|
568
|
+
'update',
|
|
569
|
+
'get',
|
|
570
|
+
'getByType',
|
|
571
|
+
'getByTags',
|
|
572
|
+
'startMonitoring',
|
|
573
|
+
'stopMonitoring',
|
|
574
|
+
'forceCleanup',
|
|
575
|
+
'getStatistics',
|
|
576
|
+
],
|
|
577
|
+
description: 'Action to perform',
|
|
578
|
+
},
|
|
579
|
+
resourceId: {
|
|
580
|
+
type: 'string',
|
|
581
|
+
description: 'Resource ID for operations on specific resources',
|
|
582
|
+
},
|
|
583
|
+
objectType: {
|
|
584
|
+
type: 'string',
|
|
585
|
+
description: 'Type of resource being registered',
|
|
586
|
+
},
|
|
587
|
+
resourceName: {
|
|
588
|
+
type: 'string',
|
|
589
|
+
description: 'Name of the resource',
|
|
590
|
+
},
|
|
591
|
+
size: {
|
|
592
|
+
type: 'number',
|
|
593
|
+
description: 'Size of the resource in bytes',
|
|
594
|
+
},
|
|
595
|
+
priority: {
|
|
596
|
+
type: 'string',
|
|
597
|
+
enum: ['low', 'medium', 'high', 'critical'],
|
|
598
|
+
description: 'Priority of the resource',
|
|
599
|
+
},
|
|
600
|
+
tags: {
|
|
601
|
+
type: 'array',
|
|
602
|
+
items: { type: 'string' },
|
|
603
|
+
description: 'Tags for the resource',
|
|
604
|
+
},
|
|
605
|
+
metadata: {
|
|
606
|
+
type: 'object',
|
|
607
|
+
description: 'Additional metadata for the resource',
|
|
608
|
+
},
|
|
609
|
+
dependencies: {
|
|
610
|
+
type: 'array',
|
|
611
|
+
items: { type: 'string' },
|
|
612
|
+
description: 'Resource IDs this resource depends on',
|
|
613
|
+
},
|
|
614
|
+
changes: {
|
|
615
|
+
type: 'object',
|
|
616
|
+
description: 'Changes to apply to the resource',
|
|
617
|
+
},
|
|
618
|
+
type: {
|
|
619
|
+
type: 'string',
|
|
620
|
+
description: 'Resource type to query',
|
|
621
|
+
},
|
|
622
|
+
queryTags: {
|
|
623
|
+
type: 'array',
|
|
624
|
+
items: { type: 'string' },
|
|
625
|
+
description: 'Tags to query for',
|
|
626
|
+
},
|
|
627
|
+
cleanupCriteria: {
|
|
628
|
+
type: 'object',
|
|
629
|
+
description: 'Criteria for forced cleanup',
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
required: ['action'],
|
|
633
|
+
},
|
|
634
|
+
async execute(args) {
|
|
635
|
+
try {
|
|
636
|
+
const { action } = args;
|
|
637
|
+
switch (action) {
|
|
638
|
+
case 'register': {
|
|
639
|
+
if (!args.objectType || !args.resourceName) {
|
|
640
|
+
throw new Error('objectType and resourceName are required for register action');
|
|
641
|
+
}
|
|
642
|
+
const dummyObject = {
|
|
643
|
+
type: args.objectType,
|
|
644
|
+
name: args.resourceName,
|
|
645
|
+
timestamp: Date.now(),
|
|
646
|
+
};
|
|
647
|
+
const resourceId = globalResourceLifecycleManager.registerResource(dummyObject, {
|
|
648
|
+
type: args.objectType,
|
|
649
|
+
name: args.resourceName,
|
|
650
|
+
size: args.size ?? 0,
|
|
651
|
+
priority: args.priority ?? 'medium',
|
|
652
|
+
tags: args.tags ?? [],
|
|
653
|
+
metadata: args.metadata ?? {},
|
|
654
|
+
dependencies: args.dependencies ?? [],
|
|
655
|
+
});
|
|
656
|
+
return {
|
|
657
|
+
content: [
|
|
658
|
+
{
|
|
659
|
+
type: 'text',
|
|
660
|
+
text: JSON.stringify({
|
|
661
|
+
success: true,
|
|
662
|
+
resourceId,
|
|
663
|
+
message: `Resource registered: ${args.resourceName} (${args.objectType})`,
|
|
664
|
+
}),
|
|
665
|
+
},
|
|
666
|
+
],
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
case 'touch': {
|
|
670
|
+
if (!args.resourceId) {
|
|
671
|
+
throw new Error('resourceId is required for touch action');
|
|
672
|
+
}
|
|
673
|
+
const touched = globalResourceLifecycleManager.touchResource(args.resourceId);
|
|
674
|
+
return {
|
|
675
|
+
content: [
|
|
676
|
+
{
|
|
677
|
+
type: 'text',
|
|
678
|
+
text: JSON.stringify({
|
|
679
|
+
success: touched,
|
|
680
|
+
resourceId: args.resourceId,
|
|
681
|
+
message: touched ? 'Resource touched' : 'Resource not found',
|
|
682
|
+
}),
|
|
683
|
+
},
|
|
684
|
+
],
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
case 'update': {
|
|
688
|
+
if (!args.resourceId || !args.changes) {
|
|
689
|
+
throw new Error('resourceId and changes are required for update action');
|
|
690
|
+
}
|
|
691
|
+
const updated = globalResourceLifecycleManager.updateResource(args.resourceId, args.changes);
|
|
692
|
+
return {
|
|
693
|
+
content: [
|
|
694
|
+
{
|
|
695
|
+
type: 'text',
|
|
696
|
+
text: JSON.stringify({
|
|
697
|
+
success: updated,
|
|
698
|
+
resourceId: args.resourceId,
|
|
699
|
+
changes: args.changes,
|
|
700
|
+
message: updated ? 'Resource updated' : 'Resource not found',
|
|
701
|
+
}),
|
|
702
|
+
},
|
|
703
|
+
],
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
case 'get': {
|
|
707
|
+
if (!args.resourceId) {
|
|
708
|
+
throw new Error('resourceId is required for get action');
|
|
709
|
+
}
|
|
710
|
+
const resource = globalResourceLifecycleManager.getResource(args.resourceId);
|
|
711
|
+
return {
|
|
712
|
+
content: [
|
|
713
|
+
{
|
|
714
|
+
type: 'text',
|
|
715
|
+
text: JSON.stringify({
|
|
716
|
+
found: resource !== undefined,
|
|
717
|
+
resource,
|
|
718
|
+
}),
|
|
719
|
+
},
|
|
720
|
+
],
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
case 'getByType': {
|
|
724
|
+
if (!args.type) {
|
|
725
|
+
throw new Error('type is required for getByType action');
|
|
726
|
+
}
|
|
727
|
+
const resources = globalResourceLifecycleManager.getResourcesByType(args.type);
|
|
728
|
+
return {
|
|
729
|
+
content: [
|
|
730
|
+
{
|
|
731
|
+
type: 'text',
|
|
732
|
+
text: JSON.stringify({
|
|
733
|
+
type: args.type,
|
|
734
|
+
count: resources.length,
|
|
735
|
+
resources,
|
|
736
|
+
}),
|
|
737
|
+
},
|
|
738
|
+
],
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
case 'getByTags': {
|
|
742
|
+
if (!args.queryTags) {
|
|
743
|
+
throw new Error('queryTags is required for getByTags action');
|
|
744
|
+
}
|
|
745
|
+
const resources = globalResourceLifecycleManager.getResourcesByTags(args.queryTags);
|
|
746
|
+
return {
|
|
747
|
+
content: [
|
|
748
|
+
{
|
|
749
|
+
type: 'text',
|
|
750
|
+
text: JSON.stringify({
|
|
751
|
+
tags: args.queryTags,
|
|
752
|
+
count: resources.length,
|
|
753
|
+
resources,
|
|
754
|
+
}),
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
case 'startMonitoring': {
|
|
760
|
+
globalResourceLifecycleManager.startMonitoring();
|
|
761
|
+
return {
|
|
762
|
+
content: [
|
|
763
|
+
{
|
|
764
|
+
type: 'text',
|
|
765
|
+
text: JSON.stringify({
|
|
766
|
+
success: true,
|
|
767
|
+
message: 'Resource lifecycle monitoring started',
|
|
768
|
+
}),
|
|
769
|
+
},
|
|
770
|
+
],
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
case 'stopMonitoring': {
|
|
774
|
+
globalResourceLifecycleManager.stopMonitoring();
|
|
775
|
+
return {
|
|
776
|
+
content: [
|
|
777
|
+
{
|
|
778
|
+
type: 'text',
|
|
779
|
+
text: JSON.stringify({
|
|
780
|
+
success: true,
|
|
781
|
+
message: 'Resource lifecycle monitoring stopped',
|
|
782
|
+
}),
|
|
783
|
+
},
|
|
784
|
+
],
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
case 'forceCleanup': {
|
|
788
|
+
const result = await globalResourceLifecycleManager.forceCleanup(args.cleanupCriteria ?? {});
|
|
789
|
+
return {
|
|
790
|
+
content: [
|
|
791
|
+
{
|
|
792
|
+
type: 'text',
|
|
793
|
+
text: JSON.stringify(result),
|
|
794
|
+
},
|
|
795
|
+
],
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
case 'getStatistics': {
|
|
799
|
+
const statistics = globalResourceLifecycleManager.getStatistics();
|
|
800
|
+
return {
|
|
801
|
+
content: [
|
|
802
|
+
{
|
|
803
|
+
type: 'text',
|
|
804
|
+
text: JSON.stringify(statistics),
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
default:
|
|
810
|
+
throw ErrorPatterns.unknownAction(action, [
|
|
811
|
+
'register',
|
|
812
|
+
'touch',
|
|
813
|
+
'update',
|
|
814
|
+
'get',
|
|
815
|
+
'getByType',
|
|
816
|
+
'getByTags',
|
|
817
|
+
'startMonitoring',
|
|
818
|
+
'stopMonitoring',
|
|
819
|
+
'forceCleanup',
|
|
820
|
+
'getStatistics',
|
|
821
|
+
]);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
catch (error) {
|
|
825
|
+
return {
|
|
826
|
+
content: [
|
|
827
|
+
{
|
|
828
|
+
type: 'text',
|
|
829
|
+
text: JSON.stringify({
|
|
830
|
+
error: `Resource lifecycle manager error: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
831
|
+
}),
|
|
832
|
+
},
|
|
833
|
+
],
|
|
834
|
+
isError: true,
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
};
|
|
839
|
+
//# sourceMappingURL=resource-lifecycle-manager.js.map
|