@cleocode/core 2026.3.64 → 2026.3.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/retry.d.ts.map +1 -1
- package/dist/cleo.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +128 -116
- package/dist/index.js.map +4 -4
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/enforcement.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/agents/retry.ts +18 -46
- package/src/cleo.ts +2 -2
- package/src/config.ts +13 -0
- package/src/index.ts +4 -1
- package/src/tasks/add.ts +5 -5
- package/src/tasks/complete.ts +14 -48
- package/src/tasks/enforcement.ts +12 -24
- package/dist/adapters/adapter-registry.js +0 -64
- package/dist/adapters/adapter-registry.js.map +0 -1
- package/dist/adapters/discovery.js +0 -83
- package/dist/adapters/discovery.js.map +0 -1
- package/dist/adapters/index.js +0 -9
- package/dist/adapters/index.js.map +0 -1
- package/dist/adapters/manager.js +0 -260
- package/dist/adapters/manager.js.map +0 -1
- package/dist/admin/export-tasks.js +0 -171
- package/dist/admin/export-tasks.js.map +0 -1
- package/dist/admin/export.js +0 -103
- package/dist/admin/export.js.map +0 -1
- package/dist/admin/help.js +0 -106
- package/dist/admin/help.js.map +0 -1
- package/dist/admin/import-tasks.js +0 -182
- package/dist/admin/import-tasks.js.map +0 -1
- package/dist/admin/import.js +0 -129
- package/dist/admin/import.js.map +0 -1
- package/dist/admin/index.js +0 -13
- package/dist/admin/index.js.map +0 -1
- package/dist/adrs/find.js +0 -134
- package/dist/adrs/find.js.map +0 -1
- package/dist/adrs/index.js +0 -15
- package/dist/adrs/index.js.map +0 -1
- package/dist/adrs/link-pipeline.js +0 -160
- package/dist/adrs/link-pipeline.js.map +0 -1
- package/dist/adrs/list.js +0 -43
- package/dist/adrs/list.js.map +0 -1
- package/dist/adrs/parse.js +0 -51
- package/dist/adrs/parse.js.map +0 -1
- package/dist/adrs/show.js +0 -22
- package/dist/adrs/show.js.map +0 -1
- package/dist/adrs/sync.js +0 -188
- package/dist/adrs/sync.js.map +0 -1
- package/dist/adrs/types.js +0 -9
- package/dist/adrs/types.js.map +0 -1
- package/dist/adrs/validate.js +0 -57
- package/dist/adrs/validate.js.map +0 -1
- package/dist/agents/agent-registry.js +0 -288
- package/dist/agents/agent-registry.js.map +0 -1
- package/dist/agents/agent-schema.js +0 -85
- package/dist/agents/agent-schema.js.map +0 -1
- package/dist/agents/capacity.js +0 -116
- package/dist/agents/capacity.js.map +0 -1
- package/dist/agents/execution-learning.js +0 -474
- package/dist/agents/execution-learning.js.map +0 -1
- package/dist/agents/health-monitor.js +0 -217
- package/dist/agents/health-monitor.js.map +0 -1
- package/dist/agents/index.js +0 -29
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/registry.js +0 -314
- package/dist/agents/registry.js.map +0 -1
- package/dist/agents/retry.js +0 -229
- package/dist/agents/retry.js.map +0 -1
- package/dist/audit-prune.js +0 -94
- package/dist/audit-prune.js.map +0 -1
- package/dist/audit.js +0 -68
- package/dist/audit.js.map +0 -1
- package/dist/backfill/index.js +0 -229
- package/dist/backfill/index.js.map +0 -1
- package/dist/bootstrap.js +0 -367
- package/dist/bootstrap.js.map +0 -1
- package/dist/caamp/adapter.js +0 -434
- package/dist/caamp/adapter.js.map +0 -1
- package/dist/caamp/capability-check.js +0 -38
- package/dist/caamp/capability-check.js.map +0 -1
- package/dist/caamp/index.js +0 -23
- package/dist/caamp/index.js.map +0 -1
- package/dist/caamp-init.js +0 -16
- package/dist/caamp-init.js.map +0 -1
- package/dist/cleo.js +0 -302
- package/dist/cleo.js.map +0 -1
- package/dist/codebase-map/analyzers/architecture.js +0 -130
- package/dist/codebase-map/analyzers/architecture.js.map +0 -1
- package/dist/codebase-map/analyzers/concerns.js +0 -122
- package/dist/codebase-map/analyzers/concerns.js.map +0 -1
- package/dist/codebase-map/analyzers/conventions.js +0 -149
- package/dist/codebase-map/analyzers/conventions.js.map +0 -1
- package/dist/codebase-map/analyzers/integrations.js +0 -108
- package/dist/codebase-map/analyzers/integrations.js.map +0 -1
- package/dist/codebase-map/analyzers/stack.js +0 -117
- package/dist/codebase-map/analyzers/stack.js.map +0 -1
- package/dist/codebase-map/analyzers/structure.js +0 -137
- package/dist/codebase-map/analyzers/structure.js.map +0 -1
- package/dist/codebase-map/analyzers/testing.js +0 -118
- package/dist/codebase-map/analyzers/testing.js.map +0 -1
- package/dist/codebase-map/index.js +0 -57
- package/dist/codebase-map/index.js.map +0 -1
- package/dist/codebase-map/store.js +0 -122
- package/dist/codebase-map/store.js.map +0 -1
- package/dist/codebase-map/summary.js +0 -152
- package/dist/codebase-map/summary.js.map +0 -1
- package/dist/compliance/index.js +0 -288
- package/dist/compliance/index.js.map +0 -1
- package/dist/compliance/protocol-enforcement.js +0 -332
- package/dist/compliance/protocol-enforcement.js.map +0 -1
- package/dist/compliance/protocol-rules.js +0 -786
- package/dist/compliance/protocol-rules.js.map +0 -1
- package/dist/compliance/protocol-types.js +0 -80
- package/dist/compliance/protocol-types.js.map +0 -1
- package/dist/compliance/store.js +0 -53
- package/dist/compliance/store.js.map +0 -1
- package/dist/config/build-config.js +0 -29
- package/dist/config/build-config.js.map +0 -1
- package/dist/config.js +0 -370
- package/dist/config.js.map +0 -1
- package/dist/constants.js +0 -18
- package/dist/constants.js.map +0 -1
- package/dist/context/index.js +0 -137
- package/dist/context/index.js.map +0 -1
- package/dist/engine-result.js +0 -12
- package/dist/engine-result.js.map +0 -1
- package/dist/error-catalog.js +0 -404
- package/dist/error-catalog.js.map +0 -1
- package/dist/error-registry.js +0 -393
- package/dist/error-registry.js.map +0 -1
- package/dist/errors.js +0 -167
- package/dist/errors.js.map +0 -1
- package/dist/hooks/handlers/error-hooks.js +0 -43
- package/dist/hooks/handlers/error-hooks.js.map +0 -1
- package/dist/hooks/handlers/file-hooks.js +0 -80
- package/dist/hooks/handlers/file-hooks.js.map +0 -1
- package/dist/hooks/handlers/index.js +0 -19
- package/dist/hooks/handlers/index.js.map +0 -1
- package/dist/hooks/handlers/mcp-hooks.js +0 -80
- package/dist/hooks/handlers/mcp-hooks.js.map +0 -1
- package/dist/hooks/handlers/session-hooks.js +0 -73
- package/dist/hooks/handlers/session-hooks.js.map +0 -1
- package/dist/hooks/handlers/task-hooks.js +0 -63
- package/dist/hooks/handlers/task-hooks.js.map +0 -1
- package/dist/hooks/index.js +0 -13
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/payload-schemas.js +0 -163
- package/dist/hooks/payload-schemas.js.map +0 -1
- package/dist/hooks/provider-hooks.js +0 -34
- package/dist/hooks/provider-hooks.js.map +0 -1
- package/dist/hooks/registry.js +0 -176
- package/dist/hooks/registry.js.map +0 -1
- package/dist/hooks/types.js +0 -62
- package/dist/hooks/types.js.map +0 -1
- package/dist/hooks.js +0 -136
- package/dist/hooks.js.map +0 -1
- package/dist/init.js +0 -711
- package/dist/init.js.map +0 -1
- package/dist/inject/index.js +0 -82
- package/dist/inject/index.js.map +0 -1
- package/dist/injection.js +0 -343
- package/dist/injection.js.map +0 -1
- package/dist/intelligence/adaptive-validation.js +0 -497
- package/dist/intelligence/adaptive-validation.js.map +0 -1
- package/dist/intelligence/impact.js +0 -675
- package/dist/intelligence/impact.js.map +0 -1
- package/dist/intelligence/index.js +0 -22
- package/dist/intelligence/index.js.map +0 -1
- package/dist/intelligence/patterns.js +0 -492
- package/dist/intelligence/patterns.js.map +0 -1
- package/dist/intelligence/prediction.js +0 -499
- package/dist/intelligence/prediction.js.map +0 -1
- package/dist/intelligence/types.js +0 -13
- package/dist/intelligence/types.js.map +0 -1
- package/dist/internal.js +0 -269
- package/dist/internal.js.map +0 -1
- package/dist/issue/create.js +0 -121
- package/dist/issue/create.js.map +0 -1
- package/dist/issue/diagnostics.js +0 -59
- package/dist/issue/diagnostics.js.map +0 -1
- package/dist/issue/index.js +0 -10
- package/dist/issue/index.js.map +0 -1
- package/dist/issue/template-parser.js +0 -267
- package/dist/issue/template-parser.js.map +0 -1
- package/dist/json-schema-validator.js +0 -76
- package/dist/json-schema-validator.js.map +0 -1
- package/dist/lib/index.js +0 -10
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/retry.js +0 -152
- package/dist/lib/retry.js.map +0 -1
- package/dist/lifecycle/chain-composition.js +0 -152
- package/dist/lifecycle/chain-composition.js.map +0 -1
- package/dist/lifecycle/chain-store.js +0 -246
- package/dist/lifecycle/chain-store.js.map +0 -1
- package/dist/lifecycle/consolidate-rcasd.js +0 -352
- package/dist/lifecycle/consolidate-rcasd.js.map +0 -1
- package/dist/lifecycle/default-chain.js +0 -167
- package/dist/lifecycle/default-chain.js.map +0 -1
- package/dist/lifecycle/evidence.js +0 -180
- package/dist/lifecycle/evidence.js.map +0 -1
- package/dist/lifecycle/frontmatter.js +0 -363
- package/dist/lifecycle/frontmatter.js.map +0 -1
- package/dist/lifecycle/index.js +0 -753
- package/dist/lifecycle/index.js.map +0 -1
- package/dist/lifecycle/pipeline.js +0 -656
- package/dist/lifecycle/pipeline.js.map +0 -1
- package/dist/lifecycle/rcasd-index.js +0 -326
- package/dist/lifecycle/rcasd-index.js.map +0 -1
- package/dist/lifecycle/rcasd-paths.js +0 -220
- package/dist/lifecycle/rcasd-paths.js.map +0 -1
- package/dist/lifecycle/resume.js +0 -864
- package/dist/lifecycle/resume.js.map +0 -1
- package/dist/lifecycle/stage-artifacts.js +0 -94
- package/dist/lifecycle/stage-artifacts.js.map +0 -1
- package/dist/lifecycle/stages.js +0 -534
- package/dist/lifecycle/stages.js.map +0 -1
- package/dist/lifecycle/state-machine.js +0 -516
- package/dist/lifecycle/state-machine.js.map +0 -1
- package/dist/lifecycle/tessera-engine.js +0 -249
- package/dist/lifecycle/tessera-engine.js.map +0 -1
- package/dist/logger.js +0 -140
- package/dist/logger.js.map +0 -1
- package/dist/mcp/index.js +0 -146
- package/dist/mcp/index.js.map +0 -1
- package/dist/memory/auto-extract.js +0 -143
- package/dist/memory/auto-extract.js.map +0 -1
- package/dist/memory/brain-embedding.js +0 -49
- package/dist/memory/brain-embedding.js.map +0 -1
- package/dist/memory/brain-lifecycle.js +0 -298
- package/dist/memory/brain-lifecycle.js.map +0 -1
- package/dist/memory/brain-links.js +0 -148
- package/dist/memory/brain-links.js.map +0 -1
- package/dist/memory/brain-migration.js +0 -149
- package/dist/memory/brain-migration.js.map +0 -1
- package/dist/memory/brain-reasoning.js +0 -215
- package/dist/memory/brain-reasoning.js.map +0 -1
- package/dist/memory/brain-retrieval.js +0 -474
- package/dist/memory/brain-retrieval.js.map +0 -1
- package/dist/memory/brain-row-types.js +0 -10
- package/dist/memory/brain-row-types.js.map +0 -1
- package/dist/memory/brain-search.js +0 -519
- package/dist/memory/brain-search.js.map +0 -1
- package/dist/memory/brain-similarity.js +0 -145
- package/dist/memory/brain-similarity.js.map +0 -1
- package/dist/memory/claude-mem-migration.js +0 -277
- package/dist/memory/claude-mem-migration.js.map +0 -1
- package/dist/memory/decisions.js +0 -148
- package/dist/memory/decisions.js.map +0 -1
- package/dist/memory/engine-compat.js +0 -1030
- package/dist/memory/engine-compat.js.map +0 -1
- package/dist/memory/index.js +0 -773
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/learnings.js +0 -121
- package/dist/memory/learnings.js.map +0 -1
- package/dist/memory/memory-bridge.js +0 -289
- package/dist/memory/memory-bridge.js.map +0 -1
- package/dist/memory/patterns.js +0 -122
- package/dist/memory/patterns.js.map +0 -1
- package/dist/memory/pipeline-manifest-sqlite.js +0 -975
- package/dist/memory/pipeline-manifest-sqlite.js.map +0 -1
- package/dist/memory/session-memory.js +0 -226
- package/dist/memory/session-memory.js.map +0 -1
- package/dist/metrics/ab-test.js +0 -260
- package/dist/metrics/ab-test.js.map +0 -1
- package/dist/metrics/aggregation.js +0 -363
- package/dist/metrics/aggregation.js.map +0 -1
- package/dist/metrics/common.js +0 -64
- package/dist/metrics/common.js.map +0 -1
- package/dist/metrics/enums.js +0 -78
- package/dist/metrics/enums.js.map +0 -1
- package/dist/metrics/index.js +0 -19
- package/dist/metrics/index.js.map +0 -1
- package/dist/metrics/model-provider-registry.js +0 -88
- package/dist/metrics/model-provider-registry.js.map +0 -1
- package/dist/metrics/otel-integration.js +0 -263
- package/dist/metrics/otel-integration.js.map +0 -1
- package/dist/metrics/provider-detection.js +0 -103
- package/dist/metrics/provider-detection.js.map +0 -1
- package/dist/metrics/token-estimation.js +0 -253
- package/dist/metrics/token-estimation.js.map +0 -1
- package/dist/metrics/token-service.js +0 -450
- package/dist/metrics/token-service.js.map +0 -1
- package/dist/migration/agent-outputs.js +0 -316
- package/dist/migration/agent-outputs.js.map +0 -1
- package/dist/migration/checksum.js +0 -92
- package/dist/migration/checksum.js.map +0 -1
- package/dist/migration/index.js +0 -282
- package/dist/migration/index.js.map +0 -1
- package/dist/migration/logger.js +0 -360
- package/dist/migration/logger.js.map +0 -1
- package/dist/migration/preflight.js +0 -9
- package/dist/migration/preflight.js.map +0 -1
- package/dist/migration/state.js +0 -421
- package/dist/migration/state.js.map +0 -1
- package/dist/migration/validate.js +0 -241
- package/dist/migration/validate.js.map +0 -1
- package/dist/nexus/deps.js +0 -375
- package/dist/nexus/deps.js.map +0 -1
- package/dist/nexus/discover.js +0 -288
- package/dist/nexus/discover.js.map +0 -1
- package/dist/nexus/hash.js +0 -10
- package/dist/nexus/hash.js.map +0 -1
- package/dist/nexus/index.js +0 -38
- package/dist/nexus/index.js.map +0 -1
- package/dist/nexus/migrate-json-to-sqlite.js +0 -115
- package/dist/nexus/migrate-json-to-sqlite.js.map +0 -1
- package/dist/nexus/permissions.js +0 -105
- package/dist/nexus/permissions.js.map +0 -1
- package/dist/nexus/query.js +0 -175
- package/dist/nexus/query.js.map +0 -1
- package/dist/nexus/registry.js +0 -584
- package/dist/nexus/registry.js.map +0 -1
- package/dist/nexus/sharing/index.js +0 -288
- package/dist/nexus/sharing/index.js.map +0 -1
- package/dist/nexus/transfer-types.js +0 -8
- package/dist/nexus/transfer-types.js.map +0 -1
- package/dist/nexus/transfer.js +0 -263
- package/dist/nexus/transfer.js.map +0 -1
- package/dist/observability/index.js +0 -103
- package/dist/observability/index.js.map +0 -1
- package/dist/observability/log-filter.js +0 -63
- package/dist/observability/log-filter.js.map +0 -1
- package/dist/observability/log-parser.js +0 -99
- package/dist/observability/log-parser.js.map +0 -1
- package/dist/observability/log-reader.js +0 -139
- package/dist/observability/log-reader.js.map +0 -1
- package/dist/observability/types.js +0 -19
- package/dist/observability/types.js.map +0 -1
- package/dist/orchestration/analyze.js +0 -107
- package/dist/orchestration/analyze.js.map +0 -1
- package/dist/orchestration/bootstrap.js +0 -132
- package/dist/orchestration/bootstrap.js.map +0 -1
- package/dist/orchestration/context.js +0 -56
- package/dist/orchestration/context.js.map +0 -1
- package/dist/orchestration/critical-path.js +0 -100
- package/dist/orchestration/critical-path.js.map +0 -1
- package/dist/orchestration/index.js +0 -286
- package/dist/orchestration/index.js.map +0 -1
- package/dist/orchestration/parallel.js +0 -89
- package/dist/orchestration/parallel.js.map +0 -1
- package/dist/orchestration/protocol-validators.js +0 -524
- package/dist/orchestration/protocol-validators.js.map +0 -1
- package/dist/orchestration/skill-ops.js +0 -98
- package/dist/orchestration/skill-ops.js.map +0 -1
- package/dist/orchestration/status.js +0 -107
- package/dist/orchestration/status.js.map +0 -1
- package/dist/orchestration/unblock.js +0 -103
- package/dist/orchestration/unblock.js.map +0 -1
- package/dist/orchestration/validate-spawn.js +0 -67
- package/dist/orchestration/validate-spawn.js.map +0 -1
- package/dist/orchestration/waves.js +0 -86
- package/dist/orchestration/waves.js.map +0 -1
- package/dist/otel/index.js +0 -163
- package/dist/otel/index.js.map +0 -1
- package/dist/output.js +0 -132
- package/dist/output.js.map +0 -1
- package/dist/pagination.js +0 -61
- package/dist/pagination.js.map +0 -1
- package/dist/paths.js +0 -337
- package/dist/paths.js.map +0 -1
- package/dist/phases/deps.js +0 -372
- package/dist/phases/deps.js.map +0 -1
- package/dist/phases/index.js +0 -349
- package/dist/phases/index.js.map +0 -1
- package/dist/pipeline/index.js +0 -10
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/phase.js +0 -45
- package/dist/pipeline/phase.js.map +0 -1
- package/dist/platform.js +0 -211
- package/dist/platform.js.map +0 -1
- package/dist/project-info.js +0 -84
- package/dist/project-info.js.map +0 -1
- package/dist/reconciliation/index.js +0 -10
- package/dist/reconciliation/index.js.map +0 -1
- package/dist/reconciliation/link-store.js +0 -129
- package/dist/reconciliation/link-store.js.map +0 -1
- package/dist/reconciliation/reconciliation-engine.js +0 -298
- package/dist/reconciliation/reconciliation-engine.js.map +0 -1
- package/dist/release/artifacts.js +0 -427
- package/dist/release/artifacts.js.map +0 -1
- package/dist/release/changelog-writer.js +0 -151
- package/dist/release/changelog-writer.js.map +0 -1
- package/dist/release/channel.js +0 -144
- package/dist/release/channel.js.map +0 -1
- package/dist/release/ci.js +0 -166
- package/dist/release/ci.js.map +0 -1
- package/dist/release/github-pr.js +0 -225
- package/dist/release/github-pr.js.map +0 -1
- package/dist/release/guards.js +0 -116
- package/dist/release/guards.js.map +0 -1
- package/dist/release/index.js +0 -22
- package/dist/release/index.js.map +0 -1
- package/dist/release/release-config.js +0 -158
- package/dist/release/release-config.js.map +0 -1
- package/dist/release/release-manifest.js +0 -1019
- package/dist/release/release-manifest.js.map +0 -1
- package/dist/release/version-bump.js +0 -255
- package/dist/release/version-bump.js.map +0 -1
- package/dist/remote/index.js +0 -257
- package/dist/remote/index.js.map +0 -1
- package/dist/repair.js +0 -130
- package/dist/repair.js.map +0 -1
- package/dist/research/index.js +0 -2
- package/dist/research/index.js.map +0 -1
- package/dist/roadmap/index.js +0 -59
- package/dist/roadmap/index.js.map +0 -1
- package/dist/routing/capability-matrix.js +0 -1557
- package/dist/routing/capability-matrix.js.map +0 -1
- package/dist/routing/index.js +0 -9
- package/dist/routing/index.js.map +0 -1
- package/dist/scaffold.js +0 -1178
- package/dist/scaffold.js.map +0 -1
- package/dist/schema-management.js +0 -295
- package/dist/schema-management.js.map +0 -1
- package/dist/security/index.js +0 -9
- package/dist/security/index.js.map +0 -1
- package/dist/security/input-sanitization.js +0 -321
- package/dist/security/input-sanitization.js.map +0 -1
- package/dist/sequence/index.js +0 -295
- package/dist/sequence/index.js.map +0 -1
- package/dist/sessions/assumptions.js +0 -54
- package/dist/sessions/assumptions.js.map +0 -1
- package/dist/sessions/briefing.js +0 -377
- package/dist/sessions/briefing.js.map +0 -1
- package/dist/sessions/context-alert.js +0 -222
- package/dist/sessions/context-alert.js.map +0 -1
- package/dist/sessions/context-inject.js +0 -61
- package/dist/sessions/context-inject.js.map +0 -1
- package/dist/sessions/context-monitor.js +0 -98
- package/dist/sessions/context-monitor.js.map +0 -1
- package/dist/sessions/decisions.js +0 -65
- package/dist/sessions/decisions.js.map +0 -1
- package/dist/sessions/find.js +0 -63
- package/dist/sessions/find.js.map +0 -1
- package/dist/sessions/handoff.js +0 -328
- package/dist/sessions/handoff.js.map +0 -1
- package/dist/sessions/hitl-warnings.js +0 -254
- package/dist/sessions/hitl-warnings.js.map +0 -1
- package/dist/sessions/index.js +0 -318
- package/dist/sessions/index.js.map +0 -1
- package/dist/sessions/session-archive.js +0 -40
- package/dist/sessions/session-archive.js.map +0 -1
- package/dist/sessions/session-cleanup.js +0 -59
- package/dist/sessions/session-cleanup.js.map +0 -1
- package/dist/sessions/session-drift.js +0 -134
- package/dist/sessions/session-drift.js.map +0 -1
- package/dist/sessions/session-enforcement.js +0 -144
- package/dist/sessions/session-enforcement.js.map +0 -1
- package/dist/sessions/session-grade.js +0 -253
- package/dist/sessions/session-grade.js.map +0 -1
- package/dist/sessions/session-history.js +0 -42
- package/dist/sessions/session-history.js.map +0 -1
- package/dist/sessions/session-id.js +0 -81
- package/dist/sessions/session-id.js.map +0 -1
- package/dist/sessions/session-memory-bridge.js +0 -52
- package/dist/sessions/session-memory-bridge.js.map +0 -1
- package/dist/sessions/session-show.js +0 -24
- package/dist/sessions/session-show.js.map +0 -1
- package/dist/sessions/session-stats.js +0 -69
- package/dist/sessions/session-stats.js.map +0 -1
- package/dist/sessions/session-suspend.js +0 -39
- package/dist/sessions/session-suspend.js.map +0 -1
- package/dist/sessions/session-switch.js +0 -51
- package/dist/sessions/session-switch.js.map +0 -1
- package/dist/sessions/session-view.js +0 -76
- package/dist/sessions/session-view.js.map +0 -1
- package/dist/sessions/statusline-setup.js +0 -85
- package/dist/sessions/statusline-setup.js.map +0 -1
- package/dist/sessions/types.js +0 -8
- package/dist/sessions/types.js.map +0 -1
- package/dist/signaldock/claude-code-transport.js +0 -107
- package/dist/signaldock/claude-code-transport.js.map +0 -1
- package/dist/signaldock/factory.js +0 -25
- package/dist/signaldock/factory.js.map +0 -1
- package/dist/signaldock/index.js +0 -9
- package/dist/signaldock/index.js.map +0 -1
- package/dist/signaldock/signaldock-transport.js +0 -122
- package/dist/signaldock/signaldock-transport.js.map +0 -1
- package/dist/signaldock/transport.js +0 -11
- package/dist/signaldock/transport.js.map +0 -1
- package/dist/signaldock/types.js +0 -11
- package/dist/signaldock/types.js.map +0 -1
- package/dist/skills/agents/config.js +0 -94
- package/dist/skills/agents/config.js.map +0 -1
- package/dist/skills/agents/install.js +0 -116
- package/dist/skills/agents/install.js.map +0 -1
- package/dist/skills/agents/registry.js +0 -161
- package/dist/skills/agents/registry.js.map +0 -1
- package/dist/skills/discovery.js +0 -333
- package/dist/skills/discovery.js.map +0 -1
- package/dist/skills/dispatch.js +0 -347
- package/dist/skills/dispatch.js.map +0 -1
- package/dist/skills/dynamic-skill-generator.js +0 -100
- package/dist/skills/dynamic-skill-generator.js.map +0 -1
- package/dist/skills/index.js +0 -44
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/injection/subagent.js +0 -195
- package/dist/skills/injection/subagent.js.map +0 -1
- package/dist/skills/injection/token.js +0 -260
- package/dist/skills/injection/token.js.map +0 -1
- package/dist/skills/install.js +0 -40
- package/dist/skills/install.js.map +0 -1
- package/dist/skills/manifests/contribution.js +0 -175
- package/dist/skills/manifests/contribution.js.map +0 -1
- package/dist/skills/manifests/research.js +0 -281
- package/dist/skills/manifests/research.js.map +0 -1
- package/dist/skills/manifests/resolver.js +0 -146
- package/dist/skills/manifests/resolver.js.map +0 -1
- package/dist/skills/marketplace.js +0 -90
- package/dist/skills/marketplace.js.map +0 -1
- package/dist/skills/orchestrator/spawn.js +0 -178
- package/dist/skills/orchestrator/spawn.js.map +0 -1
- package/dist/skills/orchestrator/startup.js +0 -451
- package/dist/skills/orchestrator/startup.js.map +0 -1
- package/dist/skills/orchestrator/validator.js +0 -301
- package/dist/skills/orchestrator/validator.js.map +0 -1
- package/dist/skills/precedence-integration.js +0 -73
- package/dist/skills/precedence-integration.js.map +0 -1
- package/dist/skills/precedence-types.js +0 -16
- package/dist/skills/precedence-types.js.map +0 -1
- package/dist/skills/routing-table.js +0 -63
- package/dist/skills/routing-table.js.map +0 -1
- package/dist/skills/skill-paths.js +0 -220
- package/dist/skills/skill-paths.js.map +0 -1
- package/dist/skills/test-utility.js +0 -55
- package/dist/skills/test-utility.js.map +0 -1
- package/dist/skills/types.js +0 -118
- package/dist/skills/types.js.map +0 -1
- package/dist/skills/validation.js +0 -183
- package/dist/skills/validation.js.map +0 -1
- package/dist/skills/version.js +0 -57
- package/dist/skills/version.js.map +0 -1
- package/dist/snapshot/index.js +0 -188
- package/dist/snapshot/index.js.map +0 -1
- package/dist/spawn/adapter-registry.js +0 -246
- package/dist/spawn/adapter-registry.js.map +0 -1
- package/dist/spawn/index.js +0 -10
- package/dist/spawn/index.js.map +0 -1
- package/dist/stats/index.js +0 -343
- package/dist/stats/index.js.map +0 -1
- package/dist/stats/workflow-telemetry.js +0 -400
- package/dist/stats/workflow-telemetry.js.map +0 -1
- package/dist/sticky/archive.js +0 -47
- package/dist/sticky/archive.js.map +0 -1
- package/dist/sticky/convert.js +0 -235
- package/dist/sticky/convert.js.map +0 -1
- package/dist/sticky/create.js +0 -48
- package/dist/sticky/create.js.map +0 -1
- package/dist/sticky/id.js +0 -35
- package/dist/sticky/id.js.map +0 -1
- package/dist/sticky/index.js +0 -16
- package/dist/sticky/index.js.map +0 -1
- package/dist/sticky/list.js +0 -44
- package/dist/sticky/list.js.map +0 -1
- package/dist/sticky/purge.js +0 -45
- package/dist/sticky/purge.js.map +0 -1
- package/dist/sticky/show.js +0 -42
- package/dist/sticky/show.js.map +0 -1
- package/dist/sticky/types.js +0 -10
- package/dist/sticky/types.js.map +0 -1
- package/dist/store/atomic.js +0 -167
- package/dist/store/atomic.js.map +0 -1
- package/dist/store/backup.js +0 -94
- package/dist/store/backup.js.map +0 -1
- package/dist/store/brain-accessor.js +0 -397
- package/dist/store/brain-accessor.js.map +0 -1
- package/dist/store/brain-schema.js +0 -215
- package/dist/store/brain-schema.js.map +0 -1
- package/dist/store/brain-sqlite.js +0 -271
- package/dist/store/brain-sqlite.js.map +0 -1
- package/dist/store/cache.js +0 -168
- package/dist/store/cache.js.map +0 -1
- package/dist/store/chain-schema.js +0 -51
- package/dist/store/chain-schema.js.map +0 -1
- package/dist/store/converters.js +0 -122
- package/dist/store/converters.js.map +0 -1
- package/dist/store/cross-db-cleanup.js +0 -169
- package/dist/store/cross-db-cleanup.js.map +0 -1
- package/dist/store/data-accessor.js +0 -26
- package/dist/store/data-accessor.js.map +0 -1
- package/dist/store/data-safety-central.js +0 -269
- package/dist/store/data-safety-central.js.map +0 -1
- package/dist/store/data-safety.js +0 -274
- package/dist/store/data-safety.js.map +0 -1
- package/dist/store/db-helpers.js +0 -223
- package/dist/store/db-helpers.js.map +0 -1
- package/dist/store/export.js +0 -155
- package/dist/store/export.js.map +0 -1
- package/dist/store/file-utils.js +0 -270
- package/dist/store/file-utils.js.map +0 -1
- package/dist/store/git-checkpoint.js +0 -365
- package/dist/store/git-checkpoint.js.map +0 -1
- package/dist/store/import-logging.js +0 -139
- package/dist/store/import-logging.js.map +0 -1
- package/dist/store/import-remap.js +0 -145
- package/dist/store/import-remap.js.map +0 -1
- package/dist/store/import-sort.js +0 -121
- package/dist/store/import-sort.js.map +0 -1
- package/dist/store/index.js +0 -28
- package/dist/store/index.js.map +0 -1
- package/dist/store/json.js +0 -208
- package/dist/store/json.js.map +0 -1
- package/dist/store/lifecycle-store.js +0 -249
- package/dist/store/lifecycle-store.js.map +0 -1
- package/dist/store/lock.js +0 -70
- package/dist/store/lock.js.map +0 -1
- package/dist/store/migration-sqlite.js +0 -676
- package/dist/store/migration-sqlite.js.map +0 -1
- package/dist/store/nexus-schema.js +0 -62
- package/dist/store/nexus-schema.js.map +0 -1
- package/dist/store/nexus-sqlite.js +0 -217
- package/dist/store/nexus-sqlite.js.map +0 -1
- package/dist/store/nexus-validation-schemas.js +0 -40
- package/dist/store/nexus-validation-schemas.js.map +0 -1
- package/dist/store/parsers.js +0 -37
- package/dist/store/parsers.js.map +0 -1
- package/dist/store/project-detect.js +0 -457
- package/dist/store/project-detect.js.map +0 -1
- package/dist/store/provider.js +0 -101
- package/dist/store/provider.js.map +0 -1
- package/dist/store/safety-data-accessor.js +0 -243
- package/dist/store/safety-data-accessor.js.map +0 -1
- package/dist/store/schema.js +0 -7
- package/dist/store/schema.js.map +0 -1
- package/dist/store/session-store.js +0 -219
- package/dist/store/session-store.js.map +0 -1
- package/dist/store/sqlite-backup.js +0 -105
- package/dist/store/sqlite-backup.js.map +0 -1
- package/dist/store/sqlite-data-accessor.js +0 -734
- package/dist/store/sqlite-data-accessor.js.map +0 -1
- package/dist/store/sqlite.js +0 -554
- package/dist/store/sqlite.js.map +0 -1
- package/dist/store/status-registry.js +0 -8
- package/dist/store/status-registry.js.map +0 -1
- package/dist/store/task-store.js +0 -348
- package/dist/store/task-store.js.map +0 -1
- package/dist/store/tasks-schema.js +0 -604
- package/dist/store/tasks-schema.js.map +0 -1
- package/dist/store/typed-query.js +0 -15
- package/dist/store/typed-query.js.map +0 -1
- package/dist/store/validation-schemas.js +0 -278
- package/dist/store/validation-schemas.js.map +0 -1
- package/dist/system/archive-analytics.js +0 -277
- package/dist/system/archive-analytics.js.map +0 -1
- package/dist/system/archive-stats.js +0 -64
- package/dist/system/archive-stats.js.map +0 -1
- package/dist/system/audit.js +0 -145
- package/dist/system/audit.js.map +0 -1
- package/dist/system/backup.js +0 -141
- package/dist/system/backup.js.map +0 -1
- package/dist/system/cleanup.js +0 -134
- package/dist/system/cleanup.js.map +0 -1
- package/dist/system/health.js +0 -1054
- package/dist/system/health.js.map +0 -1
- package/dist/system/index.js +0 -18
- package/dist/system/index.js.map +0 -1
- package/dist/system/inject-generate.js +0 -122
- package/dist/system/inject-generate.js.map +0 -1
- package/dist/system/labels.js +0 -38
- package/dist/system/labels.js.map +0 -1
- package/dist/system/metrics.js +0 -61
- package/dist/system/metrics.js.map +0 -1
- package/dist/system/migrate.js +0 -43
- package/dist/system/migrate.js.map +0 -1
- package/dist/system/platform-paths.js +0 -80
- package/dist/system/platform-paths.js.map +0 -1
- package/dist/system/runtime.js +0 -161
- package/dist/system/runtime.js.map +0 -1
- package/dist/system/safestop.js +0 -99
- package/dist/system/safestop.js.map +0 -1
- package/dist/system/storage-preflight.js +0 -123
- package/dist/system/storage-preflight.js.map +0 -1
- package/dist/task-work/index.js +0 -155
- package/dist/task-work/index.js.map +0 -1
- package/dist/tasks/add.js +0 -656
- package/dist/tasks/add.js.map +0 -1
- package/dist/tasks/analyze.js +0 -85
- package/dist/tasks/analyze.js.map +0 -1
- package/dist/tasks/archive.js +0 -90
- package/dist/tasks/archive.js.map +0 -1
- package/dist/tasks/atomicity.js +0 -83
- package/dist/tasks/atomicity.js.map +0 -1
- package/dist/tasks/cancel-ops.js +0 -83
- package/dist/tasks/cancel-ops.js.map +0 -1
- package/dist/tasks/complete.js +0 -235
- package/dist/tasks/complete.js.map +0 -1
- package/dist/tasks/crossref-extract.js +0 -73
- package/dist/tasks/crossref-extract.js.map +0 -1
- package/dist/tasks/delete-preview.js +0 -192
- package/dist/tasks/delete-preview.js.map +0 -1
- package/dist/tasks/delete.js +0 -120
- package/dist/tasks/delete.js.map +0 -1
- package/dist/tasks/deletion-strategy.js +0 -200
- package/dist/tasks/deletion-strategy.js.map +0 -1
- package/dist/tasks/dependency-check.js +0 -278
- package/dist/tasks/dependency-check.js.map +0 -1
- package/dist/tasks/deps-ready.js +0 -32
- package/dist/tasks/deps-ready.js.map +0 -1
- package/dist/tasks/enforcement.js +0 -89
- package/dist/tasks/enforcement.js.map +0 -1
- package/dist/tasks/epic-enforcement.js +0 -294
- package/dist/tasks/epic-enforcement.js.map +0 -1
- package/dist/tasks/find.js +0 -148
- package/dist/tasks/find.js.map +0 -1
- package/dist/tasks/graph-cache.js +0 -127
- package/dist/tasks/graph-cache.js.map +0 -1
- package/dist/tasks/graph-ops.js +0 -171
- package/dist/tasks/graph-ops.js.map +0 -1
- package/dist/tasks/graph-rag.js +0 -328
- package/dist/tasks/graph-rag.js.map +0 -1
- package/dist/tasks/hierarchy-policy.js +0 -149
- package/dist/tasks/hierarchy-policy.js.map +0 -1
- package/dist/tasks/hierarchy.js +0 -185
- package/dist/tasks/hierarchy.js.map +0 -1
- package/dist/tasks/id-generator.js +0 -65
- package/dist/tasks/id-generator.js.map +0 -1
- package/dist/tasks/index.js +0 -14
- package/dist/tasks/index.js.map +0 -1
- package/dist/tasks/labels.js +0 -52
- package/dist/tasks/labels.js.map +0 -1
- package/dist/tasks/list.js +0 -68
- package/dist/tasks/list.js.map +0 -1
- package/dist/tasks/phase-tracking.js +0 -133
- package/dist/tasks/phase-tracking.js.map +0 -1
- package/dist/tasks/pipeline-stage.js +0 -248
- package/dist/tasks/pipeline-stage.js.map +0 -1
- package/dist/tasks/plan.js +0 -268
- package/dist/tasks/plan.js.map +0 -1
- package/dist/tasks/relates.js +0 -89
- package/dist/tasks/relates.js.map +0 -1
- package/dist/tasks/reparent.d.ts +0 -38
- package/dist/tasks/reparent.d.ts.map +0 -1
- package/dist/tasks/show.js +0 -78
- package/dist/tasks/show.js.map +0 -1
- package/dist/tasks/size-weighting.js +0 -86
- package/dist/tasks/size-weighting.js.map +0 -1
- package/dist/tasks/staleness.js +0 -86
- package/dist/tasks/staleness.js.map +0 -1
- package/dist/tasks/task-ops.js +0 -1340
- package/dist/tasks/task-ops.js.map +0 -1
- package/dist/tasks/update.js +0 -271
- package/dist/tasks/update.js.map +0 -1
- package/dist/templates/index.js +0 -10
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/parser.js +0 -254
- package/dist/templates/parser.js.map +0 -1
- package/dist/ui/aliases.js +0 -153
- package/dist/ui/aliases.js.map +0 -1
- package/dist/ui/changelog.js +0 -184
- package/dist/ui/changelog.js.map +0 -1
- package/dist/ui/command-registry.js +0 -168
- package/dist/ui/command-registry.js.map +0 -1
- package/dist/ui/flags.js +0 -94
- package/dist/ui/flags.js.map +0 -1
- package/dist/ui/index.js +0 -24
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/injection-legacy.d.ts +0 -26
- package/dist/ui/injection-legacy.d.ts.map +0 -1
- package/dist/ui/injection-legacy.js +0 -42
- package/dist/ui/injection-legacy.js.map +0 -1
- package/dist/upgrade.js +0 -901
- package/dist/upgrade.js.map +0 -1
- package/dist/validation/chain-validation.js +0 -146
- package/dist/validation/chain-validation.js.map +0 -1
- package/dist/validation/compliance.js +0 -155
- package/dist/validation/compliance.js.map +0 -1
- package/dist/validation/docs-sync.js +0 -212
- package/dist/validation/docs-sync.js.map +0 -1
- package/dist/validation/doctor/checks.js +0 -1069
- package/dist/validation/doctor/checks.js.map +0 -1
- package/dist/validation/doctor/index.js +0 -9
- package/dist/validation/doctor/index.js.map +0 -1
- package/dist/validation/doctor/project-cache.js +0 -160
- package/dist/validation/doctor/project-cache.js.map +0 -1
- package/dist/validation/doctor/utils.js +0 -155
- package/dist/validation/doctor/utils.js.map +0 -1
- package/dist/validation/engine.js +0 -902
- package/dist/validation/engine.js.map +0 -1
- package/dist/validation/gap-check.js +0 -175
- package/dist/validation/gap-check.js.map +0 -1
- package/dist/validation/index.js +0 -40
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/manifest.js +0 -237
- package/dist/validation/manifest.js.map +0 -1
- package/dist/validation/operation-gate-validators.js +0 -724
- package/dist/validation/operation-gate-validators.js.map +0 -1
- package/dist/validation/operation-verification-gates.js +0 -532
- package/dist/validation/operation-verification-gates.js.map +0 -1
- package/dist/validation/param-utils.js +0 -139
- package/dist/validation/param-utils.js.map +0 -1
- package/dist/validation/protocol-common.js +0 -300
- package/dist/validation/protocol-common.js.map +0 -1
- package/dist/validation/protocols/consensus.js +0 -71
- package/dist/validation/protocols/consensus.js.map +0 -1
- package/dist/validation/protocols/contribution.js +0 -59
- package/dist/validation/protocols/contribution.js.map +0 -1
- package/dist/validation/protocols/decomposition.js +0 -59
- package/dist/validation/protocols/decomposition.js.map +0 -1
- package/dist/validation/protocols/implementation.js +0 -59
- package/dist/validation/protocols/implementation.js.map +0 -1
- package/dist/validation/protocols/release-protocol.js +0 -60
- package/dist/validation/protocols/release-protocol.js.map +0 -1
- package/dist/validation/protocols/research.js +0 -77
- package/dist/validation/protocols/research.js.map +0 -1
- package/dist/validation/protocols/specification.js +0 -84
- package/dist/validation/protocols/specification.js.map +0 -1
- package/dist/validation/protocols/testing-protocol.js +0 -70
- package/dist/validation/protocols/testing-protocol.js.map +0 -1
- package/dist/validation/protocols/validation-protocol.js +0 -70
- package/dist/validation/protocols/validation-protocol.js.map +0 -1
- package/dist/validation/schema-integrity.js +0 -170
- package/dist/validation/schema-integrity.js.map +0 -1
- package/dist/validation/schema-validator.js +0 -176
- package/dist/validation/schema-validator.js.map +0 -1
- package/dist/validation/validate-ops.js +0 -937
- package/dist/validation/validate-ops.js.map +0 -1
- package/dist/validation/validation-rules.js +0 -226
- package/dist/validation/validation-rules.js.map +0 -1
- package/dist/validation/verification.js +0 -321
- package/dist/validation/verification.js.map +0 -1
|
@@ -1,1030 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory Engine Compatibility Layer — Brain.db Cognitive Memory
|
|
3
|
-
*
|
|
4
|
-
* Async wrappers around brain.db cognitive memory functions that return
|
|
5
|
-
* EngineResult<T> format for consumption by the dispatch layer.
|
|
6
|
-
*
|
|
7
|
-
* After the memory domain cutover (T5241), this file contains ONLY
|
|
8
|
-
* brain.db-backed operations. Manifest operations moved to
|
|
9
|
-
* pipeline-manifest-compat.ts, and context injection moved to
|
|
10
|
-
* sessions/context-inject.ts.
|
|
11
|
-
*
|
|
12
|
-
* @task T5241
|
|
13
|
-
* @epic T5149
|
|
14
|
-
*/
|
|
15
|
-
import { getProjectRoot } from '../paths.js';
|
|
16
|
-
// BRAIN accessor for direct table queries (T5241)
|
|
17
|
-
import { getBrainAccessor } from '../store/brain-accessor.js';
|
|
18
|
-
import { getAccessor } from '../store/data-accessor.js';
|
|
19
|
-
import { linkMemoryToTask, unlinkMemoryFromTask } from './brain-links.js';
|
|
20
|
-
// BRAIN retrieval imports (T5131-T5135)
|
|
21
|
-
import { fetchBrainEntries, observeBrain, searchBrainCompact, timelineBrain, } from './brain-retrieval.js';
|
|
22
|
-
import { learningStats, searchLearnings, storeLearning, } from './learnings.js';
|
|
23
|
-
// BRAIN memory imports (T4770)
|
|
24
|
-
import { patternStats, searchPatterns, storePattern, } from './patterns.js';
|
|
25
|
-
// ============================================================================
|
|
26
|
-
// Internal helpers
|
|
27
|
-
// ============================================================================
|
|
28
|
-
function resolveRoot(projectRoot) {
|
|
29
|
-
return projectRoot || getProjectRoot();
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Parse brain.db entry ID prefix to determine the table type.
|
|
33
|
-
*
|
|
34
|
-
* Conventions:
|
|
35
|
-
* - D... -> decision (D001, D-xxx)
|
|
36
|
-
* - P... -> pattern (P001, P-xxx)
|
|
37
|
-
* - L... -> learning (L001, L-xxx)
|
|
38
|
-
* - O... or CM-... -> observation (O-xxx, CM-xxx)
|
|
39
|
-
*/
|
|
40
|
-
function parseIdPrefix(id) {
|
|
41
|
-
if (id.startsWith('D-') || /^D\d/.test(id))
|
|
42
|
-
return 'decision';
|
|
43
|
-
if (id.startsWith('P-') || /^P\d/.test(id))
|
|
44
|
-
return 'pattern';
|
|
45
|
-
if (id.startsWith('L-') || /^L\d/.test(id))
|
|
46
|
-
return 'learning';
|
|
47
|
-
if (id.startsWith('O-') || id.startsWith('O') || id.startsWith('CM-'))
|
|
48
|
-
return 'observation';
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
// ============================================================================
|
|
52
|
-
// Brain.db Entry Lookup
|
|
53
|
-
// ============================================================================
|
|
54
|
-
/** memory.show - Look up a brain.db entry by ID */
|
|
55
|
-
export async function memoryShow(entryId, projectRoot) {
|
|
56
|
-
if (!entryId) {
|
|
57
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'entryId is required' } };
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
const root = resolveRoot(projectRoot);
|
|
61
|
-
const entryType = parseIdPrefix(entryId);
|
|
62
|
-
if (!entryType) {
|
|
63
|
-
return {
|
|
64
|
-
success: false,
|
|
65
|
-
error: {
|
|
66
|
-
code: 'E_INVALID_INPUT',
|
|
67
|
-
message: `Unknown entry ID format: '${entryId}'. Expected prefix D-, P-, L-, or O-`,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
const accessor = await getBrainAccessor(root);
|
|
72
|
-
switch (entryType) {
|
|
73
|
-
case 'decision': {
|
|
74
|
-
const row = await accessor.getDecision(entryId);
|
|
75
|
-
if (!row) {
|
|
76
|
-
return {
|
|
77
|
-
success: false,
|
|
78
|
-
error: { code: 'E_NOT_FOUND', message: `Decision '${entryId}' not found in brain.db` },
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return { success: true, data: { type: 'decision', entry: row } };
|
|
82
|
-
}
|
|
83
|
-
case 'pattern': {
|
|
84
|
-
const row = await accessor.getPattern(entryId);
|
|
85
|
-
if (!row) {
|
|
86
|
-
return {
|
|
87
|
-
success: false,
|
|
88
|
-
error: { code: 'E_NOT_FOUND', message: `Pattern '${entryId}' not found in brain.db` },
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
return { success: true, data: { type: 'pattern', entry: row } };
|
|
92
|
-
}
|
|
93
|
-
case 'learning': {
|
|
94
|
-
const row = await accessor.getLearning(entryId);
|
|
95
|
-
if (!row) {
|
|
96
|
-
return {
|
|
97
|
-
success: false,
|
|
98
|
-
error: { code: 'E_NOT_FOUND', message: `Learning '${entryId}' not found in brain.db` },
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
return { success: true, data: { type: 'learning', entry: row } };
|
|
102
|
-
}
|
|
103
|
-
case 'observation': {
|
|
104
|
-
const row = await accessor.getObservation(entryId);
|
|
105
|
-
if (!row) {
|
|
106
|
-
return {
|
|
107
|
-
success: false,
|
|
108
|
-
error: {
|
|
109
|
-
code: 'E_NOT_FOUND',
|
|
110
|
-
message: `Observation '${entryId}' not found in brain.db`,
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return { success: true, data: { type: 'observation', entry: row } };
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
return {
|
|
120
|
-
success: false,
|
|
121
|
-
error: {
|
|
122
|
-
code: 'E_BRAIN_SHOW',
|
|
123
|
-
message: error instanceof Error ? error.message : String(error),
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// ============================================================================
|
|
129
|
-
// Brain.db Aggregate Stats
|
|
130
|
-
// ============================================================================
|
|
131
|
-
/** memory.stats - Aggregate stats from brain.db across all tables */
|
|
132
|
-
export async function memoryBrainStats(projectRoot) {
|
|
133
|
-
try {
|
|
134
|
-
const root = resolveRoot(projectRoot);
|
|
135
|
-
const { getBrainDb, getBrainNativeDb } = await import('../store/brain-sqlite.js');
|
|
136
|
-
await getBrainDb(root);
|
|
137
|
-
const nativeDb = getBrainNativeDb();
|
|
138
|
-
if (!nativeDb) {
|
|
139
|
-
return {
|
|
140
|
-
success: true,
|
|
141
|
-
data: {
|
|
142
|
-
observations: 0,
|
|
143
|
-
decisions: 0,
|
|
144
|
-
patterns: 0,
|
|
145
|
-
learnings: 0,
|
|
146
|
-
total: 0,
|
|
147
|
-
message: 'brain.db not initialized',
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
const obsCount = nativeDb.prepare('SELECT COUNT(*) AS cnt FROM brain_observations').get().cnt;
|
|
152
|
-
const decCount = nativeDb.prepare('SELECT COUNT(*) AS cnt FROM brain_decisions').get().cnt;
|
|
153
|
-
const patCount = nativeDb.prepare('SELECT COUNT(*) AS cnt FROM brain_patterns').get().cnt;
|
|
154
|
-
const learnCount = nativeDb.prepare('SELECT COUNT(*) AS cnt FROM brain_learnings').get().cnt;
|
|
155
|
-
return {
|
|
156
|
-
success: true,
|
|
157
|
-
data: {
|
|
158
|
-
observations: obsCount,
|
|
159
|
-
decisions: decCount,
|
|
160
|
-
patterns: patCount,
|
|
161
|
-
learnings: learnCount,
|
|
162
|
-
total: obsCount + decCount + patCount + learnCount,
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
catch (error) {
|
|
167
|
-
return {
|
|
168
|
-
success: false,
|
|
169
|
-
error: {
|
|
170
|
-
code: 'E_BRAIN_STATS',
|
|
171
|
-
message: error instanceof Error ? error.message : String(error),
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
// ============================================================================
|
|
177
|
-
// Brain.db Decision Operations
|
|
178
|
-
// ============================================================================
|
|
179
|
-
/** memory.decision.find - Search decisions in brain.db */
|
|
180
|
-
export async function memoryDecisionFind(params, projectRoot) {
|
|
181
|
-
try {
|
|
182
|
-
const root = resolveRoot(projectRoot);
|
|
183
|
-
const accessor = await getBrainAccessor(root);
|
|
184
|
-
if (params.query) {
|
|
185
|
-
const { getBrainDb, getBrainNativeDb } = await import('../store/brain-sqlite.js');
|
|
186
|
-
await getBrainDb(root);
|
|
187
|
-
const nativeDb = getBrainNativeDb();
|
|
188
|
-
if (!nativeDb) {
|
|
189
|
-
return { success: true, data: { decisions: [], total: 0 } };
|
|
190
|
-
}
|
|
191
|
-
const likePattern = `%${params.query}%`;
|
|
192
|
-
const limit = params.limit ?? 20;
|
|
193
|
-
const rows = nativeDb
|
|
194
|
-
.prepare(`
|
|
195
|
-
SELECT * FROM brain_decisions
|
|
196
|
-
WHERE decision LIKE ? OR rationale LIKE ?
|
|
197
|
-
ORDER BY created_at DESC
|
|
198
|
-
LIMIT ?
|
|
199
|
-
`)
|
|
200
|
-
.all(likePattern, likePattern, limit);
|
|
201
|
-
return { success: true, data: { decisions: rows, total: rows.length } };
|
|
202
|
-
}
|
|
203
|
-
const decisions = await accessor.findDecisions({
|
|
204
|
-
contextTaskId: params.taskId,
|
|
205
|
-
limit: params.limit ?? 20,
|
|
206
|
-
});
|
|
207
|
-
return { success: true, data: { decisions, total: decisions.length } };
|
|
208
|
-
}
|
|
209
|
-
catch (error) {
|
|
210
|
-
return {
|
|
211
|
-
success: false,
|
|
212
|
-
error: {
|
|
213
|
-
code: 'E_DECISION_FIND',
|
|
214
|
-
message: error instanceof Error ? error.message : String(error),
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/** memory.decision.store - Store a decision to brain.db */
|
|
220
|
-
export async function memoryDecisionStore(params, projectRoot) {
|
|
221
|
-
if (!params.decision) {
|
|
222
|
-
return {
|
|
223
|
-
success: false,
|
|
224
|
-
error: { code: 'E_INVALID_INPUT', message: 'decision text is required' },
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
if (!params.rationale) {
|
|
228
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'rationale is required' } };
|
|
229
|
-
}
|
|
230
|
-
try {
|
|
231
|
-
const root = resolveRoot(projectRoot);
|
|
232
|
-
const accessor = await getBrainAccessor(root);
|
|
233
|
-
const now = new Date().toISOString().replace('T', ' ').slice(0, 19);
|
|
234
|
-
const id = `D-${Date.now().toString(36)}`;
|
|
235
|
-
const row = await accessor.addDecision({
|
|
236
|
-
id,
|
|
237
|
-
type: 'technical',
|
|
238
|
-
decision: params.decision,
|
|
239
|
-
rationale: params.rationale,
|
|
240
|
-
confidence: 'medium',
|
|
241
|
-
outcome: 'pending',
|
|
242
|
-
alternativesJson: params.alternatives ? JSON.stringify(params.alternatives) : null,
|
|
243
|
-
contextTaskId: params.taskId ?? null,
|
|
244
|
-
contextEpicId: null,
|
|
245
|
-
contextPhase: null,
|
|
246
|
-
createdAt: now,
|
|
247
|
-
});
|
|
248
|
-
return {
|
|
249
|
-
success: true,
|
|
250
|
-
data: {
|
|
251
|
-
id: row.id,
|
|
252
|
-
type: row.type,
|
|
253
|
-
decision: row.decision,
|
|
254
|
-
createdAt: row.createdAt,
|
|
255
|
-
},
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
catch (error) {
|
|
259
|
-
return {
|
|
260
|
-
success: false,
|
|
261
|
-
error: {
|
|
262
|
-
code: 'E_DECISION_STORE',
|
|
263
|
-
message: error instanceof Error ? error.message : String(error),
|
|
264
|
-
},
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
// ============================================================================
|
|
269
|
-
// BRAIN Retrieval Operations (T5131-T5135) — Renamed from brain.* to flat ops
|
|
270
|
-
// ============================================================================
|
|
271
|
-
/** memory.find - Token-efficient brain search */
|
|
272
|
-
export async function memoryFind(params, projectRoot) {
|
|
273
|
-
try {
|
|
274
|
-
const root = resolveRoot(projectRoot);
|
|
275
|
-
const result = await searchBrainCompact(root, {
|
|
276
|
-
query: params.query,
|
|
277
|
-
limit: params.limit,
|
|
278
|
-
tables: params.tables,
|
|
279
|
-
dateStart: params.dateStart,
|
|
280
|
-
dateEnd: params.dateEnd,
|
|
281
|
-
});
|
|
282
|
-
return { success: true, data: result };
|
|
283
|
-
}
|
|
284
|
-
catch (error) {
|
|
285
|
-
return {
|
|
286
|
-
success: false,
|
|
287
|
-
error: {
|
|
288
|
-
code: 'E_BRAIN_SEARCH',
|
|
289
|
-
message: error instanceof Error ? error.message : String(error),
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/** memory.timeline - Chronological context around anchor */
|
|
295
|
-
export async function memoryTimeline(params, projectRoot) {
|
|
296
|
-
try {
|
|
297
|
-
const root = resolveRoot(projectRoot);
|
|
298
|
-
const result = await timelineBrain(root, {
|
|
299
|
-
anchor: params.anchor,
|
|
300
|
-
depthBefore: params.depthBefore,
|
|
301
|
-
depthAfter: params.depthAfter,
|
|
302
|
-
});
|
|
303
|
-
return { success: true, data: result };
|
|
304
|
-
}
|
|
305
|
-
catch (error) {
|
|
306
|
-
return {
|
|
307
|
-
success: false,
|
|
308
|
-
error: {
|
|
309
|
-
code: 'E_BRAIN_TIMELINE',
|
|
310
|
-
message: error instanceof Error ? error.message : String(error),
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/** memory.fetch - Batch fetch brain entries by IDs */
|
|
316
|
-
export async function memoryFetch(params, projectRoot) {
|
|
317
|
-
try {
|
|
318
|
-
const root = resolveRoot(projectRoot);
|
|
319
|
-
const result = await fetchBrainEntries(root, { ids: params.ids });
|
|
320
|
-
return { success: true, data: result };
|
|
321
|
-
}
|
|
322
|
-
catch (error) {
|
|
323
|
-
return {
|
|
324
|
-
success: false,
|
|
325
|
-
error: {
|
|
326
|
-
code: 'E_BRAIN_FETCH',
|
|
327
|
-
message: error instanceof Error ? error.message : String(error),
|
|
328
|
-
},
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
/** memory.observe - Save observation to brain */
|
|
333
|
-
export async function memoryObserve(params, projectRoot) {
|
|
334
|
-
try {
|
|
335
|
-
const root = resolveRoot(projectRoot);
|
|
336
|
-
const result = await observeBrain(root, {
|
|
337
|
-
text: params.text,
|
|
338
|
-
title: params.title,
|
|
339
|
-
type: params.type,
|
|
340
|
-
project: params.project,
|
|
341
|
-
sourceSessionId: params.sourceSessionId,
|
|
342
|
-
sourceType: params.sourceType,
|
|
343
|
-
});
|
|
344
|
-
return { success: true, data: result };
|
|
345
|
-
}
|
|
346
|
-
catch (error) {
|
|
347
|
-
return {
|
|
348
|
-
success: false,
|
|
349
|
-
error: {
|
|
350
|
-
code: 'E_BRAIN_OBSERVE',
|
|
351
|
-
message: error instanceof Error ? error.message : String(error),
|
|
352
|
-
},
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
// ============================================================================
|
|
357
|
-
// BRAIN Pattern Operations (T4770)
|
|
358
|
-
// ============================================================================
|
|
359
|
-
/** memory.pattern.store - Store a pattern to BRAIN memory */
|
|
360
|
-
export async function memoryPatternStore(params, projectRoot) {
|
|
361
|
-
try {
|
|
362
|
-
const root = resolveRoot(projectRoot);
|
|
363
|
-
const result = await storePattern(root, params);
|
|
364
|
-
return { success: true, data: result };
|
|
365
|
-
}
|
|
366
|
-
catch (error) {
|
|
367
|
-
return {
|
|
368
|
-
success: false,
|
|
369
|
-
error: {
|
|
370
|
-
code: 'E_PATTERN_STORE',
|
|
371
|
-
message: error instanceof Error ? error.message : String(error),
|
|
372
|
-
},
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
/** memory.pattern.find - Search patterns in BRAIN memory */
|
|
377
|
-
export async function memoryPatternFind(params, projectRoot) {
|
|
378
|
-
try {
|
|
379
|
-
const root = resolveRoot(projectRoot);
|
|
380
|
-
const results = await searchPatterns(root, params);
|
|
381
|
-
return { success: true, data: { patterns: results, total: results.length } };
|
|
382
|
-
}
|
|
383
|
-
catch (error) {
|
|
384
|
-
return {
|
|
385
|
-
success: false,
|
|
386
|
-
error: {
|
|
387
|
-
code: 'E_PATTERN_SEARCH',
|
|
388
|
-
message: error instanceof Error ? error.message : String(error),
|
|
389
|
-
},
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
/** memory.pattern.stats - Get pattern memory statistics */
|
|
394
|
-
export async function memoryPatternStats(projectRoot) {
|
|
395
|
-
try {
|
|
396
|
-
const root = resolveRoot(projectRoot);
|
|
397
|
-
const stats = await patternStats(root);
|
|
398
|
-
return { success: true, data: stats };
|
|
399
|
-
}
|
|
400
|
-
catch (error) {
|
|
401
|
-
return {
|
|
402
|
-
success: false,
|
|
403
|
-
error: {
|
|
404
|
-
code: 'E_PATTERN_STATS',
|
|
405
|
-
message: error instanceof Error ? error.message : String(error),
|
|
406
|
-
},
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
// ============================================================================
|
|
411
|
-
// BRAIN Learning Operations (T4770)
|
|
412
|
-
// ============================================================================
|
|
413
|
-
/** memory.learning.store - Store a learning to BRAIN memory */
|
|
414
|
-
export async function memoryLearningStore(params, projectRoot) {
|
|
415
|
-
try {
|
|
416
|
-
const root = resolveRoot(projectRoot);
|
|
417
|
-
const result = await storeLearning(root, params);
|
|
418
|
-
return { success: true, data: result };
|
|
419
|
-
}
|
|
420
|
-
catch (error) {
|
|
421
|
-
return {
|
|
422
|
-
success: false,
|
|
423
|
-
error: {
|
|
424
|
-
code: 'E_LEARNING_STORE',
|
|
425
|
-
message: error instanceof Error ? error.message : String(error),
|
|
426
|
-
},
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
/** memory.learning.find - Search learnings in BRAIN memory */
|
|
431
|
-
export async function memoryLearningFind(params, projectRoot) {
|
|
432
|
-
try {
|
|
433
|
-
const root = resolveRoot(projectRoot);
|
|
434
|
-
const results = await searchLearnings(root, params);
|
|
435
|
-
return { success: true, data: { learnings: results, total: results.length } };
|
|
436
|
-
}
|
|
437
|
-
catch (error) {
|
|
438
|
-
return {
|
|
439
|
-
success: false,
|
|
440
|
-
error: {
|
|
441
|
-
code: 'E_LEARNING_SEARCH',
|
|
442
|
-
message: error instanceof Error ? error.message : String(error),
|
|
443
|
-
},
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
/** memory.learning.stats - Get learning memory statistics */
|
|
448
|
-
export async function memoryLearningStats(projectRoot) {
|
|
449
|
-
try {
|
|
450
|
-
const root = resolveRoot(projectRoot);
|
|
451
|
-
const stats = await learningStats(root);
|
|
452
|
-
return { success: true, data: stats };
|
|
453
|
-
}
|
|
454
|
-
catch (error) {
|
|
455
|
-
return {
|
|
456
|
-
success: false,
|
|
457
|
-
error: {
|
|
458
|
-
code: 'E_LEARNING_STATS',
|
|
459
|
-
message: error instanceof Error ? error.message : String(error),
|
|
460
|
-
},
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
// ============================================================================
|
|
465
|
-
// BRAIN Advanced Queries & Links (T5241)
|
|
466
|
-
// ============================================================================
|
|
467
|
-
/** memory.contradictions - Find contradictory entries in brain.db */
|
|
468
|
-
export async function memoryContradictions(projectRoot) {
|
|
469
|
-
try {
|
|
470
|
-
const root = resolveRoot(projectRoot);
|
|
471
|
-
const { getBrainDb, getBrainNativeDb } = await import('../store/brain-sqlite.js');
|
|
472
|
-
await getBrainDb(root);
|
|
473
|
-
const nativeDb = getBrainNativeDb();
|
|
474
|
-
if (!nativeDb) {
|
|
475
|
-
return { success: true, data: { contradictions: [] } };
|
|
476
|
-
}
|
|
477
|
-
// Negation patterns for detecting contradictions (adapted from manifest logic)
|
|
478
|
-
const negationPairs = [
|
|
479
|
-
[/\bdoes NOT\b/i, /\bdoes\b(?!.*\bnot\b)/i],
|
|
480
|
-
[/\bcannot\b/i, /\bcan\b(?!.*\bnot\b)/i],
|
|
481
|
-
[/\bno\s+\w+\s+required\b/i, /\brequired\b(?!.*\bno\b)/i],
|
|
482
|
-
[
|
|
483
|
-
/\bnot\s+(?:available|supported|possible|recommended)\b/i,
|
|
484
|
-
/\b(?:available|supported|possible|recommended)\b(?!.*\bnot\b)/i,
|
|
485
|
-
],
|
|
486
|
-
[/\bwithout\b/i, /\brequires?\b/i],
|
|
487
|
-
[/\bavoid\b/i, /\buse\b/i],
|
|
488
|
-
[/\bdeprecated\b/i, /\brecommended\b/i],
|
|
489
|
-
[/\banti-pattern\b/i, /\bbest practice\b/i],
|
|
490
|
-
];
|
|
491
|
-
// Fetch all decisions with context for comparison
|
|
492
|
-
const decisions = nativeDb
|
|
493
|
-
.prepare(`
|
|
494
|
-
SELECT id, type, decision, rationale, context_task_id, created_at
|
|
495
|
-
FROM brain_decisions
|
|
496
|
-
ORDER BY created_at DESC
|
|
497
|
-
`)
|
|
498
|
-
.all();
|
|
499
|
-
// Fetch all patterns
|
|
500
|
-
const patterns = nativeDb
|
|
501
|
-
.prepare(`
|
|
502
|
-
SELECT id, type, pattern, context, anti_pattern, created_at
|
|
503
|
-
FROM brain_patterns
|
|
504
|
-
ORDER BY created_at DESC
|
|
505
|
-
`)
|
|
506
|
-
.all();
|
|
507
|
-
// Fetch all learnings
|
|
508
|
-
const learnings = nativeDb
|
|
509
|
-
.prepare(`
|
|
510
|
-
SELECT id, insight, source, created_at
|
|
511
|
-
FROM brain_learnings
|
|
512
|
-
ORDER BY created_at DESC
|
|
513
|
-
`)
|
|
514
|
-
.all();
|
|
515
|
-
const contradictions = [];
|
|
516
|
-
const seenPairs = new Set();
|
|
517
|
-
// Helper to create sorted pair key
|
|
518
|
-
const pairKey = (idA, idB) => (idA < idB ? `${idA}::${idB}` : `${idB}::${idA}`);
|
|
519
|
-
// Check decisions against each other (grouped by task context)
|
|
520
|
-
const decisionsByTask = new Map();
|
|
521
|
-
for (const d of decisions) {
|
|
522
|
-
const key = d.context_task_id;
|
|
523
|
-
if (!decisionsByTask.has(key))
|
|
524
|
-
decisionsByTask.set(key, []);
|
|
525
|
-
decisionsByTask.get(key).push(d);
|
|
526
|
-
}
|
|
527
|
-
for (const [taskId, taskDecisions] of decisionsByTask) {
|
|
528
|
-
if (taskDecisions.length < 2)
|
|
529
|
-
continue;
|
|
530
|
-
for (let i = 0; i < taskDecisions.length; i++) {
|
|
531
|
-
for (let j = i + 1; j < taskDecisions.length; j++) {
|
|
532
|
-
const a = taskDecisions[i];
|
|
533
|
-
const b = taskDecisions[j];
|
|
534
|
-
const key = pairKey(a.id, b.id);
|
|
535
|
-
if (seenPairs.has(key))
|
|
536
|
-
continue;
|
|
537
|
-
const contentA = `${a.decision} ${a.rationale}`;
|
|
538
|
-
const contentB = `${b.decision} ${b.rationale}`;
|
|
539
|
-
for (const [patternNeg, patternPos] of negationPairs) {
|
|
540
|
-
if ((patternNeg.test(contentA) && patternPos.test(contentB)) ||
|
|
541
|
-
(patternPos.test(contentA) && patternNeg.test(contentB))) {
|
|
542
|
-
seenPairs.add(key);
|
|
543
|
-
contradictions.push({
|
|
544
|
-
entryA: {
|
|
545
|
-
id: a.id,
|
|
546
|
-
type: 'decision',
|
|
547
|
-
content: a.decision,
|
|
548
|
-
createdAt: a.created_at,
|
|
549
|
-
},
|
|
550
|
-
entryB: {
|
|
551
|
-
id: b.id,
|
|
552
|
-
type: 'decision',
|
|
553
|
-
content: b.decision,
|
|
554
|
-
createdAt: b.created_at,
|
|
555
|
-
},
|
|
556
|
-
context: taskId || undefined,
|
|
557
|
-
conflictDetails: `Negation pattern: "${contentA.slice(0, 80)}..." vs "${contentB.slice(0, 80)}..."`,
|
|
558
|
-
});
|
|
559
|
-
break;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
// Check patterns with anti-patterns
|
|
566
|
-
for (const p of patterns) {
|
|
567
|
-
if (p.anti_pattern) {
|
|
568
|
-
contradictions.push({
|
|
569
|
-
entryA: { id: p.id, type: 'pattern', content: p.pattern, createdAt: p.created_at },
|
|
570
|
-
entryB: {
|
|
571
|
-
id: p.id,
|
|
572
|
-
type: 'anti-pattern',
|
|
573
|
-
content: p.anti_pattern,
|
|
574
|
-
createdAt: p.created_at,
|
|
575
|
-
},
|
|
576
|
-
conflictDetails: `Pattern defines its own anti-pattern`,
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
// Check learnings against each other
|
|
581
|
-
for (let i = 0; i < learnings.length; i++) {
|
|
582
|
-
for (let j = i + 1; j < learnings.length; j++) {
|
|
583
|
-
const a = learnings[i];
|
|
584
|
-
const b = learnings[j];
|
|
585
|
-
const key = pairKey(a.id, b.id);
|
|
586
|
-
if (seenPairs.has(key))
|
|
587
|
-
continue;
|
|
588
|
-
for (const [patternNeg, patternPos] of negationPairs) {
|
|
589
|
-
if ((patternNeg.test(a.insight) && patternPos.test(b.insight)) ||
|
|
590
|
-
(patternPos.test(a.insight) && patternNeg.test(b.insight))) {
|
|
591
|
-
seenPairs.add(key);
|
|
592
|
-
contradictions.push({
|
|
593
|
-
entryA: { id: a.id, type: 'learning', content: a.insight, createdAt: a.created_at },
|
|
594
|
-
entryB: { id: b.id, type: 'learning', content: b.insight, createdAt: b.created_at },
|
|
595
|
-
conflictDetails: `Learning contradiction detected`,
|
|
596
|
-
});
|
|
597
|
-
break;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
return { success: true, data: { contradictions } };
|
|
603
|
-
}
|
|
604
|
-
catch (error) {
|
|
605
|
-
return {
|
|
606
|
-
success: false,
|
|
607
|
-
error: {
|
|
608
|
-
code: 'E_CONTRADICTIONS',
|
|
609
|
-
message: error instanceof Error ? error.message : String(error),
|
|
610
|
-
},
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
/** memory.superseded - Find superseded entries in brain.db
|
|
615
|
-
*
|
|
616
|
-
* Identifies entries that have been superseded by newer entries on the same topic.
|
|
617
|
-
* For brain.db, we group by:
|
|
618
|
-
* - Decisions: type + contextTaskId/contextEpicId
|
|
619
|
-
* - Patterns: type + context (first 100 chars for similarity)
|
|
620
|
-
* - Learnings: source + applicableTypes
|
|
621
|
-
* - Observations: type + project
|
|
622
|
-
*/
|
|
623
|
-
export async function memorySuperseded(params, projectRoot) {
|
|
624
|
-
try {
|
|
625
|
-
const root = resolveRoot(projectRoot);
|
|
626
|
-
const { getBrainDb, getBrainNativeDb } = await import('../store/brain-sqlite.js');
|
|
627
|
-
await getBrainDb(root);
|
|
628
|
-
const nativeDb = getBrainNativeDb();
|
|
629
|
-
if (!nativeDb) {
|
|
630
|
-
return { success: true, data: { superseded: [] } };
|
|
631
|
-
}
|
|
632
|
-
const superseded = [];
|
|
633
|
-
// Helper to normalize and group by key
|
|
634
|
-
const addSuperseded = (entries, groupKey) => {
|
|
635
|
-
if (entries.length < 2)
|
|
636
|
-
return;
|
|
637
|
-
// Sort by creation date (oldest first)
|
|
638
|
-
const sorted = [...entries].sort((a, b) => a.createdAt.localeCompare(b.createdAt));
|
|
639
|
-
// All but the newest are superseded by the newest
|
|
640
|
-
const newest = sorted[sorted.length - 1];
|
|
641
|
-
for (let i = 0; i < sorted.length - 1; i++) {
|
|
642
|
-
superseded.push({
|
|
643
|
-
oldEntry: sorted[i],
|
|
644
|
-
replacement: newest,
|
|
645
|
-
grouping: groupKey,
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
// === DECISIONS: Group by type + contextTaskId/contextEpicId ===
|
|
650
|
-
const decisionGroups = new Map();
|
|
651
|
-
const decisionQuery = params?.type
|
|
652
|
-
? `SELECT id, type, decision, context_task_id, context_epic_id, created_at
|
|
653
|
-
FROM brain_decisions WHERE type = ? ORDER BY created_at DESC`
|
|
654
|
-
: `SELECT id, type, decision, context_task_id, context_epic_id, created_at
|
|
655
|
-
FROM brain_decisions ORDER BY created_at DESC`;
|
|
656
|
-
const decisionParams = params?.type ? [params.type] : [];
|
|
657
|
-
const decisions = nativeDb.prepare(decisionQuery).all(...decisionParams);
|
|
658
|
-
for (const d of decisions) {
|
|
659
|
-
const contextKey = d.context_task_id || d.context_epic_id || 'general';
|
|
660
|
-
const groupKey = `decision:${d.type}:${contextKey}`;
|
|
661
|
-
if (!decisionGroups.has(groupKey))
|
|
662
|
-
decisionGroups.set(groupKey, []);
|
|
663
|
-
decisionGroups.get(groupKey).push({
|
|
664
|
-
id: d.id,
|
|
665
|
-
type: d.type,
|
|
666
|
-
createdAt: d.created_at,
|
|
667
|
-
summary: d.decision.slice(0, 100),
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
for (const [key, entries] of decisionGroups) {
|
|
671
|
-
addSuperseded(entries, key);
|
|
672
|
-
}
|
|
673
|
-
// === PATTERNS: Group by type + context (first 100 chars for similarity) ===
|
|
674
|
-
const patternGroups = new Map();
|
|
675
|
-
const patternQuery = params?.type
|
|
676
|
-
? `SELECT id, type, pattern, context, extracted_at
|
|
677
|
-
FROM brain_patterns WHERE type = ? ORDER BY extracted_at DESC`
|
|
678
|
-
: `SELECT id, type, pattern, context, extracted_at
|
|
679
|
-
FROM brain_patterns ORDER BY extracted_at DESC`;
|
|
680
|
-
const patternParams = params?.type ? [params.type] : [];
|
|
681
|
-
const patterns = nativeDb.prepare(patternQuery).all(...patternParams);
|
|
682
|
-
for (const p of patterns) {
|
|
683
|
-
// Use first 80 chars of context as grouping key for similarity
|
|
684
|
-
const contextKey = p.context?.slice(0, 80) || 'unknown';
|
|
685
|
-
const groupKey = `pattern:${p.type}:${contextKey}`;
|
|
686
|
-
if (!patternGroups.has(groupKey))
|
|
687
|
-
patternGroups.set(groupKey, []);
|
|
688
|
-
patternGroups.get(groupKey).push({
|
|
689
|
-
id: p.id,
|
|
690
|
-
type: p.type,
|
|
691
|
-
createdAt: p.extracted_at,
|
|
692
|
-
summary: p.pattern.slice(0, 100),
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
for (const [key, entries] of patternGroups) {
|
|
696
|
-
addSuperseded(entries, key);
|
|
697
|
-
}
|
|
698
|
-
// === LEARNINGS: Group by source + applicableTypes ===
|
|
699
|
-
const learningGroups = new Map();
|
|
700
|
-
const learningQuery = `SELECT id, source, insight, applicable_types_json, created_at
|
|
701
|
-
FROM brain_learnings ORDER BY created_at DESC`;
|
|
702
|
-
const learnings = nativeDb.prepare(learningQuery).all();
|
|
703
|
-
for (const l of learnings) {
|
|
704
|
-
const applicableTypes = l.applicable_types_json
|
|
705
|
-
? JSON.parse(l.applicable_types_json).slice(0, 2).join(',')
|
|
706
|
-
: 'general';
|
|
707
|
-
const groupKey = `learning:${l.source}:${applicableTypes}`;
|
|
708
|
-
if (!learningGroups.has(groupKey))
|
|
709
|
-
learningGroups.set(groupKey, []);
|
|
710
|
-
learningGroups.get(groupKey).push({
|
|
711
|
-
id: l.id,
|
|
712
|
-
type: 'learning',
|
|
713
|
-
createdAt: l.created_at,
|
|
714
|
-
summary: l.insight.slice(0, 100),
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
for (const [key, entries] of learningGroups) {
|
|
718
|
-
addSuperseded(entries, key);
|
|
719
|
-
}
|
|
720
|
-
// === OBSERVATIONS: Group by type + project ===
|
|
721
|
-
const observationGroups = new Map();
|
|
722
|
-
const observationQuery = params?.type
|
|
723
|
-
? `SELECT id, type, title, project, created_at
|
|
724
|
-
FROM brain_observations WHERE type = ? ORDER BY created_at DESC`
|
|
725
|
-
: `SELECT id, type, title, project, created_at
|
|
726
|
-
FROM brain_observations ORDER BY created_at DESC`;
|
|
727
|
-
const observationParams = params?.type ? [params.type] : [];
|
|
728
|
-
const observations = nativeDb.prepare(observationQuery).all(...observationParams);
|
|
729
|
-
for (const o of observations) {
|
|
730
|
-
const projectKey = params?.project ? params.project : o.project || 'general';
|
|
731
|
-
const groupKey = `observation:${o.type}:${projectKey}`;
|
|
732
|
-
if (!observationGroups.has(groupKey))
|
|
733
|
-
observationGroups.set(groupKey, []);
|
|
734
|
-
observationGroups.get(groupKey).push({
|
|
735
|
-
id: o.id,
|
|
736
|
-
type: o.type,
|
|
737
|
-
createdAt: o.created_at,
|
|
738
|
-
summary: o.title.slice(0, 100),
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
for (const [key, entries] of observationGroups) {
|
|
742
|
-
addSuperseded(entries, key);
|
|
743
|
-
}
|
|
744
|
-
return { success: true, data: { superseded, total: superseded.length } };
|
|
745
|
-
}
|
|
746
|
-
catch (error) {
|
|
747
|
-
return {
|
|
748
|
-
success: false,
|
|
749
|
-
error: {
|
|
750
|
-
code: 'E_MEMORY_SUPERSEDED',
|
|
751
|
-
message: error instanceof Error ? error.message : String(error),
|
|
752
|
-
},
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
/** memory.link - Link a brain entry to a task */
|
|
757
|
-
export async function memoryLink(params, projectRoot) {
|
|
758
|
-
if (!params.taskId || !params.entryId) {
|
|
759
|
-
return {
|
|
760
|
-
success: false,
|
|
761
|
-
error: { code: 'E_INVALID_INPUT', message: 'taskId and entryId are required' },
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
const entryType = parseIdPrefix(params.entryId);
|
|
765
|
-
if (!entryType) {
|
|
766
|
-
return {
|
|
767
|
-
success: false,
|
|
768
|
-
error: { code: 'E_INVALID_INPUT', message: 'Invalid entryId format' },
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
try {
|
|
772
|
-
const root = resolveRoot(projectRoot);
|
|
773
|
-
await linkMemoryToTask(root, entryType, params.entryId, params.taskId, 'applies_to');
|
|
774
|
-
return {
|
|
775
|
-
success: true,
|
|
776
|
-
data: { linked: true, taskId: params.taskId, entryId: params.entryId },
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
catch (error) {
|
|
780
|
-
return {
|
|
781
|
-
success: false,
|
|
782
|
-
error: {
|
|
783
|
-
code: 'E_MEMORY_LINK',
|
|
784
|
-
message: error instanceof Error ? error.message : String(error),
|
|
785
|
-
},
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
/** memory.unlink - Remove a link between a brain entry and a task */
|
|
790
|
-
export async function memoryUnlink(params, projectRoot) {
|
|
791
|
-
if (!params.taskId || !params.entryId) {
|
|
792
|
-
return {
|
|
793
|
-
success: false,
|
|
794
|
-
error: { code: 'E_INVALID_INPUT', message: 'taskId and entryId are required' },
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
const entryType = parseIdPrefix(params.entryId);
|
|
798
|
-
if (!entryType) {
|
|
799
|
-
return {
|
|
800
|
-
success: false,
|
|
801
|
-
error: { code: 'E_INVALID_INPUT', message: 'Invalid entryId format' },
|
|
802
|
-
};
|
|
803
|
-
}
|
|
804
|
-
try {
|
|
805
|
-
const root = resolveRoot(projectRoot);
|
|
806
|
-
await unlinkMemoryFromTask(root, entryType, params.entryId, params.taskId, 'applies_to');
|
|
807
|
-
return {
|
|
808
|
-
success: true,
|
|
809
|
-
data: { unlinked: true, taskId: params.taskId, entryId: params.entryId },
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
catch (error) {
|
|
813
|
-
return {
|
|
814
|
-
success: false,
|
|
815
|
-
error: {
|
|
816
|
-
code: 'E_MEMORY_UNLINK',
|
|
817
|
-
message: error instanceof Error ? error.message : String(error),
|
|
818
|
-
},
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
// ============================================================================
|
|
823
|
-
// PageIndex Graph Operations (T5385)
|
|
824
|
-
// ============================================================================
|
|
825
|
-
/** memory.graph.add - Add a node or edge to the PageIndex graph */
|
|
826
|
-
export async function memoryGraphAdd(params, projectRoot) {
|
|
827
|
-
try {
|
|
828
|
-
const root = resolveRoot(projectRoot);
|
|
829
|
-
const accessor = await getBrainAccessor(root);
|
|
830
|
-
// Edge mode: fromId + toId + edgeType
|
|
831
|
-
if (params.fromId && params.toId && params.edgeType) {
|
|
832
|
-
const edge = await accessor.addPageEdge({
|
|
833
|
-
fromId: params.fromId,
|
|
834
|
-
toId: params.toId,
|
|
835
|
-
edgeType: params.edgeType,
|
|
836
|
-
weight: params.weight,
|
|
837
|
-
});
|
|
838
|
-
return { success: true, data: { type: 'edge', edge } };
|
|
839
|
-
}
|
|
840
|
-
// Node mode: nodeId + nodeType + label
|
|
841
|
-
if (params.nodeId && params.nodeType && params.label) {
|
|
842
|
-
const node = await accessor.addPageNode({
|
|
843
|
-
id: params.nodeId,
|
|
844
|
-
nodeType: params.nodeType,
|
|
845
|
-
label: params.label,
|
|
846
|
-
metadataJson: params.metadataJson,
|
|
847
|
-
});
|
|
848
|
-
return { success: true, data: { type: 'node', node } };
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
success: false,
|
|
852
|
-
error: {
|
|
853
|
-
code: 'E_INVALID_INPUT',
|
|
854
|
-
message: 'Provide (nodeId + nodeType + label) for a node or (fromId + toId + edgeType) for an edge',
|
|
855
|
-
},
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
catch (error) {
|
|
859
|
-
return {
|
|
860
|
-
success: false,
|
|
861
|
-
error: {
|
|
862
|
-
code: 'E_GRAPH_ADD',
|
|
863
|
-
message: error instanceof Error ? error.message : String(error),
|
|
864
|
-
},
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
/** memory.graph.show - Get a node and its edges from the PageIndex graph */
|
|
869
|
-
export async function memoryGraphShow(params, projectRoot) {
|
|
870
|
-
if (!params.nodeId) {
|
|
871
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'nodeId is required' } };
|
|
872
|
-
}
|
|
873
|
-
try {
|
|
874
|
-
const root = resolveRoot(projectRoot);
|
|
875
|
-
const accessor = await getBrainAccessor(root);
|
|
876
|
-
const node = await accessor.getPageNode(params.nodeId);
|
|
877
|
-
if (!node) {
|
|
878
|
-
return {
|
|
879
|
-
success: false,
|
|
880
|
-
error: { code: 'E_NOT_FOUND', message: `Node '${params.nodeId}' not found` },
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
const edges = await accessor.getPageEdges(params.nodeId, 'both');
|
|
884
|
-
return { success: true, data: { node, edges } };
|
|
885
|
-
}
|
|
886
|
-
catch (error) {
|
|
887
|
-
return {
|
|
888
|
-
success: false,
|
|
889
|
-
error: {
|
|
890
|
-
code: 'E_GRAPH_SHOW',
|
|
891
|
-
message: error instanceof Error ? error.message : String(error),
|
|
892
|
-
},
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
/** memory.graph.neighbors - Get neighbor nodes from the PageIndex graph */
|
|
897
|
-
export async function memoryGraphNeighbors(params, projectRoot) {
|
|
898
|
-
if (!params.nodeId) {
|
|
899
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'nodeId is required' } };
|
|
900
|
-
}
|
|
901
|
-
try {
|
|
902
|
-
const root = resolveRoot(projectRoot);
|
|
903
|
-
const accessor = await getBrainAccessor(root);
|
|
904
|
-
const neighbors = await accessor.getNeighbors(params.nodeId, params.edgeType);
|
|
905
|
-
return { success: true, data: { neighbors, total: neighbors.length } };
|
|
906
|
-
}
|
|
907
|
-
catch (error) {
|
|
908
|
-
return {
|
|
909
|
-
success: false,
|
|
910
|
-
error: {
|
|
911
|
-
code: 'E_GRAPH_NEIGHBORS',
|
|
912
|
-
message: error instanceof Error ? error.message : String(error),
|
|
913
|
-
},
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
// ============================================================================
|
|
918
|
-
// BRAIN Reasoning & Hybrid Search Operations (T5388-T5393)
|
|
919
|
-
// ============================================================================
|
|
920
|
-
/** memory.reason.why - Causal trace through task dependency chains */
|
|
921
|
-
export async function memoryReasonWhy(params, projectRoot) {
|
|
922
|
-
if (!params.taskId) {
|
|
923
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'taskId is required' } };
|
|
924
|
-
}
|
|
925
|
-
try {
|
|
926
|
-
const root = resolveRoot(projectRoot);
|
|
927
|
-
const taskAccessor = await getAccessor(root);
|
|
928
|
-
const { reasonWhy } = await import('./brain-reasoning.js');
|
|
929
|
-
const result = await reasonWhy(params.taskId, root, taskAccessor);
|
|
930
|
-
return { success: true, data: result };
|
|
931
|
-
}
|
|
932
|
-
catch (error) {
|
|
933
|
-
return {
|
|
934
|
-
success: false,
|
|
935
|
-
error: {
|
|
936
|
-
code: 'E_REASON_WHY',
|
|
937
|
-
message: error instanceof Error ? error.message : String(error),
|
|
938
|
-
},
|
|
939
|
-
};
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
/** memory.reason.similar - Find semantically similar entries */
|
|
943
|
-
export async function memoryReasonSimilar(params, projectRoot) {
|
|
944
|
-
if (!params.entryId) {
|
|
945
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'entryId is required' } };
|
|
946
|
-
}
|
|
947
|
-
try {
|
|
948
|
-
const root = resolveRoot(projectRoot);
|
|
949
|
-
const { reasonSimilar } = await import('./brain-reasoning.js');
|
|
950
|
-
const results = await reasonSimilar(params.entryId, root, params.limit);
|
|
951
|
-
return { success: true, data: { results, total: results.length } };
|
|
952
|
-
}
|
|
953
|
-
catch (error) {
|
|
954
|
-
return {
|
|
955
|
-
success: false,
|
|
956
|
-
error: {
|
|
957
|
-
code: 'E_REASON_SIMILAR',
|
|
958
|
-
message: error instanceof Error ? error.message : String(error),
|
|
959
|
-
},
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
/** memory.search.hybrid - Hybrid search across FTS5, vector, and graph */
|
|
964
|
-
export async function memorySearchHybrid(params, projectRoot) {
|
|
965
|
-
if (!params.query) {
|
|
966
|
-
return { success: false, error: { code: 'E_INVALID_INPUT', message: 'query is required' } };
|
|
967
|
-
}
|
|
968
|
-
try {
|
|
969
|
-
const root = resolveRoot(projectRoot);
|
|
970
|
-
const { hybridSearch } = await import('./brain-search.js');
|
|
971
|
-
const results = await hybridSearch(params.query, root, {
|
|
972
|
-
ftsWeight: params.ftsWeight,
|
|
973
|
-
vecWeight: params.vecWeight,
|
|
974
|
-
graphWeight: params.graphWeight,
|
|
975
|
-
limit: params.limit,
|
|
976
|
-
});
|
|
977
|
-
return { success: true, data: { results, total: results.length } };
|
|
978
|
-
}
|
|
979
|
-
catch (error) {
|
|
980
|
-
return {
|
|
981
|
-
success: false,
|
|
982
|
-
error: {
|
|
983
|
-
code: 'E_HYBRID_SEARCH',
|
|
984
|
-
message: error instanceof Error ? error.message : String(error),
|
|
985
|
-
},
|
|
986
|
-
};
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
/** memory.graph.remove - Remove a node or edge from the PageIndex graph */
|
|
990
|
-
export async function memoryGraphRemove(params, projectRoot) {
|
|
991
|
-
try {
|
|
992
|
-
const root = resolveRoot(projectRoot);
|
|
993
|
-
const accessor = await getBrainAccessor(root);
|
|
994
|
-
// Edge removal: fromId + toId + edgeType
|
|
995
|
-
if (params.fromId && params.toId && params.edgeType) {
|
|
996
|
-
await accessor.removePageEdge(params.fromId, params.toId, params.edgeType);
|
|
997
|
-
return {
|
|
998
|
-
success: true,
|
|
999
|
-
data: {
|
|
1000
|
-
removed: 'edge',
|
|
1001
|
-
fromId: params.fromId,
|
|
1002
|
-
toId: params.toId,
|
|
1003
|
-
edgeType: params.edgeType,
|
|
1004
|
-
},
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
// Node removal: nodeId (cascades edges)
|
|
1008
|
-
if (params.nodeId) {
|
|
1009
|
-
await accessor.removePageNode(params.nodeId);
|
|
1010
|
-
return { success: true, data: { removed: 'node', nodeId: params.nodeId } };
|
|
1011
|
-
}
|
|
1012
|
-
return {
|
|
1013
|
-
success: false,
|
|
1014
|
-
error: {
|
|
1015
|
-
code: 'E_INVALID_INPUT',
|
|
1016
|
-
message: 'Provide nodeId to remove a node or (fromId + toId + edgeType) to remove an edge',
|
|
1017
|
-
},
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
catch (error) {
|
|
1021
|
-
return {
|
|
1022
|
-
success: false,
|
|
1023
|
-
error: {
|
|
1024
|
-
code: 'E_GRAPH_REMOVE',
|
|
1025
|
-
message: error instanceof Error ? error.message : String(error),
|
|
1026
|
-
},
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
//# sourceMappingURL=engine-compat.js.map
|