tea-rags 1.44.2 → 1.45.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/README.md +275 -22
- package/benchmarks/lib/output.mjs +28 -17
- package/benchmarks/n9bmd-migration-scale-repro.mjs +178 -0
- package/build/bootstrap/auto-update/mcp-hint.d.ts.map +1 -1
- package/build/bootstrap/auto-update/mcp-hint.js +2 -1
- package/build/bootstrap/auto-update/mcp-hint.js.map +1 -1
- package/build/bootstrap/config/env-snapshot.d.ts +22 -0
- package/build/bootstrap/config/env-snapshot.d.ts.map +1 -1
- package/build/bootstrap/config/env-snapshot.js +25 -1
- package/build/bootstrap/config/env-snapshot.js.map +1 -1
- package/build/bootstrap/config/parse.d.ts +18 -0
- package/build/bootstrap/config/parse.d.ts.map +1 -1
- package/build/bootstrap/config/parse.js +32 -1
- package/build/bootstrap/config/parse.js.map +1 -1
- package/build/bootstrap/config/registry-env-code-defaults.d.ts +18 -0
- package/build/bootstrap/config/registry-env-code-defaults.d.ts.map +1 -0
- package/build/bootstrap/config/registry-env-code-defaults.js +26 -0
- package/build/bootstrap/config/registry-env-code-defaults.js.map +1 -0
- package/build/bootstrap/config/schemas.d.ts +9 -0
- package/build/bootstrap/config/schemas.d.ts.map +1 -1
- package/build/bootstrap/config/schemas.js +23 -1
- package/build/bootstrap/config/schemas.js.map +1 -1
- package/build/bootstrap/factory.d.ts +44 -5
- package/build/bootstrap/factory.d.ts.map +1 -1
- package/build/bootstrap/factory.js +192 -33
- package/build/bootstrap/factory.js.map +1 -1
- package/build/bootstrap/footprint-purge.d.ts +13 -0
- package/build/bootstrap/footprint-purge.d.ts.map +1 -1
- package/build/bootstrap/footprint-purge.js +36 -3
- package/build/bootstrap/footprint-purge.js.map +1 -1
- package/build/bootstrap/in-process-session.d.ts +17 -0
- package/build/bootstrap/in-process-session.d.ts.map +1 -0
- package/build/bootstrap/in-process-session.js +39 -0
- package/build/bootstrap/in-process-session.js.map +1 -0
- package/build/bootstrap/project-ingest-factory.js +2 -2
- package/build/bootstrap/project-ingest-factory.js.map +1 -1
- package/build/bootstrap/server-runtime.d.ts +26 -0
- package/build/bootstrap/server-runtime.d.ts.map +1 -0
- package/build/bootstrap/server-runtime.js +26 -0
- package/build/bootstrap/server-runtime.js.map +1 -0
- package/build/bootstrap/transport/in-memory.d.ts +18 -0
- package/build/bootstrap/transport/in-memory.d.ts.map +1 -0
- package/build/bootstrap/transport/in-memory.js +38 -0
- package/build/bootstrap/transport/in-memory.js.map +1 -0
- package/build/bootstrap/transport/stdio.d.ts +35 -1
- package/build/bootstrap/transport/stdio.d.ts.map +1 -1
- package/build/bootstrap/transport/stdio.js +64 -1
- package/build/bootstrap/transport/stdio.js.map +1 -1
- package/build/cli/call/cli-owned-tools.d.ts +14 -0
- package/build/cli/call/cli-owned-tools.d.ts.map +1 -0
- package/build/cli/call/cli-owned-tools.js +21 -0
- package/build/cli/call/cli-owned-tools.js.map +1 -0
- package/build/cli/call/project-env.d.ts +35 -0
- package/build/cli/call/project-env.d.ts.map +1 -0
- package/build/cli/call/project-env.js +65 -0
- package/build/cli/call/project-env.js.map +1 -0
- package/build/cli/call/tool-name-cache.d.ts +5 -0
- package/build/cli/call/tool-name-cache.d.ts.map +1 -0
- package/build/cli/call/tool-name-cache.js +41 -0
- package/build/cli/call/tool-name-cache.js.map +1 -0
- package/build/cli/commands/call.d.ts +53 -0
- package/build/cli/commands/call.d.ts.map +1 -0
- package/build/cli/commands/call.js +271 -0
- package/build/cli/commands/call.js.map +1 -0
- package/build/cli/commands/doctor.d.ts +2 -0
- package/build/cli/commands/doctor.d.ts.map +1 -1
- package/build/cli/commands/doctor.js +39 -28
- package/build/cli/commands/doctor.js.map +1 -1
- package/build/cli/commands/index-codebase.d.ts +8 -0
- package/build/cli/commands/index-codebase.d.ts.map +1 -1
- package/build/cli/commands/index-codebase.js +41 -7
- package/build/cli/commands/index-codebase.js.map +1 -1
- package/build/cli/commands/project.d.ts.map +1 -1
- package/build/cli/commands/project.js +2 -1
- package/build/cli/commands/project.js.map +1 -1
- package/build/cli/commands/projects-format.d.ts +21 -0
- package/build/cli/commands/projects-format.d.ts.map +1 -1
- package/build/cli/commands/projects-format.js +70 -0
- package/build/cli/commands/projects-format.js.map +1 -1
- package/build/cli/commands/projects.d.ts +44 -2
- package/build/cli/commands/projects.d.ts.map +1 -1
- package/build/cli/commands/projects.js +213 -58
- package/build/cli/commands/projects.js.map +1 -1
- package/build/cli/commands/qdrant.d.ts +25 -0
- package/build/cli/commands/qdrant.d.ts.map +1 -0
- package/build/cli/commands/qdrant.js +96 -0
- package/build/cli/commands/qdrant.js.map +1 -0
- package/build/cli/commands/server.d.ts.map +1 -1
- package/build/cli/commands/server.js +6 -17
- package/build/cli/commands/server.js.map +1 -1
- package/build/cli/commands/tune-format.d.ts +15 -0
- package/build/cli/commands/tune-format.d.ts.map +1 -0
- package/build/cli/commands/tune-format.js +21 -0
- package/build/cli/commands/tune-format.js.map +1 -0
- package/build/cli/commands/tune-registry-write.d.ts.map +1 -1
- package/build/cli/commands/tune-registry-write.js +7 -12
- package/build/cli/commands/tune-registry-write.js.map +1 -1
- package/build/cli/commands/tune.d.ts.map +1 -1
- package/build/cli/commands/tune.js +14 -5
- package/build/cli/commands/tune.js.map +1 -1
- package/build/cli/commands/update.d.ts.map +1 -1
- package/build/cli/commands/update.js +11 -5
- package/build/cli/commands/update.js.map +1 -1
- package/build/cli/commands/worktree.d.ts.map +1 -1
- package/build/cli/commands/worktree.js +7 -2
- package/build/cli/commands/worktree.js.map +1 -1
- package/build/cli/completion.d.ts +1 -1
- package/build/cli/completion.d.ts.map +1 -1
- package/build/cli/completion.js +13 -4
- package/build/cli/completion.js.map +1 -1
- package/build/cli/create-cli.d.ts.map +1 -1
- package/build/cli/create-cli.js +4 -0
- package/build/cli/create-cli.js.map +1 -1
- package/build/cli/index-progress/ipc-protocol.d.ts +22 -1
- package/build/cli/index-progress/ipc-protocol.d.ts.map +1 -1
- package/build/cli/index-progress/ipc-protocol.js +9 -1
- package/build/cli/index-progress/ipc-protocol.js.map +1 -1
- package/build/cli/index-progress/renderer.d.ts +6 -0
- package/build/cli/index-progress/renderer.d.ts.map +1 -1
- package/build/cli/index-progress/renderer.js +58 -0
- package/build/cli/index-progress/renderer.js.map +1 -1
- package/build/cli/index-progress/status-format.d.ts.map +1 -1
- package/build/cli/index-progress/status-format.js +27 -0
- package/build/cli/index-progress/status-format.js.map +1 -1
- package/build/cli/index-progress/supervisor.d.ts.map +1 -1
- package/build/cli/index-progress/supervisor.js +15 -1
- package/build/cli/index-progress/supervisor.js.map +1 -1
- package/build/cli/index-progress/worker.d.ts.map +1 -1
- package/build/cli/index-progress/worker.js +37 -14
- package/build/cli/index-progress/worker.js.map +1 -1
- package/build/cli/infra/status-tag.d.ts +13 -0
- package/build/cli/infra/status-tag.d.ts.map +1 -0
- package/build/cli/infra/status-tag.js +35 -0
- package/build/cli/infra/status-tag.js.map +1 -0
- package/build/cli/prime/format.d.ts.map +1 -1
- package/build/cli/prime/format.js +112 -5
- package/build/cli/prime/format.js.map +1 -1
- package/build/cli/prime/run-prime.d.ts.map +1 -1
- package/build/cli/prime/run-prime.js +61 -20
- package/build/cli/prime/run-prime.js.map +1 -1
- package/build/cli/prime/types.d.ts +16 -1
- package/build/cli/prime/types.d.ts.map +1 -1
- package/build/cli/registry-resolver.d.ts.map +1 -1
- package/build/cli/registry-resolver.js +18 -3
- package/build/cli/registry-resolver.js.map +1 -1
- package/build/cli/update-check/format.d.ts +6 -2
- package/build/cli/update-check/format.d.ts.map +1 -1
- package/build/cli/update-check/format.js +11 -5
- package/build/cli/update-check/format.js.map +1 -1
- package/build/core/adapters/duckdb/cg-symbols-row.d.ts +3 -1
- package/build/core/adapters/duckdb/cg-symbols-row.d.ts.map +1 -1
- package/build/core/adapters/duckdb/cg-symbols-row.js +4 -0
- package/build/core/adapters/duckdb/cg-symbols-row.js.map +1 -1
- package/build/core/adapters/duckdb/client.d.ts +48 -10
- package/build/core/adapters/duckdb/client.d.ts.map +1 -1
- package/build/core/adapters/duckdb/client.js +111 -9
- package/build/core/adapters/duckdb/client.js.map +1 -1
- package/build/core/adapters/duckdb/codegraph-db-files.d.ts +32 -8
- package/build/core/adapters/duckdb/codegraph-db-files.d.ts.map +1 -1
- package/build/core/adapters/duckdb/codegraph-db-files.js +112 -40
- package/build/core/adapters/duckdb/codegraph-db-files.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/client.d.ts +60 -7
- package/build/core/adapters/duckdb/daemon/client.d.ts.map +1 -1
- package/build/core/adapters/duckdb/daemon/client.js +172 -13
- package/build/core/adapters/duckdb/daemon/client.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/database-file-replacer.d.ts +50 -0
- package/build/core/adapters/duckdb/daemon/database-file-replacer.d.ts.map +1 -0
- package/build/core/adapters/duckdb/daemon/database-file-replacer.js +78 -0
- package/build/core/adapters/duckdb/daemon/database-file-replacer.js.map +1 -0
- package/build/core/adapters/duckdb/daemon/entry.d.ts +10 -3
- package/build/core/adapters/duckdb/daemon/entry.d.ts.map +1 -1
- package/build/core/adapters/duckdb/daemon/entry.js +52 -8
- package/build/core/adapters/duckdb/daemon/entry.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/foreign-build-lock-arbiter.d.ts +88 -0
- package/build/core/adapters/duckdb/daemon/foreign-build-lock-arbiter.d.ts.map +1 -0
- package/build/core/adapters/duckdb/daemon/foreign-build-lock-arbiter.js +131 -0
- package/build/core/adapters/duckdb/daemon/foreign-build-lock-arbiter.js.map +1 -0
- package/build/core/adapters/duckdb/daemon/lifecycle.d.ts +31 -0
- package/build/core/adapters/duckdb/daemon/lifecycle.d.ts.map +1 -1
- package/build/core/adapters/duckdb/daemon/lifecycle.js +37 -1
- package/build/core/adapters/duckdb/daemon/lifecycle.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/op-commands.d.ts.map +1 -1
- package/build/core/adapters/duckdb/daemon/op-commands.js +95 -2
- package/build/core/adapters/duckdb/daemon/op-commands.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/protocol.d.ts +98 -6
- package/build/core/adapters/duckdb/daemon/protocol.d.ts.map +1 -1
- package/build/core/adapters/duckdb/daemon/protocol.js +70 -1
- package/build/core/adapters/duckdb/daemon/protocol.js.map +1 -1
- package/build/core/adapters/duckdb/daemon/server.js +11 -11
- package/build/core/adapters/duckdb/daemon/server.js.map +1 -1
- package/build/core/adapters/duckdb/database-file-compaction.d.ts +53 -0
- package/build/core/adapters/duckdb/database-file-compaction.d.ts.map +1 -0
- package/build/core/adapters/duckdb/database-file-compaction.js +145 -0
- package/build/core/adapters/duckdb/database-file-compaction.js.map +1 -0
- package/build/core/adapters/duckdb/errors.d.ts +110 -1
- package/build/core/adapters/duckdb/errors.d.ts.map +1 -1
- package/build/core/adapters/duckdb/errors.js +186 -3
- package/build/core/adapters/duckdb/errors.js.map +1 -1
- package/build/core/adapters/duckdb/file-edge-export-names-codec.d.ts +10 -0
- package/build/core/adapters/duckdb/file-edge-export-names-codec.d.ts.map +1 -0
- package/build/core/adapters/duckdb/file-edge-export-names-codec.js +17 -0
- package/build/core/adapters/duckdb/file-edge-export-names-codec.js.map +1 -0
- package/build/core/adapters/duckdb/file-graph-store.d.ts +23 -7
- package/build/core/adapters/duckdb/file-graph-store.d.ts.map +1 -1
- package/build/core/adapters/duckdb/file-graph-store.js +138 -15
- package/build/core/adapters/duckdb/file-graph-store.js.map +1 -1
- package/build/core/adapters/duckdb/graph-analytics-store.d.ts +67 -25
- package/build/core/adapters/duckdb/graph-analytics-store.d.ts.map +1 -1
- package/build/core/adapters/duckdb/graph-analytics-store.js +246 -96
- package/build/core/adapters/duckdb/graph-analytics-store.js.map +1 -1
- package/build/core/adapters/duckdb/graph-session.d.ts +106 -5
- package/build/core/adapters/duckdb/graph-session.d.ts.map +1 -1
- package/build/core/adapters/duckdb/graph-session.js +236 -16
- package/build/core/adapters/duckdb/graph-session.js.map +1 -1
- package/build/core/adapters/duckdb/hierarchy-reader.d.ts.map +1 -1
- package/build/core/adapters/duckdb/hierarchy-reader.js +2 -1
- package/build/core/adapters/duckdb/hierarchy-reader.js.map +1 -1
- package/build/core/adapters/duckdb/identifier-store.d.ts +85 -0
- package/build/core/adapters/duckdb/identifier-store.d.ts.map +1 -0
- package/build/core/adapters/duckdb/identifier-store.js +498 -0
- package/build/core/adapters/duckdb/identifier-store.js.map +1 -0
- package/build/core/adapters/duckdb/method-edge-reader.d.ts +34 -9
- package/build/core/adapters/duckdb/method-edge-reader.d.ts.map +1 -1
- package/build/core/adapters/duckdb/method-edge-reader.js +73 -19
- package/build/core/adapters/duckdb/method-edge-reader.js.map +1 -1
- package/build/core/adapters/duckdb/non-production-path-sql.d.ts +35 -0
- package/build/core/adapters/duckdb/non-production-path-sql.d.ts.map +1 -0
- package/build/core/adapters/duckdb/non-production-path-sql.js +79 -0
- package/build/core/adapters/duckdb/non-production-path-sql.js.map +1 -0
- package/build/core/adapters/duckdb/ontology-report-store.d.ts +106 -0
- package/build/core/adapters/duckdb/ontology-report-store.d.ts.map +1 -0
- package/build/core/adapters/duckdb/ontology-report-store.js +599 -0
- package/build/core/adapters/duckdb/ontology-report-store.js.map +1 -0
- package/build/core/adapters/duckdb/pool.d.ts +136 -17
- package/build/core/adapters/duckdb/pool.d.ts.map +1 -1
- package/build/core/adapters/duckdb/pool.js +335 -118
- package/build/core/adapters/duckdb/pool.js.map +1 -1
- package/build/core/adapters/duckdb/signal-drift-store.d.ts +12 -5
- package/build/core/adapters/duckdb/signal-drift-store.d.ts.map +1 -1
- package/build/core/adapters/duckdb/signal-drift-store.js +28 -15
- package/build/core/adapters/duckdb/signal-drift-store.js.map +1 -1
- package/build/core/adapters/duckdb/sql-binding.d.ts +5 -0
- package/build/core/adapters/duckdb/sql-binding.d.ts.map +1 -1
- package/build/core/adapters/duckdb/sql-binding.js +7 -0
- package/build/core/adapters/duckdb/sql-binding.js.map +1 -1
- package/build/core/adapters/duckdb/storage-compaction.d.ts +43 -0
- package/build/core/adapters/duckdb/storage-compaction.d.ts.map +1 -0
- package/build/core/adapters/duckdb/storage-compaction.js +43 -0
- package/build/core/adapters/duckdb/storage-compaction.js.map +1 -0
- package/build/core/adapters/duckdb/symbol-store.d.ts +7 -1
- package/build/core/adapters/duckdb/symbol-store.d.ts.map +1 -1
- package/build/core/adapters/duckdb/symbol-store.js +59 -23
- package/build/core/adapters/duckdb/symbol-store.js.map +1 -1
- package/build/core/adapters/duckdb/temporal-cochange-store.d.ts +47 -0
- package/build/core/adapters/duckdb/temporal-cochange-store.d.ts.map +1 -0
- package/build/core/adapters/duckdb/temporal-cochange-store.js +178 -0
- package/build/core/adapters/duckdb/temporal-cochange-store.js.map +1 -0
- package/build/core/adapters/duckdb/type-name-store.d.ts +27 -0
- package/build/core/adapters/duckdb/type-name-store.d.ts.map +1 -0
- package/build/core/adapters/duckdb/type-name-store.js +171 -0
- package/build/core/adapters/duckdb/type-name-store.js.map +1 -0
- package/build/core/adapters/embeddings/base.d.ts +17 -0
- package/build/core/adapters/embeddings/base.d.ts.map +1 -1
- package/build/core/adapters/embeddings/errors.d.ts +16 -0
- package/build/core/adapters/embeddings/errors.d.ts.map +1 -1
- package/build/core/adapters/embeddings/errors.js +12 -0
- package/build/core/adapters/embeddings/errors.js.map +1 -1
- package/build/core/adapters/embeddings/factory.d.ts.map +1 -1
- package/build/core/adapters/embeddings/factory.js +2 -0
- package/build/core/adapters/embeddings/factory.js.map +1 -1
- package/build/core/adapters/embeddings/ollama/errors.d.ts +39 -4
- package/build/core/adapters/embeddings/ollama/errors.d.ts.map +1 -1
- package/build/core/adapters/embeddings/ollama/errors.js +80 -7
- package/build/core/adapters/embeddings/ollama/errors.js.map +1 -1
- package/build/core/adapters/embeddings/ollama/model-quantization.d.ts +50 -0
- package/build/core/adapters/embeddings/ollama/model-quantization.d.ts.map +1 -0
- package/build/core/adapters/embeddings/ollama/model-quantization.js +93 -0
- package/build/core/adapters/embeddings/ollama/model-quantization.js.map +1 -0
- package/build/core/adapters/embeddings/ollama.d.ts +82 -1
- package/build/core/adapters/embeddings/ollama.d.ts.map +1 -1
- package/build/core/adapters/embeddings/ollama.js +266 -41
- package/build/core/adapters/embeddings/ollama.js.map +1 -1
- package/build/core/adapters/embeddings/onnx/daemon.d.ts +12 -1
- package/build/core/adapters/embeddings/onnx/daemon.d.ts.map +1 -1
- package/build/core/adapters/embeddings/onnx/daemon.js +46 -7
- package/build/core/adapters/embeddings/onnx/daemon.js.map +1 -1
- package/build/core/adapters/embeddings/onnx/device.d.ts +13 -0
- package/build/core/adapters/embeddings/onnx/device.d.ts.map +1 -1
- package/build/core/adapters/embeddings/onnx/device.js +13 -0
- package/build/core/adapters/embeddings/onnx/device.js.map +1 -1
- package/build/core/adapters/embeddings/onnx/worker-types.d.ts +7 -0
- package/build/core/adapters/embeddings/onnx/worker-types.d.ts.map +1 -1
- package/build/core/adapters/embeddings/onnx/worker.js +3 -3
- package/build/core/adapters/embeddings/onnx/worker.js.map +1 -1
- package/build/core/adapters/embeddings/retry.d.ts +2 -0
- package/build/core/adapters/embeddings/retry.d.ts.map +1 -1
- package/build/core/adapters/embeddings/retry.js +1 -1
- package/build/core/adapters/embeddings/retry.js.map +1 -1
- package/build/core/adapters/errors.d.ts +1 -1
- package/build/core/adapters/errors.d.ts.map +1 -1
- package/build/core/adapters/errors.js +8 -0
- package/build/core/adapters/errors.js.map +1 -1
- package/build/core/adapters/qdrant/aliases.d.ts +11 -4
- package/build/core/adapters/qdrant/aliases.d.ts.map +1 -1
- package/build/core/adapters/qdrant/aliases.js +19 -12
- package/build/core/adapters/qdrant/aliases.js.map +1 -1
- package/build/core/adapters/qdrant/client.d.ts +5 -1
- package/build/core/adapters/qdrant/client.d.ts.map +1 -1
- package/build/core/adapters/qdrant/client.js +10 -2
- package/build/core/adapters/qdrant/client.js.map +1 -1
- package/build/core/adapters/qdrant/collection-admin.d.ts +21 -2
- package/build/core/adapters/qdrant/collection-admin.d.ts.map +1 -1
- package/build/core/adapters/qdrant/collection-admin.js +42 -4
- package/build/core/adapters/qdrant/collection-admin.js.map +1 -1
- package/build/core/adapters/qdrant/connection.d.ts +13 -2
- package/build/core/adapters/qdrant/connection.d.ts.map +1 -1
- package/build/core/adapters/qdrant/connection.js +49 -4
- package/build/core/adapters/qdrant/connection.js.map +1 -1
- package/build/core/adapters/qdrant/embedding-model-guard.d.ts +32 -12
- package/build/core/adapters/qdrant/embedding-model-guard.d.ts.map +1 -1
- package/build/core/adapters/qdrant/embedding-model-guard.js +43 -34
- package/build/core/adapters/qdrant/embedding-model-guard.js.map +1 -1
- package/build/core/adapters/qdrant/errors.d.ts +31 -0
- package/build/core/adapters/qdrant/errors.d.ts.map +1 -1
- package/build/core/adapters/qdrant/errors.js +53 -0
- package/build/core/adapters/qdrant/errors.js.map +1 -1
- package/build/core/adapters/qdrant/point-store.d.ts +11 -0
- package/build/core/adapters/qdrant/point-store.d.ts.map +1 -1
- package/build/core/adapters/qdrant/point-store.js +18 -0
- package/build/core/adapters/qdrant/point-store.js.map +1 -1
- package/build/core/adapters/qdrant/schema-manager.d.ts +17 -1
- package/build/core/adapters/qdrant/schema-manager.d.ts.map +1 -1
- package/build/core/adapters/qdrant/schema-manager.js +20 -1
- package/build/core/adapters/qdrant/schema-manager.js.map +1 -1
- package/build/core/adapters/qdrant/search-executor.d.ts.map +1 -1
- package/build/core/adapters/qdrant/search-executor.js +2 -3
- package/build/core/adapters/qdrant/search-executor.js.map +1 -1
- package/build/core/adapters/vcs/git/adapter.d.ts +19 -0
- package/build/core/adapters/vcs/git/adapter.d.ts.map +1 -1
- package/build/core/adapters/vcs/git/adapter.js.map +1 -1
- package/build/core/adapters/vcs/git/es-git/adapter.d.ts +5 -0
- package/build/core/adapters/vcs/git/es-git/adapter.d.ts.map +1 -1
- package/build/core/adapters/vcs/git/es-git/adapter.js +11 -0
- package/build/core/adapters/vcs/git/es-git/adapter.js.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/adapter.d.ts +3 -0
- package/build/core/adapters/vcs/git/git-cli/adapter.d.ts.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/adapter.js +10 -1
- package/build/core/adapters/vcs/git/git-cli/adapter.js.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/client.d.ts +61 -0
- package/build/core/adapters/vcs/git/git-cli/client.d.ts.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/client.js +279 -13
- package/build/core/adapters/vcs/git/git-cli/client.js.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/git-child-process-registry.d.ts +28 -0
- package/build/core/adapters/vcs/git/git-cli/git-child-process-registry.d.ts.map +1 -0
- package/build/core/adapters/vcs/git/git-cli/git-child-process-registry.js +47 -0
- package/build/core/adapters/vcs/git/git-cli/git-child-process-registry.js.map +1 -0
- package/build/core/adapters/vcs/git/git-cli/stall-guard-exec.d.ts.map +1 -1
- package/build/core/adapters/vcs/git/git-cli/stall-guard-exec.js +2 -0
- package/build/core/adapters/vcs/git/git-cli/stall-guard-exec.js.map +1 -1
- package/build/core/api/errors.d.ts +42 -1
- package/build/core/api/errors.d.ts.map +1 -1
- package/build/core/api/errors.js +61 -0
- package/build/core/api/errors.js.map +1 -1
- package/build/core/api/index.d.ts +1 -1
- package/build/core/api/index.d.ts.map +1 -1
- package/build/core/api/index.js.map +1 -1
- package/build/core/api/internal/composition.d.ts +62 -2
- package/build/core/api/internal/composition.d.ts.map +1 -1
- package/build/core/api/internal/composition.js +90 -4
- package/build/core/api/internal/composition.js.map +1 -1
- package/build/core/api/internal/facades/explore-facade.d.ts +5 -2
- package/build/core/api/internal/facades/explore-facade.d.ts.map +1 -1
- package/build/core/api/internal/facades/explore-facade.js +4 -2
- package/build/core/api/internal/facades/explore-facade.js.map +1 -1
- package/build/core/api/internal/facades/graph-facade.d.ts +30 -4
- package/build/core/api/internal/facades/graph-facade.d.ts.map +1 -1
- package/build/core/api/internal/facades/graph-facade.js +100 -12
- package/build/core/api/internal/facades/graph-facade.js.map +1 -1
- package/build/core/api/internal/facades/ingest-facade.d.ts +17 -0
- package/build/core/api/internal/facades/ingest-facade.d.ts.map +1 -1
- package/build/core/api/internal/facades/ingest-facade.js +52 -7
- package/build/core/api/internal/facades/ingest-facade.js.map +1 -1
- package/build/core/api/internal/infra/codegraph-payload-heal-runner.d.ts +2 -2
- package/build/core/api/internal/infra/codegraph-payload-heal-runner.d.ts.map +1 -1
- package/build/core/api/internal/infra/codegraph-payload-heal-runner.js +14 -7
- package/build/core/api/internal/infra/codegraph-payload-heal-runner.js.map +1 -1
- package/build/core/api/internal/infra/payload-file-commit-count-reader.d.ts +18 -0
- package/build/core/api/internal/infra/payload-file-commit-count-reader.d.ts.map +1 -0
- package/build/core/api/internal/infra/payload-file-commit-count-reader.js +40 -0
- package/build/core/api/internal/infra/payload-file-commit-count-reader.js.map +1 -0
- package/build/core/api/internal/infra/payload-import-specifier-reader.d.ts +23 -0
- package/build/core/api/internal/infra/payload-import-specifier-reader.d.ts.map +1 -0
- package/build/core/api/internal/infra/payload-import-specifier-reader.js +39 -0
- package/build/core/api/internal/infra/payload-import-specifier-reader.js.map +1 -0
- package/build/core/api/internal/infra/schema-builder.d.ts +6 -0
- package/build/core/api/internal/infra/schema-builder.d.ts.map +1 -1
- package/build/core/api/internal/infra/schema-builder.js +13 -8
- package/build/core/api/internal/infra/schema-builder.js.map +1 -1
- package/build/core/api/internal/ingest-dependencies.d.ts.map +1 -1
- package/build/core/api/internal/ingest-dependencies.js +8 -2
- package/build/core/api/internal/ingest-dependencies.js.map +1 -1
- package/build/core/api/internal/ops/architecture-report-ops.d.ts +62 -0
- package/build/core/api/internal/ops/architecture-report-ops.d.ts.map +1 -0
- package/build/core/api/internal/ops/architecture-report-ops.js +443 -0
- package/build/core/api/internal/ops/architecture-report-ops.js.map +1 -0
- package/build/core/api/internal/ops/collection-ops.d.ts +3 -1
- package/build/core/api/internal/ops/collection-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/collection-ops.js +29 -3
- package/build/core/api/internal/ops/collection-ops.js.map +1 -1
- package/build/core/api/internal/ops/declared-visibility-lookup.d.ts +32 -0
- package/build/core/api/internal/ops/declared-visibility-lookup.d.ts.map +1 -0
- package/build/core/api/internal/ops/declared-visibility-lookup.js +46 -0
- package/build/core/api/internal/ops/declared-visibility-lookup.js.map +1 -0
- package/build/core/api/internal/ops/document-metadata-schema.d.ts +41 -0
- package/build/core/api/internal/ops/document-metadata-schema.d.ts.map +1 -0
- package/build/core/api/internal/ops/document-metadata-schema.js +98 -0
- package/build/core/api/internal/ops/document-metadata-schema.js.map +1 -0
- package/build/core/api/internal/ops/document-ops.d.ts +9 -1
- package/build/core/api/internal/ops/document-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/document-ops.js +25 -7
- package/build/core/api/internal/ops/document-ops.js.map +1 -1
- package/build/core/api/internal/ops/explore-ops.d.ts +36 -3
- package/build/core/api/internal/ops/explore-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/explore-ops.js +115 -33
- package/build/core/api/internal/ops/explore-ops.js.map +1 -1
- package/build/core/api/internal/ops/file-import-ops.d.ts +25 -0
- package/build/core/api/internal/ops/file-import-ops.d.ts.map +1 -0
- package/build/core/api/internal/ops/file-import-ops.js +45 -0
- package/build/core/api/internal/ops/file-import-ops.js.map +1 -0
- package/build/core/api/internal/ops/indexing-ops.d.ts +47 -1
- package/build/core/api/internal/ops/indexing-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/indexing-ops.js +201 -91
- package/build/core/api/internal/ops/indexing-ops.js.map +1 -1
- package/build/core/api/internal/ops/naming-lexicon-ops.d.ts +242 -0
- package/build/core/api/internal/ops/naming-lexicon-ops.d.ts.map +1 -0
- package/build/core/api/internal/ops/naming-lexicon-ops.js +1610 -0
- package/build/core/api/internal/ops/naming-lexicon-ops.js.map +1 -0
- package/build/core/api/internal/ops/naming-review-extraction.d.ts +63 -0
- package/build/core/api/internal/ops/naming-review-extraction.d.ts.map +1 -0
- package/build/core/api/internal/ops/naming-review-extraction.js +98 -0
- package/build/core/api/internal/ops/naming-review-extraction.js.map +1 -0
- package/build/core/api/internal/ops/ontology-report-ops.d.ts +160 -0
- package/build/core/api/internal/ops/ontology-report-ops.d.ts.map +1 -0
- package/build/core/api/internal/ops/ontology-report-ops.js +503 -0
- package/build/core/api/internal/ops/ontology-report-ops.js.map +1 -0
- package/build/core/api/internal/ops/optimizer-recovery-ops.d.ts +59 -0
- package/build/core/api/internal/ops/optimizer-recovery-ops.d.ts.map +1 -0
- package/build/core/api/internal/ops/optimizer-recovery-ops.js +62 -0
- package/build/core/api/internal/ops/optimizer-recovery-ops.js.map +1 -0
- package/build/core/api/internal/ops/project-registry-ops.d.ts +80 -5
- package/build/core/api/internal/ops/project-registry-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/project-registry-ops.js +186 -18
- package/build/core/api/internal/ops/project-registry-ops.js.map +1 -1
- package/build/core/api/internal/ops/trace-path-ops.d.ts +23 -5
- package/build/core/api/internal/ops/trace-path-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/trace-path-ops.js +106 -28
- package/build/core/api/internal/ops/trace-path-ops.js.map +1 -1
- package/build/core/api/internal/ops/worktree-ops.d.ts +1 -1
- package/build/core/api/internal/ops/worktree-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/worktree-ops.js +1 -0
- package/build/core/api/internal/ops/worktree-ops.js.map +1 -1
- package/build/core/api/internal/ops/worktree-seed-ops.d.ts.map +1 -1
- package/build/core/api/internal/ops/worktree-seed-ops.js +7 -1
- package/build/core/api/internal/ops/worktree-seed-ops.js.map +1 -1
- package/build/core/api/public/app.d.ts +14 -4
- package/build/core/api/public/app.d.ts.map +1 -1
- package/build/core/api/public/app.js +11 -2
- package/build/core/api/public/app.js.map +1 -1
- package/build/core/api/public/dto/architecture.d.ts +565 -0
- package/build/core/api/public/dto/architecture.d.ts.map +1 -0
- package/build/core/api/public/dto/architecture.js +17 -0
- package/build/core/api/public/dto/architecture.js.map +1 -0
- package/build/core/api/public/dto/collection.d.ts +10 -0
- package/build/core/api/public/dto/collection.d.ts.map +1 -1
- package/build/core/api/public/dto/explore.d.ts +75 -0
- package/build/core/api/public/dto/explore.d.ts.map +1 -1
- package/build/core/api/public/dto/graph.d.ts +113 -9
- package/build/core/api/public/dto/graph.d.ts.map +1 -1
- package/build/core/api/public/dto/index.d.ts +9 -4
- package/build/core/api/public/dto/index.d.ts.map +1 -1
- package/build/core/api/public/dto/index.js +1 -0
- package/build/core/api/public/dto/index.js.map +1 -1
- package/build/core/api/public/dto/ingest.d.ts +67 -5
- package/build/core/api/public/dto/ingest.d.ts.map +1 -1
- package/build/core/api/public/dto/ingest.js +30 -0
- package/build/core/api/public/dto/ingest.js.map +1 -1
- package/build/core/api/public/dto/naming-lexicon.d.ts +326 -0
- package/build/core/api/public/dto/naming-lexicon.d.ts.map +1 -0
- package/build/core/api/public/dto/naming-lexicon.js +8 -0
- package/build/core/api/public/dto/naming-lexicon.js.map +1 -0
- package/build/core/api/public/dto/ontology.d.ts +163 -0
- package/build/core/api/public/dto/ontology.d.ts.map +1 -0
- package/build/core/api/public/dto/ontology.js +28 -0
- package/build/core/api/public/dto/ontology.js.map +1 -0
- package/build/core/api/public/dto/payload-projection.d.ts +45 -0
- package/build/core/api/public/dto/payload-projection.d.ts.map +1 -0
- package/build/core/api/public/dto/payload-projection.js +147 -0
- package/build/core/api/public/dto/payload-projection.js.map +1 -0
- package/build/core/api/public/dto/registry.d.ts +20 -0
- package/build/core/api/public/dto/registry.d.ts.map +1 -1
- package/build/core/api/public/index.d.ts +15 -4
- package/build/core/api/public/index.d.ts.map +1 -1
- package/build/core/api/public/index.js +29 -2
- package/build/core/api/public/index.js.map +1 -1
- package/build/core/contracts/identifier-record.d.ts +21 -0
- package/build/core/contracts/identifier-record.d.ts.map +1 -0
- package/build/core/contracts/identifier-record.js +25 -0
- package/build/core/contracts/identifier-record.js.map +1 -0
- package/build/core/contracts/resolve-rate.d.ts +60 -0
- package/build/core/contracts/resolve-rate.d.ts.map +1 -0
- package/build/core/contracts/resolve-rate.js +45 -0
- package/build/core/contracts/resolve-rate.js.map +1 -0
- package/build/core/contracts/signal-utils.d.ts +2 -1
- package/build/core/contracts/signal-utils.d.ts.map +1 -1
- package/build/core/contracts/signal-utils.js +14 -1
- package/build/core/contracts/signal-utils.js.map +1 -1
- package/build/core/contracts/types/ast.d.ts +11 -0
- package/build/core/contracts/types/ast.d.ts.map +1 -1
- package/build/core/contracts/types/ast.js +15 -1
- package/build/core/contracts/types/ast.js.map +1 -1
- package/build/core/contracts/types/chunker.d.ts +115 -3
- package/build/core/contracts/types/chunker.d.ts.map +1 -1
- package/build/core/contracts/types/chunker.js +18 -0
- package/build/core/contracts/types/chunker.js.map +1 -1
- package/build/core/contracts/types/codegraph-extraction.d.ts +483 -6
- package/build/core/contracts/types/codegraph-extraction.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-graph.d.ts +117 -3
- package/build/core/contracts/types/codegraph-graph.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-hierarchy.d.ts +51 -1
- package/build/core/contracts/types/codegraph-hierarchy.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-hierarchy.js +11 -1
- package/build/core/contracts/types/codegraph-hierarchy.js.map +1 -1
- package/build/core/contracts/types/codegraph-local-binding.d.ts +38 -0
- package/build/core/contracts/types/codegraph-local-binding.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-local-binding.js +3 -2
- package/build/core/contracts/types/codegraph-local-binding.js.map +1 -1
- package/build/core/contracts/types/codegraph-pass1.d.ts +110 -9
- package/build/core/contracts/types/codegraph-pass1.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-pass1.js +8 -6
- package/build/core/contracts/types/codegraph-pass1.js.map +1 -1
- package/build/core/contracts/types/codegraph-resolution.d.ts +55 -1
- package/build/core/contracts/types/codegraph-resolution.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-resolution.js +11 -0
- package/build/core/contracts/types/codegraph-resolution.js.map +1 -1
- package/build/core/contracts/types/codegraph-storage.d.ts +741 -23
- package/build/core/contracts/types/codegraph-storage.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-symbols.d.ts +99 -5
- package/build/core/contracts/types/codegraph-symbols.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph-temporal.d.ts +98 -0
- package/build/core/contracts/types/codegraph-temporal.d.ts.map +1 -0
- package/build/core/contracts/types/codegraph-temporal.js +15 -0
- package/build/core/contracts/types/codegraph-temporal.js.map +1 -0
- package/build/core/contracts/types/codegraph.d.ts +3 -1
- package/build/core/contracts/types/codegraph.d.ts.map +1 -1
- package/build/core/contracts/types/codegraph.js +2 -0
- package/build/core/contracts/types/codegraph.js.map +1 -1
- package/build/core/contracts/types/config.d.ts +8 -0
- package/build/core/contracts/types/config.d.ts.map +1 -1
- package/build/core/contracts/types/enrichment-executor.d.ts +1 -1
- package/build/core/contracts/types/enrichment-executor.d.ts.map +1 -1
- package/build/core/contracts/types/file-classification.d.ts +30 -0
- package/build/core/contracts/types/file-classification.d.ts.map +1 -1
- package/build/core/contracts/types/footprint.d.ts +2 -2
- package/build/core/contracts/types/footprint.d.ts.map +1 -1
- package/build/core/contracts/types/language.d.ts +279 -11
- package/build/core/contracts/types/language.d.ts.map +1 -1
- package/build/core/contracts/types/language.js.map +1 -1
- package/build/core/contracts/types/migration.d.ts +1 -1
- package/build/core/contracts/types/migration.d.ts.map +1 -1
- package/build/core/contracts/types/provider.d.ts +67 -11
- package/build/core/contracts/types/provider.d.ts.map +1 -1
- package/build/core/contracts/types/rechunk.d.ts +53 -0
- package/build/core/contracts/types/rechunk.d.ts.map +1 -0
- package/build/core/contracts/types/rechunk.js +27 -0
- package/build/core/contracts/types/rechunk.js.map +1 -0
- package/build/core/contracts/types/registry.d.ts +15 -0
- package/build/core/contracts/types/registry.d.ts.map +1 -1
- package/build/core/contracts/types/trajectory.d.ts +89 -3
- package/build/core/contracts/types/trajectory.d.ts.map +1 -1
- package/build/core/contracts/types/worktree.d.ts +9 -0
- package/build/core/contracts/types/worktree.d.ts.map +1 -1
- package/build/core/domains/explore/chunk-grouping/code.d.ts +12 -4
- package/build/core/domains/explore/chunk-grouping/code.d.ts.map +1 -1
- package/build/core/domains/explore/chunk-grouping/code.js +87 -10
- package/build/core/domains/explore/chunk-grouping/code.js.map +1 -1
- package/build/core/domains/explore/chunk-grouping/file-level.d.ts +9 -9
- package/build/core/domains/explore/chunk-grouping/file-level.d.ts.map +1 -1
- package/build/core/domains/explore/chunk-grouping/file-level.js +13 -47
- package/build/core/domains/explore/chunk-grouping/file-level.js.map +1 -1
- package/build/core/domains/explore/chunk-grouping/file-scope.d.ts +39 -0
- package/build/core/domains/explore/chunk-grouping/file-scope.d.ts.map +1 -0
- package/build/core/domains/explore/chunk-grouping/file-scope.js +85 -0
- package/build/core/domains/explore/chunk-grouping/file-scope.js.map +1 -0
- package/build/core/domains/explore/chunk-grouping/index.d.ts +1 -0
- package/build/core/domains/explore/chunk-grouping/index.d.ts.map +1 -1
- package/build/core/domains/explore/chunk-grouping/index.js +1 -0
- package/build/core/domains/explore/chunk-grouping/index.js.map +1 -1
- package/build/core/domains/explore/chunk-grouping/types.d.ts +8 -0
- package/build/core/domains/explore/chunk-grouping/types.d.ts.map +1 -1
- package/build/core/domains/explore/index.d.ts +1 -1
- package/build/core/domains/explore/index.d.ts.map +1 -1
- package/build/core/domains/explore/index.js +1 -1
- package/build/core/domains/explore/index.js.map +1 -1
- package/build/core/domains/explore/naming-lexicon/casing.d.ts +50 -0
- package/build/core/domains/explore/naming-lexicon/casing.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/casing.js +117 -0
- package/build/core/domains/explore/naming-lexicon/casing.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/generic-names.d.ts +32 -0
- package/build/core/domains/explore/naming-lexicon/generic-names.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/generic-names.js +29 -0
- package/build/core/domains/explore/naming-lexicon/generic-names.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/homonyms.d.ts +36 -0
- package/build/core/domains/explore/naming-lexicon/homonyms.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/homonyms.js +95 -0
- package/build/core/domains/explore/naming-lexicon/homonyms.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/index.d.ts +20 -0
- package/build/core/domains/explore/naming-lexicon/index.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/index.js +11 -0
- package/build/core/domains/explore/naming-lexicon/index.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/name-slots.d.ts +58 -0
- package/build/core/domains/explore/naming-lexicon/name-slots.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/name-slots.js +89 -0
- package/build/core/domains/explore/naming-lexicon/name-slots.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/shapes.d.ts +141 -0
- package/build/core/domains/explore/naming-lexicon/shapes.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/shapes.js +207 -0
- package/build/core/domains/explore/naming-lexicon/shapes.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/term-alignment.d.ts +192 -0
- package/build/core/domains/explore/naming-lexicon/term-alignment.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/term-alignment.js +325 -0
- package/build/core/domains/explore/naming-lexicon/term-alignment.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/terms.d.ts +22 -0
- package/build/core/domains/explore/naming-lexicon/terms.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/terms.js +96 -0
- package/build/core/domains/explore/naming-lexicon/terms.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/type-name-heads.d.ts +42 -0
- package/build/core/domains/explore/naming-lexicon/type-name-heads.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/type-name-heads.js +43 -0
- package/build/core/domains/explore/naming-lexicon/type-name-heads.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/type-roles.d.ts +221 -0
- package/build/core/domains/explore/naming-lexicon/type-roles.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/type-roles.js +661 -0
- package/build/core/domains/explore/naming-lexicon/type-roles.js.map +1 -0
- package/build/core/domains/explore/naming-lexicon/verdicts.d.ts +355 -0
- package/build/core/domains/explore/naming-lexicon/verdicts.d.ts.map +1 -0
- package/build/core/domains/explore/naming-lexicon/verdicts.js +1092 -0
- package/build/core/domains/explore/naming-lexicon/verdicts.js.map +1 -0
- package/build/core/domains/explore/outline-visibility.d.ts +22 -0
- package/build/core/domains/explore/outline-visibility.d.ts.map +1 -0
- package/build/core/domains/explore/outline-visibility.js +41 -0
- package/build/core/domains/explore/outline-visibility.js.map +1 -0
- package/build/core/domains/explore/post-process.d.ts +15 -18
- package/build/core/domains/explore/post-process.d.ts.map +1 -1
- package/build/core/domains/explore/post-process.js +65 -107
- package/build/core/domains/explore/post-process.js.map +1 -1
- package/build/core/domains/explore/rank-module.d.ts +44 -9
- package/build/core/domains/explore/rank-module.d.ts.map +1 -1
- package/build/core/domains/explore/rank-module.js +101 -33
- package/build/core/domains/explore/rank-module.js.map +1 -1
- package/build/core/domains/explore/reranker.d.ts +34 -2
- package/build/core/domains/explore/reranker.d.ts.map +1 -1
- package/build/core/domains/explore/reranker.js +74 -7
- package/build/core/domains/explore/reranker.js.map +1 -1
- package/build/core/domains/explore/split-fragment.d.ts +24 -0
- package/build/core/domains/explore/split-fragment.d.ts.map +1 -0
- package/build/core/domains/explore/split-fragment.js +42 -0
- package/build/core/domains/explore/split-fragment.js.map +1 -0
- package/build/core/domains/explore/strategies/base.d.ts +15 -2
- package/build/core/domains/explore/strategies/base.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/base.js +28 -8
- package/build/core/domains/explore/strategies/base.js.map +1 -1
- package/build/core/domains/explore/strategies/file-outline.d.ts +3 -1
- package/build/core/domains/explore/strategies/file-outline.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/file-outline.js +11 -3
- package/build/core/domains/explore/strategies/file-outline.js.map +1 -1
- package/build/core/domains/explore/strategies/hybrid.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/hybrid.js +14 -2
- package/build/core/domains/explore/strategies/hybrid.js.map +1 -1
- package/build/core/domains/explore/strategies/scroll-rank.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/scroll-rank.js +5 -0
- package/build/core/domains/explore/strategies/scroll-rank.js.map +1 -1
- package/build/core/domains/explore/strategies/symbol.d.ts +7 -5
- package/build/core/domains/explore/strategies/symbol.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/symbol.js +33 -9
- package/build/core/domains/explore/strategies/symbol.js.map +1 -1
- package/build/core/domains/explore/strategies/vector.d.ts.map +1 -1
- package/build/core/domains/explore/strategies/vector.js +3 -4
- package/build/core/domains/explore/strategies/vector.js.map +1 -1
- package/build/core/domains/explore/symbol-resolve.d.ts +11 -4
- package/build/core/domains/explore/symbol-resolve.d.ts.map +1 -1
- package/build/core/domains/explore/symbol-resolve.js +150 -35
- package/build/core/domains/explore/symbol-resolve.js.map +1 -1
- package/build/core/domains/ingest/infra/alias-cleanup.d.ts +14 -4
- package/build/core/domains/ingest/infra/alias-cleanup.d.ts.map +1 -1
- package/build/core/domains/ingest/infra/alias-cleanup.js +42 -32
- package/build/core/domains/ingest/infra/alias-cleanup.js.map +1 -1
- package/build/core/domains/ingest/infra/collection-build-lease.d.ts +10 -2
- package/build/core/domains/ingest/infra/collection-build-lease.d.ts.map +1 -1
- package/build/core/domains/ingest/infra/collection-build-lease.js +21 -14
- package/build/core/domains/ingest/infra/collection-build-lease.js.map +1 -1
- package/build/core/domains/ingest/infra/collection-indexing-lock.d.ts +30 -1
- package/build/core/domains/ingest/infra/collection-indexing-lock.d.ts.map +1 -1
- package/build/core/domains/ingest/infra/collection-indexing-lock.js +36 -5
- package/build/core/domains/ingest/infra/collection-indexing-lock.js.map +1 -1
- package/build/core/domains/ingest/infra/collection-stats.d.ts +2 -0
- package/build/core/domains/ingest/infra/collection-stats.d.ts.map +1 -1
- package/build/core/domains/ingest/infra/collection-stats.js +27 -3
- package/build/core/domains/ingest/infra/collection-stats.js.map +1 -1
- package/build/core/domains/ingest/infra/index.d.ts +1 -1
- package/build/core/domains/ingest/infra/index.d.ts.map +1 -1
- package/build/core/domains/ingest/infra/index.js.map +1 -1
- package/build/core/domains/ingest/operations/indexing.d.ts +7 -0
- package/build/core/domains/ingest/operations/indexing.d.ts.map +1 -1
- package/build/core/domains/ingest/operations/indexing.js +81 -56
- package/build/core/domains/ingest/operations/indexing.js.map +1 -1
- package/build/core/domains/ingest/operations/rechunk-work-set.d.ts +31 -0
- package/build/core/domains/ingest/operations/rechunk-work-set.d.ts.map +1 -0
- package/build/core/domains/ingest/operations/rechunk-work-set.js +66 -0
- package/build/core/domains/ingest/operations/rechunk-work-set.js.map +1 -0
- package/build/core/domains/ingest/operations/reindex-parallel-executor.d.ts +53 -0
- package/build/core/domains/ingest/operations/reindex-parallel-executor.d.ts.map +1 -0
- package/build/core/domains/ingest/operations/reindex-parallel-executor.js +208 -0
- package/build/core/domains/ingest/operations/reindex-parallel-executor.js.map +1 -0
- package/build/core/domains/ingest/operations/reindexing.d.ts +50 -29
- package/build/core/domains/ingest/operations/reindexing.d.ts.map +1 -1
- package/build/core/domains/ingest/operations/reindexing.js +165 -231
- package/build/core/domains/ingest/operations/reindexing.js.map +1 -1
- package/build/core/domains/ingest/pipeline/base.d.ts +45 -1
- package/build/core/domains/ingest/pipeline/base.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/base.js +32 -6
- package/build/core/domains/ingest/pipeline/base.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/ast-symbol-splitter.d.ts +81 -0
- package/build/core/domains/ingest/pipeline/chunker/ast-symbol-splitter.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/ast-symbol-splitter.js +217 -0
- package/build/core/domains/ingest/pipeline/chunker/ast-symbol-splitter.js.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/character.d.ts +30 -6
- package/build/core/domains/ingest/pipeline/chunker/character.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/character.js +166 -74
- package/build/core/domains/ingest/pipeline/chunker/character.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/chunk-navigation.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/chunk-navigation.js +26 -7
- package/build/core/domains/ingest/pipeline/chunker/chunk-navigation.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/config.d.ts +2 -0
- package/build/core/domains/ingest/pipeline/chunker/config.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/config.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/container-remainder.d.ts +67 -0
- package/build/core/domains/ingest/pipeline/chunker/container-remainder.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/container-remainder.js +135 -0
- package/build/core/domains/ingest/pipeline/chunker/container-remainder.js.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/hooks/types.d.ts +2 -4
- package/build/core/domains/ingest/pipeline/chunker/hooks/types.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/hooks/types.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/infra/cross-pass-extraction.d.ts +52 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/cross-pass-extraction.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/cross-pass-extraction.js +45 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/cross-pass-extraction.js.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/pool.d.ts +6 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/pool.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/infra/pool.js +6 -1
- package/build/core/domains/ingest/pipeline/chunker/infra/pool.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/infra/worker-protocol.d.ts +4 -0
- package/build/core/domains/ingest/pipeline/chunker/infra/worker-protocol.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/infra/worker.js +13 -25
- package/build/core/domains/ingest/pipeline/chunker/infra/worker.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/markdown-chunker.d.ts +19 -0
- package/build/core/domains/ingest/pipeline/chunker/markdown-chunker.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/markdown-chunker.js +97 -10
- package/build/core/domains/ingest/pipeline/chunker/markdown-chunker.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/nesting-line-splitter.d.ts +74 -0
- package/build/core/domains/ingest/pipeline/chunker/nesting-line-splitter.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/nesting-line-splitter.js +156 -0
- package/build/core/domains/ingest/pipeline/chunker/nesting-line-splitter.js.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/tree-sitter.d.ts +164 -24
- package/build/core/domains/ingest/pipeline/chunker/tree-sitter.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/tree-sitter.js +509 -187
- package/build/core/domains/ingest/pipeline/chunker/tree-sitter.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/utils/import-extractor.d.ts +6 -0
- package/build/core/domains/ingest/pipeline/chunker/utils/import-extractor.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/utils/import-extractor.js +34 -13
- package/build/core/domains/ingest/pipeline/chunker/utils/import-extractor.js.map +1 -1
- package/build/core/domains/ingest/pipeline/chunker/utils/non-code-text-mask.d.ts +28 -0
- package/build/core/domains/ingest/pipeline/chunker/utils/non-code-text-mask.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/chunker/utils/non-code-text-mask.js +230 -0
- package/build/core/domains/ingest/pipeline/chunker/utils/non-code-text-mask.js.map +1 -0
- package/build/core/domains/ingest/pipeline/enrichment/applier.d.ts +4 -3
- package/build/core/domains/ingest/pipeline/enrichment/applier.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/applier.js +20 -4
- package/build/core/domains/ingest/pipeline/enrichment/applier.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/backfiller.d.ts +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/backfiller.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/backfiller.js +17 -14
- package/build/core/domains/ingest/pipeline/enrichment/backfiller.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/chunk-phase.d.ts +7 -7
- package/build/core/domains/ingest/pipeline/enrichment/chunk-phase.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/chunk-phase.js +28 -26
- package/build/core/domains/ingest/pipeline/enrichment/chunk-phase.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/codegraph-payload-heal.d.ts +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/codegraph-payload-heal.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/completion-runner.d.ts +93 -20
- package/build/core/domains/ingest/pipeline/enrichment/completion-runner.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js +159 -63
- package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/coordinator.d.ts +104 -15
- package/build/core/domains/ingest/pipeline/enrichment/coordinator.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/coordinator.js +328 -62
- package/build/core/domains/ingest/pipeline/enrichment/coordinator.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/executor/worker-pool.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/executor/worker-pool.js +31 -29
- package/build/core/domains/ingest/pipeline/enrichment/executor/worker-pool.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts +13 -3
- package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/file-phase.js +46 -14
- package/build/core/domains/ingest/pipeline/enrichment/file-phase.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/infra/chunked-heap-profiler.d.ts +93 -0
- package/build/core/domains/ingest/pipeline/enrichment/infra/chunked-heap-profiler.d.ts.map +1 -0
- package/build/core/domains/ingest/pipeline/enrichment/infra/chunked-heap-profiler.js +205 -0
- package/build/core/domains/ingest/pipeline/enrichment/infra/chunked-heap-profiler.js.map +1 -0
- package/build/core/domains/ingest/pipeline/enrichment/infra/heap-ceiling-enforcement.d.ts +28 -9
- package/build/core/domains/ingest/pipeline/enrichment/infra/heap-ceiling-enforcement.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/infra/heap-ceiling-enforcement.js +24 -11
- package/build/core/domains/ingest/pipeline/enrichment/infra/heap-ceiling-enforcement.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/infra/worker.js +10 -0
- package/build/core/domains/ingest/pipeline/enrichment/infra/worker.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/marker-store.d.ts +13 -0
- package/build/core/domains/ingest/pipeline/enrichment/marker-store.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/marker-store.js +23 -0
- package/build/core/domains/ingest/pipeline/enrichment/marker-store.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/policy.d.ts +37 -7
- package/build/core/domains/ingest/pipeline/enrichment/policy.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/policy.js +46 -10
- package/build/core/domains/ingest/pipeline/enrichment/policy.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/recovery.d.ts +3 -3
- package/build/core/domains/ingest/pipeline/enrichment/recovery.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/recovery.js +31 -20
- package/build/core/domains/ingest/pipeline/enrichment/recovery.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/run-spec.d.ts +9 -0
- package/build/core/domains/ingest/pipeline/enrichment/run-spec.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/run-spec.js.map +1 -1
- package/build/core/domains/ingest/pipeline/enrichment/types.d.ts +2 -0
- package/build/core/domains/ingest/pipeline/enrichment/types.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/file-ingestor.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/file-ingestor.js +7 -2
- package/build/core/domains/ingest/pipeline/file-ingestor.js.map +1 -1
- package/build/core/domains/ingest/pipeline/infra/pool-defaults.d.ts +7 -0
- package/build/core/domains/ingest/pipeline/infra/pool-defaults.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/infra/pool-defaults.js +7 -0
- package/build/core/domains/ingest/pipeline/infra/pool-defaults.js.map +1 -1
- package/build/core/domains/ingest/pipeline/status-module.d.ts +23 -1
- package/build/core/domains/ingest/pipeline/status-module.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/status-module.js +89 -55
- package/build/core/domains/ingest/pipeline/status-module.js.map +1 -1
- package/build/core/domains/ingest/pipeline/types.d.ts +2 -0
- package/build/core/domains/ingest/pipeline/types.d.ts.map +1 -1
- package/build/core/domains/ingest/pipeline/types.js.map +1 -1
- package/build/core/domains/ingest/sync/parallel-synchronizer.d.ts +45 -1
- package/build/core/domains/ingest/sync/parallel-synchronizer.d.ts.map +1 -1
- package/build/core/domains/ingest/sync/parallel-synchronizer.js +72 -1
- package/build/core/domains/ingest/sync/parallel-synchronizer.js.map +1 -1
- package/build/core/domains/language/bash/capability.d.ts.map +1 -1
- package/build/core/domains/language/bash/capability.js +36 -2
- package/build/core/domains/language/bash/capability.js.map +1 -1
- package/build/core/domains/language/bash/chunking/classifier.d.ts +18 -0
- package/build/core/domains/language/bash/chunking/classifier.d.ts.map +1 -0
- package/build/core/domains/language/bash/chunking/classifier.js +6 -0
- package/build/core/domains/language/bash/chunking/classifier.js.map +1 -0
- package/build/core/domains/language/bash/chunking/index.d.ts +2 -0
- package/build/core/domains/language/bash/chunking/index.d.ts.map +1 -0
- package/build/core/domains/language/bash/chunking/index.js +2 -0
- package/build/core/domains/language/bash/chunking/index.js.map +1 -0
- package/build/core/domains/language/bash/index.d.ts +2 -3
- package/build/core/domains/language/bash/index.d.ts.map +1 -1
- package/build/core/domains/language/bash/index.js +8 -6
- package/build/core/domains/language/bash/index.js.map +1 -1
- package/build/core/domains/language/bash/kernel.d.ts.map +1 -1
- package/build/core/domains/language/bash/kernel.js +1 -0
- package/build/core/domains/language/bash/kernel.js.map +1 -1
- package/build/core/domains/language/bash/resolver/strategies/bash-global-short-name.d.ts.map +1 -1
- package/build/core/domains/language/bash/resolver/strategies/bash-global-short-name.js +4 -1
- package/build/core/domains/language/bash/resolver/strategies/bash-global-short-name.js.map +1 -1
- package/build/core/domains/language/bash/walker/passes/identifier-declarations.d.ts +17 -0
- package/build/core/domains/language/bash/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/bash/walker/passes/identifier-declarations.js +94 -0
- package/build/core/domains/language/bash/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/bash/walker/passes.d.ts +8 -5
- package/build/core/domains/language/bash/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/bash/walker/passes.js +12 -5
- package/build/core/domains/language/bash/walker/passes.js.map +1 -1
- package/build/core/domains/language/bash/walker/symbol-kind.d.ts +22 -0
- package/build/core/domains/language/bash/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/bash/walker/symbol-kind.js +23 -0
- package/build/core/domains/language/bash/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/bash/walker/walker.d.ts +14 -1
- package/build/core/domains/language/bash/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/bash/walker/walker.js +75 -29
- package/build/core/domains/language/bash/walker/walker.js.map +1 -1
- package/build/core/domains/language/capability/fallback.d.ts +6 -3
- package/build/core/domains/language/capability/fallback.d.ts.map +1 -1
- package/build/core/domains/language/capability/fallback.js +17 -12
- package/build/core/domains/language/capability/fallback.js.map +1 -1
- package/build/core/domains/language/capability/native.d.ts +18 -0
- package/build/core/domains/language/capability/native.d.ts.map +1 -0
- package/build/core/domains/language/capability/native.js +53 -0
- package/build/core/domains/language/capability/native.js.map +1 -0
- package/build/core/domains/language/capability/resolve.d.ts +10 -0
- package/build/core/domains/language/capability/resolve.d.ts.map +1 -0
- package/build/core/domains/language/capability/resolve.js +14 -0
- package/build/core/domains/language/capability/resolve.js.map +1 -0
- package/build/core/domains/language/capability/rule.d.ts.map +1 -1
- package/build/core/domains/language/capability/rule.js +12 -7
- package/build/core/domains/language/capability/rule.js.map +1 -1
- package/build/core/domains/language/capability/test-files.d.ts +34 -0
- package/build/core/domains/language/capability/test-files.d.ts.map +1 -0
- package/build/core/domains/language/capability/test-files.js +57 -0
- package/build/core/domains/language/capability/test-files.js.map +1 -0
- package/build/core/domains/language/capability/version-axes.d.ts +6 -1
- package/build/core/domains/language/capability/version-axes.d.ts.map +1 -1
- package/build/core/domains/language/capability/version-axes.js +36 -4
- package/build/core/domains/language/capability/version-axes.js.map +1 -1
- package/build/core/domains/language/capability/version-pins.js +1 -1
- package/build/core/domains/language/capability/version-pins.js.map +1 -1
- package/build/core/domains/language/capability/versions.d.ts +9 -0
- package/build/core/domains/language/capability/versions.d.ts.map +1 -1
- package/build/core/domains/language/capability/versions.js +21 -1
- package/build/core/domains/language/capability/versions.js.map +1 -1
- package/build/core/domains/language/cone-dispatch.d.ts.map +1 -1
- package/build/core/domains/language/cone-dispatch.js +9 -2
- package/build/core/domains/language/cone-dispatch.js.map +1 -1
- package/build/core/domains/language/errors.d.ts +11 -1
- package/build/core/domains/language/errors.d.ts.map +1 -1
- package/build/core/domains/language/errors.js +17 -0
- package/build/core/domains/language/errors.js.map +1 -1
- package/build/core/domains/language/factory.d.ts +14 -0
- package/build/core/domains/language/factory.d.ts.map +1 -1
- package/build/core/domains/language/factory.js +38 -23
- package/build/core/domains/language/factory.js.map +1 -1
- package/build/core/domains/language/go/capability.d.ts.map +1 -1
- package/build/core/domains/language/go/capability.js +64 -1
- package/build/core/domains/language/go/capability.js.map +1 -1
- package/build/core/domains/language/go/index.d.ts.map +1 -1
- package/build/core/domains/language/go/index.js +1 -2
- package/build/core/domains/language/go/index.js.map +1 -1
- package/build/core/domains/language/go/kernel.d.ts.map +1 -1
- package/build/core/domains/language/go/kernel.js +1 -0
- package/build/core/domains/language/go/kernel.js.map +1 -1
- package/build/core/domains/language/go/local-scope.d.ts.map +1 -1
- package/build/core/domains/language/go/local-scope.js +4 -3
- package/build/core/domains/language/go/local-scope.js.map +1 -1
- package/build/core/domains/language/go/resolver/go-build-constraints.d.ts.map +1 -1
- package/build/core/domains/language/go/resolver/go-build-constraints.js +2 -1
- package/build/core/domains/language/go/resolver/go-build-constraints.js.map +1 -1
- package/build/core/domains/language/go/resolver/go-symbol-lookup.d.ts +4 -3
- package/build/core/domains/language/go/resolver/go-symbol-lookup.d.ts.map +1 -1
- package/build/core/domains/language/go/resolver/go-symbol-lookup.js +15 -3
- package/build/core/domains/language/go/resolver/go-symbol-lookup.js.map +1 -1
- package/build/core/domains/language/go/resolver/receiver-type-ports.d.ts +1 -1
- package/build/core/domains/language/go/resolver/receiver-type-ports.d.ts.map +1 -1
- package/build/core/domains/language/go/resolver/receiver-type-ports.js +1 -1
- package/build/core/domains/language/go/resolver/receiver-type-ports.js.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-generic-instantiation.d.ts.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-generic-instantiation.js +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-generic-instantiation.js.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-global-short-name.js +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-global-short-name.js.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-receiver-chain.js +1 -1
- package/build/core/domains/language/go/resolver/strategies/go-receiver-chain.js.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/go/resolver/strategies/shared.js +9 -4
- package/build/core/domains/language/go/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/go/test-files.d.ts +4 -0
- package/build/core/domains/language/go/test-files.d.ts.map +1 -0
- package/build/core/domains/language/go/test-files.js +5 -0
- package/build/core/domains/language/go/test-files.js.map +1 -0
- package/build/core/domains/language/go/walker/passes/declared-visibility.d.ts +22 -0
- package/build/core/domains/language/go/walker/passes/declared-visibility.d.ts.map +1 -0
- package/build/core/domains/language/go/walker/passes/declared-visibility.js +30 -0
- package/build/core/domains/language/go/walker/passes/declared-visibility.js.map +1 -0
- package/build/core/domains/language/go/walker/passes/identifier-declarations.d.ts +28 -0
- package/build/core/domains/language/go/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/go/walker/passes/identifier-declarations.js +165 -0
- package/build/core/domains/language/go/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/go/walker/passes/struct-field-types.d.ts +1 -1
- package/build/core/domains/language/go/walker/passes/struct-field-types.d.ts.map +1 -1
- package/build/core/domains/language/go/walker/passes/struct-field-types.js +3 -2
- package/build/core/domains/language/go/walker/passes/struct-field-types.js.map +1 -1
- package/build/core/domains/language/go/walker/passes/type-abstractness.d.ts +11 -0
- package/build/core/domains/language/go/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/go/walker/passes/type-abstractness.js +21 -0
- package/build/core/domains/language/go/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/go/walker/passes.d.ts +6 -1
- package/build/core/domains/language/go/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/go/walker/passes.js +15 -1
- package/build/core/domains/language/go/walker/passes.js.map +1 -1
- package/build/core/domains/language/go/walker/symbol-kind.d.ts +29 -0
- package/build/core/domains/language/go/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/go/walker/symbol-kind.js +37 -0
- package/build/core/domains/language/go/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/go/walker/type-declarations.d.ts +29 -0
- package/build/core/domains/language/go/walker/type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/go/walker/type-declarations.js +72 -0
- package/build/core/domains/language/go/walker/type-declarations.js.map +1 -0
- package/build/core/domains/language/go/walker/walker.d.ts +16 -1
- package/build/core/domains/language/go/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/go/walker/walker.js +92 -16
- package/build/core/domains/language/go/walker/walker.js.map +1 -1
- package/build/core/domains/language/import-file-edges.d.ts +7 -1
- package/build/core/domains/language/import-file-edges.d.ts.map +1 -1
- package/build/core/domains/language/import-file-edges.js +14 -4
- package/build/core/domains/language/import-file-edges.js.map +1 -1
- package/build/core/domains/language/index.d.ts +3 -3
- package/build/core/domains/language/index.d.ts.map +1 -1
- package/build/core/domains/language/index.js +3 -3
- package/build/core/domains/language/index.js.map +1 -1
- package/build/core/domains/language/java/capability.d.ts.map +1 -1
- package/build/core/domains/language/java/capability.js +80 -2
- package/build/core/domains/language/java/capability.js.map +1 -1
- package/build/core/domains/language/java/index.d.ts.map +1 -1
- package/build/core/domains/language/java/index.js +5 -2
- package/build/core/domains/language/java/index.js.map +1 -1
- package/build/core/domains/language/java/kernel.d.ts.map +1 -1
- package/build/core/domains/language/java/kernel.js +1 -0
- package/build/core/domains/language/java/kernel.js.map +1 -1
- package/build/core/domains/language/java/resolver/java-import-file-mapper.d.ts +38 -0
- package/build/core/domains/language/java/resolver/java-import-file-mapper.d.ts.map +1 -0
- package/build/core/domains/language/java/resolver/java-import-file-mapper.js +76 -0
- package/build/core/domains/language/java/resolver/java-import-file-mapper.js.map +1 -0
- package/build/core/domains/language/java/resolver/java-resolver.d.ts +15 -1
- package/build/core/domains/language/java/resolver/java-resolver.d.ts.map +1 -1
- package/build/core/domains/language/java/resolver/java-resolver.js +27 -1
- package/build/core/domains/language/java/resolver/java-resolver.js.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-field-type.d.ts.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-field-type.js +2 -1
- package/build/core/domains/language/java/resolver/strategies/java-field-type.js.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-global-short-name.d.ts.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-global-short-name.js +4 -1
- package/build/core/domains/language/java/resolver/strategies/java-global-short-name.js.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-import-receiver.d.ts +18 -13
- package/build/core/domains/language/java/resolver/strategies/java-import-receiver.d.ts.map +1 -1
- package/build/core/domains/language/java/resolver/strategies/java-import-receiver.js +32 -36
- package/build/core/domains/language/java/resolver/strategies/java-import-receiver.js.map +1 -1
- package/build/core/domains/language/java/test-files.d.ts +8 -0
- package/build/core/domains/language/java/test-files.d.ts.map +1 -0
- package/build/core/domains/language/java/test-files.js +9 -0
- package/build/core/domains/language/java/test-files.js.map +1 -0
- package/build/core/domains/language/java/walker/name-of.js +1 -1
- package/build/core/domains/language/java/walker/name-of.js.map +1 -1
- package/build/core/domains/language/java/walker/passes/declared-visibility.d.ts +22 -0
- package/build/core/domains/language/java/walker/passes/declared-visibility.d.ts.map +1 -0
- package/build/core/domains/language/java/walker/passes/declared-visibility.js +37 -0
- package/build/core/domains/language/java/walker/passes/declared-visibility.js.map +1 -0
- package/build/core/domains/language/java/walker/passes/identifier-declarations.d.ts +28 -0
- package/build/core/domains/language/java/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/java/walker/passes/identifier-declarations.js +165 -0
- package/build/core/domains/language/java/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/java/walker/passes/type-abstractness.d.ts +9 -0
- package/build/core/domains/language/java/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/java/walker/passes/type-abstractness.js +25 -0
- package/build/core/domains/language/java/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/java/walker/passes.d.ts +9 -5
- package/build/core/domains/language/java/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/java/walker/passes.js +17 -5
- package/build/core/domains/language/java/walker/passes.js.map +1 -1
- package/build/core/domains/language/java/walker/symbol-kind.d.ts +25 -0
- package/build/core/domains/language/java/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/java/walker/symbol-kind.js +40 -0
- package/build/core/domains/language/java/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/java/walker/type-declarations.d.ts +32 -0
- package/build/core/domains/language/java/walker/type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/java/walker/type-declarations.js +86 -0
- package/build/core/domains/language/java/walker/type-declarations.js.map +1 -0
- package/build/core/domains/language/java/walker/walker.d.ts +14 -1
- package/build/core/domains/language/java/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/java/walker/walker.js +127 -16
- package/build/core/domains/language/java/walker/walker.js.map +1 -1
- package/build/core/domains/language/javascript/capability.d.ts.map +1 -1
- package/build/core/domains/language/javascript/capability.js +84 -3
- package/build/core/domains/language/javascript/capability.js.map +1 -1
- package/build/core/domains/language/javascript/chunking/assignment-filter.d.ts.map +1 -1
- package/build/core/domains/language/javascript/chunking/assignment-filter.js +6 -2
- package/build/core/domains/language/javascript/chunking/assignment-filter.js.map +1 -1
- package/build/core/domains/language/javascript/chunking/index.d.ts +0 -1
- package/build/core/domains/language/javascript/chunking/index.d.ts.map +1 -1
- package/build/core/domains/language/javascript/chunking/test-dsl-filter.d.ts +35 -5
- package/build/core/domains/language/javascript/chunking/test-dsl-filter.d.ts.map +1 -1
- package/build/core/domains/language/javascript/chunking/test-dsl-filter.js +150 -17
- package/build/core/domains/language/javascript/chunking/test-dsl-filter.js.map +1 -1
- package/build/core/domains/language/javascript/chunking/test-scope-chunker.d.ts +28 -32
- package/build/core/domains/language/javascript/chunking/test-scope-chunker.d.ts.map +1 -1
- package/build/core/domains/language/javascript/chunking/test-scope-chunker.js +76 -209
- package/build/core/domains/language/javascript/chunking/test-scope-chunker.js.map +1 -1
- package/build/core/domains/language/javascript/index.d.ts.map +1 -1
- package/build/core/domains/language/javascript/index.js +5 -1
- package/build/core/domains/language/javascript/index.js.map +1 -1
- package/build/core/domains/language/javascript/kernel.d.ts.map +1 -1
- package/build/core/domains/language/javascript/kernel.js +1 -0
- package/build/core/domains/language/javascript/kernel.js.map +1 -1
- package/build/core/domains/language/javascript/resolver/javascript-resolver.d.ts +13 -1
- package/build/core/domains/language/javascript/resolver/javascript-resolver.d.ts.map +1 -1
- package/build/core/domains/language/javascript/resolver/javascript-resolver.js +28 -8
- package/build/core/domains/language/javascript/resolver/javascript-resolver.js.map +1 -1
- package/build/core/domains/language/javascript/resolver/javascript-table-dispatch.d.ts +51 -0
- package/build/core/domains/language/javascript/resolver/javascript-table-dispatch.d.ts.map +1 -0
- package/build/core/domains/language/javascript/resolver/javascript-table-dispatch.js +157 -0
- package/build/core/domains/language/javascript/resolver/javascript-table-dispatch.js.map +1 -0
- package/build/core/domains/language/javascript/test-files.d.ts +4 -0
- package/build/core/domains/language/javascript/test-files.d.ts.map +1 -0
- package/build/core/domains/language/javascript/test-files.js +14 -0
- package/build/core/domains/language/javascript/test-files.js.map +1 -0
- package/build/core/domains/language/javascript/walker/dispatch-tables.d.ts +79 -0
- package/build/core/domains/language/javascript/walker/dispatch-tables.d.ts.map +1 -0
- package/build/core/domains/language/javascript/walker/dispatch-tables.js +364 -0
- package/build/core/domains/language/javascript/walker/dispatch-tables.js.map +1 -0
- package/build/core/domains/language/javascript/walker/passes/identifier-declarations.d.ts +11 -0
- package/build/core/domains/language/javascript/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/javascript/walker/passes/identifier-declarations.js +28 -0
- package/build/core/domains/language/javascript/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/javascript/walker/passes/type-abstractness.d.ts +9 -0
- package/build/core/domains/language/javascript/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/javascript/walker/passes/type-abstractness.js +9 -0
- package/build/core/domains/language/javascript/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/javascript/walker/passes.d.ts +17 -5
- package/build/core/domains/language/javascript/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/javascript/walker/passes.js +30 -5
- package/build/core/domains/language/javascript/walker/passes.js.map +1 -1
- package/build/core/domains/language/javascript/walker/walker.d.ts +21 -1
- package/build/core/domains/language/javascript/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/javascript/walker/walker.js +153 -60
- package/build/core/domains/language/javascript/walker/walker.js.map +1 -1
- package/build/core/domains/language/kernel/call-derived-file-edges.d.ts +23 -0
- package/build/core/domains/language/kernel/call-derived-file-edges.d.ts.map +1 -0
- package/build/core/domains/language/kernel/call-derived-file-edges.js +31 -0
- package/build/core/domains/language/kernel/call-derived-file-edges.js.map +1 -0
- package/build/core/domains/language/kernel/capability.d.ts +55 -0
- package/build/core/domains/language/kernel/capability.d.ts.map +1 -1
- package/build/core/domains/language/kernel/capability.js +68 -2
- package/build/core/domains/language/kernel/capability.js.map +1 -1
- package/build/core/domains/language/kernel/collect-symbols.d.ts.map +1 -1
- package/build/core/domains/language/kernel/collect-symbols.js +4 -0
- package/build/core/domains/language/kernel/collect-symbols.js.map +1 -1
- package/build/core/domains/language/kernel/declared-visibility-pass.d.ts +41 -0
- package/build/core/domains/language/kernel/declared-visibility-pass.d.ts.map +1 -0
- package/build/core/domains/language/kernel/declared-visibility-pass.js +58 -0
- package/build/core/domains/language/kernel/declared-visibility-pass.js.map +1 -0
- package/build/core/domains/language/kernel/dispatch-cascade.d.ts +6 -4
- package/build/core/domains/language/kernel/dispatch-cascade.d.ts.map +1 -1
- package/build/core/domains/language/kernel/dispatch-cascade.js +7 -5
- package/build/core/domains/language/kernel/dispatch-cascade.js.map +1 -1
- package/build/core/domains/language/kernel/dispatch-narrowing.d.ts +35 -4
- package/build/core/domains/language/kernel/dispatch-narrowing.d.ts.map +1 -1
- package/build/core/domains/language/kernel/dispatch-narrowing.js +54 -4
- package/build/core/domains/language/kernel/dispatch-narrowing.js.map +1 -1
- package/build/core/domains/language/kernel/fanout-policy.d.ts +30 -1
- package/build/core/domains/language/kernel/fanout-policy.d.ts.map +1 -1
- package/build/core/domains/language/kernel/fanout-policy.js +77 -3
- package/build/core/domains/language/kernel/fanout-policy.js.map +1 -1
- package/build/core/domains/language/kernel/identifier-declarations.d.ts +118 -0
- package/build/core/domains/language/kernel/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/kernel/identifier-declarations.js +206 -0
- package/build/core/domains/language/kernel/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/kernel/index.d.ts +36 -0
- package/build/core/domains/language/kernel/index.d.ts.map +1 -0
- package/build/core/domains/language/kernel/index.js +35 -0
- package/build/core/domains/language/kernel/index.js.map +1 -0
- package/build/core/domains/language/kernel/merge-extraction.d.ts.map +1 -1
- package/build/core/domains/language/kernel/merge-extraction.js +9 -0
- package/build/core/domains/language/kernel/merge-extraction.js.map +1 -1
- package/build/core/domains/language/kernel/receiver-type-propagation.d.ts +22 -0
- package/build/core/domains/language/kernel/receiver-type-propagation.d.ts.map +1 -1
- package/build/core/domains/language/kernel/receiver-type-propagation.js +37 -1
- package/build/core/domains/language/kernel/receiver-type-propagation.js.map +1 -1
- package/build/core/domains/language/kernel/structural-conformance.d.ts +40 -0
- package/build/core/domains/language/kernel/structural-conformance.d.ts.map +1 -0
- package/build/core/domains/language/kernel/structural-conformance.js +314 -0
- package/build/core/domains/language/kernel/structural-conformance.js.map +1 -0
- package/build/core/domains/language/kernel/symbol-id.d.ts +13 -0
- package/build/core/domains/language/kernel/symbol-id.d.ts.map +1 -1
- package/build/core/domains/language/kernel/symbol-id.js +25 -0
- package/build/core/domains/language/kernel/symbol-id.js.map +1 -1
- package/build/core/domains/language/kernel/symbol-kind-roles.d.ts +29 -0
- package/build/core/domains/language/kernel/symbol-kind-roles.d.ts.map +1 -0
- package/build/core/domains/language/kernel/symbol-kind-roles.js +24 -0
- package/build/core/domains/language/kernel/symbol-kind-roles.js.map +1 -0
- package/build/core/domains/language/kernel/test-scope-chunks.d.ts +40 -0
- package/build/core/domains/language/kernel/test-scope-chunks.d.ts.map +1 -0
- package/build/core/domains/language/kernel/test-scope-chunks.js +151 -0
- package/build/core/domains/language/kernel/test-scope-chunks.js.map +1 -0
- package/build/core/domains/language/kernel/type-abstractness-pass.d.ts +34 -0
- package/build/core/domains/language/kernel/type-abstractness-pass.d.ts.map +1 -0
- package/build/core/domains/language/kernel/type-abstractness-pass.js +44 -0
- package/build/core/domains/language/kernel/type-abstractness-pass.js.map +1 -0
- package/build/core/domains/language/kernel/type-fact-store.d.ts +0 -19
- package/build/core/domains/language/kernel/type-fact-store.d.ts.map +1 -1
- package/build/core/domains/language/kernel/type-fact-store.js +25 -5
- package/build/core/domains/language/kernel/type-fact-store.js.map +1 -1
- package/build/core/domains/language/markdown/capability.d.ts.map +1 -1
- package/build/core/domains/language/markdown/capability.js +10 -1
- package/build/core/domains/language/markdown/capability.js.map +1 -1
- package/build/core/domains/language/python/capability.d.ts.map +1 -1
- package/build/core/domains/language/python/capability.js +93 -3
- package/build/core/domains/language/python/capability.js.map +1 -1
- package/build/core/domains/language/python/index.d.ts +7 -1
- package/build/core/domains/language/python/index.d.ts.map +1 -1
- package/build/core/domains/language/python/index.js +36 -19
- package/build/core/domains/language/python/index.js.map +1 -1
- package/build/core/domains/language/python/kernel.d.ts.map +1 -1
- package/build/core/domains/language/python/kernel.js +1 -0
- package/build/core/domains/language/python/kernel.js.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/index.d.ts +1 -0
- package/build/core/domains/language/python/resolver/dispatch/index.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/index.js +1 -0
- package/build/core/domains/language/python/resolver/dispatch/index.js.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-gates.js +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-gates.js.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-policy.d.ts +10 -0
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-policy.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-policy.js +15 -0
- package/build/core/domains/language/python/resolver/dispatch/python-dispatch-policy.js.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dynamic-dispatch.d.ts +12 -8
- package/build/core/domains/language/python/resolver/dispatch/python-dynamic-dispatch.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-dynamic-dispatch.js +17 -13
- package/build/core/domains/language/python/resolver/dispatch/python-dynamic-dispatch.js.map +1 -1
- package/build/core/domains/language/python/resolver/dispatch/python-table-dispatch.d.ts +60 -0
- package/build/core/domains/language/python/resolver/dispatch/python-table-dispatch.d.ts.map +1 -0
- package/build/core/domains/language/python/resolver/dispatch/python-table-dispatch.js +170 -0
- package/build/core/domains/language/python/resolver/dispatch/python-table-dispatch.js.map +1 -0
- package/build/core/domains/language/python/resolver/python-ancestor-policy.d.ts +1 -1
- package/build/core/domains/language/python/resolver/python-ancestor-policy.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/python-ancestor-policy.js +5 -6
- package/build/core/domains/language/python/resolver/python-ancestor-policy.js.map +1 -1
- package/build/core/domains/language/python/resolver/python-external-definition-probe.js +1 -1
- package/build/core/domains/language/python/resolver/python-external-definition-probe.js.map +1 -1
- package/build/core/domains/language/python/resolver/python-external-vocabulary.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/python-external-vocabulary.js +2 -1
- package/build/core/domains/language/python/resolver/python-external-vocabulary.js.map +1 -1
- package/build/core/domains/language/python/resolver/python-import-file-mapper.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/python-import-file-mapper.js +4 -3
- package/build/core/domains/language/python/resolver/python-import-file-mapper.js.map +1 -1
- package/build/core/domains/language/python/resolver/python-receiver-type-ports.d.ts +1 -1
- package/build/core/domains/language/python/resolver/python-receiver-type-ports.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/python-receiver-type-ports.js +3 -2
- package/build/core/domains/language/python/resolver/python-receiver-type-ports.js.map +1 -1
- package/build/core/domains/language/python/resolver/python-resolver.d.ts +21 -3
- package/build/core/domains/language/python/resolver/python-resolver.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/python-resolver.js +28 -6
- package/build/core/domains/language/python/resolver/python-resolver.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-chain-type.js +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-chain-type.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-cone-type-locator.js +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-cone-type-locator.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-global-short-name.js +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-global-short-name.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-imported-name.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-imported-name.js +6 -6
- package/build/core/domains/language/python/resolver/strategies/python-imported-name.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-naming-convention.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-naming-convention.js +1 -2
- package/build/core/domains/language/python/resolver/strategies/python-naming-convention.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-super.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/python-super.js +4 -3
- package/build/core/domains/language/python/resolver/strategies/python-super.js.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/shared.d.ts +20 -4
- package/build/core/domains/language/python/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/python/resolver/strategies/shared.js +36 -15
- package/build/core/domains/language/python/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/python/test-files.d.ts +4 -0
- package/build/core/domains/language/python/test-files.d.ts.map +1 -0
- package/build/core/domains/language/python/test-files.js +5 -0
- package/build/core/domains/language/python/test-files.js.map +1 -0
- package/build/core/domains/language/python/walker/inert-file-extraction.d.ts +22 -0
- package/build/core/domains/language/python/walker/inert-file-extraction.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/inert-file-extraction.js +28 -0
- package/build/core/domains/language/python/walker/inert-file-extraction.js.map +1 -0
- package/build/core/domains/language/python/walker/passes/annotation-type-facts.d.ts +1 -2
- package/build/core/domains/language/python/walker/passes/annotation-type-facts.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/annotation-type-facts.js +1 -1
- package/build/core/domains/language/python/walker/passes/annotation-type-facts.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/identifier-declarations.d.ts +23 -0
- package/build/core/domains/language/python/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/passes/identifier-declarations.js +160 -0
- package/build/core/domains/language/python/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/python/walker/passes/python-annotation-type-source.d.ts +1 -1
- package/build/core/domains/language/python/walker/passes/python-annotation-type-source.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-ast-type-source.d.ts +1 -1
- package/build/core/domains/language/python/walker/passes/python-ast-type-source.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-ast-type-source.js +1 -1
- package/build/core/domains/language/python/walker/passes/python-ast-type-source.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-class-body-fields.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-class-body-fields.js +3 -2
- package/build/core/domains/language/python/walker/passes/python-class-body-fields.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-def-signatures.d.ts +24 -6
- package/build/core/domains/language/python/walker/passes/python-def-signatures.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-def-signatures.js +24 -9
- package/build/core/domains/language/python/walker/passes/python-def-signatures.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-dispatch-tables.d.ts +101 -0
- package/build/core/domains/language/python/walker/passes/python-dispatch-tables.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/passes/python-dispatch-tables.js +373 -0
- package/build/core/domains/language/python/walker/passes/python-dispatch-tables.js.map +1 -0
- package/build/core/domains/language/python/walker/passes/python-docstring-type-source.d.ts +1 -1
- package/build/core/domains/language/python/walker/passes/python-docstring-type-source.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-iteration-facts.d.ts +1 -1
- package/build/core/domains/language/python/walker/passes/python-iteration-facts.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-type-annotation.js +1 -1
- package/build/core/domains/language/python/walker/passes/python-type-annotation.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-type-channels.d.ts +1 -27
- package/build/core/domains/language/python/walker/passes/python-type-channels.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes/python-type-channels.js +31 -4
- package/build/core/domains/language/python/walker/passes/python-type-channels.js.map +1 -1
- package/build/core/domains/language/python/walker/passes/type-abstractness.d.ts +30 -0
- package/build/core/domains/language/python/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/passes/type-abstractness.js +77 -0
- package/build/core/domains/language/python/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/python/walker/passes.d.ts +1 -1
- package/build/core/domains/language/python/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/passes.js +8 -1
- package/build/core/domains/language/python/walker/passes.js.map +1 -1
- package/build/core/domains/language/python/walker/python-structural-contracts.d.ts +22 -0
- package/build/core/domains/language/python/walker/python-structural-contracts.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/python-structural-contracts.js +71 -0
- package/build/core/domains/language/python/walker/python-structural-contracts.js.map +1 -0
- package/build/core/domains/language/python/walker/symbol-kind.d.ts +28 -0
- package/build/core/domains/language/python/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/symbol-kind.js +39 -0
- package/build/core/domains/language/python/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/python/walker/type-declarations.d.ts +47 -0
- package/build/core/domains/language/python/walker/type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/python/walker/type-declarations.js +229 -0
- package/build/core/domains/language/python/walker/type-declarations.js.map +1 -0
- package/build/core/domains/language/python/walker/walker.d.ts +19 -1
- package/build/core/domains/language/python/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/python/walker/walker.js +142 -40
- package/build/core/domains/language/python/walker/walker.js.map +1 -1
- package/build/core/domains/language/ruby/capability.d.ts.map +1 -1
- package/build/core/domains/language/ruby/capability.js +113 -2
- package/build/core/domains/language/ruby/capability.js.map +1 -1
- package/build/core/domains/language/ruby/chunking/class-body-chunker.d.ts +2 -4
- package/build/core/domains/language/ruby/chunking/class-body-chunker.d.ts.map +1 -1
- package/build/core/domains/language/ruby/chunking/class-body-chunker.js +6 -1
- package/build/core/domains/language/ruby/chunking/class-body-chunker.js.map +1 -1
- package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.d.ts +20 -23
- package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.d.ts.map +1 -1
- package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js +25 -174
- package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js.map +1 -1
- package/build/core/domains/language/ruby/dsl/catalogue.d.ts.map +1 -1
- package/build/core/domains/language/ruby/dsl/catalogue.js +4 -3
- package/build/core/domains/language/ruby/dsl/catalogue.js.map +1 -1
- package/build/core/domains/language/ruby/identifier-finder-methods.d.ts +12 -0
- package/build/core/domains/language/ruby/identifier-finder-methods.d.ts.map +1 -0
- package/build/core/domains/language/ruby/identifier-finder-methods.js +24 -0
- package/build/core/domains/language/ruby/identifier-finder-methods.js.map +1 -0
- package/build/core/domains/language/ruby/index.d.ts +2 -0
- package/build/core/domains/language/ruby/index.d.ts.map +1 -1
- package/build/core/domains/language/ruby/index.js +8 -2
- package/build/core/domains/language/ruby/index.js.map +1 -1
- package/build/core/domains/language/ruby/kernel.d.ts.map +1 -1
- package/build/core/domains/language/ruby/kernel.js +1 -0
- package/build/core/domains/language/ruby/kernel.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ancestor-linearization.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/ancestor-linearization.js +5 -4
- package/build/core/domains/language/ruby/resolver/ancestor-linearization.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-active-record-return-types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-active-record-return-types.js +2 -1
- package/build/core/domains/language/ruby/resolver/ruby-active-record-return-types.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-bound-call-return-types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-bound-call-return-types.js +4 -3
- package/build/core/domains/language/ruby/resolver/ruby-bound-call-return-types.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-member-return-types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-member-return-types.js +2 -1
- package/build/core/domains/language/ruby/resolver/ruby-member-return-types.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-resolver.d.ts +8 -0
- package/build/core/domains/language/ruby/resolver/ruby-resolver.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-resolver.js +11 -0
- package/build/core/domains/language/ruby/resolver/ruby-resolver.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-return-facts.js +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-return-facts.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-unbound-receiver-types.js +1 -1
- package/build/core/domains/language/ruby/resolver/ruby-unbound-receiver-types.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/short-name-lookup.d.ts +27 -4
- package/build/core/domains/language/ruby/resolver/short-name-lookup.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/short-name-lookup.js +36 -3
- package/build/core/domains/language/ruby/resolver/short-name-lookup.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-bare-call.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-bare-call.js +3 -2
- package/build/core/domains/language/ruby/resolver/strategies/ruby-bare-call.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-cone-type-locator.js +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-cone-type-locator.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-constant.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-constant.js +9 -6
- package/build/core/domains/language/ruby/resolver/strategies/ruby-constant.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-dynamic-dispatch.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-dynamic-dispatch.js +11 -4
- package/build/core/domains/language/ruby/resolver/strategies/ruby-dynamic-dispatch.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-explicit-require.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-explicit-require.js +2 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-explicit-require.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-schema-column.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-schema-column.js +4 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-schema-column.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-self-dispatch-entry.d.ts +32 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-self-dispatch-entry.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-self-dispatch-entry.js +67 -2
- package/build/core/domains/language/ruby/resolver/strategies/ruby-self-dispatch-entry.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-super.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-super.js +2 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-super.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-table-dispatch.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/ruby-table-dispatch.js +3 -2
- package/build/core/domains/language/ruby/resolver/strategies/ruby-table-dispatch.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/shared.d.ts +8 -0
- package/build/core/domains/language/ruby/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/strategies/shared.js +38 -18
- package/build/core/domains/language/ruby/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/template-redirect.js +1 -17
- package/build/core/domains/language/ruby/resolver/template-redirect.js.map +1 -1
- package/build/core/domains/language/ruby/resolver/type-propagation.d.ts +2 -2
- package/build/core/domains/language/ruby/resolver/type-propagation.d.ts.map +1 -1
- package/build/core/domains/language/ruby/resolver/type-propagation.js +5 -3
- package/build/core/domains/language/ruby/resolver/type-propagation.js.map +1 -1
- package/build/core/domains/language/ruby/test-files.d.ts +4 -0
- package/build/core/domains/language/ruby/test-files.d.ts.map +1 -0
- package/build/core/domains/language/ruby/test-files.js +5 -0
- package/build/core/domains/language/ruby/test-files.js.map +1 -0
- package/build/core/domains/language/ruby/type-ref.d.ts +1 -1
- package/build/core/domains/language/ruby/type-ref.d.ts.map +1 -1
- package/build/core/domains/language/ruby/type-ref.js +1 -1
- package/build/core/domains/language/ruby/type-ref.js.map +1 -1
- package/build/core/domains/language/ruby/walker/association-types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/association-types.js +3 -2
- package/build/core/domains/language/ruby/walker/association-types.js.map +1 -1
- package/build/core/domains/language/ruby/walker/ast-utils.d.ts +9 -0
- package/build/core/domains/language/ruby/walker/ast-utils.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/ast-utils.js +18 -0
- package/build/core/domains/language/ruby/walker/ast-utils.js.map +1 -1
- package/build/core/domains/language/ruby/walker/bare-call-detection.d.ts +1 -1
- package/build/core/domains/language/ruby/walker/bare-call-detection.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/bare-call-detection.js +8 -7
- package/build/core/domains/language/ruby/walker/bare-call-detection.js.map +1 -1
- package/build/core/domains/language/ruby/walker/call-collection.d.ts +16 -0
- package/build/core/domains/language/ruby/walker/call-collection.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/call-collection.js +76 -9
- package/build/core/domains/language/ruby/walker/call-collection.js.map +1 -1
- package/build/core/domains/language/ruby/walker/chunk-extractions.d.ts +7 -1
- package/build/core/domains/language/ruby/walker/chunk-extractions.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/chunk-extractions.js +10 -2
- package/build/core/domains/language/ruby/walker/chunk-extractions.js.map +1 -1
- package/build/core/domains/language/ruby/walker/class-hierarchy.d.ts +38 -7
- package/build/core/domains/language/ruby/walker/class-hierarchy.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/class-hierarchy.js +126 -30
- package/build/core/domains/language/ruby/walker/class-hierarchy.js.map +1 -1
- package/build/core/domains/language/ruby/walker/constant-refs.d.ts +1 -1
- package/build/core/domains/language/ruby/walker/constant-refs.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/constant-refs.js +5 -4
- package/build/core/domains/language/ruby/walker/constant-refs.js.map +1 -1
- package/build/core/domains/language/ruby/walker/local-bindings.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/local-bindings.js +7 -6
- package/build/core/domains/language/ruby/walker/local-bindings.js.map +1 -1
- package/build/core/domains/language/ruby/walker/method-signatures.d.ts +27 -1
- package/build/core/domains/language/ruby/walker/method-signatures.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/method-signatures.js +104 -0
- package/build/core/domains/language/ruby/walker/method-signatures.js.map +1 -1
- package/build/core/domains/language/ruby/walker/param-arg-types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/param-arg-types.js +2 -1
- package/build/core/domains/language/ruby/walker/param-arg-types.js.map +1 -1
- package/build/core/domains/language/ruby/walker/passes/identifier-declarations.d.ts +15 -0
- package/build/core/domains/language/ruby/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/ruby/walker/passes/identifier-declarations.js +72 -0
- package/build/core/domains/language/ruby/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/ruby/walker/passes/type-abstractness.d.ts +21 -0
- package/build/core/domains/language/ruby/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/ruby/walker/passes/type-abstractness.js +45 -0
- package/build/core/domains/language/ruby/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/ruby/walker/passes.d.ts +5 -4
- package/build/core/domains/language/ruby/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/passes.js +11 -4
- package/build/core/domains/language/ruby/walker/passes.js.map +1 -1
- package/build/core/domains/language/ruby/walker/registry-dispatch.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/registry-dispatch.js +3 -2
- package/build/core/domains/language/ruby/walker/registry-dispatch.js.map +1 -1
- package/build/core/domains/language/ruby/walker/symbol-kind.d.ts +67 -0
- package/build/core/domains/language/ruby/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/ruby/walker/symbol-kind.js +111 -0
- package/build/core/domains/language/ruby/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/ruby/walker/type-fact-store.d.ts +1 -2
- package/build/core/domains/language/ruby/walker/type-fact-store.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/type-fact-store.js +1 -1
- package/build/core/domains/language/ruby/walker/type-fact-store.js.map +1 -1
- package/build/core/domains/language/ruby/walker/type-member-census.d.ts +48 -0
- package/build/core/domains/language/ruby/walker/type-member-census.d.ts.map +1 -0
- package/build/core/domains/language/ruby/walker/type-member-census.js +101 -0
- package/build/core/domains/language/ruby/walker/type-member-census.js.map +1 -0
- package/build/core/domains/language/ruby/walker/type-sources/ast-inference.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/ast-inference.js +36 -10
- package/build/core/domains/language/ruby/walker/type-sources/ast-inference.js.map +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/body-last-expr.js +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/body-last-expr.js.map +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/types.d.ts +2 -2
- package/build/core/domains/language/ruby/walker/type-sources/types.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/yard.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/type-sources/yard.js +28 -7
- package/build/core/domains/language/ruby/walker/type-sources/yard.js.map +1 -1
- package/build/core/domains/language/ruby/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/ruby/walker/walker.js +10 -3
- package/build/core/domains/language/ruby/walker/walker.js.map +1 -1
- package/build/core/domains/language/rust/associated-constructor.d.ts +25 -0
- package/build/core/domains/language/rust/associated-constructor.d.ts.map +1 -0
- package/build/core/domains/language/rust/associated-constructor.js +29 -0
- package/build/core/domains/language/rust/associated-constructor.js.map +1 -0
- package/build/core/domains/language/rust/capability.d.ts.map +1 -1
- package/build/core/domains/language/rust/capability.js +71 -2
- package/build/core/domains/language/rust/capability.js.map +1 -1
- package/build/core/domains/language/rust/index.js +1 -1
- package/build/core/domains/language/rust/index.js.map +1 -1
- package/build/core/domains/language/rust/kernel.d.ts.map +1 -1
- package/build/core/domains/language/rust/kernel.js +1 -0
- package/build/core/domains/language/rust/kernel.js.map +1 -1
- package/build/core/domains/language/rust/resolver/rust-resolver.d.ts +8 -3
- package/build/core/domains/language/rust/resolver/rust-resolver.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/rust-resolver.js +10 -4
- package/build/core/domains/language/rust/resolver/rust-resolver.js.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/index.d.ts +1 -0
- package/build/core/domains/language/rust/resolver/strategies/index.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/index.js +1 -0
- package/build/core/domains/language/rust/resolver/strategies/index.js.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-global-short-name.d.ts +4 -0
- package/build/core/domains/language/rust/resolver/strategies/rust-global-short-name.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-global-short-name.js +8 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-global-short-name.js.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-import-match.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-import-match.js +2 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-import-match.js.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-self-field.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-self-field.js +2 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-self-field.js.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/rust-type-receiver.d.ts +32 -0
- package/build/core/domains/language/rust/resolver/strategies/rust-type-receiver.d.ts.map +1 -0
- package/build/core/domains/language/rust/resolver/strategies/rust-type-receiver.js +104 -0
- package/build/core/domains/language/rust/resolver/strategies/rust-type-receiver.js.map +1 -0
- package/build/core/domains/language/rust/resolver/strategies/shared.d.ts +9 -0
- package/build/core/domains/language/rust/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/rust/resolver/strategies/shared.js +11 -0
- package/build/core/domains/language/rust/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/rust/test-files.d.ts +8 -0
- package/build/core/domains/language/rust/test-files.d.ts.map +1 -0
- package/build/core/domains/language/rust/test-files.js +9 -0
- package/build/core/domains/language/rust/test-files.js.map +1 -0
- package/build/core/domains/language/rust/walker/name-of.js +1 -1
- package/build/core/domains/language/rust/walker/name-of.js.map +1 -1
- package/build/core/domains/language/rust/walker/passes/declared-visibility.d.ts +22 -0
- package/build/core/domains/language/rust/walker/passes/declared-visibility.d.ts.map +1 -0
- package/build/core/domains/language/rust/walker/passes/declared-visibility.js +45 -0
- package/build/core/domains/language/rust/walker/passes/declared-visibility.js.map +1 -0
- package/build/core/domains/language/rust/walker/passes/identifier-declarations.d.ts +29 -0
- package/build/core/domains/language/rust/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/rust/walker/passes/identifier-declarations.js +275 -0
- package/build/core/domains/language/rust/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/rust/walker/passes/type-abstractness.d.ts +8 -0
- package/build/core/domains/language/rust/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/rust/walker/passes/type-abstractness.js +13 -0
- package/build/core/domains/language/rust/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/rust/walker/passes.d.ts +9 -5
- package/build/core/domains/language/rust/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/rust/walker/passes.js +17 -5
- package/build/core/domains/language/rust/walker/passes.js.map +1 -1
- package/build/core/domains/language/rust/walker/symbol-kind.d.ts +38 -0
- package/build/core/domains/language/rust/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/rust/walker/symbol-kind.js +56 -0
- package/build/core/domains/language/rust/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/rust/walker/type-declarations.d.ts +40 -0
- package/build/core/domains/language/rust/walker/type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/rust/walker/type-declarations.js +98 -0
- package/build/core/domains/language/rust/walker/type-declarations.js.map +1 -0
- package/build/core/domains/language/rust/walker/walker.d.ts +22 -1
- package/build/core/domains/language/rust/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/rust/walker/walker.js +103 -72
- package/build/core/domains/language/rust/walker/walker.js.map +1 -1
- package/build/core/domains/language/shared/ecmascript-export-names.d.ts +37 -0
- package/build/core/domains/language/shared/ecmascript-export-names.d.ts.map +1 -0
- package/build/core/domains/language/shared/ecmascript-export-names.js +102 -0
- package/build/core/domains/language/shared/ecmascript-export-names.js.map +1 -0
- package/build/core/domains/language/shared/ecmascript-symbol-lookup.d.ts +16 -3
- package/build/core/domains/language/shared/ecmascript-symbol-lookup.d.ts.map +1 -1
- package/build/core/domains/language/shared/ecmascript-symbol-lookup.js +29 -3
- package/build/core/domains/language/shared/ecmascript-symbol-lookup.js.map +1 -1
- package/build/core/domains/language/swift/capability.d.ts.map +1 -1
- package/build/core/domains/language/swift/capability.js +667 -3
- package/build/core/domains/language/swift/capability.js.map +1 -1
- package/build/core/domains/language/swift/chunking/index.d.ts +9 -10
- package/build/core/domains/language/swift/chunking/index.d.ts.map +1 -1
- package/build/core/domains/language/swift/chunking/index.js +11 -14
- package/build/core/domains/language/swift/chunking/index.js.map +1 -1
- package/build/core/domains/language/swift/chunking/quick-scope-chunker.d.ts +23 -14
- package/build/core/domains/language/swift/chunking/quick-scope-chunker.d.ts.map +1 -1
- package/build/core/domains/language/swift/chunking/quick-scope-chunker.js +38 -20
- package/build/core/domains/language/swift/chunking/quick-scope-chunker.js.map +1 -1
- package/build/core/domains/language/swift/chunking/suite-recognition.d.ts +9 -3
- package/build/core/domains/language/swift/chunking/suite-recognition.d.ts.map +1 -1
- package/build/core/domains/language/swift/chunking/suite-recognition.js +10 -3
- package/build/core/domains/language/swift/chunking/suite-recognition.js.map +1 -1
- package/build/core/domains/language/swift/index.d.ts.map +1 -1
- package/build/core/domains/language/swift/index.js +6 -2
- package/build/core/domains/language/swift/index.js.map +1 -1
- package/build/core/domains/language/swift/kernel.d.ts.map +1 -1
- package/build/core/domains/language/swift/kernel.js +1 -0
- package/build/core/domains/language/swift/kernel.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/index.d.ts +2 -1
- package/build/core/domains/language/swift/resolver/strategies/index.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/index.js +2 -1
- package/build/core/domains/language/swift/resolver/strategies/index.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/shared.d.ts +44 -13
- package/build/core/domains/language/swift/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/shared.js +70 -31
- package/build/core/domains/language/swift/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-chained-receiver-type.d.ts +0 -72
- package/build/core/domains/language/swift/resolver/strategies/swift-chained-receiver-type.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-chained-receiver-type.js +24 -19
- package/build/core/domains/language/swift/resolver/strategies/swift-chained-receiver-type.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-enclosing-bare-call.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-enclosing-bare-call.js +2 -2
- package/build/core/domains/language/swift/resolver/strategies/swift-enclosing-bare-call.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-extension-scope-member.d.ts +6 -3
- package/build/core/domains/language/swift/resolver/strategies/swift-extension-scope-member.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-extension-scope-member.js +30 -8
- package/build/core/domains/language/swift/resolver/strategies/swift-extension-scope-member.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-global-short-name.d.ts +15 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-global-short-name.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-global-short-name.js +62 -6
- package/build/core/domains/language/swift/resolver/strategies/swift-global-short-name.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-local-binding.d.ts +17 -9
- package/build/core/domains/language/swift/resolver/strategies/swift-local-binding.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-local-binding.js +25 -13
- package/build/core/domains/language/swift/resolver/strategies/swift-local-binding.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-module-value.d.ts +41 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-module-value.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-module-value.js +55 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-module-value.js.map +1 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-scoped-type-receiver.d.ts +16 -9
- package/build/core/domains/language/swift/resolver/strategies/swift-scoped-type-receiver.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-scoped-type-receiver.js +21 -11
- package/build/core/domains/language/swift/resolver/strategies/swift-scoped-type-receiver.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-self-member.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-self-member.js +14 -4
- package/build/core/domains/language/swift/resolver/strategies/swift-self-member.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-stored-property-type.d.ts +2 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-stored-property-type.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-stored-property-type.js +11 -4
- package/build/core/domains/language/swift/resolver/strategies/swift-stored-property-type.js.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-super.d.ts +9 -0
- package/build/core/domains/language/swift/resolver/strategies/swift-super.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/strategies/swift-super.js +27 -6
- package/build/core/domains/language/swift/resolver/strategies/swift-super.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-ancestor-policy.d.ts +23 -1
- package/build/core/domains/language/swift/resolver/swift-ancestor-policy.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-ancestor-policy.js +54 -1
- package/build/core/domains/language/swift/resolver/swift-ancestor-policy.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-argument-types.d.ts +36 -0
- package/build/core/domains/language/swift/resolver/swift-argument-types.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-argument-types.js +151 -0
- package/build/core/domains/language/swift/resolver/swift-argument-types.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-enclosing-scope.d.ts +32 -0
- package/build/core/domains/language/swift/resolver/swift-enclosing-scope.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-enclosing-scope.js +51 -0
- package/build/core/domains/language/swift/resolver/swift-enclosing-scope.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-lexical-reach.d.ts +49 -0
- package/build/core/domains/language/swift/resolver/swift-lexical-reach.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-lexical-reach.js +118 -0
- package/build/core/domains/language/swift/resolver/swift-lexical-reach.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-member-type-lookup.d.ts +214 -4
- package/build/core/domains/language/swift/resolver/swift-member-type-lookup.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-member-type-lookup.js +450 -8
- package/build/core/domains/language/swift/resolver/swift-member-type-lookup.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-module-values.d.ts +42 -0
- package/build/core/domains/language/swift/resolver/swift-module-values.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-module-values.js +117 -0
- package/build/core/domains/language/swift/resolver/swift-module-values.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-receiver-type-ports.d.ts +78 -15
- package/build/core/domains/language/swift/resolver/swift-receiver-type-ports.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-receiver-type-ports.js +1099 -65
- package/build/core/domains/language/swift/resolver/swift-receiver-type-ports.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-resolver.d.ts +126 -29
- package/build/core/domains/language/swift/resolver/swift-resolver.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-resolver.js +330 -34
- package/build/core/domains/language/swift/resolver/swift-resolver.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-sdk-member-types.d.ts +150 -0
- package/build/core/domains/language/swift/resolver/swift-sdk-member-types.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-sdk-member-types.js +352 -0
- package/build/core/domains/language/swift/resolver/swift-sdk-member-types.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-symbol-lookup.d.ts +82 -2
- package/build/core/domains/language/swift/resolver/swift-symbol-lookup.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-symbol-lookup.js +223 -3
- package/build/core/domains/language/swift/resolver/swift-symbol-lookup.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-type-declarations.d.ts +116 -0
- package/build/core/domains/language/swift/resolver/swift-type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-type-declarations.js +412 -0
- package/build/core/domains/language/swift/resolver/swift-type-declarations.js.map +1 -0
- package/build/core/domains/language/swift/resolver/swift-type-field-index.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-type-field-index.js +5 -4
- package/build/core/domains/language/swift/resolver/swift-type-field-index.js.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-type-name.d.ts.map +1 -1
- package/build/core/domains/language/swift/resolver/swift-type-name.js +3 -1
- package/build/core/domains/language/swift/resolver/swift-type-name.js.map +1 -1
- package/build/core/domains/language/swift/test-files.d.ts +9 -0
- package/build/core/domains/language/swift/test-files.d.ts.map +1 -0
- package/build/core/domains/language/swift/test-files.js +10 -0
- package/build/core/domains/language/swift/test-files.js.map +1 -0
- package/build/core/domains/language/swift/type-field-address.d.ts +11 -0
- package/build/core/domains/language/swift/type-field-address.d.ts.map +1 -1
- package/build/core/domains/language/swift/type-field-address.js +15 -0
- package/build/core/domains/language/swift/type-field-address.js.map +1 -1
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.d.ts +121 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.d.ts.map +1 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.generated.d.ts +20 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.generated.d.ts.map +1 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.generated.js +20 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.generated.js.map +1 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.js +202 -0
- package/build/core/domains/language/swift/vocabulary/sdk-vocabulary.js.map +1 -0
- package/build/core/domains/language/swift/vocabulary/swift-type-text.d.ts +55 -0
- package/build/core/domains/language/swift/vocabulary/swift-type-text.d.ts.map +1 -0
- package/build/core/domains/language/swift/vocabulary/swift-type-text.js +285 -0
- package/build/core/domains/language/swift/vocabulary/swift-type-text.js.map +1 -0
- package/build/core/domains/language/swift/walker/name-of.d.ts +5 -1
- package/build/core/domains/language/swift/walker/name-of.d.ts.map +1 -1
- package/build/core/domains/language/swift/walker/name-of.js +7 -3
- package/build/core/domains/language/swift/walker/name-of.js.map +1 -1
- package/build/core/domains/language/swift/walker/passes/declared-visibility.d.ts +28 -0
- package/build/core/domains/language/swift/walker/passes/declared-visibility.d.ts.map +1 -0
- package/build/core/domains/language/swift/walker/passes/declared-visibility.js +38 -0
- package/build/core/domains/language/swift/walker/passes/declared-visibility.js.map +1 -0
- package/build/core/domains/language/swift/walker/passes/identifier-declarations.d.ts +30 -0
- package/build/core/domains/language/swift/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/swift/walker/passes/identifier-declarations.js +225 -0
- package/build/core/domains/language/swift/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/swift/walker/passes/module-values.d.ts +27 -0
- package/build/core/domains/language/swift/walker/passes/module-values.d.ts.map +1 -0
- package/build/core/domains/language/swift/walker/passes/module-values.js +55 -0
- package/build/core/domains/language/swift/walker/passes/module-values.js.map +1 -0
- package/build/core/domains/language/swift/walker/passes/type-abstractness.d.ts +9 -0
- package/build/core/domains/language/swift/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/swift/walker/passes/type-abstractness.js +15 -0
- package/build/core/domains/language/swift/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/swift/walker/passes.d.ts +12 -5
- package/build/core/domains/language/swift/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/swift/walker/passes.js +22 -5
- package/build/core/domains/language/swift/walker/passes.js.map +1 -1
- package/build/core/domains/language/swift/walker/symbol-kind.d.ts +37 -0
- package/build/core/domains/language/swift/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/swift/walker/symbol-kind.js +63 -0
- package/build/core/domains/language/swift/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/swift/walker/walker.d.ts +65 -13
- package/build/core/domains/language/swift/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/swift/walker/walker.js +2331 -162
- package/build/core/domains/language/swift/walker/walker.js.map +1 -1
- package/build/core/domains/language/typescript/capability.d.ts.map +1 -1
- package/build/core/domains/language/typescript/capability.js +143 -2
- package/build/core/domains/language/typescript/capability.js.map +1 -1
- package/build/core/domains/language/typescript/chunking/class-body-chunker.d.ts +3 -0
- package/build/core/domains/language/typescript/chunking/class-body-chunker.d.ts.map +1 -1
- package/build/core/domains/language/typescript/chunking/class-body-chunker.js +38 -10
- package/build/core/domains/language/typescript/chunking/class-body-chunker.js.map +1 -1
- package/build/core/domains/language/typescript/chunking/function-declaration-filter.d.ts +15 -12
- package/build/core/domains/language/typescript/chunking/function-declaration-filter.d.ts.map +1 -1
- package/build/core/domains/language/typescript/chunking/function-declaration-filter.js +22 -13
- package/build/core/domains/language/typescript/chunking/function-declaration-filter.js.map +1 -1
- package/build/core/domains/language/typescript/chunking/import-specifiers.d.ts +23 -0
- package/build/core/domains/language/typescript/chunking/import-specifiers.d.ts.map +1 -0
- package/build/core/domains/language/typescript/chunking/import-specifiers.js +57 -0
- package/build/core/domains/language/typescript/chunking/import-specifiers.js.map +1 -0
- package/build/core/domains/language/typescript/chunking/index.d.ts +1 -0
- package/build/core/domains/language/typescript/chunking/index.d.ts.map +1 -1
- package/build/core/domains/language/typescript/chunking/index.js +1 -0
- package/build/core/domains/language/typescript/chunking/index.js.map +1 -1
- package/build/core/domains/language/typescript/chunking/test-dsl-filter.d.ts +35 -5
- package/build/core/domains/language/typescript/chunking/test-dsl-filter.d.ts.map +1 -1
- package/build/core/domains/language/typescript/chunking/test-dsl-filter.js +150 -17
- package/build/core/domains/language/typescript/chunking/test-dsl-filter.js.map +1 -1
- package/build/core/domains/language/typescript/chunking/test-scope-chunker.d.ts +26 -30
- package/build/core/domains/language/typescript/chunking/test-scope-chunker.d.ts.map +1 -1
- package/build/core/domains/language/typescript/chunking/test-scope-chunker.js +74 -207
- package/build/core/domains/language/typescript/chunking/test-scope-chunker.js.map +1 -1
- package/build/core/domains/language/typescript/index.d.ts +10 -4
- package/build/core/domains/language/typescript/index.d.ts.map +1 -1
- package/build/core/domains/language/typescript/index.js +26 -11
- package/build/core/domains/language/typescript/index.js.map +1 -1
- package/build/core/domains/language/typescript/kernel.d.ts +4 -5
- package/build/core/domains/language/typescript/kernel.d.ts.map +1 -1
- package/build/core/domains/language/typescript/kernel.js +13 -9
- package/build/core/domains/language/typescript/kernel.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/index.d.ts +1 -0
- package/build/core/domains/language/typescript/resolver/strategies/index.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/index.js +1 -0
- package/build/core/domains/language/typescript/resolver/strategies/index.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/shared.d.ts +6 -2
- package/build/core/domains/language/typescript/resolver/strategies/shared.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/shared.js +8 -4
- package/build/core/domains/language/typescript/resolver/strategies/shared.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-call-result-callee.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-call-result-callee.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-cone-type-locator.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-cone-type-locator.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-field-type.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-field-type.js +2 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-field-type.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-global-short-name.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-global-short-name.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-import-basename.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-import-basename.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-import-basename.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-import-narrowed-fallback.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-import-narrowed-fallback.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-imported-callee.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-imported-callee.js +4 -3
- package/build/core/domains/language/typescript/resolver/strategies/ts-imported-callee.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-lexical-callee.d.ts +55 -0
- package/build/core/domains/language/typescript/resolver/strategies/ts-lexical-callee.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/strategies/ts-lexical-callee.js +86 -0
- package/build/core/domains/language/typescript/resolver/strategies/ts-lexical-callee.js.map +1 -0
- package/build/core/domains/language/typescript/resolver/strategies/ts-named-import.d.ts +12 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-named-import.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-named-import.js +19 -5
- package/build/core/domains/language/typescript/resolver/strategies/ts-named-import.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-receiver-symbol.js +2 -2
- package/build/core/domains/language/typescript/resolver/strategies/ts-receiver-symbol.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-same-file.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-same-file.js +3 -3
- package/build/core/domains/language/typescript/resolver/strategies/ts-same-file.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-super.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-super.js +5 -4
- package/build/core/domains/language/typescript/resolver/strategies/ts-super.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-this-member.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-this-member.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-fallback.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-fallback.js +10 -3
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-fallback.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-jsx-component.d.ts +8 -0
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-jsx-component.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-jsx-component.js +14 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-jsx-component.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-return-type-inference.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-return-type-inference.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-structural-typing.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-structural-typing.js +3 -2
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-structural-typing.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-union-receiver.js +1 -1
- package/build/core/domains/language/typescript/resolver/strategies/ts-type-checker-union-receiver.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-external-call.d.ts +4 -1
- package/build/core/domains/language/typescript/resolver/ts-external-call.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-external-call.js +32 -6
- package/build/core/domains/language/typescript/resolver/ts-external-call.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-interface-receiver.d.ts +13 -11
- package/build/core/domains/language/typescript/resolver/ts-interface-receiver.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-interface-receiver.js +41 -17
- package/build/core/domains/language/typescript/resolver/ts-interface-receiver.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-local-callee.d.ts +34 -0
- package/build/core/domains/language/typescript/resolver/ts-local-callee.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-local-callee.js +58 -1
- package/build/core/domains/language/typescript/resolver/ts-local-callee.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-local-receiver.js +1 -1
- package/build/core/domains/language/typescript/resolver/ts-local-receiver.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-module-resolution-memo.d.ts +51 -0
- package/build/core/domains/language/typescript/resolver/ts-module-resolution-memo.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-module-resolution-memo.js +78 -0
- package/build/core/domains/language/typescript/resolver/ts-module-resolution-memo.js.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-parsed-source-lru.d.ts +46 -0
- package/build/core/domains/language/typescript/resolver/ts-parsed-source-lru.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-parsed-source-lru.js +98 -0
- package/build/core/domains/language/typescript/resolver/ts-parsed-source-lru.js.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-program-batch-planner.d.ts +97 -0
- package/build/core/domains/language/typescript/resolver/ts-program-batch-planner.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-program-batch-planner.js +319 -0
- package/build/core/domains/language/typescript/resolver/ts-program-batch-planner.js.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-program-cache.d.ts +223 -162
- package/build/core/domains/language/typescript/resolver/ts-program-cache.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-program-cache.js +455 -220
- package/build/core/domains/language/typescript/resolver/ts-program-cache.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-program-heap-admission.d.ts +95 -95
- package/build/core/domains/language/typescript/resolver/ts-program-heap-admission.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-program-heap-admission.js +103 -113
- package/build/core/domains/language/typescript/resolver/ts-program-heap-admission.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-program-import-graph.d.ts +60 -0
- package/build/core/domains/language/typescript/resolver/ts-program-import-graph.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-program-import-graph.js +246 -0
- package/build/core/domains/language/typescript/resolver/ts-program-import-graph.js.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-receiver-member-evidence.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-receiver-member-evidence.js +93 -12
- package/build/core/domains/language/typescript/resolver/ts-receiver-member-evidence.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-resolver.d.ts +60 -7
- package/build/core/domains/language/typescript/resolver/ts-resolver.d.ts.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-resolver.js +129 -35
- package/build/core/domains/language/typescript/resolver/ts-resolver.js.map +1 -1
- package/build/core/domains/language/typescript/resolver/ts-walker-scope.d.ts +37 -0
- package/build/core/domains/language/typescript/resolver/ts-walker-scope.d.ts.map +1 -0
- package/build/core/domains/language/typescript/resolver/ts-walker-scope.js +147 -0
- package/build/core/domains/language/typescript/resolver/ts-walker-scope.js.map +1 -0
- package/build/core/domains/language/typescript/test-files.d.ts +8 -0
- package/build/core/domains/language/typescript/test-files.d.ts.map +1 -0
- package/build/core/domains/language/typescript/test-files.js +18 -0
- package/build/core/domains/language/typescript/test-files.js.map +1 -0
- package/build/core/domains/language/typescript/walker/name-of.d.ts.map +1 -1
- package/build/core/domains/language/typescript/walker/name-of.js +15 -1
- package/build/core/domains/language/typescript/walker/name-of.js.map +1 -1
- package/build/core/domains/language/typescript/walker/passes/declared-visibility.d.ts +24 -0
- package/build/core/domains/language/typescript/walker/passes/declared-visibility.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/declared-visibility.js +43 -0
- package/build/core/domains/language/typescript/walker/passes/declared-visibility.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/identifier-declarations.d.ts +45 -0
- package/build/core/domains/language/typescript/walker/passes/identifier-declarations.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/identifier-declarations.js +256 -0
- package/build/core/domains/language/typescript/walker/passes/identifier-declarations.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/symbol-kind.d.ts +26 -0
- package/build/core/domains/language/typescript/walker/passes/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/symbol-kind.js +95 -0
- package/build/core/domains/language/typescript/walker/passes/symbol-kind.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-abstractness.d.ts +40 -0
- package/build/core/domains/language/typescript/walker/passes/type-abstractness.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-abstractness.js +92 -0
- package/build/core/domains/language/typescript/walker/passes/type-abstractness.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-declarations.d.ts +48 -0
- package/build/core/domains/language/typescript/walker/passes/type-declarations.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-declarations.js +217 -0
- package/build/core/domains/language/typescript/walker/passes/type-declarations.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-member-census.d.ts +34 -0
- package/build/core/domains/language/typescript/walker/passes/type-member-census.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/passes/type-member-census.js +130 -0
- package/build/core/domains/language/typescript/walker/passes/type-member-census.js.map +1 -0
- package/build/core/domains/language/typescript/walker/passes.d.ts +15 -5
- package/build/core/domains/language/typescript/walker/passes.d.ts.map +1 -1
- package/build/core/domains/language/typescript/walker/passes.js +28 -5
- package/build/core/domains/language/typescript/walker/passes.js.map +1 -1
- package/build/core/domains/language/typescript/walker/structural-contracts.d.ts +55 -0
- package/build/core/domains/language/typescript/walker/structural-contracts.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/structural-contracts.js +298 -0
- package/build/core/domains/language/typescript/walker/structural-contracts.js.map +1 -0
- package/build/core/domains/language/typescript/walker/symbol-kind.d.ts +36 -0
- package/build/core/domains/language/typescript/walker/symbol-kind.d.ts.map +1 -0
- package/build/core/domains/language/typescript/walker/symbol-kind.js +67 -0
- package/build/core/domains/language/typescript/walker/symbol-kind.js.map +1 -0
- package/build/core/domains/language/typescript/walker/walker.d.ts +16 -1
- package/build/core/domains/language/typescript/walker/walker.d.ts.map +1 -1
- package/build/core/domains/language/typescript/walker/walker.js +188 -57
- package/build/core/domains/language/typescript/walker/walker.js.map +1 -1
- package/build/core/domains/maintenance/drift/chunk-set-scope.d.ts +53 -0
- package/build/core/domains/maintenance/drift/chunk-set-scope.d.ts.map +1 -0
- package/build/core/domains/maintenance/drift/chunk-set-scope.js +139 -0
- package/build/core/domains/maintenance/drift/chunk-set-scope.js.map +1 -0
- package/build/core/domains/maintenance/drift/index.d.ts +2 -1
- package/build/core/domains/maintenance/drift/index.d.ts.map +1 -1
- package/build/core/domains/maintenance/drift/index.js +2 -1
- package/build/core/domains/maintenance/drift/index.js.map +1 -1
- package/build/core/domains/maintenance/drift/language-version-drift-monitor.d.ts +19 -2
- package/build/core/domains/maintenance/drift/language-version-drift-monitor.d.ts.map +1 -1
- package/build/core/domains/maintenance/drift/language-version-drift-monitor.js +27 -5
- package/build/core/domains/maintenance/drift/language-version-drift-monitor.js.map +1 -1
- package/build/core/domains/maintenance/drift/remedy.d.ts +26 -7
- package/build/core/domains/maintenance/drift/remedy.d.ts.map +1 -1
- package/build/core/domains/maintenance/drift/remedy.js +62 -16
- package/build/core/domains/maintenance/drift/remedy.js.map +1 -1
- package/build/core/domains/maintenance/footprint/purger.d.ts +1 -1
- package/build/core/domains/maintenance/footprint/purger.d.ts.map +1 -1
- package/build/core/domains/maintenance/footprint/purger.js +27 -18
- package/build/core/domains/maintenance/footprint/purger.js.map +1 -1
- package/build/core/domains/maintenance/migration/adapters/index-store-adapter.d.ts +5 -2
- package/build/core/domains/maintenance/migration/adapters/index-store-adapter.d.ts.map +1 -1
- package/build/core/domains/maintenance/migration/adapters/index-store-adapter.js +7 -0
- package/build/core/domains/maintenance/migration/adapters/index-store-adapter.js.map +1 -1
- package/build/core/domains/maintenance/migration/database/migrations/027-cg-ambiguous-fanout-source-path-pk.d.ts +37 -0
- package/build/core/domains/maintenance/migration/database/migrations/027-cg-ambiguous-fanout-source-path-pk.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/027-cg-ambiguous-fanout-source-path-pk.js +61 -0
- package/build/core/domains/maintenance/migration/database/migrations/027-cg-ambiguous-fanout-source-path-pk.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/028-cg-derived-file-scoped-key.d.ts +36 -0
- package/build/core/domains/maintenance/migration/database/migrations/028-cg-derived-file-scoped-key.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/028-cg-derived-file-scoped-key.js +68 -0
- package/build/core/domains/maintenance/migration/database/migrations/028-cg-derived-file-scoped-key.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/029-cg-derived-stale.d.ts +21 -0
- package/build/core/domains/maintenance/migration/database/migrations/029-cg-derived-stale.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/029-cg-derived-stale.js +26 -0
- package/build/core/domains/maintenance/migration/database/migrations/029-cg-derived-stale.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/030-cg-file-edge-export-names.d.ts +20 -0
- package/build/core/domains/maintenance/migration/database/migrations/030-cg-file-edge-export-names.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/030-cg-file-edge-export-names.js +23 -0
- package/build/core/domains/maintenance/migration/database/migrations/030-cg-file-edge-export-names.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/031-cg-temporal-init.d.ts +26 -0
- package/build/core/domains/maintenance/migration/database/migrations/031-cg-temporal-init.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/031-cg-temporal-init.js +58 -0
- package/build/core/domains/maintenance/migration/database/migrations/031-cg-temporal-init.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/032-cg-symbols-files-type-abstractness.d.ts +18 -0
- package/build/core/domains/maintenance/migration/database/migrations/032-cg-symbols-files-type-abstractness.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/032-cg-symbols-files-type-abstractness.js +21 -0
- package/build/core/domains/maintenance/migration/database/migrations/032-cg-symbols-files-type-abstractness.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/033-cg-identifiers.d.ts +23 -0
- package/build/core/domains/maintenance/migration/database/migrations/033-cg-identifiers.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/033-cg-identifiers.js +36 -0
- package/build/core/domains/maintenance/migration/database/migrations/033-cg-identifiers.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/034-cg-identifiers-type-multiplicity.d.ts +23 -0
- package/build/core/domains/maintenance/migration/database/migrations/034-cg-identifiers-type-multiplicity.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/034-cg-identifiers-type-multiplicity.js +25 -0
- package/build/core/domains/maintenance/migration/database/migrations/034-cg-identifiers-type-multiplicity.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/035-cg-symbols-symbol-kind.d.ts +21 -0
- package/build/core/domains/maintenance/migration/database/migrations/035-cg-symbols-symbol-kind.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/035-cg-symbols-symbol-kind.js +23 -0
- package/build/core/domains/maintenance/migration/database/migrations/035-cg-symbols-symbol-kind.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/036-cg-identifiers-call-unwrap.d.ts +26 -0
- package/build/core/domains/maintenance/migration/database/migrations/036-cg-identifiers-call-unwrap.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/036-cg-identifiers-call-unwrap.js +29 -0
- package/build/core/domains/maintenance/migration/database/migrations/036-cg-identifiers-call-unwrap.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/037-cg-type-only-file-edges.d.ts +22 -0
- package/build/core/domains/maintenance/migration/database/migrations/037-cg-type-only-file-edges.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/037-cg-type-only-file-edges.js +29 -0
- package/build/core/domains/maintenance/migration/database/migrations/037-cg-type-only-file-edges.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/038-cg-type-declarations.d.ts +27 -0
- package/build/core/domains/maintenance/migration/database/migrations/038-cg-type-declarations.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/038-cg-type-declarations.js +38 -0
- package/build/core/domains/maintenance/migration/database/migrations/038-cg-type-declarations.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/039-cg-hierarchy-dependencies.d.ts +27 -0
- package/build/core/domains/maintenance/migration/database/migrations/039-cg-hierarchy-dependencies.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/039-cg-hierarchy-dependencies.js +34 -0
- package/build/core/domains/maintenance/migration/database/migrations/039-cg-hierarchy-dependencies.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/040-cg-type-declarations-member-counts.d.ts +23 -0
- package/build/core/domains/maintenance/migration/database/migrations/040-cg-type-declarations-member-counts.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/040-cg-type-declarations-member-counts.js +26 -0
- package/build/core/domains/maintenance/migration/database/migrations/040-cg-type-declarations-member-counts.js.map +1 -0
- package/build/core/domains/maintenance/migration/database/migrations/index.d.ts.map +1 -1
- package/build/core/domains/maintenance/migration/database/migrations/index.js +28 -0
- package/build/core/domains/maintenance/migration/database/migrations/index.js.map +1 -1
- package/build/core/domains/maintenance/migration/migrator.d.ts +1 -1
- package/build/core/domains/maintenance/migration/migrator.d.ts.map +1 -1
- package/build/core/domains/maintenance/migration/payload-index-migrator.d.ts +25 -0
- package/build/core/domains/maintenance/migration/payload-index-migrator.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/payload-index-migrator.js +43 -0
- package/build/core/domains/maintenance/migration/payload-index-migrator.js.map +1 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/index.d.ts +2 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/index.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/index.js +2 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/index.js.map +1 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/payload-index-v1-declared-set.d.ts +61 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/payload-index-v1-declared-set.d.ts.map +1 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/payload-index-v1-declared-set.js +76 -0
- package/build/core/domains/maintenance/migration/payload_index_migrations/payload-index-v1-declared-set.js.map +1 -0
- package/build/core/domains/maintenance/migration/types.d.ts +17 -0
- package/build/core/domains/maintenance/migration/types.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/collection-registry.d.ts +21 -1
- package/build/core/domains/maintenance/registry/collection-registry.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/collection-registry.js +40 -4
- package/build/core/domains/maintenance/registry/collection-registry.js.map +1 -1
- package/build/core/domains/maintenance/registry/env-edit.d.ts +46 -0
- package/build/core/domains/maintenance/registry/env-edit.d.ts.map +1 -0
- package/build/core/domains/maintenance/registry/env-edit.js +120 -0
- package/build/core/domains/maintenance/registry/env-edit.js.map +1 -0
- package/build/core/domains/maintenance/registry/env-groups.d.ts +13 -0
- package/build/core/domains/maintenance/registry/env-groups.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/env-groups.js +19 -0
- package/build/core/domains/maintenance/registry/env-groups.js.map +1 -1
- package/build/core/domains/maintenance/registry/env-pin-migration.d.ts +59 -0
- package/build/core/domains/maintenance/registry/env-pin-migration.d.ts.map +1 -0
- package/build/core/domains/maintenance/registry/env-pin-migration.js +92 -0
- package/build/core/domains/maintenance/registry/env-pin-migration.js.map +1 -0
- package/build/core/domains/maintenance/registry/env-resolution.d.ts +21 -3
- package/build/core/domains/maintenance/registry/env-resolution.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/env-resolution.js +42 -7
- package/build/core/domains/maintenance/registry/env-resolution.js.map +1 -1
- package/build/core/domains/maintenance/registry/index.d.ts +7 -3
- package/build/core/domains/maintenance/registry/index.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/index.js +3 -2
- package/build/core/domains/maintenance/registry/index.js.map +1 -1
- package/build/core/domains/maintenance/registry/qdrant-backend-resolution.d.ts +19 -0
- package/build/core/domains/maintenance/registry/qdrant-backend-resolution.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/qdrant-backend-resolution.js +13 -0
- package/build/core/domains/maintenance/registry/qdrant-backend-resolution.js.map +1 -1
- package/build/core/domains/maintenance/registry/registry-file.d.ts +22 -0
- package/build/core/domains/maintenance/registry/registry-file.d.ts.map +1 -1
- package/build/core/domains/maintenance/registry/registry-file.js +55 -1
- package/build/core/domains/maintenance/registry/registry-file.js.map +1 -1
- package/build/core/domains/maintenance/worktree/git-worktree.d.ts.map +1 -1
- package/build/core/domains/maintenance/worktree/git-worktree.js +3 -2
- package/build/core/domains/maintenance/worktree/git-worktree.js.map +1 -1
- package/build/core/domains/maintenance/worktree/worktree-provisioner.js +16 -16
- package/build/core/domains/maintenance/worktree/worktree-provisioner.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/collection-completion-hook.d.ts +35 -0
- package/build/core/domains/trajectory/codegraph/collection-completion-hook.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/collection-completion-hook.js +23 -0
- package/build/core/domains/trajectory/codegraph/collection-completion-hook.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/exclusion.d.ts +21 -8
- package/build/core/domains/trajectory/codegraph/exclusion.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/exclusion.js +31 -8
- package/build/core/domains/trajectory/codegraph/exclusion.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/factory.d.ts +7 -0
- package/build/core/domains/trajectory/codegraph/factory.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/factory.js +4 -2
- package/build/core/domains/trajectory/codegraph/factory.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/hierarchy-view.d.ts +14 -1
- package/build/core/domains/trajectory/codegraph/hierarchy-view.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/hierarchy-view.js +35 -3
- package/build/core/domains/trajectory/codegraph/hierarchy-view.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/index.d.ts +14 -4
- package/build/core/domains/trajectory/codegraph/index.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/index.js +12 -5
- package/build/core/domains/trajectory/codegraph/index.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/inherited-member-definer.d.ts +31 -0
- package/build/core/domains/trajectory/codegraph/inherited-member-definer.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/inherited-member-definer.js +67 -0
- package/build/core/domains/trajectory/codegraph/inherited-member-definer.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-graph.d.ts +45 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-graph.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-graph.js +142 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-graph.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-stable-dependencies.d.ts +32 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-stable-dependencies.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-stable-dependencies.js +152 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/component-stable-dependencies.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/convention-privacy.d.ts +25 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/convention-privacy.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/convention-privacy.js +119 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/convention-privacy.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/facade-aggregation.d.ts +21 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/facade-aggregation.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/facade-aggregation.js +43 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/facade-aggregation.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/index.d.ts +10 -2
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/index.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/index.js +9 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/index.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/leaking-abstraction.d.ts +73 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/leaking-abstraction.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/leaking-abstraction.js +346 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/leaking-abstraction.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/main-sequence.d.ts +62 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/main-sequence.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/main-sequence.js +268 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/main-sequence.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/otsu-split.d.ts +64 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/otsu-split.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/otsu-split.js +75 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/otsu-split.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/production-graph.d.ts +26 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/production-graph.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/production-graph.js +25 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/production-graph.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/stable-dependencies.d.ts +27 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/stable-dependencies.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/stable-dependencies.js +102 -2
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/stable-dependencies.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/types.d.ts +459 -1
- package/build/core/domains/trajectory/codegraph/symbols/boundary-diagnostics/types.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/call-arg-param-types.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/call-arg-param-types.js +5 -4
- package/build/core/domains/trajectory/codegraph/symbols/call-arg-param-types.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-pass.d.ts +2 -2
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-pass.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-pass.js +13 -10
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-pass.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-settlement.d.ts +11 -5
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-settlement.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-settlement.js +24 -10
- package/build/core/domains/trajectory/codegraph/symbols/chunk-signal-settlement.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/extraction-sink.d.ts +32 -12
- package/build/core/domains/trajectory/codegraph/symbols/extraction-sink.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/extraction-sink.js +63 -40
- package/build/core/domains/trajectory/codegraph/symbols/extraction-sink.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/file-extractor.d.ts +43 -7
- package/build/core/domains/trajectory/codegraph/symbols/file-extractor.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/file-extractor.js +76 -57
- package/build/core/domains/trajectory/codegraph/symbols/file-extractor.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/graph-finalizer.d.ts +13 -6
- package/build/core/domains/trajectory/codegraph/symbols/graph-finalizer.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/graph-finalizer.js +161 -93
- package/build/core/domains/trajectory/codegraph/symbols/graph-finalizer.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/hierarchy-dependencies.d.ts +74 -0
- package/build/core/domains/trajectory/codegraph/symbols/hierarchy-dependencies.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/hierarchy-dependencies.js +124 -0
- package/build/core/domains/trajectory/codegraph/symbols/hierarchy-dependencies.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/identifier-rows.d.ts +72 -0
- package/build/core/domains/trajectory/codegraph/symbols/identifier-rows.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/identifier-rows.js +389 -0
- package/build/core/domains/trajectory/codegraph/symbols/identifier-rows.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/in-memory-extraction.d.ts +35 -0
- package/build/core/domains/trajectory/codegraph/symbols/in-memory-extraction.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/in-memory-extraction.js +48 -0
- package/build/core/domains/trajectory/codegraph/symbols/in-memory-extraction.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/index.d.ts +2 -0
- package/build/core/domains/trajectory/codegraph/symbols/index.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/index.js +2 -0
- package/build/core/domains/trajectory/codegraph/symbols/index.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/inheritance-edges.d.ts +0 -19
- package/build/core/domains/trajectory/codegraph/symbols/inheritance-edges.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/inheritance-edges.js +22 -2
- package/build/core/domains/trajectory/codegraph/symbols/inheritance-edges.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/language-family-record.d.ts +62 -0
- package/build/core/domains/trajectory/codegraph/symbols/language-family-record.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/language-family-record.js +104 -0
- package/build/core/domains/trajectory/codegraph/symbols/language-family-record.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/node-flush.d.ts +16 -9
- package/build/core/domains/trajectory/codegraph/symbols/node-flush.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/node-flush.js +44 -17
- package/build/core/domains/trajectory/codegraph/symbols/node-flush.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/pass1-aggregates.d.ts +11 -6
- package/build/core/domains/trajectory/codegraph/symbols/pass1-aggregates.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/pass1-aggregates.js +38 -1
- package/build/core/domains/trajectory/codegraph/symbols/pass1-aggregates.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/payload-signals.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/payload-signals.js +23 -0
- package/build/core/domains/trajectory/codegraph/symbols/payload-signals.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/provider.d.ts +79 -12
- package/build/core/domains/trajectory/codegraph/symbols/provider.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/provider.js +212 -67
- package/build/core/domains/trajectory/codegraph/symbols/provider.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/receiver-kind.d.ts +7 -0
- package/build/core/domains/trajectory/codegraph/symbols/receiver-kind.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/receiver-kind.js +5 -1
- package/build/core/domains/trajectory/codegraph/symbols/receiver-kind.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/rerank/presets/critical-method.d.ts +2 -2
- package/build/core/domains/trajectory/codegraph/symbols/rerank/presets/critical-method.js +2 -2
- package/build/core/domains/trajectory/codegraph/symbols/resolution-runner.d.ts +148 -8
- package/build/core/domains/trajectory/codegraph/symbols/resolution-runner.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/resolution-runner.js +365 -88
- package/build/core/domains/trajectory/codegraph/symbols/resolution-runner.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/run-global-map-registry.d.ts +38 -22
- package/build/core/domains/trajectory/codegraph/symbols/run-global-map-registry.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/run-global-map-registry.js +32 -11
- package/build/core/domains/trajectory/codegraph/symbols/run-global-map-registry.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/run-state.d.ts +216 -29
- package/build/core/domains/trajectory/codegraph/symbols/run-state.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/run-state.js +624 -222
- package/build/core/domains/trajectory/codegraph/symbols/run-state.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/schema-column-synthesis.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/schema-column-synthesis.js +2 -1
- package/build/core/domains/trajectory/codegraph/symbols/schema-column-synthesis.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/self-dispatch-discovery.d.ts +51 -4
- package/build/core/domains/trajectory/codegraph/symbols/self-dispatch-discovery.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/self-dispatch-discovery.js +229 -15
- package/build/core/domains/trajectory/codegraph/symbols/self-dispatch-discovery.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/spill-line-index.d.ts +35 -0
- package/build/core/domains/trajectory/codegraph/symbols/spill-line-index.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/spill-line-index.js +80 -0
- package/build/core/domains/trajectory/codegraph/symbols/spill-line-index.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/symbol-definitions.d.ts +13 -0
- package/build/core/domains/trajectory/codegraph/symbols/symbol-definitions.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/symbol-definitions.js +36 -0
- package/build/core/domains/trajectory/codegraph/symbols/symbol-definitions.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/symbol-table.d.ts +9 -3
- package/build/core/domains/trajectory/codegraph/symbols/symbol-table.d.ts.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/symbol-table.js +39 -7
- package/build/core/domains/trajectory/codegraph/symbols/symbol-table.js.map +1 -1
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-readers.d.ts +14 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-readers.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-readers.js +23 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-readers.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-rows.d.ts +17 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-rows.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-rows.js +35 -0
- package/build/core/domains/trajectory/codegraph/symbols/type-declaration-rows.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/index.d.ts +3 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/index.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/index.js +2 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/index.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/silent-coupling.d.ts +101 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/silent-coupling.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/silent-coupling.js +369 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/silent-coupling.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/types.d.ts +155 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/types.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/types.js +2 -0
- package/build/core/domains/trajectory/codegraph/temporal/boundary-diagnostics/types.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/builder.d.ts +112 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/builder.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/builder.js +172 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/builder.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/commit-bundles.d.ts +37 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/commit-bundles.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/commit-bundles.js +35 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/commit-bundles.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/history-scope.d.ts +35 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/history-scope.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/history-scope.js +50 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/history-scope.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/index.d.ts +6 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/index.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/index.js +6 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/index.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/mass-change-cut.d.ts +23 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/mass-change-cut.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/mass-change-cut.js +43 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/mass-change-cut.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/pair-extractor.d.ts +44 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/pair-extractor.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/pair-extractor.js +151 -0
- package/build/core/domains/trajectory/codegraph/temporal/cochange/pair-extractor.js.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/index.d.ts +42 -0
- package/build/core/domains/trajectory/codegraph/temporal/index.d.ts.map +1 -0
- package/build/core/domains/trajectory/codegraph/temporal/index.js +37 -0
- package/build/core/domains/trajectory/codegraph/temporal/index.js.map +1 -0
- package/build/core/domains/trajectory/composite/filter-presets/index.d.ts +2 -0
- package/build/core/domains/trajectory/composite/filter-presets/index.d.ts.map +1 -1
- package/build/core/domains/trajectory/composite/filter-presets/index.js +2 -1
- package/build/core/domains/trajectory/composite/filter-presets/index.js.map +1 -1
- package/build/core/domains/trajectory/composite/presets/decomposition.js +2 -2
- package/build/core/domains/trajectory/composite/presets/decomposition.js.map +1 -1
- package/build/core/domains/trajectory/composite/presets/god-module.d.ts +4 -0
- package/build/core/domains/trajectory/composite/presets/god-module.d.ts.map +1 -1
- package/build/core/domains/trajectory/composite/presets/god-module.js +4 -1
- package/build/core/domains/trajectory/composite/presets/god-module.js.map +1 -1
- package/build/core/domains/trajectory/filter-payload-keys.d.ts +32 -0
- package/build/core/domains/trajectory/filter-payload-keys.d.ts.map +1 -0
- package/build/core/domains/trajectory/filter-payload-keys.js +77 -0
- package/build/core/domains/trajectory/filter-payload-keys.js.map +1 -0
- package/build/core/domains/trajectory/filter-presets/compiler.d.ts.map +1 -1
- package/build/core/domains/trajectory/filter-presets/compiler.js +7 -0
- package/build/core/domains/trajectory/filter-presets/compiler.js.map +1 -1
- package/build/core/domains/trajectory/git/index.d.ts +5 -0
- package/build/core/domains/trajectory/git/index.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/index.js +8 -0
- package/build/core/domains/trajectory/git/index.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/build-accumulators.d.ts +12 -1
- package/build/core/domains/trajectory/git/infra/build-accumulators.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/build-accumulators.js +19 -2
- package/build/core/domains/trajectory/git/infra/build-accumulators.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/chunk-reader.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/chunk-reader.js +6 -3
- package/build/core/domains/trajectory/git/infra/chunk-reader.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/blame-pool.d.ts +17 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/blame-pool.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/blame-pool.js +27 -4
- package/build/core/domains/trajectory/git/infra/churn-walk/blame-pool.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/protocol.d.ts +6 -0
- package/build/core/domains/trajectory/git/infra/churn-walk/protocol.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/walk-pool.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/walk-pool.js +3 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/walk-pool.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/worker.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/worker.js +6 -1
- package/build/core/domains/trajectory/git/infra/churn-walk/worker.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/commit-discovery.d.ts +7 -0
- package/build/core/domains/trajectory/git/infra/commit-discovery.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/commit-discovery.js +9 -0
- package/build/core/domains/trajectory/git/infra/commit-discovery.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/file-churn-discovery.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/file-churn-discovery.js +10 -18
- package/build/core/domains/trajectory/git/infra/file-churn-discovery.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/file-reader.d.ts +8 -2
- package/build/core/domains/trajectory/git/infra/file-reader.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/file-reader.js +34 -5
- package/build/core/domains/trajectory/git/infra/file-reader.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/metrics/sessions.d.ts +15 -0
- package/build/core/domains/trajectory/git/infra/metrics/sessions.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/metrics/sessions.js +41 -30
- package/build/core/domains/trajectory/git/infra/metrics/sessions.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/offset-tracker.d.ts +36 -6
- package/build/core/domains/trajectory/git/infra/offset-tracker.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/offset-tracker.js +57 -21
- package/build/core/domains/trajectory/git/infra/offset-tracker.js.map +1 -1
- package/build/core/domains/trajectory/git/infra/rename-following.d.ts +74 -0
- package/build/core/domains/trajectory/git/infra/rename-following.d.ts.map +1 -0
- package/build/core/domains/trajectory/git/infra/rename-following.js +124 -0
- package/build/core/domains/trajectory/git/infra/rename-following.js.map +1 -0
- package/build/core/domains/trajectory/git/infra/walk-commits.d.ts +2 -3
- package/build/core/domains/trajectory/git/infra/walk-commits.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/infra/walk-commits.js +60 -48
- package/build/core/domains/trajectory/git/infra/walk-commits.js.map +1 -1
- package/build/core/domains/trajectory/git/payload-signals.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/payload-signals.js +10 -2
- package/build/core/domains/trajectory/git/payload-signals.js.map +1 -1
- package/build/core/domains/trajectory/git/provider.d.ts +65 -19
- package/build/core/domains/trajectory/git/provider.d.ts.map +1 -1
- package/build/core/domains/trajectory/git/provider.js +191 -62
- package/build/core/domains/trajectory/git/provider.js.map +1 -1
- package/build/core/domains/trajectory/static/filters.d.ts.map +1 -1
- package/build/core/domains/trajectory/static/filters.js +8 -1
- package/build/core/domains/trajectory/static/filters.js.map +1 -1
- package/build/core/domains/trajectory/static/payload-signals.d.ts +5 -0
- package/build/core/domains/trajectory/static/payload-signals.d.ts.map +1 -1
- package/build/core/domains/trajectory/static/payload-signals.js +13 -5
- package/build/core/domains/trajectory/static/payload-signals.js.map +1 -1
- package/build/core/domains/trajectory/static/rerank/presets/decomposition.js +1 -1
- package/build/core/domains/trajectory/static/rerank/presets/decomposition.js.map +1 -1
- package/build/core/domains/trajectory/static/rerank/presets/god-module.d.ts +7 -4
- package/build/core/domains/trajectory/static/rerank/presets/god-module.d.ts.map +1 -1
- package/build/core/domains/trajectory/static/rerank/presets/god-module.js +7 -5
- package/build/core/domains/trajectory/static/rerank/presets/god-module.js.map +1 -1
- package/build/core/domains/trajectory/static/test-detection.d.ts +14 -3
- package/build/core/domains/trajectory/static/test-detection.d.ts.map +1 -1
- package/build/core/domains/trajectory/static/test-detection.js +18 -32
- package/build/core/domains/trajectory/static/test-detection.js.map +1 -1
- package/build/core/domains/trajectory/static/test-exclusion.d.ts +29 -0
- package/build/core/domains/trajectory/static/test-exclusion.d.ts.map +1 -0
- package/build/core/domains/trajectory/static/test-exclusion.js +26 -0
- package/build/core/domains/trajectory/static/test-exclusion.js.map +1 -0
- package/build/core/infra/code-file-extraction.d.ts +51 -0
- package/build/core/infra/code-file-extraction.d.ts.map +1 -0
- package/build/core/infra/code-file-extraction.js +41 -0
- package/build/core/infra/code-file-extraction.js.map +1 -0
- package/build/core/infra/collection-name.d.ts +1 -1
- package/build/core/infra/collection-name.d.ts.map +1 -1
- package/build/core/infra/collection-name.js +3 -3
- package/build/core/infra/collection-name.js.map +1 -1
- package/build/core/infra/declared-visibility-index.d.ts +30 -0
- package/build/core/infra/declared-visibility-index.d.ts.map +1 -0
- package/build/core/infra/declared-visibility-index.js +61 -0
- package/build/core/infra/declared-visibility-index.js.map +1 -0
- package/build/core/infra/file-classification/classify.d.ts +11 -1
- package/build/core/infra/file-classification/classify.d.ts.map +1 -1
- package/build/core/infra/file-classification/classify.js +23 -6
- package/build/core/infra/file-classification/classify.js.map +1 -1
- package/build/core/infra/file-classification/index.d.ts +5 -2
- package/build/core/infra/file-classification/index.d.ts.map +1 -1
- package/build/core/infra/file-classification/index.js +5 -2
- package/build/core/infra/file-classification/index.js.map +1 -1
- package/build/core/infra/file-classification/non-production-path-filter.d.ts +30 -0
- package/build/core/infra/file-classification/non-production-path-filter.d.ts.map +1 -0
- package/build/core/infra/file-classification/non-production-path-filter.js +42 -0
- package/build/core/infra/file-classification/non-production-path-filter.js.map +1 -0
- package/build/core/infra/file-classification/patterns.d.ts +16 -22
- package/build/core/infra/file-classification/patterns.d.ts.map +1 -1
- package/build/core/infra/file-classification/patterns.js +30 -51
- package/build/core/infra/file-classification/patterns.js.map +1 -1
- package/build/core/infra/file-classification/test-file-conventions.d.ts +54 -0
- package/build/core/infra/file-classification/test-file-conventions.d.ts.map +1 -0
- package/build/core/infra/file-classification/test-file-conventions.js +44 -0
- package/build/core/infra/file-classification/test-file-conventions.js.map +1 -0
- package/build/core/infra/file-classification/test-path-filter.d.ts +18 -0
- package/build/core/infra/file-classification/test-path-filter.d.ts.map +1 -0
- package/build/core/infra/file-classification/test-path-filter.js +20 -0
- package/build/core/infra/file-classification/test-path-filter.js.map +1 -0
- package/build/core/infra/git-executable.d.ts +50 -0
- package/build/core/infra/git-executable.d.ts.map +1 -0
- package/build/core/infra/git-executable.js +77 -0
- package/build/core/infra/git-executable.js.map +1 -0
- package/build/core/infra/path-pattern.d.ts +12 -0
- package/build/core/infra/path-pattern.d.ts.map +1 -1
- package/build/core/infra/path-pattern.js +19 -0
- package/build/core/infra/path-pattern.js.map +1 -1
- package/build/core/infra/repo-git-state.d.ts.map +1 -1
- package/build/core/infra/repo-git-state.js +3 -2
- package/build/core/infra/repo-git-state.js.map +1 -1
- package/build/core/infra/scope-detection.d.ts +17 -3
- package/build/core/infra/scope-detection.d.ts.map +1 -1
- package/build/core/infra/scope-detection.js +24 -33
- package/build/core/infra/scope-detection.js.map +1 -1
- package/build/core/infra/symbolid/class-scope.d.ts +47 -0
- package/build/core/infra/symbolid/class-scope.d.ts.map +1 -0
- package/build/core/infra/symbolid/class-scope.js +94 -0
- package/build/core/infra/symbolid/class-scope.js.map +1 -0
- package/build/core/infra/symbolid/classify.d.ts.map +1 -1
- package/build/core/infra/symbolid/classify.js +8 -1
- package/build/core/infra/symbolid/classify.js.map +1 -1
- package/build/core/infra/symbolid/const-object-namespace.d.ts +19 -0
- package/build/core/infra/symbolid/const-object-namespace.d.ts.map +1 -1
- package/build/core/infra/symbolid/const-object-namespace.js +36 -0
- package/build/core/infra/symbolid/const-object-namespace.js.map +1 -1
- package/build/core/infra/symbolid/factory-returned-literal.d.ts +74 -0
- package/build/core/infra/symbolid/factory-returned-literal.d.ts.map +1 -0
- package/build/core/infra/symbolid/factory-returned-literal.js +143 -0
- package/build/core/infra/symbolid/factory-returned-literal.js.map +1 -0
- package/build/core/infra/symbolid/index.d.ts +3 -1
- package/build/core/infra/symbolid/index.d.ts.map +1 -1
- package/build/core/infra/symbolid/index.js +3 -1
- package/build/core/infra/symbolid/index.js.map +1 -1
- package/build/core/types.d.ts +78 -22
- package/build/core/types.d.ts.map +1 -1
- package/build/index.js +6 -17
- package/build/index.js.map +1 -1
- package/build/mcp/middleware/error-handler.d.ts +2 -1
- package/build/mcp/middleware/error-handler.d.ts.map +1 -1
- package/build/mcp/middleware/error-handler.js +18 -2
- package/build/mcp/middleware/error-handler.js.map +1 -1
- package/build/mcp/resources/registry.d.ts +6 -0
- package/build/mcp/resources/registry.d.ts.map +1 -1
- package/build/mcp/resources/registry.js +168 -5
- package/build/mcp/resources/registry.js.map +1 -1
- package/build/mcp/tools/code/register-index-tools.d.ts.map +1 -1
- package/build/mcp/tools/code/register-index-tools.js +44 -3
- package/build/mcp/tools/code/register-index-tools.js.map +1 -1
- package/build/mcp/tools/code/register-status-tools.d.ts +7 -2
- package/build/mcp/tools/code/register-status-tools.d.ts.map +1 -1
- package/build/mcp/tools/code/register-status-tools.js +21 -8
- package/build/mcp/tools/code/register-status-tools.js.map +1 -1
- package/build/mcp/tools/codegraph.d.ts +1 -0
- package/build/mcp/tools/codegraph.d.ts.map +1 -1
- package/build/mcp/tools/codegraph.js +213 -33
- package/build/mcp/tools/codegraph.js.map +1 -1
- package/build/mcp/tools/collection.d.ts.map +1 -1
- package/build/mcp/tools/collection.js +6 -3
- package/build/mcp/tools/collection.js.map +1 -1
- package/build/mcp/tools/document.d.ts.map +1 -1
- package/build/mcp/tools/document.js +3 -1
- package/build/mcp/tools/document.js.map +1 -1
- package/build/mcp/tools/explore.d.ts.map +1 -1
- package/build/mcp/tools/explore.js +6 -2
- package/build/mcp/tools/explore.js.map +1 -1
- package/build/mcp/tools/output-schemas.d.ts +12 -27
- package/build/mcp/tools/output-schemas.d.ts.map +1 -1
- package/build/mcp/tools/output-schemas.js +45 -35
- package/build/mcp/tools/output-schemas.js.map +1 -1
- package/build/mcp/tools/schemas.d.ts +25 -2
- package/build/mcp/tools/schemas.d.ts.map +1 -1
- package/build/mcp/tools/schemas.js +153 -171
- package/build/mcp/tools/schemas.js.map +1 -1
- package/build/mcp/tools/unregister-project.d.ts +6 -1
- package/build/mcp/tools/unregister-project.d.ts.map +1 -1
- package/build/mcp/tools/unregister-project.js +16 -4
- package/build/mcp/tools/unregister-project.js.map +1 -1
- package/package.json +3 -3
- package/build/core/domains/language/swift/chunking/container-body-chunker.d.ts +0 -57
- package/build/core/domains/language/swift/chunking/container-body-chunker.d.ts.map +0 -1
- package/build/core/domains/language/swift/chunking/container-body-chunker.js +0 -120
- package/build/core/domains/language/swift/chunking/container-body-chunker.js.map +0 -1
|
@@ -85,17 +85,22 @@
|
|
|
85
85
|
*
|
|
86
86
|
* ## What is deliberately NOT bound
|
|
87
87
|
*
|
|
88
|
-
* - `[Thing]`
|
|
89
|
-
*
|
|
90
|
-
*
|
|
88
|
+
* - A `[Thing]` annotation never binds the annotated NAME as a `Thing`.
|
|
89
|
+
* `LocalBinding.type` is a bare string with no container slot, so binding
|
|
90
|
+
* the element type would type the ARRAY as a `Thing` and pin
|
|
91
91
|
* `xs.append(_:)` to `Thing#append` — the Python lesson
|
|
92
92
|
* (`domains/language/CLAUDE.md`, "Python publishes type facts on THREE
|
|
93
|
-
* channels"), reached here through a different grammar.
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
93
|
+
* channels"), reached here through a different grammar. It binds `Array`
|
|
94
|
+
* (and `[String: Foo]` binds `Dictionary`), the standard-library types those
|
|
95
|
+
* spellings ARE, so a call reaches the project's `extension Array where
|
|
96
|
+
* Element == Header` (bd tea-rags-mcp-y99pg.14; until then they bound
|
|
97
|
+
* nothing). The element type is held in {@link SwiftTypeFact}'s own slot,
|
|
98
|
+
* which only `for x in xs` and the element accessors read and which
|
|
99
|
+
* nothing emits, so the invariant is structural rather than a rule someone
|
|
100
|
+
* has to remember. A `Set<Foo>` / `Array<Foo>` spelling fills the same slot
|
|
101
|
+
* (bd tea-rags-mcp-y99pg.32) — its one generic argument IS its element — and
|
|
102
|
+
* a `[String: Foo]` element is NOT read: a dictionary iterates as a tuple the
|
|
103
|
+
* single-name pattern rejects anyway.
|
|
99
104
|
* - A non-CapWords initializer whose callee this file does NOT declare
|
|
100
105
|
* (`let t = makeThing()`) binds nothing — its return type is unknowable here
|
|
101
106
|
* and recording the FUNCTION name as a type fabricates a `makeThing#member`
|
|
@@ -112,8 +117,9 @@
|
|
|
112
117
|
* `guard let self = self else { return }` would otherwise put a local under a
|
|
113
118
|
* pseudo receiver, where the FIRST chain pass answers and DROPS what
|
|
114
119
|
* `selfMember` resolves.
|
|
115
|
-
* - `classFieldTypes` keeps the NARROW rule — annotation
|
|
116
|
-
* initializer
|
|
120
|
+
* - `classFieldTypes` keeps the NARROW rule — annotation, CapWords
|
|
121
|
+
* initializer, or a collection / string literal initializer (bd
|
|
122
|
+
* tea-rags-mcp-y99pg.39) — while a local reads the full expression walk. The map is the
|
|
117
123
|
* INPUT to that walk, so widening it would make a property's type depend on
|
|
118
124
|
* another property's.
|
|
119
125
|
*
|
|
@@ -122,8 +128,12 @@
|
|
|
122
128
|
* resolution runner uses `fileScope` as the caller scope for file-level calls,
|
|
123
129
|
* where a populated list would silently retarget them.
|
|
124
130
|
*/
|
|
125
|
-
import {
|
|
131
|
+
import { createIdentifierRecord } from "../../../../contracts/identifier-record.js";
|
|
132
|
+
import { assignCallsToInnermostChunks } from "../../kernel/index.js";
|
|
133
|
+
import { symbolIdNames } from "../../kernel/symbol-id.js";
|
|
126
134
|
import { swiftTypeFieldKey } from "../type-field-address.js";
|
|
135
|
+
import { swiftNameOf } from "./name-of.js";
|
|
136
|
+
import { symbolKindOf } from "./symbol-kind.js";
|
|
127
137
|
export function extractFromSwiftFile(input) {
|
|
128
138
|
const root = input.tree.rootNode;
|
|
129
139
|
const imports = collectSwiftImports(root);
|
|
@@ -131,6 +141,7 @@ export function extractFromSwiftFile(input) {
|
|
|
131
141
|
const evidence = collectSwiftFileTypeEvidence(root);
|
|
132
142
|
const bindingOwnership = assignBindingsToInnermostChunks(collectSwiftTypedBindings(root, evidence), input.chunks);
|
|
133
143
|
const callOwnership = assignCallsToInnermostChunks(calls, input.chunks);
|
|
144
|
+
const { signatures, symbolKinds } = collectSwiftChunkDeclarations(root, input.chunks);
|
|
134
145
|
const byChunk = input.chunks.map((c, chunkIndex) => {
|
|
135
146
|
const chunk = {
|
|
136
147
|
symbolId: c.symbolId,
|
|
@@ -139,9 +150,24 @@ export function extractFromSwiftFile(input) {
|
|
|
139
150
|
endLine: c.endLine,
|
|
140
151
|
calls: callOwnership.get(chunkIndex) ?? [],
|
|
141
152
|
};
|
|
153
|
+
// A type chunk's own calls run inside the type (`swiftNameOf` opts in).
|
|
154
|
+
if (c.bodyScope !== undefined)
|
|
155
|
+
chunk.bodyScope = c.bodyScope;
|
|
156
|
+
const symbolKind = symbolKinds.get(chunkIndex);
|
|
157
|
+
if (symbolKind !== undefined)
|
|
158
|
+
chunk.symbolKind = symbolKind;
|
|
159
|
+
const signature = signatures.get(chunkIndex);
|
|
160
|
+
if (signature) {
|
|
161
|
+
chunk.arity = signature.arity;
|
|
162
|
+
chunk.kwargs = signature.kwargs;
|
|
163
|
+
chunk.acceptsBlock = signature.acceptsBlock;
|
|
164
|
+
}
|
|
142
165
|
const bindings = bindingOwnership.get(chunkIndex);
|
|
143
|
-
if (bindings && Object.keys(bindings).length > 0)
|
|
144
|
-
chunk.localBindings = bindings;
|
|
166
|
+
if (bindings && Object.keys(bindings.localBindings).length > 0)
|
|
167
|
+
chunk.localBindings = bindings.localBindings;
|
|
168
|
+
if (bindings && Object.keys(bindings.callResultBindings).length > 0) {
|
|
169
|
+
chunk.callResultBindings = bindings.callResultBindings;
|
|
170
|
+
}
|
|
145
171
|
return chunk;
|
|
146
172
|
});
|
|
147
173
|
const out = {
|
|
@@ -163,8 +189,770 @@ export function extractFromSwiftFile(input) {
|
|
|
163
189
|
const classExtends = collectSwiftClassExtends(root);
|
|
164
190
|
if (Object.keys(classExtends).length > 0)
|
|
165
191
|
out.classExtends = classExtends;
|
|
192
|
+
const structuredReturnTypes = collectSwiftStructuredReturnTypes(root, input.chunks);
|
|
193
|
+
if (Object.keys(structuredReturnTypes).length > 0)
|
|
194
|
+
out.structuredReturnTypes = structuredReturnTypes;
|
|
195
|
+
const typeDeclarations = collectSwiftTypeDeclarations(root);
|
|
196
|
+
if (typeDeclarations.length > 0)
|
|
197
|
+
out.typeDeclarations = typeDeclarations;
|
|
166
198
|
return out;
|
|
167
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Every type declaration of the file, in source order — the
|
|
202
|
+
* `typeDeclarations` channel (bd tea-rags-mcp-y99pg.1).
|
|
203
|
+
*
|
|
204
|
+
* tree-sitter-swift parses `extension T` as the same `class_declaration` node a
|
|
205
|
+
* `class T` is, and the symbol id both compose is `T`, so the keyword is the
|
|
206
|
+
* only evidence of which one a node is. A declaration's id is its own name
|
|
207
|
+
* under every enclosing declaration — an extension's included, since a type
|
|
208
|
+
* nested in `extension Encoder` composes as `Encoder.Container` — and an
|
|
209
|
+
* extension's own id is its name AS WRITTEN: Swift only lets an extension sit
|
|
210
|
+
* at file scope, so that path is already qualified from the module.
|
|
211
|
+
*
|
|
212
|
+
* `conforms` lists every inheritance specifier, superclass and protocols
|
|
213
|
+
* alike, because the clause marks neither; {@link collectSwiftClassExtends}
|
|
214
|
+
* is where the superclass is told apart for `super`.
|
|
215
|
+
*
|
|
216
|
+
* `symbolKind` (bd tea-rags-mcp-vi0wx) is the chunk's kind ({@link symbolKindOf}):
|
|
217
|
+
* class / struct / actor → `class`, enum → `enum`, protocol → `interface`.
|
|
218
|
+
* An extension declares no kind of its own, so a re-opening borrows the kind
|
|
219
|
+
* of the same file's own declaration of the type and falls back to the
|
|
220
|
+
* nominal `class` for a type declared elsewhere (an SDK type, another file) —
|
|
221
|
+
* which the naming lexicon never reads, because it reads own declarations only.
|
|
222
|
+
*
|
|
223
|
+
* A `typealias` at file scope or directly in a type body (an extension's
|
|
224
|
+
* included) publishes a `type_alias` fact for the naming lexicon (spec §1b),
|
|
225
|
+
* composed like a type: `extension Request { typealias Validation = … }` →
|
|
226
|
+
* `Request.Validation`. One declared inside a function, accessor or closure is
|
|
227
|
+
* a local and publishes nothing. An alias declares no type, so the resolver's
|
|
228
|
+
* read of the channel skips it (`swiftResolverTypeFacts` in
|
|
229
|
+
* `resolver/swift-type-declarations.ts`).
|
|
230
|
+
*/
|
|
231
|
+
function collectSwiftTypeDeclarations(root) {
|
|
232
|
+
const out = [];
|
|
233
|
+
const ownKinds = new Map();
|
|
234
|
+
walk(root, (node) => {
|
|
235
|
+
if (node.type === "typealias_declaration") {
|
|
236
|
+
const alias = swiftTypeAliasFact(node);
|
|
237
|
+
if (alias !== undefined)
|
|
238
|
+
out.push(alias);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const kind = swiftTypeDeclarationKind(node);
|
|
242
|
+
if (kind === null)
|
|
243
|
+
return;
|
|
244
|
+
const name = swiftTypeNameText(node.childForFieldName("name")?.text);
|
|
245
|
+
if (name === undefined)
|
|
246
|
+
return;
|
|
247
|
+
const enclosing = swiftEnclosingTypeNames(node);
|
|
248
|
+
const conforms = swiftInheritedTypeNames(node);
|
|
249
|
+
const genericParameters = kind === "extension" ? [] : swiftTypeParameterNames(node);
|
|
250
|
+
const { fieldTypeArguments, fieldConstructions, memberClosureParameters, genericInitializers, genericFieldParameters, closureResultMembers, } = swiftGenericMemberFacts(node, genericParameters);
|
|
251
|
+
const whereClause = kind === "extension" ? swiftWhereClauseFact(node) : undefined;
|
|
252
|
+
const enumCasePayloads = kind === "enum" ? swiftEnumCasePayloads(node) : undefined;
|
|
253
|
+
const functionAliasReturns = swiftFunctionAliasReturns(node);
|
|
254
|
+
const selfConstraints = kind === "extension" ? swiftSelfConstraints(node) : undefined;
|
|
255
|
+
const propertyAttributeTypes = swiftPropertyAttributeTypes(node);
|
|
256
|
+
const optionalProperties = swiftOptionalPropertyNames(node);
|
|
257
|
+
const memberTypeAliases = swiftMemberTypeAliases(node);
|
|
258
|
+
// `extension Collection<String>` composes its members under the name as
|
|
259
|
+
// WRITTEN (bd tea-rags-mcp-y99pg.19); an extension sits at file scope.
|
|
260
|
+
const written = node.childForFieldName("name")?.text.trim();
|
|
261
|
+
const spelledAs = kind === "extension" && written !== undefined && written !== name ? written : undefined;
|
|
262
|
+
const typeId = [...enclosing, name].join(".");
|
|
263
|
+
const ownKind = kind === "extension" ? undefined : symbolKindOf(node.type, { atTopLevel: false, typeKeyword: kind });
|
|
264
|
+
if (ownKind !== undefined && !ownKinds.has(typeId))
|
|
265
|
+
ownKinds.set(typeId, ownKind);
|
|
266
|
+
out.push({
|
|
267
|
+
typeId,
|
|
268
|
+
symbolKind: ownKind ?? SWIFT_REOPENED_NOMINAL_KIND,
|
|
269
|
+
line: node.startPosition.row + 1,
|
|
270
|
+
reopens: kind === "extension",
|
|
271
|
+
...(kind === "extension" ? {} : { declarationKind: kind }),
|
|
272
|
+
...(conforms.length > 0 ? { conforms } : {}),
|
|
273
|
+
...(genericParameters.length > 0 ? { genericParameters } : {}),
|
|
274
|
+
...(fieldTypeArguments ? { fieldTypeArguments } : {}),
|
|
275
|
+
...(fieldConstructions ? { fieldConstructions } : {}),
|
|
276
|
+
...(memberClosureParameters ? { memberClosureParameters } : {}),
|
|
277
|
+
...(closureResultMembers ? { closureResultMembers } : {}),
|
|
278
|
+
...(genericInitializers ? { genericInitializers } : {}),
|
|
279
|
+
...(enumCasePayloads ? { enumCasePayloads } : {}),
|
|
280
|
+
...(spelledAs === undefined ? {} : { spelledAs }),
|
|
281
|
+
...(functionAliasReturns ? { functionAliasReturns } : {}),
|
|
282
|
+
...(selfConstraints ? { selfConstraints } : {}),
|
|
283
|
+
...(propertyAttributeTypes ? { propertyAttributeTypes } : {}),
|
|
284
|
+
...(optionalProperties.length > 0 ? { optionalProperties } : {}),
|
|
285
|
+
...(memberTypeAliases ? { memberTypeAliases } : {}),
|
|
286
|
+
...(genericFieldParameters ? { genericFieldParameters } : {}),
|
|
287
|
+
...(whereClause ? { whereClause } : {}),
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
// A re-opening may precede the declaration it re-opens, so its kind is
|
|
291
|
+
// settled once every own declaration of the file is known.
|
|
292
|
+
return out.map((fact) => fact.reopens ? { ...fact, symbolKind: ownKinds.get(fact.typeId) ?? fact.symbolKind } : fact);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* The names of every type declaration enclosing `node`, outermost first — an
|
|
296
|
+
* extension's included, by its written name with generic arguments dropped.
|
|
297
|
+
*/
|
|
298
|
+
function swiftEnclosingTypeNames(node) {
|
|
299
|
+
const enclosing = [];
|
|
300
|
+
for (let current = node.parent; current; current = current.parent) {
|
|
301
|
+
if (swiftTypeDeclarationKind(current) === null)
|
|
302
|
+
continue;
|
|
303
|
+
const outer = swiftTypeNameText(current.childForFieldName("name")?.text);
|
|
304
|
+
if (outer !== undefined)
|
|
305
|
+
enclosing.unshift(outer);
|
|
306
|
+
}
|
|
307
|
+
return enclosing;
|
|
308
|
+
}
|
|
309
|
+
/** The body nodes a type, extension or protocol declares its members in. */
|
|
310
|
+
const SWIFT_TYPE_BODY_NODE_TYPES = new Set(["class_body", "enum_class_body", "protocol_body"]);
|
|
311
|
+
/**
|
|
312
|
+
* The naming fact of a `typealias` declared at file scope or directly in a
|
|
313
|
+
* type body, or undefined for a local one — an alias inside a function,
|
|
314
|
+
* accessor or closure sits under that body's `statements`, never directly
|
|
315
|
+
* under the file or a type body.
|
|
316
|
+
*/
|
|
317
|
+
function swiftTypeAliasFact(node) {
|
|
318
|
+
const { parent } = node;
|
|
319
|
+
if (parent === null)
|
|
320
|
+
return undefined;
|
|
321
|
+
const atFileScope = parent.type === "source_file";
|
|
322
|
+
const inTypeBody = SWIFT_TYPE_BODY_NODE_TYPES.has(parent.type) &&
|
|
323
|
+
parent.parent !== null &&
|
|
324
|
+
swiftTypeDeclarationKind(parent.parent) !== null;
|
|
325
|
+
if (!atFileScope && !inTypeBody)
|
|
326
|
+
return undefined;
|
|
327
|
+
const name = node.childForFieldName("name")?.text.trim();
|
|
328
|
+
const symbolKind = symbolKindOf(node.type, { atTopLevel: atFileScope });
|
|
329
|
+
if (!name || symbolKind === undefined)
|
|
330
|
+
return undefined;
|
|
331
|
+
return {
|
|
332
|
+
typeId: [...swiftEnclosingTypeNames(node), name].join("."),
|
|
333
|
+
symbolKind,
|
|
334
|
+
line: node.startPosition.row + 1,
|
|
335
|
+
reopens: false,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
/** The kind a re-opening of a type the file does not declare carries: Swift extends nominal types. */
|
|
339
|
+
const SWIFT_REOPENED_NOMINAL_KIND = "class";
|
|
340
|
+
/**
|
|
341
|
+
* The nominal member typealiases of a type body (bd tea-rags-mcp-y99pg.33):
|
|
342
|
+
* `typealias Output = DataStreamRequest.Stream<Value, AFError>` →
|
|
343
|
+
* `{ Output: "DataStreamRequest.Stream" }`. Only a plain nominal alias is
|
|
344
|
+
* kept — an optional, a metatype or a function type is not the nominal a
|
|
345
|
+
* `Self.Output` member dispatches on. The aliased type is read positionally
|
|
346
|
+
* for the materialization hazard {@link swiftTypeNodeAfter} documents.
|
|
347
|
+
*/
|
|
348
|
+
function swiftMemberTypeAliases(node) {
|
|
349
|
+
const body = node.childForFieldName("body");
|
|
350
|
+
if (!body)
|
|
351
|
+
return undefined;
|
|
352
|
+
const out = createIdentifierRecord();
|
|
353
|
+
let any = false;
|
|
354
|
+
for (const member of body.namedChildren) {
|
|
355
|
+
if (member.type !== "typealias_declaration")
|
|
356
|
+
continue;
|
|
357
|
+
const alias = member.namedChildren.find((c) => c.type === "type_identifier")?.text;
|
|
358
|
+
const aliased = swiftTypeNodeAfter(member, "=");
|
|
359
|
+
if (alias === undefined || aliased?.type !== "user_type")
|
|
360
|
+
continue;
|
|
361
|
+
const { nominal } = swiftTypeFactOf(aliased);
|
|
362
|
+
if (nominal === null)
|
|
363
|
+
continue;
|
|
364
|
+
out[alias] = nominal;
|
|
365
|
+
any = true;
|
|
366
|
+
}
|
|
367
|
+
return any ? out : undefined;
|
|
368
|
+
}
|
|
369
|
+
/** The properties a type body annotates `T?` (bd tea-rags-mcp-y99pg.33), in source order. */
|
|
370
|
+
function swiftOptionalPropertyNames(node) {
|
|
371
|
+
const body = node.childForFieldName("body");
|
|
372
|
+
const out = [];
|
|
373
|
+
for (const member of body?.children ?? []) {
|
|
374
|
+
if (member.type !== "property_declaration" || !swiftDeclaresOptional(member))
|
|
375
|
+
continue;
|
|
376
|
+
const name = singleIdentifierPatternName(member.childForFieldName("name"));
|
|
377
|
+
if (name && !out.includes(name))
|
|
378
|
+
out.push(name);
|
|
379
|
+
}
|
|
380
|
+
return out;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* The UpperCamelCase attribute types each property of a type body carries, in
|
|
384
|
+
* source order (bd tea-rags-mcp-y99pg.33): `@Published var result` →
|
|
385
|
+
* `{ result: ["Published"] }`. Which of them is the property's wrapper — the
|
|
386
|
+
* type `$result` projects through — is the resolver's question: `@MainActor`
|
|
387
|
+
* is spelled the same way and wraps nothing. A lowercase attribute
|
|
388
|
+
* (`@objc`, `@available`) is a compiler attribute, never a type.
|
|
389
|
+
*/
|
|
390
|
+
function swiftPropertyAttributeTypes(node) {
|
|
391
|
+
const body = node.childForFieldName("body");
|
|
392
|
+
if (!body)
|
|
393
|
+
return undefined;
|
|
394
|
+
const out = createIdentifierRecord();
|
|
395
|
+
let any = false;
|
|
396
|
+
for (const member of body.children) {
|
|
397
|
+
if (member.type !== "property_declaration")
|
|
398
|
+
continue;
|
|
399
|
+
const name = singleIdentifierPatternName(member.childForFieldName("name"));
|
|
400
|
+
const modifiers = member.children.find((c) => c.type === "modifiers");
|
|
401
|
+
if (!name || !modifiers)
|
|
402
|
+
continue;
|
|
403
|
+
const types = [];
|
|
404
|
+
for (const attribute of modifiers.namedChildren) {
|
|
405
|
+
if (attribute.type !== "attribute")
|
|
406
|
+
continue;
|
|
407
|
+
const { nominal } = swiftTypeFactOf(attribute.namedChildren.find((c) => c.type === "user_type") ?? null);
|
|
408
|
+
if (nominal !== null && /^_*[A-Z]/.test(nominal))
|
|
409
|
+
types.push(nominal);
|
|
410
|
+
}
|
|
411
|
+
if (types.length === 0)
|
|
412
|
+
continue;
|
|
413
|
+
out[name] = types;
|
|
414
|
+
any = true;
|
|
415
|
+
}
|
|
416
|
+
return any ? out : undefined;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* What an extension's `where` clause says `Self` is (bd tea-rags-mcp-y99pg.33):
|
|
420
|
+
* `extension Download where Self: DataSerializer` — inside that body `Self`
|
|
421
|
+
* conforms to `DataSerializer` too, so an implicit-self call reaches its
|
|
422
|
+
* requirements. `Self == X` names `X` the same way. A constraint on any other
|
|
423
|
+
* name (`where Value: Equatable`) says nothing about `Self`. Each constraint
|
|
424
|
+
* is read positionally — subject first, constraining type last — for the
|
|
425
|
+
* materialization hazard {@link swiftTypeNodeAfter} documents.
|
|
426
|
+
*/
|
|
427
|
+
function swiftSelfConstraints(node) {
|
|
428
|
+
const types = [];
|
|
429
|
+
for (const clause of node.children) {
|
|
430
|
+
if (clause.type !== "type_constraints")
|
|
431
|
+
continue;
|
|
432
|
+
for (const constraint of clause.namedChildren) {
|
|
433
|
+
const relation = constraint.namedChildren.find((c) => c.type === "inheritance_constraint" || c.type === "equality_constraint");
|
|
434
|
+
if (relation?.namedChildren[0]?.text !== "Self")
|
|
435
|
+
continue;
|
|
436
|
+
const { nominal } = swiftTypeFactOf(relation.namedChildren[relation.namedChildCount - 1]);
|
|
437
|
+
if (nominal !== null && !types.includes(nominal))
|
|
438
|
+
types.push(nominal);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (types.length === 0)
|
|
442
|
+
return undefined;
|
|
443
|
+
return { types, startLine: node.startPosition.row + 1, endLine: node.endPosition.row + 1 };
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* A re-opening's `where` clause with the lines it scopes (bd
|
|
447
|
+
* tea-rags-mcp-y99pg.34): each same-type requirement's type as written, each
|
|
448
|
+
* conformance or superclass requirement's nominal. Read positionally — the
|
|
449
|
+
* constrained name first, the type last — for the materialization hazard
|
|
450
|
+
* {@link swiftTypeNodeAfter} documents. Undefined when the clause states
|
|
451
|
+
* neither.
|
|
452
|
+
*/
|
|
453
|
+
function swiftWhereClauseFact(node) {
|
|
454
|
+
const sameType = createIdentifierRecord();
|
|
455
|
+
const bounds = createIdentifierRecord();
|
|
456
|
+
let anySameType = false;
|
|
457
|
+
let anyBound = false;
|
|
458
|
+
for (const clause of node.children) {
|
|
459
|
+
if (clause.type !== "type_constraints")
|
|
460
|
+
continue;
|
|
461
|
+
for (const constraint of clause.namedChildren) {
|
|
462
|
+
for (const requirement of constraint.namedChildren) {
|
|
463
|
+
const name = requirement.namedChildren[0]?.text.trim();
|
|
464
|
+
const type = requirement.namedChildren[requirement.namedChildCount - 1];
|
|
465
|
+
if (!name || !type || requirement.namedChildCount < 2 || Object.hasOwn(sameType, name))
|
|
466
|
+
continue;
|
|
467
|
+
if (requirement.type === "equality_constraint") {
|
|
468
|
+
sameType[name] = type.text.trim();
|
|
469
|
+
anySameType = true;
|
|
470
|
+
}
|
|
471
|
+
else if (requirement.type === "inheritance_constraint" && !Object.hasOwn(bounds, name)) {
|
|
472
|
+
const { nominal } = swiftTypeFactOf(type);
|
|
473
|
+
if (nominal === null)
|
|
474
|
+
continue;
|
|
475
|
+
bounds[name] = nominal;
|
|
476
|
+
anyBound = true;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
if (!anySameType && !anyBound)
|
|
482
|
+
return undefined;
|
|
483
|
+
return {
|
|
484
|
+
startLine: node.startPosition.row + 1,
|
|
485
|
+
endLine: node.endPosition.row + 1,
|
|
486
|
+
...(anySameType ? { sameType } : {}),
|
|
487
|
+
...(anyBound ? { bounds } : {}),
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* What each function-typed `typealias` a type body declares returns (bd
|
|
492
|
+
* tea-rags-mcp-y99pg.22): `typealias Handler = (Callback) -> DataRequest` →
|
|
493
|
+
* `Handler: "DataRequest"`. Read positionally, past `=` and then `->`.
|
|
494
|
+
*/
|
|
495
|
+
function swiftFunctionAliasReturns(node) {
|
|
496
|
+
const body = node.childForFieldName("body");
|
|
497
|
+
if (!body)
|
|
498
|
+
return undefined;
|
|
499
|
+
const out = createIdentifierRecord();
|
|
500
|
+
let any = false;
|
|
501
|
+
for (const member of body.namedChildren) {
|
|
502
|
+
if (member.type !== "typealias_declaration")
|
|
503
|
+
continue;
|
|
504
|
+
const alias = member.namedChildren.find((c) => c.type === "type_identifier")?.text;
|
|
505
|
+
const aliased = swiftTypeNodeAfter(member, "=");
|
|
506
|
+
if (alias === undefined || aliased?.type !== "function_type")
|
|
507
|
+
continue;
|
|
508
|
+
const returned = swiftTypeFactOf(swiftTypeNodeAfter(aliased, "->")).nominal;
|
|
509
|
+
if (returned === null || SWIFT_UNUSABLE_RETURN_TYPES.has(returned))
|
|
510
|
+
continue;
|
|
511
|
+
out[alias] = returned;
|
|
512
|
+
any = true;
|
|
513
|
+
}
|
|
514
|
+
return any ? out : undefined;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* An enum's payload-carrying cases, each slot's nominal type in position
|
|
518
|
+
* order (bd tea-rags-mcp-y99pg.16). One `case a(X), b(Y)` entry declares
|
|
519
|
+
* several cases, each name followed by its own parameter list. Slots are read
|
|
520
|
+
* positionally — a slot's label is the `simple_identifier` beside it, never a
|
|
521
|
+
* type — for the materialization hazard {@link swiftTypeNodeAfter} documents.
|
|
522
|
+
*/
|
|
523
|
+
function swiftEnumCasePayloads(node) {
|
|
524
|
+
const body = node.childForFieldName("body");
|
|
525
|
+
if (!body)
|
|
526
|
+
return undefined;
|
|
527
|
+
const cases = createIdentifierRecord();
|
|
528
|
+
let any = false;
|
|
529
|
+
for (const entry of body.namedChildren) {
|
|
530
|
+
if (entry.type !== "enum_entry")
|
|
531
|
+
continue;
|
|
532
|
+
let caseName = null;
|
|
533
|
+
for (const child of entry.namedChildren) {
|
|
534
|
+
if (child.type === "simple_identifier")
|
|
535
|
+
caseName = child.text;
|
|
536
|
+
else if (child.type === "enum_type_parameters" && caseName !== null) {
|
|
537
|
+
cases[caseName] = child.namedChildren
|
|
538
|
+
.filter((slot) => slot.type !== "simple_identifier" && slot.type !== "comment")
|
|
539
|
+
.map((slot) => swiftTypeFactOf(slot).nominal);
|
|
540
|
+
any = true;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
return any ? cases : undefined;
|
|
545
|
+
}
|
|
546
|
+
/** A declaration's own generic parameter names: `class Protected<Value>` → `["Value"]`. */
|
|
547
|
+
function swiftTypeParameterNames(node) {
|
|
548
|
+
const list = node.children.find((c) => c.type === "type_parameters");
|
|
549
|
+
if (!list)
|
|
550
|
+
return [];
|
|
551
|
+
const names = [];
|
|
552
|
+
for (const parameter of list.namedChildren) {
|
|
553
|
+
if (parameter.type !== "type_parameter")
|
|
554
|
+
continue;
|
|
555
|
+
const identifier = parameter.namedChildren.find((c) => c.type === "type_identifier");
|
|
556
|
+
if (identifier)
|
|
557
|
+
names.push(identifier.text);
|
|
558
|
+
}
|
|
559
|
+
return names;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* What a type body says that a USE of the type in another file needs in
|
|
563
|
+
* order to type a closure parameter (bd tea-rags-mcp-y99pg.13): the generic
|
|
564
|
+
* arguments its stored properties are declared with, and the parameter types
|
|
565
|
+
* of the one closure each of its methods takes. Both are read positionally —
|
|
566
|
+
* `type_arguments` and `tuple_type_item` children, never fields — for the
|
|
567
|
+
* materialization hazard {@link swiftTypeNodeAfter} documents.
|
|
568
|
+
*/
|
|
569
|
+
function swiftGenericMemberFacts(node, genericParameters) {
|
|
570
|
+
const body = node.childForFieldName("body");
|
|
571
|
+
if (!body)
|
|
572
|
+
return {};
|
|
573
|
+
const fields = createIdentifierRecord();
|
|
574
|
+
const genericFields = createIdentifierRecord();
|
|
575
|
+
let anyGenericField = false;
|
|
576
|
+
const constructions = createIdentifierRecord();
|
|
577
|
+
const closures = createIdentifierRecord();
|
|
578
|
+
const initializers = [];
|
|
579
|
+
const closureResults = new Map();
|
|
580
|
+
let anyField = false;
|
|
581
|
+
let anyConstruction = false;
|
|
582
|
+
let anyClosure = false;
|
|
583
|
+
for (const member of body.children) {
|
|
584
|
+
if (member.type === "property_declaration") {
|
|
585
|
+
const name = singleIdentifierPatternName(member.childForFieldName("name"));
|
|
586
|
+
if (!name)
|
|
587
|
+
continue;
|
|
588
|
+
const annotation = member.children.find((c) => c.type === "type_annotation");
|
|
589
|
+
const value = annotation ? null : member.childForFieldName("value");
|
|
590
|
+
// `Protected<[T]>(…)` spells its arguments on the construction (bd tea-rags-mcp-y99pg.26).
|
|
591
|
+
const typeNode = annotation
|
|
592
|
+
? swiftTypeNodeAfter(annotation, ":")
|
|
593
|
+
: value?.type === "constructor_expression"
|
|
594
|
+
? (value.namedChildren.find((c) => c.type === "user_type") ?? null)
|
|
595
|
+
: null;
|
|
596
|
+
// `var value: Value` / `Value?` — typed by whatever a receiver binds the parameter to (bd tea-rags-mcp-y99pg.34).
|
|
597
|
+
const unwrapped = typeNode?.type === "optional_type" ? (typeNode.namedChildren[0] ?? null) : typeNode;
|
|
598
|
+
if (unwrapped?.type === "user_type" && genericParameters.includes(unwrapped.text.trim())) {
|
|
599
|
+
genericFields[name] = unwrapped.text.trim();
|
|
600
|
+
anyGenericField = true;
|
|
601
|
+
continue;
|
|
602
|
+
}
|
|
603
|
+
// `[K: V]` / `[T]` spell `Dictionary<K, V>` / `Array<T>`'s arguments (bd tea-rags-mcp-y99pg.39).
|
|
604
|
+
const args = typeNode?.type === "user_type"
|
|
605
|
+
? typeNode.children.find((c) => c.type === "type_arguments")
|
|
606
|
+
: typeNode?.type === "array_type" || typeNode?.type === "dictionary_type"
|
|
607
|
+
? typeNode
|
|
608
|
+
: null;
|
|
609
|
+
if (args) {
|
|
610
|
+
fields[name] = args.namedChildren.map((arg) => swiftTypeFactOf(arg).nominal);
|
|
611
|
+
anyField = true;
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
const construction = value ? swiftFieldConstruction(value) : null;
|
|
615
|
+
if (construction) {
|
|
616
|
+
constructions[name] = construction;
|
|
617
|
+
anyConstruction = true;
|
|
618
|
+
}
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
if (member.type === "init_declaration") {
|
|
622
|
+
const initializer = swiftGenericInitializer(member, genericParameters);
|
|
623
|
+
if (initializer)
|
|
624
|
+
initializers.push(initializer);
|
|
625
|
+
}
|
|
626
|
+
else if (member.type !== "function_declaration" && member.type !== "protocol_function_declaration")
|
|
627
|
+
continue;
|
|
628
|
+
// An initializer publishes under `init`, the member a construction's
|
|
629
|
+
// closure is read off (bd tea-rags-mcp-y99pg.29).
|
|
630
|
+
const name = member.type === "init_declaration" ? "init" : member.childForFieldName("name")?.text;
|
|
631
|
+
if (name && member.type !== "init_declaration") {
|
|
632
|
+
const returnsClosureResult = swiftReturnsClosureResult(member);
|
|
633
|
+
closureResults.set(name, (closureResults.get(name) ?? true) && returnsClosureResult);
|
|
634
|
+
}
|
|
635
|
+
const types = name ? swiftClosureParameterTypeNames(member, genericParameters) : undefined;
|
|
636
|
+
if (!name || types === undefined)
|
|
637
|
+
continue;
|
|
638
|
+
anyClosure = true;
|
|
639
|
+
if (!Object.hasOwn(closures, name))
|
|
640
|
+
closures[name] = types;
|
|
641
|
+
else if (!sameSwiftTypeNames(closures[name], types))
|
|
642
|
+
closures[name] = null;
|
|
643
|
+
}
|
|
644
|
+
const closureResultMembers = [...closureResults].filter(([, every]) => every).map(([name]) => name);
|
|
645
|
+
return {
|
|
646
|
+
...(closureResultMembers.length > 0 ? { closureResultMembers } : {}),
|
|
647
|
+
...(anyField ? { fieldTypeArguments: fields } : {}),
|
|
648
|
+
...(anyConstruction ? { fieldConstructions: constructions } : {}),
|
|
649
|
+
...(anyClosure ? { memberClosureParameters: closures } : {}),
|
|
650
|
+
...(initializers.length > 0 ? { genericInitializers: initializers } : {}),
|
|
651
|
+
...(anyGenericField ? { genericFieldParameters: genericFields } : {}),
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* `Protected(State())` → the constructed type and each argument's label and
|
|
656
|
+
* constructed nominal — null for anything but a CapWords construction with at
|
|
657
|
+
* least one argument of known type (bd tea-rags-mcp-y99pg.26).
|
|
658
|
+
*/
|
|
659
|
+
function swiftFieldConstruction(value) {
|
|
660
|
+
if (value.type !== "call_expression")
|
|
661
|
+
return null;
|
|
662
|
+
const callee = value.namedChildren.find((c) => c.type !== "call_suffix");
|
|
663
|
+
if (callee?.type !== "simple_identifier" || !SWIFT_TYPE_NAME_TEXT.test(callee.text))
|
|
664
|
+
return null;
|
|
665
|
+
const suffix = value.namedChildren.find((c) => c.type === "call_suffix");
|
|
666
|
+
const list = suffix?.children.find((c) => c.type === "value_arguments")?.namedChildren ?? [];
|
|
667
|
+
const args = [];
|
|
668
|
+
for (const arg of list) {
|
|
669
|
+
if (arg.type !== "value_argument")
|
|
670
|
+
continue;
|
|
671
|
+
const label = arg.children.find((c) => c.type === "value_argument_label")?.text ?? null;
|
|
672
|
+
const expression = arg.namedChildren.filter((c) => c.type !== "value_argument_label").at(-1) ?? null;
|
|
673
|
+
args.push({ label, type: constructedTypeFact(expression).nominal });
|
|
674
|
+
}
|
|
675
|
+
return args.some((arg) => arg.type !== null) ? { type: callee.text, arguments: args } : null;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* An `init` whose parameters include one typed exactly as a generic parameter
|
|
679
|
+
* of the enclosing type: its labels and what each position binds. Read
|
|
680
|
+
* positionally, as every Swift parameter here.
|
|
681
|
+
*/
|
|
682
|
+
function swiftGenericInitializer(init, genericParameters) {
|
|
683
|
+
if (genericParameters.length === 0)
|
|
684
|
+
return null;
|
|
685
|
+
const labels = [];
|
|
686
|
+
const binds = [];
|
|
687
|
+
for (const parameter of init.children) {
|
|
688
|
+
if (parameter.type !== "parameter")
|
|
689
|
+
continue;
|
|
690
|
+
const colon = parameter.children.findIndex((c) => c.type === ":");
|
|
691
|
+
const names = parameter.children
|
|
692
|
+
.slice(0, colon === -1 ? undefined : colon)
|
|
693
|
+
.filter((c) => c.type === "simple_identifier")
|
|
694
|
+
.map((c) => c.text);
|
|
695
|
+
labels.push(names[0] === "_" ? null : (names[0] ?? null));
|
|
696
|
+
const typeNode = swiftParameterTypeNode(parameter);
|
|
697
|
+
const written = typeNode?.type === "user_type" ? typeNode.text.trim() : undefined;
|
|
698
|
+
binds.push(written !== undefined && genericParameters.includes(written) ? written : null);
|
|
699
|
+
}
|
|
700
|
+
return binds.some((bound) => bound !== null) ? { labels, binds } : null;
|
|
701
|
+
}
|
|
702
|
+
/** Whether two overloads state the same closure parameter types; `null` (poisoned) equals nothing. */
|
|
703
|
+
function sameSwiftTypeNames(a, b) {
|
|
704
|
+
if (a === null)
|
|
705
|
+
return false;
|
|
706
|
+
if (b === null)
|
|
707
|
+
return false;
|
|
708
|
+
return a.length === b.length && a.every((name, i) => name === b[i]);
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* The declared parameter types of the ONE function-typed parameter `fn`
|
|
712
|
+
* takes that itself takes a parameter — `undefined` when it takes none,
|
|
713
|
+
* `null` when it takes two or more.
|
|
714
|
+
* A name the enclosing type declares as a generic parameter is kept as that
|
|
715
|
+
* name, to be bound by a receiver's type arguments; a method's own generic
|
|
716
|
+
* parameter reads as its constraint, or nothing.
|
|
717
|
+
*/
|
|
718
|
+
function swiftClosureParameterTypeNames(fn, genericParameters) {
|
|
719
|
+
let found;
|
|
720
|
+
for (const parameter of fn.children) {
|
|
721
|
+
if (parameter.type !== "parameter")
|
|
722
|
+
continue;
|
|
723
|
+
const functionType = swiftFunctionTypeNode(swiftParameterTypeNode(parameter));
|
|
724
|
+
if (!functionType)
|
|
725
|
+
continue;
|
|
726
|
+
const params = functionType.children.find((c) => c.type === "tuple_type");
|
|
727
|
+
// A slot whose function takes nothing (`onTermination: (() -> Void)?`)
|
|
728
|
+
// can never receive a closure that names a parameter, so it does not
|
|
729
|
+
// compete for one (bd tea-rags-mcp-y99pg.29).
|
|
730
|
+
if (!(params?.namedChildren ?? []).some((item) => item.type === "tuple_type_item"))
|
|
731
|
+
continue;
|
|
732
|
+
if (found !== undefined)
|
|
733
|
+
return null;
|
|
734
|
+
const types = [];
|
|
735
|
+
for (const item of params?.namedChildren ?? []) {
|
|
736
|
+
if (item.type !== "tuple_type_item")
|
|
737
|
+
continue;
|
|
738
|
+
const typeNode = item.namedChildren[item.namedChildCount - 1] ?? null;
|
|
739
|
+
const written = typeNode?.type === "user_type" ? typeNode.text : undefined;
|
|
740
|
+
if (written !== undefined && genericParameters.includes(written))
|
|
741
|
+
types.push(written);
|
|
742
|
+
else {
|
|
743
|
+
types.push(swiftSpelledWithArguments(swiftGenericResolvedFact(swiftTypeFactOf(typeNode), fn).nominal, typeNode, fn, genericParameters));
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
found = types;
|
|
747
|
+
}
|
|
748
|
+
return found;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Whether `fn` returns exactly what its one value-taking closure returns: a
|
|
752
|
+
* method generic `U` spelled as the declared return AND as that closure's
|
|
753
|
+
* return — `func read<U>(_ closure: (Value) throws -> U) rethrows -> U` (bd
|
|
754
|
+
* tea-rags-mcp-y99pg.37). Read positionally past `->`, for the materialization
|
|
755
|
+
* hazard {@link swiftTypeNodeAfter} documents. A second function-typed
|
|
756
|
+
* parameter, a wrapped `[U]` / `U?` return, or a closure taking nothing
|
|
757
|
+
* disqualifies it.
|
|
758
|
+
*/
|
|
759
|
+
function swiftReturnsClosureResult(fn) {
|
|
760
|
+
const generics = swiftTypeParameterNames(fn);
|
|
761
|
+
if (generics.length === 0)
|
|
762
|
+
return false;
|
|
763
|
+
const returned = swiftTypeNodeAfter(fn, "->");
|
|
764
|
+
if (returned?.type !== "user_type" || !generics.includes(returned.text.trim()))
|
|
765
|
+
return false;
|
|
766
|
+
let closure = null;
|
|
767
|
+
for (const parameter of fn.children) {
|
|
768
|
+
if (parameter.type !== "parameter")
|
|
769
|
+
continue;
|
|
770
|
+
const functionType = swiftFunctionTypeNode(swiftParameterTypeNode(parameter));
|
|
771
|
+
if (!functionType)
|
|
772
|
+
continue;
|
|
773
|
+
if (closure !== null)
|
|
774
|
+
return false;
|
|
775
|
+
closure = functionType;
|
|
776
|
+
}
|
|
777
|
+
if (closure === null)
|
|
778
|
+
return false;
|
|
779
|
+
const params = closure.children.find((c) => c.type === "tuple_type");
|
|
780
|
+
if (!(params?.namedChildren ?? []).some((item) => item.type === "tuple_type_item"))
|
|
781
|
+
return false;
|
|
782
|
+
return swiftTypeNodeAfter(closure, "->")?.text.trim() === returned.text.trim();
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* `nominal` spelled with the generic arguments `typeNode` states —
|
|
786
|
+
* `Result<URLRequest, Error>` for `Result<URLRequest, any Error>` (bd
|
|
787
|
+
* tea-rags-mcp-y99pg.32) — so a reader in another file can bind the
|
|
788
|
+
* declaring SDK type's parameters (`Result.get()` returns `Success`). Each
|
|
789
|
+
* argument is reduced to its nominal. The bare nominal when there are no
|
|
790
|
+
* arguments, when one names nothing, or when one is a generic parameter in
|
|
791
|
+
* scope: that is bound per use, not declared. Read positionally off
|
|
792
|
+
* `type_arguments`, past an optional's `?`.
|
|
793
|
+
*/
|
|
794
|
+
function swiftSpelledWithArguments(nominal, typeNode, at, genericParameters) {
|
|
795
|
+
if (nominal === null)
|
|
796
|
+
return null;
|
|
797
|
+
let bare = typeNode;
|
|
798
|
+
while (bare?.type === "optional_type")
|
|
799
|
+
bare = bare.namedChildren[0] ?? null;
|
|
800
|
+
if (bare?.type !== "user_type")
|
|
801
|
+
return nominal;
|
|
802
|
+
const args = bare.children.find((c) => c.type === "type_arguments")?.namedChildren ?? [];
|
|
803
|
+
if (args.length === 0)
|
|
804
|
+
return nominal;
|
|
805
|
+
const names = [];
|
|
806
|
+
for (const arg of args) {
|
|
807
|
+
const name = swiftTypeFactOf(arg).nominal;
|
|
808
|
+
if (name === null || genericParameters.includes(name) || swiftGenericConstraint(name, at) !== undefined) {
|
|
809
|
+
return nominal;
|
|
810
|
+
}
|
|
811
|
+
names.push(name);
|
|
812
|
+
}
|
|
813
|
+
return `${nominal}<${names.join(", ")}>`;
|
|
814
|
+
}
|
|
815
|
+
/** `class` / `struct` / `enum` / `actor` / `extension` / `protocol`, or null for any other node. */
|
|
816
|
+
export function swiftTypeDeclarationKind(node) {
|
|
817
|
+
if (node.type === "protocol_declaration")
|
|
818
|
+
return "protocol";
|
|
819
|
+
if (node.type !== "class_declaration")
|
|
820
|
+
return null;
|
|
821
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
822
|
+
const child = node.child(i);
|
|
823
|
+
if (child === null || child.isNamed)
|
|
824
|
+
continue;
|
|
825
|
+
if (child.type === "extension")
|
|
826
|
+
return "extension";
|
|
827
|
+
const keyword = SWIFT_TYPE_DECLARATION_KEYWORDS.get(child.type);
|
|
828
|
+
if (keyword !== undefined)
|
|
829
|
+
return keyword;
|
|
830
|
+
}
|
|
831
|
+
return null;
|
|
832
|
+
}
|
|
833
|
+
/** A declared or extended type's name with any generic argument list dropped (`Box<T>` → `Box`). */
|
|
834
|
+
function swiftTypeNameText(text) {
|
|
835
|
+
const name = text?.split("<")[0]?.trim();
|
|
836
|
+
return name !== undefined && name.length > 0 ? name : undefined;
|
|
837
|
+
}
|
|
838
|
+
/** Every inheritance specifier's type name, generic arguments dropped, in clause order. */
|
|
839
|
+
function swiftInheritedTypeNames(node) {
|
|
840
|
+
const out = [];
|
|
841
|
+
for (const child of node.namedChildren) {
|
|
842
|
+
if (child.type !== "inheritance_specifier")
|
|
843
|
+
continue;
|
|
844
|
+
const name = swiftTypeNameText(child.text);
|
|
845
|
+
if (name !== undefined)
|
|
846
|
+
out.push(name);
|
|
847
|
+
}
|
|
848
|
+
return out;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Every `func` this file declares with a usable return type, keyed by the
|
|
852
|
+
* callee's OWN composed symbolId (`Store#load`, `Store.make`,
|
|
853
|
+
* `Store.Inner#child`, `load~2` for a second overload) — the run-global
|
|
854
|
+
* `structuredReturnTypes` channel (bd tea-rags-mcp-kkwg3).
|
|
855
|
+
*
|
|
856
|
+
* The resolver reads it one way only: it first resolves a call hop to the
|
|
857
|
+
* declaration the call lands on — own type, then superclass — and then asks
|
|
858
|
+
* what THAT symbol returns. So the key must be the symbolId the chunk carries,
|
|
859
|
+
* overload suffix included, and it is taken from the chunk collected at the
|
|
860
|
+
* declaration's own start line rather than recomposed here: two spellings of
|
|
861
|
+
* one id are exactly the drift `symbolid-convention.md` exists to prevent.
|
|
862
|
+
*
|
|
863
|
+
* The value is read by the same {@link swiftDeclaredReturnFact} the file-local
|
|
864
|
+
* call-result typing reads, so the two can never disagree about what a
|
|
865
|
+
* signature says — including what it declines (`Void`, `Self`, a generic
|
|
866
|
+
* parameter, an `[T]` return, which types no member).
|
|
867
|
+
*/
|
|
868
|
+
function collectSwiftStructuredReturnTypes(root, chunks) {
|
|
869
|
+
const idsByLine = new Map();
|
|
870
|
+
for (const chunk of chunks) {
|
|
871
|
+
const ids = idsByLine.get(chunk.startLine);
|
|
872
|
+
if (ids)
|
|
873
|
+
ids.push(chunk.symbolId);
|
|
874
|
+
else
|
|
875
|
+
idsByLine.set(chunk.startLine, [chunk.symbolId]);
|
|
876
|
+
}
|
|
877
|
+
const out = createIdentifierRecord();
|
|
878
|
+
walk(root, (node) => {
|
|
879
|
+
if (node.type !== "function_declaration" && node.type !== "protocol_function_declaration")
|
|
880
|
+
return;
|
|
881
|
+
const name = node.childForFieldName("name")?.text;
|
|
882
|
+
const nominal = name === undefined ? null : (swiftDeclaredReturnFact(node)?.nominal ?? swiftSelfReturnMarker(node));
|
|
883
|
+
if (name === undefined || nominal === null)
|
|
884
|
+
return;
|
|
885
|
+
const symbolId = idsByLine.get(node.startPosition.row + 1)?.find((id) => composedIdNames(id, name));
|
|
886
|
+
if (symbolId !== undefined)
|
|
887
|
+
out[symbolId] = { form: "instance", name: nominal };
|
|
888
|
+
});
|
|
889
|
+
return out;
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* chunk index → the argument-label signature of the `func` / `init` that chunk
|
|
893
|
+
* IS, matched the way {@link collectSwiftStructuredReturnTypes} matches a
|
|
894
|
+
* declaration to its chunk: same start line, final id segment naming it.
|
|
895
|
+
*
|
|
896
|
+
* The same walk stamps each chunk's symbol kind (tea-rags-mcp-vi0wx): every node
|
|
897
|
+
* `swiftNameOf` names is joined to its chunk on (start line, id names the
|
|
898
|
+
* node's name), and `symbolKindOf` reads its kind — so the kind costs no extra
|
|
899
|
+
* traversal of the file.
|
|
900
|
+
*/
|
|
901
|
+
function collectSwiftChunkDeclarations(root, chunks) {
|
|
902
|
+
const indicesByLine = new Map();
|
|
903
|
+
chunks.forEach((chunk, index) => {
|
|
904
|
+
const at = indicesByLine.get(chunk.startLine);
|
|
905
|
+
if (at)
|
|
906
|
+
at.push(index);
|
|
907
|
+
else
|
|
908
|
+
indicesByLine.set(chunk.startLine, [index]);
|
|
909
|
+
});
|
|
910
|
+
const out = new Map();
|
|
911
|
+
const symbolKinds = new Map();
|
|
912
|
+
walk(root, (node) => {
|
|
913
|
+
const named = swiftNameOf(node);
|
|
914
|
+
if (named !== null) {
|
|
915
|
+
const kind = symbolKindOf(node.type, {
|
|
916
|
+
atTopLevel: !hasEnclosingSwiftTypeDeclaration(node),
|
|
917
|
+
typeKeyword: swiftTypeDeclarationKind(node),
|
|
918
|
+
});
|
|
919
|
+
const index = kind === undefined
|
|
920
|
+
? undefined
|
|
921
|
+
: indicesByLine
|
|
922
|
+
.get(node.startPosition.row + 1)
|
|
923
|
+
?.find((i) => !symbolKinds.has(i) && symbolIdNames(chunks[i].symbolId, named.name));
|
|
924
|
+
if (index !== undefined && kind !== undefined)
|
|
925
|
+
symbolKinds.set(index, kind);
|
|
926
|
+
}
|
|
927
|
+
if (node.type !== "function_declaration" &&
|
|
928
|
+
node.type !== "protocol_function_declaration" &&
|
|
929
|
+
node.type !== "init_declaration") {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
const name = node.type === "init_declaration" ? "init" : node.childForFieldName("name")?.text;
|
|
933
|
+
if (name === undefined)
|
|
934
|
+
return;
|
|
935
|
+
const index = indicesByLine.get(node.startPosition.row + 1)?.find((i) => composedIdNames(chunks[i].symbolId, name));
|
|
936
|
+
if (index !== undefined && !out.has(index))
|
|
937
|
+
out.set(index, swiftCallableSignature(node));
|
|
938
|
+
});
|
|
939
|
+
return { signatures: out, symbolKinds };
|
|
940
|
+
}
|
|
941
|
+
/** Whether a type, extension or protocol declaration encloses `node` — a `func` there is a method. */
|
|
942
|
+
function hasEnclosingSwiftTypeDeclaration(node) {
|
|
943
|
+
for (let current = node.parent; current; current = current.parent) {
|
|
944
|
+
if (current.type === "class_declaration" || current.type === "protocol_declaration")
|
|
945
|
+
return true;
|
|
946
|
+
}
|
|
947
|
+
return false;
|
|
948
|
+
}
|
|
949
|
+
/** Whether a composed id's final segment is `name`, an overload suffix aside. */
|
|
950
|
+
function composedIdNames(symbolId, name) {
|
|
951
|
+
const base = symbolId.replace(OVERLOAD_SUFFIX, "");
|
|
952
|
+
return base === name || base.endsWith(`#${name}`) || base.endsWith(`.${name}`);
|
|
953
|
+
}
|
|
954
|
+
/** The suffix `collectSymbols` appends to the 2nd and later declaration of one composed id. */
|
|
955
|
+
const OVERLOAD_SUFFIX = /~\d+$/;
|
|
168
956
|
/**
|
|
169
957
|
* The declaration keywords `class_declaration` covers. tree-sitter-swift gives
|
|
170
958
|
* all four the same node type, so the keyword token is the only evidence of
|
|
@@ -172,7 +960,7 @@ export function extractFromSwiftFile(input) {
|
|
|
172
960
|
* an `enum` conform to protocols, and Swift forbids an `actor` from inheriting
|
|
173
961
|
* at all.
|
|
174
962
|
*/
|
|
175
|
-
const SWIFT_TYPE_DECLARATION_KEYWORDS = new
|
|
963
|
+
const SWIFT_TYPE_DECLARATION_KEYWORDS = new Map(["class", "struct", "enum", "actor"].map((keyword) => [keyword, keyword]));
|
|
176
964
|
/**
|
|
177
965
|
* `className → superclass`, for the `super` pass alone.
|
|
178
966
|
*
|
|
@@ -192,7 +980,7 @@ const SWIFT_TYPE_DECLARATION_KEYWORDS = new Set(["class", "struct", "enum", "act
|
|
|
192
980
|
* channel for anything but `super` must revisit it.
|
|
193
981
|
*/
|
|
194
982
|
function collectSwiftClassExtends(root) {
|
|
195
|
-
const out =
|
|
983
|
+
const out = createIdentifierRecord();
|
|
196
984
|
walk(root, (node) => {
|
|
197
985
|
if (node.type !== "class_declaration")
|
|
198
986
|
return;
|
|
@@ -273,35 +1061,180 @@ function stripImportKeywords(text) {
|
|
|
273
1061
|
function collectSwiftCalls(root) {
|
|
274
1062
|
const out = [];
|
|
275
1063
|
walk(root, (node) => {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const suffix = node.children.find((c) => c.type === "call_suffix");
|
|
279
|
-
// Bracketed suffix = subscript read (`items[i]`, `dict["k"]`), not a call.
|
|
280
|
-
if (!suffix || suffix.text.startsWith("["))
|
|
281
|
-
return;
|
|
282
|
-
const callee = node.namedChildren.find((c) => c !== suffix);
|
|
283
|
-
if (!callee)
|
|
284
|
-
return;
|
|
285
|
-
const startLine = node.startPosition.row + 1;
|
|
286
|
-
if (callee.type === "simple_identifier") {
|
|
287
|
-
out.push({ callText: node.text, receiver: null, member: callee.text, startLine });
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (callee.type !== "navigation_expression")
|
|
291
|
-
return;
|
|
292
|
-
const target = callee.childForFieldName("target");
|
|
293
|
-
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix");
|
|
294
|
-
if (!target || !member)
|
|
1064
|
+
const shape = swiftCallSiteShape(node);
|
|
1065
|
+
if (shape === null)
|
|
295
1066
|
return;
|
|
1067
|
+
// The argument list: a construction's `constructor_suffix`, a call's `call_suffix`.
|
|
1068
|
+
const suffix = node.children.find((c) => c.type === "constructor_suffix" || c.type === "call_suffix");
|
|
296
1069
|
out.push({
|
|
297
1070
|
callText: node.text,
|
|
298
|
-
receiver:
|
|
299
|
-
|
|
300
|
-
|
|
1071
|
+
receiver: shape.receiver,
|
|
1072
|
+
...(shape.writtenReceiver === undefined ? {} : { writtenReceiver: shape.writtenReceiver }),
|
|
1073
|
+
member: shape.member,
|
|
1074
|
+
startLine: node.startPosition.row + 1,
|
|
1075
|
+
...(suffix ? swiftCallArguments(suffix) : {}),
|
|
301
1076
|
});
|
|
302
1077
|
});
|
|
303
1078
|
return out;
|
|
304
1079
|
}
|
|
1080
|
+
/**
|
|
1081
|
+
* The `{ receiver, member }` of the `CallRef` {@link collectSwiftCalls} emits
|
|
1082
|
+
* for `node`, or null when it emits none. Read by the identifier-declaration
|
|
1083
|
+
* pass so a declaration's bound callee matches that `CallRef` by construction
|
|
1084
|
+
* (bd tea-rags-mcp-4p3sb.16).
|
|
1085
|
+
*
|
|
1086
|
+
* `Protected<[T]>(…)` is a construction the grammar does not call a call: a
|
|
1087
|
+
* bare call named by the constructed nominal, when it is undotted. A bracketed
|
|
1088
|
+
* suffix is a subscript read (`items[i]`, `dict["k"]`), not a call. Invoking a
|
|
1089
|
+
* closure VALUE calls no declared symbol (bd tea-rags-mcp-y99pg.8).
|
|
1090
|
+
*/
|
|
1091
|
+
export function swiftCallSiteShape(node) {
|
|
1092
|
+
if (node.type === "constructor_expression") {
|
|
1093
|
+
const name = swiftConstructedGenericFact(node).nominal;
|
|
1094
|
+
return name && !name.includes(".") ? { receiver: null, member: name } : null;
|
|
1095
|
+
}
|
|
1096
|
+
if (node.type !== "call_expression")
|
|
1097
|
+
return null;
|
|
1098
|
+
const suffix = node.children.find((c) => c.type === "call_suffix");
|
|
1099
|
+
if (!suffix || suffix.text.startsWith("["))
|
|
1100
|
+
return null;
|
|
1101
|
+
const callee = node.namedChildren.find((c) => c !== suffix);
|
|
1102
|
+
if (callee?.type === "simple_identifier") {
|
|
1103
|
+
if (node.children.some((c) => c.type === "?") || isSwiftLocalValueName(callee.text, node))
|
|
1104
|
+
return null;
|
|
1105
|
+
return { receiver: null, member: callee.text };
|
|
1106
|
+
}
|
|
1107
|
+
if (callee?.type !== "navigation_expression")
|
|
1108
|
+
return null;
|
|
1109
|
+
const target = callee.childForFieldName("target");
|
|
1110
|
+
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix");
|
|
1111
|
+
if (!target || !member)
|
|
1112
|
+
return null;
|
|
1113
|
+
const targetText = swiftReceiverTargetText(target);
|
|
1114
|
+
const receiver = normalizeSwiftReceiver(targetText);
|
|
1115
|
+
// `a?.c()` puts its `?` beside the target, not inside it (bd tea-rags-mcp-y99pg.33).
|
|
1116
|
+
const written = callee.children.some((c) => c.type === "?") ? `${targetText}?` : targetText;
|
|
1117
|
+
return { receiver, ...(written === receiver ? {} : { writtenReceiver: written }), member: member.text };
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Whether `name`, at `at`, names a VALUE the enclosing code declares — a
|
|
1121
|
+
* parameter of an enclosing function or closure, or a `let` / `var` an
|
|
1122
|
+
* enclosing block declares ABOVE `at` — rather than a function. Swift resolves
|
|
1123
|
+
* a bare name to the innermost declaration, so such a `name(...)` invokes the
|
|
1124
|
+
* value and calls no declared symbol. The walk stops at the enclosing type: a
|
|
1125
|
+
* stored property of closure type is indistinguishable from a method by name
|
|
1126
|
+
* here, and only the optional-call form (`name?(…)`) says which it is.
|
|
1127
|
+
*/
|
|
1128
|
+
function isSwiftLocalValueName(name, at) {
|
|
1129
|
+
const line = at.startPosition.row;
|
|
1130
|
+
for (let current = at.parent; current; current = current.parent) {
|
|
1131
|
+
if (current.type === "class_declaration" || current.type === "protocol_declaration")
|
|
1132
|
+
return false;
|
|
1133
|
+
if (SWIFT_FUNCTION_LIKE_NODES.has(current.type) && declaresSwiftParameter(current, name))
|
|
1134
|
+
return true;
|
|
1135
|
+
if (current.type === "lambda_literal") {
|
|
1136
|
+
const params = swiftLambdaParameters(current) ?? [];
|
|
1137
|
+
if (params.some((p) => p.childForFieldName("name")?.text === name))
|
|
1138
|
+
return true;
|
|
1139
|
+
}
|
|
1140
|
+
if (current.type === "statements") {
|
|
1141
|
+
for (const statement of current.children) {
|
|
1142
|
+
if (statement.startPosition.row >= line)
|
|
1143
|
+
break;
|
|
1144
|
+
if (statement.type === "property_declaration" &&
|
|
1145
|
+
singleIdentifierPatternName(statement.childForFieldName("name")) === name) {
|
|
1146
|
+
return true;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
return false;
|
|
1152
|
+
}
|
|
1153
|
+
/** Whether a function-like declaration takes a parameter whose INTERNAL name is `name`. */
|
|
1154
|
+
function declaresSwiftParameter(fn, name) {
|
|
1155
|
+
return fn.children.some((parameter) => {
|
|
1156
|
+
if (parameter.type !== "parameter")
|
|
1157
|
+
return false;
|
|
1158
|
+
const colon = parameter.children.findIndex((c) => c.type === ":");
|
|
1159
|
+
const names = parameter.children.slice(0, colon === -1 ? undefined : colon);
|
|
1160
|
+
const internal = names.filter((c) => c.type === "simple_identifier").pop();
|
|
1161
|
+
return internal?.text === name;
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* A call target's text without the prefix operator the grammar hangs on it
|
|
1166
|
+
* (bd tea-rags-mcp-y99pg.39). tree-sitter-swift parses `!kept.contains(id)`
|
|
1167
|
+
* with `!kept` as the navigation target, but Swift binds a prefix operator
|
|
1168
|
+
* looser than member access and call: the expression is `!(kept.contains(id))`
|
|
1169
|
+
* and the receiver is `kept`. The operator sits on the leftmost spine of the
|
|
1170
|
+
* target, however deep (`!a!.b.c()`). An implicit member expression's leading
|
|
1171
|
+
* `.` (`.quaternary.opacity(1)`) is part of the receiver and stays.
|
|
1172
|
+
*
|
|
1173
|
+
* The same grammar folds an additive or multiplicative expression into the
|
|
1174
|
+
* target — `PixelCanvas.width - font.width(x)` navigates off
|
|
1175
|
+
* `PixelCanvas.width - font` — where Swift binds the call to the RIGHT
|
|
1176
|
+
* operand alone: the receiver is `font`. Any infix shape found as a target is
|
|
1177
|
+
* such a misbinding (a parenthesised one is a tuple), so the walk takes the
|
|
1178
|
+
* right operand of each, then strips a prefix operator off what is left.
|
|
1179
|
+
*/
|
|
1180
|
+
function swiftReceiverTargetText(target) {
|
|
1181
|
+
const operand = swiftReceiverOperand(target);
|
|
1182
|
+
return withoutSwiftComments(target, operand.startIndex);
|
|
1183
|
+
}
|
|
1184
|
+
/** Comment node types tree-sitter-swift emits. */
|
|
1185
|
+
const SWIFT_COMMENT_NODES = new Set(["comment", "multiline_comment"]);
|
|
1186
|
+
/**
|
|
1187
|
+
* `node`'s source text from `from` on, every comment inside it dropped (bd
|
|
1188
|
+
* tea-rags-mcp-2rf51). A SwiftUI modifier chain interleaves comments with its
|
|
1189
|
+
* links, and a comment's own `.` would otherwise split the receiver into hops
|
|
1190
|
+
* no fold can type. A comment is trivia, so what remains is the expression.
|
|
1191
|
+
*/
|
|
1192
|
+
function withoutSwiftComments(node, from) {
|
|
1193
|
+
const comments = [];
|
|
1194
|
+
walk(node, (n) => {
|
|
1195
|
+
if (SWIFT_COMMENT_NODES.has(n.type) && n.startIndex >= from)
|
|
1196
|
+
comments.push(n);
|
|
1197
|
+
});
|
|
1198
|
+
const { text } = node;
|
|
1199
|
+
if (comments.length === 0)
|
|
1200
|
+
return text.slice(from - node.startIndex);
|
|
1201
|
+
comments.sort((a, b) => a.startIndex - b.startIndex);
|
|
1202
|
+
let out = "";
|
|
1203
|
+
let at = from;
|
|
1204
|
+
for (const comment of comments) {
|
|
1205
|
+
if (comment.startIndex < at)
|
|
1206
|
+
continue;
|
|
1207
|
+
out += text.slice(at - node.startIndex, comment.startIndex - node.startIndex);
|
|
1208
|
+
at = comment.endIndex;
|
|
1209
|
+
}
|
|
1210
|
+
return out + text.slice(at - node.startIndex);
|
|
1211
|
+
}
|
|
1212
|
+
/** The node a call's receiver really is, inside the target the grammar handed over — see {@link swiftReceiverTargetText}. */
|
|
1213
|
+
function swiftReceiverOperand(target) {
|
|
1214
|
+
// An infix shape keeps its right operand under one of these: `a - b`,
|
|
1215
|
+
// `a...b`, `a ?? b`, `c ? a : b`.
|
|
1216
|
+
const rights = [
|
|
1217
|
+
target.childForFieldName("rhs"),
|
|
1218
|
+
target.childForFieldName("end"),
|
|
1219
|
+
target.childForFieldName("if_nil"),
|
|
1220
|
+
target.childForFieldName("if_false"),
|
|
1221
|
+
];
|
|
1222
|
+
for (const right of rights) {
|
|
1223
|
+
if (right !== null && right.endIndex === target.endIndex)
|
|
1224
|
+
return swiftReceiverOperand(right);
|
|
1225
|
+
}
|
|
1226
|
+
let node = target;
|
|
1227
|
+
while (node !== null && node.startIndex === target.startIndex) {
|
|
1228
|
+
if (node.type === "prefix_expression") {
|
|
1229
|
+
const operation = node.childForFieldName("operation");
|
|
1230
|
+
const operand = node.childForFieldName("target");
|
|
1231
|
+
if (operation !== null && operand !== null && operation.text !== ".")
|
|
1232
|
+
return swiftReceiverOperand(operand);
|
|
1233
|
+
}
|
|
1234
|
+
node = node.child(0);
|
|
1235
|
+
}
|
|
1236
|
+
return target;
|
|
1237
|
+
}
|
|
305
1238
|
/**
|
|
306
1239
|
* Strip optional-chaining `?` and force-unwrap `!` out of a receiver's source
|
|
307
1240
|
* text: `obj!` → `obj`, `a?.b!` → `a.b`, `self.db` unchanged. The resolver
|
|
@@ -315,10 +1248,14 @@ export function normalizeSwiftReceiver(text) {
|
|
|
315
1248
|
const NO_TYPE = { nominal: null, element: null };
|
|
316
1249
|
/** Names a binding must never be recorded under — each is claimed by a chain pass of its own. */
|
|
317
1250
|
const SWIFT_PSEUDO_BINDING_NAMES = new Set(["self", "Self", "super"]);
|
|
1251
|
+
/** The `structuredReturnTypes` marker a `-> Self` return publishes (bd tea-rags-mcp-y99pg.18). */
|
|
1252
|
+
const SWIFT_SELF_RETURN = "Self";
|
|
318
1253
|
/**
|
|
319
1254
|
* Return types that name nothing the symbol table can hold. `Self` is the
|
|
320
|
-
* conforming type, unknowable at the declaration
|
|
321
|
-
*
|
|
1255
|
+
* conforming type, unknowable at the declaration (the run-global channel
|
|
1256
|
+
* publishes it as {@link SWIFT_SELF_RETURN} for the resolver to substitute);
|
|
1257
|
+
* the other four are universal or empty and carry no member a call could land
|
|
1258
|
+
* on.
|
|
322
1259
|
*/
|
|
323
1260
|
const SWIFT_UNUSABLE_RETURN_TYPES = new Set(["Self", "Any", "AnyObject", "Never", "Void"]);
|
|
324
1261
|
/** Nodes that open a value scope — the ancestor a `guard let` binding stays alive to the end of. */
|
|
@@ -335,83 +1272,709 @@ const SWIFT_BLOCK_NODES = new Set([
|
|
|
335
1272
|
* methods of the same type are different variables, so an identifier lookup is
|
|
336
1273
|
* confined to the bindings whose nearest such ancestor is the SAME node.
|
|
337
1274
|
*
|
|
338
|
-
* `lambda_literal` is deliberately absent: a closure CAPTURES its enclosing
|
|
339
|
-
* function's locals, so a `guard let` inside one must still see them.
|
|
1275
|
+
* `lambda_literal` is deliberately absent: a closure CAPTURES its enclosing
|
|
1276
|
+
* function's locals, so a `guard let` inside one must still see them.
|
|
1277
|
+
*/
|
|
1278
|
+
const SWIFT_FUNCTION_LIKE_NODES = new Set([
|
|
1279
|
+
"function_declaration",
|
|
1280
|
+
"protocol_function_declaration",
|
|
1281
|
+
"init_declaration",
|
|
1282
|
+
"deinit_declaration",
|
|
1283
|
+
"subscript_declaration",
|
|
1284
|
+
"computed_property",
|
|
1285
|
+
]);
|
|
1286
|
+
/**
|
|
1287
|
+
* Sequence methods whose closure receives the ELEMENT — one parameter, or two
|
|
1288
|
+
* for the comparators. Read only off an `element` fact, which only an `[T]`
|
|
1289
|
+
* type produces, so a project type's own namesake method is never re-read as a
|
|
1290
|
+
* collection's.
|
|
1291
|
+
*/
|
|
1292
|
+
const SWIFT_ELEMENT_CLOSURE_ARITY = new Map([
|
|
1293
|
+
["forEach", 1],
|
|
1294
|
+
["map", 1],
|
|
1295
|
+
["compactMap", 1],
|
|
1296
|
+
["flatMap", 1],
|
|
1297
|
+
["filter", 1],
|
|
1298
|
+
["first", 1],
|
|
1299
|
+
["last", 1],
|
|
1300
|
+
["contains", 1],
|
|
1301
|
+
["allSatisfy", 1],
|
|
1302
|
+
["firstIndex", 1],
|
|
1303
|
+
["lastIndex", 1],
|
|
1304
|
+
["drop", 1],
|
|
1305
|
+
["prefix", 1],
|
|
1306
|
+
["removeAll", 1],
|
|
1307
|
+
["sorted", 2],
|
|
1308
|
+
["sort", 2],
|
|
1309
|
+
["min", 2],
|
|
1310
|
+
["max", 2],
|
|
1311
|
+
]);
|
|
1312
|
+
/** Key a declared return under its owning type (`null` = top level) plus its name. */
|
|
1313
|
+
function returnKey(owner, name) {
|
|
1314
|
+
return `${owner ?? ""}\u0000${name}`;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Collect the file's property types and declared return types.
|
|
1318
|
+
*
|
|
1319
|
+
* Properties are gathered per nominal type body exactly as the published
|
|
1320
|
+
* `classFieldTypes` needs them — `class_declaration` covers class / struct /
|
|
1321
|
+
* enum / extension / actor, `protocol_declaration` its requirements — and
|
|
1322
|
+
* computed properties count: `var total: Money { … }` still HAS type `Money`,
|
|
1323
|
+
* and a call on it dispatches on `Money` as a stored one does. An extension
|
|
1324
|
+
* body declares no stored properties (Swift forbids them), so it contributes
|
|
1325
|
+
* only computed ones and cannot collide with the type's own entry.
|
|
1326
|
+
*
|
|
1327
|
+
* Return types are gathered per `func`, keyed by the enclosing type so a
|
|
1328
|
+
* member beats a top-level namesake at lookup time without either erasing the
|
|
1329
|
+
* other. A coordinate two declarations disagree on is poisoned to `null`.
|
|
1330
|
+
*/
|
|
1331
|
+
function collectSwiftFileTypeEvidence(root) {
|
|
1332
|
+
const propertyTypesByPath = new Map();
|
|
1333
|
+
const returnTypes = new Map();
|
|
1334
|
+
const closureParameters = new Map();
|
|
1335
|
+
const metatypeReturns = new Map();
|
|
1336
|
+
walk(root, (node) => {
|
|
1337
|
+
if (node.type === "class_declaration" || node.type === "protocol_declaration") {
|
|
1338
|
+
collectSwiftPropertyTypes(node, propertyTypesByPath);
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
if (node.type !== "function_declaration" && node.type !== "protocol_function_declaration")
|
|
1342
|
+
return;
|
|
1343
|
+
const name = node.childForFieldName("name")?.text;
|
|
1344
|
+
if (!name)
|
|
1345
|
+
return;
|
|
1346
|
+
const key = returnKey(enclosingSwiftTypeName(node), name);
|
|
1347
|
+
const closure = swiftClosureParameterFacts(node);
|
|
1348
|
+
if (closure !== undefined) {
|
|
1349
|
+
const seen = closureParameters.get(key);
|
|
1350
|
+
if (seen === undefined)
|
|
1351
|
+
closureParameters.set(key, closure);
|
|
1352
|
+
else if (!sameSwiftFacts(seen, closure))
|
|
1353
|
+
closureParameters.set(key, null);
|
|
1354
|
+
}
|
|
1355
|
+
const slot = swiftMetatypeReturnSlot(node);
|
|
1356
|
+
if (slot !== undefined) {
|
|
1357
|
+
const seen = metatypeReturns.get(key);
|
|
1358
|
+
if (seen === undefined)
|
|
1359
|
+
metatypeReturns.set(key, slot);
|
|
1360
|
+
else if (seen?.label !== slot.label || seen.index !== slot.index)
|
|
1361
|
+
metatypeReturns.set(key, null);
|
|
1362
|
+
}
|
|
1363
|
+
const fact = swiftDeclaredReturnFact(node);
|
|
1364
|
+
if (!fact)
|
|
1365
|
+
return;
|
|
1366
|
+
const previous = returnTypes.get(key);
|
|
1367
|
+
if (previous === undefined)
|
|
1368
|
+
returnTypes.set(key, fact);
|
|
1369
|
+
// `previous === null` is the poisoned marker, and optional access keeps it poisoned.
|
|
1370
|
+
else if (previous?.nominal !== fact.nominal || previous?.element !== fact.element)
|
|
1371
|
+
returnTypes.set(key, null);
|
|
1372
|
+
});
|
|
1373
|
+
return {
|
|
1374
|
+
propertyTypes: swiftPropertyTypeViews(propertyTypesByPath),
|
|
1375
|
+
returnTypes,
|
|
1376
|
+
closureParameters,
|
|
1377
|
+
metatypeReturns,
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
/** Whether two positional fact lists state the same types; `null` (poisoned) equals nothing. */
|
|
1381
|
+
function sameSwiftFacts(a, b) {
|
|
1382
|
+
if (a === null || b === null)
|
|
1383
|
+
return false;
|
|
1384
|
+
if (a.length !== b.length)
|
|
1385
|
+
return false;
|
|
1386
|
+
return a.every((fact, i) => fact.nominal === b[i].nominal && fact.element === b[i].element);
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* The positional parameter facts of the ONE function-typed parameter a
|
|
1390
|
+
* declaration takes: `undefined` when it takes none, `null` when it takes two
|
|
1391
|
+
* or more. A name that is a generic parameter of the declaration or of its
|
|
1392
|
+
* enclosing type (`(inout Value) -> U` on `Protected<Value>`) proves nothing —
|
|
1393
|
+
* it is bound per use, not declared.
|
|
1394
|
+
*/
|
|
1395
|
+
function swiftClosureParameterFacts(fn) {
|
|
1396
|
+
let found;
|
|
1397
|
+
for (const parameter of fn.children) {
|
|
1398
|
+
if (parameter.type !== "parameter")
|
|
1399
|
+
continue;
|
|
1400
|
+
const functionType = swiftFunctionTypeNode(swiftParameterTypeNode(parameter));
|
|
1401
|
+
if (!functionType)
|
|
1402
|
+
continue;
|
|
1403
|
+
if (found !== undefined)
|
|
1404
|
+
return null;
|
|
1405
|
+
const params = functionType.children.find((c) => c.type === "tuple_type");
|
|
1406
|
+
const facts = [];
|
|
1407
|
+
for (const item of params?.namedChildren ?? []) {
|
|
1408
|
+
if (item.type !== "tuple_type_item")
|
|
1409
|
+
continue;
|
|
1410
|
+
facts.push(swiftGenericResolvedFact(swiftTypeFactOf(item.namedChildren[item.namedChildCount - 1] ?? null), fn));
|
|
1411
|
+
}
|
|
1412
|
+
found = facts;
|
|
1413
|
+
}
|
|
1414
|
+
return found;
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Where a generic return is bound by a METATYPE argument —
|
|
1418
|
+
* `func request<R: Request>(for: …, as type: R.Type) -> R?` returns whatever
|
|
1419
|
+
* type the `as:` argument names. The slot is the argument's label, or its
|
|
1420
|
+
* position when the parameter has none; `undefined` when the return is not
|
|
1421
|
+
* the declaration's own generic parameter or no parameter carries `R.Type`.
|
|
1422
|
+
*/
|
|
1423
|
+
function swiftMetatypeReturnSlot(fn) {
|
|
1424
|
+
const returned = swiftTypeFactOf(swiftTypeNodeAfter(fn, "->")).nominal;
|
|
1425
|
+
if (!returned || !declaresSwiftTypeParameter(fn, returned))
|
|
1426
|
+
return undefined;
|
|
1427
|
+
let index = 0;
|
|
1428
|
+
for (const parameter of fn.children) {
|
|
1429
|
+
if (parameter.type !== "parameter")
|
|
1430
|
+
continue;
|
|
1431
|
+
if (swiftParameterTypeNode(parameter)?.text === `${returned}.Type`) {
|
|
1432
|
+
const names = parameter.children.filter((c) => c.type === "simple_identifier").map((c) => c.text);
|
|
1433
|
+
const label = names.length > 1 ? names[0] : (names[0] ?? "_");
|
|
1434
|
+
return { label: label === "_" ? null : label, index };
|
|
1435
|
+
}
|
|
1436
|
+
index += 1;
|
|
1437
|
+
}
|
|
1438
|
+
return undefined;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* The type a call's metatype argument names — `DataRequest` for
|
|
1442
|
+
* `request(for: task, as: DataRequest.self)` — or null when the argument is
|
|
1443
|
+
* not a `Type.self` literal.
|
|
1444
|
+
*/
|
|
1445
|
+
function swiftMetatypeArgumentType(suffix, slot) {
|
|
1446
|
+
const args = suffix.children.find((c) => c.type === "value_arguments")?.namedChildren ?? [];
|
|
1447
|
+
const values = args.filter((a) => a.type === "value_argument");
|
|
1448
|
+
const labelOf = (arg) => arg.children.find((c) => c.type === "value_argument_label")?.text ?? null;
|
|
1449
|
+
const arg = slot.label === null ? values[slot.index] : values.find((a) => labelOf(a) === slot.label);
|
|
1450
|
+
const value = arg?.namedChildren[arg.namedChildCount - 1];
|
|
1451
|
+
if (value?.type !== "navigation_expression")
|
|
1452
|
+
return null;
|
|
1453
|
+
if (value.childForFieldName("suffix")?.childForFieldName("suffix")?.text !== "self")
|
|
1454
|
+
return null;
|
|
1455
|
+
const typeText = value.childForFieldName("target")?.text;
|
|
1456
|
+
return typeText !== undefined && /^_*[A-Z][\w.]*$/.test(typeText) ? typeText : null;
|
|
1457
|
+
}
|
|
1458
|
+
/** Declarations whose `type_parameters` and `where` clause scope a generic name over their subtree. */
|
|
1459
|
+
const SWIFT_GENERIC_SCOPES = new Set([
|
|
1460
|
+
"function_declaration",
|
|
1461
|
+
"protocol_function_declaration",
|
|
1462
|
+
"init_declaration",
|
|
1463
|
+
"subscript_declaration",
|
|
1464
|
+
"class_declaration",
|
|
1465
|
+
]);
|
|
1466
|
+
/**
|
|
1467
|
+
* What a generic parameter NAME stands for at `at`: `undefined` when no
|
|
1468
|
+
* enclosing declaration declares it (so it is a real type name), else the
|
|
1469
|
+
* nominal of its conformance constraint — inline (`<R: Request>`) or in a
|
|
1470
|
+
* `where` clause (`where T: Authenticator`) — or null when unconstrained.
|
|
1471
|
+
*
|
|
1472
|
+
* A call on a value of a constrained generic type dispatches on the
|
|
1473
|
+
* constraint's requirement, which is the declaration the typechecker binds, so
|
|
1474
|
+
* the constraint IS the receiver type for member lookup. The nearest declaring
|
|
1475
|
+
* scope wins, which is Swift's own shadowing.
|
|
1476
|
+
*/
|
|
1477
|
+
function swiftGenericConstraint(name, at) {
|
|
1478
|
+
for (let current = at; current; current = current.parent) {
|
|
1479
|
+
if (!SWIFT_GENERIC_SCOPES.has(current.type))
|
|
1480
|
+
continue;
|
|
1481
|
+
const declared = current.children
|
|
1482
|
+
.find((c) => c.type === "type_parameters")
|
|
1483
|
+
?.namedChildren.find((p) => p.type === "type_parameter" && p.namedChildren[0]?.text === name);
|
|
1484
|
+
if (!declared)
|
|
1485
|
+
continue;
|
|
1486
|
+
if (declared.namedChildCount > 1)
|
|
1487
|
+
return swiftTypeFactOf(declared.namedChildren[1]).nominal;
|
|
1488
|
+
for (const clause of current.children) {
|
|
1489
|
+
if (clause.type !== "type_constraints")
|
|
1490
|
+
continue;
|
|
1491
|
+
for (const constraint of clause.namedChildren) {
|
|
1492
|
+
const inheritance = constraint.namedChildren.find((c) => c.type === "inheritance_constraint");
|
|
1493
|
+
if (inheritance?.namedChildren[0]?.text !== name)
|
|
1494
|
+
continue;
|
|
1495
|
+
return swiftTypeFactOf(inheritance.namedChildren[inheritance.namedChildCount - 1]).nominal;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
return null;
|
|
1499
|
+
}
|
|
1500
|
+
return undefined;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* A fact with every generic parameter name replaced by its constraint
|
|
1504
|
+
* ({@link swiftGenericConstraint}). A member of a generic parameter
|
|
1505
|
+
* (`Serializer.SerializedObject`, an associated type) proves nothing.
|
|
1506
|
+
*/
|
|
1507
|
+
function swiftGenericResolvedFact(fact, at) {
|
|
1508
|
+
const resolve = (name) => {
|
|
1509
|
+
if (name === null)
|
|
1510
|
+
return null;
|
|
1511
|
+
const head = name.split(".")[0];
|
|
1512
|
+
const constraint = swiftGenericConstraint(head, at);
|
|
1513
|
+
if (constraint === undefined)
|
|
1514
|
+
return name;
|
|
1515
|
+
return head === name ? constraint : null;
|
|
1516
|
+
};
|
|
1517
|
+
const nominal = resolve(fact.nominal);
|
|
1518
|
+
const element = resolve(fact.element);
|
|
1519
|
+
return nominal === fact.nominal && element === fact.element ? fact : { nominal, element };
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* The evidence a CALL reads from a table keyed by {@link returnKey}, in
|
|
1523
|
+
* Swift's lookup order: a bare callee on the enclosing type, then at the top
|
|
1524
|
+
* level; a qualified one on whatever its receiver types to.
|
|
1525
|
+
*/
|
|
1526
|
+
function swiftCalleeEvidence(callee, table, scope, depth) {
|
|
1527
|
+
if (callee.type === "simple_identifier") {
|
|
1528
|
+
const own = table.get(returnKey(scope.site.enclosingType, callee.text));
|
|
1529
|
+
return own !== undefined ? own : table.get(returnKey(null, callee.text));
|
|
1530
|
+
}
|
|
1531
|
+
if (callee.type !== "navigation_expression")
|
|
1532
|
+
return undefined;
|
|
1533
|
+
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix");
|
|
1534
|
+
const owner = swiftReceiverTypeName(callee.childForFieldName("target"), scope, depth);
|
|
1535
|
+
return member && owner ? table.get(returnKey(owner, member.text)) : undefined;
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* The type node of a `parameter`, past any `type_modifiers` (`@escaping`,
|
|
1539
|
+
* `@Sendable`) — which tree-sitter-swift places between the `:` and the type.
|
|
1540
|
+
*/
|
|
1541
|
+
function swiftParameterTypeNode(parameter) {
|
|
1542
|
+
const at = parameter.children.findIndex((c) => c.type === ":");
|
|
1543
|
+
if (at === -1)
|
|
1544
|
+
return null;
|
|
1545
|
+
for (let i = at + 1; i < parameter.children.length; i++) {
|
|
1546
|
+
const child = parameter.children[i];
|
|
1547
|
+
// `@escaping` alone parses as `parameter_modifiers`, with `@Sendable` as `type_modifiers`.
|
|
1548
|
+
if (child.type !== "type_modifiers" && child.type !== "parameter_modifiers")
|
|
1549
|
+
return child;
|
|
1550
|
+
}
|
|
1551
|
+
return null;
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* The argument-label signature of a `func` / `init` (bd tea-rags-mcp-y99pg.7),
|
|
1555
|
+
* mapped onto the kernel's call-compatibility axes: a LABELLED parameter is a
|
|
1556
|
+
* keyword (`kwargs`), an unlabelled (`_`) one a positional slot (`arity`), and
|
|
1557
|
+
* whether a trailing closure can land on it (`acceptsBlock`).
|
|
1558
|
+
*
|
|
1559
|
+
* Whether a parameter can take a closure is three-valued
|
|
1560
|
+
* ({@link swiftClosureCapability}), because a closure type is very often
|
|
1561
|
+
* spelled through a typealias (`closure: @escaping ProgressHandler`,
|
|
1562
|
+
* `_ closure: QuickConfigurer`) that no file-local read can expand. A PROVEN
|
|
1563
|
+
* closure parameter is never required on either axis — a trailing closure may
|
|
1564
|
+
* satisfy it without its label or its position — and neither is a defaulted
|
|
1565
|
+
* or variadic one. A POSSIBLE one stays required, and the resolver lets a
|
|
1566
|
+
* trailing closure stand in for one missing requirement. `acceptsBlock` is
|
|
1567
|
+
* false only when no parameter can take a closure. A single parameter name is
|
|
1568
|
+
* both label and local name, which is Swift's rule for every declaration here.
|
|
1569
|
+
*/
|
|
1570
|
+
function swiftCallableSignature(fn) {
|
|
1571
|
+
const required = [];
|
|
1572
|
+
const optional = [];
|
|
1573
|
+
let minRequired = 0;
|
|
1574
|
+
let maxPositional = 0;
|
|
1575
|
+
let hasSplat = false;
|
|
1576
|
+
let acceptsBlock = false;
|
|
1577
|
+
const types = {};
|
|
1578
|
+
const repeatedLabels = new Set();
|
|
1579
|
+
fn.children.forEach((parameter, i) => {
|
|
1580
|
+
if (parameter.type !== "parameter")
|
|
1581
|
+
return;
|
|
1582
|
+
const colon = parameter.children.findIndex((c) => c.type === ":");
|
|
1583
|
+
const names = parameter.children
|
|
1584
|
+
.slice(0, colon === -1 ? undefined : colon)
|
|
1585
|
+
.filter((c) => c.type === "simple_identifier")
|
|
1586
|
+
.map((c) => c.text);
|
|
1587
|
+
const label = names[0] === "_" ? null : (names[0] ?? null);
|
|
1588
|
+
const capability = swiftClosureCapability(parameter, fn);
|
|
1589
|
+
const variadic = parameter.children.some((c) => c.type === "...");
|
|
1590
|
+
const defaulted = fn.children[i + 1]?.type === "=";
|
|
1591
|
+
const mandatory = capability !== "yes" && !variadic && !defaulted;
|
|
1592
|
+
if (capability !== "no")
|
|
1593
|
+
acceptsBlock = true;
|
|
1594
|
+
if (label !== null) {
|
|
1595
|
+
if (required.includes(label) || optional.includes(label))
|
|
1596
|
+
repeatedLabels.add(label);
|
|
1597
|
+
(mandatory ? required : optional).push(label);
|
|
1598
|
+
const nominal = swiftNominalParameterType(parameter);
|
|
1599
|
+
if (nominal !== undefined)
|
|
1600
|
+
types[label] = nominal;
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
maxPositional += 1;
|
|
1604
|
+
if (variadic)
|
|
1605
|
+
hasSplat = true;
|
|
1606
|
+
if (mandatory)
|
|
1607
|
+
minRequired += 1;
|
|
1608
|
+
});
|
|
1609
|
+
// A label two parameters share says nothing about WHICH one an argument binds.
|
|
1610
|
+
for (const label of repeatedLabels)
|
|
1611
|
+
delete types[label];
|
|
1612
|
+
return {
|
|
1613
|
+
arity: { minRequired, maxPositional, hasSplat },
|
|
1614
|
+
kwargs: { required, optional, hasSplat: false, ...(Object.keys(types).length > 0 ? { types } : {}) },
|
|
1615
|
+
acceptsBlock,
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* A parameter's declared type when it is a plain NOMINAL — `UInt32`,
|
|
1620
|
+
* `Tag.Kind`, or one of those made optional (`Double?`) — spelled as written,
|
|
1621
|
+
* whitespace dropped (bd tea-rags-mcp-82l7s). A function, tuple, collection,
|
|
1622
|
+
* generic-argument or metatype spelling answers `undefined`: the resolver
|
|
1623
|
+
* compares an argument's proven type against a NAME, and only a name can be
|
|
1624
|
+
* compared without a type checker.
|
|
1625
|
+
*/
|
|
1626
|
+
function swiftNominalParameterType(parameter) {
|
|
1627
|
+
const typeNode = swiftParameterTypeNode(parameter);
|
|
1628
|
+
if (!typeNode)
|
|
1629
|
+
return undefined;
|
|
1630
|
+
const inner = typeNode.type === "optional_type" ? typeNode.namedChildren[0] : typeNode;
|
|
1631
|
+
if (inner?.type !== "user_type")
|
|
1632
|
+
return undefined;
|
|
1633
|
+
const name = inner.text.replace(/\s+/g, "");
|
|
1634
|
+
if (!/^[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*$/.test(name) || name.endsWith(".Type"))
|
|
1635
|
+
return undefined;
|
|
1636
|
+
return typeNode === inner ? name : `${name}?`;
|
|
1637
|
+
}
|
|
1638
|
+
/** Value types a closure is never spelled as — the common non-closure parameter types. */
|
|
1639
|
+
const SWIFT_NON_CLOSURE_TYPES = new Set([
|
|
1640
|
+
"String",
|
|
1641
|
+
"Substring",
|
|
1642
|
+
"Character",
|
|
1643
|
+
"Int",
|
|
1644
|
+
"Int8",
|
|
1645
|
+
"Int16",
|
|
1646
|
+
"Int32",
|
|
1647
|
+
"Int64",
|
|
1648
|
+
"UInt",
|
|
1649
|
+
"UInt8",
|
|
1650
|
+
"UInt16",
|
|
1651
|
+
"UInt32",
|
|
1652
|
+
"UInt64",
|
|
1653
|
+
"Double",
|
|
1654
|
+
"Float",
|
|
1655
|
+
"CGFloat",
|
|
1656
|
+
"Bool",
|
|
1657
|
+
"Data",
|
|
1658
|
+
"Date",
|
|
1659
|
+
"URL",
|
|
1660
|
+
"UUID",
|
|
1661
|
+
"TimeInterval",
|
|
1662
|
+
"DispatchQueue",
|
|
1663
|
+
"OperationQueue",
|
|
1664
|
+
]);
|
|
1665
|
+
/**
|
|
1666
|
+
* Whether a parameter can take a closure: `yes` for a function type or an
|
|
1667
|
+
* `@escaping` / `@Sendable` one (only a closure carries those), `no` for an
|
|
1668
|
+
* `@autoclosure` one and for a type that is provably not a function — an array,
|
|
1669
|
+
* dictionary, real tuple or metatype, a protocol-constrained generic
|
|
1670
|
+
* parameter (a function type conforms to no protocol), or a common value
|
|
1671
|
+
* type — and `maybe` for any other name, which may be a closure typealias.
|
|
1672
|
+
*/
|
|
1673
|
+
function swiftClosureCapability(parameter, fn) {
|
|
1674
|
+
const modifiers = parameter.children.filter((c) => c.type === "type_modifiers" || c.type === "parameter_modifiers");
|
|
1675
|
+
// `@autoclosure` wraps the argument EXPRESSION; a closure literal written
|
|
1676
|
+
// there is the value itself, so no trailing closure lands on it — checked
|
|
1677
|
+
// first, since its spelled type IS a function type (bd tea-rags-mcp-y99pg.36).
|
|
1678
|
+
if (modifiers.some((c) => /@autoclosure\b/.test(c.text)))
|
|
1679
|
+
return "no";
|
|
1680
|
+
const typeNode = swiftParameterTypeNode(parameter);
|
|
1681
|
+
if (swiftFunctionTypeNode(typeNode) !== null)
|
|
1682
|
+
return "yes";
|
|
1683
|
+
const attributed = modifiers.some((c) => /@(escaping|Sendable)\b/.test(c.text));
|
|
1684
|
+
if (attributed)
|
|
1685
|
+
return "yes";
|
|
1686
|
+
let bare = typeNode;
|
|
1687
|
+
while (bare?.type === "optional_type")
|
|
1688
|
+
bare = bare.namedChildren[0] ?? null;
|
|
1689
|
+
if (!bare)
|
|
1690
|
+
return "maybe";
|
|
1691
|
+
if (bare.type === "array_type" || bare.type === "dictionary_type" || bare.type === "metatype")
|
|
1692
|
+
return "no";
|
|
1693
|
+
if (bare.type === "tuple_type" && parenthesizedSwiftTypeNode(bare) === null)
|
|
1694
|
+
return "no";
|
|
1695
|
+
if (bare.type !== "user_type")
|
|
1696
|
+
return "maybe";
|
|
1697
|
+
const name = bare.text.replace(/<[\s\S]*$/, "");
|
|
1698
|
+
if (name.endsWith(".Type") || SWIFT_NON_CLOSURE_TYPES.has(name))
|
|
1699
|
+
return "no";
|
|
1700
|
+
const constraint = swiftGenericConstraint(name, fn);
|
|
1701
|
+
return constraint !== undefined && constraint !== null ? "no" : "maybe";
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* What a call writes, on the same axes: its labels, its unlabelled argument
|
|
1705
|
+
* count and whether a trailing closure follows the parentheses.
|
|
1706
|
+
*/
|
|
1707
|
+
function swiftCallArguments(suffix) {
|
|
1708
|
+
const args = suffix.children.find((c) => c.type === "value_arguments")?.namedChildren ?? [];
|
|
1709
|
+
const kwargKeys = [];
|
|
1710
|
+
let argCount = 0;
|
|
1711
|
+
for (const arg of args) {
|
|
1712
|
+
if (arg.type !== "value_argument")
|
|
1713
|
+
continue;
|
|
1714
|
+
const label = arg.children.find((c) => c.type === "value_argument_label")?.text;
|
|
1715
|
+
if (label === undefined)
|
|
1716
|
+
argCount += 1;
|
|
1717
|
+
else
|
|
1718
|
+
kwargKeys.push(label);
|
|
1719
|
+
}
|
|
1720
|
+
return { argCount, kwargKeys, passesBlock: suffix.children.some((c) => c.type === "lambda_literal") };
|
|
1721
|
+
}
|
|
1722
|
+
/** A `function_type` node, looking through `?` and parentheses: `((T) -> Void)?`. */
|
|
1723
|
+
function swiftFunctionTypeNode(typeNode) {
|
|
1724
|
+
if (!typeNode)
|
|
1725
|
+
return null;
|
|
1726
|
+
if (typeNode.type === "function_type")
|
|
1727
|
+
return typeNode;
|
|
1728
|
+
if (typeNode.type === "optional_type")
|
|
1729
|
+
return swiftFunctionTypeNode(typeNode.namedChildren[0] ?? null);
|
|
1730
|
+
if (typeNode.type === "tuple_type")
|
|
1731
|
+
return swiftFunctionTypeNode(parenthesizedSwiftTypeNode(typeNode));
|
|
1732
|
+
return null;
|
|
1733
|
+
}
|
|
1734
|
+
/**
|
|
1735
|
+
* The positional facts a closure literal's parameters take from the call it
|
|
1736
|
+
* is an argument of — trailing or parenthesized — or null when nothing proves
|
|
1737
|
+
* them.
|
|
1738
|
+
*
|
|
1739
|
+
* Two sources, both declarations: the callee's ONE function-typed parameter
|
|
1740
|
+
* when this file declares the callee (same lookup order as
|
|
1741
|
+
* {@link swiftCallResultFact}), and the ELEMENT of an `[T]` receiver for a
|
|
1742
|
+
* sequence method (`xs.forEach { $0… }`).
|
|
340
1743
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"
|
|
344
|
-
|
|
345
|
-
"
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
1744
|
+
function swiftClosureArgumentFacts(lambda, scope) {
|
|
1745
|
+
let suffix = lambda.parent;
|
|
1746
|
+
if (suffix?.type === "value_argument")
|
|
1747
|
+
suffix = suffix.parent?.parent ?? null;
|
|
1748
|
+
if (suffix?.type !== "call_suffix")
|
|
1749
|
+
return null;
|
|
1750
|
+
const call = suffix.parent;
|
|
1751
|
+
if (call?.type !== "call_expression")
|
|
1752
|
+
return null;
|
|
1753
|
+
const callee = call.namedChildren.find((c) => c.type !== "call_suffix");
|
|
1754
|
+
if (!callee)
|
|
1755
|
+
return null;
|
|
1756
|
+
if (callee.type === "navigation_expression") {
|
|
1757
|
+
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix")?.text;
|
|
1758
|
+
const target = callee.childForFieldName("target");
|
|
1759
|
+
const element = target ? swiftExpressionFact(target, scope, 0).element : null;
|
|
1760
|
+
const arity = member === undefined ? undefined : SWIFT_ELEMENT_CLOSURE_ARITY.get(member);
|
|
1761
|
+
if (element && arity !== undefined) {
|
|
1762
|
+
return Array.from({ length: arity }, () => ({ nominal: element, element: null }));
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
return swiftCalleeEvidence(callee, scope.evidence.closureParameters, scope, 0) ?? null;
|
|
352
1766
|
}
|
|
353
1767
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
* enum / extension / actor, `protocol_declaration` its requirements — and
|
|
359
|
-
* computed properties count: `var total: Money { … }` still HAS type `Money`,
|
|
360
|
-
* and a call on it dispatches on `Money` as a stored one does. An extension
|
|
361
|
-
* body declares no stored properties (Swift forbids them), so it contributes
|
|
362
|
-
* only computed ones and cannot collide with the type's own entry.
|
|
1768
|
+
* The SPELLING of the callee a closure literal is passed to — `mutableState.write`
|
|
1769
|
+
* for `mutableState.write { … }`, `withCheckedContinuation` for a BARE callee
|
|
1770
|
+
* (bd tea-rags-mcp-y99pg.29) — or undefined when the callee is neither a member
|
|
1771
|
+
* access on a value chain the resolver can fold nor a bare name.
|
|
363
1772
|
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
1773
|
+
* Only the call's LAST closure is spelled: the resolver reads the callee's
|
|
1774
|
+
* last function-typed parameter, the one a trailing closure fills, so an
|
|
1775
|
+
* earlier closure of `handle { … } onCancel: { … }` would be typed by the
|
|
1776
|
+
* wrong parameter.
|
|
367
1777
|
*/
|
|
368
|
-
function
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
1778
|
+
function swiftClosureCalleeSpelling(lambda) {
|
|
1779
|
+
let suffix = lambda.parent;
|
|
1780
|
+
if (suffix?.type === "value_argument")
|
|
1781
|
+
suffix = suffix.parent?.parent ?? null;
|
|
1782
|
+
if (suffix?.type !== "call_suffix" && suffix?.type !== "constructor_suffix")
|
|
1783
|
+
return undefined;
|
|
1784
|
+
const call = suffix.parent;
|
|
1785
|
+
if (call?.type !== "call_expression" && call?.type !== "constructor_expression")
|
|
1786
|
+
return undefined;
|
|
1787
|
+
if (lastClosureArgument(suffix)?.startIndex !== lambda.startIndex)
|
|
1788
|
+
return undefined;
|
|
1789
|
+
// `StreamOf<T>(…) { … }` — an explicitly specialised construction — is spelled
|
|
1790
|
+
// by its type, generic arguments dropped: the resolver reads the type's `init`.
|
|
1791
|
+
if (call.type === "constructor_expression") {
|
|
1792
|
+
// Positional, not `constructed_type`: see the materialization hazard {@link swiftTypeNodeAfter} documents.
|
|
1793
|
+
const typeNode = call.namedChildren.find((c) => c.type === "user_type");
|
|
1794
|
+
const constructed = typeNode?.text.replace(/<[^<>]*(?:<[^<>]*>[^<>]*)*>/g, "");
|
|
1795
|
+
return constructed !== undefined && SWIFT_TYPE_NAME_TEXT.test(constructed) && /^[\w.]+$/.test(constructed)
|
|
1796
|
+
? constructed
|
|
1797
|
+
: undefined;
|
|
1798
|
+
}
|
|
1799
|
+
const callee = call.namedChildren.find((c) => c.type !== "call_suffix");
|
|
1800
|
+
if (callee?.type === "simple_identifier")
|
|
1801
|
+
return callee.text;
|
|
1802
|
+
if (callee?.type !== "navigation_expression")
|
|
1803
|
+
return undefined;
|
|
1804
|
+
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix")?.text;
|
|
1805
|
+
const targetNode = callee.childForFieldName("target");
|
|
1806
|
+
const target = swiftValueChainSpelling(targetNode) ?? swiftConstructionSpelling(targetNode);
|
|
1807
|
+
return member && target ? `${target}.${member}` : undefined;
|
|
1808
|
+
}
|
|
1809
|
+
/** The last closure literal a call passes — parenthesized or trailing — or undefined. */
|
|
1810
|
+
function lastClosureArgument(suffix) {
|
|
1811
|
+
let last;
|
|
1812
|
+
for (const child of suffix.children) {
|
|
1813
|
+
if (child.type === "lambda_literal")
|
|
1814
|
+
last = child;
|
|
1815
|
+
else if (child.type === "value_arguments") {
|
|
1816
|
+
for (const argument of child.namedChildren) {
|
|
1817
|
+
const value = argument.type === "value_argument" ? argument.namedChildren.at(-1) : undefined;
|
|
1818
|
+
if (value?.type === "lambda_literal")
|
|
1819
|
+
last = value;
|
|
1820
|
+
}
|
|
375
1821
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
1822
|
+
}
|
|
1823
|
+
return last;
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* A construction written as a closure's receiver — `Result { try … }` in
|
|
1827
|
+
* `Result { try … }.mapError { $0 … }` — spelled WHOLE, arguments and all,
|
|
1828
|
+
* since the resolver types a construction head by the type it names and the
|
|
1829
|
+
* generic arguments it spells (bd tea-rags-mcp-y99pg.31). Only an
|
|
1830
|
+
* UpperCamelCase callee is a construction; `make(1).then { … }` is a call
|
|
1831
|
+
* whose value no spelling here can carry.
|
|
1832
|
+
*/
|
|
1833
|
+
function swiftConstructionSpelling(node) {
|
|
1834
|
+
if (node?.type !== "call_expression")
|
|
1835
|
+
return undefined;
|
|
1836
|
+
const callee = node.namedChildren.find((c) => c.type !== "call_suffix");
|
|
1837
|
+
if (callee?.type !== "simple_identifier" || !/^_*[A-Z]/.test(callee.text))
|
|
1838
|
+
return undefined;
|
|
1839
|
+
return node.text;
|
|
1840
|
+
}
|
|
1841
|
+
/** How many `$n` parameters a closure's own body reads: one past the highest `n`. */
|
|
1842
|
+
function swiftImplicitParameterCount(lambda) {
|
|
1843
|
+
let count = 0;
|
|
1844
|
+
for (const match of lambda.text.matchAll(/\$(\d+)/g))
|
|
1845
|
+
count = Math.max(count, Number(match[1]) + 1);
|
|
1846
|
+
return count;
|
|
1847
|
+
}
|
|
1848
|
+
/** The `lambda_parameter` nodes a closure literal names, or null when it uses `$0`-style ones. */
|
|
1849
|
+
function swiftLambdaParameters(lambda) {
|
|
1850
|
+
const signature = lambda.children.find((c) => c.type === "lambda_function_type");
|
|
1851
|
+
if (!signature)
|
|
1852
|
+
return null;
|
|
1853
|
+
const list = signature.children.find((c) => c.type === "lambda_function_type_parameters");
|
|
1854
|
+
return list ? list.children.filter((c) => c.type === "lambda_parameter") : [];
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Whether a closure body nests an implicit-parameter closure. Such a closure
|
|
1858
|
+
* re-binds `$0` for its own body, and one this walker cannot type would
|
|
1859
|
+
* otherwise see the OUTER `$0`'s type, since a binding here is scoped by line.
|
|
1860
|
+
*/
|
|
1861
|
+
function nestsImplicitParameterClosure(lambda) {
|
|
1862
|
+
let nested = false;
|
|
1863
|
+
const visit = (node) => {
|
|
1864
|
+
for (const child of node.children) {
|
|
1865
|
+
if (nested)
|
|
1866
|
+
return;
|
|
1867
|
+
if (child.type === "lambda_literal" && swiftLambdaParameters(child) === null)
|
|
1868
|
+
nested = true;
|
|
1869
|
+
else
|
|
1870
|
+
visit(child);
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
visit(lambda);
|
|
1874
|
+
return nested;
|
|
393
1875
|
}
|
|
394
|
-
/**
|
|
1876
|
+
/**
|
|
1877
|
+
* One nominal type body's `propertyName → fact` entries, merged into the file
|
|
1878
|
+
* map under its NESTING PATH (`DownloadResponsePublisher.Inner`) — the
|
|
1879
|
+
* enclosing types' names outward-in, then its own. A same-path re-opening (a
|
|
1880
|
+
* same-file extension) merges into the same entry, first writer kept.
|
|
1881
|
+
*/
|
|
395
1882
|
function collectSwiftPropertyTypes(node, into) {
|
|
396
1883
|
const name = node.childForFieldName("name");
|
|
397
1884
|
const body = node.childForFieldName("body");
|
|
398
1885
|
if (!name || !body)
|
|
399
1886
|
return;
|
|
1887
|
+
const path = swiftNestingPath(node);
|
|
400
1888
|
for (const member of body.children) {
|
|
401
|
-
if (member.type !== "property_declaration")
|
|
1889
|
+
if (member.type !== "property_declaration" && member.type !== "protocol_property_declaration")
|
|
402
1890
|
continue;
|
|
403
|
-
const fieldName =
|
|
404
|
-
|
|
1891
|
+
const fieldName = member.type === "property_declaration"
|
|
1892
|
+
? singleIdentifierPatternName(member.childForFieldName("name"))
|
|
1893
|
+
: protocolRequirementName(member);
|
|
1894
|
+
const fact = swiftStoredPropertyFact(member);
|
|
405
1895
|
if (!fieldName || (!fact.nominal && !fact.element))
|
|
406
1896
|
continue;
|
|
407
|
-
let
|
|
408
|
-
if (!
|
|
409
|
-
|
|
410
|
-
into.set(
|
|
1897
|
+
let entry = into.get(path);
|
|
1898
|
+
if (!entry) {
|
|
1899
|
+
entry = { name: name.text, fields: new Map() };
|
|
1900
|
+
into.set(path, entry);
|
|
1901
|
+
}
|
|
1902
|
+
if (!entry.fields.has(fieldName))
|
|
1903
|
+
entry.fields.set(fieldName, fact);
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* The file's property facts keyed BOTH ways a reader asks (bd
|
|
1908
|
+
* tea-rags-mcp-y99pg.36): by nesting path, and by the short name text every
|
|
1909
|
+
* pre-path reader — and every type-name spelling a receiver fold produces —
|
|
1910
|
+
* keys a type by.
|
|
1911
|
+
*
|
|
1912
|
+
* A short name several nested types share (Alamofire's Combine.swift nests an
|
|
1913
|
+
* `Inner` in each of three publishers) used to take the first body's fields,
|
|
1914
|
+
* so `request` typed `DataRequest` inside `DownloadResponsePublisher.Inner`.
|
|
1915
|
+
* The short entry is now:
|
|
1916
|
+
*
|
|
1917
|
+
* - a declaration whose path IS its name (top-level, or an extension
|
|
1918
|
+
* spelled `extension A.B`) speaks for it alone — nothing nested under a
|
|
1919
|
+
* namesake reaches it;
|
|
1920
|
+
* - otherwise the nested namesakes' union, keeping only the fields every
|
|
1921
|
+
* namesake declaring them agrees on. A disagreement names no type, and a
|
|
1922
|
+
* reader that can tell the namesakes apart reads the path key instead.
|
|
1923
|
+
*/
|
|
1924
|
+
function swiftPropertyTypeViews(byPath) {
|
|
1925
|
+
const out = new Map();
|
|
1926
|
+
const pathsByName = new Map();
|
|
1927
|
+
for (const [path, entry] of byPath) {
|
|
1928
|
+
out.set(path, entry.fields);
|
|
1929
|
+
const paths = pathsByName.get(entry.name) ?? [];
|
|
1930
|
+
paths.push(path);
|
|
1931
|
+
pathsByName.set(entry.name, paths);
|
|
1932
|
+
}
|
|
1933
|
+
for (const [name, paths] of pathsByName) {
|
|
1934
|
+
if (out.has(name))
|
|
1935
|
+
continue;
|
|
1936
|
+
const merged = new Map();
|
|
1937
|
+
const poisoned = new Set();
|
|
1938
|
+
for (const path of paths) {
|
|
1939
|
+
for (const [field, fact] of byPath.get(path)?.fields ?? []) {
|
|
1940
|
+
const seen = merged.get(field);
|
|
1941
|
+
if (seen === undefined)
|
|
1942
|
+
merged.set(field, fact);
|
|
1943
|
+
else if (seen.nominal !== fact.nominal || seen.element !== fact.element)
|
|
1944
|
+
poisoned.add(field);
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
for (const field of poisoned)
|
|
1948
|
+
merged.delete(field);
|
|
1949
|
+
if (merged.size > 0)
|
|
1950
|
+
out.set(name, merged);
|
|
1951
|
+
}
|
|
1952
|
+
return out;
|
|
1953
|
+
}
|
|
1954
|
+
/** A type declaration's nesting path: the enclosing types' names outward-in, then its own. */
|
|
1955
|
+
function swiftNestingPath(declaration) {
|
|
1956
|
+
const own = declaration.childForFieldName("name")?.text ?? "";
|
|
1957
|
+
const outer = enclosingSwiftTypePath(declaration);
|
|
1958
|
+
return outer === null ? own : `${outer}.${own}`;
|
|
1959
|
+
}
|
|
1960
|
+
/** The nesting path of the type declaration enclosing `node`, or null at file scope. */
|
|
1961
|
+
function enclosingSwiftTypePath(node) {
|
|
1962
|
+
for (let current = node.parent; current; current = current.parent) {
|
|
1963
|
+
if (current.type === "class_declaration" || current.type === "protocol_declaration") {
|
|
1964
|
+
return current.childForFieldName("name") ? swiftNestingPath(current) : null;
|
|
411
1965
|
}
|
|
412
|
-
if (!fields.has(fieldName))
|
|
413
|
-
fields.set(fieldName, fact);
|
|
414
1966
|
}
|
|
1967
|
+
return null;
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* The name a protocol property requirement (`var manager: Manager { get }`)
|
|
1971
|
+
* declares. Its `pattern` carries the `var` keyword's binding pattern BESIDE
|
|
1972
|
+
* the name, so the one-identifier read a stored property uses finds nothing.
|
|
1973
|
+
*/
|
|
1974
|
+
function protocolRequirementName(requirement) {
|
|
1975
|
+
const pattern = requirement.children.find((c) => c.type === "pattern");
|
|
1976
|
+
const names = pattern?.namedChildren.filter((c) => c.type === "simple_identifier") ?? [];
|
|
1977
|
+
return names.length === 1 ? names[0].text : null;
|
|
415
1978
|
}
|
|
416
1979
|
/**
|
|
417
1980
|
* The published `typeName → fieldName → typeName` view of the property
|
|
@@ -422,9 +1985,9 @@ function collectSwiftPropertyTypes(node, into) {
|
|
|
422
1985
|
* nothing here while still typing `for item in items` inside the walker.
|
|
423
1986
|
*/
|
|
424
1987
|
function swiftClassFieldTypes(evidence) {
|
|
425
|
-
const out =
|
|
1988
|
+
const out = createIdentifierRecord();
|
|
426
1989
|
for (const [typeName, fields] of evidence.propertyTypes) {
|
|
427
|
-
const published =
|
|
1990
|
+
const published = createIdentifierRecord();
|
|
428
1991
|
for (const [fieldName, fact] of fields)
|
|
429
1992
|
if (fact.nominal)
|
|
430
1993
|
published[fieldName] = fact.nominal;
|
|
@@ -445,7 +2008,7 @@ function swiftClassFieldTypes(evidence) {
|
|
|
445
2008
|
* carrying its own body.
|
|
446
2009
|
*/
|
|
447
2010
|
function swiftClassFieldTypesByClassKey(published, relPath) {
|
|
448
|
-
const out =
|
|
2011
|
+
const out = createIdentifierRecord();
|
|
449
2012
|
for (const [typeName, fields] of Object.entries(published))
|
|
450
2013
|
out[swiftTypeFieldKey(relPath, typeName)] = fields;
|
|
451
2014
|
return out;
|
|
@@ -456,18 +2019,28 @@ function swiftClassFieldTypesByClassKey(published, relPath) {
|
|
|
456
2019
|
* Swift writes its return types, so this is a read rather than the terminal-
|
|
457
2020
|
* expression fold `kernel/return-inference.ts` performs for Ruby and Python.
|
|
458
2021
|
* The two gates are what keep the read honest: a universal / empty type
|
|
459
|
-
* (`Any`, `Void`, `Self`) has no member to land on, and
|
|
460
|
-
*
|
|
461
|
-
*
|
|
2022
|
+
* (`Any`, `Void`, `Self`) has no member to land on, and a generic parameter
|
|
2023
|
+
* is a name that exists only inside the signature — recording `T` would
|
|
2024
|
+
* fabricate a `T#member` target at every call site, so it reads as its
|
|
2025
|
+
* constraint, or as nothing when it has none (bd tea-rags-mcp-y99pg.6).
|
|
462
2026
|
*/
|
|
463
2027
|
function swiftDeclaredReturnFact(node) {
|
|
464
|
-
const fact = swiftTypeFactOf(swiftTypeNodeAfter(node, "->"));
|
|
2028
|
+
const fact = swiftGenericResolvedFact(swiftTypeFactOf(swiftTypeNodeAfter(node, "->")), node);
|
|
465
2029
|
const named = fact.nominal ?? fact.element;
|
|
466
2030
|
if (!named)
|
|
467
2031
|
return null;
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
2032
|
+
return SWIFT_UNUSABLE_RETURN_TYPES.has(named) ? null : fact;
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* `SWIFT_SELF_RETURN` for a `func` declared `-> Self`, else null (bd
|
|
2036
|
+
* tea-rags-mcp-y99pg.18). Published as a MARKER, never as the declaring type:
|
|
2037
|
+
* `Self` is the RECEIVER's type, which only the resolver's fold knows —
|
|
2038
|
+
* `dataRequest.configured()` on a method `Request` declares returns a
|
|
2039
|
+
* `DataRequest`.
|
|
2040
|
+
*/
|
|
2041
|
+
function swiftSelfReturnMarker(node) {
|
|
2042
|
+
const declared = swiftTypeFactOf(swiftTypeNodeAfter(node, "->")).nominal;
|
|
2043
|
+
return declared === SWIFT_SELF_RETURN ? SWIFT_SELF_RETURN : null;
|
|
471
2044
|
}
|
|
472
2045
|
/** Whether `name` is one of the declaration's own generic parameters (`func decode<T>() -> T`). */
|
|
473
2046
|
function declaresSwiftTypeParameter(node, name) {
|
|
@@ -495,11 +2068,12 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
495
2068
|
line: node.startPosition.row + 1,
|
|
496
2069
|
functionKey: enclosingSwiftFunctionKey(node),
|
|
497
2070
|
enclosingType: enclosingSwiftTypeName(node),
|
|
2071
|
+
enclosingTypePath: enclosingSwiftTypePath(node),
|
|
498
2072
|
});
|
|
499
|
-
const record = (name, fact, site, scopeEndLine) => {
|
|
2073
|
+
const record = (name, fact, site, scopeEndLine, valueChain, closureParameter, enumPayload, optional, sequenceElement) => {
|
|
500
2074
|
if (SWIFT_PSEUDO_BINDING_NAMES.has(name))
|
|
501
2075
|
return;
|
|
502
|
-
if (!fact.nominal && !fact.element)
|
|
2076
|
+
if (!fact.nominal && !fact.element && valueChain === undefined)
|
|
503
2077
|
return;
|
|
504
2078
|
const binding = {
|
|
505
2079
|
name,
|
|
@@ -507,6 +2081,11 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
507
2081
|
line: site.line,
|
|
508
2082
|
functionKey: site.functionKey,
|
|
509
2083
|
scopeEndLine,
|
|
2084
|
+
valueChain,
|
|
2085
|
+
...(closureParameter === undefined ? {} : { closureParameter }),
|
|
2086
|
+
...(enumPayload === undefined ? {} : { enumPayload }),
|
|
2087
|
+
...(optional === true ? { optional: true } : {}),
|
|
2088
|
+
...(sequenceElement === undefined ? {} : { sequenceElement }),
|
|
510
2089
|
};
|
|
511
2090
|
collected.push(binding);
|
|
512
2091
|
const sameName = bindingsByName.get(name);
|
|
@@ -515,13 +2094,21 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
515
2094
|
else
|
|
516
2095
|
bindingsByName.set(name, [binding]);
|
|
517
2096
|
};
|
|
2097
|
+
// A local only: a type-level property's initializer is not a scope a
|
|
2098
|
+
// receiver is read in.
|
|
2099
|
+
const deferredSpelling = (fact, value, site) => fact.nominal || fact.element || site.functionKey === -1 ? undefined : (swiftValueChainSpelling(value) ?? undefined);
|
|
518
2100
|
walk(root, (node) => {
|
|
519
2101
|
switch (node.type) {
|
|
520
2102
|
case "parameter":
|
|
521
2103
|
case "lambda_parameter": {
|
|
522
2104
|
const name = node.childForFieldName("name");
|
|
523
|
-
if (name)
|
|
524
|
-
|
|
2105
|
+
if (name) {
|
|
2106
|
+
// Past `inout` / `@escaping`, which sit between the colon and the type.
|
|
2107
|
+
const typeNode = swiftParameterTypeNode(node);
|
|
2108
|
+
const declared = swiftTypeFactOf(typeNode);
|
|
2109
|
+
const optional = typeNode?.type === "optional_type";
|
|
2110
|
+
record(name.text, swiftGenericResolvedFact(declared, node), siteOf(node), undefined, undefined, undefined, undefined, optional);
|
|
2111
|
+
}
|
|
525
2112
|
return;
|
|
526
2113
|
}
|
|
527
2114
|
case "property_declaration": {
|
|
@@ -530,10 +2117,20 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
530
2117
|
return;
|
|
531
2118
|
const site = siteOf(node);
|
|
532
2119
|
const declared = swiftDeclaredPropertyFact(node);
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
record(name, fact, site)
|
|
2120
|
+
const value = node.childForFieldName("value");
|
|
2121
|
+
const fact = declared.nominal ? declared : swiftExpressionFact(value, { evidence, bindingsByName, site }, 0);
|
|
2122
|
+
const spelling = deferredSpelling(fact, value, site);
|
|
2123
|
+
record(name, fact, site, enclosingSwiftClosureEndLine(node), spelling, undefined, undefined, declared.nominal !== null
|
|
2124
|
+
? swiftDeclaresOptional(node)
|
|
2125
|
+
: spelling !== undefined && swiftValueIsOptionalChained(value));
|
|
2126
|
+
// `didSet { oldValue… }` / `willSet { newValue… }`: an observer's
|
|
2127
|
+
// parameter is a value of the property's DECLARED type, for the
|
|
2128
|
+
// clause's own body (bd tea-rags-mcp-y99pg.31).
|
|
2129
|
+
if (declared.nominal) {
|
|
2130
|
+
for (const clause of swiftPropertyObserverClauses(node)) {
|
|
2131
|
+
record(clause.name, declared, siteOf(clause.node), clause.node.endPosition.row + 1);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
537
2134
|
return;
|
|
538
2135
|
}
|
|
539
2136
|
case "guard_statement":
|
|
@@ -541,27 +2138,122 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
541
2138
|
case "while_statement": {
|
|
542
2139
|
const scopeEndLine = node.type === "guard_statement" ? enclosingSwiftBlockEndLine(node) : swiftThenBlockEndLine(node);
|
|
543
2140
|
for (const clause of swiftOptionalBindingClauses(node)) {
|
|
544
|
-
|
|
545
|
-
|
|
2141
|
+
// Each clause on its OWN line: a multi-line condition's later clause
|
|
2142
|
+
// folds the earlier ones, and a spelling is visible strictly below
|
|
2143
|
+
// its line (bd tea-rags-mcp-y99pg.32).
|
|
2144
|
+
const site = siteOf(clause.nameNode);
|
|
2145
|
+
const annotated = swiftGenericResolvedFact(swiftTypeFactOf(clause.annotation), node);
|
|
546
2146
|
const annotatedOrInferred = annotated.nominal || annotated.element
|
|
547
2147
|
? annotated
|
|
548
2148
|
: swiftExpressionFact(clause.value, { evidence, bindingsByName, site }, 0);
|
|
549
2149
|
// Unwrapping `[T]?` yields `[T]`, so the element slot survives the
|
|
550
2150
|
// unwrap — the array still binds no receiver, and a `for` over the
|
|
551
2151
|
// unwrapped name still types its item.
|
|
552
|
-
|
|
2152
|
+
const spelling = deferredSpelling(annotatedOrInferred, clause.value, site);
|
|
2153
|
+
record(clause.name, annotatedOrInferred, site, scopeEndLine, spelling);
|
|
553
2154
|
}
|
|
554
2155
|
return;
|
|
555
2156
|
}
|
|
556
2157
|
case "for_statement": {
|
|
557
|
-
const
|
|
558
|
-
|
|
2158
|
+
const item = node.childForFieldName("item");
|
|
2159
|
+
const name = singleIdentifierPatternName(item);
|
|
2160
|
+
const pair = name ? null : swiftTuplePatternNames(item);
|
|
2161
|
+
if (!name && !pair)
|
|
559
2162
|
return;
|
|
560
2163
|
const site = siteOf(node);
|
|
561
2164
|
const collection = swiftExpressionFact(node.childForFieldName("collection"), { evidence, bindingsByName, site }, 0);
|
|
562
|
-
|
|
2165
|
+
const scopeEnd = swiftThenBlockEndLine(node);
|
|
2166
|
+
if (name && collection.element)
|
|
2167
|
+
record(name, { nominal: collection.element, element: null }, site, scopeEnd);
|
|
2168
|
+
// A sequence only the resolver can type: the item is its element (bd tea-rags-mcp-y99pg.37).
|
|
2169
|
+
const sequence = name && !collection.element && site.functionKey !== -1
|
|
2170
|
+
? swiftValueChainSpelling(node.childForFieldName("collection"))
|
|
2171
|
+
: null;
|
|
2172
|
+
if (name && sequence !== null) {
|
|
2173
|
+
record(name, NO_TYPE, site, scopeEnd, sequence, undefined, undefined, undefined, true);
|
|
2174
|
+
}
|
|
2175
|
+
// `for (key, value) in dictionary` (bd tea-rags-mcp-y99pg.17).
|
|
2176
|
+
if (pair && collection.entry) {
|
|
2177
|
+
pair.forEach((slotName, i) => {
|
|
2178
|
+
const nominal = collection.entry?.[i] ?? null;
|
|
2179
|
+
if (slotName !== null && nominal !== null)
|
|
2180
|
+
record(slotName, { nominal, element: null }, site, scopeEnd);
|
|
2181
|
+
});
|
|
2182
|
+
}
|
|
2183
|
+
break;
|
|
2184
|
+
}
|
|
2185
|
+
// `switch unit { case .group(let g): … }` — each payload name is bound
|
|
2186
|
+
// to its case's slot on the subject's enum, which another file
|
|
2187
|
+
// declares (bd tea-rags-mcp-y99pg.16).
|
|
2188
|
+
case "switch_statement": {
|
|
2189
|
+
const subject = swiftValueChainSpelling(node.childForFieldName("expr") ?? node.namedChildren.find((c) => c.type !== "switch_entry") ?? null);
|
|
2190
|
+
if (subject === null)
|
|
2191
|
+
return;
|
|
2192
|
+
for (const entry of node.namedChildren) {
|
|
2193
|
+
if (entry.type !== "switch_entry")
|
|
2194
|
+
continue;
|
|
2195
|
+
const patterns = entry.namedChildren.filter((c) => c.type === "switch_pattern");
|
|
2196
|
+
if (patterns.length !== 1)
|
|
2197
|
+
continue;
|
|
2198
|
+
const site = siteOf(entry);
|
|
2199
|
+
// The entry and its `statements` run on to the next `case`; the last
|
|
2200
|
+
// statement is where the scope ends.
|
|
2201
|
+
let last = entry.namedChildren[entry.namedChildCount - 1];
|
|
2202
|
+
while (last.type === "statements" && last.namedChildCount > 0) {
|
|
2203
|
+
last = last.namedChildren[last.namedChildCount - 1];
|
|
2204
|
+
}
|
|
2205
|
+
const endLine = last.endPosition.row + 1;
|
|
2206
|
+
for (const payload of swiftEnumCasePayloadNames(patterns[0])) {
|
|
2207
|
+
record(payload.name, NO_TYPE, site, endLine, subject, undefined, payload.slot);
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
// `catch { error… }` — a clause with no pattern binds `error: any Error`
|
|
2213
|
+
// for its own block (bd tea-rags-mcp-y99pg.10).
|
|
2214
|
+
case "catch_block": {
|
|
2215
|
+
if (node.namedChildren.some((c) => c.type !== "catch_keyword" && c.type !== "statements"))
|
|
2216
|
+
return;
|
|
2217
|
+
const body = node.namedChildren.find((c) => c.type === "statements");
|
|
2218
|
+
if (!body)
|
|
563
2219
|
return;
|
|
564
|
-
record(
|
|
2220
|
+
record("error", { nominal: "Error", element: null }, siteOf(body), node.endPosition.row + 1);
|
|
2221
|
+
return;
|
|
2222
|
+
}
|
|
2223
|
+
case "lambda_literal": {
|
|
2224
|
+
const site = siteOf(node);
|
|
2225
|
+
const facts = swiftClosureArgumentFacts(node, { evidence, bindingsByName, site });
|
|
2226
|
+
// No declaration in this file types the closure: hand its callee to
|
|
2227
|
+
// the resolver, which reads the callee's closure signature run-wide
|
|
2228
|
+
// (bd tea-rags-mcp-y99pg.13).
|
|
2229
|
+
const callee = facts ? undefined : swiftClosureCalleeSpelling(node);
|
|
2230
|
+
if (!facts && callee === undefined)
|
|
2231
|
+
return;
|
|
2232
|
+
const endLine = node.endPosition.row + 1;
|
|
2233
|
+
const bind = (name, i) => {
|
|
2234
|
+
if (facts) {
|
|
2235
|
+
if (i < facts.length)
|
|
2236
|
+
record(name, facts[i], site, endLine);
|
|
2237
|
+
}
|
|
2238
|
+
else
|
|
2239
|
+
record(name, NO_TYPE, site, endLine, callee, i);
|
|
2240
|
+
};
|
|
2241
|
+
const named = swiftLambdaParameters(node);
|
|
2242
|
+
if (named === null) {
|
|
2243
|
+
if (nestsImplicitParameterClosure(node))
|
|
2244
|
+
return;
|
|
2245
|
+
const count = facts ? facts.length : swiftImplicitParameterCount(node);
|
|
2246
|
+
for (let i = 0; i < count; i++)
|
|
2247
|
+
bind(`$${i}`, i);
|
|
2248
|
+
return;
|
|
2249
|
+
}
|
|
2250
|
+
named.forEach((parameter, i) => {
|
|
2251
|
+
const name = parameter.childForFieldName("name")?.text;
|
|
2252
|
+
// An annotated parameter is typed by its own `lambda_parameter` arm.
|
|
2253
|
+
if (!name || name === "_" || parameter.children.some((c) => c.type === ":"))
|
|
2254
|
+
return;
|
|
2255
|
+
bind(name, i);
|
|
2256
|
+
});
|
|
565
2257
|
break;
|
|
566
2258
|
}
|
|
567
2259
|
default:
|
|
@@ -570,6 +2262,79 @@ function collectSwiftTypedBindings(root, evidence) {
|
|
|
570
2262
|
});
|
|
571
2263
|
return collected;
|
|
572
2264
|
}
|
|
2265
|
+
/**
|
|
2266
|
+
* The names a `.caseName(let a, _)` / `let .caseName(a, _)` switch pattern
|
|
2267
|
+
* binds, each with its payload slot (bd tea-rags-mcp-y99pg.16). Any other
|
|
2268
|
+
* pattern shape — a qualified case, a nested pattern, a labelled slot — binds
|
|
2269
|
+
* nothing here.
|
|
2270
|
+
*/
|
|
2271
|
+
function swiftEnumCasePayloadNames(switchPattern) {
|
|
2272
|
+
const pattern = switchPattern.namedChildren.find((c) => c.type === "pattern");
|
|
2273
|
+
if (!pattern)
|
|
2274
|
+
return [];
|
|
2275
|
+
const { children } = pattern;
|
|
2276
|
+
const outerLet = children[0]?.type === "value_binding_pattern" && children[0].namedChildCount <= 1;
|
|
2277
|
+
const dot = children.findIndex((c) => c.type === ".");
|
|
2278
|
+
const caseNode = dot === -1 ? undefined : children[dot + 1];
|
|
2279
|
+
if (dot !== (outerLet ? 1 : 0) || caseNode?.type !== "simple_identifier")
|
|
2280
|
+
return [];
|
|
2281
|
+
const out = [];
|
|
2282
|
+
children
|
|
2283
|
+
.filter((c) => c.type === "pattern")
|
|
2284
|
+
.forEach((slot, index) => {
|
|
2285
|
+
const named = slot.namedChildren;
|
|
2286
|
+
let name;
|
|
2287
|
+
if (named.length === 2 && named[0].type === "value_binding_pattern" && named[1].type === "simple_identifier") {
|
|
2288
|
+
name = named[1].text;
|
|
2289
|
+
}
|
|
2290
|
+
else if (outerLet && named.length === 1 && named[0].type === "simple_identifier") {
|
|
2291
|
+
name = named[0].text;
|
|
2292
|
+
}
|
|
2293
|
+
if (name !== undefined && name !== "_")
|
|
2294
|
+
out.push({ name, slot: { caseName: caseNode.text, index } });
|
|
2295
|
+
});
|
|
2296
|
+
return out;
|
|
2297
|
+
}
|
|
2298
|
+
/** The parameter name each observer clause the language gives it when the clause names none. */
|
|
2299
|
+
const SWIFT_OBSERVER_DEFAULT_PARAMETER = {
|
|
2300
|
+
didset_clause: "oldValue",
|
|
2301
|
+
willset_clause: "newValue",
|
|
2302
|
+
};
|
|
2303
|
+
/**
|
|
2304
|
+
* A property's `didSet` / `willSet` clauses, each with the name its parameter
|
|
2305
|
+
* goes by — the one the clause spells (`didSet(previous)`), else the
|
|
2306
|
+
* language's implicit `oldValue` / `newValue`.
|
|
2307
|
+
*/
|
|
2308
|
+
function swiftPropertyObserverClauses(property) {
|
|
2309
|
+
const block = property.namedChildren.find((c) => c.type === "willset_didset_block");
|
|
2310
|
+
if (!block)
|
|
2311
|
+
return [];
|
|
2312
|
+
const out = [];
|
|
2313
|
+
for (const clause of block.namedChildren) {
|
|
2314
|
+
const implicit = SWIFT_OBSERVER_DEFAULT_PARAMETER[clause.type];
|
|
2315
|
+
if (implicit === undefined)
|
|
2316
|
+
continue;
|
|
2317
|
+
const spelled = clause.namedChildren.find((c) => c.type === "simple_identifier")?.text;
|
|
2318
|
+
out.push({ name: spelled ?? implicit, node: clause });
|
|
2319
|
+
}
|
|
2320
|
+
return out;
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
* The two names of a `(a, b)` for-in pattern, `null` for a `_` slot; null
|
|
2324
|
+
* for any other pattern shape.
|
|
2325
|
+
*/
|
|
2326
|
+
function swiftTuplePatternNames(item) {
|
|
2327
|
+
if (!item || item.children[0]?.type !== "(")
|
|
2328
|
+
return null;
|
|
2329
|
+
const slots = item.namedChildren.filter((c) => c.type === "pattern");
|
|
2330
|
+
if (slots.length !== 2 || slots.length !== item.namedChildCount)
|
|
2331
|
+
return null;
|
|
2332
|
+
const names = slots.map((slot) => {
|
|
2333
|
+
const only = slot.namedChildCount === 1 ? slot.namedChildren[0] : null;
|
|
2334
|
+
return only?.type === "simple_identifier" ? only.text : null;
|
|
2335
|
+
});
|
|
2336
|
+
return [names[0], names[1]];
|
|
2337
|
+
}
|
|
573
2338
|
/**
|
|
574
2339
|
* Read the `let` / `var` clauses out of a flat condition list.
|
|
575
2340
|
*
|
|
@@ -595,10 +2360,29 @@ function swiftOptionalBindingClauses(node) {
|
|
|
595
2360
|
next += 1;
|
|
596
2361
|
}
|
|
597
2362
|
const value = kids[next]?.type === "=" ? (kids[next + 1] ?? null) : nameNode;
|
|
598
|
-
out.push({ name: nameNode.text, annotation, value });
|
|
2363
|
+
out.push({ name: nameNode.text, nameNode, annotation, value });
|
|
599
2364
|
}
|
|
600
2365
|
return out;
|
|
601
2366
|
}
|
|
2367
|
+
/**
|
|
2368
|
+
* What a FILE-SCOPE `property_declaration` publishes as a module value, or
|
|
2369
|
+
* null: a single bound name, typed by the same narrow rule a stored property
|
|
2370
|
+
* is ({@link swiftDeclaredPropertyFact}), else spelled by the rule a local's
|
|
2371
|
+
* cross-file right-hand side is ({@link swiftValueChainSpelling}). The caller
|
|
2372
|
+
* owns which nodes are file-scope and which access levels leave the file.
|
|
2373
|
+
*/
|
|
2374
|
+
export function swiftModuleValueOf(node) {
|
|
2375
|
+
if (node.type !== "property_declaration")
|
|
2376
|
+
return null;
|
|
2377
|
+
const name = singleIdentifierPatternName(node.childForFieldName("name"));
|
|
2378
|
+
if (name === null || SWIFT_PSEUDO_BINDING_NAMES.has(name))
|
|
2379
|
+
return null;
|
|
2380
|
+
const declared = swiftDeclaredPropertyFact(node);
|
|
2381
|
+
if (declared.nominal)
|
|
2382
|
+
return { name, type: declared.nominal };
|
|
2383
|
+
const spelling = swiftValueChainSpelling(node.childForFieldName("value"));
|
|
2384
|
+
return spelling === null ? null : { name, spelling };
|
|
2385
|
+
}
|
|
602
2386
|
/**
|
|
603
2387
|
* The type a `property_declaration` DECLARES, or nothing. Annotation first; on
|
|
604
2388
|
* its absence, a CapWords initializer call.
|
|
@@ -608,12 +2392,62 @@ function swiftOptionalBindingClauses(node) {
|
|
|
608
2392
|
* {@link swiftExpressionFact} when this is silent; a type-level property does
|
|
609
2393
|
* not, because the property map is that walk's input.
|
|
610
2394
|
*/
|
|
2395
|
+
/**
|
|
2396
|
+
* Whether a `property_declaration` ANNOTATES its type as `T?` (bd
|
|
2397
|
+
* tea-rags-mcp-y99pg.33). `T!` is not: an implicitly unwrapped value reads its
|
|
2398
|
+
* members off `T`. Read positionally, as every type position here is.
|
|
2399
|
+
*/
|
|
2400
|
+
function swiftDeclaresOptional(node) {
|
|
2401
|
+
const annotation = node.children.find((c) => c.type === "type_annotation");
|
|
2402
|
+
return annotation !== undefined && swiftTypeNodeAfter(annotation, ":")?.type === "optional_type";
|
|
2403
|
+
}
|
|
611
2404
|
function swiftDeclaredPropertyFact(node) {
|
|
612
2405
|
const annotation = node.children.find((c) => c.type === "type_annotation");
|
|
613
2406
|
if (annotation)
|
|
614
|
-
return swiftTypeFactOf(swiftTypeNodeAfter(annotation, ":"));
|
|
2407
|
+
return swiftGenericResolvedFact(swiftTypeFactOf(swiftTypeNodeAfter(annotation, ":")), node);
|
|
615
2408
|
return constructedTypeFact(node.childForFieldName("value"));
|
|
616
2409
|
}
|
|
2410
|
+
/**
|
|
2411
|
+
* The type a STORED property (a type member or a module-level value)
|
|
2412
|
+
* publishes: {@link swiftDeclaredPropertyFact}, else the literal it is
|
|
2413
|
+
* initialised by. A local reads the full expression walk instead, which also
|
|
2414
|
+
* types a literal's elements.
|
|
2415
|
+
*/
|
|
2416
|
+
function swiftStoredPropertyFact(node) {
|
|
2417
|
+
const declared = swiftDeclaredPropertyFact(node);
|
|
2418
|
+
if (declared.nominal || declared.element)
|
|
2419
|
+
return declared;
|
|
2420
|
+
return swiftLiteralPropertyFact(node.childForFieldName("value")) ?? declared;
|
|
2421
|
+
}
|
|
2422
|
+
/**
|
|
2423
|
+
* The type a collection, string or Boolean LITERAL names at the declaration itself (bd
|
|
2424
|
+
* tea-rags-mcp-y99pg.39): `[(1, 2), (14, 1)]` is an `Array`, `["a": 1]` a
|
|
2425
|
+
* `Dictionary`, `"GitHub"` a `String` — Swift's defaults for an unannotated
|
|
2426
|
+
* literal. Evidence written at the declaration, like a CapWords initializer,
|
|
2427
|
+
* and read without typing any element, so a property's type still never
|
|
2428
|
+
* depends on another's. An empty `[]` is not here — only its context types
|
|
2429
|
+
* it — and neither is a number, whose default the resolver has no use for.
|
|
2430
|
+
*/
|
|
2431
|
+
function swiftLiteralPropertyFact(value) {
|
|
2432
|
+
if (value === null)
|
|
2433
|
+
return null;
|
|
2434
|
+
switch (value.type) {
|
|
2435
|
+
case "array_literal":
|
|
2436
|
+
return value.namedChildren.some((c) => c.type !== "comment") ? { nominal: "Array", element: null } : null;
|
|
2437
|
+
case "dictionary_literal":
|
|
2438
|
+
return { nominal: "Dictionary", element: null };
|
|
2439
|
+
case "line_string_literal":
|
|
2440
|
+
case "multi_line_string_literal":
|
|
2441
|
+
case "raw_string_literal":
|
|
2442
|
+
return { nominal: "String", element: null };
|
|
2443
|
+
// `@State private var showing = false` (bd tea-rags-mcp-3j7rg): a Boolean
|
|
2444
|
+
// literal's default type is `Bool`, and reading the property reads it.
|
|
2445
|
+
case "boolean_literal":
|
|
2446
|
+
return { nominal: "Bool", element: null };
|
|
2447
|
+
default:
|
|
2448
|
+
return null;
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
617
2451
|
/**
|
|
618
2452
|
* `Helper()` → `Helper`. Nothing for anything else, including a lowercase callee.
|
|
619
2453
|
*
|
|
@@ -625,12 +2459,26 @@ function swiftDeclaredPropertyFact(node) {
|
|
|
625
2459
|
* `isCapWordsConstructor`.
|
|
626
2460
|
*/
|
|
627
2461
|
function constructedTypeFact(value) {
|
|
2462
|
+
if (value?.type === "constructor_expression")
|
|
2463
|
+
return swiftConstructedGenericFact(value);
|
|
628
2464
|
if (value?.type !== "call_expression")
|
|
629
2465
|
return NO_TYPE;
|
|
630
2466
|
const callee = value.namedChildren.find((c) => c.type !== "call_suffix");
|
|
631
|
-
if (callee
|
|
2467
|
+
if (!callee)
|
|
632
2468
|
return NO_TYPE;
|
|
633
|
-
|
|
2469
|
+
if (callee.type !== "simple_identifier")
|
|
2470
|
+
return swiftCollectionConstructionFact(callee) ?? NO_TYPE;
|
|
2471
|
+
return /^_*[A-Z]/.test(callee.text) ? { nominal: callee.text, element: null } : NO_TYPE;
|
|
2472
|
+
}
|
|
2473
|
+
/**
|
|
2474
|
+
* `Protected<[T]>(…)` — tree-sitter-swift parses an explicitly specialised
|
|
2475
|
+
* construction as a `constructor_expression` over a `user_type`, not a call —
|
|
2476
|
+
* types as the generic's nominal (bd tea-rags-mcp-y99pg.10).
|
|
2477
|
+
*/
|
|
2478
|
+
function swiftConstructedGenericFact(node) {
|
|
2479
|
+
const constructed = node.namedChildren.find((c) => c.type === "user_type") ?? null;
|
|
2480
|
+
const fact = swiftTypeFactOf(constructed);
|
|
2481
|
+
return fact.nominal && /^_*[A-Z]/.test(fact.nominal) ? fact : NO_TYPE;
|
|
634
2482
|
}
|
|
635
2483
|
/** A `pattern` node's identifier when it binds exactly one name; null for tuple / destructuring patterns. */
|
|
636
2484
|
function singleIdentifierPatternName(pattern) {
|
|
@@ -681,30 +2529,88 @@ function swiftTypeNodeAfter(node, separator) {
|
|
|
681
2529
|
* a PARENTHESIZED type, and the parentheses are required around an
|
|
682
2530
|
* existential before `?`. A tuple with two or more items proves nothing,
|
|
683
2531
|
* because no member dispatches on a tuple.
|
|
684
|
-
* - `array_type` — `[Foo]` → ELEMENT `Foo
|
|
685
|
-
* Foo; see the container note in the file docblock.
|
|
686
|
-
* -
|
|
687
|
-
*
|
|
2532
|
+
* - `array_type` — `[Foo]` → nominal `Array`, ELEMENT `Foo`. An Array is not
|
|
2533
|
+
* a Foo; see the container note in the file docblock.
|
|
2534
|
+
* - `dictionary_type` — `[K: V]` → nominal `Dictionary`, no element.
|
|
2535
|
+
* - anything else, notably `function_type`, and a `tuple_type` that is a
|
|
2536
|
+
* real tuple — nothing.
|
|
688
2537
|
*/
|
|
2538
|
+
const SWIFT_METATYPE_SUFFIX = /\.(?:Type|Protocol)$/;
|
|
2539
|
+
/** Constraints that declare no member a call could dispatch on: marker protocols and `AnyObject`. */
|
|
2540
|
+
const SWIFT_MARKER_PROTOCOLS = new Set([
|
|
2541
|
+
"Sendable",
|
|
2542
|
+
"AnyObject",
|
|
2543
|
+
"Copyable",
|
|
2544
|
+
"Escapable",
|
|
2545
|
+
"BitwiseCopyable",
|
|
2546
|
+
"SendableMetatype",
|
|
2547
|
+
]);
|
|
689
2548
|
function swiftTypeFactOf(typeNode) {
|
|
690
2549
|
if (!typeNode)
|
|
691
2550
|
return NO_TYPE;
|
|
692
2551
|
if (typeNode.type === "optional_type")
|
|
693
2552
|
return swiftTypeFactOf(typeNode.namedChildren[0] ?? null);
|
|
694
2553
|
if (typeNode.type === "array_type") {
|
|
695
|
-
|
|
696
|
-
|
|
2554
|
+
return { nominal: "Array", element: swiftTypeFactOf(typeNode.namedChildren[0] ?? null).nominal };
|
|
2555
|
+
}
|
|
2556
|
+
if (typeNode.type === "dictionary_type") {
|
|
2557
|
+
// Positionally, for the materialization hazard `swiftTypeNodeAfter` documents.
|
|
2558
|
+
const [key, value] = typeNode.namedChildren;
|
|
2559
|
+
return {
|
|
2560
|
+
nominal: "Dictionary",
|
|
2561
|
+
element: null,
|
|
2562
|
+
entry: [swiftTypeFactOf(key ?? null).nominal, swiftTypeFactOf(value ?? null).nominal],
|
|
2563
|
+
};
|
|
697
2564
|
}
|
|
698
|
-
|
|
2565
|
+
// `any P` and `some P` both dispatch a member call on P's requirement.
|
|
2566
|
+
if (typeNode.type === "existential_type" || typeNode.type === "opaque_type") {
|
|
699
2567
|
return swiftTypeFactOf(typeNode.namedChildren[0] ?? null);
|
|
2568
|
+
}
|
|
2569
|
+
// `Subscriber & Sendable` dispatches on Subscriber: a marker protocol declares
|
|
2570
|
+
// no member. Two real protocols leave the lookup undecided (bd tea-rags-mcp-y99pg.28).
|
|
2571
|
+
if (typeNode.type === "protocol_composition_type") {
|
|
2572
|
+
const real = typeNode.namedChildren.filter((c) => !SWIFT_MARKER_PROTOCOLS.has(c.text.trim()));
|
|
2573
|
+
return real.length === 1 ? swiftTypeFactOf(real[0]) : NO_TYPE;
|
|
2574
|
+
}
|
|
700
2575
|
if (typeNode.type === "tuple_type")
|
|
701
2576
|
return swiftTypeFactOf(parenthesizedSwiftTypeNode(typeNode));
|
|
2577
|
+
if (typeNode.type === "metatype")
|
|
2578
|
+
return swiftTypeFactOf(typeNode.namedChildren[0] ?? null);
|
|
702
2579
|
if (typeNode.type !== "user_type")
|
|
703
2580
|
return NO_TYPE;
|
|
704
2581
|
const raw = typeNode.text;
|
|
705
2582
|
const generics = raw.indexOf("<");
|
|
706
|
-
|
|
707
|
-
|
|
2583
|
+
// `Foo.Type` / `Foo.Protocol` is Foo's metatype: a member read off it is one
|
|
2584
|
+
// of Foo's static members, which compose under Foo (bd tea-rags-mcp-y99pg.12).
|
|
2585
|
+
const bare = (generics === -1 ? raw : raw.slice(0, generics)).trim().replace(SWIFT_METATYPE_SUFFIX, "");
|
|
2586
|
+
if (bare.length === 0)
|
|
2587
|
+
return NO_TYPE;
|
|
2588
|
+
return { nominal: bare, element: swiftSpelledSequenceElement(typeNode, bare) };
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* The standard library sequences whose ONE generic argument is their
|
|
2592
|
+
* `Element` — `Set<Request>` iterates `Request`s exactly as `[Request]` does
|
|
2593
|
+
* (bd tea-rags-mcp-y99pg.32). `Dictionary`, `Result` and every other generic
|
|
2594
|
+
* type are absent: an argument of theirs is not what a `for` or a `forEach`
|
|
2595
|
+
* hands its body.
|
|
2596
|
+
*/
|
|
2597
|
+
export const SWIFT_SINGLE_ELEMENT_SEQUENCES = new Set([
|
|
2598
|
+
"Array",
|
|
2599
|
+
"Set",
|
|
2600
|
+
"ArraySlice",
|
|
2601
|
+
"ContiguousArray",
|
|
2602
|
+
]);
|
|
2603
|
+
/**
|
|
2604
|
+
* The element nominal a `user_type` spelling one of
|
|
2605
|
+
* {@link SWIFT_SINGLE_ELEMENT_SEQUENCES} with its argument states, or null.
|
|
2606
|
+
* Read positionally off `type_arguments`, for the materialization hazard
|
|
2607
|
+
* {@link swiftTypeNodeAfter} documents.
|
|
2608
|
+
*/
|
|
2609
|
+
function swiftSpelledSequenceElement(typeNode, nominal) {
|
|
2610
|
+
if (!SWIFT_SINGLE_ELEMENT_SEQUENCES.has(nominal))
|
|
2611
|
+
return null;
|
|
2612
|
+
const args = typeNode.children.find((c) => c.type === "type_arguments")?.namedChildren ?? [];
|
|
2613
|
+
return args.length === 1 ? swiftTypeFactOf(args[0]).nominal : null;
|
|
708
2614
|
}
|
|
709
2615
|
/**
|
|
710
2616
|
* The type a `tuple_type` merely PARENTHESISES, or null when it is a real
|
|
@@ -748,24 +2654,151 @@ function swiftExpressionFact(node, scope, depth) {
|
|
|
748
2654
|
case "postfix_expression":
|
|
749
2655
|
return swiftExpressionFact(node.namedChildren[0] ?? null, scope, depth + 1);
|
|
750
2656
|
case "self_expression":
|
|
751
|
-
return { nominal: scope.site.enclosingType, element:
|
|
2657
|
+
return { nominal: scope.site.enclosingType, element: enclosingSwiftSelfElement(node) };
|
|
752
2658
|
case "simple_identifier":
|
|
753
2659
|
return node.text === "Self"
|
|
754
2660
|
? { nominal: scope.site.enclosingType, element: null }
|
|
755
2661
|
: swiftIdentifierFact(node.text, scope);
|
|
756
2662
|
case "navigation_expression": {
|
|
757
2663
|
const member = node.childForFieldName("suffix")?.childForFieldName("suffix");
|
|
2664
|
+
if (!member)
|
|
2665
|
+
return NO_TYPE;
|
|
2666
|
+
const element = swiftElementAccess(node.childForFieldName("target"), member.text, SWIFT_ELEMENT_PROPERTIES, scope, depth);
|
|
2667
|
+
if (element)
|
|
2668
|
+
return element;
|
|
758
2669
|
const owner = swiftReceiverTypeName(node.childForFieldName("target"), scope, depth);
|
|
759
|
-
if (!
|
|
2670
|
+
if (!owner)
|
|
760
2671
|
return NO_TYPE;
|
|
761
|
-
return
|
|
2672
|
+
return swiftPropertyFact(owner, member.text, scope);
|
|
762
2673
|
}
|
|
763
2674
|
case "call_expression":
|
|
764
2675
|
return swiftCallResultFact(node, scope, depth);
|
|
2676
|
+
case "constructor_expression":
|
|
2677
|
+
return swiftConstructedGenericFact(node);
|
|
2678
|
+
// A literal's default type (bd tea-rags-mcp-y99pg.27): `"…"` is String.
|
|
2679
|
+
case "line_string_literal":
|
|
2680
|
+
case "multi_line_string_literal":
|
|
2681
|
+
case "raw_string_literal":
|
|
2682
|
+
return { nominal: "String", element: null };
|
|
2683
|
+
case "array_literal":
|
|
2684
|
+
return swiftArrayLiteralFact(node, scope, depth);
|
|
2685
|
+
// `x as? Foo` / `x as! Foo` / `x as Foo` — the cast names its type.
|
|
2686
|
+
case "as_expression":
|
|
2687
|
+
return swiftTypeFactOf(node.namedChildren[node.namedChildCount - 1] ?? null);
|
|
2688
|
+
// `a ?? b` — the left operand, unwrapped; the right one where it proves nothing.
|
|
2689
|
+
case "nil_coalescing_expression": {
|
|
2690
|
+
const left = swiftExpressionFact(node.namedChildren[0] ?? null, scope, depth + 1);
|
|
2691
|
+
if (left.nominal || left.element)
|
|
2692
|
+
return left;
|
|
2693
|
+
return swiftExpressionFact(node.namedChildren[node.namedChildCount - 1] ?? null, scope, depth + 1);
|
|
2694
|
+
}
|
|
765
2695
|
default:
|
|
766
2696
|
return NO_TYPE;
|
|
767
2697
|
}
|
|
768
2698
|
}
|
|
2699
|
+
/**
|
|
2700
|
+
* `[a, b]` is an Array whose element is the type every element proves, or no
|
|
2701
|
+
* element where they disagree or one proves nothing; `[]` proves nothing, since
|
|
2702
|
+
* only its context types it (bd tea-rags-mcp-y99pg.27).
|
|
2703
|
+
*/
|
|
2704
|
+
function swiftArrayLiteralFact(node, scope, depth) {
|
|
2705
|
+
const elements = node.namedChildren.filter((c) => c.type !== "comment");
|
|
2706
|
+
if (elements.length === 0)
|
|
2707
|
+
return NO_TYPE;
|
|
2708
|
+
const types = new Set(elements.map((element) => swiftExpressionFact(element, scope, depth + 1).nominal));
|
|
2709
|
+
const [only] = types;
|
|
2710
|
+
return { nominal: "Array", element: types.size === 1 && only !== undefined ? only : null };
|
|
2711
|
+
}
|
|
2712
|
+
/**
|
|
2713
|
+
* The SPELLING of a value chain the resolver can fold — `self`, a value or
|
|
2714
|
+
* type name, then `.member` and `.method(…)` links — with `try` / `await`,
|
|
2715
|
+
* optional chaining, force unwraps and call arguments stripped, and `a ?? b`
|
|
2716
|
+
* read as `a`. Null for anything else, a chain headed by a bare call included:
|
|
2717
|
+
* the fold types a head by name, and `make()` is no name.
|
|
2718
|
+
*/
|
|
2719
|
+
function swiftValueChainSpelling(node, depth = 0) {
|
|
2720
|
+
if (!node || depth > SWIFT_MAX_TYPE_HOPS + 2)
|
|
2721
|
+
return null;
|
|
2722
|
+
switch (node.type) {
|
|
2723
|
+
case "try_expression":
|
|
2724
|
+
case "await_expression":
|
|
2725
|
+
return swiftValueChainSpelling(node.namedChildren[node.namedChildCount - 1] ?? null, depth + 1);
|
|
2726
|
+
case "postfix_expression":
|
|
2727
|
+
case "nil_coalescing_expression":
|
|
2728
|
+
return swiftValueChainSpelling(node.namedChildren[0] ?? null, depth + 1);
|
|
2729
|
+
case "self_expression":
|
|
2730
|
+
return "self";
|
|
2731
|
+
case "simple_identifier":
|
|
2732
|
+
return node.text;
|
|
2733
|
+
case "navigation_expression": {
|
|
2734
|
+
const member = node.childForFieldName("suffix")?.childForFieldName("suffix");
|
|
2735
|
+
const target = swiftValueChainSpelling(node.childForFieldName("target"), depth + 1);
|
|
2736
|
+
return member?.type === "simple_identifier" && target !== null ? `${target}.${member.text}` : null;
|
|
2737
|
+
}
|
|
2738
|
+
case "call_expression": {
|
|
2739
|
+
const suffix = node.children.find((c) => c.type === "call_suffix");
|
|
2740
|
+
// `tiles.filter { … }`: a trailing closure is one more argument, and the
|
|
2741
|
+
// spelling strips arguments (bd tea-rags-mcp-y99pg.39).
|
|
2742
|
+
if (!suffix || suffix.children.some((c) => c.type !== "value_arguments" && c.type !== "lambda_literal")) {
|
|
2743
|
+
return null;
|
|
2744
|
+
}
|
|
2745
|
+
const callee = node.namedChildren.find((c) => c.type !== "call_suffix");
|
|
2746
|
+
const spelled = callee?.type === "navigation_expression" ? swiftValueChainSpelling(callee, depth + 1) : null;
|
|
2747
|
+
// `read(\.activeRequests)`: the one argument a generic return can be
|
|
2748
|
+
// bound by, so the spelling keeps it (bd tea-rags-mcp-y99pg.37).
|
|
2749
|
+
const keyPath = suffix.children.some((c) => c.type === "lambda_literal")
|
|
2750
|
+
? null
|
|
2751
|
+
: swiftLoneKeyPathArgument(suffix);
|
|
2752
|
+
return spelled !== null && keyPath !== null ? `${spelled}(${keyPath})` : spelled;
|
|
2753
|
+
}
|
|
2754
|
+
default:
|
|
2755
|
+
return null;
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
/**
|
|
2759
|
+
* Whether the value a {@link swiftValueChainSpelling} spells is an OPTIONAL
|
|
2760
|
+
* the spelling cannot show (bd tea-rags-mcp-y99pg.39): some link of the chain
|
|
2761
|
+
* is optional-chained (`a.first?.model` — the `?` is a child of the
|
|
2762
|
+
* navigation, read positionally because its field collides with `target`),
|
|
2763
|
+
* or the whole is `try?`'d. A force unwrap and a `??` end the question with
|
|
2764
|
+
* "not known optional", which is what a spelling meant before.
|
|
2765
|
+
*/
|
|
2766
|
+
function swiftValueIsOptionalChained(node, depth = 0) {
|
|
2767
|
+
if (!node || depth > SWIFT_MAX_TYPE_HOPS + 2)
|
|
2768
|
+
return false;
|
|
2769
|
+
switch (node.type) {
|
|
2770
|
+
case "try_expression": {
|
|
2771
|
+
const operator = node.children.find((c) => c.type === "try_operator");
|
|
2772
|
+
if (operator?.children.some((c) => c.type === "?"))
|
|
2773
|
+
return true;
|
|
2774
|
+
return swiftValueIsOptionalChained(node.namedChildren[node.namedChildCount - 1] ?? null, depth + 1);
|
|
2775
|
+
}
|
|
2776
|
+
case "await_expression":
|
|
2777
|
+
return swiftValueIsOptionalChained(node.namedChildren[node.namedChildCount - 1] ?? null, depth + 1);
|
|
2778
|
+
case "navigation_expression":
|
|
2779
|
+
if (node.children.some((c) => c.type === "?"))
|
|
2780
|
+
return true;
|
|
2781
|
+
return swiftValueIsOptionalChained(node.namedChildren.find((c) => c.type !== "navigation_suffix") ?? null, depth + 1);
|
|
2782
|
+
case "call_expression":
|
|
2783
|
+
return swiftValueIsOptionalChained(node.namedChildren.find((c) => c.type !== "call_suffix") ?? null, depth + 1);
|
|
2784
|
+
default:
|
|
2785
|
+
return false;
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
/** `\.p`, `\.p.q`, `\.self` — a root-inferred key path of plain property names. */
|
|
2789
|
+
const SWIFT_PLAIN_KEY_PATH = /^\\\.(?:self|[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)$/;
|
|
2790
|
+
/** The text of a call's ONE unlabeled argument when it is a plain key path, else null. */
|
|
2791
|
+
function swiftLoneKeyPathArgument(suffix) {
|
|
2792
|
+
const list = suffix.children.find((c) => c.type === "value_arguments");
|
|
2793
|
+
const args = (list?.namedChildren ?? []).filter((c) => c.type === "value_argument");
|
|
2794
|
+
if (args.length !== 1)
|
|
2795
|
+
return null;
|
|
2796
|
+
const [arg] = args;
|
|
2797
|
+
if (arg.children.some((c) => c.type === "value_argument_label"))
|
|
2798
|
+
return null;
|
|
2799
|
+
const text = arg.text.trim();
|
|
2800
|
+
return SWIFT_PLAIN_KEY_PATH.test(text) ? text : null;
|
|
2801
|
+
}
|
|
769
2802
|
/**
|
|
770
2803
|
* The type a bare identifier holds: the nearest binding ABOVE it in the same
|
|
771
2804
|
* function scope, else the enclosing type's property of that name — Swift's
|
|
@@ -793,7 +2826,19 @@ function swiftIdentifierFact(name, scope) {
|
|
|
793
2826
|
if (best)
|
|
794
2827
|
return best.fact;
|
|
795
2828
|
const owner = scope.site.enclosingType;
|
|
796
|
-
return
|
|
2829
|
+
return owner ? swiftPropertyFact(owner, name, scope) : NO_TYPE;
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* The fact of property `name` on the type `owner` names. The enclosing type's
|
|
2833
|
+
* own name reads its NESTING PATH first — Swift resolves that name lexically,
|
|
2834
|
+
* so inside `DownloadResponsePublisher.Inner` an `Inner` is that type and not
|
|
2835
|
+
* a namesake nested elsewhere (bd tea-rags-mcp-y99pg.36).
|
|
2836
|
+
*/
|
|
2837
|
+
function swiftPropertyFact(owner, name, scope) {
|
|
2838
|
+
const path = owner === scope.site.enclosingType ? scope.site.enclosingTypePath : null;
|
|
2839
|
+
return ((path ? scope.evidence.propertyTypes.get(path)?.get(name) : undefined) ??
|
|
2840
|
+
scope.evidence.propertyTypes.get(owner)?.get(name) ??
|
|
2841
|
+
NO_TYPE);
|
|
797
2842
|
}
|
|
798
2843
|
/**
|
|
799
2844
|
* The type name a RECEIVER denotes — the owner a member lookup is keyed by.
|
|
@@ -811,7 +2856,7 @@ function swiftReceiverTypeName(node, scope, depth) {
|
|
|
811
2856
|
const fact = swiftIdentifierFact(node.text, scope);
|
|
812
2857
|
if (fact.nominal)
|
|
813
2858
|
return fact.nominal;
|
|
814
|
-
return /^[A-Z]/.test(node.text) ? node.text : null;
|
|
2859
|
+
return /^_*[A-Z]/.test(node.text) ? node.text : null;
|
|
815
2860
|
}
|
|
816
2861
|
return swiftExpressionFact(node, scope, depth + 1).nominal;
|
|
817
2862
|
}
|
|
@@ -834,21 +2879,28 @@ function swiftCallResultFact(node, scope, depth) {
|
|
|
834
2879
|
const callee = node.namedChildren.find((c) => c.type !== "call_suffix");
|
|
835
2880
|
if (!callee)
|
|
836
2881
|
return NO_TYPE;
|
|
837
|
-
if (callee.type === "simple_identifier") {
|
|
838
|
-
|
|
839
|
-
return { nominal: callee.text, element: null };
|
|
840
|
-
const own = scope.evidence.returnTypes.get(returnKey(scope.site.enclosingType, callee.text));
|
|
841
|
-
if (own !== undefined)
|
|
842
|
-
return own ?? NO_TYPE;
|
|
843
|
-
return scope.evidence.returnTypes.get(returnKey(null, callee.text)) ?? NO_TYPE;
|
|
2882
|
+
if (callee.type === "simple_identifier" && /^_*[A-Z]/.test(callee.text)) {
|
|
2883
|
+
return { nominal: callee.text, element: null };
|
|
844
2884
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
2885
|
+
// `[T]()` / `[K: V]()` construct an empty collection of the named types
|
|
2886
|
+
// (bd tea-rags-mcp-y99pg.17); a literal holding values is no type name.
|
|
2887
|
+
const collection = swiftCollectionConstructionFact(callee);
|
|
2888
|
+
if (collection)
|
|
2889
|
+
return collection;
|
|
2890
|
+
if (callee.type === "navigation_expression") {
|
|
2891
|
+
const member = callee.childForFieldName("suffix")?.childForFieldName("suffix")?.text;
|
|
2892
|
+
const target = callee.childForFieldName("target");
|
|
2893
|
+
const element = member ? swiftElementAccess(target, member, SWIFT_ELEMENT_METHODS, scope, depth) : null;
|
|
2894
|
+
if (element)
|
|
2895
|
+
return element;
|
|
2896
|
+
}
|
|
2897
|
+
// A generic return bound by a `Type.self` argument names its type at the
|
|
2898
|
+
// call; the declared return holds only its constraint.
|
|
2899
|
+
const slot = swiftCalleeEvidence(callee, scope.evidence.metatypeReturns, scope, depth);
|
|
2900
|
+
const bound = slot ? swiftMetatypeArgumentType(suffix, slot) : null;
|
|
2901
|
+
if (bound !== null)
|
|
2902
|
+
return { nominal: bound, element: null };
|
|
2903
|
+
return swiftCalleeEvidence(callee, scope.evidence.returnTypes, scope, depth) ?? NO_TYPE;
|
|
852
2904
|
}
|
|
853
2905
|
/** `startIndex` of the nearest enclosing function-like declaration; `-1` at type / file level. */
|
|
854
2906
|
function enclosingSwiftFunctionKey(node) {
|
|
@@ -858,6 +2910,95 @@ function enclosingSwiftFunctionKey(node) {
|
|
|
858
2910
|
}
|
|
859
2911
|
return -1;
|
|
860
2912
|
}
|
|
2913
|
+
/**
|
|
2914
|
+
* The collection an `[T]()` / `[K: V]()` callee constructs, or null when the
|
|
2915
|
+
* literal holds anything but type names. Read positionally: the literal's
|
|
2916
|
+
* `element` / `key` / `value` fields are not relied on.
|
|
2917
|
+
*/
|
|
2918
|
+
function swiftCollectionConstructionFact(callee) {
|
|
2919
|
+
const names = callee.namedChildren;
|
|
2920
|
+
if (!names.every((n) => n.type === "simple_identifier" && SWIFT_TYPE_NAME_TEXT.test(n.text)))
|
|
2921
|
+
return null;
|
|
2922
|
+
if (callee.type === "array_literal" && names.length === 1) {
|
|
2923
|
+
return { nominal: "Array", element: names[0].text };
|
|
2924
|
+
}
|
|
2925
|
+
if (callee.type === "dictionary_literal" && names.length === 2) {
|
|
2926
|
+
return { nominal: "Dictionary", element: null, entry: [names[0].text, names[1].text] };
|
|
2927
|
+
}
|
|
2928
|
+
return null;
|
|
2929
|
+
}
|
|
2930
|
+
/** A spelled type name: UpperCamelCase, leading underscores allowed. */
|
|
2931
|
+
const SWIFT_TYPE_NAME_TEXT = /^_*[A-Z]/;
|
|
2932
|
+
/** `[T]` properties that read one element. */
|
|
2933
|
+
const SWIFT_ELEMENT_PROPERTIES = new Set(["first", "last"]);
|
|
2934
|
+
/** `[T]` methods that return one element (optional or not). */
|
|
2935
|
+
const SWIFT_ELEMENT_METHODS = new Set([
|
|
2936
|
+
"removeFirst",
|
|
2937
|
+
"removeLast",
|
|
2938
|
+
"popLast",
|
|
2939
|
+
"randomElement",
|
|
2940
|
+
"first",
|
|
2941
|
+
"last",
|
|
2942
|
+
"min",
|
|
2943
|
+
"max",
|
|
2944
|
+
]);
|
|
2945
|
+
/**
|
|
2946
|
+
* The element an accessor reads off an `[T]` value — `xs.first`,
|
|
2947
|
+
* `xs.removeFirst()` — or null. Keyed on the `element` slot, which only an
|
|
2948
|
+
* array type produces, so a project type's own `first` is never read this way.
|
|
2949
|
+
*/
|
|
2950
|
+
function swiftElementAccess(target, member, accessors, scope, depth) {
|
|
2951
|
+
if (!target || !accessors.has(member))
|
|
2952
|
+
return null;
|
|
2953
|
+
const { element } = swiftExpressionFact(target, scope, depth + 1);
|
|
2954
|
+
return element ? { nominal: element, element: null } : null;
|
|
2955
|
+
}
|
|
2956
|
+
/**
|
|
2957
|
+
* 1-based last line of the closure a declaration sits in, when its nearest
|
|
2958
|
+
* scope is a closure rather than a function: a `let` inside `{ … }` is gone at
|
|
2959
|
+
* the brace, and without the bound a sibling closure's same-named local would
|
|
2960
|
+
* type this one's reads. `undefined` outside any closure.
|
|
2961
|
+
*/
|
|
2962
|
+
function enclosingSwiftClosureEndLine(node) {
|
|
2963
|
+
for (let current = node.parent; current; current = current.parent) {
|
|
2964
|
+
if (current.type === "lambda_literal")
|
|
2965
|
+
return current.endPosition.row + 1;
|
|
2966
|
+
if (SWIFT_FUNCTION_LIKE_NODES.has(current.type))
|
|
2967
|
+
return undefined;
|
|
2968
|
+
}
|
|
2969
|
+
return undefined;
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* The element `self` iterates as inside an extension of an ARRAY type:
|
|
2973
|
+
* `extension [ServerTrustEvaluating]` or `extension Array where Element ==
|
|
2974
|
+
* ServerTrustEvaluating` — so `for evaluator in self` types `evaluator` (bd
|
|
2975
|
+
* tea-rags-mcp-y99pg). Any other enclosing type answers null. The `where`
|
|
2976
|
+
* clause is read positionally: the constrained name first, the type last.
|
|
2977
|
+
*/
|
|
2978
|
+
function enclosingSwiftSelfElement(node) {
|
|
2979
|
+
let declaration = node.parent;
|
|
2980
|
+
while (declaration && declaration.type !== "class_declaration" && declaration.type !== "protocol_declaration") {
|
|
2981
|
+
declaration = declaration.parent;
|
|
2982
|
+
}
|
|
2983
|
+
if (declaration?.type !== "class_declaration" || swiftTypeDeclarationKind(declaration) !== "extension")
|
|
2984
|
+
return null;
|
|
2985
|
+
const name = declaration.childForFieldName("name");
|
|
2986
|
+
if (name?.type === "array_type")
|
|
2987
|
+
return swiftTypeFactOf(name).element;
|
|
2988
|
+
if (name?.type !== "user_type" || name.text.trim() !== "Array")
|
|
2989
|
+
return null;
|
|
2990
|
+
for (const clause of declaration.children) {
|
|
2991
|
+
if (clause.type !== "type_constraints")
|
|
2992
|
+
continue;
|
|
2993
|
+
for (const constraint of clause.namedChildren) {
|
|
2994
|
+
const equality = constraint.namedChildren.find((c) => c.type === "equality_constraint");
|
|
2995
|
+
if (equality?.namedChildren[0]?.text !== "Element")
|
|
2996
|
+
continue;
|
|
2997
|
+
return swiftTypeFactOf(equality.namedChildren[equality.namedChildCount - 1]).nominal;
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
return null;
|
|
3001
|
+
}
|
|
861
3002
|
/** Short name of the nearest enclosing nominal type, as `classFieldTypes` keys it. */
|
|
862
3003
|
function enclosingSwiftTypeName(node) {
|
|
863
3004
|
for (let current = node.parent; current; current = current.parent) {
|
|
@@ -909,7 +3050,7 @@ function swiftThenBlockEndLine(node) {
|
|
|
909
3050
|
function assignBindingsToInnermostChunks(bindings, chunks) {
|
|
910
3051
|
const out = new Map();
|
|
911
3052
|
for (const binding of bindings) {
|
|
912
|
-
if (!binding.fact.nominal)
|
|
3053
|
+
if (!binding.fact.nominal && binding.valueChain === undefined)
|
|
913
3054
|
continue;
|
|
914
3055
|
let bestIdx = -1;
|
|
915
3056
|
let bestSpan = Number.POSITIVE_INFINITY;
|
|
@@ -930,13 +3071,41 @@ function assignBindingsToInnermostChunks(bindings, chunks) {
|
|
|
930
3071
|
continue;
|
|
931
3072
|
let bucket = out.get(bestIdx);
|
|
932
3073
|
if (!bucket) {
|
|
933
|
-
bucket = {};
|
|
3074
|
+
bucket = { localBindings: createIdentifierRecord(), callResultBindings: createIdentifierRecord() };
|
|
934
3075
|
out.set(bestIdx, bucket);
|
|
935
3076
|
}
|
|
936
|
-
const
|
|
937
|
-
if (binding.
|
|
938
|
-
emitted
|
|
939
|
-
|
|
3077
|
+
const scoped = binding.scopeEndLine === undefined ? {} : { scopeEndLine: binding.scopeEndLine };
|
|
3078
|
+
if (binding.fact.nominal) {
|
|
3079
|
+
const emitted = {
|
|
3080
|
+
line: binding.line,
|
|
3081
|
+
type: binding.fact.nominal,
|
|
3082
|
+
...scoped,
|
|
3083
|
+
// `T?` keeps `type: T` for every reader that wants the wrapped type,
|
|
3084
|
+
// and says what the value IS beside it (bd tea-rags-mcp-y99pg.33).
|
|
3085
|
+
...(binding.optional === true
|
|
3086
|
+
? {
|
|
3087
|
+
typeRef: {
|
|
3088
|
+
form: "instance",
|
|
3089
|
+
name: "Optional",
|
|
3090
|
+
args: [{ form: "instance", name: binding.fact.nominal }],
|
|
3091
|
+
},
|
|
3092
|
+
}
|
|
3093
|
+
: {}),
|
|
3094
|
+
};
|
|
3095
|
+
(bucket.localBindings[binding.name] ??= []).push(emitted);
|
|
3096
|
+
}
|
|
3097
|
+
else if (binding.valueChain !== undefined) {
|
|
3098
|
+
const emitted = {
|
|
3099
|
+
line: binding.line,
|
|
3100
|
+
callee: binding.valueChain,
|
|
3101
|
+
...(binding.closureParameter === undefined ? {} : { closureParameter: binding.closureParameter }),
|
|
3102
|
+
...(binding.enumPayload === undefined ? {} : { enumPayload: binding.enumPayload }),
|
|
3103
|
+
...(binding.sequenceElement === undefined ? {} : { sequenceElement: binding.sequenceElement }),
|
|
3104
|
+
...(binding.optional === true ? { optional: true } : {}),
|
|
3105
|
+
...scoped,
|
|
3106
|
+
};
|
|
3107
|
+
(bucket.callResultBindings[binding.name] ??= []).push(emitted);
|
|
3108
|
+
}
|
|
940
3109
|
}
|
|
941
3110
|
return out;
|
|
942
3111
|
}
|