@monoes/monograph 1.5.6 → 1.5.7
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 +25 -9
- package/dist/src/mcp-tools/impact.d.ts.map +1 -1
- package/dist/src/mcp-tools/impact.js +1 -10
- package/dist/src/mcp-tools/impact.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -9
- package/.monomind/data/ranked-context.json +0 -5
- package/.monomind/loops/mastermind-review-1782162423447.json +0 -16
- package/.monomind/sessions/session-1777578175215.json +0 -15
- package/.monomind/sessions/session-1777823684507.json +0 -15
- package/.monomind/sessions/session-1777928944749.json +0 -15
- package/.monomind/sessions/session-1778052902210.json +0 -15
- package/.monomind/sessions/session-1778056744636.json +0 -15
- package/.monomind/sessions/session-1778061077599.json +0 -15
- package/.monomind/sessions/session-1778102154764.json +0 -15
- package/__tests__/analysis/shape-extractor.test.ts +0 -124
- package/__tests__/analysis/surprise-scorer.test.ts +0 -154
- package/__tests__/cache/extraction-cache.test.ts +0 -45
- package/__tests__/cli/ai-context.test.ts +0 -175
- package/__tests__/cli/augment.test.ts +0 -128
- package/__tests__/cli/doctor.test.ts +0 -125
- package/__tests__/cli/eval-server.test.ts +0 -89
- package/__tests__/cli/setup.test.ts +0 -178
- package/__tests__/cli/skill-gen.test.ts +0 -280
- package/__tests__/export/formats.test.ts +0 -82
- package/__tests__/fixtures/sample.c +0 -25
- package/__tests__/fixtures/sample.cpp +0 -32
- package/__tests__/fixtures/sample.dart +0 -34
- package/__tests__/fixtures/sample.kt +0 -30
- package/__tests__/fixtures/sample.php +0 -30
- package/__tests__/fixtures/sample.py +0 -11
- package/__tests__/fixtures/sample.rb +0 -26
- package/__tests__/fixtures/sample.swift +0 -42
- package/__tests__/fixtures/sample.ts +0 -17
- package/__tests__/fixtures/sample.vue +0 -40
- package/__tests__/groups/group-search.test.ts +0 -221
- package/__tests__/groups/group-sync.test.ts +0 -336
- package/__tests__/integration/build-atomicity.test.ts +0 -61
- package/__tests__/integration/call-attribution.test.ts +0 -116
- package/__tests__/integration/full-pipeline.test.ts +0 -64
- package/__tests__/integration/graph-report-freshness.test.ts +0 -53
- package/__tests__/integration/incremental-build.test.ts +0 -103
- package/__tests__/mcp-resources/resources.test.ts +0 -256
- package/__tests__/mcp-tools/api-impact.test.ts +0 -188
- package/__tests__/mcp-tools/context.test.ts +0 -130
- package/__tests__/mcp-tools/cypher.test.ts +0 -258
- package/__tests__/mcp-tools/detect-changes.test.ts +0 -114
- package/__tests__/mcp-tools/impact.test.ts +0 -133
- package/__tests__/mcp-tools/rename.test.ts +0 -117
- package/__tests__/mcp-tools/route-map.test.ts +0 -237
- package/__tests__/mcp-tools/shape-check.test.ts +0 -202
- package/__tests__/mcp-tools/tool-map.test.ts +0 -135
- package/__tests__/parsers/c.test.ts +0 -28
- package/__tests__/parsers/cpp.test.ts +0 -28
- package/__tests__/parsers/csharp.test.ts +0 -62
- package/__tests__/parsers/dart.test.ts +0 -28
- package/__tests__/parsers/kotlin.test.ts +0 -28
- package/__tests__/parsers/loader.test.ts +0 -14
- package/__tests__/parsers/php.test.ts +0 -28
- package/__tests__/parsers/python.test.ts +0 -32
- package/__tests__/parsers/ruby.test.ts +0 -33
- package/__tests__/parsers/swift.test.ts +0 -28
- package/__tests__/parsers/typescript.test.ts +0 -45
- package/__tests__/parsers/vue.test.ts +0 -28
- package/__tests__/pipeline/analysis.test.ts +0 -58
- package/__tests__/pipeline/phases/corpus-check.test.ts +0 -26
- package/__tests__/pipeline/phases/evidence.test.ts +0 -41
- package/__tests__/pipeline/phases/field-access.test.ts +0 -22
- package/__tests__/pipeline/phases/leiden.test.ts +0 -72
- package/__tests__/pipeline/phases/markdown.test.ts +0 -84
- package/__tests__/pipeline/phases/middleware-extractor.test.ts +0 -131
- package/__tests__/pipeline/phases/orm.test.ts +0 -379
- package/__tests__/pipeline/phases/processes.test.ts +0 -191
- package/__tests__/pipeline/phases/routes.test.ts +0 -195
- package/__tests__/pipeline/phases/scope-resolution.test.ts +0 -133
- package/__tests__/pipeline/phases/tools.test.ts +0 -161
- package/__tests__/pipeline/phases/variables.test.ts +0 -30
- package/__tests__/pipeline/phases/wildcard-synthesis.test.ts +0 -207
- package/__tests__/pipeline/phases.test.ts +0 -41
- package/__tests__/pipeline/runner.test.ts +0 -28
- package/__tests__/registry/repo-registry.test.ts +0 -127
- package/__tests__/reporting/graph-report.suggest.test.ts +0 -36
- package/__tests__/reporting/graph-report.test.ts +0 -165
- package/__tests__/search/ast-chunker.test.ts +0 -63
- package/__tests__/search/rrf.test.ts +0 -95
- package/__tests__/security/safe-fetch.test.ts +0 -41
- package/__tests__/security/sensitive-files.test.ts +0 -32
- package/__tests__/setup.ts +0 -1
- package/__tests__/skills/platform-skills.test.ts +0 -63
- package/__tests__/staleness/git-staleness.test.ts +0 -107
- package/__tests__/storage/db.test.ts +0 -37
- package/__tests__/storage/evidence-roundtrip.test.ts +0 -89
- package/__tests__/storage/stores.test.ts +0 -165
- package/__tests__/types.test.ts +0 -13
- package/__tests__/validation/extraction-validator.test.ts +0 -48
- package/__tests__/watch/watcher.test.ts +0 -31
- package/__tests__/web/analyze-api.test.ts +0 -66
- package/__tests__/web/api.test.ts +0 -210
- package/__tests__/web/mcp-http.test.ts +0 -67
- package/__tests__/web/react-ui.test.ts +0 -43
- package/__tests__/wiki/gist-publisher.test.ts +0 -66
- package/__tests__/wiki/providers.test.ts +0 -69
- package/__tests__/wiki/wiki-generator.test.ts +0 -260
- package/src/__tests__/analysis/benchmark.test.ts +0 -59
- package/src/__tests__/analysis/cluster-quality.test.ts +0 -106
- package/src/__tests__/analysis/corpus-health.test.ts +0 -33
- package/src/__tests__/analysis/dependency-health.test.ts +0 -105
- package/src/__tests__/analysis/file-classifier.test.ts +0 -50
- package/src/__tests__/analysis/node-similarity.test.ts +0 -81
- package/src/__tests__/cache/augment-cache.test.ts +0 -55
- package/src/__tests__/cli/check-update.test.ts +0 -42
- package/src/__tests__/cli/hooks-install.test.ts +0 -56
- package/src/__tests__/cli/hooks-marker.test.ts +0 -138
- package/src/__tests__/cli/hooks-status.test.ts +0 -42
- package/src/__tests__/export/adjacency-matrix.test.ts +0 -116
- package/src/__tests__/export/csv.test.ts +0 -39
- package/src/__tests__/export/dot.test.ts +0 -86
- package/src/__tests__/export/gexf.test.ts +0 -78
- package/src/__tests__/export/graphml.test.ts +0 -57
- package/src/__tests__/export/mermaid.test.ts +0 -89
- package/src/__tests__/graph/betweenness.test.ts +0 -89
- package/src/__tests__/graph/cycles.test.ts +0 -131
- package/src/__tests__/graph/dead-code.test.ts +0 -174
- package/src/__tests__/graph/dfs.test.ts +0 -62
- package/src/__tests__/graph/diff-summary.test.ts +0 -83
- package/src/__tests__/graph/edge-filter.test.ts +0 -129
- package/src/__tests__/graph/import-chain.test.ts +0 -111
- package/src/__tests__/graph/merge.test.ts +0 -151
- package/src/__tests__/graph/node-search.test.ts +0 -167
- package/src/__tests__/graph/normalize-id.test.ts +0 -102
- package/src/__tests__/graph/pagerank.test.ts +0 -96
- package/src/__tests__/graph/prune.test.ts +0 -110
- package/src/__tests__/graph/regex-search.test.ts +0 -166
- package/src/__tests__/graph/ripple-impact.test.ts +0 -73
- package/src/__tests__/graph/scc.test.ts +0 -85
- package/src/__tests__/graph/statistics.test.ts +0 -219
- package/src/__tests__/graph/subgraph.test.ts +0 -127
- package/src/__tests__/graph/topo-sort.test.ts +0 -110
- package/src/__tests__/graph/wcc.test.ts +0 -101
- package/src/__tests__/groups/grpc-extractor.test.ts +0 -47
- package/src/__tests__/groups/service-boundary.test.ts +0 -86
- package/src/__tests__/groups/topic-extractor.test.ts +0 -43
- package/src/__tests__/ingest/git-clone.test.ts +0 -128
- package/src/__tests__/ingest/query-memory.test.ts +0 -123
- package/src/__tests__/ingest/transcribe.test.ts +0 -58
- package/src/__tests__/ingest/url-ingest.test.ts +0 -48
- package/src/__tests__/mcp-resources/repo-context-resource.test.ts +0 -37
- package/src/__tests__/mcp-resources/repos-resource.test.ts +0 -71
- package/src/__tests__/mcp-resources/wiki-resource.test.ts +0 -52
- package/src/__tests__/mcp-tools/explain.test.ts +0 -46
- package/src/__tests__/mcp-tools/graph-query.test.ts +0 -45
- package/src/__tests__/mcp-tools/group-sync.test.ts +0 -8
- package/src/__tests__/mcp-tools/impact-filtering.test.ts +0 -48
- package/src/__tests__/mcp-tools/impact.risk.test.ts +0 -24
- package/src/__tests__/mcp-tools/list-repos.test.ts +0 -24
- package/src/__tests__/mcp-tools/neighbors.test.ts +0 -48
- package/src/__tests__/mcp-tools/query.test.ts +0 -42
- package/src/__tests__/parsers/language-parsers.test.ts +0 -52
- package/src/__tests__/parsers/named-bindings.test.ts +0 -73
- package/src/__tests__/pipeline/cluster-only.test.ts +0 -33
- package/src/__tests__/pipeline/phases/bridge-adapters/electron-ipc.test.ts +0 -87
- package/src/__tests__/pipeline/phases/bridge-adapters/tauri.test.ts +0 -116
- package/src/__tests__/pipeline/phases/bridge-adapters/wails.test.ts +0 -81
- package/src/__tests__/pipeline/phases/bridge-resolver.test.ts +0 -110
- package/src/__tests__/pipeline/phases/communities.cohesion.test.ts +0 -43
- package/src/__tests__/pipeline/phases/community-split.test.ts +0 -30
- package/src/__tests__/pipeline/phases/framework-detect.test.ts +0 -65
- package/src/__tests__/pipeline/phases/import-resolver.test.ts +0 -64
- package/src/__tests__/pipeline/phases/parse-arrow.test.ts +0 -33
- package/src/__tests__/pipeline/phases/parse-csharp.test.ts +0 -33
- package/src/__tests__/pipeline/phases/scan.monographignore.test.ts +0 -53
- package/src/__tests__/pipeline/phases/scan.negation.test.ts +0 -40
- package/src/__tests__/pipeline/phases/scope-resolution.go.test.ts +0 -34
- package/src/__tests__/pipeline/phases/scope-resolution.java.test.ts +0 -30
- package/src/__tests__/pipeline/phases/scope-resolution.rust.test.ts +0 -31
- package/src/__tests__/pipeline/phases/suggest-questions.test.ts +0 -46
- package/src/__tests__/pipeline/phases/surprises-scoring.test.ts +0 -46
- package/src/__tests__/pipeline/phases/variables-phase.test.ts +0 -78
- package/src/__tests__/pipeline/phases/wildcard-phase.test.ts +0 -99
- package/src/__tests__/pipeline/runner.parallel.test.ts +0 -78
- package/src/__tests__/reporting/graph-report-confidence.test.ts +0 -43
- package/src/__tests__/reporting/graph-report-gaps.test.ts +0 -41
- package/src/__tests__/scope-resolution/call-sites.test.ts +0 -89
- package/src/__tests__/scope-resolution/evidence-weights.test.ts +0 -49
- package/src/__tests__/search/diacritic.test.ts +0 -23
- package/src/__tests__/security/safe-fetch.test.ts +0 -125
- package/src/__tests__/skills/platform-skills.extra.test.ts +0 -36
- package/src/__tests__/web/api.clusters.test.ts +0 -65
- package/src/__tests__/web/api.file.test.ts +0 -44
- package/src/__tests__/web/api.grep.test.ts +0 -47
- package/src/__tests__/web/api.info.test.ts +0 -18
- package/src/__tests__/web/api.jobs.test.ts +0 -47
- package/src/__tests__/web/api.progress.test.ts +0 -25
- package/src/__tests__/web/api.stream.test.ts +0 -35
- package/src/__tests__/wiki/providers-reasoning.test.ts +0 -46
- package/src/__tests__/wiki/wiki-review-mode.test.ts +0 -22
- package/src/analysis/benchmark.ts +0 -132
- package/src/analysis/changed-files.ts +0 -73
- package/src/analysis/changed-workspaces.ts +0 -94
- package/src/analysis/churn-cache.ts +0 -179
- package/src/analysis/churn-trend.ts +0 -57
- package/src/analysis/churn.ts +0 -263
- package/src/analysis/cluster-quality.ts +0 -142
- package/src/analysis/combined.ts +0 -41
- package/src/analysis/corpus-health.ts +0 -41
- package/src/analysis/coverage-gaps.ts +0 -246
- package/src/analysis/dep-classification.ts +0 -167
- package/src/analysis/dependency-health.ts +0 -146
- package/src/analysis/duplicate-exports.ts +0 -110
- package/src/analysis/fallow-suppression.ts +0 -98
- package/src/analysis/feature-flags-config.ts +0 -47
- package/src/analysis/feature-flags.ts +0 -223
- package/src/analysis/file-classifier.ts +0 -87
- package/src/analysis/git-changed-files.ts +0 -62
- package/src/analysis/health-baseline.ts +0 -80
- package/src/analysis/issue-filters.ts +0 -56
- package/src/analysis/list.ts +0 -74
- package/src/analysis/node-similarity.ts +0 -115
- package/src/analysis/private-type-leaks.ts +0 -119
- package/src/analysis/progress.ts +0 -43
- package/src/analysis/project-state.ts +0 -95
- package/src/analysis/regression-config.ts +0 -36
- package/src/analysis/rule-overrides.ts +0 -81
- package/src/analysis/scripts.ts +0 -95
- package/src/analysis/shape-extractor.ts +0 -202
- package/src/analysis/since-duration.ts +0 -42
- package/src/analysis/suppression-context.ts +0 -95
- package/src/analysis/suppressions.ts +0 -80
- package/src/analysis/surprise-scorer.ts +0 -74
- package/src/analysis/targets.ts +0 -237
- package/src/analysis/unused-class-members.ts +0 -79
- package/src/analysis/workspace-filter.ts +0 -89
- package/src/analyze/boundary-analysis.ts +0 -129
- package/src/analyze/predicates/file.ts +0 -86
- package/src/analyze/predicates/import.ts +0 -90
- package/src/analyze/predicates/lifecycle.ts +0 -55
- package/src/analyze/unused-deps.ts +0 -70
- package/src/analyze/unused-exports.ts +0 -145
- package/src/analyze/unused-files.ts +0 -46
- package/src/api/production-override.ts +0 -63
- package/src/api/programmatic.ts +0 -118
- package/src/audit.ts +0 -234
- package/src/cache/augment-cache.ts +0 -63
- package/src/cache/extraction-cache.ts +0 -141
- package/src/check/filtering.ts +0 -78
- package/src/check/index.ts +0 -99
- package/src/check/output.ts +0 -79
- package/src/check/rules.ts +0 -61
- package/src/ci-template.ts +0 -84
- package/src/claude-cli.ts +0 -59
- package/src/cli/ai-context.ts +0 -193
- package/src/cli/augment.ts +0 -114
- package/src/cli/check-update.ts +0 -40
- package/src/cli/doctor.ts +0 -182
- package/src/cli/eval-server.ts +0 -126
- package/src/cli/hooks-install.ts +0 -202
- package/src/cli/setup.ts +0 -197
- package/src/cli/skill-gen.ts +0 -347
- package/src/commands/flags.ts +0 -72
- package/src/config/boundary-config.ts +0 -183
- package/src/config/cli-schema.ts +0 -81
- package/src/config/config-parsing.ts +0 -102
- package/src/config/duplicates-config.ts +0 -62
- package/src/config/external-plugin.ts +0 -77
- package/src/config/health-config.ts +0 -42
- package/src/config/ignore-exports-used-in-file.ts +0 -46
- package/src/config/migration-types.ts +0 -73
- package/src/config/output-format.ts +0 -24
- package/src/config/plugins/builtin.ts +0 -411
- package/src/config/plugins/registry.ts +0 -77
- package/src/config/plugins/types.ts +0 -14
- package/src/config/resolution.ts +0 -102
- package/src/config/rules.ts +0 -70
- package/src/config/schema-gen.ts +0 -115
- package/src/config/types.ts +0 -149
- package/src/config/used-class-members.ts +0 -53
- package/src/config/validate.ts +0 -108
- package/src/config/workspace.ts +0 -137
- package/src/coverage/cloud-client.ts +0 -111
- package/src/coverage/upload-inventory.ts +0 -84
- package/src/coverage/upload-source-maps.ts +0 -97
- package/src/discover/entry-points.ts +0 -51
- package/src/discover/infrastructure-entries.ts +0 -175
- package/src/duplicates/detect/concatenation.ts +0 -37
- package/src/duplicates/detect/extraction.ts +0 -107
- package/src/duplicates/detect/filtering.ts +0 -112
- package/src/duplicates/detect/lcp.ts +0 -27
- package/src/duplicates/detect/ranking.ts +0 -16
- package/src/duplicates/detect/statistics.ts +0 -69
- package/src/duplicates/detect/suffix-array.ts +0 -88
- package/src/duplicates/families.ts +0 -95
- package/src/duplicates/normalize.ts +0 -58
- package/src/duplicates/shingle-filter.ts +0 -37
- package/src/duplicates/token-types.ts +0 -62
- package/src/duplicates/tokenize/index.ts +0 -104
- package/src/error/fallow-error.ts +0 -94
- package/src/error.ts +0 -47
- package/src/export/adjacency-matrix.ts +0 -127
- package/src/export/analysis-json.ts +0 -87
- package/src/export/badge.ts +0 -105
- package/src/export/canvas.ts +0 -42
- package/src/export/codeclimate.ts +0 -201
- package/src/export/compact-health.ts +0 -119
- package/src/export/compact.ts +0 -83
- package/src/export/csv.ts +0 -33
- package/src/export/cypher.ts +0 -33
- package/src/export/dot.ts +0 -52
- package/src/export/gexf.ts +0 -59
- package/src/export/graphml.ts +0 -50
- package/src/export/html.ts +0 -548
- package/src/export/index.ts +0 -9
- package/src/export/json.ts +0 -36
- package/src/export/markdown.ts +0 -290
- package/src/export/mermaid.ts +0 -100
- package/src/export/obsidian.ts +0 -44
- package/src/export/sarif.ts +0 -245
- package/src/export/svg.ts +0 -68
- package/src/fix/deps.ts +0 -70
- package/src/fix/enum-members.ts +0 -103
- package/src/fix/export-surgery.ts +0 -197
- package/src/fix/exports.ts +0 -93
- package/src/fix/orchestrator.ts +0 -67
- package/src/graph/analyzer.ts +0 -69
- package/src/graph/author-analytics.ts +0 -217
- package/src/graph/baseline.ts +0 -432
- package/src/graph/clone-families.ts +0 -132
- package/src/graph/codeowners-extended.ts +0 -114
- package/src/graph/codeowners-gitlab.ts +0 -150
- package/src/graph/codeowners.ts +0 -217
- package/src/graph/complexity.ts +0 -200
- package/src/graph/cross-reference-findings.ts +0 -85
- package/src/graph/cross-reference.ts +0 -139
- package/src/graph/cycle-detection.ts +0 -311
- package/src/graph/cycles.ts +0 -222
- package/src/graph/dead-code.ts +0 -128
- package/src/graph/dependency-closure.ts +0 -126
- package/src/graph/dfs.ts +0 -118
- package/src/graph/diff.ts +0 -92
- package/src/graph/duplication-stats.ts +0 -79
- package/src/graph/edge-filter.ts +0 -117
- package/src/graph/explain.ts +0 -133
- package/src/graph/external-style-usage.ts +0 -81
- package/src/graph/health-score.ts +0 -179
- package/src/graph/hotspots.ts +0 -219
- package/src/graph/import-chain.ts +0 -148
- package/src/graph/loader.ts +0 -44
- package/src/graph/maintainability.ts +0 -156
- package/src/graph/merge.ts +0 -174
- package/src/graph/mirrored-dirs.ts +0 -202
- package/src/graph/narrowing.ts +0 -92
- package/src/graph/node-search.ts +0 -201
- package/src/graph/node-types.ts +0 -67
- package/src/graph/normalize-id.ts +0 -138
- package/src/graph/pagerank.ts +0 -165
- package/src/graph/prune.ts +0 -95
- package/src/graph/re-exports/propagate.ts +0 -95
- package/src/graph/reachability.ts +0 -99
- package/src/graph/regex-search.ts +0 -232
- package/src/graph/regression.ts +0 -199
- package/src/graph/resolve/discover-types.ts +0 -45
- package/src/graph/resolve/dynamic-imports.ts +0 -102
- package/src/graph/resolve/fallbacks.ts +0 -79
- package/src/graph/resolve/index.ts +0 -68
- package/src/graph/resolve/path-info.ts +0 -41
- package/src/graph/resolve/re-exports.ts +0 -14
- package/src/graph/resolve/react-native.ts +0 -27
- package/src/graph/resolve/require-imports.ts +0 -18
- package/src/graph/resolve/specifier.ts +0 -120
- package/src/graph/resolve/static-imports.ts +0 -14
- package/src/graph/resolve/types.ts +0 -108
- package/src/graph/resolve/upgrades.ts +0 -32
- package/src/graph/ripple-impact.ts +0 -131
- package/src/graph/risk-profile.ts +0 -179
- package/src/graph/statistics.ts +0 -165
- package/src/graph/stats.ts +0 -157
- package/src/graph/subgraph.ts +0 -162
- package/src/graph/topo-sort.ts +0 -171
- package/src/graph/wcc.ts +0 -187
- package/src/groups/contract-bridge.ts +0 -103
- package/src/groups/contract-registry.ts +0 -263
- package/src/groups/group-config.ts +0 -108
- package/src/groups/group-search.ts +0 -139
- package/src/groups/group-sync.ts +0 -82
- package/src/groups/grpc-extractor.ts +0 -64
- package/src/groups/service-boundary.ts +0 -119
- package/src/groups/topic-extractor.ts +0 -90
- package/src/health/analysis-counts-snapshot.ts +0 -57
- package/src/health/analysis-counts.ts +0 -70
- package/src/health/complexity-findings.ts +0 -115
- package/src/health/distribution-thresholds.ts +0 -54
- package/src/health/grouping.ts +0 -138
- package/src/health/health-grouping.ts +0 -86
- package/src/health/health-report-types.ts +0 -165
- package/src/health/health-report.ts +0 -81
- package/src/health/health-score.ts +0 -65
- package/src/health/hotspot-utils.ts +0 -55
- package/src/health/hotspots.ts +0 -104
- package/src/health/large-functions.ts +0 -34
- package/src/health/ownership-metrics.ts +0 -61
- package/src/health/ownership-risk.ts +0 -98
- package/src/health/ownership.ts +0 -174
- package/src/health/quality-gate.ts +0 -57
- package/src/health/risk-profile.ts +0 -39
- package/src/health/runtime-coverage-report.ts +0 -101
- package/src/health/runtime-coverage.ts +0 -71
- package/src/health/scores.ts +0 -72
- package/src/health/scoring-types.ts +0 -48
- package/src/health/target-thresholds.ts +0 -92
- package/src/health/target-types.ts +0 -54
- package/src/health/targets.ts +0 -151
- package/src/health/timings.ts +0 -86
- package/src/health/trend-types.ts +0 -57
- package/src/health/trends.ts +0 -86
- package/src/health/vital-signs-compute.ts +0 -108
- package/src/health/vital-signs-snapshot.ts +0 -72
- package/src/health/vital-signs.ts +0 -101
- package/src/index.ts +0 -111
- package/src/ingest/git-clone.ts +0 -246
- package/src/ingest/query-memory.ts +0 -132
- package/src/ingest/transcribe.ts +0 -254
- package/src/ingest/url-ingest.ts +0 -87
- package/src/init/agent-hooks.ts +0 -86
- package/src/init/git-hooks.ts +0 -71
- package/src/init/project-detection.ts +0 -105
- package/src/license/manager.ts +0 -120
- package/src/lsp/code-actions.ts +0 -127
- package/src/lsp/code-lens.ts +0 -56
- package/src/lsp/diagnostics-ext.ts +0 -150
- package/src/lsp/diagnostics-push.ts +0 -103
- package/src/lsp/diagnostics.ts +0 -98
- package/src/lsp/hover.ts +0 -64
- package/src/lsp/server.ts +0 -254
- package/src/mcp/params.ts +0 -201
- package/src/mcp/resources.ts +0 -124
- package/src/mcp/tool-builders.ts +0 -203
- package/src/mcp-resources/communities-resource.ts +0 -72
- package/src/mcp-resources/graph-resource.ts +0 -14
- package/src/mcp-resources/index.ts +0 -9
- package/src/mcp-resources/named-cluster-resource.ts +0 -35
- package/src/mcp-resources/named-process-resource.ts +0 -26
- package/src/mcp-resources/processes-resource.ts +0 -67
- package/src/mcp-resources/repo-context-resource.ts +0 -36
- package/src/mcp-resources/repos-resource.ts +0 -21
- package/src/mcp-resources/schema-resource.ts +0 -46
- package/src/mcp-resources/wiki-resource.ts +0 -23
- package/src/mcp-tools/api-impact.ts +0 -181
- package/src/mcp-tools/context.ts +0 -111
- package/src/mcp-tools/cypher.ts +0 -29
- package/src/mcp-tools/detect-changes.ts +0 -116
- package/src/mcp-tools/explain.ts +0 -65
- package/src/mcp-tools/graph-query.ts +0 -128
- package/src/mcp-tools/group-list.ts +0 -88
- package/src/mcp-tools/group-query.ts +0 -26
- package/src/mcp-tools/group-sync.ts +0 -32
- package/src/mcp-tools/impact.ts +0 -202
- package/src/mcp-tools/index.ts +0 -21
- package/src/mcp-tools/list-repos.ts +0 -38
- package/src/mcp-tools/neighbors.ts +0 -80
- package/src/mcp-tools/query.ts +0 -86
- package/src/mcp-tools/rename.ts +0 -118
- package/src/mcp-tools/route-map.ts +0 -98
- package/src/mcp-tools/serve.ts +0 -41
- package/src/mcp-tools/shape-check.ts +0 -182
- package/src/mcp-tools/staleness.ts +0 -13
- package/src/mcp-tools/tool-map.ts +0 -66
- package/src/mcp-tools/wiki-build.ts +0 -37
- package/src/mcp-tools/wiki.ts +0 -28
- package/src/migrate/jscpd.ts +0 -78
- package/src/migrate/jsonc-gen.ts +0 -38
- package/src/migrate/knip.ts +0 -126
- package/src/migrate/toml-gen.ts +0 -48
- package/src/parsers/c.ts +0 -31
- package/src/parsers/cpp.ts +0 -29
- package/src/parsers/csharp.ts +0 -43
- package/src/parsers/dart.ts +0 -39
- package/src/parsers/extractor.ts +0 -202
- package/src/parsers/go.ts +0 -27
- package/src/parsers/java.ts +0 -27
- package/src/parsers/kotlin.ts +0 -36
- package/src/parsers/language-config.ts +0 -28
- package/src/parsers/language-parsers.ts +0 -120
- package/src/parsers/loader.ts +0 -149
- package/src/parsers/named-bindings.ts +0 -63
- package/src/parsers/php.ts +0 -37
- package/src/parsers/python.ts +0 -26
- package/src/parsers/ruby.ts +0 -39
- package/src/parsers/rust.ts +0 -25
- package/src/parsers/swift.ts +0 -28
- package/src/parsers/typescript.ts +0 -41
- package/src/parsers/vue.ts +0 -79
- package/src/pipeline/cluster-only.ts +0 -64
- package/src/pipeline/effort.ts +0 -50
- package/src/pipeline/orchestrator.ts +0 -384
- package/src/pipeline/phases/boundary.ts +0 -151
- package/src/pipeline/phases/bridge-adapters/electron-ipc.ts +0 -91
- package/src/pipeline/phases/bridge-adapters/registry.ts +0 -14
- package/src/pipeline/phases/bridge-adapters/tauri.ts +0 -103
- package/src/pipeline/phases/bridge-adapters/types.ts +0 -31
- package/src/pipeline/phases/bridge-adapters/wails.ts +0 -33
- package/src/pipeline/phases/bridge-resolver.ts +0 -77
- package/src/pipeline/phases/call-site-extractors.ts +0 -177
- package/src/pipeline/phases/communities.ts +0 -183
- package/src/pipeline/phases/contextual-proximity.ts +0 -88
- package/src/pipeline/phases/cross-file.ts +0 -116
- package/src/pipeline/phases/docs-parse.ts +0 -307
- package/src/pipeline/phases/evidence.ts +0 -9
- package/src/pipeline/phases/field-access.ts +0 -49
- package/src/pipeline/phases/framework-detect.ts +0 -109
- package/src/pipeline/phases/god-nodes.ts +0 -163
- package/src/pipeline/phases/import-resolver.ts +0 -114
- package/src/pipeline/phases/leiden.ts +0 -77
- package/src/pipeline/phases/llm-extract.ts +0 -178
- package/src/pipeline/phases/markdown.ts +0 -121
- package/src/pipeline/phases/middleware-extractor.ts +0 -127
- package/src/pipeline/phases/module-resolution.ts +0 -294
- package/src/pipeline/phases/mro.ts +0 -56
- package/src/pipeline/phases/orm.ts +0 -503
- package/src/pipeline/phases/parse.ts +0 -222
- package/src/pipeline/phases/pdf-parse.ts +0 -133
- package/src/pipeline/phases/processes.ts +0 -249
- package/src/pipeline/phases/re-export-propagation.ts +0 -160
- package/src/pipeline/phases/reachability.ts +0 -156
- package/src/pipeline/phases/routes.ts +0 -350
- package/src/pipeline/phases/scan.ts +0 -133
- package/src/pipeline/phases/scope-resolution.ts +0 -442
- package/src/pipeline/phases/structure.ts +0 -68
- package/src/pipeline/phases/suggest.ts +0 -92
- package/src/pipeline/phases/surprises.ts +0 -83
- package/src/pipeline/phases/tools.ts +0 -180
- package/src/pipeline/phases/variables-phase.ts +0 -37
- package/src/pipeline/phases/variables.ts +0 -67
- package/src/pipeline/phases/wildcard-phase.ts +0 -50
- package/src/pipeline/phases/wildcard-synthesis.ts +0 -214
- package/src/pipeline/progress.ts +0 -58
- package/src/pipeline/runner.ts +0 -88
- package/src/pipeline/types.ts +0 -41
- package/src/query/cypher-parser.ts +0 -450
- package/src/registry/repo-registry.ts +0 -125
- package/src/regression/baseline-deltas.ts +0 -215
- package/src/regression/baseline.ts +0 -76
- package/src/regression/counts.ts +0 -87
- package/src/regression/outcome.ts +0 -78
- package/src/regression/tolerance.ts +0 -35
- package/src/report/attributed-duplication.ts +0 -112
- package/src/report/badge-svg.ts +0 -100
- package/src/report/cross-ref-human.ts +0 -50
- package/src/report/duplication-grouping.ts +0 -74
- package/src/report/grouping.ts +0 -137
- package/src/report/human-check.ts +0 -291
- package/src/report/human-dupes.ts +0 -142
- package/src/report/human-health.ts +0 -195
- package/src/report/human.ts +0 -120
- package/src/report/json-actions.ts +0 -91
- package/src/report/json-builders.ts +0 -70
- package/src/report/json-schema.ts +0 -75
- package/src/report/number-format.ts +0 -91
- package/src/report/output-grouped.ts +0 -102
- package/src/report/pipeline-perf.ts +0 -56
- package/src/report/trace-human.ts +0 -127
- package/src/reporting/graph-report.ts +0 -431
- package/src/results/fallow-results.ts +0 -152
- package/src/results/types.ts +0 -149
- package/src/scope-resolution/evidence-weights.ts +0 -41
- package/src/search/ast-chunker.ts +0 -206
- package/src/search/diacritic.ts +0 -7
- package/src/search/hybrid-query.ts +0 -65
- package/src/search/rrf.ts +0 -51
- package/src/security/safe-fetch.ts +0 -113
- package/src/security/sensitive-files.ts +0 -24
- package/src/skills/platform-skills.ts +0 -233
- package/src/staleness/git-staleness.ts +0 -66
- package/src/storage/db.ts +0 -110
- package/src/storage/edge-store.ts +0 -103
- package/src/storage/file-cache.ts +0 -78
- package/src/storage/fts-store.ts +0 -385
- package/src/storage/node-store.ts +0 -209
- package/src/storage/schema.ts +0 -171
- package/src/storage/suppressions.ts +0 -145
- package/src/storage/unlinked-refs.ts +0 -117
- package/src/types.ts +0 -197
- package/src/validation/extraction-validator.ts +0 -54
- package/src/watch/watcher.ts +0 -160
- package/src/web/analyze-api.ts +0 -146
- package/src/web/api.ts +0 -584
- package/src/web/async-jobs.ts +0 -109
- package/src/web/mcp-http.ts +0 -227
- package/src/web/react-ui.ts +0 -78
- package/src/web/server.ts +0 -90
- package/src/web/ui/index.html +0 -204
- package/src/wiki/gist-publisher.ts +0 -76
- package/src/wiki/prompt-builder.ts +0 -35
- package/src/wiki/providers.ts +0 -134
- package/src/wiki/wiki-generator.ts +0 -223
- package/src/wiki/wiki-store.ts +0 -49
- package/tsconfig.json +0 -11
- package/vitest.config.ts +0 -20
package/src/export/html.ts
DELETED
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
import type { MonographNode, MonographEdge } from '../types.js';
|
|
2
|
-
|
|
3
|
-
const MAX_NODES = 2000;
|
|
4
|
-
|
|
5
|
-
// 20-color dark-friendly community palette (vivid, readable on #0d0d1a)
|
|
6
|
-
const COMMUNITY_COLORS = [
|
|
7
|
-
'#7B61FF','#00E5C8','#ef4444','#f59e0b','#22c55e',
|
|
8
|
-
'#ec4899','#06b6d4','#f97316','#84cc16','#6366f1',
|
|
9
|
-
'#14b8a6','#e11d48','#0ea5e9','#d97706','#10b981',
|
|
10
|
-
'#9333ea','#db2777','#0891b2','#65a30d','#a78bfa',
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
const RELATION_COLORS: Record<string, string> = {
|
|
14
|
-
IMPORTS: '#3b82f6',
|
|
15
|
-
CALLS: '#8b5cf6',
|
|
16
|
-
EXTENDS: '#ef4444',
|
|
17
|
-
IMPLEMENTS: '#f97316',
|
|
18
|
-
DEFINES: '#22c55e',
|
|
19
|
-
CONTAINS: '#64748b',
|
|
20
|
-
CO_OCCURS: '#f59e0b',
|
|
21
|
-
DESCRIBES: '#14b8a6',
|
|
22
|
-
CAUSES: '#ec4899',
|
|
23
|
-
PART_OF: '#06b6d4',
|
|
24
|
-
RELATED_TO: '#475569',
|
|
25
|
-
USES: '#84cc16',
|
|
26
|
-
CONTRASTS_WITH: '#e11d48',
|
|
27
|
-
REF: '#475569',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// Node shape by type
|
|
31
|
-
const TYPE_SHAPES: Record<string, string> = {
|
|
32
|
-
File: 'dot',
|
|
33
|
-
Function: 'diamond',
|
|
34
|
-
Class: 'square',
|
|
35
|
-
Interface: 'triangle',
|
|
36
|
-
Method: 'diamond',
|
|
37
|
-
Variable: 'dot',
|
|
38
|
-
Module: 'hexagon',
|
|
39
|
-
Section: 'dot',
|
|
40
|
-
Concept: 'star',
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export function toHtml(nodes: MonographNode[], edges: MonographEdge[]): string {
|
|
44
|
-
// Sort by degree DESC, take top MAX_NODES
|
|
45
|
-
const degree = new Map<string, number>();
|
|
46
|
-
for (const e of edges) {
|
|
47
|
-
degree.set(e.sourceId, (degree.get(e.sourceId) ?? 0) + 1);
|
|
48
|
-
degree.set(e.targetId, (degree.get(e.targetId) ?? 0) + 1);
|
|
49
|
-
}
|
|
50
|
-
const sorted = [...nodes].sort((a, b) => (degree.get(b.id) ?? 0) - (degree.get(a.id) ?? 0));
|
|
51
|
-
const slicedNodes = sorted.slice(0, MAX_NODES);
|
|
52
|
-
const nodeIds = new Set(slicedNodes.map(n => n.id));
|
|
53
|
-
|
|
54
|
-
// When community_id is null (not yet computed), assign a stable color by type
|
|
55
|
-
const TYPE_PALETTE: Record<string, string> = {
|
|
56
|
-
File: '#7B61FF', Function: '#00E5C8', Class: '#f59e0b', Interface: '#06b6d4',
|
|
57
|
-
Method: '#00E5C8', Variable: '#64748b', Module: '#ec4899', Section: '#22c55e',
|
|
58
|
-
Concept: '#84cc16',
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const visNodes = slicedNodes.map(n => {
|
|
62
|
-
const deg = degree.get(n.id) ?? 0;
|
|
63
|
-
const hasCommunity = n.communityId !== null && n.communityId !== undefined;
|
|
64
|
-
const color = hasCommunity
|
|
65
|
-
? COMMUNITY_COLORS[(n.communityId ?? 0) % COMMUNITY_COLORS.length]
|
|
66
|
-
: (TYPE_PALETTE[n.label] ?? '#64748b');
|
|
67
|
-
const importance = (n.properties as Record<string, unknown> | undefined)?.importance as number | undefined;
|
|
68
|
-
// Log-scaled size so high-degree nodes stand out but don't dominate
|
|
69
|
-
const size = importance
|
|
70
|
-
? 8 + importance * 5
|
|
71
|
-
: Math.max(6, 6 + Math.log2(deg + 1) * 4);
|
|
72
|
-
const shape = TYPE_SHAPES[n.label] ?? 'dot';
|
|
73
|
-
const shortLabel = n.name.length > 20 ? n.name.slice(0, 18) + '…' : n.name;
|
|
74
|
-
return {
|
|
75
|
-
id: n.id,
|
|
76
|
-
label: shortLabel,
|
|
77
|
-
_fullName: n.name,
|
|
78
|
-
title: buildTooltip(n, deg),
|
|
79
|
-
group: n.communityId ?? 0,
|
|
80
|
-
color: {
|
|
81
|
-
background: color,
|
|
82
|
-
border: color,
|
|
83
|
-
highlight: { background: '#ffffff', border: color },
|
|
84
|
-
hover: { background: lighten(color), border: '#ffffff' },
|
|
85
|
-
},
|
|
86
|
-
size,
|
|
87
|
-
shape,
|
|
88
|
-
font: {
|
|
89
|
-
size: Math.max(9, 8 + Math.floor(Math.log2(deg + 1))),
|
|
90
|
-
color: '#e2e8f0',
|
|
91
|
-
face: 'Azeret Mono, monospace',
|
|
92
|
-
strokeWidth: 2,
|
|
93
|
-
strokeColor: '#0d0d1a',
|
|
94
|
-
},
|
|
95
|
-
shadow: deg > 4 ? { enabled: true, color: color + '66', size: Math.min(deg, 20), x: 0, y: 0 } : { enabled: false },
|
|
96
|
-
_nodeType: n.label,
|
|
97
|
-
_deg: deg,
|
|
98
|
-
_filePath: n.filePath,
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
const visEdges = edges
|
|
103
|
-
.filter(e => nodeIds.has(e.sourceId) && nodeIds.has(e.targetId))
|
|
104
|
-
.map((e, i) => {
|
|
105
|
-
const weight = (e as { weight?: number }).weight ?? 1;
|
|
106
|
-
const color = RELATION_COLORS[e.relation] ?? RELATION_COLORS['REF'];
|
|
107
|
-
return {
|
|
108
|
-
id: `e${i}`,
|
|
109
|
-
from: e.sourceId,
|
|
110
|
-
to: e.targetId,
|
|
111
|
-
title: e.relation + (weight > 1 ? ` (×${weight})` : ''),
|
|
112
|
-
_label: e.relation,
|
|
113
|
-
color: { color: color + 'aa', highlight: color, hover: color, opacity: 0.6 },
|
|
114
|
-
width: Math.min(1 + Math.log2(weight), 5),
|
|
115
|
-
arrows: { to: { enabled: true, scaleFactor: 0.4, type: 'arrow' } },
|
|
116
|
-
font: { size: 9, color: '#94a3b8', face: 'Azeret Mono, monospace', align: 'middle' },
|
|
117
|
-
smooth: { enabled: true, type: 'dynamic', roundness: 0.3 },
|
|
118
|
-
hidden: false,
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
const nodeTypes = [...new Set(slicedNodes.map(n => n.label))].sort();
|
|
123
|
-
const relationTypes = [...new Set(visEdges.map(e => e._label))].sort();
|
|
124
|
-
|
|
125
|
-
return `<!DOCTYPE html>
|
|
126
|
-
<html>
|
|
127
|
-
<head>
|
|
128
|
-
<meta charset="UTF-8">
|
|
129
|
-
<title>Monograph — Knowledge Graph</title>
|
|
130
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
131
|
-
<link href="https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;500&family=Syne:wght@600;700&display=swap" rel="stylesheet">
|
|
132
|
-
<script src="https://unpkg.com/vis-network@9.1.9/standalone/umd/vis-network.min.js"><\/script>
|
|
133
|
-
<style>
|
|
134
|
-
*{margin:0;padding:0;box-sizing:border-box}
|
|
135
|
-
:root{
|
|
136
|
-
--bg:#0d0d1a;--surface:rgba(255,255,255,0.04);--border:rgba(255,255,255,0.09);
|
|
137
|
-
--text:#e2e8f0;--muted:#64748b;--dim:#475569;
|
|
138
|
-
--purple:#7B61FF;--teal:#00E5C8;--red:#ef4444;
|
|
139
|
-
}
|
|
140
|
-
html,body{width:100%;height:100%;background:var(--bg);color:var(--text);overflow:hidden;font-family:'Azeret Mono',monospace}
|
|
141
|
-
#graph{position:absolute;inset:0;top:44px;background:var(--bg)}
|
|
142
|
-
|
|
143
|
-
/* top bar */
|
|
144
|
-
#topbar{
|
|
145
|
-
position:fixed;top:0;left:0;right:0;height:44px;z-index:30;
|
|
146
|
-
display:flex;align-items:center;gap:6px;padding:0 12px;
|
|
147
|
-
background:rgba(13,13,26,0.97);border-bottom:1px solid var(--border);
|
|
148
|
-
backdrop-filter:blur(10px);
|
|
149
|
-
}
|
|
150
|
-
#topbar-title{font-family:'Syne',sans-serif;font-size:11px;font-weight:700;letter-spacing:0.12em;color:var(--purple);white-space:nowrap;margin-right:4px}
|
|
151
|
-
#search{
|
|
152
|
-
flex:1;max-width:240px;height:26px;
|
|
153
|
-
background:rgba(255,255,255,0.05);border:1px solid var(--border);border-radius:3px;
|
|
154
|
-
padding:0 8px;font-size:11px;font-family:'Azeret Mono',monospace;color:var(--text);outline:none;
|
|
155
|
-
}
|
|
156
|
-
#search:focus{border-color:rgba(123,97,255,0.5);background:rgba(123,97,255,0.06)}
|
|
157
|
-
#search::placeholder{color:var(--dim)}
|
|
158
|
-
.tb-btn{
|
|
159
|
-
height:26px;padding:0 9px;border:1px solid var(--border);border-radius:3px;
|
|
160
|
-
background:var(--surface);font-size:9px;font-family:'Azeret Mono',monospace;
|
|
161
|
-
letter-spacing:0.08em;color:var(--muted);cursor:pointer;white-space:nowrap;transition:all 0.15s;
|
|
162
|
-
}
|
|
163
|
-
.tb-btn:hover{color:var(--text);border-color:rgba(255,255,255,0.2)}
|
|
164
|
-
.tb-btn.on{background:rgba(123,97,255,0.18);border-color:rgba(123,97,255,0.5);color:var(--purple)}
|
|
165
|
-
.tb-btn.teal.on{background:rgba(0,229,200,0.12);border-color:rgba(0,229,200,0.4);color:var(--teal)}
|
|
166
|
-
#stats{margin-left:auto;font-size:9px;color:var(--dim);white-space:nowrap;letter-spacing:0.05em}
|
|
167
|
-
#loading{
|
|
168
|
-
position:fixed;top:44px;left:0;right:0;bottom:0;z-index:25;
|
|
169
|
-
background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;
|
|
170
|
-
}
|
|
171
|
-
#loading-title{font-family:'Syne',sans-serif;font-size:13px;letter-spacing:0.12em;color:var(--purple)}
|
|
172
|
-
#prog-bar{width:200px;height:3px;background:rgba(255,255,255,0.07);border-radius:2px;overflow:hidden}
|
|
173
|
-
#prog-fill{height:100%;background:linear-gradient(90deg,var(--purple),var(--teal));width:0%;transition:width 0.3s}
|
|
174
|
-
#prog-label{font-size:10px;color:var(--muted)}
|
|
175
|
-
|
|
176
|
-
/* side panel */
|
|
177
|
-
#panel{
|
|
178
|
-
position:fixed;top:44px;right:0;bottom:0;z-index:20;width:200px;
|
|
179
|
-
background:rgba(10,10,20,0.97);border-left:1px solid var(--border);
|
|
180
|
-
padding:12px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;
|
|
181
|
-
transform:translateX(0);transition:transform 0.2s;
|
|
182
|
-
}
|
|
183
|
-
#panel.hidden{transform:translateX(200px)}
|
|
184
|
-
.ps-title{font-size:8px;letter-spacing:0.12em;color:var(--dim);text-transform:uppercase;margin-bottom:6px;font-weight:500}
|
|
185
|
-
.filter-row{display:flex;align-items:center;gap:6px;margin-bottom:3px;cursor:pointer}
|
|
186
|
-
.filter-row label{font-size:10px;color:var(--muted);cursor:pointer;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
187
|
-
.filter-row input{cursor:pointer;accent-color:var(--purple)}
|
|
188
|
-
.color-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
|
|
189
|
-
.slider-row{margin-bottom:6px}
|
|
190
|
-
.slider-row label{display:flex;justify-content:space-between;font-size:9px;color:var(--dim);margin-bottom:3px}
|
|
191
|
-
.slider-row label span{color:var(--muted)}
|
|
192
|
-
.slider-row input[type=range]{width:100%;accent-color:var(--purple);cursor:pointer}
|
|
193
|
-
.shape-legend{display:flex;flex-wrap:wrap;gap:6px}
|
|
194
|
-
.shape-item{font-size:9px;color:var(--dim);display:flex;align-items:center;gap:4px}
|
|
195
|
-
|
|
196
|
-
/* info card */
|
|
197
|
-
#infocard{
|
|
198
|
-
position:fixed;bottom:16px;left:16px;z-index:25;
|
|
199
|
-
background:rgba(10,10,20,0.97);border:1px solid var(--border);border-radius:4px;
|
|
200
|
-
padding:12px 14px;max-width:280px;min-width:200px;
|
|
201
|
-
box-shadow:0 8px 32px rgba(0,0,0,0.5);display:none;
|
|
202
|
-
}
|
|
203
|
-
#ic-close{float:right;cursor:pointer;color:var(--dim);font-size:14px;line-height:1}
|
|
204
|
-
#ic-close:hover{color:var(--text)}
|
|
205
|
-
#ic-type{font-size:8px;letter-spacing:0.12em;color:var(--purple);text-transform:uppercase;margin-bottom:4px}
|
|
206
|
-
#ic-name{font-family:'Syne',sans-serif;font-size:13px;font-weight:600;color:var(--text);margin-bottom:6px;word-break:break-all}
|
|
207
|
-
#ic-meta{font-size:10px;color:var(--muted);line-height:1.7}
|
|
208
|
-
#ic-meta a{color:var(--teal);text-decoration:none}
|
|
209
|
-
#ic-badge{
|
|
210
|
-
display:inline-block;margin-top:6px;padding:1px 6px;
|
|
211
|
-
border-radius:2px;font-size:9px;background:rgba(123,97,255,0.18);color:var(--purple);
|
|
212
|
-
letter-spacing:0.06em;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/* minimap hint */
|
|
216
|
-
#hint{position:fixed;bottom:12px;right:12px;z-index:15;font-size:9px;color:var(--dim);letter-spacing:0.06em;line-height:1.6;text-align:right}
|
|
217
|
-
|
|
218
|
-
/* scrollbar */
|
|
219
|
-
::-webkit-scrollbar{width:4px}
|
|
220
|
-
::-webkit-scrollbar-track{background:transparent}
|
|
221
|
-
::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.1);border-radius:2px}
|
|
222
|
-
<\/style>
|
|
223
|
-
<\/head>
|
|
224
|
-
<body>
|
|
225
|
-
|
|
226
|
-
<div id="topbar">
|
|
227
|
-
<div id="topbar-title">◈ MONOGRAPH</div>
|
|
228
|
-
<input id="search" type="text" placeholder="Search nodes…" oninput="onSearch(this.value)" autocomplete="off">
|
|
229
|
-
<button class="tb-btn" onclick="resetSearch()">RESET</button>
|
|
230
|
-
<button class="tb-btn on" id="physicsBtn" onclick="togglePhysics()">PHYSICS</button>
|
|
231
|
-
<button class="tb-btn" id="labelsBtn" onclick="toggleEdgeLabels()">EDGES</button>
|
|
232
|
-
<button class="tb-btn" id="hierBtn" onclick="toggleHierarchical()">TREE</button>
|
|
233
|
-
<button class="tb-btn teal on" id="panelBtn" onclick="togglePanel()">FILTERS</button>
|
|
234
|
-
<span id="stats">${visNodes.length.toLocaleString()} nodes · ${visEdges.length.toLocaleString()} edges</span>
|
|
235
|
-
</div>
|
|
236
|
-
|
|
237
|
-
<div id="loading">
|
|
238
|
-
<div id="loading-title">STABILIZING GRAPH…</div>
|
|
239
|
-
<div id="prog-bar"><div id="prog-fill"></div></div>
|
|
240
|
-
<div id="prog-label" id="prog-label">0%</div>
|
|
241
|
-
</div>
|
|
242
|
-
|
|
243
|
-
<div id="graph"></div>
|
|
244
|
-
|
|
245
|
-
<div id="panel">
|
|
246
|
-
<div>
|
|
247
|
-
<div class="ps-title">Node Types</div>
|
|
248
|
-
${nodeTypes.map(t => {
|
|
249
|
-
const sample = slicedNodes.find(n => n.label === t);
|
|
250
|
-
const color = sample ? COMMUNITY_COLORS[(sample.communityId ?? 0) % COMMUNITY_COLORS.length] : '#64748b';
|
|
251
|
-
return `<div class="filter-row" onclick="toggleType('${t}')">
|
|
252
|
-
<input type="checkbox" id="type_${t}" checked>
|
|
253
|
-
<div class="color-dot" style="background:${color}"></div>
|
|
254
|
-
<label for="type_${t}">${t}</label>
|
|
255
|
-
</div>`;
|
|
256
|
-
}).join('')}
|
|
257
|
-
</div>
|
|
258
|
-
<div>
|
|
259
|
-
<div class="ps-title">Relations</div>
|
|
260
|
-
${relationTypes.map(r => {
|
|
261
|
-
const color = RELATION_COLORS[r] ?? '#475569';
|
|
262
|
-
return `<div class="filter-row" onclick="toggleRelation('${r}')">
|
|
263
|
-
<input type="checkbox" id="rel_${r}" checked>
|
|
264
|
-
<div class="color-dot" style="background:${color};border-radius:0"></div>
|
|
265
|
-
<label for="rel_${r}" style="font-size:9px">${r}</label>
|
|
266
|
-
</div>`;
|
|
267
|
-
}).join('')}
|
|
268
|
-
</div>
|
|
269
|
-
<div>
|
|
270
|
-
<div class="ps-title">Physics</div>
|
|
271
|
-
<div class="slider-row">
|
|
272
|
-
<label>Spring length <span id="springVal">150</span></label>
|
|
273
|
-
<input type="range" min="40" max="500" value="150" oninput="setSpring(+this.value)">
|
|
274
|
-
</div>
|
|
275
|
-
<div class="slider-row">
|
|
276
|
-
<label>Gravity <span id="gravVal">2000</span></label>
|
|
277
|
-
<input type="range" min="100" max="10000" value="2000" oninput="setGravity(+this.value)">
|
|
278
|
-
</div>
|
|
279
|
-
<div class="slider-row">
|
|
280
|
-
<label>Damping <span id="dampVal">0.09</span></label>
|
|
281
|
-
<input type="range" min="1" max="50" value="9" oninput="setDamping(+this.value/100)">
|
|
282
|
-
</div>
|
|
283
|
-
<button class="tb-btn" style="width:100%;margin-top:4px" onclick="network.fit()">FIT VIEW</button>
|
|
284
|
-
<button class="tb-btn" style="width:100%;margin-top:4px" onclick="network.stabilize(100)">RE-STABILIZE</button>
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
|
|
288
|
-
<div id="infocard">
|
|
289
|
-
<span id="ic-close" onclick="closeInfoCard()">✕</span>
|
|
290
|
-
<div id="ic-type"></div>
|
|
291
|
-
<div id="ic-name"></div>
|
|
292
|
-
<div id="ic-meta"></div>
|
|
293
|
-
<div id="ic-badge"></div>
|
|
294
|
-
</div>
|
|
295
|
-
|
|
296
|
-
<div id="hint">Scroll: zoom · Drag: pan · Click: inspect · Ctrl+click: multi-select</div>
|
|
297
|
-
|
|
298
|
-
<script>
|
|
299
|
-
const ALL_NODES = ${JSON.stringify(visNodes)};
|
|
300
|
-
const ALL_EDGES = ${JSON.stringify(visEdges)};
|
|
301
|
-
const RELATION_COLORS = ${JSON.stringify(RELATION_COLORS)};
|
|
302
|
-
|
|
303
|
-
const nodesDS = new vis.DataSet(ALL_NODES);
|
|
304
|
-
const edgesDS = new vis.DataSet(ALL_EDGES);
|
|
305
|
-
const container = document.getElementById('graph');
|
|
306
|
-
|
|
307
|
-
const BASE_OPTIONS = {
|
|
308
|
-
physics: {
|
|
309
|
-
enabled: true,
|
|
310
|
-
barnesHut: {
|
|
311
|
-
gravitationalConstant: -2000,
|
|
312
|
-
centralGravity: 0.05,
|
|
313
|
-
springLength: 150,
|
|
314
|
-
springConstant: 0.04,
|
|
315
|
-
damping: 0.09,
|
|
316
|
-
avoidOverlap: 0.15,
|
|
317
|
-
},
|
|
318
|
-
stabilization: {
|
|
319
|
-
enabled: true,
|
|
320
|
-
iterations: 200,
|
|
321
|
-
updateInterval: 20,
|
|
322
|
-
fit: true,
|
|
323
|
-
},
|
|
324
|
-
minVelocity: 0.75,
|
|
325
|
-
},
|
|
326
|
-
interaction: {
|
|
327
|
-
hover: true,
|
|
328
|
-
tooltipDelay: 100,
|
|
329
|
-
navigationButtons: false,
|
|
330
|
-
keyboard: { enabled: true, bindToWindow: false },
|
|
331
|
-
multiselect: true,
|
|
332
|
-
zoomSpeed: 0.5,
|
|
333
|
-
},
|
|
334
|
-
edges: {
|
|
335
|
-
smooth: { enabled: true, type: 'dynamic', roundness: 0.3 },
|
|
336
|
-
selectionWidth: 2,
|
|
337
|
-
hoverWidth: 2,
|
|
338
|
-
},
|
|
339
|
-
nodes: {
|
|
340
|
-
borderWidth: 1.5,
|
|
341
|
-
borderWidthSelected: 3,
|
|
342
|
-
chosen: true,
|
|
343
|
-
},
|
|
344
|
-
rendering: {
|
|
345
|
-
hideEdgesOnDrag: true,
|
|
346
|
-
hideNodesOnDrag: false,
|
|
347
|
-
},
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
let network = new vis.Network(container, { nodes: nodesDS, edges: edgesDS }, BASE_OPTIONS);
|
|
351
|
-
|
|
352
|
-
function attachNetworkEvents() {
|
|
353
|
-
network.on('stabilizationProgress', p => {
|
|
354
|
-
const pct = Math.round(p.iterations / p.total * 100);
|
|
355
|
-
document.getElementById('prog-fill').style.width = pct + '%';
|
|
356
|
-
document.getElementById('prog-label').textContent = pct + '%';
|
|
357
|
-
});
|
|
358
|
-
network.on('stabilizationIterationsDone', () => {
|
|
359
|
-
document.getElementById('loading').style.display = 'none';
|
|
360
|
-
network.fit({ animation: { duration: 800, easingFunction: 'easeInOutQuad' } });
|
|
361
|
-
});
|
|
362
|
-
network.on('click', params => {
|
|
363
|
-
if (params.nodes.length > 0) {
|
|
364
|
-
highlightNeighbors(params.nodes[0]);
|
|
365
|
-
showInfoCard(params.nodes[0]);
|
|
366
|
-
} else if (!params.ctrlKey && params.edges.length === 0) {
|
|
367
|
-
resetHighlight();
|
|
368
|
-
closeInfoCard();
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
network.on('doubleClick', params => {
|
|
372
|
-
if (params.nodes.length > 0) {
|
|
373
|
-
network.focus(params.nodes[0], { scale: 1.4, animation: { duration: 500, easingFunction: 'easeInOutQuad' } });
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
attachNetworkEvents();
|
|
379
|
-
|
|
380
|
-
function highlightNeighbors(nodeId) {
|
|
381
|
-
const connectedEdges = new Set(network.getConnectedEdges(nodeId));
|
|
382
|
-
const connectedNodes = new Set(network.getConnectedNodes(nodeId));
|
|
383
|
-
connectedNodes.add(nodeId);
|
|
384
|
-
nodesDS.update(ALL_NODES.map(n => ({ id: n.id, opacity: connectedNodes.has(n.id) ? 1 : 0.08 })));
|
|
385
|
-
edgesDS.update(ALL_EDGES.map(e => ({ id: e.id, opacity: connectedEdges.has(e.id) ? 0.9 : 0.03 })));
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
function resetHighlight() {
|
|
389
|
-
nodesDS.update(ALL_NODES.map(n => ({ id: n.id, opacity: 1 })));
|
|
390
|
-
edgesDS.update(ALL_EDGES.map(e => ({ id: e.id, opacity: 0.6 })));
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
function escHtml(s) {
|
|
394
|
-
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
function showInfoCard(nodeId) {
|
|
398
|
-
const node = ALL_NODES.find(n => n.id === nodeId);
|
|
399
|
-
if (!node) return;
|
|
400
|
-
const neighbors = network.getConnectedNodes(nodeId);
|
|
401
|
-
document.getElementById('ic-type').textContent = node._nodeType || '';
|
|
402
|
-
document.getElementById('ic-name').textContent = node._fullName || node.label;
|
|
403
|
-
const fp = node._filePath ? escHtml(node._filePath) : '';
|
|
404
|
-
const fpShort = node._filePath ? escHtml(node._filePath.split('/').pop()) : '';
|
|
405
|
-
document.getElementById('ic-meta').innerHTML =
|
|
406
|
-
(fp ? '<span style="color:#00E5C8">' + fpShort + '</span><br>' +
|
|
407
|
-
'<span style="color:#475569;font-size:9px">' + fp + '</span><br>' : '') +
|
|
408
|
-
'<b style="color:#7B61FF">' + neighbors.length + '</b> connections';
|
|
409
|
-
document.getElementById('ic-badge').textContent = node._deg + ' degree';
|
|
410
|
-
document.getElementById('infocard').style.display = 'block';
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
function closeInfoCard() {
|
|
414
|
-
document.getElementById('infocard').style.display = 'none';
|
|
415
|
-
resetHighlight();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// Search: highlight matches, dim others
|
|
419
|
-
let searchActive = false;
|
|
420
|
-
function onSearch(q) {
|
|
421
|
-
searchActive = !!q;
|
|
422
|
-
const lq = q.toLowerCase();
|
|
423
|
-
if (!q) { resetHighlight(); return; }
|
|
424
|
-
const matchIds = new Set(ALL_NODES.filter(n => (n._fullName || n.label).toLowerCase().includes(lq) || (n._filePath && n._filePath.toLowerCase().includes(lq))).map(n => n.id));
|
|
425
|
-
nodesDS.update(ALL_NODES.map(n => ({ id: n.id, opacity: matchIds.has(n.id) ? 1 : 0.06 })));
|
|
426
|
-
edgesDS.update(ALL_EDGES.map(e => ({ id: e.id, opacity: matchIds.has(e.from) && matchIds.has(e.to) ? 0.7 : 0.03 })));
|
|
427
|
-
// Focus on first match
|
|
428
|
-
if (matchIds.size > 0 && matchIds.size < 20) {
|
|
429
|
-
network.fit({ nodes: [...matchIds], animation: true });
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
function resetSearch() {
|
|
434
|
-
document.getElementById('search').value = '';
|
|
435
|
-
searchActive = false;
|
|
436
|
-
resetHighlight();
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// Edge labels toggle
|
|
440
|
-
let edgeLabelsOn = false;
|
|
441
|
-
function toggleEdgeLabels() {
|
|
442
|
-
edgeLabelsOn = !edgeLabelsOn;
|
|
443
|
-
edgesDS.update(ALL_EDGES.map(e => ({ id: e.id, label: edgeLabelsOn ? e._label : '' })));
|
|
444
|
-
document.getElementById('labelsBtn').classList.toggle('on', edgeLabelsOn);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
// Physics toggle
|
|
448
|
-
let physicsOn = true;
|
|
449
|
-
function togglePhysics() {
|
|
450
|
-
physicsOn = !physicsOn;
|
|
451
|
-
network.setOptions({ physics: { enabled: physicsOn } });
|
|
452
|
-
document.getElementById('physicsBtn').classList.toggle('on', physicsOn);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// Hierarchical toggle
|
|
456
|
-
let hierOn = false;
|
|
457
|
-
function toggleHierarchical() {
|
|
458
|
-
hierOn = !hierOn;
|
|
459
|
-
// vis-network requires full re-init when switching hierarchical layout
|
|
460
|
-
const container = document.getElementById('graph');
|
|
461
|
-
if (hierOn) {
|
|
462
|
-
network.destroy();
|
|
463
|
-
network = new vis.Network(container, { nodes: nodesDS, edges: edgesDS }, {
|
|
464
|
-
...BASE_OPTIONS,
|
|
465
|
-
layout: { hierarchical: { enabled: true, direction: 'UD', sortMethod: 'directed', levelSeparation: 150, nodeSpacing: 140, treeSpacing: 200 } },
|
|
466
|
-
physics: { enabled: false },
|
|
467
|
-
});
|
|
468
|
-
attachNetworkEvents();
|
|
469
|
-
setTimeout(() => network.fit(), 100);
|
|
470
|
-
} else {
|
|
471
|
-
network.destroy();
|
|
472
|
-
network = new vis.Network(container, { nodes: nodesDS, edges: edgesDS }, BASE_OPTIONS);
|
|
473
|
-
attachNetworkEvents();
|
|
474
|
-
}
|
|
475
|
-
document.getElementById('hierBtn').classList.toggle('on', hierOn);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
// Panel toggle
|
|
479
|
-
function togglePanel() {
|
|
480
|
-
document.getElementById('panel').classList.toggle('hidden');
|
|
481
|
-
document.getElementById('panelBtn').classList.toggle('on', !document.getElementById('panel').classList.contains('hidden'));
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// Node type filter
|
|
485
|
-
function toggleType(type) {
|
|
486
|
-
const cb = document.getElementById('type_' + type);
|
|
487
|
-
cb.checked = !cb.checked;
|
|
488
|
-
applyFilters();
|
|
489
|
-
}
|
|
490
|
-
function applyFilters() {
|
|
491
|
-
const enabledTypes = new Set();
|
|
492
|
-
document.querySelectorAll('[id^="type_"]').forEach(cb => { if (cb.checked) enabledTypes.add(cb.id.replace('type_', '')); });
|
|
493
|
-
const enabledRels = new Set();
|
|
494
|
-
document.querySelectorAll('[id^="rel_"]').forEach(cb => { if (cb.checked) enabledRels.add(cb.id.replace('rel_', '')); });
|
|
495
|
-
const hiddenNodeIds = new Set(ALL_NODES.filter(n => !enabledTypes.has(n._nodeType)).map(n => n.id));
|
|
496
|
-
nodesDS.update(ALL_NODES.map(n => ({ id: n.id, hidden: hiddenNodeIds.has(n.id) })));
|
|
497
|
-
edgesDS.update(ALL_EDGES.map(e => ({
|
|
498
|
-
id: e.id,
|
|
499
|
-
hidden: hiddenNodeIds.has(e.from) || hiddenNodeIds.has(e.to) || !enabledRels.has(e._label),
|
|
500
|
-
})));
|
|
501
|
-
}
|
|
502
|
-
function toggleRelation(rel) {
|
|
503
|
-
const cb = document.getElementById('rel_' + rel);
|
|
504
|
-
cb.checked = !cb.checked;
|
|
505
|
-
applyFilters();
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// Physics sliders
|
|
509
|
-
function setSpring(v) { document.getElementById('springVal').textContent = v; network.setOptions({ physics: { barnesHut: { springLength: v } } }); }
|
|
510
|
-
function setGravity(v) { document.getElementById('gravVal').textContent = v; network.setOptions({ physics: { barnesHut: { gravitationalConstant: -v } } }); }
|
|
511
|
-
function setDamping(v) { document.getElementById('dampVal').textContent = v.toFixed(2); network.setOptions({ physics: { barnesHut: { damping: v } } }); }
|
|
512
|
-
|
|
513
|
-
// Keyboard shortcuts
|
|
514
|
-
document.addEventListener('keydown', e => {
|
|
515
|
-
if (e.key === 'Escape') { closeInfoCard(); resetSearch(); document.getElementById('search').value = ''; }
|
|
516
|
-
if (e.key === 'f' && e.ctrlKey) { e.preventDefault(); document.getElementById('search').focus(); }
|
|
517
|
-
if (e.key === 'F' && !e.ctrlKey) network.fit({ animation: true });
|
|
518
|
-
if (e.key === 'p') togglePhysics();
|
|
519
|
-
});
|
|
520
|
-
<\/script>
|
|
521
|
-
<\/body>
|
|
522
|
-
<\/html>`;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
function lighten(hex: string): string {
|
|
526
|
-
const n = parseInt(hex.slice(1), 16);
|
|
527
|
-
const r = Math.min(255, ((n >> 16) & 0xff) + 40);
|
|
528
|
-
const g = Math.min(255, ((n >> 8) & 0xff) + 40);
|
|
529
|
-
const b = Math.min(255, (n & 0xff) + 40);
|
|
530
|
-
return '#' + [r, g, b].map(v => v.toString(16).padStart(2, '0')).join('');
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
function esc(s: string): string {
|
|
534
|
-
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function buildTooltip(n: MonographNode, deg: number): string {
|
|
538
|
-
const props = n.properties as Record<string, unknown> | undefined;
|
|
539
|
-
return [
|
|
540
|
-
`<div style="font-family:monospace;font-size:11px;background:#0d0d1a;color:#e2e8f0;padding:8px 10px;border-radius:4px;border:1px solid rgba(255,255,255,0.1);max-width:260px;">`,
|
|
541
|
-
`<b style="color:#7B61FF">${esc(n.name)}</b>`,
|
|
542
|
-
`<br><span style="color:#64748b">${esc(n.label)}</span>`,
|
|
543
|
-
n.filePath ? `<br><span style="color:#00E5C8;font-size:10px">${esc(n.filePath)}</span>` : '',
|
|
544
|
-
`<br><span style="color:#94a3b8">degree: ${deg}</span>`,
|
|
545
|
-
props?.importance ? `<br><span style="color:#f59e0b">${'★'.repeat(props.importance as number)}${'☆'.repeat(5 - (props.importance as number))}</span>` : '',
|
|
546
|
-
`</div>`,
|
|
547
|
-
].filter(Boolean).join('');
|
|
548
|
-
}
|
package/src/export/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { toJson } from './json.js';
|
|
2
|
-
export { toCypher } from './cypher.js';
|
|
3
|
-
export { toHtml } from './html.js';
|
|
4
|
-
export { toMermaid } from './mermaid.js';
|
|
5
|
-
export { toObsidian } from './obsidian.js';
|
|
6
|
-
export { toCanvas } from './canvas.js';
|
|
7
|
-
export { toGraphml } from './graphml.js';
|
|
8
|
-
export { toSvg } from './svg.js';
|
|
9
|
-
export * from './csv.js';
|
package/src/export/json.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { MonographNode, MonographEdge } from '../types.js';
|
|
2
|
-
|
|
3
|
-
export function toJson(nodes: MonographNode[], edges: MonographEdge[]): string {
|
|
4
|
-
return JSON.stringify(
|
|
5
|
-
{
|
|
6
|
-
nodes: nodes.map(n => ({
|
|
7
|
-
id: n.id,
|
|
8
|
-
label: n.label,
|
|
9
|
-
name: n.name,
|
|
10
|
-
norm_label: n.normLabel,
|
|
11
|
-
source_file: n.filePath ?? null,
|
|
12
|
-
start_line: n.startLine ?? null,
|
|
13
|
-
end_line: n.endLine ?? null,
|
|
14
|
-
community: n.communityId ?? null,
|
|
15
|
-
is_exported: n.isExported,
|
|
16
|
-
language: n.language ?? null,
|
|
17
|
-
properties: n.properties ?? null,
|
|
18
|
-
})),
|
|
19
|
-
edges: edges.map(e => ({
|
|
20
|
-
id: e.id,
|
|
21
|
-
source: e.sourceId,
|
|
22
|
-
target: e.targetId,
|
|
23
|
-
relation: e.relation,
|
|
24
|
-
confidence: e.confidence,
|
|
25
|
-
confidence_score: e.confidenceScore,
|
|
26
|
-
})),
|
|
27
|
-
links: edges.map(e => ({
|
|
28
|
-
source: e.sourceId,
|
|
29
|
-
target: e.targetId,
|
|
30
|
-
relation: e.relation,
|
|
31
|
-
})),
|
|
32
|
-
},
|
|
33
|
-
null,
|
|
34
|
-
2
|
|
35
|
-
);
|
|
36
|
-
}
|