@massa-ai/core 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/context-controller.d.ts +52 -0
- package/dist/controllers/context-controller.d.ts.map +1 -0
- package/dist/controllers/context-controller.js +377 -0
- package/dist/controllers/context-controller.js.map +1 -0
- package/dist/controllers/executor-controller.d.ts +42 -0
- package/dist/controllers/executor-controller.d.ts.map +1 -0
- package/dist/controllers/executor-controller.js +229 -0
- package/dist/controllers/executor-controller.js.map +1 -0
- package/dist/controllers/graph-controller.d.ts +106 -0
- package/dist/controllers/graph-controller.d.ts.map +1 -0
- package/dist/controllers/graph-controller.js +142 -0
- package/dist/controllers/graph-controller.js.map +1 -0
- package/dist/controllers/index.d.ts +17 -0
- package/dist/controllers/index.d.ts.map +1 -0
- package/dist/controllers/index.js +12 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/memory-controller.d.ts +78 -0
- package/dist/controllers/memory-controller.d.ts.map +1 -0
- package/dist/controllers/memory-controller.js +232 -0
- package/dist/controllers/memory-controller.js.map +1 -0
- package/dist/controllers/search-controller.d.ts +113 -0
- package/dist/controllers/search-controller.d.ts.map +1 -0
- package/dist/controllers/search-controller.js +314 -0
- package/dist/controllers/search-controller.js.map +1 -0
- package/dist/data/audit/operation-log-contract.d.ts +68 -0
- package/dist/data/audit/operation-log-contract.d.ts.map +1 -0
- package/dist/data/audit/operation-log-contract.js +16 -0
- package/dist/data/audit/operation-log-contract.js.map +1 -0
- package/dist/data/audit/operation-log-factory.d.ts +4 -0
- package/dist/data/audit/operation-log-factory.d.ts.map +1 -0
- package/dist/data/audit/operation-log-factory.js +8 -0
- package/dist/data/audit/operation-log-factory.js.map +1 -0
- package/dist/data/audit/operation-log-pg.d.ts +34 -0
- package/dist/data/audit/operation-log-pg.d.ts.map +1 -0
- package/dist/data/audit/operation-log-pg.js +125 -0
- package/dist/data/audit/operation-log-pg.js.map +1 -0
- package/dist/data/db-connection.d.ts +10 -0
- package/dist/data/db-connection.d.ts.map +1 -0
- package/dist/data/db-connection.js +33 -0
- package/dist/data/db-connection.js.map +1 -0
- package/dist/data/graph-generation/graph-generation-contract.d.ts +94 -0
- package/dist/data/graph-generation/graph-generation-contract.d.ts.map +1 -0
- package/dist/data/graph-generation/graph-generation-contract.js +2 -0
- package/dist/data/graph-generation/graph-generation-contract.js.map +1 -0
- package/dist/data/graph-generation/graph-generation-repository-factory.d.ts +3 -0
- package/dist/data/graph-generation/graph-generation-repository-factory.d.ts.map +1 -0
- package/dist/data/graph-generation/graph-generation-repository-factory.js +7 -0
- package/dist/data/graph-generation/graph-generation-repository-factory.js.map +1 -0
- package/dist/data/graph-generation/graph-generation-repository-pg.d.ts +12 -0
- package/dist/data/graph-generation/graph-generation-repository-pg.d.ts.map +1 -0
- package/dist/data/graph-generation/graph-generation-repository-pg.js +335 -0
- package/dist/data/graph-generation/graph-generation-repository-pg.js.map +1 -0
- package/dist/data/graph-generation/index.d.ts +4 -0
- package/dist/data/graph-generation/index.d.ts.map +1 -0
- package/dist/data/graph-generation/index.js +3 -0
- package/dist/data/graph-generation/index.js.map +1 -0
- package/dist/data/handoff/handoff-contract.d.ts +32 -0
- package/dist/data/handoff/handoff-contract.d.ts.map +1 -0
- package/dist/data/handoff/handoff-contract.js +12 -0
- package/dist/data/handoff/handoff-contract.js.map +1 -0
- package/dist/data/handoff/handoff-repository-pg.d.ts +22 -0
- package/dist/data/handoff/handoff-repository-pg.d.ts.map +1 -0
- package/dist/data/handoff/handoff-repository-pg.js +177 -0
- package/dist/data/handoff/handoff-repository-pg.js.map +1 -0
- package/dist/data/handoff/handoff-repository.d.ts +7 -0
- package/dist/data/handoff/handoff-repository.d.ts.map +1 -0
- package/dist/data/handoff/handoff-repository.js +9 -0
- package/dist/data/handoff/handoff-repository.js.map +1 -0
- package/dist/data/keyword/keyword-search-factory.d.ts +9 -0
- package/dist/data/keyword/keyword-search-factory.d.ts.map +1 -0
- package/dist/data/keyword/keyword-search-factory.js +23 -0
- package/dist/data/keyword/keyword-search-factory.js.map +1 -0
- package/dist/data/keyword/keyword-search-pg.d.ts +52 -0
- package/dist/data/keyword/keyword-search-pg.d.ts.map +1 -0
- package/dist/data/keyword/keyword-search-pg.js +423 -0
- package/dist/data/keyword/keyword-search-pg.js.map +1 -0
- package/dist/data/managed-runs/managed-run-contract.d.ts +193 -0
- package/dist/data/managed-runs/managed-run-contract.d.ts.map +1 -0
- package/dist/data/managed-runs/managed-run-contract.js +41 -0
- package/dist/data/managed-runs/managed-run-contract.js.map +1 -0
- package/dist/data/managed-runs/managed-run-repository-pg.d.ts +48 -0
- package/dist/data/managed-runs/managed-run-repository-pg.d.ts.map +1 -0
- package/dist/data/managed-runs/managed-run-repository-pg.js +316 -0
- package/dist/data/managed-runs/managed-run-repository-pg.js.map +1 -0
- package/dist/data/memory/index.d.ts +6 -0
- package/dist/data/memory/index.d.ts.map +1 -0
- package/dist/data/memory/index.js +5 -0
- package/dist/data/memory/index.js.map +1 -0
- package/dist/data/memory/memory-repository-contract.d.ts +54 -0
- package/dist/data/memory/memory-repository-contract.d.ts.map +1 -0
- package/dist/data/memory/memory-repository-contract.js +2 -0
- package/dist/data/memory/memory-repository-contract.js.map +1 -0
- package/dist/data/memory/memory-repository-factory.d.ts +4 -0
- package/dist/data/memory/memory-repository-factory.d.ts.map +1 -0
- package/dist/data/memory/memory-repository-factory.js +8 -0
- package/dist/data/memory/memory-repository-factory.js.map +1 -0
- package/dist/data/memory/memory-repository-pg.d.ts +111 -0
- package/dist/data/memory/memory-repository-pg.d.ts.map +1 -0
- package/dist/data/memory/memory-repository-pg.js +448 -0
- package/dist/data/memory/memory-repository-pg.js.map +1 -0
- package/dist/data/memory/memory-repository.d.ts +3 -0
- package/dist/data/memory/memory-repository.d.ts.map +1 -0
- package/dist/data/memory/memory-repository.js +2 -0
- package/dist/data/memory/memory-repository.js.map +1 -0
- package/dist/data/memory/observation-contract.d.ts +47 -0
- package/dist/data/memory/observation-contract.d.ts.map +1 -0
- package/dist/data/memory/observation-contract.js +13 -0
- package/dist/data/memory/observation-contract.js.map +1 -0
- package/dist/data/memory/observation-repository-pg.d.ts +64 -0
- package/dist/data/memory/observation-repository-pg.d.ts.map +1 -0
- package/dist/data/memory/observation-repository-pg.js +244 -0
- package/dist/data/memory/observation-repository-pg.js.map +1 -0
- package/dist/data/memory/observation-repository.d.ts +6 -0
- package/dist/data/memory/observation-repository.d.ts.map +1 -0
- package/dist/data/memory/observation-repository.js +8 -0
- package/dist/data/memory/observation-repository.js.map +1 -0
- package/dist/data/proposal/proposal-contract.d.ts +47 -0
- package/dist/data/proposal/proposal-contract.d.ts.map +1 -0
- package/dist/data/proposal/proposal-contract.js +32 -0
- package/dist/data/proposal/proposal-contract.js.map +1 -0
- package/dist/data/proposal/proposal-repository-pg.d.ts +20 -0
- package/dist/data/proposal/proposal-repository-pg.d.ts.map +1 -0
- package/dist/data/proposal/proposal-repository-pg.js +199 -0
- package/dist/data/proposal/proposal-repository-pg.js.map +1 -0
- package/dist/data/proposal/proposal-repository.d.ts +7 -0
- package/dist/data/proposal/proposal-repository.d.ts.map +1 -0
- package/dist/data/proposal/proposal-repository.js +9 -0
- package/dist/data/proposal/proposal-repository.js.map +1 -0
- package/dist/data/symbol/symbol-repo-generation.d.ts +61 -0
- package/dist/data/symbol/symbol-repo-generation.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-generation.js +380 -0
- package/dist/data/symbol/symbol-repo-generation.js.map +1 -0
- package/dist/data/symbol/symbol-repo-graph.d.ts +65 -0
- package/dist/data/symbol/symbol-repo-graph.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-graph.js +457 -0
- package/dist/data/symbol/symbol-repo-graph.js.map +1 -0
- package/dist/data/symbol/symbol-repo-identity.d.ts +21 -0
- package/dist/data/symbol/symbol-repo-identity.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-identity.js +96 -0
- package/dist/data/symbol/symbol-repo-identity.js.map +1 -0
- package/dist/data/symbol/symbol-repo-mappers.d.ts +87 -0
- package/dist/data/symbol/symbol-repo-mappers.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-mappers.js +91 -0
- package/dist/data/symbol/symbol-repo-mappers.js.map +1 -0
- package/dist/data/symbol/symbol-repo-queries.d.ts +54 -0
- package/dist/data/symbol/symbol-repo-queries.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-queries.js +331 -0
- package/dist/data/symbol/symbol-repo-queries.js.map +1 -0
- package/dist/data/symbol/symbol-repo-types.d.ts +243 -0
- package/dist/data/symbol/symbol-repo-types.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-types.js +8 -0
- package/dist/data/symbol/symbol-repo-types.js.map +1 -0
- package/dist/data/symbol/symbol-repo-workspace.d.ts +20 -0
- package/dist/data/symbol/symbol-repo-workspace.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repo-workspace.js +148 -0
- package/dist/data/symbol/symbol-repo-workspace.js.map +1 -0
- package/dist/data/symbol/symbol-repository-factory.d.ts +10 -0
- package/dist/data/symbol/symbol-repository-factory.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repository-factory.js +16 -0
- package/dist/data/symbol/symbol-repository-factory.js.map +1 -0
- package/dist/data/symbol/symbol-repository-pg.d.ts +84 -0
- package/dist/data/symbol/symbol-repository-pg.d.ts.map +1 -0
- package/dist/data/symbol/symbol-repository-pg.js +81 -0
- package/dist/data/symbol/symbol-repository-pg.js.map +1 -0
- package/dist/data/vector/base-vector-store.d.ts +137 -0
- package/dist/data/vector/base-vector-store.d.ts.map +1 -0
- package/dist/data/vector/base-vector-store.js +166 -0
- package/dist/data/vector/base-vector-store.js.map +1 -0
- package/dist/data/vector/hybrid-search.d.ts +64 -0
- package/dist/data/vector/hybrid-search.d.ts.map +1 -0
- package/dist/data/vector/hybrid-search.js +238 -0
- package/dist/data/vector/hybrid-search.js.map +1 -0
- package/dist/data/vector/index.d.ts +9 -0
- package/dist/data/vector/index.d.ts.map +1 -0
- package/dist/data/vector/index.js +7 -0
- package/dist/data/vector/index.js.map +1 -0
- package/dist/data/vector/postgres-vector-store.d.ts +118 -0
- package/dist/data/vector/postgres-vector-store.d.ts.map +1 -0
- package/dist/data/vector/postgres-vector-store.js +703 -0
- package/dist/data/vector/postgres-vector-store.js.map +1 -0
- package/dist/data/vector/vector-store-factory.d.ts +9 -0
- package/dist/data/vector/vector-store-factory.d.ts.map +1 -0
- package/dist/data/vector/vector-store-factory.js +46 -0
- package/dist/data/vector/vector-store-factory.js.map +1 -0
- package/dist/generated/prisma/client.d.ts +1 -0
- package/dist/generated/prisma/client.js +5 -0
- package/dist/generated/prisma/default.d.ts +1 -0
- package/dist/generated/prisma/default.js +5 -0
- package/dist/generated/prisma/edge.d.ts +1 -0
- package/dist/generated/prisma/edge.js +601 -0
- package/dist/generated/prisma/index-browser.js +627 -0
- package/dist/generated/prisma/index.d.ts +52672 -0
- package/dist/generated/prisma/index.js +601 -0
- package/dist/generated/prisma/package.json +144 -0
- package/dist/generated/prisma/query_compiler_fast_bg.js +2 -0
- package/dist/generated/prisma/query_compiler_fast_bg.wasm +0 -0
- package/dist/generated/prisma/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/dist/generated/prisma/runtime/client.d.ts +3386 -0
- package/dist/generated/prisma/runtime/client.js +86 -0
- package/dist/generated/prisma/runtime/index-browser.d.ts +90 -0
- package/dist/generated/prisma/runtime/index-browser.js +6 -0
- package/dist/generated/prisma/runtime/wasm-compiler-edge.js +76 -0
- package/dist/generated/prisma/schema.prisma +746 -0
- package/dist/generated/prisma/wasm-edge-light-loader.mjs +5 -0
- package/dist/generated/prisma/wasm-worker-loader.mjs +5 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/models/CacheEntry.d.ts +66 -0
- package/dist/models/CacheEntry.d.ts.map +1 -0
- package/dist/models/CacheEntry.js +148 -0
- package/dist/models/CacheEntry.js.map +1 -0
- package/dist/models/CompressedContent.d.ts +59 -0
- package/dist/models/CompressedContent.d.ts.map +1 -0
- package/dist/models/CompressedContent.js +169 -0
- package/dist/models/CompressedContent.js.map +1 -0
- package/dist/models/Memory.d.ts +9 -0
- package/dist/models/Memory.d.ts.map +1 -0
- package/dist/models/Memory.js +10 -0
- package/dist/models/Memory.js.map +1 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +6 -0
- package/dist/models/index.js.map +1 -0
- package/dist/scripts/beir-benchmark.d.ts +3 -0
- package/dist/scripts/beir-benchmark.d.ts.map +1 -0
- package/dist/scripts/beir-benchmark.js +275 -0
- package/dist/scripts/beir-benchmark.js.map +1 -0
- package/dist/scripts/create-sicad-beir-fixture.d.ts +3 -0
- package/dist/scripts/create-sicad-beir-fixture.d.ts.map +1 -0
- package/dist/scripts/create-sicad-beir-fixture.js +200 -0
- package/dist/scripts/create-sicad-beir-fixture.js.map +1 -0
- package/dist/scripts/symbol-benchmark.d.ts +24 -0
- package/dist/scripts/symbol-benchmark.d.ts.map +1 -0
- package/dist/scripts/symbol-benchmark.js +319 -0
- package/dist/scripts/symbol-benchmark.js.map +1 -0
- package/dist/services/bootstrap/bootstrap-service.d.ts +157 -0
- package/dist/services/bootstrap/bootstrap-service.d.ts.map +1 -0
- package/dist/services/bootstrap/bootstrap-service.js +588 -0
- package/dist/services/bootstrap/bootstrap-service.js.map +1 -0
- package/dist/services/cache/embedding-cache-contract.d.ts +18 -0
- package/dist/services/cache/embedding-cache-contract.d.ts.map +1 -0
- package/dist/services/cache/embedding-cache-contract.js +2 -0
- package/dist/services/cache/embedding-cache-contract.js.map +1 -0
- package/dist/services/cache/embedding-cache-factory.d.ts +4 -0
- package/dist/services/cache/embedding-cache-factory.d.ts.map +1 -0
- package/dist/services/cache/embedding-cache-factory.js +8 -0
- package/dist/services/cache/embedding-cache-factory.js.map +1 -0
- package/dist/services/cache/embedding-cache-pg.d.ts +78 -0
- package/dist/services/cache/embedding-cache-pg.d.ts.map +1 -0
- package/dist/services/cache/embedding-cache-pg.js +220 -0
- package/dist/services/cache/embedding-cache-pg.js.map +1 -0
- package/dist/services/cache/index.d.ts +5 -0
- package/dist/services/cache/index.d.ts.map +1 -0
- package/dist/services/cache/index.js +5 -0
- package/dist/services/cache/index.js.map +1 -0
- package/dist/services/cache/l1-memory-cache.d.ts +71 -0
- package/dist/services/cache/l1-memory-cache.d.ts.map +1 -0
- package/dist/services/cache/l1-memory-cache.js +191 -0
- package/dist/services/cache/l1-memory-cache.js.map +1 -0
- package/dist/services/checkpoint/auto-checkpointer.d.ts +69 -0
- package/dist/services/checkpoint/auto-checkpointer.d.ts.map +1 -0
- package/dist/services/checkpoint/auto-checkpointer.js +143 -0
- package/dist/services/checkpoint/auto-checkpointer.js.map +1 -0
- package/dist/services/checkpoint/checkpoint-manager.d.ts +9 -0
- package/dist/services/checkpoint/checkpoint-manager.d.ts.map +1 -0
- package/dist/services/checkpoint/checkpoint-manager.js +25 -0
- package/dist/services/checkpoint/checkpoint-manager.js.map +1 -0
- package/dist/services/checkpoint/checkpoint-store-pg.d.ts +107 -0
- package/dist/services/checkpoint/checkpoint-store-pg.d.ts.map +1 -0
- package/dist/services/checkpoint/checkpoint-store-pg.js +476 -0
- package/dist/services/checkpoint/checkpoint-store-pg.js.map +1 -0
- package/dist/services/checkpoint/checkpoint-store.d.ts +100 -0
- package/dist/services/checkpoint/checkpoint-store.d.ts.map +1 -0
- package/dist/services/checkpoint/checkpoint-store.js +24 -0
- package/dist/services/checkpoint/checkpoint-store.js.map +1 -0
- package/dist/services/checkpoint/index.d.ts +9 -0
- package/dist/services/checkpoint/index.d.ts.map +1 -0
- package/dist/services/checkpoint/index.js +8 -0
- package/dist/services/checkpoint/index.js.map +1 -0
- package/dist/services/compression/code-compressor.d.ts +76 -0
- package/dist/services/compression/code-compressor.d.ts.map +1 -0
- package/dist/services/compression/code-compressor.js +395 -0
- package/dist/services/compression/code-compressor.js.map +1 -0
- package/dist/services/compression/index.d.ts +5 -0
- package/dist/services/compression/index.d.ts.map +1 -0
- package/dist/services/compression/index.js +5 -0
- package/dist/services/compression/index.js.map +1 -0
- package/dist/services/context/session-file-cache.d.ts +87 -0
- package/dist/services/context/session-file-cache.d.ts.map +1 -0
- package/dist/services/context/session-file-cache.js +213 -0
- package/dist/services/context/session-file-cache.js.map +1 -0
- package/dist/services/embeddings/cached-provider.d.ts +98 -0
- package/dist/services/embeddings/cached-provider.d.ts.map +1 -0
- package/dist/services/embeddings/cached-provider.js +162 -0
- package/dist/services/embeddings/cached-provider.js.map +1 -0
- package/dist/services/embeddings/config.d.ts +89 -0
- package/dist/services/embeddings/config.d.ts.map +1 -0
- package/dist/services/embeddings/config.js +341 -0
- package/dist/services/embeddings/config.js.map +1 -0
- package/dist/services/embeddings/embedding-service.d.ts +71 -0
- package/dist/services/embeddings/embedding-service.d.ts.map +1 -0
- package/dist/services/embeddings/embedding-service.js +147 -0
- package/dist/services/embeddings/embedding-service.js.map +1 -0
- package/dist/services/embeddings/index.d.ts +105 -0
- package/dist/services/embeddings/index.d.ts.map +1 -0
- package/dist/services/embeddings/index.js +174 -0
- package/dist/services/embeddings/index.js.map +1 -0
- package/dist/services/embeddings/provider.d.ts +164 -0
- package/dist/services/embeddings/provider.d.ts.map +1 -0
- package/dist/services/embeddings/provider.js +547 -0
- package/dist/services/embeddings/provider.js.map +1 -0
- package/dist/services/embeddings/providers/local-transformers.d.ts +80 -0
- package/dist/services/embeddings/providers/local-transformers.d.ts.map +1 -0
- package/dist/services/embeddings/providers/local-transformers.js +222 -0
- package/dist/services/embeddings/providers/local-transformers.js.map +1 -0
- package/dist/services/embeddings/rate-limiter.d.ts +55 -0
- package/dist/services/embeddings/rate-limiter.d.ts.map +1 -0
- package/dist/services/embeddings/rate-limiter.js +138 -0
- package/dist/services/embeddings/rate-limiter.js.map +1 -0
- package/dist/services/etl/graph-generation-coordinator.d.ts +26 -0
- package/dist/services/etl/graph-generation-coordinator.d.ts.map +1 -0
- package/dist/services/etl/graph-generation-coordinator.js +63 -0
- package/dist/services/etl/graph-generation-coordinator.js.map +1 -0
- package/dist/services/etl/index.d.ts +11 -0
- package/dist/services/etl/index.d.ts.map +1 -0
- package/dist/services/etl/index.js +9 -0
- package/dist/services/etl/index.js.map +1 -0
- package/dist/services/etl/pipeline.d.ts +70 -0
- package/dist/services/etl/pipeline.d.ts.map +1 -0
- package/dist/services/etl/pipeline.js +553 -0
- package/dist/services/etl/pipeline.js.map +1 -0
- package/dist/services/etl/stage-context.d.ts +153 -0
- package/dist/services/etl/stage-context.d.ts.map +1 -0
- package/dist/services/etl/stage-context.js +11 -0
- package/dist/services/etl/stage-context.js.map +1 -0
- package/dist/services/etl/stages/discover.d.ts +40 -0
- package/dist/services/etl/stages/discover.d.ts.map +1 -0
- package/dist/services/etl/stages/discover.js +213 -0
- package/dist/services/etl/stages/discover.js.map +1 -0
- package/dist/services/etl/stages/load.d.ts +39 -0
- package/dist/services/etl/stages/load.d.ts.map +1 -0
- package/dist/services/etl/stages/load.js +361 -0
- package/dist/services/etl/stages/load.js.map +1 -0
- package/dist/services/etl/stages/parse.d.ts +58 -0
- package/dist/services/etl/stages/parse.d.ts.map +1 -0
- package/dist/services/etl/stages/parse.js +536 -0
- package/dist/services/etl/stages/parse.js.map +1 -0
- package/dist/services/etl/stages/resolve.d.ts +66 -0
- package/dist/services/etl/stages/resolve.d.ts.map +1 -0
- package/dist/services/etl/stages/resolve.js +503 -0
- package/dist/services/etl/stages/resolve.js.map +1 -0
- package/dist/services/events/event-bus.d.ts +166 -0
- package/dist/services/events/event-bus.d.ts.map +1 -0
- package/dist/services/events/event-bus.js +32 -0
- package/dist/services/events/event-bus.js.map +1 -0
- package/dist/services/events/index.d.ts +6 -0
- package/dist/services/events/index.d.ts.map +1 -0
- package/dist/services/events/index.js +5 -0
- package/dist/services/events/index.js.map +1 -0
- package/dist/services/executor/executor.d.ts +103 -0
- package/dist/services/executor/executor.d.ts.map +1 -0
- package/dist/services/executor/executor.js +518 -0
- package/dist/services/executor/executor.js.map +1 -0
- package/dist/services/executor/index.d.ts +20 -0
- package/dist/services/executor/index.d.ts.map +1 -0
- package/dist/services/executor/index.js +16 -0
- package/dist/services/executor/index.js.map +1 -0
- package/dist/services/executor/intent-search.d.ts +52 -0
- package/dist/services/executor/intent-search.d.ts.map +1 -0
- package/dist/services/executor/intent-search.js +195 -0
- package/dist/services/executor/intent-search.js.map +1 -0
- package/dist/services/executor/run-pool.d.ts +53 -0
- package/dist/services/executor/run-pool.d.ts.map +1 -0
- package/dist/services/executor/run-pool.js +71 -0
- package/dist/services/executor/run-pool.js.map +1 -0
- package/dist/services/executor/runtime.d.ts +82 -0
- package/dist/services/executor/runtime.d.ts.map +1 -0
- package/dist/services/executor/runtime.js +254 -0
- package/dist/services/executor/runtime.js.map +1 -0
- package/dist/services/executor/sandbox.d.ts +67 -0
- package/dist/services/executor/sandbox.d.ts.map +1 -0
- package/dist/services/executor/sandbox.js +186 -0
- package/dist/services/executor/sandbox.js.map +1 -0
- package/dist/services/graph/graph-queries.d.ts +110 -0
- package/dist/services/graph/graph-queries.d.ts.map +1 -0
- package/dist/services/graph/graph-queries.js +336 -0
- package/dist/services/graph/graph-queries.js.map +1 -0
- package/dist/services/graph/graph-store-factory.d.ts +12 -0
- package/dist/services/graph/graph-store-factory.d.ts.map +1 -0
- package/dist/services/graph/graph-store-factory.js +30 -0
- package/dist/services/graph/graph-store-factory.js.map +1 -0
- package/dist/services/graph/graph-store-pg.d.ts +127 -0
- package/dist/services/graph/graph-store-pg.d.ts.map +1 -0
- package/dist/services/graph/graph-store-pg.js +422 -0
- package/dist/services/graph/graph-store-pg.js.map +1 -0
- package/dist/services/graph/index.d.ts +7 -0
- package/dist/services/graph/index.d.ts.map +1 -0
- package/dist/services/graph/index.js +6 -0
- package/dist/services/graph/index.js.map +1 -0
- package/dist/services/graph/memory-graph.service.d.ts +97 -0
- package/dist/services/graph/memory-graph.service.d.ts.map +1 -0
- package/dist/services/graph/memory-graph.service.js +171 -0
- package/dist/services/graph/memory-graph.service.js.map +1 -0
- package/dist/services/graph/relation-extractor.d.ts +61 -0
- package/dist/services/graph/relation-extractor.d.ts.map +1 -0
- package/dist/services/graph/relation-extractor.js +306 -0
- package/dist/services/graph/relation-extractor.js.map +1 -0
- package/dist/services/graph/types.d.ts +127 -0
- package/dist/services/graph/types.d.ts.map +1 -0
- package/dist/services/graph/types.js +8 -0
- package/dist/services/graph/types.js.map +1 -0
- package/dist/services/handoff/handoff-auto-injector.d.ts +32 -0
- package/dist/services/handoff/handoff-auto-injector.d.ts.map +1 -0
- package/dist/services/handoff/handoff-auto-injector.js +72 -0
- package/dist/services/handoff/handoff-auto-injector.js.map +1 -0
- package/dist/services/handoff/handoff-service.d.ts +83 -0
- package/dist/services/handoff/handoff-service.d.ts.map +1 -0
- package/dist/services/handoff/handoff-service.js +238 -0
- package/dist/services/handoff/handoff-service.js.map +1 -0
- package/dist/services/health/local-health-checker.d.ts +49 -0
- package/dist/services/health/local-health-checker.d.ts.map +1 -0
- package/dist/services/health/local-health-checker.js +82 -0
- package/dist/services/health/local-health-checker.js.map +1 -0
- package/dist/services/hooks/attribution-resolver.d.ts +113 -0
- package/dist/services/hooks/attribution-resolver.d.ts.map +1 -0
- package/dist/services/hooks/attribution-resolver.js +227 -0
- package/dist/services/hooks/attribution-resolver.js.map +1 -0
- package/dist/services/hooks/co-retrieval-hook.d.ts +63 -0
- package/dist/services/hooks/co-retrieval-hook.d.ts.map +1 -0
- package/dist/services/hooks/co-retrieval-hook.js +145 -0
- package/dist/services/hooks/co-retrieval-hook.js.map +1 -0
- package/dist/services/hooks/compaction-snapshot-service.d.ts +81 -0
- package/dist/services/hooks/compaction-snapshot-service.d.ts.map +1 -0
- package/dist/services/hooks/compaction-snapshot-service.js +308 -0
- package/dist/services/hooks/compaction-snapshot-service.js.map +1 -0
- package/dist/services/hooks/hook-service.d.ts +100 -0
- package/dist/services/hooks/hook-service.d.ts.map +1 -0
- package/dist/services/hooks/hook-service.js +272 -0
- package/dist/services/hooks/hook-service.js.map +1 -0
- package/dist/services/hooks/observation-extractor.d.ts +30 -0
- package/dist/services/hooks/observation-extractor.d.ts.map +1 -0
- package/dist/services/hooks/observation-extractor.js +364 -0
- package/dist/services/hooks/observation-extractor.js.map +1 -0
- package/dist/services/hooks/search-session-hook.d.ts +34 -0
- package/dist/services/hooks/search-session-hook.d.ts.map +1 -0
- package/dist/services/hooks/search-session-hook.js +121 -0
- package/dist/services/hooks/search-session-hook.js.map +1 -0
- package/dist/services/hooks/session-pin-store.d.ts +32 -0
- package/dist/services/hooks/session-pin-store.d.ts.map +1 -0
- package/dist/services/hooks/session-pin-store.js +57 -0
- package/dist/services/hooks/session-pin-store.js.map +1 -0
- package/dist/services/hooks/writer-queue.d.ts +35 -0
- package/dist/services/hooks/writer-queue.d.ts.map +1 -0
- package/dist/services/hooks/writer-queue.js +58 -0
- package/dist/services/hooks/writer-queue.js.map +1 -0
- package/dist/services/index.d.ts +108 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +100 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/jobs/auto-improve-apply.d.ts +32 -0
- package/dist/services/jobs/auto-improve-apply.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-apply.js +135 -0
- package/dist/services/jobs/auto-improve-apply.js.map +1 -0
- package/dist/services/jobs/auto-improve-config.d.ts +25 -0
- package/dist/services/jobs/auto-improve-config.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-config.js +40 -0
- package/dist/services/jobs/auto-improve-config.js.map +1 -0
- package/dist/services/jobs/auto-improve-job.d.ts +89 -0
- package/dist/services/jobs/auto-improve-job.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-job.js +93 -0
- package/dist/services/jobs/auto-improve-job.js.map +1 -0
- package/dist/services/jobs/auto-improve-llm.d.ts +25 -0
- package/dist/services/jobs/auto-improve-llm.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-llm.js +88 -0
- package/dist/services/jobs/auto-improve-llm.js.map +1 -0
- package/dist/services/jobs/auto-improve-ops.d.ts +11 -0
- package/dist/services/jobs/auto-improve-ops.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-ops.js +170 -0
- package/dist/services/jobs/auto-improve-ops.js.map +1 -0
- package/dist/services/jobs/auto-improve-patterns.d.ts +18 -0
- package/dist/services/jobs/auto-improve-patterns.d.ts.map +1 -0
- package/dist/services/jobs/auto-improve-patterns.js +160 -0
- package/dist/services/jobs/auto-improve-patterns.js.map +1 -0
- package/dist/services/jobs/index-job-store-contract.d.ts +22 -0
- package/dist/services/jobs/index-job-store-contract.d.ts.map +1 -0
- package/dist/services/jobs/index-job-store-contract.js +11 -0
- package/dist/services/jobs/index-job-store-contract.js.map +1 -0
- package/dist/services/jobs/index-job-store-pg.d.ts +77 -0
- package/dist/services/jobs/index-job-store-pg.d.ts.map +1 -0
- package/dist/services/jobs/index-job-store-pg.js +403 -0
- package/dist/services/jobs/index-job-store-pg.js.map +1 -0
- package/dist/services/jobs/index-job-store.d.ts +5 -0
- package/dist/services/jobs/index-job-store.d.ts.map +1 -0
- package/dist/services/jobs/index-job-store.js +7 -0
- package/dist/services/jobs/index-job-store.js.map +1 -0
- package/dist/services/jobs/index-job-tracker.d.ts +140 -0
- package/dist/services/jobs/index-job-tracker.d.ts.map +1 -0
- package/dist/services/jobs/index-job-tracker.js +344 -0
- package/dist/services/jobs/index-job-tracker.js.map +1 -0
- package/dist/services/jobs/index.d.ts +6 -0
- package/dist/services/jobs/index.d.ts.map +1 -0
- package/dist/services/jobs/index.js +6 -0
- package/dist/services/jobs/index.js.map +1 -0
- package/dist/services/jobs/memory-consolidation-job.d.ts +70 -0
- package/dist/services/jobs/memory-consolidation-job.d.ts.map +1 -0
- package/dist/services/jobs/memory-consolidation-job.js +312 -0
- package/dist/services/jobs/memory-consolidation-job.js.map +1 -0
- package/dist/services/jobs/observation-consolidation-job.d.ts +63 -0
- package/dist/services/jobs/observation-consolidation-job.d.ts.map +1 -0
- package/dist/services/jobs/observation-consolidation-job.js +253 -0
- package/dist/services/jobs/observation-consolidation-job.js.map +1 -0
- package/dist/services/memory/consolidator.d.ts +92 -0
- package/dist/services/memory/consolidator.d.ts.map +1 -0
- package/dist/services/memory/consolidator.js +182 -0
- package/dist/services/memory/consolidator.js.map +1 -0
- package/dist/services/memory/decay.d.ts +56 -0
- package/dist/services/memory/decay.d.ts.map +1 -0
- package/dist/services/memory/decay.js +73 -0
- package/dist/services/memory/decay.js.map +1 -0
- package/dist/services/memory/index.d.ts +12 -0
- package/dist/services/memory/index.d.ts.map +1 -0
- package/dist/services/memory/index.js +9 -0
- package/dist/services/memory/index.js.map +1 -0
- package/dist/services/memory/llm-client.d.ts +111 -0
- package/dist/services/memory/llm-client.d.ts.map +1 -0
- package/dist/services/memory/llm-client.js +450 -0
- package/dist/services/memory/llm-client.js.map +1 -0
- package/dist/services/memory/memory-clustering.d.ts +65 -0
- package/dist/services/memory/memory-clustering.d.ts.map +1 -0
- package/dist/services/memory/memory-clustering.js +298 -0
- package/dist/services/memory/memory-clustering.js.map +1 -0
- package/dist/services/memory/memory-service.d.ts +72 -0
- package/dist/services/memory/memory-service.d.ts.map +1 -0
- package/dist/services/memory/memory-service.js +178 -0
- package/dist/services/memory/memory-service.js.map +1 -0
- package/dist/services/memory/redundancy-filter.d.ts +26 -0
- package/dist/services/memory/redundancy-filter.d.ts.map +1 -0
- package/dist/services/memory/redundancy-filter.js +93 -0
- package/dist/services/memory/redundancy-filter.js.map +1 -0
- package/dist/services/memory/salience-judge.d.ts +51 -0
- package/dist/services/memory/salience-judge.d.ts.map +1 -0
- package/dist/services/memory/salience-judge.js +115 -0
- package/dist/services/memory/salience-judge.js.map +1 -0
- package/dist/services/metrics/token-metrics.d.ts +114 -0
- package/dist/services/metrics/token-metrics.d.ts.map +1 -0
- package/dist/services/metrics/token-metrics.js +272 -0
- package/dist/services/metrics/token-metrics.js.map +1 -0
- package/dist/services/monitoring/metrics.d.ts +154 -0
- package/dist/services/monitoring/metrics.d.ts.map +1 -0
- package/dist/services/monitoring/metrics.js +382 -0
- package/dist/services/monitoring/metrics.js.map +1 -0
- package/dist/services/pricing/models-dev-client.d.ts +141 -0
- package/dist/services/pricing/models-dev-client.d.ts.map +1 -0
- package/dist/services/pricing/models-dev-client.js +523 -0
- package/dist/services/pricing/models-dev-client.js.map +1 -0
- package/dist/services/project-identity/alias-resolver.d.ts +76 -0
- package/dist/services/project-identity/alias-resolver.d.ts.map +1 -0
- package/dist/services/project-identity/alias-resolver.js +129 -0
- package/dist/services/project-identity/alias-resolver.js.map +1 -0
- package/dist/services/project-identity/apply.d.ts +89 -0
- package/dist/services/project-identity/apply.d.ts.map +1 -0
- package/dist/services/project-identity/apply.js +619 -0
- package/dist/services/project-identity/apply.js.map +1 -0
- package/dist/services/project-identity/contracts.d.ts +103 -0
- package/dist/services/project-identity/contracts.d.ts.map +1 -0
- package/dist/services/project-identity/contracts.js +63 -0
- package/dist/services/project-identity/contracts.js.map +1 -0
- package/dist/services/project-identity/discovery.d.ts +39 -0
- package/dist/services/project-identity/discovery.d.ts.map +1 -0
- package/dist/services/project-identity/discovery.js +139 -0
- package/dist/services/project-identity/discovery.js.map +1 -0
- package/dist/services/project-identity/errors.d.ts +11 -0
- package/dist/services/project-identity/errors.d.ts.map +1 -0
- package/dist/services/project-identity/errors.js +40 -0
- package/dist/services/project-identity/errors.js.map +1 -0
- package/dist/services/project-identity/hash.d.ts +16 -0
- package/dist/services/project-identity/hash.d.ts.map +1 -0
- package/dist/services/project-identity/hash.js +91 -0
- package/dist/services/project-identity/hash.js.map +1 -0
- package/dist/services/project-identity/identity-guard-installer.d.ts +60 -0
- package/dist/services/project-identity/identity-guard-installer.d.ts.map +1 -0
- package/dist/services/project-identity/identity-guard-installer.js +116 -0
- package/dist/services/project-identity/identity-guard-installer.js.map +1 -0
- package/dist/services/project-identity/index.d.ts +25 -0
- package/dist/services/project-identity/index.d.ts.map +1 -0
- package/dist/services/project-identity/index.js +14 -0
- package/dist/services/project-identity/index.js.map +1 -0
- package/dist/services/project-identity/invalidator-registry.d.ts +52 -0
- package/dist/services/project-identity/invalidator-registry.d.ts.map +1 -0
- package/dist/services/project-identity/invalidator-registry.js +73 -0
- package/dist/services/project-identity/invalidator-registry.js.map +1 -0
- package/dist/services/project-identity/pg-array-codec.d.ts +24 -0
- package/dist/services/project-identity/pg-array-codec.d.ts.map +1 -0
- package/dist/services/project-identity/pg-array-codec.js +85 -0
- package/dist/services/project-identity/pg-array-codec.js.map +1 -0
- package/dist/services/project-identity/planner.d.ts +39 -0
- package/dist/services/project-identity/planner.d.ts.map +1 -0
- package/dist/services/project-identity/planner.js +206 -0
- package/dist/services/project-identity/planner.js.map +1 -0
- package/dist/services/project-identity/production-wiring.d.ts +60 -0
- package/dist/services/project-identity/production-wiring.d.ts.map +1 -0
- package/dist/services/project-identity/production-wiring.js +106 -0
- package/dist/services/project-identity/production-wiring.js.map +1 -0
- package/dist/services/project-identity/registry.d.ts +24 -0
- package/dist/services/project-identity/registry.d.ts.map +1 -0
- package/dist/services/project-identity/registry.js +72 -0
- package/dist/services/project-identity/registry.js.map +1 -0
- package/dist/services/project-identity/service.d.ts +28 -0
- package/dist/services/project-identity/service.d.ts.map +1 -0
- package/dist/services/project-identity/service.js +79 -0
- package/dist/services/project-identity/service.js.map +1 -0
- package/dist/services/query/prisma-client.d.ts +10 -0
- package/dist/services/query/prisma-client.d.ts.map +1 -0
- package/dist/services/query/prisma-client.js +37 -0
- package/dist/services/query/prisma-client.js.map +1 -0
- package/dist/services/scheduler/index.d.ts +13 -0
- package/dist/services/scheduler/index.d.ts.map +1 -0
- package/dist/services/scheduler/index.js +9 -0
- package/dist/services/scheduler/index.js.map +1 -0
- package/dist/services/scheduler/scheduler-cron.d.ts +39 -0
- package/dist/services/scheduler/scheduler-cron.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-cron.js +159 -0
- package/dist/services/scheduler/scheduler-cron.js.map +1 -0
- package/dist/services/scheduler/scheduler-defaults.d.ts +55 -0
- package/dist/services/scheduler/scheduler-defaults.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-defaults.js +188 -0
- package/dist/services/scheduler/scheduler-defaults.js.map +1 -0
- package/dist/services/scheduler/scheduler-store-factory.d.ts +13 -0
- package/dist/services/scheduler/scheduler-store-factory.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-store-factory.js +23 -0
- package/dist/services/scheduler/scheduler-store-factory.js.map +1 -0
- package/dist/services/scheduler/scheduler-store-pg.d.ts +44 -0
- package/dist/services/scheduler/scheduler-store-pg.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-store-pg.js +252 -0
- package/dist/services/scheduler/scheduler-store-pg.js.map +1 -0
- package/dist/services/scheduler/scheduler-store.d.ts +10 -0
- package/dist/services/scheduler/scheduler-store.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-store.js +2 -0
- package/dist/services/scheduler/scheduler-store.js.map +1 -0
- package/dist/services/scheduler/scheduler-types.d.ts +75 -0
- package/dist/services/scheduler/scheduler-types.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler-types.js +10 -0
- package/dist/services/scheduler/scheduler-types.js.map +1 -0
- package/dist/services/scheduler/scheduler.d.ts +149 -0
- package/dist/services/scheduler/scheduler.d.ts.map +1 -0
- package/dist/services/scheduler/scheduler.js +453 -0
- package/dist/services/scheduler/scheduler.js.map +1 -0
- package/dist/services/search/analytics-factory.d.ts +9 -0
- package/dist/services/search/analytics-factory.d.ts.map +1 -0
- package/dist/services/search/analytics-factory.js +24 -0
- package/dist/services/search/analytics-factory.js.map +1 -0
- package/dist/services/search/cache-factory.d.ts +9 -0
- package/dist/services/search/cache-factory.d.ts.map +1 -0
- package/dist/services/search/cache-factory.js +22 -0
- package/dist/services/search/cache-factory.js.map +1 -0
- package/dist/services/search/capture-policy-interfaces.d.ts +59 -0
- package/dist/services/search/capture-policy-interfaces.d.ts.map +1 -0
- package/dist/services/search/capture-policy-interfaces.js +15 -0
- package/dist/services/search/capture-policy-interfaces.js.map +1 -0
- package/dist/services/search/capture-policy.d.ts +54 -0
- package/dist/services/search/capture-policy.d.ts.map +1 -0
- package/dist/services/search/capture-policy.js +185 -0
- package/dist/services/search/capture-policy.js.map +1 -0
- package/dist/services/search/chunker/chunker-code.d.ts +24 -0
- package/dist/services/search/chunker/chunker-code.d.ts.map +1 -0
- package/dist/services/search/chunker/chunker-code.js +182 -0
- package/dist/services/search/chunker/chunker-code.js.map +1 -0
- package/dist/services/search/chunker/chunker-json-yaml.d.ts +9 -0
- package/dist/services/search/chunker/chunker-json-yaml.d.ts.map +1 -0
- package/dist/services/search/chunker/chunker-json-yaml.js +124 -0
- package/dist/services/search/chunker/chunker-json-yaml.js.map +1 -0
- package/dist/services/search/chunker/chunker-markdown.d.ts +9 -0
- package/dist/services/search/chunker/chunker-markdown.d.ts.map +1 -0
- package/dist/services/search/chunker/chunker-markdown.js +70 -0
- package/dist/services/search/chunker/chunker-markdown.js.map +1 -0
- package/dist/services/search/chunker/chunker-post.d.ts +12 -0
- package/dist/services/search/chunker/chunker-post.d.ts.map +1 -0
- package/dist/services/search/chunker/chunker-post.js +139 -0
- package/dist/services/search/chunker/chunker-post.js.map +1 -0
- package/dist/services/search/chunker/chunker-types.d.ts +43 -0
- package/dist/services/search/chunker/chunker-types.d.ts.map +1 -0
- package/dist/services/search/chunker/chunker-types.js +15 -0
- package/dist/services/search/chunker/chunker-types.js.map +1 -0
- package/dist/services/search/contextual-search-rlm.d.ts +243 -0
- package/dist/services/search/contextual-search-rlm.d.ts.map +1 -0
- package/dist/services/search/contextual-search-rlm.js +260 -0
- package/dist/services/search/contextual-search-rlm.js.map +1 -0
- package/dist/services/search/file-filter-cache.d.ts +55 -0
- package/dist/services/search/file-filter-cache.d.ts.map +1 -0
- package/dist/services/search/file-filter-cache.js +159 -0
- package/dist/services/search/file-filter-cache.js.map +1 -0
- package/dist/services/search/filter-validation.d.ts +61 -0
- package/dist/services/search/filter-validation.d.ts.map +1 -0
- package/dist/services/search/filter-validation.js +111 -0
- package/dist/services/search/filter-validation.js.map +1 -0
- package/dist/services/search/ignore-patterns.d.ts +39 -0
- package/dist/services/search/ignore-patterns.d.ts.map +1 -0
- package/dist/services/search/ignore-patterns.js +125 -0
- package/dist/services/search/ignore-patterns.js.map +1 -0
- package/dist/services/search/index-manager.d.ts +81 -0
- package/dist/services/search/index-manager.d.ts.map +1 -0
- package/dist/services/search/index-manager.js +315 -0
- package/dist/services/search/index-manager.js.map +1 -0
- package/dist/services/search/lexical-search.d.ts +83 -0
- package/dist/services/search/lexical-search.d.ts.map +1 -0
- package/dist/services/search/lexical-search.js +297 -0
- package/dist/services/search/lexical-search.js.map +1 -0
- package/dist/services/search/query-understanding.d.ts +115 -0
- package/dist/services/search/query-understanding.d.ts.map +1 -0
- package/dist/services/search/query-understanding.js +281 -0
- package/dist/services/search/query-understanding.js.map +1 -0
- package/dist/services/search/reranker.d.ts +59 -0
- package/dist/services/search/reranker.d.ts.map +1 -0
- package/dist/services/search/reranker.js +156 -0
- package/dist/services/search/reranker.js.map +1 -0
- package/dist/services/search/rlm-admin.d.ts +22 -0
- package/dist/services/search/rlm-admin.d.ts.map +1 -0
- package/dist/services/search/rlm-admin.js +92 -0
- package/dist/services/search/rlm-admin.js.map +1 -0
- package/dist/services/search/rlm-fusion.d.ts +23 -0
- package/dist/services/search/rlm-fusion.d.ts.map +1 -0
- package/dist/services/search/rlm-fusion.js +180 -0
- package/dist/services/search/rlm-fusion.js.map +1 -0
- package/dist/services/search/rlm-indexing.d.ts +71 -0
- package/dist/services/search/rlm-indexing.d.ts.map +1 -0
- package/dist/services/search/rlm-indexing.js +431 -0
- package/dist/services/search/rlm-indexing.js.map +1 -0
- package/dist/services/search/rlm-search.d.ts +28 -0
- package/dist/services/search/rlm-search.d.ts.map +1 -0
- package/dist/services/search/rlm-search.js +489 -0
- package/dist/services/search/rlm-search.js.map +1 -0
- package/dist/services/search/rlm-synapse.d.ts +44 -0
- package/dist/services/search/rlm-synapse.d.ts.map +1 -0
- package/dist/services/search/rlm-synapse.js +227 -0
- package/dist/services/search/rlm-synapse.js.map +1 -0
- package/dist/services/search/search-analytics-pg.d.ts +62 -0
- package/dist/services/search/search-analytics-pg.d.ts.map +1 -0
- package/dist/services/search/search-analytics-pg.js +242 -0
- package/dist/services/search/search-analytics-pg.js.map +1 -0
- package/dist/services/search/search-analytics.d.ts +3 -0
- package/dist/services/search/search-analytics.d.ts.map +1 -0
- package/dist/services/search/search-analytics.js +3 -0
- package/dist/services/search/search-analytics.js.map +1 -0
- package/dist/services/search/search-cache-pg.d.ts +49 -0
- package/dist/services/search/search-cache-pg.d.ts.map +1 -0
- package/dist/services/search/search-cache-pg.js +315 -0
- package/dist/services/search/search-cache-pg.js.map +1 -0
- package/dist/services/search/search-diagnostics.d.ts +39 -0
- package/dist/services/search/search-diagnostics.d.ts.map +1 -0
- package/dist/services/search/search-diagnostics.js +81 -0
- package/dist/services/search/search-diagnostics.js.map +1 -0
- package/dist/services/search/search-warmup.d.ts +29 -0
- package/dist/services/search/search-warmup.d.ts.map +1 -0
- package/dist/services/search/search-warmup.js +96 -0
- package/dist/services/search/search-warmup.js.map +1 -0
- package/dist/services/search/smart-chunker.d.ts +16 -0
- package/dist/services/search/smart-chunker.d.ts.map +1 -0
- package/dist/services/search/smart-chunker.js +67 -0
- package/dist/services/search/smart-chunker.js.map +1 -0
- package/dist/services/structural/diagnostics.d.ts +6 -0
- package/dist/services/structural/diagnostics.d.ts.map +1 -0
- package/dist/services/structural/diagnostics.js +22 -0
- package/dist/services/structural/diagnostics.js.map +1 -0
- package/dist/services/structural/fqn-codec.d.ts +105 -0
- package/dist/services/structural/fqn-codec.d.ts.map +1 -0
- package/dist/services/structural/fqn-codec.js +272 -0
- package/dist/services/structural/fqn-codec.js.map +1 -0
- package/dist/services/structural/grammar-integrity.d.ts +37 -0
- package/dist/services/structural/grammar-integrity.d.ts.map +1 -0
- package/dist/services/structural/grammar-integrity.js +196 -0
- package/dist/services/structural/grammar-integrity.js.map +1 -0
- package/dist/services/structural/grammar-loaders.d.ts +69 -0
- package/dist/services/structural/grammar-loaders.d.ts.map +1 -0
- package/dist/services/structural/grammar-loaders.js +229 -0
- package/dist/services/structural/grammar-loaders.js.map +1 -0
- package/dist/services/structural/language-manifest.d.ts +59 -0
- package/dist/services/structural/language-manifest.d.ts.map +1 -0
- package/dist/services/structural/language-manifest.js +413 -0
- package/dist/services/structural/language-manifest.js.map +1 -0
- package/dist/services/structural/native-lock-identities.d.ts +77 -0
- package/dist/services/structural/native-lock-identities.d.ts.map +1 -0
- package/dist/services/structural/native-lock-identities.js +192 -0
- package/dist/services/structural/native-lock-identities.js.map +1 -0
- package/dist/services/structural/native-node-helpers.d.ts +16 -0
- package/dist/services/structural/native-node-helpers.d.ts.map +1 -0
- package/dist/services/structural/native-node-helpers.js +145 -0
- package/dist/services/structural/native-node-helpers.js.map +1 -0
- package/dist/services/structural/parser-pool.d.ts +34 -0
- package/dist/services/structural/parser-pool.d.ts.map +1 -0
- package/dist/services/structural/parser-pool.js +148 -0
- package/dist/services/structural/parser-pool.js.map +1 -0
- package/dist/services/structural/parser-readiness.d.ts +30 -0
- package/dist/services/structural/parser-readiness.d.ts.map +1 -0
- package/dist/services/structural/parser-readiness.js +190 -0
- package/dist/services/structural/parser-readiness.js.map +1 -0
- package/dist/services/structural/query-pack-captures.d.ts +32 -0
- package/dist/services/structural/query-pack-captures.d.ts.map +1 -0
- package/dist/services/structural/query-pack-captures.js +173 -0
- package/dist/services/structural/query-pack-captures.js.map +1 -0
- package/dist/services/structural/query-pack-edges.d.ts +11 -0
- package/dist/services/structural/query-pack-edges.d.ts.map +1 -0
- package/dist/services/structural/query-pack-edges.js +521 -0
- package/dist/services/structural/query-pack-edges.js.map +1 -0
- package/dist/services/structural/query-pack-registry.d.ts +24 -0
- package/dist/services/structural/query-pack-registry.d.ts.map +1 -0
- package/dist/services/structural/query-pack-registry.js +42 -0
- package/dist/services/structural/query-pack-registry.js.map +1 -0
- package/dist/services/structural/query-pack.d.ts +10 -0
- package/dist/services/structural/query-pack.d.ts.map +1 -0
- package/dist/services/structural/query-pack.js +32 -0
- package/dist/services/structural/query-pack.js.map +1 -0
- package/dist/services/structural/query-packs/data-document.d.ts +7 -0
- package/dist/services/structural/query-packs/data-document.d.ts.map +1 -0
- package/dist/services/structural/query-packs/data-document.js +23 -0
- package/dist/services/structural/query-packs/data-document.js.map +1 -0
- package/dist/services/structural/query-packs/functional.d.ts +8 -0
- package/dist/services/structural/query-packs/functional.d.ts.map +1 -0
- package/dist/services/structural/query-packs/functional.js +58 -0
- package/dist/services/structural/query-packs/functional.js.map +1 -0
- package/dist/services/structural/query-packs/managed.d.ts +9 -0
- package/dist/services/structural/query-packs/managed.d.ts.map +1 -0
- package/dist/services/structural/query-packs/managed.js +114 -0
- package/dist/services/structural/query-packs/managed.js.map +1 -0
- package/dist/services/structural/query-packs/scripting.d.ts +7 -0
- package/dist/services/structural/query-packs/scripting.d.ts.map +1 -0
- package/dist/services/structural/query-packs/scripting.js +53 -0
- package/dist/services/structural/query-packs/scripting.js.map +1 -0
- package/dist/services/structural/query-packs/systems.d.ts +8 -0
- package/dist/services/structural/query-packs/systems.d.ts.map +1 -0
- package/dist/services/structural/query-packs/systems.js +74 -0
- package/dist/services/structural/query-packs/systems.js.map +1 -0
- package/dist/services/structural/query-packs/typescript.d.ts +4 -0
- package/dist/services/structural/query-packs/typescript.d.ts.map +1 -0
- package/dist/services/structural/query-packs/typescript.js +51 -0
- package/dist/services/structural/query-packs/typescript.js.map +1 -0
- package/dist/services/structural/resolver.d.ts +86 -0
- package/dist/services/structural/resolver.d.ts.map +1 -0
- package/dist/services/structural/resolver.js +189 -0
- package/dist/services/structural/resolver.js.map +1 -0
- package/dist/services/structural/resolvers/data-document.d.ts +4 -0
- package/dist/services/structural/resolvers/data-document.d.ts.map +1 -0
- package/dist/services/structural/resolvers/data-document.js +7 -0
- package/dist/services/structural/resolvers/data-document.js.map +1 -0
- package/dist/services/structural/resolvers/functional.d.ts +3 -0
- package/dist/services/structural/resolvers/functional.d.ts.map +1 -0
- package/dist/services/structural/resolvers/functional.js +30 -0
- package/dist/services/structural/resolvers/functional.js.map +1 -0
- package/dist/services/structural/resolvers/managed.d.ts +3 -0
- package/dist/services/structural/resolvers/managed.d.ts.map +1 -0
- package/dist/services/structural/resolvers/managed.js +44 -0
- package/dist/services/structural/resolvers/managed.js.map +1 -0
- package/dist/services/structural/resolvers/scripting.d.ts +4 -0
- package/dist/services/structural/resolvers/scripting.d.ts.map +1 -0
- package/dist/services/structural/resolvers/scripting.js +10 -0
- package/dist/services/structural/resolvers/scripting.js.map +1 -0
- package/dist/services/structural/resolvers/systems.d.ts +3 -0
- package/dist/services/structural/resolvers/systems.d.ts.map +1 -0
- package/dist/services/structural/resolvers/systems.js +33 -0
- package/dist/services/structural/resolvers/systems.js.map +1 -0
- package/dist/services/structural/resolvers/typescript.d.ts +6 -0
- package/dist/services/structural/resolvers/typescript.d.ts.map +1 -0
- package/dist/services/structural/resolvers/typescript.js +370 -0
- package/dist/services/structural/resolvers/typescript.js.map +1 -0
- package/dist/services/structural/schema-version.d.ts +42 -0
- package/dist/services/structural/schema-version.d.ts.map +1 -0
- package/dist/services/structural/schema-version.js +80 -0
- package/dist/services/structural/schema-version.js.map +1 -0
- package/dist/services/structural/source-span.d.ts +26 -0
- package/dist/services/structural/source-span.d.ts.map +1 -0
- package/dist/services/structural/source-span.js +117 -0
- package/dist/services/structural/source-span.js.map +1 -0
- package/dist/services/structural/structural-runtime.d.ts +55 -0
- package/dist/services/structural/structural-runtime.d.ts.map +1 -0
- package/dist/services/structural/structural-runtime.js +377 -0
- package/dist/services/structural/structural-runtime.js.map +1 -0
- package/dist/services/structural/symbol-signature.d.ts +25 -0
- package/dist/services/structural/symbol-signature.d.ts.map +1 -0
- package/dist/services/structural/symbol-signature.js +319 -0
- package/dist/services/structural/symbol-signature.js.map +1 -0
- package/dist/services/structural/types.d.ts +138 -0
- package/dist/services/structural/types.d.ts.map +1 -0
- package/dist/services/structural/types.js +27 -0
- package/dist/services/structural/types.js.map +1 -0
- package/dist/services/symbol/active-generation.d.ts +42 -0
- package/dist/services/symbol/active-generation.d.ts.map +1 -0
- package/dist/services/symbol/active-generation.js +56 -0
- package/dist/services/symbol/active-generation.js.map +1 -0
- package/dist/services/symbol/architecture.d.ts +238 -0
- package/dist/services/symbol/architecture.d.ts.map +1 -0
- package/dist/services/symbol/architecture.js +464 -0
- package/dist/services/symbol/architecture.js.map +1 -0
- package/dist/services/symbol/centrality.d.ts +24 -0
- package/dist/services/symbol/centrality.d.ts.map +1 -0
- package/dist/services/symbol/centrality.js +70 -0
- package/dist/services/symbol/centrality.js.map +1 -0
- package/dist/services/symbol/communities.d.ts +86 -0
- package/dist/services/symbol/communities.d.ts.map +1 -0
- package/dist/services/symbol/communities.js +551 -0
- package/dist/services/symbol/communities.js.map +1 -0
- package/dist/services/symbol/cycle-detection.d.ts +61 -0
- package/dist/services/symbol/cycle-detection.d.ts.map +1 -0
- package/dist/services/symbol/cycle-detection.js +182 -0
- package/dist/services/symbol/cycle-detection.js.map +1 -0
- package/dist/services/symbol/definition-lookup.d.ts +31 -0
- package/dist/services/symbol/definition-lookup.d.ts.map +1 -0
- package/dist/services/symbol/definition-lookup.js +53 -0
- package/dist/services/symbol/definition-lookup.js.map +1 -0
- package/dist/services/symbol/git-ref-validation.d.ts +26 -0
- package/dist/services/symbol/git-ref-validation.d.ts.map +1 -0
- package/dist/services/symbol/git-ref-validation.js +34 -0
- package/dist/services/symbol/git-ref-validation.js.map +1 -0
- package/dist/services/symbol/impact-analysis.d.ts +205 -0
- package/dist/services/symbol/impact-analysis.d.ts.map +1 -0
- package/dist/services/symbol/impact-analysis.js +617 -0
- package/dist/services/symbol/impact-analysis.js.map +1 -0
- package/dist/services/symbol/index.d.ts +20 -0
- package/dist/services/symbol/index.d.ts.map +1 -0
- package/dist/services/symbol/index.js +13 -0
- package/dist/services/symbol/index.js.map +1 -0
- package/dist/services/symbol/symbol-graph.service.d.ts +272 -0
- package/dist/services/symbol/symbol-graph.service.d.ts.map +1 -0
- package/dist/services/symbol/symbol-graph.service.js +580 -0
- package/dist/services/symbol/symbol-graph.service.js.map +1 -0
- package/dist/services/symbol/trace-path.d.ts +164 -0
- package/dist/services/symbol/trace-path.d.ts.map +1 -0
- package/dist/services/symbol/trace-path.js +448 -0
- package/dist/services/symbol/trace-path.js.map +1 -0
- package/dist/services/synapse/buffer/index.d.ts +2 -0
- package/dist/services/synapse/buffer/index.d.ts.map +1 -0
- package/dist/services/synapse/buffer/index.js +2 -0
- package/dist/services/synapse/buffer/index.js.map +1 -0
- package/dist/services/synapse/buffer/working-memory-buffer.d.ts +124 -0
- package/dist/services/synapse/buffer/working-memory-buffer.d.ts.map +1 -0
- package/dist/services/synapse/buffer/working-memory-buffer.js +251 -0
- package/dist/services/synapse/buffer/working-memory-buffer.js.map +1 -0
- package/dist/services/synapse/index.d.ts +27 -0
- package/dist/services/synapse/index.d.ts.map +1 -0
- package/dist/services/synapse/index.js +35 -0
- package/dist/services/synapse/index.js.map +1 -0
- package/dist/services/synapse/inhibition/chain-inhibition.d.ts +36 -0
- package/dist/services/synapse/inhibition/chain-inhibition.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/chain-inhibition.js +133 -0
- package/dist/services/synapse/inhibition/chain-inhibition.js.map +1 -0
- package/dist/services/synapse/inhibition/confidence-gate.d.ts +49 -0
- package/dist/services/synapse/inhibition/confidence-gate.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/confidence-gate.js +131 -0
- package/dist/services/synapse/inhibition/confidence-gate.js.map +1 -0
- package/dist/services/synapse/inhibition/diversity-penalty.d.ts +28 -0
- package/dist/services/synapse/inhibition/diversity-penalty.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/diversity-penalty.js +75 -0
- package/dist/services/synapse/inhibition/diversity-penalty.js.map +1 -0
- package/dist/services/synapse/inhibition/index.d.ts +5 -0
- package/dist/services/synapse/inhibition/index.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/index.js +5 -0
- package/dist/services/synapse/inhibition/index.js.map +1 -0
- package/dist/services/synapse/inhibition/temporal-inhibition.d.ts +21 -0
- package/dist/services/synapse/inhibition/temporal-inhibition.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/temporal-inhibition.js +70 -0
- package/dist/services/synapse/inhibition/temporal-inhibition.js.map +1 -0
- package/dist/services/synapse/inhibition/type-inference.d.ts +14 -0
- package/dist/services/synapse/inhibition/type-inference.d.ts.map +1 -0
- package/dist/services/synapse/inhibition/type-inference.js +36 -0
- package/dist/services/synapse/inhibition/type-inference.js.map +1 -0
- package/dist/services/synapse/metacognition/index.d.ts +2 -0
- package/dist/services/synapse/metacognition/index.d.ts.map +1 -0
- package/dist/services/synapse/metacognition/index.js +2 -0
- package/dist/services/synapse/metacognition/index.js.map +1 -0
- package/dist/services/synapse/metacognition/score-spectrum.d.ts +29 -0
- package/dist/services/synapse/metacognition/score-spectrum.d.ts.map +1 -0
- package/dist/services/synapse/metacognition/score-spectrum.js +70 -0
- package/dist/services/synapse/metacognition/score-spectrum.js.map +1 -0
- package/dist/services/synapse/plasticity/compress.d.ts +64 -0
- package/dist/services/synapse/plasticity/compress.d.ts.map +1 -0
- package/dist/services/synapse/plasticity/compress.js +82 -0
- package/dist/services/synapse/plasticity/compress.js.map +1 -0
- package/dist/services/synapse/plasticity/embedding-evolution.d.ts +42 -0
- package/dist/services/synapse/plasticity/embedding-evolution.d.ts.map +1 -0
- package/dist/services/synapse/plasticity/embedding-evolution.js +81 -0
- package/dist/services/synapse/plasticity/embedding-evolution.js.map +1 -0
- package/dist/services/synapse/plasticity/index.d.ts +4 -0
- package/dist/services/synapse/plasticity/index.d.ts.map +1 -0
- package/dist/services/synapse/plasticity/index.js +4 -0
- package/dist/services/synapse/plasticity/index.js.map +1 -0
- package/dist/services/synapse/plasticity/strengthen.d.ts +45 -0
- package/dist/services/synapse/plasticity/strengthen.d.ts.map +1 -0
- package/dist/services/synapse/plasticity/strengthen.js +69 -0
- package/dist/services/synapse/plasticity/strengthen.js.map +1 -0
- package/dist/services/synapse/prefetch/index.d.ts +2 -0
- package/dist/services/synapse/prefetch/index.d.ts.map +1 -0
- package/dist/services/synapse/prefetch/index.js +2 -0
- package/dist/services/synapse/prefetch/index.js.map +1 -0
- package/dist/services/synapse/prefetch/prefetch.d.ts +75 -0
- package/dist/services/synapse/prefetch/prefetch.d.ts.map +1 -0
- package/dist/services/synapse/prefetch/prefetch.js +111 -0
- package/dist/services/synapse/prefetch/prefetch.js.map +1 -0
- package/dist/services/synapse/scoring/agent-affinity.d.ts +16 -0
- package/dist/services/synapse/scoring/agent-affinity.d.ts.map +1 -0
- package/dist/services/synapse/scoring/agent-affinity.js +40 -0
- package/dist/services/synapse/scoring/agent-affinity.js.map +1 -0
- package/dist/services/synapse/scoring/attention-score.d.ts +80 -0
- package/dist/services/synapse/scoring/attention-score.d.ts.map +1 -0
- package/dist/services/synapse/scoring/attention-score.js +177 -0
- package/dist/services/synapse/scoring/attention-score.js.map +1 -0
- package/dist/services/synapse/scoring/index.d.ts +4 -0
- package/dist/services/synapse/scoring/index.d.ts.map +1 -0
- package/dist/services/synapse/scoring/index.js +4 -0
- package/dist/services/synapse/scoring/index.js.map +1 -0
- package/dist/services/synapse/scoring/task-alignment.d.ts +20 -0
- package/dist/services/synapse/scoring/task-alignment.d.ts.map +1 -0
- package/dist/services/synapse/scoring/task-alignment.js +65 -0
- package/dist/services/synapse/scoring/task-alignment.js.map +1 -0
- package/dist/services/synapse/session/index.d.ts +2 -0
- package/dist/services/synapse/session/index.d.ts.map +1 -0
- package/dist/services/synapse/session/index.js +2 -0
- package/dist/services/synapse/session/index.js.map +1 -0
- package/dist/services/synapse/session/session-registry.d.ts +85 -0
- package/dist/services/synapse/session/session-registry.d.ts.map +1 -0
- package/dist/services/synapse/session/session-registry.js +241 -0
- package/dist/services/synapse/session/session-registry.js.map +1 -0
- package/dist/services/synapse/session/session-store-pg.d.ts +88 -0
- package/dist/services/synapse/session/session-store-pg.d.ts.map +1 -0
- package/dist/services/synapse/session/session-store-pg.js +334 -0
- package/dist/services/synapse/session/session-store-pg.js.map +1 -0
- package/dist/services/synapse/session/session-store.d.ts +23 -0
- package/dist/services/synapse/session/session-store.d.ts.map +1 -0
- package/dist/services/synapse/session/session-store.js +15 -0
- package/dist/services/synapse/session/session-store.js.map +1 -0
- package/dist/services/synapse/synapse-manager.d.ts +41 -0
- package/dist/services/synapse/synapse-manager.d.ts.map +1 -0
- package/dist/services/synapse/synapse-manager.js +167 -0
- package/dist/services/synapse/synapse-manager.js.map +1 -0
- package/dist/services/synapse/task-envelope.d.ts +99 -0
- package/dist/services/synapse/task-envelope.d.ts.map +1 -0
- package/dist/services/synapse/task-envelope.js +192 -0
- package/dist/services/synapse/task-envelope.js.map +1 -0
- package/dist/services/synapse/types.d.ts +79 -0
- package/dist/services/synapse/types.d.ts.map +1 -0
- package/dist/services/synapse/types.js +8 -0
- package/dist/services/synapse/types.js.map +1 -0
- package/dist/services/web/fetcher.d.ts +99 -0
- package/dist/services/web/fetcher.d.ts.map +1 -0
- package/dist/services/web/fetcher.js +267 -0
- package/dist/services/web/fetcher.js.map +1 -0
- package/dist/services/web/html-to-md.d.ts +38 -0
- package/dist/services/web/html-to-md.d.ts.map +1 -0
- package/dist/services/web/html-to-md.js +98 -0
- package/dist/services/web/html-to-md.js.map +1 -0
- package/dist/services/web/index.d.ts +15 -0
- package/dist/services/web/index.d.ts.map +1 -0
- package/dist/services/web/index.js +15 -0
- package/dist/services/web/index.js.map +1 -0
- package/dist/services/web/ssrf.d.ts +142 -0
- package/dist/services/web/ssrf.d.ts.map +1 -0
- package/dist/services/web/ssrf.js +334 -0
- package/dist/services/web/ssrf.js.map +1 -0
- package/dist/services/web/web-controller.d.ts +70 -0
- package/dist/services/web/web-controller.d.ts.map +1 -0
- package/dist/services/web/web-controller.js +140 -0
- package/dist/services/web/web-controller.js.map +1 -0
- package/dist/services/workspace/index.d.ts +6 -0
- package/dist/services/workspace/index.d.ts.map +1 -0
- package/dist/services/workspace/index.js +5 -0
- package/dist/services/workspace/index.js.map +1 -0
- package/dist/services/workspace/workspace-manager.d.ts +57 -0
- package/dist/services/workspace/workspace-manager.d.ts.map +1 -0
- package/dist/services/workspace/workspace-manager.js +144 -0
- package/dist/services/workspace/workspace-manager.js.map +1 -0
- package/dist/tools/batch_execute.d.ts +64 -0
- package/dist/tools/batch_execute.d.ts.map +1 -0
- package/dist/tools/batch_execute.js +55 -0
- package/dist/tools/batch_execute.js.map +1 -0
- package/dist/tools/compact_snapshot.d.ts +56 -0
- package/dist/tools/compact_snapshot.d.ts.map +1 -0
- package/dist/tools/compact_snapshot.js +139 -0
- package/dist/tools/compact_snapshot.js.map +1 -0
- package/dist/tools/compress_context.d.ts +41 -0
- package/dist/tools/compress_context.d.ts.map +1 -0
- package/dist/tools/compress_context.js +103 -0
- package/dist/tools/compress_context.js.map +1 -0
- package/dist/tools/create_checkpoint.d.ts +120 -0
- package/dist/tools/create_checkpoint.d.ts.map +1 -0
- package/dist/tools/create_checkpoint.js +184 -0
- package/dist/tools/create_checkpoint.js.map +1 -0
- package/dist/tools/delete_memory.d.ts +39 -0
- package/dist/tools/delete_memory.d.ts.map +1 -0
- package/dist/tools/delete_memory.js +51 -0
- package/dist/tools/delete_memory.js.map +1 -0
- package/dist/tools/enum-validation.d.ts +37 -0
- package/dist/tools/enum-validation.d.ts.map +1 -0
- package/dist/tools/enum-validation.js +46 -0
- package/dist/tools/enum-validation.js.map +1 -0
- package/dist/tools/execute.d.ts +57 -0
- package/dist/tools/execute.d.ts.map +1 -0
- package/dist/tools/execute.js +64 -0
- package/dist/tools/execute.js.map +1 -0
- package/dist/tools/execute_file.d.ts +52 -0
- package/dist/tools/execute_file.d.ts.map +1 -0
- package/dist/tools/execute_file.js +61 -0
- package/dist/tools/execute_file.js.map +1 -0
- package/dist/tools/fetch_and_index.d.ts +71 -0
- package/dist/tools/fetch_and_index.d.ts.map +1 -0
- package/dist/tools/fetch_and_index.js +74 -0
- package/dist/tools/fetch_and_index.js.map +1 -0
- package/dist/tools/get_analytics.d.ts +38 -0
- package/dist/tools/get_analytics.d.ts.map +1 -0
- package/dist/tools/get_analytics.js +114 -0
- package/dist/tools/get_analytics.js.map +1 -0
- package/dist/tools/get_architecture.d.ts +59 -0
- package/dist/tools/get_architecture.d.ts.map +1 -0
- package/dist/tools/get_architecture.js +104 -0
- package/dist/tools/get_architecture.js.map +1 -0
- package/dist/tools/get_index_status.d.ts +23 -0
- package/dist/tools/get_index_status.d.ts.map +1 -0
- package/dist/tools/get_index_status.js +61 -0
- package/dist/tools/get_index_status.js.map +1 -0
- package/dist/tools/get_optimized_context.d.ts +78 -0
- package/dist/tools/get_optimized_context.d.ts.map +1 -0
- package/dist/tools/get_optimized_context.js +110 -0
- package/dist/tools/get_optimized_context.js.map +1 -0
- package/dist/tools/get_references.d.ts +53 -0
- package/dist/tools/get_references.d.ts.map +1 -0
- package/dist/tools/get_references.js +114 -0
- package/dist/tools/get_references.js.map +1 -0
- package/dist/tools/go_to_definition.d.ts +31 -0
- package/dist/tools/go_to_definition.d.ts.map +1 -0
- package/dist/tools/go_to_definition.js +75 -0
- package/dist/tools/go_to_definition.js.map +1 -0
- package/dist/tools/impact_analysis.d.ts +89 -0
- package/dist/tools/impact_analysis.d.ts.map +1 -0
- package/dist/tools/impact_analysis.js +186 -0
- package/dist/tools/impact_analysis.js.map +1 -0
- package/dist/tools/index.d.ts +34 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +38 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/index_project.d.ts +77 -0
- package/dist/tools/index_project.d.ts.map +1 -0
- package/dist/tools/index_project.js +259 -0
- package/dist/tools/index_project.js.map +1 -0
- package/dist/tools/list_checkpoints.d.ts +59 -0
- package/dist/tools/list_checkpoints.d.ts.map +1 -0
- package/dist/tools/list_checkpoints.js +110 -0
- package/dist/tools/list_checkpoints.js.map +1 -0
- package/dist/tools/list_projects.d.ts +24 -0
- package/dist/tools/list_projects.d.ts.map +1 -0
- package/dist/tools/list_projects.js +58 -0
- package/dist/tools/list_projects.js.map +1 -0
- package/dist/tools/read_file.d.ts +150 -0
- package/dist/tools/read_file.d.ts.map +1 -0
- package/dist/tools/read_file.js +580 -0
- package/dist/tools/read_file.js.map +1 -0
- package/dist/tools/restore_checkpoint.d.ts +45 -0
- package/dist/tools/restore_checkpoint.d.ts.map +1 -0
- package/dist/tools/restore_checkpoint.js +113 -0
- package/dist/tools/restore_checkpoint.js.map +1 -0
- package/dist/tools/search_code.d.ts +35 -0
- package/dist/tools/search_code.d.ts.map +1 -0
- package/dist/tools/search_code.js +61 -0
- package/dist/tools/search_code.js.map +1 -0
- package/dist/tools/search_definitions.d.ts +54 -0
- package/dist/tools/search_definitions.d.ts.map +1 -0
- package/dist/tools/search_definitions.js +123 -0
- package/dist/tools/search_definitions.js.map +1 -0
- package/dist/tools/search_memories.d.ts +82 -0
- package/dist/tools/search_memories.d.ts.map +1 -0
- package/dist/tools/search_memories.js +115 -0
- package/dist/tools/search_memories.js.map +1 -0
- package/dist/tools/search_project.d.ts +90 -0
- package/dist/tools/search_project.d.ts.map +1 -0
- package/dist/tools/search_project.js +115 -0
- package/dist/tools/search_project.js.map +1 -0
- package/dist/tools/serialize-interfaces.d.ts +103 -0
- package/dist/tools/serialize-interfaces.d.ts.map +1 -0
- package/dist/tools/serialize-interfaces.js +15 -0
- package/dist/tools/serialize-interfaces.js.map +1 -0
- package/dist/tools/serialize.d.ts +101 -0
- package/dist/tools/serialize.d.ts.map +1 -0
- package/dist/tools/serialize.js +388 -0
- package/dist/tools/serialize.js.map +1 -0
- package/dist/tools/store_memory.d.ts +78 -0
- package/dist/tools/store_memory.d.ts.map +1 -0
- package/dist/tools/store_memory.js +87 -0
- package/dist/tools/store_memory.js.map +1 -0
- package/dist/tools/trace_path.d.ts +98 -0
- package/dist/tools/trace_path.d.ts.map +1 -0
- package/dist/tools/trace_path.js +181 -0
- package/dist/tools/trace_path.js.map +1 -0
- package/dist/tools/update_memory.d.ts +61 -0
- package/dist/tools/update_memory.d.ts.map +1 -0
- package/dist/tools/update_memory.js +74 -0
- package/dist/tools/update_memory.js.map +1 -0
- package/package.json +103 -0
- package/prisma/migrations/20260309210441_init/migration.sql +127 -0
- package/prisma/migrations/20260413122356_add_workspaces_symbol_graph/migration.sql +224 -0
- package/prisma/migrations/20260413200000_add_vector_4096_bq/migration.sql +33 -0
- package/prisma/migrations/20260419193214_hnsw_ef_construction_128/migration.sql +38 -0
- package/prisma/migrations/20260419214959_add_vector_1536/migration.sql +28 -0
- package/prisma/migrations/20260705060000_add_memories_pinned_softdelete/migration.sql +10 -0
- package/prisma/migrations/20260706105826_drop_symbol_refs_target_fqn_not_null/migration.sql +2 -0
- package/prisma/migrations/20260707100000_add_index_jobs_pg/migration.sql +28 -0
- package/prisma/migrations/20260709120000_add_scheduled_jobs_pg/migration.sql +22 -0
- package/prisma/migrations/20260710120000_add_synapse_sessions_pg/migration.sql +36 -0
- package/prisma/migrations/20260710123800_add_observations_pg/migration.sql +35 -0
- package/prisma/migrations/20260710140000_add_symbol_refs_meta_and_kind_index/migration.sql +8 -0
- package/prisma/migrations/20260710160000_add_task_checkpoints_pg/migration.sql +30 -0
- package/prisma/migrations/20260713090000_add_handoffs_proposals_pg/migration.sql +42 -0
- package/prisma/migrations/20260714170000_add_graph_generations/migration.sql +286 -0
- package/prisma/migrations/20260714220000_add_index_job_graph_generation/migration.sql +5 -0
- package/prisma/migrations/20260714233000_add_index_job_parser_diagnostics/migration.sql +6 -0
- package/prisma/migrations/20260718000000_add_operation_log/migration.sql +25 -0
- package/prisma/migrations/20260719120000_add_project_identity/migration.sql +268 -0
- package/prisma/migrations/20260720120000_add_observation_attribution/migration.sql +5 -0
- package/prisma/migrations/20260720210000_repair_hook_attribution/migration.sql +256 -0
- package/prisma/migrations/20260722120000_add_managed_runs/migration.sql +66 -0
- package/prisma/migrations/20260722130000_add_scheduler_last_success/migration.sql +24 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema.prisma +745 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
BEGIN;
|
|
2
|
+
|
|
3
|
+
LOCK TABLE "workspaces", "symbol_files", "symbol_definitions", "symbol_references", "symbol_imports", "symbol_centrality" IN ACCESS EXCLUSIVE MODE;
|
|
4
|
+
|
|
5
|
+
-- Sensors capture the exact legacy row population before any ownership rewrite.
|
|
6
|
+
CREATE TEMP TABLE "_graph_generation_pre_counts" ON COMMIT DROP AS
|
|
7
|
+
SELECT
|
|
8
|
+
(SELECT count(*) FROM "workspaces") AS workspaces,
|
|
9
|
+
(SELECT count(*) FROM "symbol_files") AS files,
|
|
10
|
+
(SELECT count(*) FROM "symbol_definitions") AS definitions,
|
|
11
|
+
(SELECT count(*) FROM "symbol_references") AS references,
|
|
12
|
+
(SELECT count(*) FROM "symbol_imports") AS imports,
|
|
13
|
+
(SELECT count(*) FROM "symbol_centrality") AS centrality;
|
|
14
|
+
|
|
15
|
+
CREATE TABLE "graph_generations" (
|
|
16
|
+
"id" TEXT NOT NULL,
|
|
17
|
+
"project_id" TEXT NOT NULL,
|
|
18
|
+
"status" TEXT NOT NULL DEFAULT 'pending',
|
|
19
|
+
"fingerprint" TEXT NOT NULL,
|
|
20
|
+
"input_snapshot_hash" TEXT NOT NULL,
|
|
21
|
+
"expected_active_id" TEXT,
|
|
22
|
+
"lease_token" TEXT,
|
|
23
|
+
"lease_expires_at" TIMESTAMP(3),
|
|
24
|
+
"expected_files_count" INTEGER NOT NULL DEFAULT 0,
|
|
25
|
+
"completed_files_count" INTEGER NOT NULL DEFAULT 0,
|
|
26
|
+
"files_count" INTEGER NOT NULL DEFAULT 0,
|
|
27
|
+
"definitions_count" INTEGER NOT NULL DEFAULT 0,
|
|
28
|
+
"references_count" INTEGER NOT NULL DEFAULT 0,
|
|
29
|
+
"imports_count" INTEGER NOT NULL DEFAULT 0,
|
|
30
|
+
"centrality_count" INTEGER NOT NULL DEFAULT 0,
|
|
31
|
+
"diagnostics_count" INTEGER NOT NULL DEFAULT 0,
|
|
32
|
+
"recovered_count" INTEGER NOT NULL DEFAULT 0,
|
|
33
|
+
"hard_failures_count" INTEGER NOT NULL DEFAULT 0,
|
|
34
|
+
"stale_files_count" INTEGER NOT NULL DEFAULT 0,
|
|
35
|
+
"failure_reason" TEXT,
|
|
36
|
+
"started_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
37
|
+
"completed_at" TIMESTAMP(3),
|
|
38
|
+
"activated_at" TIMESTAMP(3),
|
|
39
|
+
"superseded_at" TIMESTAMP(3),
|
|
40
|
+
CONSTRAINT "graph_generations_pkey" PRIMARY KEY ("id"),
|
|
41
|
+
CONSTRAINT "graph_generations_project_id_id_key" UNIQUE ("project_id", "id"),
|
|
42
|
+
CONSTRAINT "graph_generations_status_check" CHECK ("status" IN ('pending','active','superseded','failed')),
|
|
43
|
+
CONSTRAINT "graph_generations_counts_check" CHECK (
|
|
44
|
+
"expected_files_count" >= 0 AND "completed_files_count" >= 0 AND "files_count" >= 0 AND
|
|
45
|
+
"definitions_count" >= 0 AND "references_count" >= 0 AND "imports_count" >= 0 AND
|
|
46
|
+
"centrality_count" >= 0 AND "diagnostics_count" >= 0 AND "recovered_count" >= 0 AND
|
|
47
|
+
"hard_failures_count" >= 0 AND "stale_files_count" >= 0
|
|
48
|
+
),
|
|
49
|
+
CONSTRAINT "graph_generations_lease_pair_check" CHECK (("lease_token" IS NULL) = ("lease_expires_at" IS NULL))
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
ALTER TABLE "workspaces"
|
|
53
|
+
ADD COLUMN "active_graph_generation_id" TEXT,
|
|
54
|
+
ADD COLUMN "pending_graph_generation_id" TEXT,
|
|
55
|
+
ADD COLUMN "graph_lease_token" TEXT,
|
|
56
|
+
ADD COLUMN "graph_lease_expires_at" TIMESTAMP(3),
|
|
57
|
+
ADD COLUMN "graph_lease_heartbeat_at" TIMESTAMP(3),
|
|
58
|
+
ADD COLUMN "active_files_count" INTEGER NOT NULL DEFAULT 0,
|
|
59
|
+
ADD COLUMN "active_definitions_count" INTEGER NOT NULL DEFAULT 0,
|
|
60
|
+
ADD COLUMN "active_references_count" INTEGER NOT NULL DEFAULT 0,
|
|
61
|
+
ADD COLUMN "active_imports_count" INTEGER NOT NULL DEFAULT 0,
|
|
62
|
+
ADD COLUMN "active_centrality_count" INTEGER NOT NULL DEFAULT 0,
|
|
63
|
+
ADD COLUMN "active_diagnostics_count" INTEGER NOT NULL DEFAULT 0,
|
|
64
|
+
ADD COLUMN "active_recovered_count" INTEGER NOT NULL DEFAULT 0,
|
|
65
|
+
ADD COLUMN "active_hard_failures_count" INTEGER NOT NULL DEFAULT 0,
|
|
66
|
+
ADD COLUMN "active_stale_files_count" INTEGER NOT NULL DEFAULT 0,
|
|
67
|
+
ADD CONSTRAINT "workspaces_graph_lease_pair_check" CHECK (
|
|
68
|
+
(("graph_lease_token" IS NULL) = ("graph_lease_expires_at" IS NULL)) AND
|
|
69
|
+
("graph_lease_heartbeat_at" IS NULL OR "graph_lease_token" IS NOT NULL)
|
|
70
|
+
),
|
|
71
|
+
ADD CONSTRAINT "workspaces_active_counts_check" CHECK (
|
|
72
|
+
"active_files_count" >= 0 AND "active_definitions_count" >= 0 AND "active_references_count" >= 0 AND
|
|
73
|
+
"active_imports_count" >= 0 AND "active_centrality_count" >= 0 AND "active_diagnostics_count" >= 0 AND
|
|
74
|
+
"active_recovered_count" >= 0 AND "active_hard_failures_count" >= 0 AND "active_stale_files_count" >= 0
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
ALTER TABLE "symbol_files"
|
|
78
|
+
ADD COLUMN "generation_id" TEXT,
|
|
79
|
+
ADD COLUMN "language" TEXT,
|
|
80
|
+
ADD COLUMN "dialect" TEXT,
|
|
81
|
+
ADD COLUMN "grammar_version" TEXT,
|
|
82
|
+
ADD COLUMN "query_pack_version" TEXT,
|
|
83
|
+
ADD COLUMN "resolver_version" TEXT,
|
|
84
|
+
ADD COLUMN "parser_status" TEXT NOT NULL DEFAULT 'legacy',
|
|
85
|
+
ADD COLUMN "parser_error_count" INTEGER NOT NULL DEFAULT 0,
|
|
86
|
+
ADD COLUMN "diagnostics" JSONB NOT NULL DEFAULT '[]'::jsonb,
|
|
87
|
+
ADD COLUMN "is_stale" BOOLEAN NOT NULL DEFAULT false,
|
|
88
|
+
ADD COLUMN "last_known_good_generation_id" TEXT,
|
|
89
|
+
ADD COLUMN "last_successful_at" TIMESTAMP(3),
|
|
90
|
+
ADD CONSTRAINT "symbol_files_parser_status_check" CHECK ("parser_status" IN ('legacy','ok','recovered','unsupported','failed')),
|
|
91
|
+
ADD CONSTRAINT "symbol_files_parser_error_count_check" CHECK ("parser_error_count" >= 0),
|
|
92
|
+
ADD CONSTRAINT "symbol_files_diagnostics_check" CHECK (jsonb_typeof("diagnostics") = 'array' AND jsonb_array_length("diagnostics") <= 10);
|
|
93
|
+
|
|
94
|
+
ALTER TABLE "symbol_definitions"
|
|
95
|
+
ADD COLUMN "generation_id" TEXT,
|
|
96
|
+
ADD COLUMN "qualified_name" TEXT,
|
|
97
|
+
ADD COLUMN "canonical_signature" TEXT,
|
|
98
|
+
ADD COLUMN "signature_hash" TEXT,
|
|
99
|
+
ADD COLUMN "legacy_fqn" TEXT,
|
|
100
|
+
ADD COLUMN "source_span" JSONB;
|
|
101
|
+
|
|
102
|
+
ALTER TABLE "symbol_references" ADD COLUMN "generation_id" TEXT, ADD COLUMN "source_span" JSONB;
|
|
103
|
+
ALTER TABLE "symbol_imports" ADD COLUMN "generation_id" TEXT;
|
|
104
|
+
ALTER TABLE "symbol_centrality" ADD COLUMN "generation_id" TEXT;
|
|
105
|
+
|
|
106
|
+
INSERT INTO "graph_generations" (
|
|
107
|
+
"id", "project_id", "status", "fingerprint", "input_snapshot_hash",
|
|
108
|
+
"expected_files_count", "completed_files_count", "files_count", "definitions_count",
|
|
109
|
+
"references_count", "imports_count", "centrality_count", "started_at", "completed_at", "activated_at"
|
|
110
|
+
)
|
|
111
|
+
SELECT
|
|
112
|
+
'legacy-' || md5(w."project_id"), w."project_id", 'active', 'legacy:v1',
|
|
113
|
+
'md5:' || md5(w."project_path" || E'\n' || COALESCE((
|
|
114
|
+
SELECT string_agg(f."relative_path" || E'\x1f' || f."content_hash", E'\n' ORDER BY f."relative_path", f."content_hash")
|
|
115
|
+
FROM "symbol_files" f WHERE f."project_id" = w."project_id"
|
|
116
|
+
), '')),
|
|
117
|
+
(SELECT count(*) FROM "symbol_files" f WHERE f."project_id" = w."project_id"),
|
|
118
|
+
(SELECT count(*) FROM "symbol_files" f WHERE f."project_id" = w."project_id"),
|
|
119
|
+
(SELECT count(*) FROM "symbol_files" f WHERE f."project_id" = w."project_id"),
|
|
120
|
+
(SELECT count(*) FROM "symbol_definitions" d WHERE d."project_id" = w."project_id"),
|
|
121
|
+
(SELECT count(*) FROM "symbol_references" r WHERE r."project_id" = w."project_id"),
|
|
122
|
+
(SELECT count(*) FROM "symbol_imports" i WHERE i."project_id" = w."project_id"),
|
|
123
|
+
(SELECT count(*) FROM "symbol_centrality" c WHERE c."project_id" = w."project_id"),
|
|
124
|
+
COALESCE(w."last_indexed_at", w."updated_at"), COALESCE(w."last_indexed_at", w."updated_at"),
|
|
125
|
+
COALESCE(w."last_indexed_at", w."updated_at")
|
|
126
|
+
FROM "workspaces" w;
|
|
127
|
+
|
|
128
|
+
UPDATE "workspaces" w SET
|
|
129
|
+
"active_graph_generation_id" = g."id",
|
|
130
|
+
"active_files_count" = g."files_count", "active_definitions_count" = g."definitions_count",
|
|
131
|
+
"active_references_count" = g."references_count", "active_imports_count" = g."imports_count",
|
|
132
|
+
"active_centrality_count" = g."centrality_count"
|
|
133
|
+
FROM "graph_generations" g WHERE g."project_id" = w."project_id" AND g."status" = 'active';
|
|
134
|
+
|
|
135
|
+
UPDATE "symbol_files" t SET
|
|
136
|
+
"generation_id" = w."active_graph_generation_id",
|
|
137
|
+
"last_known_good_generation_id" = w."active_graph_generation_id",
|
|
138
|
+
"last_successful_at" = t."indexed_at"
|
|
139
|
+
FROM "workspaces" w WHERE w."project_id" = t."project_id";
|
|
140
|
+
UPDATE "symbol_definitions" t SET
|
|
141
|
+
"generation_id" = w."active_graph_generation_id",
|
|
142
|
+
"qualified_name" = CASE
|
|
143
|
+
WHEN t."id" LIKE t."file_path" || '#%'
|
|
144
|
+
AND length(t."id") - length(replace(t."id", '#', '')) = 1
|
|
145
|
+
AND substring(split_part(t."id", '#', 2) FROM '~(module|namespace|class|interface|trait|enum|function|method|constructor|property|field|variable|constant|type|type_parameter|export|heading|key)~[0-9a-f]{64}$') = t."kind"
|
|
146
|
+
AND split_part(substring(split_part(t."id", '#', 2) FROM '^(.*)~(?:module|namespace|class|interface|trait|enum|function|method|constructor|property|field|variable|constant|type|type_parameter|export|heading|key)~[0-9a-f]{64}$'), '.', -1) = t."name"
|
|
147
|
+
THEN substring(split_part(t."id", '#', 2) FROM '^(.*)~(?:module|namespace|class|interface|trait|enum|function|method|constructor|property|field|variable|constant|type|type_parameter|export|heading|key)~[0-9a-f]{64}$')
|
|
148
|
+
ELSE t."name"
|
|
149
|
+
END,
|
|
150
|
+
"signature_hash" = CASE
|
|
151
|
+
WHEN t."id" LIKE t."file_path" || '#%'
|
|
152
|
+
AND length(t."id") - length(replace(t."id", '#', '')) = 1
|
|
153
|
+
AND substring(split_part(t."id", '#', 2) FROM '~(module|namespace|class|interface|trait|enum|function|method|constructor|property|field|variable|constant|type|type_parameter|export|heading|key)~[0-9a-f]{64}$') = t."kind"
|
|
154
|
+
AND split_part(substring(split_part(t."id", '#', 2) FROM '^(.*)~(?:module|namespace|class|interface|trait|enum|function|method|constructor|property|field|variable|constant|type|type_parameter|export|heading|key)~[0-9a-f]{64}$'), '.', -1) = t."name"
|
|
155
|
+
THEN substring(split_part(t."id", '#', 2) FROM '~([0-9a-f]{64})$')
|
|
156
|
+
ELSE NULL
|
|
157
|
+
END,
|
|
158
|
+
"legacy_fqn" = t."file_path" || '#' || t."name"
|
|
159
|
+
FROM "workspaces" w WHERE w."project_id" = t."project_id";
|
|
160
|
+
UPDATE "symbol_references" t SET
|
|
161
|
+
"generation_id" = w."active_graph_generation_id",
|
|
162
|
+
"source_span" = CASE
|
|
163
|
+
WHEN jsonb_typeof(t."meta"->'sourceSpan') = 'object'
|
|
164
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'startByte') = 'number'
|
|
165
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'endByte') = 'number'
|
|
166
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'start') = 'object'
|
|
167
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'end') = 'object'
|
|
168
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'start'->'row') = 'number'
|
|
169
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'start'->'column') = 'number'
|
|
170
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'end'->'row') = 'number'
|
|
171
|
+
AND jsonb_typeof(t."meta"->'sourceSpan'->'end'->'column') = 'number'
|
|
172
|
+
AND (t."meta"->'sourceSpan'->>'startByte')::numeric = trunc((t."meta"->'sourceSpan'->>'startByte')::numeric)
|
|
173
|
+
AND (t."meta"->'sourceSpan'->>'endByte')::numeric = trunc((t."meta"->'sourceSpan'->>'endByte')::numeric)
|
|
174
|
+
AND (t."meta"->'sourceSpan'->'start'->>'row')::numeric = trunc((t."meta"->'sourceSpan'->'start'->>'row')::numeric)
|
|
175
|
+
AND (t."meta"->'sourceSpan'->'start'->>'column')::numeric = trunc((t."meta"->'sourceSpan'->'start'->>'column')::numeric)
|
|
176
|
+
AND (t."meta"->'sourceSpan'->'end'->>'row')::numeric = trunc((t."meta"->'sourceSpan'->'end'->>'row')::numeric)
|
|
177
|
+
AND (t."meta"->'sourceSpan'->'end'->>'column')::numeric = trunc((t."meta"->'sourceSpan'->'end'->>'column')::numeric)
|
|
178
|
+
AND (t."meta"->'sourceSpan'->>'startByte')::numeric BETWEEN 0 AND 9007199254740991
|
|
179
|
+
AND (t."meta"->'sourceSpan'->>'endByte')::numeric BETWEEN (t."meta"->'sourceSpan'->>'startByte')::numeric AND 9007199254740991
|
|
180
|
+
AND (t."meta"->'sourceSpan'->'start'->>'row')::numeric BETWEEN 0 AND 9007199254740991
|
|
181
|
+
AND (t."meta"->'sourceSpan'->'start'->>'column')::numeric BETWEEN 0 AND 9007199254740991
|
|
182
|
+
AND (t."meta"->'sourceSpan'->'end'->>'row')::numeric BETWEEN 0 AND 9007199254740991
|
|
183
|
+
AND (t."meta"->'sourceSpan'->'end'->>'column')::numeric BETWEEN 0 AND 9007199254740991
|
|
184
|
+
THEN t."meta"->'sourceSpan'
|
|
185
|
+
ELSE NULL
|
|
186
|
+
END
|
|
187
|
+
FROM "workspaces" w WHERE w."project_id" = t."project_id";
|
|
188
|
+
UPDATE "symbol_imports" t SET "generation_id" = w."active_graph_generation_id" FROM "workspaces" w WHERE w."project_id" = t."project_id";
|
|
189
|
+
UPDATE "symbol_centrality" t SET "generation_id" = w."active_graph_generation_id" FROM "workspaces" w WHERE w."project_id" = t."project_id";
|
|
190
|
+
|
|
191
|
+
DO $$
|
|
192
|
+
DECLARE pre "_graph_generation_pre_counts"%ROWTYPE;
|
|
193
|
+
BEGIN
|
|
194
|
+
SELECT * INTO pre FROM "_graph_generation_pre_counts";
|
|
195
|
+
IF (SELECT count(*) FROM "workspaces") <> pre.workspaces OR
|
|
196
|
+
(SELECT count(*) FROM "symbol_files") <> pre.files OR
|
|
197
|
+
(SELECT count(*) FROM "symbol_definitions") <> pre.definitions OR
|
|
198
|
+
(SELECT count(*) FROM "symbol_references") <> pre.references OR
|
|
199
|
+
(SELECT count(*) FROM "symbol_imports") <> pre.imports OR
|
|
200
|
+
(SELECT count(*) FROM "symbol_centrality") <> pre.centrality THEN
|
|
201
|
+
RAISE EXCEPTION 'graph_generation_backfill_row_count_changed';
|
|
202
|
+
END IF;
|
|
203
|
+
IF (SELECT count(*) FROM "graph_generations" WHERE "status" = 'active') <> pre.workspaces OR
|
|
204
|
+
EXISTS (SELECT 1 FROM "workspaces" w LEFT JOIN "graph_generations" g ON g."id" = w."active_graph_generation_id" AND g."project_id" = w."project_id" WHERE g."id" IS NULL) THEN
|
|
205
|
+
RAISE EXCEPTION 'graph_generation_backfill_cardinality';
|
|
206
|
+
END IF;
|
|
207
|
+
IF EXISTS (SELECT 1 FROM "symbol_files" WHERE "generation_id" IS NULL) OR
|
|
208
|
+
EXISTS (SELECT 1 FROM "symbol_definitions" WHERE "generation_id" IS NULL OR "qualified_name" IS NULL OR "legacy_fqn" IS NULL) OR
|
|
209
|
+
EXISTS (SELECT 1 FROM "symbol_references" WHERE "generation_id" IS NULL) OR
|
|
210
|
+
EXISTS (SELECT 1 FROM "symbol_imports" WHERE "generation_id" IS NULL) OR
|
|
211
|
+
EXISTS (SELECT 1 FROM "symbol_centrality" WHERE "generation_id" IS NULL) THEN
|
|
212
|
+
RAISE EXCEPTION 'graph_generation_backfill_null';
|
|
213
|
+
END IF;
|
|
214
|
+
IF EXISTS (
|
|
215
|
+
SELECT 1 FROM (
|
|
216
|
+
SELECT "project_id", "generation_id" FROM "symbol_files" UNION ALL
|
|
217
|
+
SELECT "project_id", "generation_id" FROM "symbol_definitions" UNION ALL
|
|
218
|
+
SELECT "project_id", "generation_id" FROM "symbol_references" UNION ALL
|
|
219
|
+
SELECT "project_id", "generation_id" FROM "symbol_imports" UNION ALL
|
|
220
|
+
SELECT "project_id", "generation_id" FROM "symbol_centrality"
|
|
221
|
+
) x LEFT JOIN "graph_generations" g ON g."project_id" = x."project_id" AND g."id" = x."generation_id"
|
|
222
|
+
WHERE g."id" IS NULL
|
|
223
|
+
) THEN RAISE EXCEPTION 'graph_generation_backfill_orphan'; END IF;
|
|
224
|
+
IF EXISTS (
|
|
225
|
+
SELECT 1 FROM "workspaces" w JOIN "graph_generations" g ON g."id" = w."active_graph_generation_id"
|
|
226
|
+
WHERE g."files_count" <> w."active_files_count" OR g."definitions_count" <> w."active_definitions_count" OR
|
|
227
|
+
g."references_count" <> w."active_references_count" OR g."imports_count" <> w."active_imports_count" OR
|
|
228
|
+
g."centrality_count" <> w."active_centrality_count"
|
|
229
|
+
) THEN RAISE EXCEPTION 'graph_generation_backfill_count_mismatch'; END IF;
|
|
230
|
+
END $$;
|
|
231
|
+
|
|
232
|
+
ALTER TABLE "symbol_files" ALTER COLUMN "generation_id" SET NOT NULL;
|
|
233
|
+
ALTER TABLE "symbol_definitions" ALTER COLUMN "generation_id" SET NOT NULL, ALTER COLUMN "qualified_name" SET NOT NULL, ALTER COLUMN "legacy_fqn" SET NOT NULL;
|
|
234
|
+
ALTER TABLE "symbol_references" ALTER COLUMN "generation_id" SET NOT NULL;
|
|
235
|
+
ALTER TABLE "symbol_imports" ALTER COLUMN "generation_id" SET NOT NULL;
|
|
236
|
+
ALTER TABLE "symbol_centrality" ALTER COLUMN "generation_id" SET NOT NULL;
|
|
237
|
+
|
|
238
|
+
ALTER TABLE "symbol_files" DROP CONSTRAINT "symbol_files_pkey", ADD CONSTRAINT "symbol_files_pkey" PRIMARY KEY ("project_id", "generation_id", "relative_path");
|
|
239
|
+
ALTER TABLE "symbol_definitions" DROP CONSTRAINT "symbol_definitions_pkey", ADD CONSTRAINT "symbol_definitions_pkey" PRIMARY KEY ("project_id", "generation_id", "id");
|
|
240
|
+
ALTER TABLE "symbol_centrality" DROP CONSTRAINT "symbol_centrality_pkey", ADD CONSTRAINT "symbol_centrality_pkey" PRIMARY KEY ("project_id", "generation_id", "file_path");
|
|
241
|
+
|
|
242
|
+
ALTER TABLE "graph_generations" ADD CONSTRAINT "graph_generations_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "workspaces"("project_id") ON DELETE CASCADE;
|
|
243
|
+
ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_active_graph_generation_fkey"
|
|
244
|
+
FOREIGN KEY ("project_id", "active_graph_generation_id") REFERENCES "graph_generations"("project_id", "id")
|
|
245
|
+
ON DELETE SET NULL ("active_graph_generation_id");
|
|
246
|
+
ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_pending_graph_generation_fkey"
|
|
247
|
+
FOREIGN KEY ("project_id", "pending_graph_generation_id") REFERENCES "graph_generations"("project_id", "id")
|
|
248
|
+
ON DELETE SET NULL ("pending_graph_generation_id");
|
|
249
|
+
ALTER TABLE "symbol_files" ADD CONSTRAINT "symbol_files_generation_fkey" FOREIGN KEY ("project_id", "generation_id") REFERENCES "graph_generations"("project_id", "id") ON DELETE CASCADE;
|
|
250
|
+
ALTER TABLE "symbol_definitions" ADD CONSTRAINT "symbol_definitions_generation_fkey" FOREIGN KEY ("project_id", "generation_id") REFERENCES "graph_generations"("project_id", "id") ON DELETE CASCADE;
|
|
251
|
+
ALTER TABLE "symbol_references" ADD CONSTRAINT "symbol_references_generation_fkey" FOREIGN KEY ("project_id", "generation_id") REFERENCES "graph_generations"("project_id", "id") ON DELETE CASCADE;
|
|
252
|
+
ALTER TABLE "symbol_imports" ADD CONSTRAINT "symbol_imports_generation_fkey" FOREIGN KEY ("project_id", "generation_id") REFERENCES "graph_generations"("project_id", "id") ON DELETE CASCADE;
|
|
253
|
+
ALTER TABLE "symbol_centrality" ADD CONSTRAINT "symbol_centrality_generation_fkey" FOREIGN KEY ("project_id", "generation_id") REFERENCES "graph_generations"("project_id", "id") ON DELETE CASCADE;
|
|
254
|
+
|
|
255
|
+
CREATE UNIQUE INDEX "graph_generations_one_active_per_project" ON "graph_generations"("project_id") WHERE "status" = 'active';
|
|
256
|
+
CREATE UNIQUE INDEX "graph_generations_one_pending_per_project" ON "graph_generations"("project_id") WHERE "status" = 'pending';
|
|
257
|
+
DROP INDEX IF EXISTS "symbol_files_project_id_idx";
|
|
258
|
+
DROP INDEX IF EXISTS "symbol_definitions_project_id_idx";
|
|
259
|
+
DROP INDEX IF EXISTS "symbol_definitions_project_id_file_path_idx";
|
|
260
|
+
DROP INDEX IF EXISTS "symbol_definitions_project_id_name_idx";
|
|
261
|
+
DROP INDEX IF EXISTS "symbol_references_project_id_idx";
|
|
262
|
+
DROP INDEX IF EXISTS "symbol_references_project_id_target_fqn_idx";
|
|
263
|
+
DROP INDEX IF EXISTS "symbol_references_project_id_from_file_idx";
|
|
264
|
+
DROP INDEX IF EXISTS "symbol_references_project_id_ref_kind_idx";
|
|
265
|
+
DROP INDEX IF EXISTS "symbol_imports_project_id_from_file_idx";
|
|
266
|
+
DROP INDEX IF EXISTS "symbol_imports_project_id_to_file_idx";
|
|
267
|
+
|
|
268
|
+
CREATE INDEX "graph_generations_project_id_status_idx" ON "graph_generations"("project_id", "status");
|
|
269
|
+
CREATE INDEX "graph_generations_project_id_fingerprint_idx" ON "graph_generations"("project_id", "fingerprint");
|
|
270
|
+
CREATE INDEX "graph_generations_lease_expires_at_idx" ON "graph_generations"("lease_expires_at");
|
|
271
|
+
CREATE INDEX "workspaces_active_graph_generation_id_idx" ON "workspaces"("active_graph_generation_id");
|
|
272
|
+
CREATE INDEX "workspaces_pending_graph_generation_id_idx" ON "workspaces"("pending_graph_generation_id");
|
|
273
|
+
CREATE INDEX "workspaces_graph_lease_expires_at_idx" ON "workspaces"("graph_lease_expires_at");
|
|
274
|
+
CREATE INDEX "symbol_files_project_id_generation_id_idx" ON "symbol_files"("project_id", "generation_id");
|
|
275
|
+
CREATE INDEX "symbol_definitions_project_id_generation_id_idx" ON "symbol_definitions"("project_id", "generation_id");
|
|
276
|
+
CREATE INDEX "symbol_definitions_project_id_generation_id_file_path_idx" ON "symbol_definitions"("project_id", "generation_id", "file_path");
|
|
277
|
+
CREATE INDEX "symbol_definitions_project_id_generation_id_name_idx" ON "symbol_definitions"("project_id", "generation_id", "name");
|
|
278
|
+
CREATE INDEX "symbol_definitions_project_id_generation_id_legacy_fqn_idx" ON "symbol_definitions"("project_id", "generation_id", "legacy_fqn");
|
|
279
|
+
CREATE INDEX "symbol_references_project_id_generation_id_idx" ON "symbol_references"("project_id", "generation_id");
|
|
280
|
+
CREATE INDEX "symbol_references_project_id_generation_id_target_fqn_idx" ON "symbol_references"("project_id", "generation_id", "target_fqn");
|
|
281
|
+
CREATE INDEX "symbol_references_project_id_generation_id_from_file_idx" ON "symbol_references"("project_id", "generation_id", "from_file");
|
|
282
|
+
CREATE INDEX "symbol_references_project_id_generation_id_ref_kind_idx" ON "symbol_references"("project_id", "generation_id", "ref_kind");
|
|
283
|
+
CREATE INDEX "symbol_imports_project_id_generation_id_from_file_idx" ON "symbol_imports"("project_id", "generation_id", "from_file");
|
|
284
|
+
CREATE INDEX "symbol_imports_project_id_generation_id_to_file_idx" ON "symbol_imports"("project_id", "generation_id", "to_file");
|
|
285
|
+
|
|
286
|
+
COMMIT;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
ALTER TABLE index_jobs
|
|
2
|
+
ADD COLUMN IF NOT EXISTS parser_diagnostics_count INTEGER,
|
|
3
|
+
ADD COLUMN IF NOT EXISTS parser_recovered_files INTEGER,
|
|
4
|
+
ADD COLUMN IF NOT EXISTS parser_hard_failure_files INTEGER,
|
|
5
|
+
ADD COLUMN IF NOT EXISTS parser_stale_files INTEGER,
|
|
6
|
+
ADD COLUMN IF NOT EXISTS parser_language_counts JSONB;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- M8 — audit-log attribution for destructive operations.
|
|
2
|
+
-- Additive + reversible: a single new table for who/when/what/scope/result.
|
|
3
|
+
-- No data backfill, no changes to existing tables.
|
|
4
|
+
|
|
5
|
+
CREATE TABLE IF NOT EXISTS "operation_log" (
|
|
6
|
+
"id" BIGSERIAL PRIMARY KEY,
|
|
7
|
+
"occurred_at" TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
8
|
+
"actor_type" TEXT NOT NULL DEFAULT 'api_key',
|
|
9
|
+
"actor_id" TEXT NOT NULL DEFAULT 'unknown',
|
|
10
|
+
"project_id" TEXT,
|
|
11
|
+
"op" TEXT NOT NULL,
|
|
12
|
+
"scope" JSONB NOT NULL DEFAULT '{}'::jsonb,
|
|
13
|
+
"result" TEXT NOT NULL,
|
|
14
|
+
"meta" JSONB NOT NULL DEFAULT '{}'::jsonb,
|
|
15
|
+
"error" TEXT,
|
|
16
|
+
|
|
17
|
+
CONSTRAINT "operation_log_result_check"
|
|
18
|
+
CHECK ("result" IN ('success', 'failure', 'partial'))
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
CREATE INDEX IF NOT EXISTS "operation_log_project_id_occurred_at_idx"
|
|
22
|
+
ON "operation_log" ("project_id", "occurred_at" DESC);
|
|
23
|
+
|
|
24
|
+
CREATE INDEX IF NOT EXISTS "operation_log_op_occurred_at_idx"
|
|
25
|
+
ON "operation_log" ("op", "occurred_at" DESC);
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
BEGIN;
|
|
2
|
+
|
|
3
|
+
CREATE TABLE "project_identity_aliases" (
|
|
4
|
+
"retired_project_id" TEXT PRIMARY KEY,
|
|
5
|
+
"target_project_id" TEXT NOT NULL,
|
|
6
|
+
"canonical_root" TEXT NOT NULL,
|
|
7
|
+
"operation_id" TEXT NOT NULL,
|
|
8
|
+
"created_at" TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
9
|
+
CONSTRAINT "project_identity_aliases_distinct_check"
|
|
10
|
+
CHECK ("retired_project_id" <> "target_project_id"),
|
|
11
|
+
CONSTRAINT "project_identity_aliases_target_fkey"
|
|
12
|
+
FOREIGN KEY ("target_project_id") REFERENCES "workspaces"("project_id")
|
|
13
|
+
ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
CREATE INDEX "project_identity_aliases_target_project_id_idx"
|
|
17
|
+
ON "project_identity_aliases" ("target_project_id");
|
|
18
|
+
|
|
19
|
+
CREATE TABLE "project_identity_operations" (
|
|
20
|
+
"operation_id" TEXT PRIMARY KEY,
|
|
21
|
+
"mode" TEXT NOT NULL,
|
|
22
|
+
"source_project_id" TEXT NOT NULL,
|
|
23
|
+
"target_project_id" TEXT NOT NULL,
|
|
24
|
+
"source_canonical_root" TEXT NOT NULL,
|
|
25
|
+
"target_canonical_root" TEXT NOT NULL,
|
|
26
|
+
"request_hash" TEXT NOT NULL,
|
|
27
|
+
"plan_hash" TEXT NOT NULL,
|
|
28
|
+
"result" JSONB NOT NULL,
|
|
29
|
+
"committed_at" TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
30
|
+
CONSTRAINT "project_identity_operations_mode_check"
|
|
31
|
+
CHECK ("mode" IN ('rename', 'merge')),
|
|
32
|
+
CONSTRAINT "project_identity_operations_distinct_check"
|
|
33
|
+
CHECK ("source_project_id" <> "target_project_id"),
|
|
34
|
+
CONSTRAINT "project_identity_operations_request_hash_check"
|
|
35
|
+
CHECK ("request_hash" ~ '^[a-f0-9]{64}$'),
|
|
36
|
+
CONSTRAINT "project_identity_operations_plan_hash_check"
|
|
37
|
+
CHECK ("plan_hash" ~ '^[a-f0-9]{64}$'),
|
|
38
|
+
CONSTRAINT "project_identity_operations_result_check"
|
|
39
|
+
CHECK (jsonb_typeof("result") = 'object')
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
ALTER TABLE "project_identity_aliases"
|
|
43
|
+
ADD CONSTRAINT "project_identity_aliases_operation_id_fkey"
|
|
44
|
+
FOREIGN KEY ("operation_id")
|
|
45
|
+
REFERENCES "project_identity_operations"("operation_id")
|
|
46
|
+
ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED;
|
|
47
|
+
|
|
48
|
+
CREATE INDEX "project_identity_operations_source_project_id_idx"
|
|
49
|
+
ON "project_identity_operations" ("source_project_id");
|
|
50
|
+
CREATE INDEX "project_identity_operations_target_project_id_idx"
|
|
51
|
+
ON "project_identity_operations" ("target_project_id");
|
|
52
|
+
|
|
53
|
+
CREATE FUNCTION project_identity_reject_operation_mutation()
|
|
54
|
+
RETURNS trigger
|
|
55
|
+
LANGUAGE plpgsql
|
|
56
|
+
SET search_path = pg_catalog, public
|
|
57
|
+
AS $$
|
|
58
|
+
BEGIN
|
|
59
|
+
RAISE EXCEPTION 'project_identity_operations_are_immutable'
|
|
60
|
+
USING ERRCODE = '55000';
|
|
61
|
+
END;
|
|
62
|
+
$$;
|
|
63
|
+
|
|
64
|
+
CREATE TRIGGER project_identity_operations_immutable
|
|
65
|
+
BEFORE UPDATE OR DELETE ON "project_identity_operations"
|
|
66
|
+
FOR EACH ROW EXECUTE FUNCTION project_identity_reject_operation_mutation();
|
|
67
|
+
|
|
68
|
+
CREATE FUNCTION project_identity_lock_key(project_id TEXT)
|
|
69
|
+
RETURNS BIGINT
|
|
70
|
+
LANGUAGE sql
|
|
71
|
+
IMMUTABLE PARALLEL SAFE
|
|
72
|
+
SET search_path = pg_catalog
|
|
73
|
+
AS $$
|
|
74
|
+
SELECT hashtextextended('massa-ai:project-identity:' || project_id, 0);
|
|
75
|
+
$$;
|
|
76
|
+
|
|
77
|
+
CREATE FUNCTION project_identity_lock_shared(project_ids TEXT[])
|
|
78
|
+
RETURNS VOID
|
|
79
|
+
LANGUAGE plpgsql
|
|
80
|
+
SET search_path = pg_catalog, public
|
|
81
|
+
AS $$
|
|
82
|
+
DECLARE
|
|
83
|
+
project_id TEXT;
|
|
84
|
+
BEGIN
|
|
85
|
+
FOR project_id IN
|
|
86
|
+
SELECT DISTINCT value
|
|
87
|
+
FROM unnest(project_ids) AS value
|
|
88
|
+
WHERE value IS NOT NULL AND value <> ''
|
|
89
|
+
ORDER BY value
|
|
90
|
+
LOOP
|
|
91
|
+
PERFORM pg_advisory_xact_lock_shared(project_identity_lock_key(project_id));
|
|
92
|
+
END LOOP;
|
|
93
|
+
END;
|
|
94
|
+
$$;
|
|
95
|
+
|
|
96
|
+
CREATE FUNCTION project_identity_lock_exclusive(project_ids TEXT[])
|
|
97
|
+
RETURNS VOID
|
|
98
|
+
LANGUAGE plpgsql
|
|
99
|
+
SET search_path = pg_catalog, public
|
|
100
|
+
AS $$
|
|
101
|
+
DECLARE
|
|
102
|
+
project_id TEXT;
|
|
103
|
+
BEGIN
|
|
104
|
+
FOR project_id IN
|
|
105
|
+
SELECT DISTINCT value
|
|
106
|
+
FROM unnest(project_ids) AS value
|
|
107
|
+
WHERE value IS NOT NULL AND value <> ''
|
|
108
|
+
ORDER BY value
|
|
109
|
+
LOOP
|
|
110
|
+
PERFORM pg_advisory_xact_lock(project_identity_lock_key(project_id));
|
|
111
|
+
END LOOP;
|
|
112
|
+
END;
|
|
113
|
+
$$;
|
|
114
|
+
|
|
115
|
+
CREATE FUNCTION project_identity_resolve(project_id TEXT)
|
|
116
|
+
RETURNS TEXT
|
|
117
|
+
LANGUAGE plpgsql
|
|
118
|
+
VOLATILE
|
|
119
|
+
SET search_path = pg_catalog, public
|
|
120
|
+
AS $$
|
|
121
|
+
DECLARE
|
|
122
|
+
current_id TEXT := project_id;
|
|
123
|
+
next_id TEXT;
|
|
124
|
+
visited TEXT[] := ARRAY[]::TEXT[];
|
|
125
|
+
BEGIN
|
|
126
|
+
IF current_id IS NULL OR current_id = '' THEN
|
|
127
|
+
RETURN current_id;
|
|
128
|
+
END IF;
|
|
129
|
+
|
|
130
|
+
LOOP
|
|
131
|
+
IF current_id = ANY(visited) OR cardinality(visited) >= 64 THEN
|
|
132
|
+
RAISE EXCEPTION 'project_identity_alias_cycle'
|
|
133
|
+
USING ERRCODE = '23514';
|
|
134
|
+
END IF;
|
|
135
|
+
visited := array_append(visited, current_id);
|
|
136
|
+
|
|
137
|
+
SELECT alias."target_project_id" INTO next_id
|
|
138
|
+
FROM "project_identity_aliases" AS alias
|
|
139
|
+
WHERE alias."retired_project_id" = current_id;
|
|
140
|
+
|
|
141
|
+
IF NOT FOUND THEN
|
|
142
|
+
RETURN current_id;
|
|
143
|
+
END IF;
|
|
144
|
+
current_id := next_id;
|
|
145
|
+
END LOOP;
|
|
146
|
+
END;
|
|
147
|
+
$$;
|
|
148
|
+
|
|
149
|
+
CREATE FUNCTION project_identity_guard_project_id()
|
|
150
|
+
RETURNS trigger
|
|
151
|
+
LANGUAGE plpgsql
|
|
152
|
+
SET search_path = pg_catalog, public
|
|
153
|
+
AS $$
|
|
154
|
+
DECLARE
|
|
155
|
+
column_name TEXT := TG_ARGV[0];
|
|
156
|
+
old_id TEXT;
|
|
157
|
+
new_id TEXT;
|
|
158
|
+
BEGIN
|
|
159
|
+
IF column_name IS NULL OR column_name = '' THEN
|
|
160
|
+
RAISE EXCEPTION 'project_identity_guard_requires_column'
|
|
161
|
+
USING ERRCODE = '22023';
|
|
162
|
+
END IF;
|
|
163
|
+
|
|
164
|
+
IF TG_OP = 'DELETE' THEN
|
|
165
|
+
old_id := to_jsonb(OLD) ->> column_name;
|
|
166
|
+
PERFORM project_identity_lock_shared(ARRAY[old_id]);
|
|
167
|
+
RETURN OLD;
|
|
168
|
+
ELSIF TG_OP = 'UPDATE' THEN
|
|
169
|
+
old_id := to_jsonb(OLD) ->> column_name;
|
|
170
|
+
END IF;
|
|
171
|
+
new_id := to_jsonb(NEW) ->> column_name;
|
|
172
|
+
PERFORM project_identity_lock_shared(ARRAY[old_id, new_id]);
|
|
173
|
+
|
|
174
|
+
IF new_id IS NOT NULL THEN
|
|
175
|
+
NEW := jsonb_populate_record(
|
|
176
|
+
NEW,
|
|
177
|
+
jsonb_build_object(column_name, project_identity_resolve(new_id))
|
|
178
|
+
);
|
|
179
|
+
END IF;
|
|
180
|
+
RETURN NEW;
|
|
181
|
+
END;
|
|
182
|
+
$$;
|
|
183
|
+
|
|
184
|
+
CREATE FUNCTION project_identity_install_guard(target_table REGCLASS, column_name TEXT)
|
|
185
|
+
RETURNS VOID
|
|
186
|
+
LANGUAGE plpgsql
|
|
187
|
+
SET search_path = pg_catalog, public
|
|
188
|
+
AS $$
|
|
189
|
+
DECLARE
|
|
190
|
+
trigger_name TEXT;
|
|
191
|
+
BEGIN
|
|
192
|
+
IF NOT EXISTS (
|
|
193
|
+
SELECT 1
|
|
194
|
+
FROM pg_attribute
|
|
195
|
+
WHERE attrelid = target_table
|
|
196
|
+
AND attname = column_name
|
|
197
|
+
AND NOT attisdropped
|
|
198
|
+
) THEN
|
|
199
|
+
RAISE EXCEPTION 'project_identity_guard_column_missing'
|
|
200
|
+
USING ERRCODE = '42703';
|
|
201
|
+
END IF;
|
|
202
|
+
|
|
203
|
+
trigger_name := 'project_identity_guard_' || substr(md5(target_table::TEXT || ':' || column_name), 1, 16);
|
|
204
|
+
EXECUTE format('DROP TRIGGER IF EXISTS %I ON %s', trigger_name, target_table);
|
|
205
|
+
EXECUTE format(
|
|
206
|
+
'CREATE TRIGGER %I BEFORE INSERT OR UPDATE OF %I OR DELETE ON %s FOR EACH ROW EXECUTE FUNCTION project_identity_guard_project_id(%L)',
|
|
207
|
+
trigger_name,
|
|
208
|
+
column_name,
|
|
209
|
+
target_table,
|
|
210
|
+
column_name
|
|
211
|
+
);
|
|
212
|
+
END;
|
|
213
|
+
$$;
|
|
214
|
+
|
|
215
|
+
-- Project identity changes traverse a graph/workspace FK cycle. Preserve all
|
|
216
|
+
-- existing delete behavior while making the update cascade atomic and deferred.
|
|
217
|
+
ALTER TABLE "graph_generations"
|
|
218
|
+
DROP CONSTRAINT "graph_generations_project_id_fkey",
|
|
219
|
+
ADD CONSTRAINT "graph_generations_project_id_fkey"
|
|
220
|
+
FOREIGN KEY ("project_id") REFERENCES "workspaces"("project_id")
|
|
221
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
222
|
+
|
|
223
|
+
ALTER TABLE "workspaces"
|
|
224
|
+
DROP CONSTRAINT "workspaces_active_graph_generation_fkey",
|
|
225
|
+
ADD CONSTRAINT "workspaces_active_graph_generation_fkey"
|
|
226
|
+
FOREIGN KEY ("project_id", "active_graph_generation_id")
|
|
227
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
228
|
+
ON UPDATE CASCADE ON DELETE SET NULL ("active_graph_generation_id")
|
|
229
|
+
DEFERRABLE INITIALLY DEFERRED,
|
|
230
|
+
DROP CONSTRAINT "workspaces_pending_graph_generation_fkey",
|
|
231
|
+
ADD CONSTRAINT "workspaces_pending_graph_generation_fkey"
|
|
232
|
+
FOREIGN KEY ("project_id", "pending_graph_generation_id")
|
|
233
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
234
|
+
ON UPDATE CASCADE ON DELETE SET NULL ("pending_graph_generation_id")
|
|
235
|
+
DEFERRABLE INITIALLY DEFERRED;
|
|
236
|
+
|
|
237
|
+
ALTER TABLE "symbol_files"
|
|
238
|
+
DROP CONSTRAINT "symbol_files_generation_fkey",
|
|
239
|
+
ADD CONSTRAINT "symbol_files_generation_fkey"
|
|
240
|
+
FOREIGN KEY ("project_id", "generation_id")
|
|
241
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
242
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
243
|
+
ALTER TABLE "symbol_definitions"
|
|
244
|
+
DROP CONSTRAINT "symbol_definitions_generation_fkey",
|
|
245
|
+
ADD CONSTRAINT "symbol_definitions_generation_fkey"
|
|
246
|
+
FOREIGN KEY ("project_id", "generation_id")
|
|
247
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
248
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
249
|
+
ALTER TABLE "symbol_references"
|
|
250
|
+
DROP CONSTRAINT "symbol_references_generation_fkey",
|
|
251
|
+
ADD CONSTRAINT "symbol_references_generation_fkey"
|
|
252
|
+
FOREIGN KEY ("project_id", "generation_id")
|
|
253
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
254
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
255
|
+
ALTER TABLE "symbol_imports"
|
|
256
|
+
DROP CONSTRAINT "symbol_imports_generation_fkey",
|
|
257
|
+
ADD CONSTRAINT "symbol_imports_generation_fkey"
|
|
258
|
+
FOREIGN KEY ("project_id", "generation_id")
|
|
259
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
260
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
261
|
+
ALTER TABLE "symbol_centrality"
|
|
262
|
+
DROP CONSTRAINT "symbol_centrality_generation_fkey",
|
|
263
|
+
ADD CONSTRAINT "symbol_centrality_generation_fkey"
|
|
264
|
+
FOREIGN KEY ("project_id", "generation_id")
|
|
265
|
+
REFERENCES "graph_generations"("project_id", "id")
|
|
266
|
+
ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
|
267
|
+
|
|
268
|
+
COMMIT;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- Additive + reversible attribution provenance for hook observations (M45/HAR-05, HAR-06).
|
|
2
|
+
-- No backfill: pre-existing rows keep NULL provenance/agent.
|
|
3
|
+
ALTER TABLE observations
|
|
4
|
+
ADD COLUMN IF NOT EXISTS agent_id TEXT,
|
|
5
|
+
ADD COLUMN IF NOT EXISTS attribution_source TEXT;
|