agentic-qe 3.3.5 → 3.4.0
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/.claude/helpers/statusline-v3.cjs +47 -0
- package/.claude/skills/qcsd-ideation-swarm/SKILL.md +7 -4
- package/README.md +69 -0
- package/package.json +1 -1
- package/v3/CHANGELOG.md +91 -0
- package/v3/README.md +117 -0
- package/v3/assets/skills/qcsd-ideation-swarm/SKILL.md +7 -4
- package/v3/dist/adapters/a2a/agent-cards/generator.d.ts +153 -0
- package/v3/dist/adapters/a2a/agent-cards/generator.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/agent-cards/generator.js +478 -0
- package/v3/dist/adapters/a2a/agent-cards/generator.js.map +1 -0
- package/v3/dist/adapters/a2a/agent-cards/schema.d.ts +274 -0
- package/v3/dist/adapters/a2a/agent-cards/schema.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/agent-cards/schema.js +135 -0
- package/v3/dist/adapters/a2a/agent-cards/schema.js.map +1 -0
- package/v3/dist/adapters/a2a/agent-cards/validator.d.ts +514 -0
- package/v3/dist/adapters/a2a/agent-cards/validator.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/agent-cards/validator.js +555 -0
- package/v3/dist/adapters/a2a/agent-cards/validator.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/index.d.ts +23 -0
- package/v3/dist/adapters/a2a/auth/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/index.js +85 -0
- package/v3/dist/adapters/a2a/auth/index.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts +215 -0
- package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/jwt-utils.js +314 -0
- package/v3/dist/adapters/a2a/auth/jwt-utils.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/middleware.d.ts +173 -0
- package/v3/dist/adapters/a2a/auth/middleware.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/middleware.js +300 -0
- package/v3/dist/adapters/a2a/auth/middleware.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/oauth-provider.d.ts +308 -0
- package/v3/dist/adapters/a2a/auth/oauth-provider.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/oauth-provider.js +573 -0
- package/v3/dist/adapters/a2a/auth/oauth-provider.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/routes.d.ts +244 -0
- package/v3/dist/adapters/a2a/auth/routes.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/routes.js +496 -0
- package/v3/dist/adapters/a2a/auth/routes.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/scopes.d.ts +219 -0
- package/v3/dist/adapters/a2a/auth/scopes.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/scopes.js +292 -0
- package/v3/dist/adapters/a2a/auth/scopes.js.map +1 -0
- package/v3/dist/adapters/a2a/auth/token-store.d.ts +278 -0
- package/v3/dist/adapters/a2a/auth/token-store.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/auth/token-store.js +453 -0
- package/v3/dist/adapters/a2a/auth/token-store.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/agent-health.d.ts +226 -0
- package/v3/dist/adapters/a2a/discovery/agent-health.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/agent-health.js +426 -0
- package/v3/dist/adapters/a2a/discovery/agent-health.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/discovery-service.d.ts +296 -0
- package/v3/dist/adapters/a2a/discovery/discovery-service.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/discovery-service.js +520 -0
- package/v3/dist/adapters/a2a/discovery/discovery-service.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts +166 -0
- package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/file-watcher.js +385 -0
- package/v3/dist/adapters/a2a/discovery/file-watcher.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts +226 -0
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js +433 -0
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/index.d.ts +18 -0
- package/v3/dist/adapters/a2a/discovery/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/index.js +54 -0
- package/v3/dist/adapters/a2a/discovery/index.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/metrics.d.ts +200 -0
- package/v3/dist/adapters/a2a/discovery/metrics.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/metrics.js +371 -0
- package/v3/dist/adapters/a2a/discovery/metrics.js.map +1 -0
- package/v3/dist/adapters/a2a/discovery/routes.d.ts +184 -0
- package/v3/dist/adapters/a2a/discovery/routes.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/discovery/routes.js +453 -0
- package/v3/dist/adapters/a2a/discovery/routes.js.map +1 -0
- package/v3/dist/adapters/a2a/index.d.ts +18 -0
- package/v3/dist/adapters/a2a/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/index.js +139 -0
- package/v3/dist/adapters/a2a/index.js.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts +312 -0
- package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js +554 -0
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/errors.d.ts +244 -0
- package/v3/dist/adapters/a2a/jsonrpc/errors.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/errors.js +365 -0
- package/v3/dist/adapters/a2a/jsonrpc/errors.js.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/index.d.ts +14 -0
- package/v3/dist/adapters/a2a/jsonrpc/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/index.js +59 -0
- package/v3/dist/adapters/a2a/jsonrpc/index.js.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/methods.d.ts +400 -0
- package/v3/dist/adapters/a2a/jsonrpc/methods.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/jsonrpc/methods.js +249 -0
- package/v3/dist/adapters/a2a/jsonrpc/methods.js.map +1 -0
- package/v3/dist/adapters/a2a/notifications/index.d.ts +60 -0
- package/v3/dist/adapters/a2a/notifications/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/notifications/index.js +99 -0
- package/v3/dist/adapters/a2a/notifications/index.js.map +1 -0
- package/v3/dist/adapters/a2a/notifications/retry-queue.d.ts +225 -0
- package/v3/dist/adapters/a2a/notifications/retry-queue.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/notifications/retry-queue.js +449 -0
- package/v3/dist/adapters/a2a/notifications/retry-queue.js.map +1 -0
- package/v3/dist/adapters/a2a/notifications/signature.d.ts +133 -0
- package/v3/dist/adapters/a2a/notifications/signature.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/notifications/signature.js +244 -0
- package/v3/dist/adapters/a2a/notifications/signature.js.map +1 -0
- package/v3/dist/adapters/a2a/notifications/subscription-store.d.ts +243 -0
- package/v3/dist/adapters/a2a/notifications/subscription-store.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/notifications/subscription-store.js +486 -0
- package/v3/dist/adapters/a2a/notifications/subscription-store.js.map +1 -0
- package/v3/dist/adapters/a2a/notifications/webhook-service.d.ts +257 -0
- package/v3/dist/adapters/a2a/notifications/webhook-service.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/notifications/webhook-service.js +542 -0
- package/v3/dist/adapters/a2a/notifications/webhook-service.js.map +1 -0
- package/v3/dist/adapters/a2a/tasks/index.d.ts +16 -0
- package/v3/dist/adapters/a2a/tasks/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/tasks/index.js +33 -0
- package/v3/dist/adapters/a2a/tasks/index.js.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-manager.d.ts +306 -0
- package/v3/dist/adapters/a2a/tasks/task-manager.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-manager.js +562 -0
- package/v3/dist/adapters/a2a/tasks/task-manager.js.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-router.d.ts +270 -0
- package/v3/dist/adapters/a2a/tasks/task-router.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-router.js +574 -0
- package/v3/dist/adapters/a2a/tasks/task-router.js.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-store.d.ts +251 -0
- package/v3/dist/adapters/a2a/tasks/task-store.d.ts.map +1 -0
- package/v3/dist/adapters/a2a/tasks/task-store.js +468 -0
- package/v3/dist/adapters/a2a/tasks/task-store.js.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/aria-attributes.d.ts +294 -0
- package/v3/dist/adapters/a2ui/accessibility/aria-attributes.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/aria-attributes.js +447 -0
- package/v3/dist/adapters/a2ui/accessibility/aria-attributes.js.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/index.d.ts +83 -0
- package/v3/dist/adapters/a2ui/accessibility/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/index.js +155 -0
- package/v3/dist/adapters/a2ui/accessibility/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.d.ts +177 -0
- package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.js +638 -0
- package/v3/dist/adapters/a2ui/accessibility/keyboard-nav.js.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/wcag-validator.d.ts +186 -0
- package/v3/dist/adapters/a2ui/accessibility/wcag-validator.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/accessibility/wcag-validator.js +816 -0
- package/v3/dist/adapters/a2ui/accessibility/wcag-validator.js.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/component-schemas.d.ts +227 -0
- package/v3/dist/adapters/a2ui/catalog/component-schemas.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/component-schemas.js +1090 -0
- package/v3/dist/adapters/a2ui/catalog/component-schemas.js.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/index.d.ts +55 -0
- package/v3/dist/adapters/a2ui/catalog/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/index.js +100 -0
- package/v3/dist/adapters/a2ui/catalog/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/qe-catalog.d.ts +456 -0
- package/v3/dist/adapters/a2ui/catalog/qe-catalog.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/qe-catalog.js +413 -0
- package/v3/dist/adapters/a2ui/catalog/qe-catalog.js.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/standard-catalog.d.ts +581 -0
- package/v3/dist/adapters/a2ui/catalog/standard-catalog.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/catalog/standard-catalog.js +409 -0
- package/v3/dist/adapters/a2ui/catalog/standard-catalog.js.map +1 -0
- package/v3/dist/adapters/a2ui/data/bound-value.d.ts +252 -0
- package/v3/dist/adapters/a2ui/data/bound-value.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/data/bound-value.js +403 -0
- package/v3/dist/adapters/a2ui/data/bound-value.js.map +1 -0
- package/v3/dist/adapters/a2ui/data/index.d.ts +14 -0
- package/v3/dist/adapters/a2ui/data/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/data/index.js +41 -0
- package/v3/dist/adapters/a2ui/data/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/data/json-pointer-resolver.d.ts +187 -0
- package/v3/dist/adapters/a2ui/data/json-pointer-resolver.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/data/json-pointer-resolver.js +425 -0
- package/v3/dist/adapters/a2ui/data/json-pointer-resolver.js.map +1 -0
- package/v3/dist/adapters/a2ui/data/reactive-store.d.ts +241 -0
- package/v3/dist/adapters/a2ui/data/reactive-store.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/data/reactive-store.js +461 -0
- package/v3/dist/adapters/a2ui/data/reactive-store.js.map +1 -0
- package/v3/dist/adapters/a2ui/index.d.ts +17 -0
- package/v3/dist/adapters/a2ui/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/index.js +119 -0
- package/v3/dist/adapters/a2ui/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/integration/agui-sync.d.ts +259 -0
- package/v3/dist/adapters/a2ui/integration/agui-sync.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/integration/agui-sync.js +559 -0
- package/v3/dist/adapters/a2ui/integration/agui-sync.js.map +1 -0
- package/v3/dist/adapters/a2ui/integration/index.d.ts +11 -0
- package/v3/dist/adapters/a2ui/integration/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/integration/index.js +23 -0
- package/v3/dist/adapters/a2ui/integration/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/integration/surface-state-bridge.d.ts +209 -0
- package/v3/dist/adapters/a2ui/integration/surface-state-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/integration/surface-state-bridge.js +545 -0
- package/v3/dist/adapters/a2ui/integration/surface-state-bridge.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/component-builder.d.ts +227 -0
- package/v3/dist/adapters/a2ui/renderer/component-builder.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/component-builder.js +488 -0
- package/v3/dist/adapters/a2ui/renderer/component-builder.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/index.d.ts +16 -0
- package/v3/dist/adapters/a2ui/renderer/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/index.js +50 -0
- package/v3/dist/adapters/a2ui/renderer/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/message-types.d.ts +299 -0
- package/v3/dist/adapters/a2ui/renderer/message-types.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/message-types.js +187 -0
- package/v3/dist/adapters/a2ui/renderer/message-types.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/surface-generator.d.ts +210 -0
- package/v3/dist/adapters/a2ui/renderer/surface-generator.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/surface-generator.js +586 -0
- package/v3/dist/adapters/a2ui/renderer/surface-generator.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.d.ts +149 -0
- package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.js +414 -0
- package/v3/dist/adapters/a2ui/renderer/templates/accessibility-surface.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.d.ts +95 -0
- package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.js +231 -0
- package/v3/dist/adapters/a2ui/renderer/templates/coverage-surface.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/index.d.ts +12 -0
- package/v3/dist/adapters/a2ui/renderer/templates/index.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/index.js +16 -0
- package/v3/dist/adapters/a2ui/renderer/templates/index.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/security-surface.d.ts +121 -0
- package/v3/dist/adapters/a2ui/renderer/templates/security-surface.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/security-surface.js +367 -0
- package/v3/dist/adapters/a2ui/renderer/templates/security-surface.js.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.d.ts +104 -0
- package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.d.ts.map +1 -0
- package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.js +294 -0
- package/v3/dist/adapters/a2ui/renderer/templates/test-results-surface.js.map +1 -0
- package/v3/dist/adapters/ag-ui/backpressure-handler.d.ts +201 -0
- package/v3/dist/adapters/ag-ui/backpressure-handler.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/backpressure-handler.js +399 -0
- package/v3/dist/adapters/ag-ui/backpressure-handler.js.map +1 -0
- package/v3/dist/adapters/ag-ui/event-adapter.d.ts +360 -0
- package/v3/dist/adapters/ag-ui/event-adapter.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/event-adapter.js +1083 -0
- package/v3/dist/adapters/ag-ui/event-adapter.js.map +1 -0
- package/v3/dist/adapters/ag-ui/event-batcher.d.ts +242 -0
- package/v3/dist/adapters/ag-ui/event-batcher.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/event-batcher.js +444 -0
- package/v3/dist/adapters/ag-ui/event-batcher.js.map +1 -0
- package/v3/dist/adapters/ag-ui/event-types.d.ts +450 -0
- package/v3/dist/adapters/ag-ui/event-types.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/event-types.js +173 -0
- package/v3/dist/adapters/ag-ui/event-types.js.map +1 -0
- package/v3/dist/adapters/ag-ui/index.d.ts +17 -0
- package/v3/dist/adapters/ag-ui/index.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/index.js +47 -0
- package/v3/dist/adapters/ag-ui/index.js.map +1 -0
- package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts +136 -0
- package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/json-patch-utils.js +574 -0
- package/v3/dist/adapters/ag-ui/json-patch-utils.js.map +1 -0
- package/v3/dist/adapters/ag-ui/json-patch.d.ts +241 -0
- package/v3/dist/adapters/ag-ui/json-patch.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/json-patch.js +726 -0
- package/v3/dist/adapters/ag-ui/json-patch.js.map +1 -0
- package/v3/dist/adapters/ag-ui/state-delta-cache.d.ts +218 -0
- package/v3/dist/adapters/ag-ui/state-delta-cache.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/state-delta-cache.js +422 -0
- package/v3/dist/adapters/ag-ui/state-delta-cache.js.map +1 -0
- package/v3/dist/adapters/ag-ui/state-manager.d.ts +249 -0
- package/v3/dist/adapters/ag-ui/state-manager.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/state-manager.js +511 -0
- package/v3/dist/adapters/ag-ui/state-manager.js.map +1 -0
- package/v3/dist/adapters/ag-ui/stream-controller.d.ts +195 -0
- package/v3/dist/adapters/ag-ui/stream-controller.d.ts.map +1 -0
- package/v3/dist/adapters/ag-ui/stream-controller.js +481 -0
- package/v3/dist/adapters/ag-ui/stream-controller.js.map +1 -0
- package/v3/dist/adapters/index.d.ts +4 -0
- package/v3/dist/adapters/index.d.ts.map +1 -1
- package/v3/dist/adapters/index.js +89 -0
- package/v3/dist/adapters/index.js.map +1 -1
- package/v3/dist/cli/bundle.js +1213 -137
- package/v3/dist/init/init-wizard.d.ts.map +1 -1
- package/v3/dist/init/init-wizard.js +16 -1
- package/v3/dist/init/init-wizard.js.map +1 -1
- package/v3/dist/init/migration/config-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/config-migrator.js +15 -1
- package/v3/dist/init/migration/config-migrator.js.map +1 -1
- package/v3/dist/init/self-configurator.d.ts +7 -0
- package/v3/dist/init/self-configurator.d.ts.map +1 -1
- package/v3/dist/init/self-configurator.js +23 -27
- package/v3/dist/init/self-configurator.js.map +1 -1
- package/v3/dist/kernel/plugin-loader.d.ts.map +1 -1
- package/v3/dist/kernel/plugin-loader.js +6 -1
- package/v3/dist/kernel/plugin-loader.js.map +1 -1
- package/v3/dist/kernel/unified-memory.d.ts +97 -0
- package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory.js +204 -0
- package/v3/dist/kernel/unified-memory.js.map +1 -1
- package/v3/dist/mcp/bundle.js +104754 -95005
- package/v3/dist/mcp/entry.d.ts +5 -0
- package/v3/dist/mcp/entry.d.ts.map +1 -1
- package/v3/dist/mcp/entry.js +36 -0
- package/v3/dist/mcp/entry.js.map +1 -1
- package/v3/dist/mcp/http-server.d.ts +95 -0
- package/v3/dist/mcp/http-server.d.ts.map +1 -0
- package/v3/dist/mcp/http-server.js +833 -0
- package/v3/dist/mcp/http-server.js.map +1 -0
- package/v3/dist/mcp/protocol-server.d.ts +6 -0
- package/v3/dist/mcp/protocol-server.d.ts.map +1 -1
- package/v3/dist/mcp/protocol-server.js +40 -0
- package/v3/dist/mcp/protocol-server.js.map +1 -1
- package/v3/dist/mcp/transport/index.d.ts +25 -3
- package/v3/dist/mcp/transport/index.d.ts.map +1 -1
- package/v3/dist/mcp/transport/index.js +22 -4
- package/v3/dist/mcp/transport/index.js.map +1 -1
- package/v3/dist/mcp/transport/sse/connection-manager.d.ts +84 -0
- package/v3/dist/mcp/transport/sse/connection-manager.d.ts.map +1 -0
- package/v3/dist/mcp/transport/sse/connection-manager.js +271 -0
- package/v3/dist/mcp/transport/sse/connection-manager.js.map +1 -0
- package/v3/dist/mcp/transport/sse/index.d.ts +10 -0
- package/v3/dist/mcp/transport/sse/index.d.ts.map +1 -0
- package/v3/dist/mcp/transport/sse/index.js +15 -0
- package/v3/dist/mcp/transport/sse/index.js.map +1 -0
- package/v3/dist/mcp/transport/sse/sse-transport.d.ts +56 -0
- package/v3/dist/mcp/transport/sse/sse-transport.d.ts.map +1 -0
- package/v3/dist/mcp/transport/sse/sse-transport.js +381 -0
- package/v3/dist/mcp/transport/sse/sse-transport.js.map +1 -0
- package/v3/dist/mcp/transport/sse/types.d.ts +237 -0
- package/v3/dist/mcp/transport/sse/types.d.ts.map +1 -0
- package/v3/dist/mcp/transport/sse/types.js +37 -0
- package/v3/dist/mcp/transport/sse/types.js.map +1 -0
- package/v3/dist/mcp/transport/websocket/connection-manager.d.ts +143 -0
- package/v3/dist/mcp/transport/websocket/connection-manager.d.ts.map +1 -0
- package/v3/dist/mcp/transport/websocket/connection-manager.js +522 -0
- package/v3/dist/mcp/transport/websocket/connection-manager.js.map +1 -0
- package/v3/dist/mcp/transport/websocket/index.d.ts +10 -0
- package/v3/dist/mcp/transport/websocket/index.d.ts.map +1 -0
- package/v3/dist/mcp/transport/websocket/index.js +19 -0
- package/v3/dist/mcp/transport/websocket/index.js.map +1 -0
- package/v3/dist/mcp/transport/websocket/types.d.ts +354 -0
- package/v3/dist/mcp/transport/websocket/types.d.ts.map +1 -0
- package/v3/dist/mcp/transport/websocket/types.js +49 -0
- package/v3/dist/mcp/transport/websocket/types.js.map +1 -0
- package/v3/dist/mcp/transport/websocket/websocket-transport.d.ts +77 -0
- package/v3/dist/mcp/transport/websocket/websocket-transport.d.ts.map +1 -0
- package/v3/dist/mcp/transport/websocket/websocket-transport.js +622 -0
- package/v3/dist/mcp/transport/websocket/websocket-transport.js.map +1 -0
- package/v3/dist/memory/crdt/convergence-tracker.d.ts +59 -0
- package/v3/dist/memory/crdt/convergence-tracker.d.ts.map +1 -0
- package/v3/dist/memory/crdt/convergence-tracker.js +325 -0
- package/v3/dist/memory/crdt/convergence-tracker.js.map +1 -0
- package/v3/dist/memory/crdt/crdt-store.d.ts +55 -0
- package/v3/dist/memory/crdt/crdt-store.d.ts.map +1 -0
- package/v3/dist/memory/crdt/crdt-store.js +582 -0
- package/v3/dist/memory/crdt/crdt-store.js.map +1 -0
- package/v3/dist/memory/crdt/g-counter.d.ts +47 -0
- package/v3/dist/memory/crdt/g-counter.d.ts.map +1 -0
- package/v3/dist/memory/crdt/g-counter.js +134 -0
- package/v3/dist/memory/crdt/g-counter.js.map +1 -0
- package/v3/dist/memory/crdt/index.d.ts +52 -0
- package/v3/dist/memory/crdt/index.d.ts.map +1 -0
- package/v3/dist/memory/crdt/index.js +66 -0
- package/v3/dist/memory/crdt/index.js.map +1 -0
- package/v3/dist/memory/crdt/lww-register.d.ts +40 -0
- package/v3/dist/memory/crdt/lww-register.d.ts.map +1 -0
- package/v3/dist/memory/crdt/lww-register.js +133 -0
- package/v3/dist/memory/crdt/lww-register.js.map +1 -0
- package/v3/dist/memory/crdt/or-set.d.ts +62 -0
- package/v3/dist/memory/crdt/or-set.d.ts.map +1 -0
- package/v3/dist/memory/crdt/or-set.js +336 -0
- package/v3/dist/memory/crdt/or-set.js.map +1 -0
- package/v3/dist/memory/crdt/pn-counter.d.ts +53 -0
- package/v3/dist/memory/crdt/pn-counter.d.ts.map +1 -0
- package/v3/dist/memory/crdt/pn-counter.js +147 -0
- package/v3/dist/memory/crdt/pn-counter.js.map +1 -0
- package/v3/dist/memory/crdt/types.d.ts +397 -0
- package/v3/dist/memory/crdt/types.d.ts.map +1 -0
- package/v3/dist/memory/crdt/types.js +12 -0
- package/v3/dist/memory/crdt/types.js.map +1 -0
- package/v3/dist/memory/index.d.ts +5 -2
- package/v3/dist/memory/index.d.ts.map +1 -1
- package/v3/dist/memory/index.js +5 -2
- package/v3/dist/memory/index.js.map +1 -1
- package/v3/dist/performance/benchmarks.d.ts +215 -0
- package/v3/dist/performance/benchmarks.d.ts.map +1 -0
- package/v3/dist/performance/benchmarks.js +516 -0
- package/v3/dist/performance/benchmarks.js.map +1 -0
- package/v3/dist/performance/ci-gates.d.ts +149 -0
- package/v3/dist/performance/ci-gates.d.ts.map +1 -0
- package/v3/dist/performance/ci-gates.js +425 -0
- package/v3/dist/performance/ci-gates.js.map +1 -0
- package/v3/dist/performance/index.d.ts +18 -0
- package/v3/dist/performance/index.d.ts.map +1 -0
- package/v3/dist/performance/index.js +26 -0
- package/v3/dist/performance/index.js.map +1 -0
- package/v3/dist/performance/optimizer.d.ts +323 -0
- package/v3/dist/performance/optimizer.d.ts.map +1 -0
- package/v3/dist/performance/optimizer.js +592 -0
- package/v3/dist/performance/optimizer.js.map +1 -0
- package/v3/dist/performance/profiler.d.ts +195 -0
- package/v3/dist/performance/profiler.d.ts.map +1 -0
- package/v3/dist/performance/profiler.js +369 -0
- package/v3/dist/performance/profiler.js.map +1 -0
- package/v3/dist/performance/run-gates.d.ts +23 -0
- package/v3/dist/performance/run-gates.d.ts.map +1 -0
- package/v3/dist/performance/run-gates.js +122 -0
- package/v3/dist/performance/run-gates.js.map +1 -0
- package/v3/dist/testing/index.d.ts +6 -0
- package/v3/dist/testing/index.d.ts.map +1 -0
- package/v3/dist/testing/index.js +7 -0
- package/v3/dist/testing/index.js.map +1 -0
- package/v3/dist/testing/load/agent-load-tester.d.ts +221 -0
- package/v3/dist/testing/load/agent-load-tester.d.ts.map +1 -0
- package/v3/dist/testing/load/agent-load-tester.js +566 -0
- package/v3/dist/testing/load/agent-load-tester.js.map +1 -0
- package/v3/dist/testing/load/bottleneck-analyzer.d.ts +150 -0
- package/v3/dist/testing/load/bottleneck-analyzer.d.ts.map +1 -0
- package/v3/dist/testing/load/bottleneck-analyzer.js +442 -0
- package/v3/dist/testing/load/bottleneck-analyzer.js.map +1 -0
- package/v3/dist/testing/load/index.d.ts +17 -0
- package/v3/dist/testing/load/index.d.ts.map +1 -0
- package/v3/dist/testing/load/index.js +23 -0
- package/v3/dist/testing/load/index.js.map +1 -0
- package/v3/dist/testing/load/metrics-collector.d.ts +275 -0
- package/v3/dist/testing/load/metrics-collector.d.ts.map +1 -0
- package/v3/dist/testing/load/metrics-collector.js +475 -0
- package/v3/dist/testing/load/metrics-collector.js.map +1 -0
- package/v3/package.json +5 -1
package/v3/dist/cli/bundle.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function createMultiModelProviders(models = getRecommendedSecurityModels(), base
|
|
|
2220
2220
|
})
|
|
2221
2221
|
);
|
|
2222
2222
|
}
|
|
2223
|
-
var MODEL_COSTS,
|
|
2223
|
+
var MODEL_COSTS, DEFAULT_CONFIG4, OpenRouterModelProvider;
|
|
2224
2224
|
var init_openrouter_provider = __esm({
|
|
2225
2225
|
"src/coordination/consensus/providers/openrouter-provider.ts"() {
|
|
2226
2226
|
"use strict";
|
|
@@ -2254,7 +2254,7 @@ var init_openrouter_provider = __esm({
|
|
|
2254
2254
|
// Cohere models
|
|
2255
2255
|
"cohere/command-r-plus": { input: 2.5, output: 10, tier: "standard" }
|
|
2256
2256
|
};
|
|
2257
|
-
|
|
2257
|
+
DEFAULT_CONFIG4 = {
|
|
2258
2258
|
defaultModel: "anthropic/claude-3.5-sonnet",
|
|
2259
2259
|
defaultTimeout: 12e4,
|
|
2260
2260
|
// 2 minutes
|
|
@@ -2281,7 +2281,7 @@ var init_openrouter_provider = __esm({
|
|
|
2281
2281
|
);
|
|
2282
2282
|
}
|
|
2283
2283
|
this.config = {
|
|
2284
|
-
...
|
|
2284
|
+
...DEFAULT_CONFIG4,
|
|
2285
2285
|
...config,
|
|
2286
2286
|
apiKey
|
|
2287
2287
|
};
|
|
@@ -2525,13 +2525,13 @@ async function isOllamaAvailable(baseUrl = "http://localhost:11434") {
|
|
|
2525
2525
|
return false;
|
|
2526
2526
|
}
|
|
2527
2527
|
}
|
|
2528
|
-
var
|
|
2528
|
+
var DEFAULT_CONFIG5, OllamaModelProvider;
|
|
2529
2529
|
var init_ollama_provider = __esm({
|
|
2530
2530
|
"src/coordination/consensus/providers/ollama-provider.ts"() {
|
|
2531
2531
|
"use strict";
|
|
2532
2532
|
init_model_provider();
|
|
2533
2533
|
init_constants2();
|
|
2534
|
-
|
|
2534
|
+
DEFAULT_CONFIG5 = {
|
|
2535
2535
|
baseUrl: OLLAMA_CONSTANTS.DEFAULT_BASE_URL,
|
|
2536
2536
|
defaultModel: "llama3.1",
|
|
2537
2537
|
defaultTimeout: CONSENSUS_CONSTANTS.OLLAMA_TIMEOUT_MS,
|
|
@@ -2553,7 +2553,7 @@ var init_ollama_provider = __esm({
|
|
|
2553
2553
|
constructor(config = {}) {
|
|
2554
2554
|
super();
|
|
2555
2555
|
this.config = {
|
|
2556
|
-
...
|
|
2556
|
+
...DEFAULT_CONFIG5,
|
|
2557
2557
|
...config
|
|
2558
2558
|
};
|
|
2559
2559
|
this.id = `ollama-${this.config.defaultModel.replace(/[^a-z0-9]/gi, "-")}`;
|
|
@@ -6359,7 +6359,7 @@ var knowledge_graph_exports = {};
|
|
|
6359
6359
|
__export(knowledge_graph_exports, {
|
|
6360
6360
|
KnowledgeGraphService: () => KnowledgeGraphService
|
|
6361
6361
|
});
|
|
6362
|
-
var
|
|
6362
|
+
var DEFAULT_CONFIG26, KnowledgeGraphService;
|
|
6363
6363
|
var init_knowledge_graph = __esm({
|
|
6364
6364
|
"src/domains/code-intelligence/services/knowledge-graph.ts"() {
|
|
6365
6365
|
"use strict";
|
|
@@ -6367,7 +6367,7 @@ var init_knowledge_graph = __esm({
|
|
|
6367
6367
|
init_parsers();
|
|
6368
6368
|
init_io();
|
|
6369
6369
|
init_embeddings();
|
|
6370
|
-
|
|
6370
|
+
DEFAULT_CONFIG26 = {
|
|
6371
6371
|
maxNodes: 1e5,
|
|
6372
6372
|
maxEdgesPerNode: 500,
|
|
6373
6373
|
namespace: "code-intelligence:kg",
|
|
@@ -6395,7 +6395,7 @@ var init_knowledge_graph = __esm({
|
|
|
6395
6395
|
* @param config - Optional configuration overrides
|
|
6396
6396
|
*/
|
|
6397
6397
|
constructor(dependenciesOrMemory, config = {}) {
|
|
6398
|
-
this.config = { ...
|
|
6398
|
+
this.config = { ...DEFAULT_CONFIG26, ...config };
|
|
6399
6399
|
if (this.isKnowledgeGraphDependencies(dependenciesOrMemory)) {
|
|
6400
6400
|
this.memory = dependenciesOrMemory.memory;
|
|
6401
6401
|
this.llmRouter = dependenciesOrMemory.llmRouter;
|
|
@@ -8459,7 +8459,13 @@ var DefaultPluginLoader = class {
|
|
|
8459
8459
|
}
|
|
8460
8460
|
const factory = this.factories.get(domain);
|
|
8461
8461
|
if (!factory) {
|
|
8462
|
-
|
|
8462
|
+
const registeredDomains = Array.from(this.factories.keys());
|
|
8463
|
+
throw new Error(
|
|
8464
|
+
`No factory registered for domain: ${domain}
|
|
8465
|
+
This usually means the domain is not enabled in your config.
|
|
8466
|
+
Registered domains: ${registeredDomains.join(", ")}
|
|
8467
|
+
Fix: Add '${domain}' to domains.enabled in .agentic-qe/config.yaml, or run 'aqe init --auto-migrate' to enable all domains.`
|
|
8468
|
+
);
|
|
8463
8469
|
}
|
|
8464
8470
|
const promise = this.loadPlugin(domain, factory);
|
|
8465
8471
|
this.loading.set(domain, promise);
|
|
@@ -8624,6 +8630,866 @@ function isMigrationApplied(db) {
|
|
|
8624
8630
|
|
|
8625
8631
|
// src/kernel/unified-memory.ts
|
|
8626
8632
|
init_constants();
|
|
8633
|
+
|
|
8634
|
+
// src/memory/crdt/lww-register.ts
|
|
8635
|
+
function createLWWRegister(nodeId, initialValue, initialTimestamp) {
|
|
8636
|
+
let state2 = {
|
|
8637
|
+
value: initialValue,
|
|
8638
|
+
timestamp: initialTimestamp ?? (initialValue !== void 0 ? Date.now() : 0),
|
|
8639
|
+
nodeId: initialValue !== void 0 ? nodeId : "",
|
|
8640
|
+
version: initialValue !== void 0 ? 1 : 0,
|
|
8641
|
+
lastUpdated: Date.now()
|
|
8642
|
+
};
|
|
8643
|
+
function compareTimestamps(timestampA, nodeIdA, timestampB, nodeIdB) {
|
|
8644
|
+
if (timestampA !== timestampB) {
|
|
8645
|
+
return timestampA - timestampB;
|
|
8646
|
+
}
|
|
8647
|
+
return nodeIdA.localeCompare(nodeIdB);
|
|
8648
|
+
}
|
|
8649
|
+
return {
|
|
8650
|
+
get() {
|
|
8651
|
+
return state2.value;
|
|
8652
|
+
},
|
|
8653
|
+
set(value, timestamp) {
|
|
8654
|
+
const ts4 = timestamp ?? Date.now();
|
|
8655
|
+
if (state2.timestamp === 0 || compareTimestamps(ts4, nodeId, state2.timestamp, state2.nodeId) > 0) {
|
|
8656
|
+
state2 = {
|
|
8657
|
+
value,
|
|
8658
|
+
timestamp: ts4,
|
|
8659
|
+
nodeId,
|
|
8660
|
+
version: state2.version + 1,
|
|
8661
|
+
lastUpdated: Date.now()
|
|
8662
|
+
};
|
|
8663
|
+
}
|
|
8664
|
+
},
|
|
8665
|
+
merge(other) {
|
|
8666
|
+
const otherState = other.getState();
|
|
8667
|
+
this.applyState(otherState);
|
|
8668
|
+
},
|
|
8669
|
+
getState() {
|
|
8670
|
+
return {
|
|
8671
|
+
value: state2.value,
|
|
8672
|
+
timestamp: state2.timestamp,
|
|
8673
|
+
nodeId: state2.nodeId,
|
|
8674
|
+
version: state2.version,
|
|
8675
|
+
lastUpdated: state2.lastUpdated
|
|
8676
|
+
};
|
|
8677
|
+
},
|
|
8678
|
+
applyState(incoming) {
|
|
8679
|
+
if (state2.timestamp === 0 || compareTimestamps(
|
|
8680
|
+
incoming.timestamp,
|
|
8681
|
+
incoming.nodeId,
|
|
8682
|
+
state2.timestamp,
|
|
8683
|
+
state2.nodeId
|
|
8684
|
+
) > 0) {
|
|
8685
|
+
state2 = {
|
|
8686
|
+
value: incoming.value,
|
|
8687
|
+
timestamp: incoming.timestamp,
|
|
8688
|
+
nodeId: incoming.nodeId,
|
|
8689
|
+
version: Math.max(state2.version, incoming.version) + 1,
|
|
8690
|
+
lastUpdated: Date.now()
|
|
8691
|
+
};
|
|
8692
|
+
}
|
|
8693
|
+
},
|
|
8694
|
+
getNodeId() {
|
|
8695
|
+
return nodeId;
|
|
8696
|
+
},
|
|
8697
|
+
getTimestamp() {
|
|
8698
|
+
return state2.timestamp;
|
|
8699
|
+
}
|
|
8700
|
+
};
|
|
8701
|
+
}
|
|
8702
|
+
function createLWWRegisterFromState(nodeId, existingState) {
|
|
8703
|
+
const register = createLWWRegister(nodeId);
|
|
8704
|
+
register.applyState(existingState);
|
|
8705
|
+
return register;
|
|
8706
|
+
}
|
|
8707
|
+
|
|
8708
|
+
// src/memory/crdt/g-counter.ts
|
|
8709
|
+
function createGCounter(nodeId) {
|
|
8710
|
+
const state2 = {
|
|
8711
|
+
counts: {},
|
|
8712
|
+
version: 0,
|
|
8713
|
+
lastUpdated: Date.now()
|
|
8714
|
+
};
|
|
8715
|
+
state2.counts[nodeId] = 0;
|
|
8716
|
+
return {
|
|
8717
|
+
get() {
|
|
8718
|
+
return Object.values(state2.counts).reduce((sum, count) => sum + count, 0);
|
|
8719
|
+
},
|
|
8720
|
+
increment(n = 1) {
|
|
8721
|
+
if (n < 0) {
|
|
8722
|
+
throw new Error("G-Counter can only increment by positive values");
|
|
8723
|
+
}
|
|
8724
|
+
if (n === 0) {
|
|
8725
|
+
return;
|
|
8726
|
+
}
|
|
8727
|
+
state2.counts[nodeId] = (state2.counts[nodeId] || 0) + n;
|
|
8728
|
+
state2.version++;
|
|
8729
|
+
state2.lastUpdated = Date.now();
|
|
8730
|
+
},
|
|
8731
|
+
merge(other) {
|
|
8732
|
+
const otherState = other.getState();
|
|
8733
|
+
this.applyState(otherState);
|
|
8734
|
+
},
|
|
8735
|
+
getState() {
|
|
8736
|
+
return {
|
|
8737
|
+
counts: { ...state2.counts },
|
|
8738
|
+
version: state2.version,
|
|
8739
|
+
lastUpdated: state2.lastUpdated
|
|
8740
|
+
};
|
|
8741
|
+
},
|
|
8742
|
+
applyState(incoming) {
|
|
8743
|
+
let changed = false;
|
|
8744
|
+
for (const [incomingNodeId, incomingCount] of Object.entries(incoming.counts)) {
|
|
8745
|
+
const currentCount = state2.counts[incomingNodeId] || 0;
|
|
8746
|
+
if (incomingCount > currentCount) {
|
|
8747
|
+
state2.counts[incomingNodeId] = incomingCount;
|
|
8748
|
+
changed = true;
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
if (changed) {
|
|
8752
|
+
state2.version = Math.max(state2.version, incoming.version) + 1;
|
|
8753
|
+
state2.lastUpdated = Date.now();
|
|
8754
|
+
}
|
|
8755
|
+
},
|
|
8756
|
+
getNodeId() {
|
|
8757
|
+
return nodeId;
|
|
8758
|
+
},
|
|
8759
|
+
getLocalCount() {
|
|
8760
|
+
return state2.counts[nodeId] || 0;
|
|
8761
|
+
}
|
|
8762
|
+
};
|
|
8763
|
+
}
|
|
8764
|
+
function createGCounterFromState(nodeId, existingState) {
|
|
8765
|
+
const counter = createGCounter(nodeId);
|
|
8766
|
+
counter.applyState(existingState);
|
|
8767
|
+
return counter;
|
|
8768
|
+
}
|
|
8769
|
+
|
|
8770
|
+
// src/memory/crdt/pn-counter.ts
|
|
8771
|
+
function createPNCounter(nodeId) {
|
|
8772
|
+
const positive = createGCounter(nodeId);
|
|
8773
|
+
const negative = createGCounter(nodeId);
|
|
8774
|
+
let version = 0;
|
|
8775
|
+
let lastUpdated = Date.now();
|
|
8776
|
+
return {
|
|
8777
|
+
get() {
|
|
8778
|
+
return positive.get() - negative.get();
|
|
8779
|
+
},
|
|
8780
|
+
increment(n = 1) {
|
|
8781
|
+
if (n < 0) {
|
|
8782
|
+
throw new Error("Use decrement() for negative values");
|
|
8783
|
+
}
|
|
8784
|
+
if (n === 0) {
|
|
8785
|
+
return;
|
|
8786
|
+
}
|
|
8787
|
+
positive.increment(n);
|
|
8788
|
+
version++;
|
|
8789
|
+
lastUpdated = Date.now();
|
|
8790
|
+
},
|
|
8791
|
+
decrement(n = 1) {
|
|
8792
|
+
if (n < 0) {
|
|
8793
|
+
throw new Error("Use increment() for negative values");
|
|
8794
|
+
}
|
|
8795
|
+
if (n === 0) {
|
|
8796
|
+
return;
|
|
8797
|
+
}
|
|
8798
|
+
negative.increment(n);
|
|
8799
|
+
version++;
|
|
8800
|
+
lastUpdated = Date.now();
|
|
8801
|
+
},
|
|
8802
|
+
merge(other) {
|
|
8803
|
+
const otherState = other.getState();
|
|
8804
|
+
this.applyState(otherState);
|
|
8805
|
+
},
|
|
8806
|
+
getState() {
|
|
8807
|
+
return {
|
|
8808
|
+
positive: positive.getState(),
|
|
8809
|
+
negative: negative.getState(),
|
|
8810
|
+
version,
|
|
8811
|
+
lastUpdated
|
|
8812
|
+
};
|
|
8813
|
+
},
|
|
8814
|
+
applyState(incoming) {
|
|
8815
|
+
const oldValue = this.get();
|
|
8816
|
+
positive.applyState(incoming.positive);
|
|
8817
|
+
negative.applyState(incoming.negative);
|
|
8818
|
+
const newValue = this.get();
|
|
8819
|
+
if (oldValue !== newValue) {
|
|
8820
|
+
version = Math.max(version, incoming.version) + 1;
|
|
8821
|
+
lastUpdated = Date.now();
|
|
8822
|
+
}
|
|
8823
|
+
},
|
|
8824
|
+
getNodeId() {
|
|
8825
|
+
return nodeId;
|
|
8826
|
+
}
|
|
8827
|
+
};
|
|
8828
|
+
}
|
|
8829
|
+
function createPNCounterFromState(nodeId, existingState) {
|
|
8830
|
+
const counter = createPNCounter(nodeId);
|
|
8831
|
+
counter.applyState(existingState);
|
|
8832
|
+
return counter;
|
|
8833
|
+
}
|
|
8834
|
+
|
|
8835
|
+
// src/memory/crdt/or-set.ts
|
|
8836
|
+
function generateTag(nodeId, counter) {
|
|
8837
|
+
return `${nodeId}:${Date.now()}:${counter}`;
|
|
8838
|
+
}
|
|
8839
|
+
function serializeElement(element) {
|
|
8840
|
+
if (typeof element === "string") {
|
|
8841
|
+
return `s:${element}`;
|
|
8842
|
+
}
|
|
8843
|
+
if (typeof element === "number") {
|
|
8844
|
+
return `n:${element}`;
|
|
8845
|
+
}
|
|
8846
|
+
if (typeof element === "boolean") {
|
|
8847
|
+
return `b:${element}`;
|
|
8848
|
+
}
|
|
8849
|
+
return `j:${JSON.stringify(element)}`;
|
|
8850
|
+
}
|
|
8851
|
+
function deserializeElement(key) {
|
|
8852
|
+
const type = key.substring(0, 2);
|
|
8853
|
+
const value = key.substring(2);
|
|
8854
|
+
switch (type) {
|
|
8855
|
+
case "s:":
|
|
8856
|
+
return value;
|
|
8857
|
+
case "n:":
|
|
8858
|
+
return Number(value);
|
|
8859
|
+
case "b:":
|
|
8860
|
+
return value === "true";
|
|
8861
|
+
case "j:":
|
|
8862
|
+
return JSON.parse(value);
|
|
8863
|
+
default:
|
|
8864
|
+
throw new Error(`Unknown serialization type: ${type}`);
|
|
8865
|
+
}
|
|
8866
|
+
}
|
|
8867
|
+
function createORSet(nodeId) {
|
|
8868
|
+
const elements = /* @__PURE__ */ new Map();
|
|
8869
|
+
const tombstones = /* @__PURE__ */ new Map();
|
|
8870
|
+
let version = 0;
|
|
8871
|
+
let lastUpdated = Date.now();
|
|
8872
|
+
let tagCounter = 0;
|
|
8873
|
+
function hasActiveTags(serialized) {
|
|
8874
|
+
const tags = elements.get(serialized);
|
|
8875
|
+
if (!tags || tags.size === 0) {
|
|
8876
|
+
return false;
|
|
8877
|
+
}
|
|
8878
|
+
const tombstoneTags = tombstones.get(serialized);
|
|
8879
|
+
if (!tombstoneTags || tombstoneTags.size === 0) {
|
|
8880
|
+
return true;
|
|
8881
|
+
}
|
|
8882
|
+
for (const tag of tags) {
|
|
8883
|
+
if (!tombstoneTags.has(tag)) {
|
|
8884
|
+
return true;
|
|
8885
|
+
}
|
|
8886
|
+
}
|
|
8887
|
+
return false;
|
|
8888
|
+
}
|
|
8889
|
+
function getActiveTags(serialized) {
|
|
8890
|
+
const tags = elements.get(serialized);
|
|
8891
|
+
if (!tags) {
|
|
8892
|
+
return /* @__PURE__ */ new Set();
|
|
8893
|
+
}
|
|
8894
|
+
const tombstoneTags = tombstones.get(serialized) || /* @__PURE__ */ new Set();
|
|
8895
|
+
const active = /* @__PURE__ */ new Set();
|
|
8896
|
+
for (const tag of tags) {
|
|
8897
|
+
if (!tombstoneTags.has(tag)) {
|
|
8898
|
+
active.add(tag);
|
|
8899
|
+
}
|
|
8900
|
+
}
|
|
8901
|
+
return active;
|
|
8902
|
+
}
|
|
8903
|
+
return {
|
|
8904
|
+
has(element) {
|
|
8905
|
+
const serialized = serializeElement(element);
|
|
8906
|
+
return hasActiveTags(serialized);
|
|
8907
|
+
},
|
|
8908
|
+
values() {
|
|
8909
|
+
const result = [];
|
|
8910
|
+
for (const [serialized] of elements) {
|
|
8911
|
+
if (hasActiveTags(serialized)) {
|
|
8912
|
+
result.push(deserializeElement(serialized));
|
|
8913
|
+
}
|
|
8914
|
+
}
|
|
8915
|
+
return result;
|
|
8916
|
+
},
|
|
8917
|
+
size() {
|
|
8918
|
+
let count = 0;
|
|
8919
|
+
for (const [serialized] of elements) {
|
|
8920
|
+
if (hasActiveTags(serialized)) {
|
|
8921
|
+
count++;
|
|
8922
|
+
}
|
|
8923
|
+
}
|
|
8924
|
+
return count;
|
|
8925
|
+
},
|
|
8926
|
+
add(element) {
|
|
8927
|
+
const serialized = serializeElement(element);
|
|
8928
|
+
const tag = generateTag(nodeId, tagCounter++);
|
|
8929
|
+
if (!elements.has(serialized)) {
|
|
8930
|
+
elements.set(serialized, /* @__PURE__ */ new Set());
|
|
8931
|
+
}
|
|
8932
|
+
elements.get(serialized).add(tag);
|
|
8933
|
+
version++;
|
|
8934
|
+
lastUpdated = Date.now();
|
|
8935
|
+
},
|
|
8936
|
+
remove(element) {
|
|
8937
|
+
const serialized = serializeElement(element);
|
|
8938
|
+
const tags = elements.get(serialized);
|
|
8939
|
+
if (!tags || tags.size === 0) {
|
|
8940
|
+
return;
|
|
8941
|
+
}
|
|
8942
|
+
if (!tombstones.has(serialized)) {
|
|
8943
|
+
tombstones.set(serialized, /* @__PURE__ */ new Set());
|
|
8944
|
+
}
|
|
8945
|
+
const tombstoneTags = tombstones.get(serialized);
|
|
8946
|
+
for (const tag of tags) {
|
|
8947
|
+
tombstoneTags.add(tag);
|
|
8948
|
+
}
|
|
8949
|
+
version++;
|
|
8950
|
+
lastUpdated = Date.now();
|
|
8951
|
+
},
|
|
8952
|
+
merge(other) {
|
|
8953
|
+
const otherState = other.getState();
|
|
8954
|
+
this.applyState(otherState);
|
|
8955
|
+
},
|
|
8956
|
+
getState() {
|
|
8957
|
+
const elementsObj = {};
|
|
8958
|
+
for (const [key, tags] of elements) {
|
|
8959
|
+
elementsObj[key] = Array.from(tags);
|
|
8960
|
+
}
|
|
8961
|
+
const tombstonesObj = {};
|
|
8962
|
+
for (const [key, tags] of tombstones) {
|
|
8963
|
+
if (tags.size > 0) {
|
|
8964
|
+
tombstonesObj[key] = Array.from(tags);
|
|
8965
|
+
}
|
|
8966
|
+
}
|
|
8967
|
+
return {
|
|
8968
|
+
elements: elementsObj,
|
|
8969
|
+
tombstones: tombstonesObj,
|
|
8970
|
+
version,
|
|
8971
|
+
lastUpdated
|
|
8972
|
+
};
|
|
8973
|
+
},
|
|
8974
|
+
applyState(incoming) {
|
|
8975
|
+
let changed = false;
|
|
8976
|
+
for (const [serialized, incomingTags] of Object.entries(incoming.elements)) {
|
|
8977
|
+
if (!elements.has(serialized)) {
|
|
8978
|
+
elements.set(serialized, /* @__PURE__ */ new Set());
|
|
8979
|
+
}
|
|
8980
|
+
const localTags = elements.get(serialized);
|
|
8981
|
+
for (const tag of incomingTags) {
|
|
8982
|
+
if (!localTags.has(tag)) {
|
|
8983
|
+
localTags.add(tag);
|
|
8984
|
+
changed = true;
|
|
8985
|
+
}
|
|
8986
|
+
}
|
|
8987
|
+
}
|
|
8988
|
+
for (const [serialized, incomingTombstones] of Object.entries(
|
|
8989
|
+
incoming.tombstones
|
|
8990
|
+
)) {
|
|
8991
|
+
if (!tombstones.has(serialized)) {
|
|
8992
|
+
tombstones.set(serialized, /* @__PURE__ */ new Set());
|
|
8993
|
+
}
|
|
8994
|
+
const localTombstones = tombstones.get(serialized);
|
|
8995
|
+
for (const tag of incomingTombstones) {
|
|
8996
|
+
if (!localTombstones.has(tag)) {
|
|
8997
|
+
localTombstones.add(tag);
|
|
8998
|
+
changed = true;
|
|
8999
|
+
}
|
|
9000
|
+
}
|
|
9001
|
+
}
|
|
9002
|
+
if (changed) {
|
|
9003
|
+
version = Math.max(version, incoming.version) + 1;
|
|
9004
|
+
lastUpdated = Date.now();
|
|
9005
|
+
}
|
|
9006
|
+
},
|
|
9007
|
+
getNodeId() {
|
|
9008
|
+
return nodeId;
|
|
9009
|
+
},
|
|
9010
|
+
clear() {
|
|
9011
|
+
for (const [serialized, tags] of elements) {
|
|
9012
|
+
if (!tombstones.has(serialized)) {
|
|
9013
|
+
tombstones.set(serialized, /* @__PURE__ */ new Set());
|
|
9014
|
+
}
|
|
9015
|
+
const tombstoneTags = tombstones.get(serialized);
|
|
9016
|
+
for (const tag of tags) {
|
|
9017
|
+
tombstoneTags.add(tag);
|
|
9018
|
+
}
|
|
9019
|
+
}
|
|
9020
|
+
version++;
|
|
9021
|
+
lastUpdated = Date.now();
|
|
9022
|
+
}
|
|
9023
|
+
};
|
|
9024
|
+
}
|
|
9025
|
+
function createORSetFromState(nodeId, existingState) {
|
|
9026
|
+
const set = createORSet(nodeId);
|
|
9027
|
+
set.applyState(existingState);
|
|
9028
|
+
return set;
|
|
9029
|
+
}
|
|
9030
|
+
|
|
9031
|
+
// src/memory/crdt/crdt-store.ts
|
|
9032
|
+
var DEFAULT_CONFIG = {
|
|
9033
|
+
nodeId: "default-node",
|
|
9034
|
+
enableDeltaTracking: true,
|
|
9035
|
+
maxDeltaHistory: 100
|
|
9036
|
+
};
|
|
9037
|
+
function createCRDTStore(config) {
|
|
9038
|
+
const cfg = { ...DEFAULT_CONFIG, ...config };
|
|
9039
|
+
const { nodeId, enableDeltaTracking, maxDeltaHistory } = cfg;
|
|
9040
|
+
const registers = /* @__PURE__ */ new Map();
|
|
9041
|
+
const gCounters = /* @__PURE__ */ new Map();
|
|
9042
|
+
const pnCounters = /* @__PURE__ */ new Map();
|
|
9043
|
+
const sets = /* @__PURE__ */ new Map();
|
|
9044
|
+
let version = 0;
|
|
9045
|
+
const deltaHistory = [];
|
|
9046
|
+
const changeListeners = /* @__PURE__ */ new Set();
|
|
9047
|
+
const pendingChanges = {
|
|
9048
|
+
registers: /* @__PURE__ */ new Set(),
|
|
9049
|
+
gCounters: /* @__PURE__ */ new Set(),
|
|
9050
|
+
pnCounters: /* @__PURE__ */ new Set(),
|
|
9051
|
+
sets: /* @__PURE__ */ new Set()
|
|
9052
|
+
};
|
|
9053
|
+
function emitChange(key, type, operation) {
|
|
9054
|
+
const event = {
|
|
9055
|
+
key,
|
|
9056
|
+
type,
|
|
9057
|
+
operation,
|
|
9058
|
+
timestamp: Date.now(),
|
|
9059
|
+
nodeId
|
|
9060
|
+
};
|
|
9061
|
+
for (const listener of changeListeners) {
|
|
9062
|
+
try {
|
|
9063
|
+
listener(event);
|
|
9064
|
+
} catch (error) {
|
|
9065
|
+
console.error("[CRDTStore] Error in change listener:", error);
|
|
9066
|
+
}
|
|
9067
|
+
}
|
|
9068
|
+
}
|
|
9069
|
+
function recordChange(type, key) {
|
|
9070
|
+
version++;
|
|
9071
|
+
if (enableDeltaTracking) {
|
|
9072
|
+
pendingChanges[type].add(key);
|
|
9073
|
+
}
|
|
9074
|
+
}
|
|
9075
|
+
function flushDelta() {
|
|
9076
|
+
if (!enableDeltaTracking) return;
|
|
9077
|
+
const hasChanges = pendingChanges.registers.size > 0 || pendingChanges.gCounters.size > 0 || pendingChanges.pnCounters.size > 0 || pendingChanges.sets.size > 0;
|
|
9078
|
+
if (!hasChanges) return;
|
|
9079
|
+
const delta = {
|
|
9080
|
+
fromVersion: deltaHistory.length > 0 ? deltaHistory[deltaHistory.length - 1].toVersion : 0,
|
|
9081
|
+
toVersion: version,
|
|
9082
|
+
timestamp: Date.now(),
|
|
9083
|
+
nodeId
|
|
9084
|
+
};
|
|
9085
|
+
if (pendingChanges.registers.size > 0) {
|
|
9086
|
+
delta.registers = {};
|
|
9087
|
+
for (const key of pendingChanges.registers) {
|
|
9088
|
+
const reg = registers.get(key);
|
|
9089
|
+
if (reg) {
|
|
9090
|
+
delta.registers[key] = reg.getState();
|
|
9091
|
+
}
|
|
9092
|
+
}
|
|
9093
|
+
pendingChanges.registers.clear();
|
|
9094
|
+
}
|
|
9095
|
+
if (pendingChanges.gCounters.size > 0) {
|
|
9096
|
+
delta.gCounters = {};
|
|
9097
|
+
for (const key of pendingChanges.gCounters) {
|
|
9098
|
+
const counter = gCounters.get(key);
|
|
9099
|
+
if (counter) {
|
|
9100
|
+
delta.gCounters[key] = counter.getState();
|
|
9101
|
+
}
|
|
9102
|
+
}
|
|
9103
|
+
pendingChanges.gCounters.clear();
|
|
9104
|
+
}
|
|
9105
|
+
if (pendingChanges.pnCounters.size > 0) {
|
|
9106
|
+
delta.pnCounters = {};
|
|
9107
|
+
for (const key of pendingChanges.pnCounters) {
|
|
9108
|
+
const counter = pnCounters.get(key);
|
|
9109
|
+
if (counter) {
|
|
9110
|
+
delta.pnCounters[key] = counter.getState();
|
|
9111
|
+
}
|
|
9112
|
+
}
|
|
9113
|
+
pendingChanges.pnCounters.clear();
|
|
9114
|
+
}
|
|
9115
|
+
if (pendingChanges.sets.size > 0) {
|
|
9116
|
+
delta.sets = {};
|
|
9117
|
+
for (const key of pendingChanges.sets) {
|
|
9118
|
+
const set = sets.get(key);
|
|
9119
|
+
if (set) {
|
|
9120
|
+
delta.sets[key] = set.getState();
|
|
9121
|
+
}
|
|
9122
|
+
}
|
|
9123
|
+
pendingChanges.sets.clear();
|
|
9124
|
+
}
|
|
9125
|
+
deltaHistory.push(delta);
|
|
9126
|
+
while (deltaHistory.length > maxDeltaHistory) {
|
|
9127
|
+
deltaHistory.shift();
|
|
9128
|
+
}
|
|
9129
|
+
}
|
|
9130
|
+
const store = {
|
|
9131
|
+
// -------------------------------------------------------------------------
|
|
9132
|
+
// Register Management
|
|
9133
|
+
// -------------------------------------------------------------------------
|
|
9134
|
+
getRegister(key) {
|
|
9135
|
+
if (!registers.has(key)) {
|
|
9136
|
+
registers.set(key, createLWWRegister(nodeId));
|
|
9137
|
+
}
|
|
9138
|
+
return registers.get(key);
|
|
9139
|
+
},
|
|
9140
|
+
setRegister(key, value) {
|
|
9141
|
+
const register = store.getRegister(key);
|
|
9142
|
+
register.set(value);
|
|
9143
|
+
recordChange("registers", key);
|
|
9144
|
+
emitChange(key, "lww-register", "set");
|
|
9145
|
+
},
|
|
9146
|
+
hasRegister(key) {
|
|
9147
|
+
return registers.has(key);
|
|
9148
|
+
},
|
|
9149
|
+
deleteRegister(key) {
|
|
9150
|
+
const deleted = registers.delete(key);
|
|
9151
|
+
if (deleted) {
|
|
9152
|
+
recordChange("registers", key);
|
|
9153
|
+
}
|
|
9154
|
+
return deleted;
|
|
9155
|
+
},
|
|
9156
|
+
// -------------------------------------------------------------------------
|
|
9157
|
+
// G-Counter Management
|
|
9158
|
+
// -------------------------------------------------------------------------
|
|
9159
|
+
getGCounter(key) {
|
|
9160
|
+
if (!gCounters.has(key)) {
|
|
9161
|
+
gCounters.set(key, createGCounter(nodeId));
|
|
9162
|
+
}
|
|
9163
|
+
return gCounters.get(key);
|
|
9164
|
+
},
|
|
9165
|
+
incrementGCounter(key, n) {
|
|
9166
|
+
const counter = store.getGCounter(key);
|
|
9167
|
+
counter.increment(n);
|
|
9168
|
+
recordChange("gCounters", key);
|
|
9169
|
+
emitChange(key, "g-counter", "increment");
|
|
9170
|
+
},
|
|
9171
|
+
hasGCounter(key) {
|
|
9172
|
+
return gCounters.has(key);
|
|
9173
|
+
},
|
|
9174
|
+
deleteGCounter(key) {
|
|
9175
|
+
const deleted = gCounters.delete(key);
|
|
9176
|
+
if (deleted) {
|
|
9177
|
+
recordChange("gCounters", key);
|
|
9178
|
+
}
|
|
9179
|
+
return deleted;
|
|
9180
|
+
},
|
|
9181
|
+
// -------------------------------------------------------------------------
|
|
9182
|
+
// PN-Counter Management
|
|
9183
|
+
// -------------------------------------------------------------------------
|
|
9184
|
+
getCounter(key) {
|
|
9185
|
+
if (!pnCounters.has(key)) {
|
|
9186
|
+
pnCounters.set(key, createPNCounter(nodeId));
|
|
9187
|
+
}
|
|
9188
|
+
return pnCounters.get(key);
|
|
9189
|
+
},
|
|
9190
|
+
incrementCounter(key, n) {
|
|
9191
|
+
const counter = store.getCounter(key);
|
|
9192
|
+
counter.increment(n);
|
|
9193
|
+
recordChange("pnCounters", key);
|
|
9194
|
+
emitChange(key, "pn-counter", "increment");
|
|
9195
|
+
},
|
|
9196
|
+
decrementCounter(key, n) {
|
|
9197
|
+
const counter = store.getCounter(key);
|
|
9198
|
+
counter.decrement(n);
|
|
9199
|
+
recordChange("pnCounters", key);
|
|
9200
|
+
emitChange(key, "pn-counter", "decrement");
|
|
9201
|
+
},
|
|
9202
|
+
hasCounter(key) {
|
|
9203
|
+
return pnCounters.has(key);
|
|
9204
|
+
},
|
|
9205
|
+
deleteCounter(key) {
|
|
9206
|
+
const deleted = pnCounters.delete(key);
|
|
9207
|
+
if (deleted) {
|
|
9208
|
+
recordChange("pnCounters", key);
|
|
9209
|
+
}
|
|
9210
|
+
return deleted;
|
|
9211
|
+
},
|
|
9212
|
+
// -------------------------------------------------------------------------
|
|
9213
|
+
// OR-Set Management
|
|
9214
|
+
// -------------------------------------------------------------------------
|
|
9215
|
+
getSet(key) {
|
|
9216
|
+
if (!sets.has(key)) {
|
|
9217
|
+
sets.set(key, createORSet(nodeId));
|
|
9218
|
+
}
|
|
9219
|
+
return sets.get(key);
|
|
9220
|
+
},
|
|
9221
|
+
addToSet(key, element) {
|
|
9222
|
+
const set = store.getSet(key);
|
|
9223
|
+
set.add(element);
|
|
9224
|
+
recordChange("sets", key);
|
|
9225
|
+
emitChange(key, "or-set", "add");
|
|
9226
|
+
},
|
|
9227
|
+
removeFromSet(key, element) {
|
|
9228
|
+
const set = store.getSet(key);
|
|
9229
|
+
set.remove(element);
|
|
9230
|
+
recordChange("sets", key);
|
|
9231
|
+
emitChange(key, "or-set", "remove");
|
|
9232
|
+
},
|
|
9233
|
+
hasSet(key) {
|
|
9234
|
+
return sets.has(key);
|
|
9235
|
+
},
|
|
9236
|
+
deleteSet(key) {
|
|
9237
|
+
const deleted = sets.delete(key);
|
|
9238
|
+
if (deleted) {
|
|
9239
|
+
recordChange("sets", key);
|
|
9240
|
+
}
|
|
9241
|
+
return deleted;
|
|
9242
|
+
},
|
|
9243
|
+
// -------------------------------------------------------------------------
|
|
9244
|
+
// Store Operations
|
|
9245
|
+
// -------------------------------------------------------------------------
|
|
9246
|
+
merge(other) {
|
|
9247
|
+
const otherState = other.getState();
|
|
9248
|
+
store.applyState(otherState);
|
|
9249
|
+
},
|
|
9250
|
+
getState() {
|
|
9251
|
+
flushDelta();
|
|
9252
|
+
const state2 = {
|
|
9253
|
+
version,
|
|
9254
|
+
timestamp: Date.now(),
|
|
9255
|
+
nodeId,
|
|
9256
|
+
registers: {},
|
|
9257
|
+
gCounters: {},
|
|
9258
|
+
pnCounters: {},
|
|
9259
|
+
sets: {}
|
|
9260
|
+
};
|
|
9261
|
+
for (const [key, reg] of registers) {
|
|
9262
|
+
state2.registers[key] = reg.getState();
|
|
9263
|
+
}
|
|
9264
|
+
for (const [key, counter] of gCounters) {
|
|
9265
|
+
state2.gCounters[key] = counter.getState();
|
|
9266
|
+
}
|
|
9267
|
+
for (const [key, counter] of pnCounters) {
|
|
9268
|
+
state2.pnCounters[key] = counter.getState();
|
|
9269
|
+
}
|
|
9270
|
+
for (const [key, set] of sets) {
|
|
9271
|
+
state2.sets[key] = set.getState();
|
|
9272
|
+
}
|
|
9273
|
+
return state2;
|
|
9274
|
+
},
|
|
9275
|
+
applyState(incoming) {
|
|
9276
|
+
for (const [key, state2] of Object.entries(incoming.registers)) {
|
|
9277
|
+
if (!registers.has(key)) {
|
|
9278
|
+
registers.set(
|
|
9279
|
+
key,
|
|
9280
|
+
createLWWRegisterFromState(nodeId, state2)
|
|
9281
|
+
);
|
|
9282
|
+
} else {
|
|
9283
|
+
registers.get(key).applyState(state2);
|
|
9284
|
+
}
|
|
9285
|
+
recordChange("registers", key);
|
|
9286
|
+
emitChange(key, "lww-register", "merge");
|
|
9287
|
+
}
|
|
9288
|
+
for (const [key, state2] of Object.entries(incoming.gCounters)) {
|
|
9289
|
+
if (!gCounters.has(key)) {
|
|
9290
|
+
gCounters.set(key, createGCounterFromState(nodeId, state2));
|
|
9291
|
+
} else {
|
|
9292
|
+
gCounters.get(key).applyState(state2);
|
|
9293
|
+
}
|
|
9294
|
+
recordChange("gCounters", key);
|
|
9295
|
+
emitChange(key, "g-counter", "merge");
|
|
9296
|
+
}
|
|
9297
|
+
for (const [key, state2] of Object.entries(incoming.pnCounters)) {
|
|
9298
|
+
if (!pnCounters.has(key)) {
|
|
9299
|
+
pnCounters.set(key, createPNCounterFromState(nodeId, state2));
|
|
9300
|
+
} else {
|
|
9301
|
+
pnCounters.get(key).applyState(state2);
|
|
9302
|
+
}
|
|
9303
|
+
recordChange("pnCounters", key);
|
|
9304
|
+
emitChange(key, "pn-counter", "merge");
|
|
9305
|
+
}
|
|
9306
|
+
for (const [key, state2] of Object.entries(incoming.sets)) {
|
|
9307
|
+
if (!sets.has(key)) {
|
|
9308
|
+
sets.set(
|
|
9309
|
+
key,
|
|
9310
|
+
createORSetFromState(nodeId, state2)
|
|
9311
|
+
);
|
|
9312
|
+
} else {
|
|
9313
|
+
sets.get(key).applyState(state2);
|
|
9314
|
+
}
|
|
9315
|
+
recordChange("sets", key);
|
|
9316
|
+
emitChange(key, "or-set", "merge");
|
|
9317
|
+
}
|
|
9318
|
+
version = Math.max(version, incoming.version) + 1;
|
|
9319
|
+
},
|
|
9320
|
+
getDelta(sinceVersion) {
|
|
9321
|
+
flushDelta();
|
|
9322
|
+
if (deltaHistory.length === 0) {
|
|
9323
|
+
if (sinceVersion >= version) {
|
|
9324
|
+
return null;
|
|
9325
|
+
}
|
|
9326
|
+
return null;
|
|
9327
|
+
}
|
|
9328
|
+
const relevantDeltas = deltaHistory.filter((d) => d.toVersion > sinceVersion);
|
|
9329
|
+
if (relevantDeltas.length === 0) {
|
|
9330
|
+
return null;
|
|
9331
|
+
return null;
|
|
9332
|
+
}
|
|
9333
|
+
const mergedDelta = {
|
|
9334
|
+
fromVersion: sinceVersion,
|
|
9335
|
+
toVersion: version,
|
|
9336
|
+
timestamp: Date.now(),
|
|
9337
|
+
nodeId,
|
|
9338
|
+
registers: {},
|
|
9339
|
+
gCounters: {},
|
|
9340
|
+
pnCounters: {},
|
|
9341
|
+
sets: {}
|
|
9342
|
+
};
|
|
9343
|
+
for (const delta of relevantDeltas) {
|
|
9344
|
+
if (delta.registers) {
|
|
9345
|
+
Object.assign(mergedDelta.registers, delta.registers);
|
|
9346
|
+
}
|
|
9347
|
+
if (delta.gCounters) {
|
|
9348
|
+
Object.assign(mergedDelta.gCounters, delta.gCounters);
|
|
9349
|
+
}
|
|
9350
|
+
if (delta.pnCounters) {
|
|
9351
|
+
Object.assign(mergedDelta.pnCounters, delta.pnCounters);
|
|
9352
|
+
}
|
|
9353
|
+
if (delta.sets) {
|
|
9354
|
+
Object.assign(mergedDelta.sets, delta.sets);
|
|
9355
|
+
}
|
|
9356
|
+
}
|
|
9357
|
+
if (Object.keys(mergedDelta.registers).length === 0) {
|
|
9358
|
+
delete mergedDelta.registers;
|
|
9359
|
+
}
|
|
9360
|
+
if (Object.keys(mergedDelta.gCounters).length === 0) {
|
|
9361
|
+
delete mergedDelta.gCounters;
|
|
9362
|
+
}
|
|
9363
|
+
if (Object.keys(mergedDelta.pnCounters).length === 0) {
|
|
9364
|
+
delete mergedDelta.pnCounters;
|
|
9365
|
+
}
|
|
9366
|
+
if (Object.keys(mergedDelta.sets).length === 0) {
|
|
9367
|
+
delete mergedDelta.sets;
|
|
9368
|
+
}
|
|
9369
|
+
return mergedDelta;
|
|
9370
|
+
},
|
|
9371
|
+
applyDelta(delta) {
|
|
9372
|
+
if (delta.registers) {
|
|
9373
|
+
for (const [key, state2] of Object.entries(delta.registers)) {
|
|
9374
|
+
if (!registers.has(key)) {
|
|
9375
|
+
registers.set(
|
|
9376
|
+
key,
|
|
9377
|
+
createLWWRegisterFromState(nodeId, state2)
|
|
9378
|
+
);
|
|
9379
|
+
} else {
|
|
9380
|
+
registers.get(key).applyState(state2);
|
|
9381
|
+
}
|
|
9382
|
+
recordChange("registers", key);
|
|
9383
|
+
emitChange(key, "lww-register", "merge");
|
|
9384
|
+
}
|
|
9385
|
+
}
|
|
9386
|
+
if (delta.gCounters) {
|
|
9387
|
+
for (const [key, state2] of Object.entries(delta.gCounters)) {
|
|
9388
|
+
if (!gCounters.has(key)) {
|
|
9389
|
+
gCounters.set(key, createGCounterFromState(nodeId, state2));
|
|
9390
|
+
} else {
|
|
9391
|
+
gCounters.get(key).applyState(state2);
|
|
9392
|
+
}
|
|
9393
|
+
recordChange("gCounters", key);
|
|
9394
|
+
emitChange(key, "g-counter", "merge");
|
|
9395
|
+
}
|
|
9396
|
+
}
|
|
9397
|
+
if (delta.pnCounters) {
|
|
9398
|
+
for (const [key, state2] of Object.entries(delta.pnCounters)) {
|
|
9399
|
+
if (!pnCounters.has(key)) {
|
|
9400
|
+
pnCounters.set(key, createPNCounterFromState(nodeId, state2));
|
|
9401
|
+
} else {
|
|
9402
|
+
pnCounters.get(key).applyState(state2);
|
|
9403
|
+
}
|
|
9404
|
+
recordChange("pnCounters", key);
|
|
9405
|
+
emitChange(key, "pn-counter", "merge");
|
|
9406
|
+
}
|
|
9407
|
+
}
|
|
9408
|
+
if (delta.sets) {
|
|
9409
|
+
for (const [key, state2] of Object.entries(delta.sets)) {
|
|
9410
|
+
if (!sets.has(key)) {
|
|
9411
|
+
sets.set(
|
|
9412
|
+
key,
|
|
9413
|
+
createORSetFromState(nodeId, state2)
|
|
9414
|
+
);
|
|
9415
|
+
} else {
|
|
9416
|
+
sets.get(key).applyState(state2);
|
|
9417
|
+
}
|
|
9418
|
+
recordChange("sets", key);
|
|
9419
|
+
emitChange(key, "or-set", "merge");
|
|
9420
|
+
}
|
|
9421
|
+
}
|
|
9422
|
+
version = Math.max(version, delta.toVersion) + 1;
|
|
9423
|
+
},
|
|
9424
|
+
getVersion() {
|
|
9425
|
+
return version;
|
|
9426
|
+
},
|
|
9427
|
+
getNodeId() {
|
|
9428
|
+
return nodeId;
|
|
9429
|
+
},
|
|
9430
|
+
// -------------------------------------------------------------------------
|
|
9431
|
+
// Events
|
|
9432
|
+
// -------------------------------------------------------------------------
|
|
9433
|
+
on(event, callback) {
|
|
9434
|
+
if (event === "change") {
|
|
9435
|
+
changeListeners.add(callback);
|
|
9436
|
+
return () => {
|
|
9437
|
+
changeListeners.delete(callback);
|
|
9438
|
+
};
|
|
9439
|
+
}
|
|
9440
|
+
throw new Error(`Unknown event type: ${event}`);
|
|
9441
|
+
},
|
|
9442
|
+
removeAllListeners() {
|
|
9443
|
+
changeListeners.clear();
|
|
9444
|
+
},
|
|
9445
|
+
// -------------------------------------------------------------------------
|
|
9446
|
+
// Utilities
|
|
9447
|
+
// -------------------------------------------------------------------------
|
|
9448
|
+
keys(type) {
|
|
9449
|
+
const allKeys = [];
|
|
9450
|
+
if (!type || type === "lww-register") {
|
|
9451
|
+
allKeys.push(...Array.from(registers.keys()));
|
|
9452
|
+
}
|
|
9453
|
+
if (!type || type === "g-counter") {
|
|
9454
|
+
allKeys.push(...Array.from(gCounters.keys()));
|
|
9455
|
+
}
|
|
9456
|
+
if (!type || type === "pn-counter") {
|
|
9457
|
+
allKeys.push(...Array.from(pnCounters.keys()));
|
|
9458
|
+
}
|
|
9459
|
+
if (!type || type === "or-set") {
|
|
9460
|
+
allKeys.push(...Array.from(sets.keys()));
|
|
9461
|
+
}
|
|
9462
|
+
return allKeys;
|
|
9463
|
+
},
|
|
9464
|
+
clear() {
|
|
9465
|
+
registers.clear();
|
|
9466
|
+
gCounters.clear();
|
|
9467
|
+
pnCounters.clear();
|
|
9468
|
+
sets.clear();
|
|
9469
|
+
deltaHistory.length = 0;
|
|
9470
|
+
pendingChanges.registers.clear();
|
|
9471
|
+
pendingChanges.gCounters.clear();
|
|
9472
|
+
pendingChanges.pnCounters.clear();
|
|
9473
|
+
pendingChanges.sets.clear();
|
|
9474
|
+
version = 0;
|
|
9475
|
+
},
|
|
9476
|
+
getStats() {
|
|
9477
|
+
return {
|
|
9478
|
+
total: registers.size + gCounters.size + pnCounters.size + sets.size,
|
|
9479
|
+
registers: registers.size,
|
|
9480
|
+
gCounters: gCounters.size,
|
|
9481
|
+
pnCounters: pnCounters.size,
|
|
9482
|
+
sets: sets.size,
|
|
9483
|
+
version,
|
|
9484
|
+
nodeId,
|
|
9485
|
+
deltaHistorySize: deltaHistory.length
|
|
9486
|
+
};
|
|
9487
|
+
}
|
|
9488
|
+
};
|
|
9489
|
+
return store;
|
|
9490
|
+
}
|
|
9491
|
+
|
|
9492
|
+
// src/kernel/unified-memory.ts
|
|
8627
9493
|
function findProjectRoot(startDir = process.cwd()) {
|
|
8628
9494
|
let dir = startDir;
|
|
8629
9495
|
const root = path.parse(dir).root;
|
|
@@ -9181,6 +10047,8 @@ var UnifiedMemoryManager = class _UnifiedMemoryManager {
|
|
|
9181
10047
|
initPromise = null;
|
|
9182
10048
|
preparedStatements = /* @__PURE__ */ new Map();
|
|
9183
10049
|
vectorIndex = new InMemoryHNSWIndex();
|
|
10050
|
+
// CRDT store for distributed state synchronization
|
|
10051
|
+
crdtStore = null;
|
|
9184
10052
|
constructor(config) {
|
|
9185
10053
|
const resolvedDefaults = getResolvedDefaultConfig();
|
|
9186
10054
|
this.config = { ...resolvedDefaults, ...config };
|
|
@@ -9536,6 +10404,199 @@ var UnifiedMemoryManager = class _UnifiedMemoryManager {
|
|
|
9536
10404
|
return row.count;
|
|
9537
10405
|
}
|
|
9538
10406
|
// ============================================================================
|
|
10407
|
+
// CRDT Operations (distributed state synchronization)
|
|
10408
|
+
// ============================================================================
|
|
10409
|
+
/**
|
|
10410
|
+
* Initialize CRDT store for distributed state synchronization.
|
|
10411
|
+
* Call this with a unique node ID for each agent/node in the cluster.
|
|
10412
|
+
*
|
|
10413
|
+
* @param nodeId - Unique identifier for this node (e.g., 'agent-001', 'mcp-server-1')
|
|
10414
|
+
*/
|
|
10415
|
+
initializeCRDT(nodeId) {
|
|
10416
|
+
if (this.crdtStore) {
|
|
10417
|
+
console.warn("[UnifiedMemory] CRDT store already initialized");
|
|
10418
|
+
return;
|
|
10419
|
+
}
|
|
10420
|
+
this.crdtStore = createCRDTStore({ nodeId });
|
|
10421
|
+
console.log(`[UnifiedMemory] CRDT store initialized for node: ${nodeId}`);
|
|
10422
|
+
}
|
|
10423
|
+
/**
|
|
10424
|
+
* Get the CRDT store instance.
|
|
10425
|
+
* Returns null if CRDT has not been initialized.
|
|
10426
|
+
*/
|
|
10427
|
+
getCRDTStore() {
|
|
10428
|
+
return this.crdtStore;
|
|
10429
|
+
}
|
|
10430
|
+
/**
|
|
10431
|
+
* Check if CRDT is initialized
|
|
10432
|
+
*/
|
|
10433
|
+
isCRDTInitialized() {
|
|
10434
|
+
return this.crdtStore !== null;
|
|
10435
|
+
}
|
|
10436
|
+
/**
|
|
10437
|
+
* Set a value in both CRDT store and KV store for durability.
|
|
10438
|
+
* The CRDT store provides conflict-free merge semantics,
|
|
10439
|
+
* while the KV store provides persistence.
|
|
10440
|
+
*
|
|
10441
|
+
* @param key - Key to store
|
|
10442
|
+
* @param value - Value to store
|
|
10443
|
+
* @param namespace - Optional namespace (default: 'crdt')
|
|
10444
|
+
*/
|
|
10445
|
+
async crdtSet(key, value, namespace = "crdt") {
|
|
10446
|
+
this.ensureInitialized();
|
|
10447
|
+
if (this.crdtStore) {
|
|
10448
|
+
this.crdtStore.setRegister(key, value);
|
|
10449
|
+
}
|
|
10450
|
+
await this.kvSet(key, value, namespace);
|
|
10451
|
+
}
|
|
10452
|
+
/**
|
|
10453
|
+
* Get a value from CRDT store (or fallback to KV store)
|
|
10454
|
+
*
|
|
10455
|
+
* @param key - Key to retrieve
|
|
10456
|
+
* @param namespace - Optional namespace (default: 'crdt')
|
|
10457
|
+
*/
|
|
10458
|
+
async crdtGet(key, namespace = "crdt") {
|
|
10459
|
+
if (this.crdtStore) {
|
|
10460
|
+
const register = this.crdtStore.getRegister(key);
|
|
10461
|
+
if (register) {
|
|
10462
|
+
return register.get();
|
|
10463
|
+
}
|
|
10464
|
+
}
|
|
10465
|
+
return this.kvGet(key, namespace);
|
|
10466
|
+
}
|
|
10467
|
+
/**
|
|
10468
|
+
* Increment a distributed counter (CRDT G-Counter)
|
|
10469
|
+
*
|
|
10470
|
+
* @param key - Counter key
|
|
10471
|
+
* @param amount - Amount to increment (default: 1)
|
|
10472
|
+
*/
|
|
10473
|
+
crdtIncrement(key, amount = 1) {
|
|
10474
|
+
if (!this.crdtStore) {
|
|
10475
|
+
throw new Error("CRDT store not initialized. Call initializeCRDT first.");
|
|
10476
|
+
}
|
|
10477
|
+
let counter = this.crdtStore.getCounter(key);
|
|
10478
|
+
if (!counter) {
|
|
10479
|
+
this.crdtStore.incrementCounter(key, 0);
|
|
10480
|
+
counter = this.crdtStore.getCounter(key);
|
|
10481
|
+
}
|
|
10482
|
+
for (let i = 0; i < amount; i++) {
|
|
10483
|
+
this.crdtStore.incrementCounter(key);
|
|
10484
|
+
}
|
|
10485
|
+
}
|
|
10486
|
+
/**
|
|
10487
|
+
* Get distributed counter value
|
|
10488
|
+
*
|
|
10489
|
+
* @param key - Counter key
|
|
10490
|
+
*/
|
|
10491
|
+
crdtGetCounter(key) {
|
|
10492
|
+
if (!this.crdtStore) {
|
|
10493
|
+
return 0;
|
|
10494
|
+
}
|
|
10495
|
+
const counter = this.crdtStore.getCounter(key);
|
|
10496
|
+
return counter?.get() ?? 0;
|
|
10497
|
+
}
|
|
10498
|
+
/**
|
|
10499
|
+
* Add item to distributed set (CRDT OR-Set)
|
|
10500
|
+
*
|
|
10501
|
+
* @param key - Set key
|
|
10502
|
+
* @param item - Item to add
|
|
10503
|
+
*/
|
|
10504
|
+
crdtAddToSet(key, item) {
|
|
10505
|
+
if (!this.crdtStore) {
|
|
10506
|
+
throw new Error("CRDT store not initialized. Call initializeCRDT first.");
|
|
10507
|
+
}
|
|
10508
|
+
this.crdtStore.addToSet(key, item);
|
|
10509
|
+
}
|
|
10510
|
+
/**
|
|
10511
|
+
* Remove item from distributed set
|
|
10512
|
+
*
|
|
10513
|
+
* @param key - Set key
|
|
10514
|
+
* @param item - Item to remove
|
|
10515
|
+
*/
|
|
10516
|
+
crdtRemoveFromSet(key, item) {
|
|
10517
|
+
if (!this.crdtStore) {
|
|
10518
|
+
throw new Error("CRDT store not initialized. Call initializeCRDT first.");
|
|
10519
|
+
}
|
|
10520
|
+
this.crdtStore.removeFromSet(key, item);
|
|
10521
|
+
}
|
|
10522
|
+
/**
|
|
10523
|
+
* Get all items from distributed set
|
|
10524
|
+
*
|
|
10525
|
+
* @param key - Set key
|
|
10526
|
+
*/
|
|
10527
|
+
crdtGetSet(key) {
|
|
10528
|
+
if (!this.crdtStore) {
|
|
10529
|
+
return /* @__PURE__ */ new Set();
|
|
10530
|
+
}
|
|
10531
|
+
const orSet = this.crdtStore.getSet(key);
|
|
10532
|
+
return new Set(orSet.values());
|
|
10533
|
+
}
|
|
10534
|
+
/**
|
|
10535
|
+
* Get the current CRDT state for replication
|
|
10536
|
+
*/
|
|
10537
|
+
crdtGetState() {
|
|
10538
|
+
if (!this.crdtStore) {
|
|
10539
|
+
return null;
|
|
10540
|
+
}
|
|
10541
|
+
return this.crdtStore.getState();
|
|
10542
|
+
}
|
|
10543
|
+
/**
|
|
10544
|
+
* Get a delta of changes since a given version
|
|
10545
|
+
*/
|
|
10546
|
+
crdtGetDelta(sinceVersion) {
|
|
10547
|
+
if (!this.crdtStore) {
|
|
10548
|
+
return null;
|
|
10549
|
+
}
|
|
10550
|
+
return this.crdtStore.getDelta(sinceVersion ?? 0);
|
|
10551
|
+
}
|
|
10552
|
+
/**
|
|
10553
|
+
* Merge remote CRDT state into local store.
|
|
10554
|
+
* This operation is commutative, associative, and idempotent.
|
|
10555
|
+
*
|
|
10556
|
+
* @param remoteState - State from another node
|
|
10557
|
+
*/
|
|
10558
|
+
crdtMerge(remoteState) {
|
|
10559
|
+
if (!this.crdtStore) {
|
|
10560
|
+
throw new Error("CRDT store not initialized. Call initializeCRDT first.");
|
|
10561
|
+
}
|
|
10562
|
+
this.crdtStore.applyState(remoteState);
|
|
10563
|
+
}
|
|
10564
|
+
/**
|
|
10565
|
+
* Apply a delta from another node
|
|
10566
|
+
*
|
|
10567
|
+
* @param delta - Delta changes from another node
|
|
10568
|
+
*/
|
|
10569
|
+
crdtApplyDelta(delta) {
|
|
10570
|
+
if (!this.crdtStore) {
|
|
10571
|
+
throw new Error("CRDT store not initialized. Call initializeCRDT first.");
|
|
10572
|
+
}
|
|
10573
|
+
this.crdtStore.applyDelta(delta);
|
|
10574
|
+
}
|
|
10575
|
+
/**
|
|
10576
|
+
* Persist current CRDT state to KV store for recovery
|
|
10577
|
+
*/
|
|
10578
|
+
async crdtPersist() {
|
|
10579
|
+
if (!this.crdtStore) {
|
|
10580
|
+
return;
|
|
10581
|
+
}
|
|
10582
|
+
const state2 = this.crdtStore.getState();
|
|
10583
|
+
await this.kvSet("__crdt_state__", state2, "crdt-internal");
|
|
10584
|
+
}
|
|
10585
|
+
/**
|
|
10586
|
+
* Restore CRDT state from KV store
|
|
10587
|
+
*/
|
|
10588
|
+
async crdtRestore() {
|
|
10589
|
+
if (!this.crdtStore) {
|
|
10590
|
+
return false;
|
|
10591
|
+
}
|
|
10592
|
+
const state2 = await this.kvGet("__crdt_state__", "crdt-internal");
|
|
10593
|
+
if (state2) {
|
|
10594
|
+
this.crdtStore.applyState(state2);
|
|
10595
|
+
return true;
|
|
10596
|
+
}
|
|
10597
|
+
return false;
|
|
10598
|
+
}
|
|
10599
|
+
// ============================================================================
|
|
9539
10600
|
// Raw Database Access (for advanced operations)
|
|
9540
10601
|
// ============================================================================
|
|
9541
10602
|
/**
|
|
@@ -12152,7 +13213,7 @@ var TestDataGeneratorService = class {
|
|
|
12152
13213
|
};
|
|
12153
13214
|
|
|
12154
13215
|
// src/domains/test-generation/services/test-generator.ts
|
|
12155
|
-
var
|
|
13216
|
+
var DEFAULT_CONFIG2 = {
|
|
12156
13217
|
defaultFramework: "vitest",
|
|
12157
13218
|
maxTestsPerFile: 50,
|
|
12158
13219
|
coverageTargetDefault: 80,
|
|
@@ -12172,7 +13233,7 @@ var TestGeneratorService = class {
|
|
|
12172
13233
|
testDataGenerator;
|
|
12173
13234
|
llmRouter;
|
|
12174
13235
|
constructor(dependencies, config = {}) {
|
|
12175
|
-
this.config = { ...
|
|
13236
|
+
this.config = { ...DEFAULT_CONFIG2, ...config };
|
|
12176
13237
|
this.memory = dependencies.memory;
|
|
12177
13238
|
this.generatorFactory = dependencies.generatorFactory || new TestGeneratorFactory();
|
|
12178
13239
|
this.tddGenerator = dependencies.tddGenerator || new TDDGeneratorService();
|
|
@@ -12764,7 +13825,7 @@ import { v4 as uuidv44 } from "uuid";
|
|
|
12764
13825
|
import * as ts2 from "typescript";
|
|
12765
13826
|
import * as fs3 from "fs";
|
|
12766
13827
|
import * as path3 from "path";
|
|
12767
|
-
var
|
|
13828
|
+
var DEFAULT_CONFIG3 = {
|
|
12768
13829
|
maxPatterns: 100,
|
|
12769
13830
|
minMatchScore: 0.5,
|
|
12770
13831
|
enableVectorSearch: true,
|
|
@@ -12774,7 +13835,7 @@ var DEFAULT_CONFIG2 = {
|
|
|
12774
13835
|
var PatternMatcherService = class {
|
|
12775
13836
|
constructor(memory, config = {}) {
|
|
12776
13837
|
this.memory = memory;
|
|
12777
|
-
this.config = { ...
|
|
13838
|
+
this.config = { ...DEFAULT_CONFIG3, ...config };
|
|
12778
13839
|
this.tsParser = new TypeScriptASTParser();
|
|
12779
13840
|
this.embedder = config.embedder ?? new NomicEmbedder({ enableFallback: true });
|
|
12780
13841
|
}
|
|
@@ -18017,7 +19078,7 @@ function createTestGenerationCoherenceGate(coherenceService, embeddingService, c
|
|
|
18017
19078
|
}
|
|
18018
19079
|
|
|
18019
19080
|
// src/domains/test-generation/coordinator.ts
|
|
18020
|
-
var
|
|
19081
|
+
var DEFAULT_CONFIG6 = {
|
|
18021
19082
|
maxConcurrentWorkflows: 5,
|
|
18022
19083
|
defaultTimeout: 6e4,
|
|
18023
19084
|
// 60 seconds
|
|
@@ -18049,7 +19110,7 @@ var TestGenerationCoordinator = class {
|
|
|
18049
19110
|
this.memory = memory;
|
|
18050
19111
|
this.agentCoordinator = agentCoordinator;
|
|
18051
19112
|
this.coherenceService = coherenceService;
|
|
18052
|
-
this.config = { ...
|
|
19113
|
+
this.config = { ...DEFAULT_CONFIG6, ...config };
|
|
18053
19114
|
this.testGenerator = createTestGeneratorService(memory);
|
|
18054
19115
|
this.patternMatcher = new PatternMatcherService(memory);
|
|
18055
19116
|
if (this.config.enableCoherenceGate && coherenceService) {
|
|
@@ -19891,7 +20952,7 @@ var LLM_ANALYSIS_CONSTANTS = {
|
|
|
19891
20952
|
};
|
|
19892
20953
|
|
|
19893
20954
|
// src/domains/test-execution/services/test-executor.ts
|
|
19894
|
-
var
|
|
20955
|
+
var DEFAULT_CONFIG7 = {
|
|
19895
20956
|
simulateForTesting: false,
|
|
19896
20957
|
simulatedTestsPerFile: 5,
|
|
19897
20958
|
simulatedFailureRate: 0.2,
|
|
@@ -19915,7 +20976,7 @@ var TestExecutorService = class {
|
|
|
19915
20976
|
constructor(dependencies, config = {}) {
|
|
19916
20977
|
this.memory = dependencies.memory;
|
|
19917
20978
|
this.llmRouter = dependencies.llmRouter;
|
|
19918
|
-
this.config = { ...
|
|
20979
|
+
this.config = { ...DEFAULT_CONFIG7, ...config };
|
|
19919
20980
|
}
|
|
19920
20981
|
/**
|
|
19921
20982
|
* Execute a test suite sequentially
|
|
@@ -22079,7 +23140,7 @@ function createTestPrioritizationState(testId, metadata) {
|
|
|
22079
23140
|
}
|
|
22080
23141
|
|
|
22081
23142
|
// src/domains/test-execution/services/test-prioritizer.ts
|
|
22082
|
-
var
|
|
23143
|
+
var DEFAULT_CONFIG8 = {
|
|
22083
23144
|
enableDT: true,
|
|
22084
23145
|
minTrajectoriesForDT: 5,
|
|
22085
23146
|
enableHeuristicFallback: true,
|
|
@@ -22092,7 +23153,7 @@ var DEFAULT_CONFIG7 = {
|
|
|
22092
23153
|
var TestPrioritizerService = class {
|
|
22093
23154
|
constructor(memory, config = {}) {
|
|
22094
23155
|
this.memory = memory;
|
|
22095
|
-
this.config = { ...
|
|
23156
|
+
this.config = { ...DEFAULT_CONFIG8, ...config };
|
|
22096
23157
|
this.decisionTransformer = new DecisionTransformerAlgorithm({
|
|
22097
23158
|
contextLength: this.config.contextLength,
|
|
22098
23159
|
embeddingDim: this.config.embeddingDim
|
|
@@ -27356,7 +28417,7 @@ init_types();
|
|
|
27356
28417
|
|
|
27357
28418
|
// src/domains/coverage-analysis/services/coverage-analyzer.ts
|
|
27358
28419
|
init_types();
|
|
27359
|
-
var
|
|
28420
|
+
var DEFAULT_CONFIG9 = {
|
|
27360
28421
|
defaultThreshold: 80,
|
|
27361
28422
|
enableLLMAnalysis: true,
|
|
27362
28423
|
// On by default - opt-out
|
|
@@ -27376,7 +28437,7 @@ var CoverageAnalyzerService = class _CoverageAnalyzerService {
|
|
|
27376
28437
|
* @param config - Optional configuration overrides
|
|
27377
28438
|
*/
|
|
27378
28439
|
constructor(memoryOrDependencies, config = {}) {
|
|
27379
|
-
this.config = { ...
|
|
28440
|
+
this.config = { ...DEFAULT_CONFIG9, ...config };
|
|
27380
28441
|
if (this.isMemoryBackend(memoryOrDependencies)) {
|
|
27381
28442
|
this.memory = memoryOrDependencies;
|
|
27382
28443
|
this.llmRouter = void 0;
|
|
@@ -27888,7 +28949,7 @@ ${truncatedSource}
|
|
|
27888
28949
|
|
|
27889
28950
|
// src/domains/coverage-analysis/services/gap-detector.ts
|
|
27890
28951
|
init_types();
|
|
27891
|
-
var
|
|
28952
|
+
var DEFAULT_CONFIG10 = {
|
|
27892
28953
|
minCoverage: 80,
|
|
27893
28954
|
enableLLMAnalysis: true,
|
|
27894
28955
|
// On by default - opt-out
|
|
@@ -27913,11 +28974,11 @@ var GapDetectorService = class _GapDetectorService {
|
|
|
27913
28974
|
if ("memory" in dependenciesOrMemory) {
|
|
27914
28975
|
this.memory = dependenciesOrMemory.memory;
|
|
27915
28976
|
this.llmRouter = dependenciesOrMemory.llmRouter;
|
|
27916
|
-
this.config = { ...
|
|
28977
|
+
this.config = { ...DEFAULT_CONFIG10, ...config };
|
|
27917
28978
|
} else {
|
|
27918
28979
|
this.memory = dependenciesOrMemory;
|
|
27919
28980
|
this.llmRouter = void 0;
|
|
27920
|
-
this.config = { ...
|
|
28981
|
+
this.config = { ...DEFAULT_CONFIG10 };
|
|
27921
28982
|
}
|
|
27922
28983
|
}
|
|
27923
28984
|
// ============================================================================
|
|
@@ -29630,7 +30691,7 @@ var QLearningAlgorithm = class extends BaseRLAlgorithm {
|
|
|
29630
30691
|
|
|
29631
30692
|
// src/domains/coverage-analysis/coordinator.ts
|
|
29632
30693
|
import { v4 as uuidv411 } from "uuid";
|
|
29633
|
-
var
|
|
30694
|
+
var DEFAULT_CONFIG11 = {
|
|
29634
30695
|
// MinCut integration defaults (ADR-047)
|
|
29635
30696
|
enableMinCutAwareness: true,
|
|
29636
30697
|
topologyHealthThreshold: 0.5,
|
|
@@ -29645,7 +30706,7 @@ var CoverageAnalysisCoordinator = class {
|
|
|
29645
30706
|
constructor(eventBus, memory, config = {}) {
|
|
29646
30707
|
this.eventBus = eventBus;
|
|
29647
30708
|
this.memory = memory;
|
|
29648
|
-
this.config = { ...
|
|
30709
|
+
this.config = { ...DEFAULT_CONFIG11, ...config };
|
|
29649
30710
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
29650
30711
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
29651
30712
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -30669,7 +31730,7 @@ import { v4 as uuidv415 } from "uuid";
|
|
|
30669
31730
|
// src/domains/quality-assessment/services/quality-gate.ts
|
|
30670
31731
|
init_types();
|
|
30671
31732
|
import { v4 as uuidv412 } from "uuid";
|
|
30672
|
-
var
|
|
31733
|
+
var DEFAULT_CONFIG12 = {
|
|
30673
31734
|
strictMode: false,
|
|
30674
31735
|
enableWarnings: true,
|
|
30675
31736
|
defaultSeverities: {
|
|
@@ -30714,7 +31775,7 @@ var DEFAULT_PRESETS = {
|
|
|
30714
31775
|
var QualityGateService = class {
|
|
30715
31776
|
constructor(memory, config = {}) {
|
|
30716
31777
|
this.memory = memory;
|
|
30717
|
-
this.config = { ...
|
|
31778
|
+
this.config = { ...DEFAULT_CONFIG12, ...config };
|
|
30718
31779
|
for (const [name, thresholds] of Object.entries(DEFAULT_PRESETS)) {
|
|
30719
31780
|
this.presets.set(name, thresholds);
|
|
30720
31781
|
}
|
|
@@ -31552,7 +32613,7 @@ function getSystemMetricsCollector() {
|
|
|
31552
32613
|
}
|
|
31553
32614
|
|
|
31554
32615
|
// src/domains/quality-assessment/services/quality-analyzer.ts
|
|
31555
|
-
var
|
|
32616
|
+
var DEFAULT_CONFIG13 = {
|
|
31556
32617
|
enableTrendAnalysis: true,
|
|
31557
32618
|
trendDataPointsMin: 3,
|
|
31558
32619
|
complexityThresholds: {
|
|
@@ -31587,7 +32648,7 @@ var QualityAnalyzerService = class {
|
|
|
31587
32648
|
* 2. New: (dependencies: QualityAnalyzerDependencies, config?: Partial<QualityAnalyzerConfig>)
|
|
31588
32649
|
*/
|
|
31589
32650
|
constructor(memoryOrDependencies, config = {}) {
|
|
31590
|
-
this.config = { ...
|
|
32651
|
+
this.config = { ...DEFAULT_CONFIG13, ...config };
|
|
31591
32652
|
this.metricsAnalyzer = getCodeMetricsAnalyzer();
|
|
31592
32653
|
if ("memory" in memoryOrDependencies) {
|
|
31593
32654
|
this.memory = memoryOrDependencies.memory;
|
|
@@ -32216,7 +33277,7 @@ ${codeContext.slice(0, 2e3)}
|
|
|
32216
33277
|
// src/domains/quality-assessment/services/deployment-advisor.ts
|
|
32217
33278
|
init_types();
|
|
32218
33279
|
import { v4 as uuidv414 } from "uuid";
|
|
32219
|
-
var
|
|
33280
|
+
var DEFAULT_CONFIG14 = {
|
|
32220
33281
|
riskWeights: {
|
|
32221
33282
|
coverage: 0.15,
|
|
32222
33283
|
testsPassing: 0.2,
|
|
@@ -32246,7 +33307,7 @@ var DeploymentAdvisorService = class {
|
|
|
32246
33307
|
memory;
|
|
32247
33308
|
llmRouter;
|
|
32248
33309
|
constructor(dependencies, config = {}) {
|
|
32249
|
-
this.config = { ...
|
|
33310
|
+
this.config = { ...DEFAULT_CONFIG14, ...config };
|
|
32250
33311
|
if ("memory" in dependencies) {
|
|
32251
33312
|
this.memory = dependencies.memory;
|
|
32252
33313
|
this.llmRouter = dependencies.llmRouter;
|
|
@@ -34400,7 +35461,7 @@ function generateContentHash(content) {
|
|
|
34400
35461
|
}
|
|
34401
35462
|
|
|
34402
35463
|
// src/domains/quality-assessment/coordinator.ts
|
|
34403
|
-
var
|
|
35464
|
+
var DEFAULT_CONFIG15 = {
|
|
34404
35465
|
maxConcurrentWorkflows: 5,
|
|
34405
35466
|
defaultTimeout: 6e4,
|
|
34406
35467
|
publishEvents: true,
|
|
@@ -34425,7 +35486,7 @@ var QualityAssessmentCoordinator = class {
|
|
|
34425
35486
|
this.eventBus = eventBus;
|
|
34426
35487
|
this.memory = memory;
|
|
34427
35488
|
this.agentCoordinator = agentCoordinator;
|
|
34428
|
-
this.config = { ...
|
|
35489
|
+
this.config = { ...DEFAULT_CONFIG15, ...config };
|
|
34429
35490
|
this.qualityGate = new QualityGateService(memory);
|
|
34430
35491
|
this.qualityAnalyzer = new QualityAnalyzerService(memory);
|
|
34431
35492
|
this.deploymentAdvisor = new DeploymentAdvisorService(memory);
|
|
@@ -36438,7 +37499,7 @@ import * as path6 from "path";
|
|
|
36438
37499
|
function sanitizeGitArg(arg) {
|
|
36439
37500
|
return arg.replace(/[;&|`$(){}[\]<>\\'"!\n\r]/g, "");
|
|
36440
37501
|
}
|
|
36441
|
-
var
|
|
37502
|
+
var DEFAULT_CONFIG16 = {
|
|
36442
37503
|
repoRoot: process.cwd(),
|
|
36443
37504
|
maxCommits: 100,
|
|
36444
37505
|
bugKeywords: ["fix", "bug", "patch", "issue", "error", "defect", "problem"],
|
|
@@ -36451,7 +37512,7 @@ var GitAnalyzer = class {
|
|
|
36451
37512
|
cache = /* @__PURE__ */ new Map();
|
|
36452
37513
|
isGitRepo = null;
|
|
36453
37514
|
constructor(config = {}) {
|
|
36454
|
-
this.config = { ...
|
|
37515
|
+
this.config = { ...DEFAULT_CONFIG16, ...config };
|
|
36455
37516
|
}
|
|
36456
37517
|
/**
|
|
36457
37518
|
* Check if current directory is a git repository
|
|
@@ -36965,7 +38026,7 @@ var GitAnalyzer = class {
|
|
|
36965
38026
|
// src/domains/defect-intelligence/services/defect-predictor.ts
|
|
36966
38027
|
init_io();
|
|
36967
38028
|
init_parsers();
|
|
36968
|
-
var
|
|
38029
|
+
var DEFAULT_CONFIG17 = {
|
|
36969
38030
|
defaultThreshold: 0.5,
|
|
36970
38031
|
maxPredictionsPerBatch: 100,
|
|
36971
38032
|
enableHistoricalAnalysis: true,
|
|
@@ -37012,7 +38073,7 @@ var DefectPredictorService = class {
|
|
|
37012
38073
|
* Supports both old signature (memory, config, ...) and new signature (dependencies, config)
|
|
37013
38074
|
*/
|
|
37014
38075
|
constructor(memoryOrDeps, config = {}, gitAnalyzer, fileReader, tsParser) {
|
|
37015
|
-
this.config = { ...
|
|
38076
|
+
this.config = { ...DEFAULT_CONFIG17, ...config };
|
|
37016
38077
|
if (this.isDependenciesObject(memoryOrDeps)) {
|
|
37017
38078
|
this.memory = memoryOrDeps.memory;
|
|
37018
38079
|
this.gitAnalyzer = memoryOrDeps.gitAnalyzer ?? new GitAnalyzer({ enableCache: true });
|
|
@@ -37782,7 +38843,7 @@ ${fileResult.value.slice(0, 2e3)}
|
|
|
37782
38843
|
init_types();
|
|
37783
38844
|
init_embeddings();
|
|
37784
38845
|
import { v4 as uuidv417 } from "uuid";
|
|
37785
|
-
var
|
|
38846
|
+
var DEFAULT_CONFIG18 = {
|
|
37786
38847
|
minPatternFrequency: 2,
|
|
37787
38848
|
maxPatterns: 50,
|
|
37788
38849
|
clusterThreshold: 0.7,
|
|
@@ -37829,7 +38890,7 @@ var KNOWN_PATTERNS = {
|
|
|
37829
38890
|
var PatternLearnerService = class {
|
|
37830
38891
|
constructor(memory, config = {}) {
|
|
37831
38892
|
this.memory = memory;
|
|
37832
|
-
this.config = { ...
|
|
38893
|
+
this.config = { ...DEFAULT_CONFIG18, ...config };
|
|
37833
38894
|
this.embedder = config.embedder ?? new NomicEmbedder({ enableFallback: true });
|
|
37834
38895
|
if (this.config.enableFlashAttention) {
|
|
37835
38896
|
this.initializeFlashAttention();
|
|
@@ -38420,7 +39481,7 @@ var PatternLearnerService = class {
|
|
|
38420
39481
|
|
|
38421
39482
|
// src/domains/defect-intelligence/services/root-cause-analyzer.ts
|
|
38422
39483
|
init_types();
|
|
38423
|
-
var
|
|
39484
|
+
var DEFAULT_CONFIG19 = {
|
|
38424
39485
|
maxTimelineEvents: 20,
|
|
38425
39486
|
maxRelatedFiles: 10,
|
|
38426
39487
|
minConfidenceThreshold: 0.3,
|
|
@@ -38563,7 +39624,7 @@ var RootCauseAnalyzerService = class {
|
|
|
38563
39624
|
* Supports both old signature (memory, config) and new signature (dependencies, config)
|
|
38564
39625
|
*/
|
|
38565
39626
|
constructor(memoryOrDeps, config = {}) {
|
|
38566
|
-
this.config = { ...
|
|
39627
|
+
this.config = { ...DEFAULT_CONFIG19, ...config };
|
|
38567
39628
|
if (this.isMemoryBackend(memoryOrDeps)) {
|
|
38568
39629
|
this.memory = memoryOrDeps;
|
|
38569
39630
|
this.llmRouter = void 0;
|
|
@@ -39105,7 +40166,7 @@ ${fix.codeExample}
|
|
|
39105
40166
|
};
|
|
39106
40167
|
|
|
39107
40168
|
// src/domains/defect-intelligence/coordinator.ts
|
|
39108
|
-
var
|
|
40169
|
+
var DEFAULT_CONFIG20 = {
|
|
39109
40170
|
maxConcurrentWorkflows: 5,
|
|
39110
40171
|
defaultTimeout: 6e4,
|
|
39111
40172
|
enablePatternLearning: true,
|
|
@@ -39124,7 +40185,7 @@ var DefectIntelligenceCoordinator = class {
|
|
|
39124
40185
|
this.eventBus = eventBus;
|
|
39125
40186
|
this.memory = memory;
|
|
39126
40187
|
this.agentCoordinator = agentCoordinator;
|
|
39127
|
-
this.config = { ...
|
|
40188
|
+
this.config = { ...DEFAULT_CONFIG20, ...config };
|
|
39128
40189
|
this.predictor = new DefectPredictorService(memory);
|
|
39129
40190
|
this.patternLearner = new PatternLearnerService(memory);
|
|
39130
40191
|
this.rootCauseAnalyzer = new RootCauseAnalyzerService(memory);
|
|
@@ -40129,7 +41190,7 @@ import { v4 as uuidv421 } from "uuid";
|
|
|
40129
41190
|
// src/domains/requirements-validation/services/requirements-validator.ts
|
|
40130
41191
|
init_types();
|
|
40131
41192
|
import { v4 as uuidv419 } from "uuid";
|
|
40132
|
-
var
|
|
41193
|
+
var DEFAULT_CONFIG21 = {
|
|
40133
41194
|
enableAmbiguityDetection: true,
|
|
40134
41195
|
minAcceptanceCriteria: 1,
|
|
40135
41196
|
strictMode: false,
|
|
@@ -40172,7 +41233,7 @@ var RequirementsValidatorService = class {
|
|
|
40172
41233
|
memory;
|
|
40173
41234
|
llmRouter;
|
|
40174
41235
|
constructor(dependencies, config = {}) {
|
|
40175
|
-
this.config = { ...
|
|
41236
|
+
this.config = { ...DEFAULT_CONFIG21, ...config };
|
|
40176
41237
|
if ("memory" in dependencies && typeof dependencies.memory === "object") {
|
|
40177
41238
|
this.memory = dependencies.memory;
|
|
40178
41239
|
this.llmRouter = dependencies.llmRouter;
|
|
@@ -40746,7 +41807,7 @@ Please analyze these requirements for:
|
|
|
40746
41807
|
// src/domains/requirements-validation/services/bdd-scenario-writer.ts
|
|
40747
41808
|
init_types();
|
|
40748
41809
|
import { v4 as uuidv420 } from "uuid";
|
|
40749
|
-
var
|
|
41810
|
+
var DEFAULT_CONFIG22 = {
|
|
40750
41811
|
defaultExampleCount: 3,
|
|
40751
41812
|
includeBackgroundScenarios: true,
|
|
40752
41813
|
generateNegativeScenarios: true,
|
|
@@ -40755,7 +41816,7 @@ var DEFAULT_CONFIG21 = {
|
|
|
40755
41816
|
var BDDScenarioWriterService = class {
|
|
40756
41817
|
constructor(memory, config = {}) {
|
|
40757
41818
|
this.memory = memory;
|
|
40758
|
-
this.config = { ...
|
|
41819
|
+
this.config = { ...DEFAULT_CONFIG22, ...config };
|
|
40759
41820
|
}
|
|
40760
41821
|
config;
|
|
40761
41822
|
/**
|
|
@@ -41209,7 +42270,7 @@ var DEFAULT_WEIGHTS = {
|
|
|
41209
42270
|
traceability: 0.1,
|
|
41210
42271
|
independency: 0.15
|
|
41211
42272
|
};
|
|
41212
|
-
var
|
|
42273
|
+
var DEFAULT_CONFIG23 = {
|
|
41213
42274
|
defaultThreshold: 60,
|
|
41214
42275
|
weights: DEFAULT_WEIGHTS,
|
|
41215
42276
|
enableAIScoring: false
|
|
@@ -41218,7 +42279,7 @@ var TestabilityScorerService = class {
|
|
|
41218
42279
|
constructor(memory, config = {}) {
|
|
41219
42280
|
this.memory = memory;
|
|
41220
42281
|
this.config = {
|
|
41221
|
-
...
|
|
42282
|
+
...DEFAULT_CONFIG23,
|
|
41222
42283
|
...config,
|
|
41223
42284
|
weights: { ...DEFAULT_WEIGHTS, ...config.weights }
|
|
41224
42285
|
};
|
|
@@ -41929,7 +42990,7 @@ var RequirementsValidationEvents = {
|
|
|
41929
42990
|
SprintValidated: "requirements-validation.SprintValidated",
|
|
41930
42991
|
ValidationFailed: "requirements-validation.ValidationFailed"
|
|
41931
42992
|
};
|
|
41932
|
-
var
|
|
42993
|
+
var DEFAULT_CONFIG24 = {
|
|
41933
42994
|
maxConcurrentWorkflows: 5,
|
|
41934
42995
|
defaultTimeout: 6e4,
|
|
41935
42996
|
publishEvents: true,
|
|
@@ -41985,7 +43046,7 @@ var RequirementsValidationCoordinator = class {
|
|
|
41985
43046
|
this.eventBus = eventBus;
|
|
41986
43047
|
this.memory = memory;
|
|
41987
43048
|
this.agentCoordinator = agentCoordinator;
|
|
41988
|
-
this.config = { ...
|
|
43049
|
+
this.config = { ...DEFAULT_CONFIG24, ...config };
|
|
41989
43050
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
41990
43051
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
41991
43052
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -44517,7 +45578,7 @@ function sanitizeId(str) {
|
|
|
44517
45578
|
}
|
|
44518
45579
|
|
|
44519
45580
|
// src/domains/code-intelligence/services/product-factors-bridge.ts
|
|
44520
|
-
var
|
|
45581
|
+
var DEFAULT_CONFIG25 = {
|
|
44521
45582
|
cacheTtlMs: 36e5,
|
|
44522
45583
|
// 1 hour
|
|
44523
45584
|
publishEvents: true,
|
|
@@ -44582,7 +45643,7 @@ var ProductFactorsBridgeService = class {
|
|
|
44582
45643
|
constructor(eventBus, memory, config = {}) {
|
|
44583
45644
|
this.eventBus = eventBus;
|
|
44584
45645
|
this.memory = memory;
|
|
44585
|
-
this.config = { ...
|
|
45646
|
+
this.config = { ...DEFAULT_CONFIG25, ...config };
|
|
44586
45647
|
}
|
|
44587
45648
|
config;
|
|
44588
45649
|
initialized = false;
|
|
@@ -45176,7 +46237,7 @@ init_knowledge_graph();
|
|
|
45176
46237
|
// src/domains/code-intelligence/services/semantic-analyzer.ts
|
|
45177
46238
|
init_types();
|
|
45178
46239
|
init_embeddings();
|
|
45179
|
-
var
|
|
46240
|
+
var DEFAULT_CONFIG27 = {
|
|
45180
46241
|
embeddingDimension: EMBEDDING_CONFIG.DIMENSIONS,
|
|
45181
46242
|
// 768 for Nomic
|
|
45182
46243
|
minScore: 0.5,
|
|
@@ -45189,7 +46250,7 @@ var DEFAULT_CONFIG26 = {
|
|
|
45189
46250
|
var SemanticAnalyzerService = class {
|
|
45190
46251
|
constructor(memory, config = {}) {
|
|
45191
46252
|
this.memory = memory;
|
|
45192
|
-
this.config = { ...
|
|
46253
|
+
this.config = { ...DEFAULT_CONFIG27, ...config };
|
|
45193
46254
|
if (config.embeddingProvider) {
|
|
45194
46255
|
this.embedder = config.embeddingProvider;
|
|
45195
46256
|
this.embedderInitialized = true;
|
|
@@ -45757,7 +46818,7 @@ var SemanticAnalyzerService = class {
|
|
|
45757
46818
|
init_types();
|
|
45758
46819
|
init_knowledge_graph();
|
|
45759
46820
|
import { v4 as uuidv424 } from "uuid";
|
|
45760
|
-
var
|
|
46821
|
+
var DEFAULT_CONFIG28 = {
|
|
45761
46822
|
maxDepth: 5,
|
|
45762
46823
|
riskWeights: {
|
|
45763
46824
|
directImpact: 0.4,
|
|
@@ -45787,7 +46848,7 @@ var DEFAULT_CONFIG27 = {
|
|
|
45787
46848
|
var ImpactAnalyzerService = class {
|
|
45788
46849
|
constructor(memory, knowledgeGraph, config = {}) {
|
|
45789
46850
|
this.memory = memory;
|
|
45790
|
-
this.config = { ...
|
|
46851
|
+
this.config = { ...DEFAULT_CONFIG28, ...config };
|
|
45791
46852
|
this.knowledgeGraph = knowledgeGraph || new KnowledgeGraphService(memory);
|
|
45792
46853
|
}
|
|
45793
46854
|
config;
|
|
@@ -48060,7 +49121,7 @@ async function createHypergraphEngine(config) {
|
|
|
48060
49121
|
}
|
|
48061
49122
|
|
|
48062
49123
|
// src/domains/code-intelligence/coordinator.ts
|
|
48063
|
-
var
|
|
49124
|
+
var DEFAULT_CONFIG29 = {
|
|
48064
49125
|
maxConcurrentWorkflows: 5,
|
|
48065
49126
|
defaultTimeout: 12e4,
|
|
48066
49127
|
// 2 minutes
|
|
@@ -48087,7 +49148,7 @@ var CodeIntelligenceCoordinator = class {
|
|
|
48087
49148
|
this.eventBus = eventBus;
|
|
48088
49149
|
this.memory = memory;
|
|
48089
49150
|
this.agentCoordinator = agentCoordinator;
|
|
48090
|
-
this.config = { ...
|
|
49151
|
+
this.config = { ...DEFAULT_CONFIG29, ...config };
|
|
48091
49152
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
48092
49153
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
48093
49154
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -50007,7 +51068,7 @@ var Version = class _Version {
|
|
|
50007
51068
|
init_types();
|
|
50008
51069
|
|
|
50009
51070
|
// src/domains/security-compliance/services/scanners/scanner-types.ts
|
|
50010
|
-
var
|
|
51071
|
+
var DEFAULT_CONFIG30 = {
|
|
50011
51072
|
defaultRuleSets: ["owasp-top-10", "cwe-sans-25"],
|
|
50012
51073
|
maxConcurrentScans: 4,
|
|
50013
51074
|
timeout: 3e5,
|
|
@@ -52009,7 +53070,7 @@ function createHttpClient() {
|
|
|
52009
53070
|
}
|
|
52010
53071
|
|
|
52011
53072
|
// src/shared/security/osv-client.ts
|
|
52012
|
-
var
|
|
53073
|
+
var DEFAULT_CONFIG31 = {
|
|
52013
53074
|
baseUrl: "https://api.osv.dev",
|
|
52014
53075
|
timeout: 3e4,
|
|
52015
53076
|
enableCache: true,
|
|
@@ -52021,7 +53082,7 @@ var OSVClient = class {
|
|
|
52021
53082
|
http;
|
|
52022
53083
|
cache = /* @__PURE__ */ new Map();
|
|
52023
53084
|
constructor(config = {}) {
|
|
52024
|
-
this.config = { ...
|
|
53085
|
+
this.config = { ...DEFAULT_CONFIG31, ...config };
|
|
52025
53086
|
this.http = new HttpClient();
|
|
52026
53087
|
}
|
|
52027
53088
|
/**
|
|
@@ -52931,7 +53992,7 @@ var SecurityScannerService = class {
|
|
|
52931
53992
|
dastScanner;
|
|
52932
53993
|
dependencyScanner;
|
|
52933
53994
|
constructor(dependencies, config = {}) {
|
|
52934
|
-
this.config = { ...
|
|
53995
|
+
this.config = { ...DEFAULT_CONFIG30, ...config };
|
|
52935
53996
|
if ("memory" in dependencies) {
|
|
52936
53997
|
this.memory = dependencies.memory;
|
|
52937
53998
|
this.llmRouter = dependencies.llmRouter;
|
|
@@ -53125,7 +54186,7 @@ async function httpGet(url) {
|
|
|
53125
54186
|
data
|
|
53126
54187
|
};
|
|
53127
54188
|
}
|
|
53128
|
-
var
|
|
54189
|
+
var DEFAULT_CONFIG32 = {
|
|
53129
54190
|
secretPatterns: [
|
|
53130
54191
|
/(?:api[_-]?key|apikey)['":\s]*['"=]?\s*['"]?([a-zA-Z0-9_\-]{20,})['"]?/gi,
|
|
53131
54192
|
/(?:password|passwd|pwd)['":\s]*['"=]?\s*['"]?([^\s'"]{8,})['"]?/gi,
|
|
@@ -53147,7 +54208,7 @@ var DEFAULT_CONFIG31 = {
|
|
|
53147
54208
|
var SecurityAuditorService = class {
|
|
53148
54209
|
constructor(memory, config = {}) {
|
|
53149
54210
|
this.memory = memory;
|
|
53150
|
-
this.config = { ...
|
|
54211
|
+
this.config = { ...DEFAULT_CONFIG32, ...config };
|
|
53151
54212
|
}
|
|
53152
54213
|
config;
|
|
53153
54214
|
// ==========================================================================
|
|
@@ -54735,7 +55796,7 @@ var SecurityAuditorService = class {
|
|
|
54735
55796
|
// src/domains/security-compliance/services/compliance-validator.ts
|
|
54736
55797
|
init_types();
|
|
54737
55798
|
import { v4 as uuidv434 } from "uuid";
|
|
54738
|
-
var
|
|
55799
|
+
var DEFAULT_CONFIG33 = {
|
|
54739
55800
|
customStandards: [],
|
|
54740
55801
|
strictMode: false,
|
|
54741
55802
|
includeRecommended: true,
|
|
@@ -54938,7 +55999,7 @@ var BUILT_IN_STANDARDS = [
|
|
|
54938
55999
|
var ComplianceValidatorService = class {
|
|
54939
56000
|
constructor(memory, config = {}) {
|
|
54940
56001
|
this.memory = memory;
|
|
54941
|
-
this.config = { ...
|
|
56002
|
+
this.config = { ...DEFAULT_CONFIG33, ...config };
|
|
54942
56003
|
this.patternAnalyzer = getCompliancePatternAnalyzer();
|
|
54943
56004
|
this.standards = /* @__PURE__ */ new Map();
|
|
54944
56005
|
for (const std of BUILT_IN_STANDARDS) {
|
|
@@ -55791,7 +56852,7 @@ var DQNAlgorithm = class extends BaseRLAlgorithm {
|
|
|
55791
56852
|
|
|
55792
56853
|
// src/domains/security-compliance/coordinator.ts
|
|
55793
56854
|
init_wrappers();
|
|
55794
|
-
var
|
|
56855
|
+
var DEFAULT_CONFIG34 = {
|
|
55795
56856
|
maxConcurrentWorkflows: 3,
|
|
55796
56857
|
defaultTimeout: 3e5,
|
|
55797
56858
|
// 5 minutes
|
|
@@ -55816,7 +56877,7 @@ var SecurityComplianceCoordinator = class {
|
|
|
55816
56877
|
this.eventBus = eventBus;
|
|
55817
56878
|
this.memory = memory;
|
|
55818
56879
|
this.agentCoordinator = agentCoordinator;
|
|
55819
|
-
this.config = { ...
|
|
56880
|
+
this.config = { ...DEFAULT_CONFIG34, ...config };
|
|
55820
56881
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
55821
56882
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
55822
56883
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -57007,7 +58068,7 @@ init_io();
|
|
|
57007
58068
|
|
|
57008
58069
|
// src/domains/contract-testing/services/contract-validator.ts
|
|
57009
58070
|
init_types();
|
|
57010
|
-
var
|
|
58071
|
+
var DEFAULT_CONFIG35 = {
|
|
57011
58072
|
strictMode: true,
|
|
57012
58073
|
validateExamples: true,
|
|
57013
58074
|
maxSchemaDepth: CONTRACT_CONSTANTS.MAX_SCHEMA_DEPTH,
|
|
@@ -57030,7 +58091,7 @@ var ContractValidatorService = class {
|
|
|
57030
58091
|
constructor(dependencies, config = {}) {
|
|
57031
58092
|
this.memory = dependencies.memory;
|
|
57032
58093
|
this.llmRouter = dependencies.llmRouter;
|
|
57033
|
-
this.config = { ...
|
|
58094
|
+
this.config = { ...DEFAULT_CONFIG35, ...config };
|
|
57034
58095
|
}
|
|
57035
58096
|
/**
|
|
57036
58097
|
* ADR-051: Check if LLM analysis is available
|
|
@@ -58370,7 +59431,7 @@ Provide:
|
|
|
58370
59431
|
|
|
58371
59432
|
// src/domains/contract-testing/services/api-compatibility.ts
|
|
58372
59433
|
init_types();
|
|
58373
|
-
var
|
|
59434
|
+
var DEFAULT_CONFIG36 = {
|
|
58374
59435
|
strictEnumValidation: true,
|
|
58375
59436
|
allowOptionalToRequired: false,
|
|
58376
59437
|
trackDeprecations: true,
|
|
@@ -58379,7 +59440,7 @@ var DEFAULT_CONFIG35 = {
|
|
|
58379
59440
|
var ApiCompatibilityService = class {
|
|
58380
59441
|
constructor(memory, config = {}) {
|
|
58381
59442
|
this.memory = memory;
|
|
58382
|
-
this.config = { ...
|
|
59443
|
+
this.config = { ...DEFAULT_CONFIG36, ...config };
|
|
58383
59444
|
}
|
|
58384
59445
|
config;
|
|
58385
59446
|
/**
|
|
@@ -59042,7 +60103,7 @@ var ContractTestingEvents = {
|
|
|
59042
60103
|
ConsumerContractCreated: "contract-testing.ConsumerContractCreated",
|
|
59043
60104
|
VerificationFailed: "contract-testing.VerificationFailed"
|
|
59044
60105
|
};
|
|
59045
|
-
var
|
|
60106
|
+
var DEFAULT_CONFIG37 = {
|
|
59046
60107
|
maxConcurrentWorkflows: 5,
|
|
59047
60108
|
defaultTimeout: 6e4,
|
|
59048
60109
|
// 60 seconds
|
|
@@ -59065,7 +60126,7 @@ var ContractTestingCoordinator = class {
|
|
|
59065
60126
|
this.eventBus = eventBus;
|
|
59066
60127
|
this.memory = memory;
|
|
59067
60128
|
this.agentCoordinator = agentCoordinator;
|
|
59068
|
-
this.config = { ...
|
|
60129
|
+
this.config = { ...DEFAULT_CONFIG37, ...config };
|
|
59069
60130
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
59070
60131
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
59071
60132
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -60263,7 +61324,7 @@ var ContractTestingCoordinator = class {
|
|
|
60263
61324
|
// src/domains/contract-testing/services/schema-validator.ts
|
|
60264
61325
|
init_types();
|
|
60265
61326
|
import { v4 as uuidv437 } from "uuid";
|
|
60266
|
-
var
|
|
61327
|
+
var DEFAULT_CONFIG38 = {
|
|
60267
61328
|
strictMode: false,
|
|
60268
61329
|
allowAdditionalProperties: true,
|
|
60269
61330
|
maxRecursionDepth: 10,
|
|
@@ -60272,7 +61333,7 @@ var DEFAULT_CONFIG37 = {
|
|
|
60272
61333
|
var SchemaValidatorService = class {
|
|
60273
61334
|
constructor(memory, config = {}) {
|
|
60274
61335
|
this.memory = memory;
|
|
60275
|
-
this.config = { ...
|
|
61336
|
+
this.config = { ...DEFAULT_CONFIG38, ...config };
|
|
60276
61337
|
}
|
|
60277
61338
|
config;
|
|
60278
61339
|
/**
|
|
@@ -61649,7 +62710,7 @@ import { v4 as uuidv441 } from "uuid";
|
|
|
61649
62710
|
// src/domains/visual-accessibility/services/visual-tester.ts
|
|
61650
62711
|
init_types();
|
|
61651
62712
|
import { v4 as uuidv438 } from "uuid";
|
|
61652
|
-
var
|
|
62713
|
+
var DEFAULT_CONFIG39 = {
|
|
61653
62714
|
baselineDirectory: ".visual-tests/baselines",
|
|
61654
62715
|
diffDirectory: ".visual-tests/diffs",
|
|
61655
62716
|
defaultViewport: {
|
|
@@ -61677,7 +62738,7 @@ var VisualTesterService = class {
|
|
|
61677
62738
|
constructor(dependencies, config = {}) {
|
|
61678
62739
|
this.memory = dependencies.memory;
|
|
61679
62740
|
this.llmRouter = dependencies.llmRouter;
|
|
61680
|
-
this.config = { ...
|
|
62741
|
+
this.config = { ...DEFAULT_CONFIG39, ...config };
|
|
61681
62742
|
}
|
|
61682
62743
|
/**
|
|
61683
62744
|
* Set the Vibium client for browser-based operations
|
|
@@ -62696,7 +63757,7 @@ function getWCAGLevel(criterionId) {
|
|
|
62696
63757
|
if (levelAA.includes(criterionId)) return "AA";
|
|
62697
63758
|
return "AAA";
|
|
62698
63759
|
}
|
|
62699
|
-
var
|
|
63760
|
+
var DEFAULT_CONFIG40 = {
|
|
62700
63761
|
en301549Version: "3.2.1",
|
|
62701
63762
|
includeEAA: true,
|
|
62702
63763
|
defaultProductCategory: "e-commerce",
|
|
@@ -62705,7 +63766,7 @@ var DEFAULT_CONFIG39 = {
|
|
|
62705
63766
|
var EUComplianceService = class {
|
|
62706
63767
|
constructor(memory, config = {}) {
|
|
62707
63768
|
this.memory = memory;
|
|
62708
|
-
this.config = { ...
|
|
63769
|
+
this.config = { ...DEFAULT_CONFIG40, ...config };
|
|
62709
63770
|
}
|
|
62710
63771
|
config;
|
|
62711
63772
|
/**
|
|
@@ -63001,7 +64062,7 @@ init_errors();
|
|
|
63001
64062
|
init_client();
|
|
63002
64063
|
|
|
63003
64064
|
// src/domains/visual-accessibility/services/accessibility-tester.ts
|
|
63004
|
-
var
|
|
64065
|
+
var DEFAULT_CONFIG41 = {
|
|
63005
64066
|
defaultWCAGLevel: "AA",
|
|
63006
64067
|
includeWarnings: true,
|
|
63007
64068
|
auditTimeout: 3e4,
|
|
@@ -63042,7 +64103,7 @@ var AccessibilityTesterService = class {
|
|
|
63042
64103
|
*/
|
|
63043
64104
|
constructor(memory, config = {}, vibiumClient) {
|
|
63044
64105
|
this.memory = memory;
|
|
63045
|
-
this.config = { ...
|
|
64106
|
+
this.config = { ...DEFAULT_CONFIG41, ...config };
|
|
63046
64107
|
this.rules = this.initializeRules();
|
|
63047
64108
|
this.vibiumClient = vibiumClient ?? null;
|
|
63048
64109
|
this.browserClient = config.browserClient ?? null;
|
|
@@ -64636,7 +65697,7 @@ var DEVICE_VIEWPORTS = {
|
|
|
64636
65697
|
hasTouch: false
|
|
64637
65698
|
}
|
|
64638
65699
|
};
|
|
64639
|
-
var
|
|
65700
|
+
var DEFAULT_CONFIG42 = {
|
|
64640
65701
|
viewports: [
|
|
64641
65702
|
DEVICE_VIEWPORTS["iphone-14"],
|
|
64642
65703
|
DEVICE_VIEWPORTS["ipad-mini"],
|
|
@@ -64652,7 +65713,7 @@ var DEFAULT_CONFIG41 = {
|
|
|
64652
65713
|
var ResponsiveTesterService = class {
|
|
64653
65714
|
constructor(memory, config = {}) {
|
|
64654
65715
|
this.memory = memory;
|
|
64655
|
-
this.config = { ...
|
|
65716
|
+
this.config = { ...DEFAULT_CONFIG42, ...config };
|
|
64656
65717
|
}
|
|
64657
65718
|
config;
|
|
64658
65719
|
/**
|
|
@@ -65402,7 +66463,7 @@ var A2CAlgorithm = class extends BaseRLAlgorithm {
|
|
|
65402
66463
|
|
|
65403
66464
|
// src/domains/visual-accessibility/coordinator.ts
|
|
65404
66465
|
init_wrappers();
|
|
65405
|
-
var
|
|
66466
|
+
var DEFAULT_CONFIG43 = {
|
|
65406
66467
|
maxConcurrentWorkflows: 5,
|
|
65407
66468
|
defaultTimeout: 12e4,
|
|
65408
66469
|
// 2 minutes
|
|
@@ -65425,7 +66486,7 @@ var VisualAccessibilityCoordinator = class {
|
|
|
65425
66486
|
this.eventBus = eventBus;
|
|
65426
66487
|
this.memory = memory;
|
|
65427
66488
|
this.agentCoordinator = agentCoordinator;
|
|
65428
|
-
this.config = { ...
|
|
66489
|
+
this.config = { ...DEFAULT_CONFIG43, ...config };
|
|
65429
66490
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
65430
66491
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
65431
66492
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -67211,7 +68272,7 @@ init_types();
|
|
|
67211
68272
|
init_cve_prevention();
|
|
67212
68273
|
import * as net from "net";
|
|
67213
68274
|
import { execFile } from "child_process";
|
|
67214
|
-
var
|
|
68275
|
+
var DEFAULT_CONFIG44 = {
|
|
67215
68276
|
defaultTimeout: 6e4,
|
|
67216
68277
|
// 60 seconds
|
|
67217
68278
|
maxConcurrentFaults: 3,
|
|
@@ -67237,7 +68298,7 @@ var ChaosEngineerService = class _ChaosEngineerService {
|
|
|
67237
68298
|
constructor(dependencies, config = {}) {
|
|
67238
68299
|
this.memory = dependencies.memory;
|
|
67239
68300
|
this.llmRouter = dependencies.llmRouter;
|
|
67240
|
-
this.config = { ...
|
|
68301
|
+
this.config = { ...DEFAULT_CONFIG44, ...config };
|
|
67241
68302
|
this.httpClient = new HttpClient();
|
|
67242
68303
|
this.metricsCollector = getSystemMetricsCollector();
|
|
67243
68304
|
}
|
|
@@ -68085,7 +69146,7 @@ Provide:
|
|
|
68085
69146
|
// src/domains/chaos-resilience/services/load-tester.ts
|
|
68086
69147
|
init_types();
|
|
68087
69148
|
import { v4 as uuidv442 } from "uuid";
|
|
68088
|
-
var
|
|
69149
|
+
var DEFAULT_CONFIG45 = {
|
|
68089
69150
|
defaultTimeout: 3e5,
|
|
68090
69151
|
// 5 minutes
|
|
68091
69152
|
maxVirtualUsers: 1e3,
|
|
@@ -68097,7 +69158,7 @@ var DEFAULT_CONFIG44 = {
|
|
|
68097
69158
|
var LoadTesterService = class {
|
|
68098
69159
|
constructor(memory, config = {}) {
|
|
68099
69160
|
this.memory = memory;
|
|
68100
|
-
this.config = { ...
|
|
69161
|
+
this.config = { ...DEFAULT_CONFIG45, ...config };
|
|
68101
69162
|
this.httpClient = new HttpClient();
|
|
68102
69163
|
}
|
|
68103
69164
|
config;
|
|
@@ -68634,7 +69695,7 @@ var LoadTesterService = class {
|
|
|
68634
69695
|
// src/domains/chaos-resilience/services/performance-profiler.ts
|
|
68635
69696
|
init_types();
|
|
68636
69697
|
import { v4 as uuidv443 } from "uuid";
|
|
68637
|
-
var
|
|
69698
|
+
var DEFAULT_CONFIG46 = {
|
|
68638
69699
|
defaultTimeout: 6e4,
|
|
68639
69700
|
// 60 seconds
|
|
68640
69701
|
healthCheckInterval: 1e3,
|
|
@@ -68648,7 +69709,7 @@ var DEFAULT_CONFIG45 = {
|
|
|
68648
69709
|
var PerformanceProfilerService = class {
|
|
68649
69710
|
constructor(memory, config = {}) {
|
|
68650
69711
|
this.memory = memory;
|
|
68651
|
-
this.config = { ...
|
|
69712
|
+
this.config = { ...DEFAULT_CONFIG46, ...config };
|
|
68652
69713
|
this.httpClient = createHttpClient();
|
|
68653
69714
|
}
|
|
68654
69715
|
config;
|
|
@@ -69425,7 +70486,7 @@ var PolicyGradientAlgorithm = class extends BaseRLAlgorithm {
|
|
|
69425
70486
|
};
|
|
69426
70487
|
|
|
69427
70488
|
// src/domains/chaos-resilience/coordinator.ts
|
|
69428
|
-
var
|
|
70489
|
+
var DEFAULT_CONFIG47 = {
|
|
69429
70490
|
maxConcurrentWorkflows: 3,
|
|
69430
70491
|
defaultTimeout: 3e5,
|
|
69431
70492
|
// 5 minutes
|
|
@@ -69448,7 +70509,7 @@ var ChaosResilienceCoordinator = class {
|
|
|
69448
70509
|
this.eventBus = eventBus;
|
|
69449
70510
|
this.memory = memory;
|
|
69450
70511
|
this.agentCoordinator = agentCoordinator;
|
|
69451
|
-
this.config = { ...
|
|
70512
|
+
this.config = { ...DEFAULT_CONFIG47, ...config };
|
|
69452
70513
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
69453
70514
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
69454
70515
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -71378,7 +72439,7 @@ import { v4 as uuidv452 } from "uuid";
|
|
|
71378
72439
|
init_types();
|
|
71379
72440
|
init_wrappers();
|
|
71380
72441
|
import { v4 as uuidv445 } from "uuid";
|
|
71381
|
-
var
|
|
72442
|
+
var DEFAULT_CONFIG48 = {
|
|
71382
72443
|
minExperiencesForPattern: 5,
|
|
71383
72444
|
patternConfidenceThreshold: 0.7,
|
|
71384
72445
|
maxPatternsPerDomain: 100,
|
|
@@ -71402,7 +72463,7 @@ var LearningCoordinatorService = class {
|
|
|
71402
72463
|
constructor(dependencies, config = {}) {
|
|
71403
72464
|
this.memory = dependencies.memory;
|
|
71404
72465
|
this.llmRouter = dependencies.llmRouter;
|
|
71405
|
-
this.config = { ...
|
|
72466
|
+
this.config = { ...DEFAULT_CONFIG48, ...config };
|
|
71406
72467
|
}
|
|
71407
72468
|
// ============================================================================
|
|
71408
72469
|
// FlashAttention Integration Methods (via @ruvector/attention)
|
|
@@ -72287,7 +73348,7 @@ Provide:
|
|
|
72287
73348
|
// src/domains/learning-optimization/services/transfer-specialist.ts
|
|
72288
73349
|
init_types();
|
|
72289
73350
|
import { v4 as uuidv446 } from "uuid";
|
|
72290
|
-
var
|
|
73351
|
+
var DEFAULT_CONFIG49 = {
|
|
72291
73352
|
maxKnowledgeItems: 1e3,
|
|
72292
73353
|
relevanceThreshold: 0.5,
|
|
72293
73354
|
transferDecayFactor: 0.1,
|
|
@@ -72296,7 +73357,7 @@ var DEFAULT_CONFIG48 = {
|
|
|
72296
73357
|
var TransferSpecialistService = class {
|
|
72297
73358
|
constructor(memory, config = {}) {
|
|
72298
73359
|
this.memory = memory;
|
|
72299
|
-
this.config = { ...
|
|
73360
|
+
this.config = { ...DEFAULT_CONFIG49, ...config };
|
|
72300
73361
|
}
|
|
72301
73362
|
config;
|
|
72302
73363
|
// ============================================================================
|
|
@@ -72800,7 +73861,7 @@ var TransferSpecialistService = class {
|
|
|
72800
73861
|
// src/domains/learning-optimization/services/metrics-optimizer.ts
|
|
72801
73862
|
init_types();
|
|
72802
73863
|
import { v4 as uuidv447 } from "uuid";
|
|
72803
|
-
var
|
|
73864
|
+
var DEFAULT_CONFIG50 = {
|
|
72804
73865
|
defaultConfidenceLevel: 0.95,
|
|
72805
73866
|
minSamplesForOptimization: 20,
|
|
72806
73867
|
maxOptimizationIterations: 100,
|
|
@@ -72814,7 +73875,7 @@ function isSafeKey(key) {
|
|
|
72814
73875
|
var MetricsOptimizerService = class {
|
|
72815
73876
|
constructor(memory, config = {}) {
|
|
72816
73877
|
this.memory = memory;
|
|
72817
|
-
this.config = { ...
|
|
73878
|
+
this.config = { ...DEFAULT_CONFIG50, ...config };
|
|
72818
73879
|
}
|
|
72819
73880
|
config;
|
|
72820
73881
|
// ============================================================================
|
|
@@ -73418,7 +74479,7 @@ var MetricsOptimizerService = class {
|
|
|
73418
74479
|
// src/domains/learning-optimization/services/production-intel.ts
|
|
73419
74480
|
init_types();
|
|
73420
74481
|
import { v4 as uuidv448 } from "uuid";
|
|
73421
|
-
var
|
|
74482
|
+
var DEFAULT_CONFIG51 = {
|
|
73422
74483
|
metricsRetentionDays: 90,
|
|
73423
74484
|
anomalyThreshold: 2.5,
|
|
73424
74485
|
trendWindowSize: 7,
|
|
@@ -73432,7 +74493,7 @@ var DEFAULT_CONFIG50 = {
|
|
|
73432
74493
|
var ProductionIntelService = class {
|
|
73433
74494
|
constructor(memory, config = {}) {
|
|
73434
74495
|
this.memory = memory;
|
|
73435
|
-
this.config = { ...
|
|
74496
|
+
this.config = { ...DEFAULT_CONFIG51, ...config };
|
|
73436
74497
|
}
|
|
73437
74498
|
config;
|
|
73438
74499
|
// ============================================================================
|
|
@@ -76509,7 +77570,7 @@ function createDreamScheduler(dependencies, config) {
|
|
|
76509
77570
|
}
|
|
76510
77571
|
|
|
76511
77572
|
// src/domains/learning-optimization/coordinator.ts
|
|
76512
|
-
var
|
|
77573
|
+
var DEFAULT_CONFIG52 = {
|
|
76513
77574
|
maxConcurrentWorkflows: 3,
|
|
76514
77575
|
defaultTimeout: 12e4,
|
|
76515
77576
|
// 2 minutes
|
|
@@ -76541,7 +77602,7 @@ var LearningOptimizationCoordinator = class {
|
|
|
76541
77602
|
this.eventBus = eventBus;
|
|
76542
77603
|
this.memory = memory;
|
|
76543
77604
|
this.agentCoordinator = agentCoordinator;
|
|
76544
|
-
this.config = { ...
|
|
77605
|
+
this.config = { ...DEFAULT_CONFIG52, ...config };
|
|
76545
77606
|
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
76546
77607
|
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
76547
77608
|
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
@@ -78616,7 +79677,7 @@ var WorkflowEvents = {
|
|
|
78616
79677
|
StepFailed: "workflow.StepFailed",
|
|
78617
79678
|
StepSkipped: "workflow.StepSkipped"
|
|
78618
79679
|
};
|
|
78619
|
-
var
|
|
79680
|
+
var DEFAULT_CONFIG53 = {
|
|
78620
79681
|
maxConcurrentWorkflows: 10,
|
|
78621
79682
|
defaultStepTimeout: 6e4,
|
|
78622
79683
|
defaultWorkflowTimeout: 6e5,
|
|
@@ -78628,7 +79689,7 @@ var WorkflowOrchestrator = class {
|
|
|
78628
79689
|
this.eventBus = eventBus;
|
|
78629
79690
|
this.memory = memory;
|
|
78630
79691
|
this.agentCoordinator = agentCoordinator;
|
|
78631
|
-
this.config = { ...
|
|
79692
|
+
this.config = { ...DEFAULT_CONFIG53, ...config };
|
|
78632
79693
|
}
|
|
78633
79694
|
config;
|
|
78634
79695
|
workflows = /* @__PURE__ */ new Map();
|
|
@@ -80286,7 +81347,7 @@ function findProjectRoot2() {
|
|
|
80286
81347
|
}
|
|
80287
81348
|
return process.cwd();
|
|
80288
81349
|
}
|
|
80289
|
-
var
|
|
81350
|
+
var DEFAULT_CONFIG54 = {
|
|
80290
81351
|
maxConcurrentAgents: AGENT_CONSTANTS.MAX_CONCURRENT_AGENTS,
|
|
80291
81352
|
memoryBackend: "hybrid",
|
|
80292
81353
|
hnswEnabled: true,
|
|
@@ -80304,7 +81365,7 @@ var QEKernelImpl = class {
|
|
|
80304
81365
|
_startTime;
|
|
80305
81366
|
_initialized = false;
|
|
80306
81367
|
constructor(config = {}) {
|
|
80307
|
-
this._config = { ...
|
|
81368
|
+
this._config = { ...DEFAULT_CONFIG54, ...config };
|
|
80308
81369
|
this._startTime = /* @__PURE__ */ new Date();
|
|
80309
81370
|
const projectRoot = findProjectRoot2();
|
|
80310
81371
|
const dataDir = this._config.dataDir || path9.join(projectRoot, ".agentic-qe");
|
|
@@ -80524,7 +81585,7 @@ function createdAtComparator() {
|
|
|
80524
81585
|
}
|
|
80525
81586
|
|
|
80526
81587
|
// src/coordination/services/task-audit-logger.ts
|
|
80527
|
-
var
|
|
81588
|
+
var DEFAULT_CONFIG55 = {
|
|
80528
81589
|
enableConsoleLog: true,
|
|
80529
81590
|
maxEntries: 1e3,
|
|
80530
81591
|
logPrefix: "[TASK]"
|
|
@@ -80533,7 +81594,7 @@ var TaskAuditLogger = class {
|
|
|
80533
81594
|
entries = [];
|
|
80534
81595
|
config;
|
|
80535
81596
|
constructor(config = {}) {
|
|
80536
|
-
this.config = { ...
|
|
81597
|
+
this.config = { ...DEFAULT_CONFIG55, ...config };
|
|
80537
81598
|
}
|
|
80538
81599
|
/**
|
|
80539
81600
|
* Log a task operation
|
|
@@ -84258,7 +85319,7 @@ var TASK_DOMAIN_MAP = {
|
|
|
84258
85319
|
// QCSD Ideation Swarm: requirements-validation is primary, with support from coverage-analysis and security-compliance
|
|
84259
85320
|
"ideation-assessment": ["requirements-validation", "coverage-analysis", "security-compliance"]
|
|
84260
85321
|
};
|
|
84261
|
-
var
|
|
85322
|
+
var DEFAULT_CONFIG56 = {
|
|
84262
85323
|
maxConcurrentTasks: 50,
|
|
84263
85324
|
defaultTaskTimeout: 3e5,
|
|
84264
85325
|
// 5 minutes
|
|
@@ -84293,7 +85354,7 @@ var QueenCoordinator = class _QueenCoordinator {
|
|
|
84293
85354
|
this.protocolExecutor = protocolExecutor;
|
|
84294
85355
|
this.workflowExecutor = workflowExecutor;
|
|
84295
85356
|
this.domainPlugins = domainPlugins;
|
|
84296
|
-
this.config = { ...
|
|
85357
|
+
this.config = { ...DEFAULT_CONFIG56, ...config };
|
|
84297
85358
|
this.auditLogger = createTaskAuditLogger({
|
|
84298
85359
|
enableConsoleLog: this.config.enableMetrics,
|
|
84299
85360
|
maxEntries: 1e3,
|
|
@@ -88098,7 +89159,7 @@ async function createDefaultMemoryBackend(autoInitialize2 = true) {
|
|
|
88098
89159
|
}
|
|
88099
89160
|
|
|
88100
89161
|
// src/init/token-bootstrap.ts
|
|
88101
|
-
var
|
|
89162
|
+
var DEFAULT_CONFIG57 = {
|
|
88102
89163
|
enableOptimization: true,
|
|
88103
89164
|
enablePersistence: true,
|
|
88104
89165
|
storagePath: process.env.AQE_STORAGE_PATH ?? ".aqe",
|
|
@@ -88112,7 +89173,7 @@ async function bootstrapTokenTracking(config) {
|
|
|
88112
89173
|
if (initialized) {
|
|
88113
89174
|
return;
|
|
88114
89175
|
}
|
|
88115
|
-
const cfg = { ...
|
|
89176
|
+
const cfg = { ...DEFAULT_CONFIG57, ...config };
|
|
88116
89177
|
if (cfg.verbose) {
|
|
88117
89178
|
console.log("[TokenBootstrap] Initializing token tracking...");
|
|
88118
89179
|
}
|
|
@@ -90076,7 +91137,6 @@ var configurationRules = [
|
|
|
90076
91137
|
condition: (a) => a.existingTests.totalCount === 0,
|
|
90077
91138
|
apply: (config) => {
|
|
90078
91139
|
config.workers.enabled = ["pattern-consolidator"];
|
|
90079
|
-
config.domains.enabled = ["test-generation", "coverage-analysis", "learning-optimization"];
|
|
90080
91140
|
config.learning.qualityThreshold = 0.5;
|
|
90081
91141
|
config.learning.promotionThreshold = 2;
|
|
90082
91142
|
}
|
|
@@ -90239,28 +91299,29 @@ var SelfConfigurator = class {
|
|
|
90239
91299
|
}
|
|
90240
91300
|
/**
|
|
90241
91301
|
* Recommend enabled domains
|
|
91302
|
+
*
|
|
91303
|
+
* IMPORTANT: Always enable ALL 12 domains by default.
|
|
91304
|
+
* Limiting domains causes "No factory registered" errors in fleet_init
|
|
91305
|
+
* when MCP tools try to use domains that aren't enabled.
|
|
91306
|
+
*
|
|
91307
|
+
* Project analysis is used for prioritization and worker selection,
|
|
91308
|
+
* but all domains remain available for users who need them.
|
|
90242
91309
|
*/
|
|
90243
|
-
recommendDomains(
|
|
90244
|
-
|
|
91310
|
+
recommendDomains(_analysis) {
|
|
91311
|
+
return [
|
|
90245
91312
|
"test-generation",
|
|
90246
91313
|
"test-execution",
|
|
90247
91314
|
"coverage-analysis",
|
|
91315
|
+
"quality-assessment",
|
|
91316
|
+
"defect-intelligence",
|
|
91317
|
+
"requirements-validation",
|
|
91318
|
+
"code-intelligence",
|
|
91319
|
+
"security-compliance",
|
|
91320
|
+
"contract-testing",
|
|
91321
|
+
"visual-accessibility",
|
|
91322
|
+
"chaos-resilience",
|
|
90248
91323
|
"learning-optimization"
|
|
90249
|
-
]
|
|
90250
|
-
if (analysis.hasCIConfig) {
|
|
90251
|
-
domains.add("quality-assessment");
|
|
90252
|
-
}
|
|
90253
|
-
if (analysis.codeComplexity.totalFiles > 100) {
|
|
90254
|
-
domains.add("security-compliance");
|
|
90255
|
-
}
|
|
90256
|
-
if (analysis.frameworks.some((f) => ["playwright", "cypress"].includes(f.name))) {
|
|
90257
|
-
domains.add("visual-accessibility");
|
|
90258
|
-
}
|
|
90259
|
-
if (analysis.hasTypeScript || analysis.codeComplexity.recommendation === "complex") {
|
|
90260
|
-
domains.add("code-intelligence");
|
|
90261
|
-
}
|
|
90262
|
-
domains.add("contract-testing");
|
|
90263
|
-
return Array.from(domains);
|
|
91324
|
+
];
|
|
90264
91325
|
}
|
|
90265
91326
|
/**
|
|
90266
91327
|
* Recommend max concurrent agents
|
|
@@ -91933,7 +92994,22 @@ var InitOrchestrator = class {
|
|
|
91933
92994
|
overwrite: false
|
|
91934
92995
|
},
|
|
91935
92996
|
domains: {
|
|
91936
|
-
|
|
92997
|
+
// Enable ALL domains - v3 supports all 12 DDD domains
|
|
92998
|
+
// Limiting to 3 causes "No factory registered" errors in fleet_init
|
|
92999
|
+
enabled: [
|
|
93000
|
+
"test-generation",
|
|
93001
|
+
"test-execution",
|
|
93002
|
+
"coverage-analysis",
|
|
93003
|
+
"quality-assessment",
|
|
93004
|
+
"defect-intelligence",
|
|
93005
|
+
"requirements-validation",
|
|
93006
|
+
"code-intelligence",
|
|
93007
|
+
"security-compliance",
|
|
93008
|
+
"contract-testing",
|
|
93009
|
+
"visual-accessibility",
|
|
93010
|
+
"chaos-resilience",
|
|
93011
|
+
"learning-optimization"
|
|
93012
|
+
],
|
|
91937
93013
|
disabled: []
|
|
91938
93014
|
},
|
|
91939
93015
|
agents: {
|
|
@@ -109201,7 +110277,7 @@ async function cleanupAndExit(code = 0) {
|
|
|
109201
110277
|
process.exit(code);
|
|
109202
110278
|
}
|
|
109203
110279
|
var program = new Command13();
|
|
109204
|
-
var VERSION = true ? "3.
|
|
110280
|
+
var VERSION = true ? "3.4.0" : "0.0.0-dev";
|
|
109205
110281
|
program.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(VERSION);
|
|
109206
110282
|
var registry = createCommandRegistry(context, cleanupAndExit, ensureInitialized);
|
|
109207
110283
|
registry.registerAll(program);
|