homegraph 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/LICENSE +21 -21
- package/README.md +312 -305
- package/dist/arkui/index.d.ts +4 -0
- package/dist/arkui/index.d.ts.map +1 -0
- package/dist/arkui/index.js +23 -0
- package/dist/arkui/index.js.map +1 -0
- package/dist/arkui/migrate-passage.d.ts +28 -0
- package/dist/arkui/migrate-passage.d.ts.map +1 -0
- package/dist/arkui/migrate-passage.js +310 -0
- package/dist/arkui/migrate-passage.js.map +1 -0
- package/dist/arkui/migrate-semantics.d.ts +47 -0
- package/dist/arkui/migrate-semantics.d.ts.map +1 -0
- package/dist/arkui/migrate-semantics.js +229 -0
- package/dist/arkui/migrate-semantics.js.map +1 -0
- package/dist/arkui/migrate-snapshot.d.ts +79 -0
- package/dist/arkui/migrate-snapshot.d.ts.map +1 -0
- package/dist/arkui/migrate-snapshot.js +340 -0
- package/dist/arkui/migrate-snapshot.js.map +1 -0
- package/dist/bin/fatal-handler.js +2 -2
- package/dist/bin/homegraph.js +111 -162
- package/dist/bin/homegraph.js.map +1 -1
- package/dist/bin/node-version-check.d.ts +6 -15
- package/dist/bin/node-version-check.d.ts.map +1 -1
- package/dist/bin/node-version-check.js +8 -37
- package/dist/bin/node-version-check.js.map +1 -1
- package/dist/db/index.d.ts +36 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +124 -38
- package/dist/db/index.js.map +1 -1
- package/dist/db/migrations.d.ts +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +52 -38
- package/dist/db/migrations.js.map +1 -1
- package/dist/db/queries.d.ts +42 -0
- package/dist/db/queries.d.ts.map +1 -1
- package/dist/db/queries.js +330 -163
- package/dist/db/queries.js.map +1 -1
- package/dist/db/schema.sql +208 -203
- package/dist/db/sqlite-adapter.d.ts +8 -3
- package/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/dist/db/sqlite-adapter.js +45 -3
- package/dist/db/sqlite-adapter.js.map +1 -1
- package/dist/directory.js +5 -5
- package/dist/extraction/extraction-version.d.ts +1 -1
- package/dist/extraction/extraction-version.js +1 -1
- package/dist/extraction/generated-detection.d.ts +42 -11
- package/dist/extraction/generated-detection.d.ts.map +1 -1
- package/dist/extraction/generated-detection.js +141 -20
- package/dist/extraction/generated-detection.js.map +1 -1
- package/dist/extraction/index.d.ts +43 -1
- package/dist/extraction/index.d.ts.map +1 -1
- package/dist/extraction/index.js +150 -43
- package/dist/extraction/index.js.map +1 -1
- package/dist/extraction/languages/arkts.d.ts +70 -6
- package/dist/extraction/languages/arkts.d.ts.map +1 -1
- package/dist/extraction/languages/arkts.js +958 -108
- package/dist/extraction/languages/arkts.js.map +1 -1
- package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/dist/extraction/wasm-runtime-flags.js +9 -6
- package/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/dist/graph-sources.d.ts +41 -0
- package/dist/graph-sources.d.ts.map +1 -0
- package/dist/graph-sources.js +82 -0
- package/dist/graph-sources.js.map +1 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -9
- package/dist/index.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +0 -48
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/instructions-template.js +9 -9
- package/dist/installer/targets/antigravity.js +1 -1
- package/dist/installer/targets/antigravity.js.map +1 -1
- package/dist/installer/targets/deveco.js +1 -1
- package/dist/installer/targets/deveco.js.map +1 -1
- package/dist/installer/targets/hermes.d.ts +1 -1
- package/dist/installer/targets/hermes.js +2 -2
- package/dist/installer/targets/hermes.js.map +1 -1
- package/dist/installer/targets/opencode.js +1 -1
- package/dist/installer/targets/opencode.js.map +1 -1
- package/dist/installer/targets/shared.js +1 -1
- package/dist/installer/targets/shared.js.map +1 -1
- package/dist/mcp/daemon-paths.d.ts +5 -4
- package/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/dist/mcp/daemon-paths.js +28 -13
- package/dist/mcp/daemon-paths.js.map +1 -1
- package/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/dist/mcp/daemon-registry.js +4 -1
- package/dist/mcp/daemon-registry.js.map +1 -1
- package/dist/mcp/daemon.d.ts +1 -1
- package/dist/mcp/daemon.js +1 -1
- package/dist/mcp/diff-impact.d.ts +131 -0
- package/dist/mcp/diff-impact.d.ts.map +1 -0
- package/dist/mcp/diff-impact.js +385 -0
- package/dist/mcp/diff-impact.js.map +1 -0
- package/dist/mcp/engine.d.ts.map +1 -1
- package/dist/mcp/engine.js +12 -3
- package/dist/mcp/engine.js.map +1 -1
- package/dist/mcp/explore-dedup.d.ts +137 -0
- package/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/dist/mcp/explore-dedup.js +236 -0
- package/dist/mcp/explore-dedup.js.map +1 -0
- package/dist/mcp/explore-session-state.d.ts +217 -0
- package/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/dist/mcp/explore-session-state.js +322 -0
- package/dist/mcp/explore-session-state.js.map +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +4 -7
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/liveness-watchdog.js +51 -51
- package/dist/mcp/proxy.d.ts.map +1 -1
- package/dist/mcp/proxy.js +5 -14
- package/dist/mcp/proxy.js.map +1 -1
- package/dist/mcp/query-worker.d.ts +1 -1
- package/dist/mcp/query-worker.js +1 -1
- package/dist/mcp/server-instructions.d.ts +7 -2
- package/dist/mcp/server-instructions.d.ts.map +1 -1
- package/dist/mcp/server-instructions.js +125 -47
- package/dist/mcp/server-instructions.js.map +1 -1
- package/dist/mcp/session.d.ts +14 -3
- package/dist/mcp/session.d.ts.map +1 -1
- package/dist/mcp/session.js +17 -14
- package/dist/mcp/session.js.map +1 -1
- package/dist/mcp/startup-handshake.d.ts +1 -1
- package/dist/mcp/startup-handshake.js +1 -1
- package/dist/mcp/tools.d.ts +138 -12
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +3279 -476
- package/dist/mcp/tools.js.map +1 -1
- package/dist/resolution/callback-synthesizer.d.ts +2 -1
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/dist/resolution/callback-synthesizer.js +153 -53
- package/dist/resolution/callback-synthesizer.js.map +1 -1
- package/dist/resolution/frameworks/arkts-entry.d.ts.map +1 -1
- package/dist/resolution/frameworks/arkts-entry.js +20 -9
- package/dist/resolution/frameworks/arkts-entry.js.map +1 -1
- package/dist/resolution/frameworks/arkts-napi.d.ts +14 -0
- package/dist/resolution/frameworks/arkts-napi.d.ts.map +1 -1
- package/dist/resolution/frameworks/arkts-napi.js +169 -49
- package/dist/resolution/frameworks/arkts-napi.js.map +1 -1
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +1 -1
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/memory-budget.d.ts +33 -0
- package/dist/resolution/memory-budget.d.ts.map +1 -1
- package/dist/resolution/memory-budget.js +58 -0
- package/dist/resolution/memory-budget.js.map +1 -1
- package/dist/resolution/resolver-pool.d.ts +2 -0
- package/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/dist/resolution/resolver-pool.js +4 -0
- package/dist/resolution/resolver-pool.js.map +1 -1
- package/dist/search/query-utils.d.ts +116 -4
- package/dist/search/query-utils.d.ts.map +1 -1
- package/dist/search/query-utils.js +869 -60
- package/dist/search/query-utils.js.map +1 -1
- package/dist/spec/db/commit-node.js +4 -4
- package/dist/spec/db/fragment-node.js +10 -10
- package/dist/spec/db/fts.js +8 -8
- package/dist/spec/db/relations.js +88 -88
- package/dist/spec/db/schema.js +6 -6
- package/dist/spec/db/schema.sql +121 -121
- package/dist/spec/db/spec-node.js +4 -4
- package/dist/spec/llm/prompts.js +53 -53
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/shimmer-progress.d.ts.map +1 -1
- package/dist/ui/shimmer-progress.js +4 -1
- package/dist/ui/shimmer-progress.js.map +1 -1
- package/dist/upgrade/index.d.ts +14 -26
- package/dist/upgrade/index.d.ts.map +1 -1
- package/dist/upgrade/index.js +28 -123
- package/dist/upgrade/index.js.map +1 -1
- package/dist/upgrade/remove-binary.d.ts +19 -19
- package/dist/upgrade/remove-binary.d.ts.map +1 -1
- package/dist/upgrade/remove-binary.js +20 -21
- package/dist/upgrade/remove-binary.js.map +1 -1
- package/dist/upgrade/update-check.d.ts +4 -3
- package/dist/upgrade/update-check.d.ts.map +1 -1
- package/dist/upgrade/update-check.js +4 -3
- package/dist/upgrade/update-check.js.map +1 -1
- package/package.json +65 -62
- package/dist/extraction/languages/arkts-viewtree.d.ts +0 -22
- package/dist/extraction/languages/arkts-viewtree.d.ts.map +0 -1
- package/dist/extraction/languages/arkts-viewtree.js +0 -133
- package/dist/extraction/languages/arkts-viewtree.js.map +0 -1
- package/dist/reasoning/config.d.ts +0 -45
- package/dist/reasoning/config.d.ts.map +0 -1
- package/dist/reasoning/config.js +0 -171
- package/dist/reasoning/config.js.map +0 -1
- package/dist/reasoning/credentials.d.ts +0 -5
- package/dist/reasoning/credentials.d.ts.map +0 -1
- package/dist/reasoning/credentials.js +0 -83
- package/dist/reasoning/credentials.js.map +0 -1
- package/dist/reasoning/login.d.ts +0 -21
- package/dist/reasoning/login.d.ts.map +0 -1
- package/dist/reasoning/login.js +0 -85
- package/dist/reasoning/login.js.map +0 -1
- package/dist/reasoning/reasoner.d.ts +0 -43
- package/dist/reasoning/reasoner.d.ts.map +0 -1
- package/dist/reasoning/reasoner.js +0 -308
- package/dist/reasoning/reasoner.js.map +0 -1
- package/dist/spec/evolve/llm-client.d.ts +0 -50
- package/dist/spec/evolve/llm-client.d.ts.map +0 -1
- package/dist/spec/evolve/llm-client.js +0 -176
- package/dist/spec/evolve/llm-client.js.map +0 -1
- package/dist/spec/evolve/logic-checker.d.ts +0 -12
- package/dist/spec/evolve/logic-checker.d.ts.map +0 -1
- package/dist/spec/evolve/logic-checker.js +0 -24
- package/dist/spec/evolve/logic-checker.js.map +0 -1
- package/dist/spec/llm/index.d.ts +0 -3
- package/dist/spec/llm/index.d.ts.map +0 -1
- package/dist/spec/llm/index.js +0 -11
- package/dist/spec/llm/index.js.map +0 -1
- package/dist/spec/mining/diff-parser.d.ts +0 -33
- package/dist/spec/mining/diff-parser.d.ts.map +0 -1
- package/dist/spec/mining/diff-parser.js +0 -166
- package/dist/spec/mining/diff-parser.js.map +0 -1
- package/dist/spec/mining/git-scanner.d.ts +0 -103
- package/dist/spec/mining/git-scanner.d.ts.map +0 -1
- package/dist/spec/mining/git-scanner.js +0 -307
- package/dist/spec/mining/git-scanner.js.map +0 -1
- package/dist/spec/mining/pipeline.d.ts +0 -53
- package/dist/spec/mining/pipeline.d.ts.map +0 -1
- package/dist/spec/mining/pipeline.js +0 -178
- package/dist/spec/mining/pipeline.js.map +0 -1
- package/dist/spec/mining/scope-resolver.d.ts +0 -45
- package/dist/spec/mining/scope-resolver.d.ts.map +0 -1
- package/dist/spec/mining/scope-resolver.js +0 -103
- package/dist/spec/mining/scope-resolver.js.map +0 -1
- package/dist/spec/mining/spec-extractor.d.ts +0 -69
- package/dist/spec/mining/spec-extractor.d.ts.map +0 -1
- package/dist/spec/mining/spec-extractor.js +0 -369
- package/dist/spec/mining/spec-extractor.js.map +0 -1
- package/dist/spec/utils.d.ts +0 -167
- package/dist/spec/utils.d.ts.map +0 -1
- package/dist/spec/utils.js +0 -463
- package/dist/spec/utils.js.map +0 -1
- package/dist/telemetry/index.d.ts +0 -143
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js +0 -541
- package/dist/telemetry/index.js.map +0 -1
- package/scripts/_tmp-cfwk-resolve.log +0 -0
- package/scripts/_tmp-cfwk-sig.log +0 -0
- package/scripts/_tmp-cfwk-vt.log +0 -0
- package/scripts/add-lang/bench.sh +0 -60
- package/scripts/add-lang/check-grammar.mjs +0 -75
- package/scripts/add-lang/dump-ast.mjs +0 -103
- package/scripts/add-lang/verify-extraction.mjs +0 -70
- package/scripts/agent-eval/ab-adoption.sh +0 -91
- package/scripts/agent-eval/ab-hook.sh +0 -86
- package/scripts/agent-eval/ab-impl.sh +0 -78
- package/scripts/agent-eval/ab-new-vs-baseline.sh +0 -102
- package/scripts/agent-eval/ab-sufficiency.sh +0 -78
- package/scripts/agent-eval/arms-F.sh +0 -21
- package/scripts/agent-eval/arms-matrix.sh +0 -37
- package/scripts/agent-eval/audit.sh +0 -68
- package/scripts/agent-eval/bench-readme.sh +0 -28
- package/scripts/agent-eval/bench-why-repo.sh +0 -22
- package/scripts/agent-eval/block-read-hook.sh +0 -19
- package/scripts/agent-eval/hook-settings.json +0 -15
- package/scripts/agent-eval/itrun.sh +0 -120
- package/scripts/agent-eval/offload-eval-3arm.sh +0 -72
- package/scripts/agent-eval/offload-eval-cost.mjs +0 -133
- package/scripts/agent-eval/offload-eval-effort.mjs +0 -108
- package/scripts/agent-eval/offload-eval-frontload-matrix.sh +0 -25
- package/scripts/agent-eval/offload-eval-frontload.sh +0 -47
- package/scripts/agent-eval/offload-eval-ground-truth.json +0 -18
- package/scripts/agent-eval/offload-eval-hook.mjs +0 -84
- package/scripts/agent-eval/offload-eval-judge.mjs +0 -103
- package/scripts/agent-eval/offload-eval-matrix.sh +0 -20
- package/scripts/agent-eval/offload-eval-metrics.mjs +0 -94
- package/scripts/agent-eval/offload-eval-refs1.sh +0 -50
- package/scripts/agent-eval/offload-eval-setup.sh +0 -24
- package/scripts/agent-eval/offload-eval-styles.sh +0 -72
- package/scripts/agent-eval/offload-eval-summarize.mjs +0 -68
- package/scripts/agent-eval/offload-eval.md +0 -76
- package/scripts/agent-eval/parse-arms.mjs +0 -116
- package/scripts/agent-eval/parse-bench-readme.mjs +0 -84
- package/scripts/agent-eval/parse-run.mjs +0 -45
- package/scripts/agent-eval/parse-session.mjs +0 -93
- package/scripts/agent-eval/probe-context.mjs +0 -21
- package/scripts/agent-eval/probe-explore.mjs +0 -40
- package/scripts/agent-eval/probe-node.mjs +0 -20
- package/scripts/agent-eval/probe-sweep.mjs +0 -119
- package/scripts/agent-eval/probe-trace.mjs +0 -20
- package/scripts/agent-eval/redirect-read-hook.sh +0 -38
- package/scripts/agent-eval/repro-concurrent-explore.mjs +0 -119
- package/scripts/agent-eval/repro-daemon-clients.mjs +0 -125
- package/scripts/agent-eval/run-agent.sh +0 -34
- package/scripts/agent-eval/run-all.sh +0 -75
- package/scripts/agent-eval/run-arms.sh +0 -56
- package/scripts/agent-eval/seq-matrix.mjs +0 -137
- package/scripts/bench-arkts-init-rss.log +0 -0
- package/scripts/build-bundle.sh +0 -123
- package/scripts/exp_boundary_eval/README.md +0 -247
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/_utils.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/analyze.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/deveco_arm.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_all.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_one.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/run_session.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-310.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/setup.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/__pycache__/win_mcp_launcher.cpython-38.pyc +0 -0
- package/scripts/exp_boundary_eval/_test_mcp_chain.py +0 -78
- package/scripts/exp_boundary_eval/_test_stdin.py +0 -8
- package/scripts/exp_boundary_eval/_utils.py +0 -1116
- package/scripts/exp_boundary_eval/analyze.py +0 -1313
- package/scripts/exp_boundary_eval/deveco_arm.py +0 -519
- package/scripts/exp_boundary_eval/run_all.py +0 -378
- package/scripts/exp_boundary_eval/run_one.py +0 -165
- package/scripts/exp_boundary_eval/run_session.py +0 -158
- package/scripts/exp_boundary_eval/setup.py +0 -120
- package/scripts/exp_boundary_eval/win_mcp_launcher.py +0 -73
- package/scripts/exp_boundary_eval/win_mcp_stdio_wrap.js +0 -36
- package/scripts/exp_boundary_eval/win_node_launcher.py +0 -24
- package/scripts/extract-release-notes.mjs +0 -130
- package/scripts/local-install.sh +0 -41
- package/scripts/npm-sdk.js +0 -75
- package/scripts/npm-shim.js +0 -275
- package/scripts/ohos-sdk-publish.mjs +0 -133
- package/scripts/pack-npm.sh +0 -119
- package/scripts/prepare-release.mjs +0 -270
- package/scripts/probe-arkts-mem-why-run.log +0 -0
- package/scripts/probe-banner-livecard-ir.log +0 -0
- package/scripts/probe-cfwk-ast.stderr.log +0 -0
- package/scripts/probe-cfwk-ast.stdout.log +0 -0
- package/scripts/probe-cfwk-attr-shape.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stderr.log +0 -0
- package/scripts/probe-cfwk-cfgdump.stdout.log +0 -0
- package/scripts/probe-cfwk-cvc.stderr.log +0 -0
- package/scripts/probe-cfwk-cvc.stdout.log +0 -0
- package/scripts/probe-cfwk-diag2.log +0 -0
- package/scripts/probe-cfwk-diag3.log +0 -0
- package/scripts/probe-cfwk-fedbg.stderr.log +0 -0
- package/scripts/probe-cfwk-fedbg.stdout.log +0 -0
- package/scripts/probe-cfwk-fileresult.log +0 -0
- package/scripts/probe-cfwk-fix.stderr.log +0 -0
- package/scripts/probe-cfwk-fix.stdout.log +0 -0
- package/scripts/probe-cfwk-fix2.stderr.log +0 -0
- package/scripts/probe-cfwk-fix2.stdout.log +0 -0
- package/scripts/probe-cfwk-fix3.stderr.log +0 -0
- package/scripts/probe-cfwk-fix3.stdout.log +0 -0
- package/scripts/probe-cfwk-foreach.log +0 -0
- package/scripts/probe-cfwk-getmethod-throw.log +0 -0
- package/scripts/probe-cfwk-hg-extract.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-pr1003.stderr.log +0 -0
- package/scripts/probe-cfwk-pr1003.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-noprior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-prior.stdout.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stderr.log +0 -0
- package/scripts/probe-cfwk-preroot-skipstate.stdout.log +0 -0
- package/scripts/probe-cfwk-resolve-sim.log +0 -0
- package/scripts/probe-cfwk-tree-shape.log +0 -0
- package/scripts/probe-cfwk-walk-abort.log +0 -0
- package/scripts/probe-cfwk.log +0 -0
- package/scripts/probe-force-index.log +0 -0
- package/scripts/probe-no-force-index.log +0 -0
- package/scripts/probe-samefile-ir.stderr.log +0 -0
- package/scripts/probe-samefile-ir.stdout.log +0 -224
- package/scripts/probe-sdk-vs-project.log +0 -0
- package/scripts/probe-viewtree-downgrade.log +0 -0
package/dist/extraction/index.js
CHANGED
|
@@ -65,6 +65,7 @@ const errors_1 = require("../errors");
|
|
|
65
65
|
const utils_1 = require("../utils");
|
|
66
66
|
const ignore_1 = __importDefault(require("ignore"));
|
|
67
67
|
const default_ignore_1 = require("./default-ignore");
|
|
68
|
+
const generated_detection_1 = require("./generated-detection");
|
|
68
69
|
var default_ignore_2 = require("./default-ignore");
|
|
69
70
|
Object.defineProperty(exports, "buildDefaultIgnore", { enumerable: true, get: function () { return default_ignore_2.buildDefaultIgnore; } });
|
|
70
71
|
const frameworks_1 = require("../resolution/frameworks");
|
|
@@ -1314,57 +1315,25 @@ class ExtractionOrchestrator {
|
|
|
1314
1315
|
durationMs: Date.now() - startTime,
|
|
1315
1316
|
};
|
|
1316
1317
|
}
|
|
1317
|
-
//
|
|
1318
|
+
// Do NOT emit `parsing` before the ArkTS Scene batch — that makes the
|
|
1319
|
+
// shimmer print "Parsing code - done" when Scene starts, which looks like
|
|
1320
|
+
// a restart. Parsing progress starts after primeArkTSBatch below.
|
|
1318
1321
|
const total = files.length;
|
|
1319
1322
|
let processed = 0;
|
|
1320
|
-
//
|
|
1321
|
-
//
|
|
1322
|
-
// the main thread starts synchronous grammar detection work.
|
|
1323
|
-
onProgress?.({
|
|
1324
|
-
phase: 'parsing',
|
|
1325
|
-
current: 0,
|
|
1326
|
-
total,
|
|
1327
|
-
});
|
|
1328
|
-
await new Promise(resolve => setImmediate(resolve));
|
|
1329
|
-
// Detect needed languages and load grammars in the parse worker
|
|
1323
|
+
// Detect needed languages. Parse workers start AFTER the ArkTS Scene batch
|
|
1324
|
+
// so peak RSS is not Scene IR + N×WASM grammars at once.
|
|
1330
1325
|
const neededLanguages = [...new Set(files.map((f) => (0, grammars_1.detectLanguage)(f, undefined, overrides)))];
|
|
1331
1326
|
// .h files default to 'c' but may be C++ — ensure cpp grammar is loaded when c is needed
|
|
1332
1327
|
if (neededLanguages.includes('c') && !neededLanguages.includes('cpp')) {
|
|
1333
1328
|
neededLanguages.push('cpp');
|
|
1334
1329
|
}
|
|
1335
|
-
// Parse files on a pool of worker threads (keeps the main thread free for UI
|
|
1336
|
-
// and uses every core). Falls back to in-process parsing when the compiled
|
|
1337
|
-
// worker is unavailable (e.g. running from source in tests).
|
|
1338
1330
|
const parseWorkerPath = path.join(__dirname, 'parse-worker.js');
|
|
1339
1331
|
const useWorker = fs.existsSync(parseWorkerPath);
|
|
1332
|
+
// Assigned after ArkTS batch (see below).
|
|
1340
1333
|
let pool = null;
|
|
1341
|
-
if (useWorker) {
|
|
1342
|
-
// CODEGRAPH_PARSE_WORKERS: explicit worker count; 1 = the old single-worker
|
|
1343
|
-
// behaviour (the conservative rollback). Unset → clamp(cores-1, 1, 8).
|
|
1344
|
-
const poolSize = (0, parse_pool_1.resolveParsePoolSize)(process.env.CODEGRAPH_PARSE_WORKERS, os.cpus().length);
|
|
1345
|
-
pool = new parse_pool_1.ParseWorkerPool({
|
|
1346
|
-
languages: neededLanguages,
|
|
1347
|
-
size: poolSize,
|
|
1348
|
-
workerScriptPath: parseWorkerPath,
|
|
1349
|
-
recycleInterval: WORKER_RECYCLE_INTERVAL,
|
|
1350
|
-
parseTimeoutMs: PARSE_TIMEOUT_MS,
|
|
1351
|
-
log,
|
|
1352
|
-
});
|
|
1353
|
-
log(`Parse worker pool: ${poolSize} worker(s)`);
|
|
1354
|
-
}
|
|
1355
|
-
else {
|
|
1356
|
-
// In-process fallback: load grammars locally and parse on the main thread.
|
|
1357
|
-
await (0, grammars_1.loadGrammarsForLanguages)(neededLanguages);
|
|
1358
|
-
}
|
|
1359
|
-
const storeWorkerPath = path.join(__dirname, 'store-worker.js');
|
|
1360
1334
|
let storeWriter = null;
|
|
1361
|
-
if (storeWriterOpts &&
|
|
1362
|
-
process.env.HOMEGRAPH_NO_STORE_WORKER !== '1' &&
|
|
1363
|
-
fs.existsSync(storeWorkerPath)) {
|
|
1364
|
-
storeWriter = new store_writer_1.StoreWriter(storeWorkerPath, storeWriterOpts.dbPath, storeWriterOpts.fastInit);
|
|
1365
|
-
log('Store writer thread active');
|
|
1366
|
-
}
|
|
1367
1335
|
const STORE_WRITER_WINDOW = 64;
|
|
1336
|
+
let windowSize = 1;
|
|
1368
1337
|
/**
|
|
1369
1338
|
* Parse one file: on the pool when available (the promise REJECTS on a worker
|
|
1370
1339
|
* crash/timeout — the caller records it and the retry pass re-attempts), or
|
|
@@ -1387,8 +1356,7 @@ class ExtractionOrchestrator {
|
|
|
1387
1356
|
// stable commit order keeps the resulting graph deterministic — byte-identical
|
|
1388
1357
|
// to the single-worker path — instead of drifting with parse timing. The
|
|
1389
1358
|
// `completed` buffer holds at most ~windowSize out-of-order results, so memory
|
|
1390
|
-
// stays bounded.
|
|
1391
|
-
const windowSize = pool ? Math.max(4, pool.size * 2) : 1;
|
|
1359
|
+
// stays bounded. windowSize is set when the parse pool starts (after ArkTS).
|
|
1392
1360
|
const inFlight = new Set();
|
|
1393
1361
|
const completed = new Map();
|
|
1394
1362
|
let nextSeq = 0; // file-order sequence assigned at dispatch
|
|
@@ -1507,6 +1475,46 @@ class ExtractionOrchestrator {
|
|
|
1507
1475
|
await (0, arkts_1.primeArkTSBatch)(this.rootDir, this.queries, firstEtsFile);
|
|
1508
1476
|
errors.push(...(0, arkts_1.drainArkTSIndexNotices)());
|
|
1509
1477
|
}
|
|
1478
|
+
// Start parse pool only after Scene teardown — most .ets are already in DB.
|
|
1479
|
+
const remainingToParse = files.filter((f) => !((0, arkts_1.isArkTSBatchPersisted)(f) || ((0, arkts_1.isArkTSBatchCommitted)() && (0, arkts_1.isArkAnalyzerSourcePath)(f)))).length;
|
|
1480
|
+
if (useWorker) {
|
|
1481
|
+
// CODEGRAPH_PARSE_WORKERS: explicit worker count; 1 = the old single-worker
|
|
1482
|
+
// behaviour (the conservative rollback). Unset → clamp(cores-1, 1, 8).
|
|
1483
|
+
let poolSize = (0, parse_pool_1.resolveParsePoolSize)(process.env.CODEGRAPH_PARSE_WORKERS, os.cpus().length);
|
|
1484
|
+
if (!process.env.CODEGRAPH_PARSE_WORKERS?.trim() && remainingToParse < 500) {
|
|
1485
|
+
poolSize = Math.min(poolSize, 2);
|
|
1486
|
+
}
|
|
1487
|
+
else if (!process.env.CODEGRAPH_PARSE_WORKERS?.trim() && remainingToParse < 2000) {
|
|
1488
|
+
poolSize = Math.min(poolSize, 4);
|
|
1489
|
+
}
|
|
1490
|
+
pool = new parse_pool_1.ParseWorkerPool({
|
|
1491
|
+
languages: neededLanguages,
|
|
1492
|
+
size: poolSize,
|
|
1493
|
+
workerScriptPath: parseWorkerPath,
|
|
1494
|
+
recycleInterval: WORKER_RECYCLE_INTERVAL,
|
|
1495
|
+
parseTimeoutMs: PARSE_TIMEOUT_MS,
|
|
1496
|
+
log,
|
|
1497
|
+
});
|
|
1498
|
+
windowSize = Math.max(4, pool.size * 2);
|
|
1499
|
+
log(`Parse worker pool: ${poolSize} worker(s) (remaining files≈${remainingToParse})`);
|
|
1500
|
+
}
|
|
1501
|
+
else {
|
|
1502
|
+
await (0, grammars_1.loadGrammarsForLanguages)(neededLanguages);
|
|
1503
|
+
}
|
|
1504
|
+
const storeWorkerPath = path.join(__dirname, 'store-worker.js');
|
|
1505
|
+
if (storeWriterOpts &&
|
|
1506
|
+
process.env.HOMEGRAPH_NO_STORE_WORKER !== '1' &&
|
|
1507
|
+
fs.existsSync(storeWorkerPath)) {
|
|
1508
|
+
storeWriter = new store_writer_1.StoreWriter(storeWorkerPath, storeWriterOpts.dbPath, storeWriterOpts.fastInit);
|
|
1509
|
+
log('Store writer thread active');
|
|
1510
|
+
}
|
|
1511
|
+
// Parsing progress only after ArkTS batch (avoids false "Parsing - done").
|
|
1512
|
+
onProgress?.({
|
|
1513
|
+
phase: 'parsing',
|
|
1514
|
+
current: 0,
|
|
1515
|
+
total,
|
|
1516
|
+
});
|
|
1517
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
1510
1518
|
for (let i = 0; i < files.length; i += FILE_IO_BATCH_SIZE) {
|
|
1511
1519
|
if (signal?.aborted) {
|
|
1512
1520
|
aborted = true;
|
|
@@ -1515,7 +1523,8 @@ class ExtractionOrchestrator {
|
|
|
1515
1523
|
const batch = files.slice(i, i + FILE_IO_BATCH_SIZE);
|
|
1516
1524
|
// Read files in parallel (with path validation before any I/O)
|
|
1517
1525
|
const fileContents = await Promise.all(batch.map(async (fp) => {
|
|
1518
|
-
if ((0, arkts_1.isArkTSBatchPersisted)(fp)
|
|
1526
|
+
if ((0, arkts_1.isArkTSBatchPersisted)(fp) ||
|
|
1527
|
+
((0, arkts_1.isArkTSBatchCommitted)() && (0, arkts_1.isArkAnalyzerSourcePath)(fp))) {
|
|
1519
1528
|
return {
|
|
1520
1529
|
filePath: fp,
|
|
1521
1530
|
content: null,
|
|
@@ -1550,7 +1559,9 @@ class ExtractionOrchestrator {
|
|
|
1550
1559
|
aborted = true;
|
|
1551
1560
|
break;
|
|
1552
1561
|
}
|
|
1553
|
-
if ((0, arkts_1.isArkTSBatchPersisted)(filePath) ||
|
|
1562
|
+
if ((0, arkts_1.isArkTSBatchPersisted)(filePath) ||
|
|
1563
|
+
arktsBatchSkipped ||
|
|
1564
|
+
((0, arkts_1.isArkTSBatchCommitted)() && (0, arkts_1.isArkAnalyzerSourcePath)(filePath))) {
|
|
1554
1565
|
processed++;
|
|
1555
1566
|
filesIndexed++;
|
|
1556
1567
|
onProgress?.({ phase: 'parsing', current: processed, total, currentFile: filePath });
|
|
@@ -1748,6 +1759,7 @@ class ExtractionOrchestrator {
|
|
|
1748
1759
|
// Shut down the parse worker pool.
|
|
1749
1760
|
if (pool)
|
|
1750
1761
|
await pool.destroy();
|
|
1762
|
+
(0, arkts_1.shrinkArkTSBatchPostParse)();
|
|
1751
1763
|
return {
|
|
1752
1764
|
success: filesIndexed > 0 || errors.filter((e) => e.severity === 'error').length === 0,
|
|
1753
1765
|
filesIndexed,
|
|
@@ -1957,6 +1969,7 @@ class ExtractionOrchestrator {
|
|
|
1957
1969
|
indexedAt: Date.now(),
|
|
1958
1970
|
nodeCount: result.nodes.length,
|
|
1959
1971
|
errors: result.errors.length > 0 ? result.errors : undefined,
|
|
1972
|
+
generated: (0, generated_detection_1.detectGeneratedFile)(filePath, content),
|
|
1960
1973
|
},
|
|
1961
1974
|
});
|
|
1962
1975
|
if (crossFileIncomingEdges.length > 0) {
|
|
@@ -1990,6 +2003,7 @@ class ExtractionOrchestrator {
|
|
|
1990
2003
|
indexedAt: Date.now(),
|
|
1991
2004
|
nodeCount: result.nodes.length,
|
|
1992
2005
|
errors: result.errors.length > 0 ? result.errors : undefined,
|
|
2006
|
+
generated: (0, generated_detection_1.detectGeneratedFile)(filePath, content),
|
|
1993
2007
|
};
|
|
1994
2008
|
this.queries.upsertFile(fileRecord);
|
|
1995
2009
|
}
|
|
@@ -2003,6 +2017,7 @@ class ExtractionOrchestrator {
|
|
|
2003
2017
|
indexedAt: Date.now(),
|
|
2004
2018
|
nodeCount,
|
|
2005
2019
|
errors: resultErrors.length > 0 ? resultErrors : undefined,
|
|
2020
|
+
generated: (0, generated_detection_1.detectGeneratedFile)(filePath, content),
|
|
2006
2021
|
};
|
|
2007
2022
|
}
|
|
2008
2023
|
buildFreshStoreBundle(filePath, content, language, stats, result) {
|
|
@@ -2033,6 +2048,60 @@ class ExtractionOrchestrator {
|
|
|
2033
2048
|
this.queries.insertUnresolvedRefsBatch(resurrected);
|
|
2034
2049
|
}
|
|
2035
2050
|
}
|
|
2051
|
+
/**
|
|
2052
|
+
* Re-open resolution edges whose target name's definition set this sync
|
|
2053
|
+
* changed, when those edges live in files the sync did NOT re-extract.
|
|
2054
|
+
*
|
|
2055
|
+
* Resolution binds a reference to one of the same-named definitions
|
|
2056
|
+
* PROJECT-WIDE. Adding or removing a definition therefore changes the answer
|
|
2057
|
+
* for references in untouched files — but those references resolved once and
|
|
2058
|
+
* nothing existed to revisit them with — the index kept an answer that was
|
|
2059
|
+
* correct against an older graph.
|
|
2060
|
+
*
|
|
2061
|
+
* This deletes each affected edge and re-inserts it as the reference that
|
|
2062
|
+
* created it (the refName/refKind stamp), status='pending', for the sync's
|
|
2063
|
+
* resolution sweep to bind against the post-sync graph — the same input a
|
|
2064
|
+
* full rebuild resolves from, which is what makes the two converge.
|
|
2065
|
+
*
|
|
2066
|
+
* Deliberately conservative in three ways, because a wrong deletion is a
|
|
2067
|
+
* permanent edge loss while a missed rebind is only residual drift:
|
|
2068
|
+
* - an edge with no refName stamp (synthesized, or built by an engine older
|
|
2069
|
+
* than the stamp) is left ALONE rather than reconstructed from the target's
|
|
2070
|
+
* plain name, same rule as `resurrectRefFromDroppedEdge`;
|
|
2071
|
+
* - edges whose source is in a file this sync already re-extracted are
|
|
2072
|
+
* skipped — their references were re-resolved from scratch moments ago;
|
|
2073
|
+
* - very common names are skipped by the per-name ceiling in
|
|
2074
|
+
* `getResolutionEdgesByTargetName`.
|
|
2075
|
+
*
|
|
2076
|
+
* Returns the number of references resurrected.
|
|
2077
|
+
*/
|
|
2078
|
+
resurrectStaleResolutionEdges(definitionDelta, changedFilePaths) {
|
|
2079
|
+
if (definitionDelta.length === 0)
|
|
2080
|
+
return 0;
|
|
2081
|
+
const alreadyFresh = new Set(changedFilePaths);
|
|
2082
|
+
const candidates = this.queries.getResolutionEdgesByTargetName(definitionDelta);
|
|
2083
|
+
const edgeIds = [];
|
|
2084
|
+
const refs = [];
|
|
2085
|
+
for (const e of candidates) {
|
|
2086
|
+
if (alreadyFresh.has(e.sourceFilePath))
|
|
2087
|
+
continue;
|
|
2088
|
+
const ref = resurrectRefFromDroppedEdge(e);
|
|
2089
|
+
if (!ref)
|
|
2090
|
+
continue; // no stamp — never delete what we cannot restore
|
|
2091
|
+
edgeIds.push(e.edgeId);
|
|
2092
|
+
refs.push(ref);
|
|
2093
|
+
}
|
|
2094
|
+
if (refs.length === 0)
|
|
2095
|
+
return 0;
|
|
2096
|
+
// Delete first. The sweep re-inserts whichever edge resolution now picks,
|
|
2097
|
+
// and `insertEdges` is INSERT OR IGNORE against idx_edges_identity — so a
|
|
2098
|
+
// rebind to the same target is a clean no-op, but leaving the old row in
|
|
2099
|
+
// place for a rebind ELSEWHERE would keep both, turning drift into
|
|
2100
|
+
// duplication.
|
|
2101
|
+
this.queries.deleteEdgesByIds(edgeIds);
|
|
2102
|
+
this.queries.insertUnresolvedRefsBatch(refs);
|
|
2103
|
+
return refs.length;
|
|
2104
|
+
}
|
|
2036
2105
|
/**
|
|
2037
2106
|
* Sync the index with the current file state.
|
|
2038
2107
|
*
|
|
@@ -2050,6 +2119,10 @@ class ExtractionOrchestrator {
|
|
|
2050
2119
|
let filesRemoved = 0;
|
|
2051
2120
|
let nodesUpdated = 0;
|
|
2052
2121
|
const changedFilePaths = [];
|
|
2122
|
+
// `file\0name` definition pairs for the files this sync touches, sampled
|
|
2123
|
+
// BEFORE their nodes are replaced/deleted. Compared against the post-store
|
|
2124
|
+
// pairs below to derive `definitionDelta`.
|
|
2125
|
+
const pairsBefore = new Set();
|
|
2053
2126
|
onProgress?.({
|
|
2054
2127
|
phase: 'scanning',
|
|
2055
2128
|
current: 0,
|
|
@@ -2086,6 +2159,10 @@ class ExtractionOrchestrator {
|
|
|
2086
2159
|
if (tracked.path.startsWith('@')) {
|
|
2087
2160
|
continue;
|
|
2088
2161
|
}
|
|
2162
|
+
// Every name this file defined is about to stop existing here, which
|
|
2163
|
+
// narrows the candidate set for that name repo-wide.
|
|
2164
|
+
for (const pair of this.queries.getNodeNamePairsByFiles([tracked.path]))
|
|
2165
|
+
pairsBefore.add(pair);
|
|
2089
2166
|
const incoming = this.queries.getCrossFileIncomingEdgesWithTarget(tracked.path);
|
|
2090
2167
|
if (incoming.length > 0) {
|
|
2091
2168
|
const resurrected = incoming
|
|
@@ -2155,6 +2232,14 @@ class ExtractionOrchestrator {
|
|
|
2155
2232
|
filesModified++;
|
|
2156
2233
|
}
|
|
2157
2234
|
}
|
|
2235
|
+
// Sampled here — after the add/modify classification, before any file is
|
|
2236
|
+
// re-extracted — because `storeExtractionResult` deletes a file's nodes
|
|
2237
|
+
// before inserting the new ones, so this is the last point the pre-edit
|
|
2238
|
+
// definition set is readable.
|
|
2239
|
+
if (filesToIndex.length > 0) {
|
|
2240
|
+
for (const pair of this.queries.getNodeNamePairsByFiles(filesToIndex))
|
|
2241
|
+
pairsBefore.add(pair);
|
|
2242
|
+
}
|
|
2158
2243
|
// Load only grammars needed for changed files
|
|
2159
2244
|
if (filesToIndex.length > 0) {
|
|
2160
2245
|
const overrides = (0, project_config_1.loadExtensionOverrides)(this.rootDir);
|
|
@@ -2225,6 +2310,27 @@ class ExtractionOrchestrator {
|
|
|
2225
2310
|
(0, context_1.setArkTSBatchProgressCallback)(null);
|
|
2226
2311
|
}
|
|
2227
2312
|
}
|
|
2313
|
+
// Names whose definition set this sync changed: a `file\0name` pair present
|
|
2314
|
+
// before but not after (removed/renamed away) or after but not before
|
|
2315
|
+
// (added). A pair on both sides is untouched as far as resolution's
|
|
2316
|
+
// candidate set is concerned — only its node id moved, which
|
|
2317
|
+
// reattachCrossFileEdges already follows — so an edit that only changes
|
|
2318
|
+
// bodies yields an empty delta and no downstream rebind work.
|
|
2319
|
+
//
|
|
2320
|
+
// Compared per FILE, not as one name set over the whole batch: a commit
|
|
2321
|
+
// that adds `collect` to a new file while an unrelated changed file already
|
|
2322
|
+
// defined `collect` must still flag the name, and a bare name set cancels
|
|
2323
|
+
// exactly that case out.
|
|
2324
|
+
const pairsAfter = this.queries.getNodeNamePairsByFiles(filesToIndex);
|
|
2325
|
+
const deltaNames = new Set();
|
|
2326
|
+
const nameOf = (pair) => pair.slice(pair.indexOf('\0') + 1);
|
|
2327
|
+
for (const pair of pairsBefore)
|
|
2328
|
+
if (!pairsAfter.has(pair))
|
|
2329
|
+
deltaNames.add(nameOf(pair));
|
|
2330
|
+
for (const pair of pairsAfter)
|
|
2331
|
+
if (!pairsBefore.has(pair))
|
|
2332
|
+
deltaNames.add(nameOf(pair));
|
|
2333
|
+
const definitionDelta = [...deltaNames];
|
|
2228
2334
|
return {
|
|
2229
2335
|
filesChecked,
|
|
2230
2336
|
filesAdded,
|
|
@@ -2233,6 +2339,7 @@ class ExtractionOrchestrator {
|
|
|
2233
2339
|
nodesUpdated,
|
|
2234
2340
|
durationMs: Date.now() - startTime,
|
|
2235
2341
|
changedFilePaths: changedFilePaths.length > 0 ? changedFilePaths : undefined,
|
|
2342
|
+
definitionDelta: definitionDelta.length > 0 ? definitionDelta : undefined,
|
|
2236
2343
|
};
|
|
2237
2344
|
}
|
|
2238
2345
|
/**
|