projscan 4.7.0 → 4.8.0
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 +22 -22
- package/dist/cli/commands/start.js +5 -28
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/startOptionsRegistration.d.ts +2 -0
- package/dist/cli/commands/startOptionsRegistration.js +29 -0
- package/dist/cli/commands/startOptionsRegistration.js.map +1 -0
- package/dist/core/ast.d.ts +2 -17
- package/dist/core/ast.js +4 -33
- package/dist/core/ast.js.map +1 -1
- package/dist/core/astResult.d.ts +20 -0
- package/dist/core/astResult.js +39 -0
- package/dist/core/astResult.js.map +1 -0
- package/dist/core/codeGraph.d.ts +1 -16
- package/dist/core/codeGraph.js +4 -89
- package/dist/core/codeGraph.js.map +1 -1
- package/dist/core/codeGraphAdapterContexts.d.ts +8 -0
- package/dist/core/codeGraphAdapterContexts.js +14 -0
- package/dist/core/codeGraphAdapterContexts.js.map +1 -0
- package/dist/core/codeGraphIncremental.d.ts +17 -0
- package/dist/core/codeGraphIncremental.js +64 -0
- package/dist/core/codeGraphIncremental.js.map +1 -0
- package/dist/core/collisionDetector.d.ts +1 -0
- package/dist/core/collisionDetector.js +3 -0
- package/dist/core/collisionDetector.js.map +1 -1
- package/dist/core/coordination.js +23 -5
- package/dist/core/coordination.js.map +1 -1
- package/dist/core/coordinationEvidence.d.ts +1 -0
- package/dist/core/coordinationEvidence.js.map +1 -1
- package/dist/core/frameworkExpressSources.js +6 -31
- package/dist/core/frameworkExpressSources.js.map +1 -1
- package/dist/core/frameworkFastifySources.js +5 -22
- package/dist/core/frameworkFastifySources.js.map +1 -1
- package/dist/core/frameworkHonoSources.js +5 -24
- package/dist/core/frameworkHonoSources.js.map +1 -1
- package/dist/core/frameworkKoaSources.js +5 -24
- package/dist/core/frameworkKoaSources.js.map +1 -1
- package/dist/core/frameworkSourceContext.d.ts +15 -0
- package/dist/core/frameworkSourceContext.js +2 -0
- package/dist/core/frameworkSourceContext.js.map +1 -0
- package/dist/core/frameworkSourceMatching.d.ts +6 -0
- package/dist/core/frameworkSourceMatching.js +29 -0
- package/dist/core/frameworkSourceMatching.js.map +1 -0
- package/dist/core/frameworkSourceResolvers.d.ts +2 -0
- package/dist/core/frameworkSourceResolvers.js +45 -0
- package/dist/core/frameworkSourceResolvers.js.map +1 -0
- package/dist/core/frameworkSources.d.ts +2 -14
- package/dist/core/frameworkSources.js +9 -38
- package/dist/core/frameworkSources.js.map +1 -1
- package/dist/core/frameworkSvelteKitSources.d.ts +2 -0
- package/dist/core/frameworkSvelteKitSources.js +118 -0
- package/dist/core/frameworkSvelteKitSources.js.map +1 -0
- package/dist/core/intentRouter.d.ts +1 -1
- package/dist/core/intentRouter.js +2 -8
- package/dist/core/intentRouter.js.map +1 -1
- package/dist/core/intentRouterCatalog.js +32 -0
- package/dist/core/intentRouterCatalog.js.map +1 -1
- package/dist/core/intentRouterKeywordToolGuards.js +5 -0
- package/dist/core/intentRouterKeywordToolGuards.js.map +1 -1
- package/dist/core/intentRouterKeywordWeights.js +23 -0
- package/dist/core/intentRouterKeywordWeights.js.map +1 -1
- package/dist/core/intentRouterReleaseSignals.js +3 -18
- package/dist/core/intentRouterReleaseSignals.js.map +1 -1
- package/dist/core/intentRouterResolution.d.ts +3 -0
- package/dist/core/intentRouterResolution.js +11 -0
- package/dist/core/intentRouterResolution.js.map +1 -0
- package/dist/core/languages/pythonManifests.js +6 -19
- package/dist/core/languages/pythonManifests.js.map +1 -1
- package/dist/core/languages/pythonPep508.js +1 -1
- package/dist/core/languages/pythonPep508.js.map +1 -1
- package/dist/core/languages/pythonProjectEvidence.js +4 -4
- package/dist/core/languages/pythonProjectEvidence.js.map +1 -1
- package/dist/core/languages/pythonPyproject.js +1 -1
- package/dist/core/languages/pythonPyproject.js.map +1 -1
- package/dist/core/languages/pythonPyprojectEvidence.d.ts +7 -0
- package/dist/core/languages/pythonPyprojectEvidence.js +23 -0
- package/dist/core/languages/pythonPyprojectEvidence.js.map +1 -0
- package/dist/core/languages/pythonRequirements.d.ts +2 -0
- package/dist/core/languages/pythonRequirements.js +74 -9
- package/dist/core/languages/pythonRequirements.js.map +1 -1
- package/dist/core/pluginAnalyzerLoading.d.ts +3 -0
- package/dist/core/pluginAnalyzerLoading.js +55 -0
- package/dist/core/pluginAnalyzerLoading.js.map +1 -0
- package/dist/core/pluginAnalyzerRunning.d.ts +10 -0
- package/dist/core/pluginAnalyzerRunning.js +32 -0
- package/dist/core/pluginAnalyzerRunning.js.map +1 -0
- package/dist/core/pluginIssueValidation.d.ts +2 -0
- package/dist/core/pluginIssueValidation.js +22 -0
- package/dist/core/pluginIssueValidation.js.map +1 -0
- package/dist/core/pluginManifestDiscovery.d.ts +25 -0
- package/dist/core/pluginManifestDiscovery.js +80 -0
- package/dist/core/pluginManifestDiscovery.js.map +1 -0
- package/dist/core/pluginModuleLoading.d.ts +8 -0
- package/dist/core/pluginModuleLoading.js +91 -0
- package/dist/core/pluginModuleLoading.js.map +1 -0
- package/dist/core/pluginReporterLoading.d.ts +41 -0
- package/dist/core/pluginReporterLoading.js +105 -0
- package/dist/core/pluginReporterLoading.js.map +1 -0
- package/dist/core/pluginRuntimeTypes.d.ts +20 -0
- package/dist/core/pluginRuntimeTypes.js +2 -0
- package/dist/core/pluginRuntimeTypes.js.map +1 -0
- package/dist/core/plugins.d.ts +9 -86
- package/dist/core/plugins.js +12 -350
- package/dist/core/plugins.js.map +1 -1
- package/dist/core/preflight.d.ts +1 -2
- package/dist/core/preflight.js +4 -91
- package/dist/core/preflight.js.map +1 -1
- package/dist/core/preflightEvidence.js +11 -0
- package/dist/core/preflightEvidence.js.map +1 -1
- package/dist/core/preflightInputs.d.ts +1 -0
- package/dist/core/preflightInputs.js.map +1 -1
- package/dist/core/preflightReasons.d.ts +21 -0
- package/dist/core/preflightReasons.js +28 -0
- package/dist/core/preflightReasons.js.map +1 -0
- package/dist/core/preflightReport.d.ts +9 -0
- package/dist/core/preflightReport.js +67 -0
- package/dist/core/preflightReport.js.map +1 -0
- package/dist/core/review.js +2 -47
- package/dist/core/review.js.map +1 -1
- package/dist/core/reviewChangedReport.d.ts +13 -0
- package/dist/core/reviewChangedReport.js +38 -0
- package/dist/core/reviewChangedReport.js.map +1 -0
- package/dist/core/reviewComputation.d.ts +9 -0
- package/dist/core/reviewComputation.js +14 -0
- package/dist/core/reviewComputation.js.map +1 -0
- package/dist/core/reviewContractChanges.js +22 -8
- package/dist/core/reviewContractChanges.js.map +1 -1
- package/dist/core/reviewDataflow.js +18 -0
- package/dist/core/reviewDataflow.js.map +1 -1
- package/dist/core/roadmapCatalog.js +7 -203
- package/dist/core/roadmapCatalog.js.map +1 -1
- package/dist/core/roadmapCatalogPost44.d.ts +2 -0
- package/dist/core/roadmapCatalogPost44.js +205 -0
- package/dist/core/roadmapCatalogPost44.js.map +1 -0
- package/dist/core/roadmapCatalogTypes.d.ts +6 -0
- package/dist/core/roadmapCatalogTypes.js +2 -0
- package/dist/core/roadmapCatalogTypes.js.map +1 -0
- package/dist/core/startClaimRouteCriteria.d.ts +7 -0
- package/dist/core/startClaimRouteCriteria.js +16 -0
- package/dist/core/startClaimRouteCriteria.js.map +1 -0
- package/dist/core/startCouplingRouteCriteria.d.ts +2 -0
- package/dist/core/startCouplingRouteCriteria.js +13 -0
- package/dist/core/startCouplingRouteCriteria.js.map +1 -0
- package/dist/core/startDependencyRouteCriteria.d.ts +2 -0
- package/dist/core/startDependencyRouteCriteria.js +43 -0
- package/dist/core/startDependencyRouteCriteria.js.map +1 -0
- package/dist/core/startFileRouteCriteria.d.ts +2 -0
- package/dist/core/startFileRouteCriteria.js +56 -0
- package/dist/core/startFileRouteCriteria.js.map +1 -0
- package/dist/core/startFixedRouteCriteria.d.ts +1 -0
- package/dist/core/startFixedRouteCriteria.js +90 -0
- package/dist/core/startFixedRouteCriteria.js.map +1 -0
- package/dist/core/startImpactRouteCriteria.d.ts +7 -0
- package/dist/core/startImpactRouteCriteria.js +14 -0
- package/dist/core/startImpactRouteCriteria.js.map +1 -0
- package/dist/core/startIntentTargets.d.ts +1 -0
- package/dist/core/startIntentTargets.js +28 -0
- package/dist/core/startIntentTargets.js.map +1 -1
- package/dist/core/startMissionControl.js +8 -2
- package/dist/core/startMissionControl.js.map +1 -1
- package/dist/core/startMissionPolicy.js +2 -0
- package/dist/core/startMissionPolicy.js.map +1 -1
- package/dist/core/startMode.d.ts +1 -0
- package/dist/core/startMode.js +10 -2
- package/dist/core/startMode.js.map +1 -1
- package/dist/core/startPreflightRouteCriteria.d.ts +11 -0
- package/dist/core/startPreflightRouteCriteria.js +29 -0
- package/dist/core/startPreflightRouteCriteria.js.map +1 -0
- package/dist/core/startProductPlanningRouteCriteria.d.ts +8 -0
- package/dist/core/startProductPlanningRouteCriteria.js +29 -0
- package/dist/core/startProductPlanningRouteCriteria.js.map +1 -0
- package/dist/core/startRegressionRouteCriteria.d.ts +3 -0
- package/dist/core/startRegressionRouteCriteria.js +62 -0
- package/dist/core/startRegressionRouteCriteria.js.map +1 -0
- package/dist/core/startRouteActions.js +39 -1
- package/dist/core/startRouteActions.js.map +1 -1
- package/dist/core/startSuccessCriteria.d.ts +2 -3
- package/dist/core/startSuccessCriteria.js +15 -419
- package/dist/core/startSuccessCriteria.js.map +1 -1
- package/dist/core/startUnderstandRouteCriteria.d.ts +3 -0
- package/dist/core/startUnderstandRouteCriteria.js +97 -0
- package/dist/core/startUnderstandRouteCriteria.js.map +1 -0
- package/dist/core/telemetry.d.ts +9 -89
- package/dist/core/telemetry.js +33 -391
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/telemetryConfig.d.ts +58 -0
- package/dist/core/telemetryConfig.js +171 -0
- package/dist/core/telemetryConfig.js.map +1 -0
- package/dist/core/telemetryEvents.d.ts +57 -0
- package/dist/core/telemetryEvents.js +143 -0
- package/dist/core/telemetryEvents.js.map +1 -0
- package/dist/core/telemetryFlushing.d.ts +10 -0
- package/dist/core/telemetryFlushing.js +42 -0
- package/dist/core/telemetryFlushing.js.map +1 -0
- package/dist/core/telemetryRecording.d.ts +26 -0
- package/dist/core/telemetryRecording.js +38 -0
- package/dist/core/telemetryRecording.js.map +1 -0
- package/dist/core/telemetrySender.d.ts +9 -0
- package/dist/core/telemetrySender.js +22 -0
- package/dist/core/telemetrySender.js.map +1 -0
- package/dist/index.d.ts +4 -60
- package/dist/index.js +4 -60
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +2 -13
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/serverMessageHandling.d.ts +3 -0
- package/dist/mcp/serverMessageHandling.js +16 -0
- package/dist/mcp/serverMessageHandling.js.map +1 -0
- package/dist/mcp/toolDefinitions.d.ts +3 -0
- package/dist/mcp/toolDefinitions.js +15 -0
- package/dist/mcp/toolDefinitions.js.map +1 -0
- package/dist/mcp/tools.js +2 -12
- package/dist/mcp/tools.js.map +1 -1
- package/dist/projscan-sbom.cdx.json +6 -6
- package/dist/publicAgent.d.ts +22 -0
- package/dist/publicAgent.js +23 -0
- package/dist/publicAgent.js.map +1 -0
- package/dist/publicCore.d.ts +29 -0
- package/dist/publicCore.js +30 -0
- package/dist/publicCore.js.map +1 -0
- package/dist/publicLanguages.d.ts +1 -0
- package/dist/publicLanguages.js +2 -0
- package/dist/publicLanguages.js.map +1 -0
- package/dist/publicMcp.d.ts +8 -0
- package/dist/publicMcp.js +9 -0
- package/dist/publicMcp.js.map +1 -0
- package/dist/reporters/htmlAnalysisReporter.d.ts +3 -0
- package/dist/reporters/htmlAnalysisReporter.js +98 -0
- package/dist/reporters/htmlAnalysisReporter.js.map +1 -0
- package/dist/reporters/htmlCoverageReporter.d.ts +2 -0
- package/dist/reporters/htmlCoverageReporter.js +52 -0
- package/dist/reporters/htmlCoverageReporter.js.map +1 -0
- package/dist/reporters/htmlImpactReporter.d.ts +2 -0
- package/dist/reporters/htmlImpactReporter.js +41 -0
- package/dist/reporters/htmlImpactReporter.js.map +1 -0
- package/dist/reporters/htmlPrDiffReporter.d.ts +2 -0
- package/dist/reporters/htmlPrDiffReporter.js +84 -0
- package/dist/reporters/htmlPrDiffReporter.js.map +1 -0
- package/dist/reporters/htmlReporter.d.ts +20 -9
- package/dist/reporters/htmlReporter.js +7 -365
- package/dist/reporters/htmlReporter.js.map +1 -1
- package/dist/reporters/htmlReviewReporter.d.ts +2 -0
- package/dist/reporters/htmlReviewReporter.js +94 -0
- package/dist/reporters/htmlReviewReporter.js.map +1 -0
- package/dist/reporters/htmlShared.d.ts +7 -0
- package/dist/reporters/htmlShared.js +106 -0
- package/dist/reporters/htmlShared.js.map +1 -0
- package/dist/tool-manifest.json +2 -2
- package/dist/types/preflight.d.ts +19 -0
- package/dist/types/start.d.ts +7 -451
- package/dist/types/startCommon.d.ts +79 -0
- package/dist/types/startCommon.js +2 -0
- package/dist/types/startCommon.js.map +1 -0
- package/dist/types/startExecution.d.ts +44 -0
- package/dist/types/startExecution.js +2 -0
- package/dist/types/startExecution.js.map +1 -0
- package/dist/types/startMissionControl.d.ts +91 -0
- package/dist/types/startMissionControl.js +2 -0
- package/dist/types/startMissionControl.js.map +1 -0
- package/dist/types/startMissionProof.d.ts +91 -0
- package/dist/types/startMissionProof.js +2 -0
- package/dist/types/startMissionProof.js.map +1 -0
- package/dist/types/startMissionResume.d.ts +100 -0
- package/dist/types/startMissionResume.js +2 -0
- package/dist/types/startMissionResume.js.map +1 -0
- package/dist/types/startMissionReview.d.ts +45 -0
- package/dist/types/startMissionReview.js +2 -0
- package/dist/types/startMissionReview.js.map +1 -0
- package/dist/types/startMissionTooling.d.ts +16 -0
- package/dist/types/startMissionTooling.js +2 -0
- package/dist/types/startMissionTooling.js.map +1 -0
- package/dist/utils/changedFiles.d.ts +1 -0
- package/dist/utils/changedFiles.js +7 -4
- package/dist/utils/changedFiles.js.map +1 -1
- package/docs/GUIDE.md +9 -7
- package/docs/ROADMAP.md +2 -2
- package/docs/examples/adoption-workflows.md +12 -1
- package/docs/examples/swarm-coordination.md +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,29 +35,29 @@ npx projscan
|
|
|
35
35
|
|
|
36
36
|
<img src="docs/projscan-mission-control.gif" alt="projscan Mission Control turning a plain-language goal into shortcut commands, proof commands, and review gates" width="760">
|
|
37
37
|
|
|
38
|
-
## What's New in 4.
|
|
38
|
+
## What's New in 4.8.0
|
|
39
39
|
|
|
40
|
-
4.
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
4.8.0 turns the post-4.7 agent-research loop into release-ready hardening:
|
|
41
|
+
SvelteKit dataflow precision, safer continuation routing, clearer coordination
|
|
42
|
+
handoffs, sharper Python dependency evidence, and smaller internal modules.
|
|
43
43
|
|
|
44
|
-
- **
|
|
45
|
-
request body readers, headers, URL,
|
|
44
|
+
- **SvelteKit dataflow coverage.** `RequestEvent` handlers and hooks now
|
|
45
|
+
classify request body readers, headers, URL, params, and cookies through
|
|
46
46
|
framework-gated source patterns.
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- **
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
- **No-release continuation routing.** Autonomous improvement prompts now route
|
|
48
|
+
to bounded workplans while release, publish, deploy, push, merge, and
|
|
49
|
+
version-bump actions stay blocked unless a release task is active.
|
|
50
|
+
- **Scoped evidence prompts.** Shareable redacted evidence requests can infer
|
|
51
|
+
top-level directory scopes such as `tests` and produce concrete local
|
|
52
|
+
analyze/doctor/CI commands.
|
|
53
|
+
- **Coordination handoffs.** Agent briefs now carry clearer merge-order hints
|
|
54
|
+
and preflight coordination proof paths for parallel-agent work.
|
|
55
|
+
- **Python dependency evidence.** Upgrade previews handle numeric-looking
|
|
56
|
+
package names, Poetry dependency source lines, nested requirements, and nested
|
|
57
|
+
constraints more reliably.
|
|
58
|
+
- **Maintainability cleanup.** Mission Control route criteria, public start
|
|
59
|
+
types, plugin loading, telemetry helpers, preflight/report assembly, code
|
|
60
|
+
graph indexing, and HTML reporters have been split into focused modules.
|
|
61
61
|
|
|
62
62
|
<img src="docs/projscan-proof-router.png" alt="projscan intent router and proof workflow showing impact routing, setup discovery, dependency intelligence, and stable-surface guardrails" width="760">
|
|
63
63
|
|
|
@@ -500,7 +500,7 @@ projscan start --intent "what should an intern work on?" # Routes to bug-hunt pr
|
|
|
500
500
|
projscan start --intent "what is a low risk improvement?" # Routes to bug-hunt prioritization
|
|
501
501
|
projscan start --intent "pick a small safe task" # Routes to bug-hunt prioritization
|
|
502
502
|
projscan start --intent "what should I do next?" # Routes to an ordered before-edit workplan
|
|
503
|
-
projscan start --intent "what should we build next?" # Routes to
|
|
503
|
+
projscan start --intent "what should we build next?" # Routes to a before-edit implementation workplan
|
|
504
504
|
projscan start --intent "explain issue missing-test-framework" # Routes to deep issue context
|
|
505
505
|
projscan start --intent "fix issue missing-test-framework" # Routes to a concrete fix suggestion
|
|
506
506
|
projscan start --intent "is user input reaching SQL sinks?" # Routes to hardening dataflow analysis
|
|
@@ -1347,7 +1347,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
|
|
|
1347
1347
|
- **`projscan_start`** _(3.0.4)_ - first-60-seconds repo orientation. Composes setup diagnostics, `firstTenMinutes`, workflow recipes, workplan, quality scorecard, top risks, adoption gaps, next commands, and optional handoff payload.
|
|
1348
1348
|
- **`projscan_understand`** _(3.4)_ - cited repo-comprehension report with `map`, `flow`, `contracts`, `change`, and `verify` views, read-first files, unknowns, change readiness, verification tiers, and exact next commands.
|
|
1349
1349
|
- **`projscan_semantic_graph`** _(3.0; query mode 4.0)_ - the code graph, two ways. With no `query`: the stable v3 semantic graph contract (file, function, package, and symbol nodes plus `defines`, `imports`, `imports_package`, `exports`, and `calls` edges). With `query: { direction, file?, symbol? }`: one cheap targeted lookup — `imports`, `exports`, `importers`, `symbol_defs`, `package_importers` — with millisecond responses on a warm cache. (Subsumes the former `projscan_graph`, removed in 4.0.)
|
|
1350
|
-
- **`projscan_dataflow`** _(3.0)_ - focused direct, propagated, and bridge source-to-sink dataflow risks. Next.js route body readers and URL reads plus Hono, Express, Fastify, and Koa request sources are framework-aware, DB/write sinks are receiver-sensitive, and defaults suppress test-file paths, broad readFile/writeFile noise, JavaScript RegExp.exec false positives, and generated-code anxiety; opt into broader scans with `include_tests` / `include_broad_file_io` / `include_generated` or the matching CLI flags.
|
|
1350
|
+
- **`projscan_dataflow`** _(3.0)_ - focused direct, propagated, and bridge source-to-sink dataflow risks. Next.js route body readers and URL reads plus Remix, SvelteKit, Hono, Express, Fastify, and Koa request sources are framework-aware, DB/write sinks are receiver-sensitive, and defaults suppress test-file paths, broad readFile/writeFile noise, JavaScript RegExp.exec false positives, and generated-code anxiety; opt into broader scans with `include_tests` / `include_broad_file_io` / `include_generated` or the matching CLI flags.
|
|
1351
1351
|
- **`projscan_search`** - fast search across `symbols` (exported names), `files` (path substring), or `content` (source substring with line + excerpt). Sub-file mode (`sub_file: true`) embeds per-function for sharper semantic results _(0.15)_.
|
|
1352
1352
|
- **`projscan_coupling`** _(0.11)_ - per-file fan-in / fan-out / instability + circular-import cycles (Tarjan SCC). Filter by `direction: cycles_only | high_fan_in | high_fan_out`.
|
|
1353
1353
|
- **`projscan_pr_diff`** _(0.11)_ - structural diff between two git refs. Returns added/removed/modified files with explicit lists of exports, imports, and call sites that changed, plus ΔCC and Δfan-in.
|
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
import { program } from '../_shared.js';
|
|
2
|
-
import {
|
|
2
|
+
import { runStartCommandAction } from './startAction.js';
|
|
3
|
+
import { registerStartOptions } from './startOptionsRegistration.js';
|
|
3
4
|
export function registerStart() {
|
|
4
|
-
program
|
|
5
|
+
const startCommand = program
|
|
5
6
|
.command('start')
|
|
6
|
-
.description('Orient an engineer or agent with the next best workflow for this repo')
|
|
7
|
-
|
|
8
|
-
.option('--intent <text>', 'plain-language goal to route into the next best action')
|
|
9
|
-
.option('--mission <dir>', 'read an existing Mission Control bundle and include proof outcome')
|
|
10
|
-
.option('--max-tasks <count>', 'maximum workplan tasks to inspect', parsePositiveInt)
|
|
11
|
-
.option('--max-risks <count>', 'maximum start risks to return', parsePositiveInt)
|
|
12
|
-
.option('--include-handoff', 'include a compact handoff payload')
|
|
13
|
-
.option('--handoff-prompt', 'print only the concise Mission Control handoff prompt')
|
|
14
|
-
.option('--next-command', 'print only the current Mission Control cursor command')
|
|
15
|
-
.option('--next-tool-call', 'print only the current Mission Control cursor MCP tool call as JSON')
|
|
16
|
-
.option('--ready-tool-calls', 'print all currently ready Mission Control MCP tool calls as compact JSON')
|
|
17
|
-
.option('--proof-commands', 'print only ready Mission Control proof commands')
|
|
18
|
-
.option('--checklist', 'print only the Mission Control resume checklist')
|
|
19
|
-
.option('--resume-json', 'print only the Mission Control resume object as compact JSON')
|
|
20
|
-
.option('--handoff-json', 'print only the Mission Control handoff object as compact JSON')
|
|
21
|
-
.option('--save-mission <dir>', 'write the Mission Control bundle to this directory')
|
|
22
|
-
.option('--runbook', 'print only the Mission Control Markdown runbook')
|
|
23
|
-
.option('--task-card', 'print only the Mission Control Markdown task card')
|
|
24
|
-
.option('--review-gate', 'print only the Mission Control review gate')
|
|
25
|
-
.option('--review-gate-json', 'print only the Mission Control review gate as JSON')
|
|
26
|
-
.option('--review-policy', 'print only the Mission Control review policy as JSON')
|
|
27
|
-
.option('--review-replies', 'print only the Mission Control reviewer reply choices')
|
|
28
|
-
.option('--mission-script', 'print the Mission Control shell script')
|
|
29
|
-
.option('--shortcuts', 'print the Mission Control shortcut command index')
|
|
30
|
-
.option('--shortcuts-json', 'print the Mission Control shortcut command index as JSON')
|
|
31
|
-
.action(runStartCommandAction);
|
|
7
|
+
.description('Orient an engineer or agent with the next best workflow for this repo');
|
|
8
|
+
registerStartOptions(startCommand).action(runStartCommandAction);
|
|
32
9
|
}
|
|
33
10
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/cli/commands/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/cli/commands/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,UAAU,aAAa;IAC3B,MAAM,YAAY,GAAG,OAAO;SACzB,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uEAAuE,CAAC,CAAC;IAExF,oBAAoB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { parsePositiveInt } from './startAction.js';
|
|
2
|
+
export function registerStartOptions(command) {
|
|
3
|
+
return command
|
|
4
|
+
.option('--mode <mode>', 'before_edit, before_commit, before_merge, refactor, release, bug_hunt, or hardening')
|
|
5
|
+
.option('--intent <text>', 'plain-language goal to route into the next best action')
|
|
6
|
+
.option('--mission <dir>', 'read an existing Mission Control bundle and include proof outcome')
|
|
7
|
+
.option('--max-tasks <count>', 'maximum workplan tasks to inspect', parsePositiveInt)
|
|
8
|
+
.option('--max-risks <count>', 'maximum start risks to return', parsePositiveInt)
|
|
9
|
+
.option('--include-handoff', 'include a compact handoff payload')
|
|
10
|
+
.option('--handoff-prompt', 'print only the concise Mission Control handoff prompt')
|
|
11
|
+
.option('--next-command', 'print only the current Mission Control cursor command')
|
|
12
|
+
.option('--next-tool-call', 'print only the current Mission Control cursor MCP tool call as JSON')
|
|
13
|
+
.option('--ready-tool-calls', 'print all currently ready Mission Control MCP tool calls as compact JSON')
|
|
14
|
+
.option('--proof-commands', 'print only ready Mission Control proof commands')
|
|
15
|
+
.option('--checklist', 'print only the Mission Control resume checklist')
|
|
16
|
+
.option('--resume-json', 'print only the Mission Control resume object as compact JSON')
|
|
17
|
+
.option('--handoff-json', 'print only the Mission Control handoff object as compact JSON')
|
|
18
|
+
.option('--save-mission <dir>', 'write the Mission Control bundle to this directory')
|
|
19
|
+
.option('--runbook', 'print only the Mission Control Markdown runbook')
|
|
20
|
+
.option('--task-card', 'print only the Mission Control Markdown task card')
|
|
21
|
+
.option('--review-gate', 'print only the Mission Control review gate')
|
|
22
|
+
.option('--review-gate-json', 'print only the Mission Control review gate as JSON')
|
|
23
|
+
.option('--review-policy', 'print only the Mission Control review policy as JSON')
|
|
24
|
+
.option('--review-replies', 'print only the Mission Control reviewer reply choices')
|
|
25
|
+
.option('--mission-script', 'print the Mission Control shell script')
|
|
26
|
+
.option('--shortcuts', 'print the Mission Control shortcut command index')
|
|
27
|
+
.option('--shortcuts-json', 'print the Mission Control shortcut command index as JSON');
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=startOptionsRegistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startOptionsRegistration.js","sourceRoot":"","sources":["../../../src/cli/commands/startOptionsRegistration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO,OAAO;SACX,MAAM,CACL,eAAe,EACf,qFAAqF,CACtF;SACA,MAAM,CAAC,iBAAiB,EAAE,wDAAwD,CAAC;SACnF,MAAM,CAAC,iBAAiB,EAAE,mEAAmE,CAAC;SAC9F,MAAM,CAAC,qBAAqB,EAAE,mCAAmC,EAAE,gBAAgB,CAAC;SACpF,MAAM,CAAC,qBAAqB,EAAE,+BAA+B,EAAE,gBAAgB,CAAC;SAChF,MAAM,CAAC,mBAAmB,EAAE,mCAAmC,CAAC;SAChE,MAAM,CAAC,kBAAkB,EAAE,uDAAuD,CAAC;SACnF,MAAM,CAAC,gBAAgB,EAAE,uDAAuD,CAAC;SACjF,MAAM,CACL,kBAAkB,EAClB,qEAAqE,CACtE;SACA,MAAM,CACL,oBAAoB,EACpB,0EAA0E,CAC3E;SACA,MAAM,CAAC,kBAAkB,EAAE,iDAAiD,CAAC;SAC7E,MAAM,CAAC,aAAa,EAAE,iDAAiD,CAAC;SACxE,MAAM,CAAC,eAAe,EAAE,8DAA8D,CAAC;SACvF,MAAM,CAAC,gBAAgB,EAAE,+DAA+D,CAAC;SACzF,MAAM,CAAC,sBAAsB,EAAE,oDAAoD,CAAC;SACpF,MAAM,CAAC,WAAW,EAAE,iDAAiD,CAAC;SACtE,MAAM,CAAC,aAAa,EAAE,mDAAmD,CAAC;SAC1E,MAAM,CAAC,eAAe,EAAE,4CAA4C,CAAC;SACrE,MAAM,CAAC,oBAAoB,EAAE,oDAAoD,CAAC;SAClF,MAAM,CAAC,iBAAiB,EAAE,sDAAsD,CAAC;SACjF,MAAM,CAAC,kBAAkB,EAAE,uDAAuD,CAAC;SACnF,MAAM,CAAC,kBAAkB,EAAE,wCAAwC,CAAC;SACpE,MAAM,CAAC,aAAa,EAAE,kDAAkD,CAAC;SACzE,MAAM,CAAC,kBAAkB,EAAE,0DAA0D,CAAC,CAAC;AAC5F,CAAC"}
|
package/dist/core/ast.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AstResult } from './astResult.js';
|
|
2
2
|
export type { AstExport, AstImport, FunctionInfo, SymbolKind } from './astTypes.js';
|
|
3
|
-
export
|
|
4
|
-
ok: boolean;
|
|
5
|
-
reason?: string;
|
|
6
|
-
imports: AstImport[];
|
|
7
|
-
exports: AstExport[];
|
|
8
|
-
callSites: string[];
|
|
9
|
-
lineCount: number;
|
|
10
|
-
/** File-level McCabe cyclomatic complexity: decision points + 1. 0 when unparsed. */
|
|
11
|
-
cyclomaticComplexity: number;
|
|
12
|
-
/**
|
|
13
|
-
* Per-function CC. May be empty when the adapter doesn't yet support
|
|
14
|
-
* per-function granularity or when the file has no function definitions.
|
|
15
|
-
* 0.13.0+ all six adapters populate this for parsed files.
|
|
16
|
-
*/
|
|
17
|
-
functions: FunctionInfo[];
|
|
18
|
-
}
|
|
3
|
+
export type { AstResult } from './astResult.js';
|
|
19
4
|
export { isParseable } from './astParser.js';
|
|
20
5
|
/**
|
|
21
6
|
* Parse a source file and extract imports, exports, and call sites.
|
package/dist/core/ast.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { extractFunctionsFromBabel } from './astFunctionCollector.js';
|
|
2
|
-
import { visitTopLevel } from './astModuleSignals.js';
|
|
3
1
|
import { isParseable, parseBabelFile } from './astParser.js';
|
|
4
|
-
import {
|
|
5
|
-
const EMPTY = {
|
|
6
|
-
ok: false,
|
|
7
|
-
reason: 'unparsed',
|
|
8
|
-
imports: [],
|
|
9
|
-
exports: [],
|
|
10
|
-
callSites: [],
|
|
11
|
-
lineCount: 0,
|
|
12
|
-
cyclomaticComplexity: 0,
|
|
13
|
-
functions: [],
|
|
14
|
-
};
|
|
2
|
+
import { parsedAstResult, unparsedAstResult } from './astResult.js';
|
|
15
3
|
export { isParseable } from './astParser.js';
|
|
16
4
|
/**
|
|
17
5
|
* Parse a source file and extract imports, exports, and call sites.
|
|
@@ -24,28 +12,11 @@ export { isParseable } from './astParser.js';
|
|
|
24
12
|
*/
|
|
25
13
|
export function parseSource(filePath, content) {
|
|
26
14
|
if (!isParseable(filePath)) {
|
|
27
|
-
return
|
|
15
|
+
return unparsedAstResult('non-source extension');
|
|
28
16
|
}
|
|
29
17
|
const parsed = parseBabelFile(filePath, content);
|
|
30
18
|
if (!parsed.ok)
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
const imports = [];
|
|
34
|
-
const exports = [];
|
|
35
|
-
const callSites = [];
|
|
36
|
-
for (const node of ast.program.body) {
|
|
37
|
-
visitTopLevel(node, imports, exports);
|
|
38
|
-
}
|
|
39
|
-
const decisionPoints = collectProgramSignals(ast.program, imports, callSites);
|
|
40
|
-
const functions = extractFunctionsFromBabel(ast.program);
|
|
41
|
-
return {
|
|
42
|
-
ok: true,
|
|
43
|
-
imports,
|
|
44
|
-
exports,
|
|
45
|
-
callSites: [...new Set(callSites)],
|
|
46
|
-
lineCount: content ? content.split('\n').length : 0,
|
|
47
|
-
cyclomaticComplexity: decisionPoints + 1,
|
|
48
|
-
functions,
|
|
49
|
-
};
|
|
19
|
+
return unparsedAstResult(parsed.reason);
|
|
20
|
+
return parsedAstResult(parsed.ast.program, content);
|
|
50
21
|
}
|
|
51
22
|
//# sourceMappingURL=ast.js.map
|
package/dist/core/ast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/core/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/core/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAkB,MAAM,gBAAgB,CAAC;AAKpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,OAAe;IAC3D,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,OAAO,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxD,OAAO,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Program } from '@babel/types';
|
|
2
|
+
import type { AstExport, AstImport, FunctionInfo } from './astTypes.js';
|
|
3
|
+
export interface AstResult {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
reason?: string;
|
|
6
|
+
imports: AstImport[];
|
|
7
|
+
exports: AstExport[];
|
|
8
|
+
callSites: string[];
|
|
9
|
+
lineCount: number;
|
|
10
|
+
/** File-level McCabe cyclomatic complexity: decision points + 1. 0 when unparsed. */
|
|
11
|
+
cyclomaticComplexity: number;
|
|
12
|
+
/**
|
|
13
|
+
* Per-function CC. May be empty when the adapter doesn't yet support
|
|
14
|
+
* per-function granularity or when the file has no function definitions.
|
|
15
|
+
* 0.13.0+ all six adapters populate this for parsed files.
|
|
16
|
+
*/
|
|
17
|
+
functions: FunctionInfo[];
|
|
18
|
+
}
|
|
19
|
+
export declare function unparsedAstResult(reason?: string): AstResult;
|
|
20
|
+
export declare function parsedAstResult(program: Program, content: string): AstResult;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { extractFunctionsFromBabel } from './astFunctionCollector.js';
|
|
2
|
+
import { visitTopLevel } from './astModuleSignals.js';
|
|
3
|
+
import { collectProgramSignals } from './astProgramSignals.js';
|
|
4
|
+
const EMPTY_AST_RESULT = {
|
|
5
|
+
ok: false,
|
|
6
|
+
reason: 'unparsed',
|
|
7
|
+
imports: [],
|
|
8
|
+
exports: [],
|
|
9
|
+
callSites: [],
|
|
10
|
+
lineCount: 0,
|
|
11
|
+
cyclomaticComplexity: 0,
|
|
12
|
+
functions: [],
|
|
13
|
+
};
|
|
14
|
+
export function unparsedAstResult(reason = 'unparsed') {
|
|
15
|
+
return { ...EMPTY_AST_RESULT, reason };
|
|
16
|
+
}
|
|
17
|
+
export function parsedAstResult(program, content) {
|
|
18
|
+
const imports = [];
|
|
19
|
+
const exports = [];
|
|
20
|
+
const callSites = [];
|
|
21
|
+
for (const node of program.body) {
|
|
22
|
+
visitTopLevel(node, imports, exports);
|
|
23
|
+
}
|
|
24
|
+
const decisionPoints = collectProgramSignals(program, imports, callSites);
|
|
25
|
+
const functions = extractFunctionsFromBabel(program);
|
|
26
|
+
return {
|
|
27
|
+
ok: true,
|
|
28
|
+
imports,
|
|
29
|
+
exports,
|
|
30
|
+
callSites: [...new Set(callSites)],
|
|
31
|
+
lineCount: lineCountForContent(content),
|
|
32
|
+
cyclomaticComplexity: decisionPoints + 1,
|
|
33
|
+
functions,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function lineCountForContent(content) {
|
|
37
|
+
return content ? content.split('\n').length : 0;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=astResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astResult.js","sourceRoot":"","sources":["../../src/core/astResult.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAoB/D,MAAM,gBAAgB,GAAc;IAClC,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,CAAC;IACZ,oBAAoB,EAAE,CAAC;IACvB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,MAAM,GAAG,UAAU;IACnD,OAAO,EAAE,GAAG,gBAAgB,EAAE,MAAM,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAgB,EAAE,OAAe;IAC/D,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,MAAM,SAAS,GAAa,EAAE,CAAC;IAE/B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QAChC,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,cAAc,GAAG,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAErD,OAAO;QACL,EAAE,EAAE,IAAI;QACR,OAAO;QACP,OAAO;QACP,SAAS,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAClC,SAAS,EAAE,mBAAmB,CAAC,OAAO,CAAC;QACvC,oBAAoB,EAAE,cAAc,GAAG,CAAC;QACxC,SAAS;KACV,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAe;IAC1C,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
package/dist/core/codeGraph.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FileEntry } from '../types.js';
|
|
2
2
|
export { packagesUsed, filesImportingPackage, filesImportingFile, filesDefiningSymbol, importersOf, exportsOf, importsOf, } from './codeGraphQueries.js';
|
|
3
|
+
export { incrementallyUpdateGraph } from './codeGraphIncremental.js';
|
|
3
4
|
import type { CodeGraph, GraphFile } from './codeGraphTypes.js';
|
|
4
5
|
export type { CodeGraph, GraphFile };
|
|
5
6
|
export declare function buildCodeGraph(rootPath: string, files: FileEntry[], previousGraph?: CodeGraph): Promise<CodeGraph>;
|
|
@@ -9,19 +10,3 @@ export declare function buildCodeGraph(rootPath: string, files: FileEntry[], pre
|
|
|
9
10
|
* `getAdapterFor(filePath).toPackageName(specifier)`.
|
|
10
11
|
*/
|
|
11
12
|
export declare function toPackageName(specifier: string): string | null;
|
|
12
|
-
/**
|
|
13
|
-
* 0.16.0: targeted incremental update for watch mode. Given a graph and a
|
|
14
|
-
* list of repo-relative paths that may have changed (added, modified, or
|
|
15
|
-
* deleted), update the graph in place: re-stat each path, re-parse changed
|
|
16
|
-
* ones, drop deleted ones, and fix up the cross-file derived indexes
|
|
17
|
-
* (`localImporters`, `packageImporters`, `symbolDefs`, per-function
|
|
18
|
-
* `fanIn`).
|
|
19
|
-
*
|
|
20
|
-
* Returns the same `graph` reference. Cheap: O(changedPaths) for the parse
|
|
21
|
-
* pass; the fan-in recomputation is O(graph.files) but it's a single
|
|
22
|
-
* walk over already-parsed entries (no IO).
|
|
23
|
-
*
|
|
24
|
-
* `changedPaths` should be repo-relative (forward-slash). Files that don't
|
|
25
|
-
* exist are treated as deletions; files that do exist are re-parsed.
|
|
26
|
-
*/
|
|
27
|
-
export declare function incrementallyUpdateGraph(graph: CodeGraph, rootPath: string, changedPaths: string[]): Promise<CodeGraph>;
|
package/dist/core/codeGraph.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
1
|
import { listAdapters } from './languages/registry.js';
|
|
3
2
|
import { mapWithConcurrency, DEFAULT_FILE_IO_CONCURRENCY } from '../utils/concurrency.js';
|
|
4
3
|
import { computeFanIn, computeFanOut } from './codeGraphFanMetrics.js';
|
|
5
4
|
import { selectParseableGraphInputs } from './codeGraphFileSelection.js';
|
|
6
5
|
import { rebuildCrossFileIndexes } from './codeGraphIndexes.js';
|
|
7
|
-
import { parseFileToGraphEntry
|
|
6
|
+
import { parseFileToGraphEntry } from './codeGraphParsing.js';
|
|
7
|
+
import { prepareAdapterContexts } from './codeGraphAdapterContexts.js';
|
|
8
8
|
export { packagesUsed, filesImportingPackage, filesImportingFile, filesDefiningSymbol, importersOf, exportsOf, importsOf, } from './codeGraphQueries.js';
|
|
9
|
-
|
|
9
|
+
export { incrementallyUpdateGraph } from './codeGraphIncremental.js';
|
|
10
|
+
import { expandLocalStarReexports } from './codeGraphReexports.js';
|
|
10
11
|
export async function buildCodeGraph(rootPath, files, previousGraph) {
|
|
11
12
|
const contextByAdapter = await prepareAdapterContexts(rootPath, files);
|
|
12
13
|
const parseable = selectParseableGraphInputs(files);
|
|
@@ -31,18 +32,6 @@ export async function buildCodeGraph(rootPath, files, previousGraph) {
|
|
|
31
32
|
scannedFiles: graphFiles.size,
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Per-adapter setup (e.g. Python package-root detection from
|
|
36
|
-
* pyproject.toml, Rust workspace detection from Cargo.toml). Run once
|
|
37
|
-
* per graph build; cheap relative to parsing.
|
|
38
|
-
*/
|
|
39
|
-
async function prepareAdapterContexts(rootPath, files) {
|
|
40
|
-
const contextByAdapter = new Map();
|
|
41
|
-
for (const adapter of listAdapters()) {
|
|
42
|
-
contextByAdapter.set(adapter, await adapter.preparePackageRoots(rootPath, files));
|
|
43
|
-
}
|
|
44
|
-
return contextByAdapter;
|
|
45
|
-
}
|
|
46
35
|
/**
|
|
47
36
|
* Back-compat: convert a JS/TS import specifier to a bare package name.
|
|
48
37
|
* Delegates to the JavaScript adapter. For multi-language use cases, prefer
|
|
@@ -52,78 +41,4 @@ export function toPackageName(specifier) {
|
|
|
52
41
|
const jsAdapter = listAdapters().find((a) => a.id === 'javascript');
|
|
53
42
|
return jsAdapter ? jsAdapter.toPackageName(specifier) : null;
|
|
54
43
|
}
|
|
55
|
-
/**
|
|
56
|
-
* 0.16.0: targeted incremental update for watch mode. Given a graph and a
|
|
57
|
-
* list of repo-relative paths that may have changed (added, modified, or
|
|
58
|
-
* deleted), update the graph in place: re-stat each path, re-parse changed
|
|
59
|
-
* ones, drop deleted ones, and fix up the cross-file derived indexes
|
|
60
|
-
* (`localImporters`, `packageImporters`, `symbolDefs`, per-function
|
|
61
|
-
* `fanIn`).
|
|
62
|
-
*
|
|
63
|
-
* Returns the same `graph` reference. Cheap: O(changedPaths) for the parse
|
|
64
|
-
* pass; the fan-in recomputation is O(graph.files) but it's a single
|
|
65
|
-
* walk over already-parsed entries (no IO).
|
|
66
|
-
*
|
|
67
|
-
* `changedPaths` should be repo-relative (forward-slash). Files that don't
|
|
68
|
-
* exist are treated as deletions; files that do exist are re-parsed.
|
|
69
|
-
*/
|
|
70
|
-
export async function incrementallyUpdateGraph(graph, rootPath, changedPaths) {
|
|
71
|
-
if (changedPaths.length === 0)
|
|
72
|
-
return graph;
|
|
73
|
-
// 1.10+ — re-parse changed files first, then derive adapter contexts
|
|
74
|
-
// against the post-update graph view. Previously contexts were computed
|
|
75
|
-
// from the pre-update graph, so a newly-added manifest (pyproject.toml,
|
|
76
|
-
// Cargo.toml, go.mod) batched with source files wasn't in the file list
|
|
77
|
-
// passed to preparePackageRoots — the adapter derived a stale set of
|
|
78
|
-
// package roots and mis-resolved that batch's imports until the next
|
|
79
|
-
// tick. Parsing itself doesn't depend on context, so the reorder is safe.
|
|
80
|
-
await Promise.all(changedPaths.map((rel) => processChangedPath(graph, rootPath, rel)));
|
|
81
|
-
await refreshLocalStarReexporters(graph, rootPath);
|
|
82
|
-
const contextByAdapter = await prepareAdapterContexts(rootPath, fakeFilesFromGraph(graph, rootPath));
|
|
83
|
-
expandLocalStarReexports(graph.files, contextByAdapter);
|
|
84
|
-
rebuildIndexesIntoGraph(graph, contextByAdapter);
|
|
85
|
-
computeFanIn(graph.files);
|
|
86
|
-
computeFanOut(graph.files);
|
|
87
|
-
graph.scannedFiles = graph.files.size;
|
|
88
|
-
return graph;
|
|
89
|
-
}
|
|
90
|
-
async function refreshLocalStarReexporters(graph, rootPath) {
|
|
91
|
-
const reexporters = [...graph.files.values()]
|
|
92
|
-
.filter((entry) => entry.imports.some(isLocalStarReexport))
|
|
93
|
-
.map((entry) => entry.relativePath);
|
|
94
|
-
await Promise.all(reexporters.map((rel) => processChangedPath(graph, rootPath, rel)));
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Build a FileEntry[]-shaped stand-in from the current graph, used as
|
|
98
|
-
* the input to `preparePackageRoots` during incremental update — the
|
|
99
|
-
* adapters need a complete view of repo layout to detect manifest
|
|
100
|
-
* edits (pyproject.toml, go.mod) that would shift package roots.
|
|
101
|
-
*/
|
|
102
|
-
function fakeFilesFromGraph(graph, rootPath) {
|
|
103
|
-
return [...graph.files.values()].map((gf) => ({
|
|
104
|
-
relativePath: gf.relativePath,
|
|
105
|
-
absolutePath: path.resolve(rootPath, gf.relativePath),
|
|
106
|
-
directory: path.dirname(gf.relativePath),
|
|
107
|
-
extension: path.extname(gf.relativePath),
|
|
108
|
-
sizeBytes: 0,
|
|
109
|
-
}));
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Rebuild the graph's cross-file indexes in place — clear, then refill
|
|
113
|
-
* from scratch. The graph is small relative to parse cost so rebuilding
|
|
114
|
-
* edges in O(N) keeps the logic simple and avoids orphan-edge bugs from
|
|
115
|
-
* in-place patching.
|
|
116
|
-
*/
|
|
117
|
-
function rebuildIndexesIntoGraph(graph, contextByAdapter) {
|
|
118
|
-
const { localImporters, packageImporters, symbolDefs } = rebuildCrossFileIndexes(graph.files, contextByAdapter);
|
|
119
|
-
graph.localImporters.clear();
|
|
120
|
-
for (const [k, v] of localImporters)
|
|
121
|
-
graph.localImporters.set(k, v);
|
|
122
|
-
graph.packageImporters.clear();
|
|
123
|
-
for (const [k, v] of packageImporters)
|
|
124
|
-
graph.packageImporters.set(k, v);
|
|
125
|
-
graph.symbolDefs.clear();
|
|
126
|
-
for (const [k, v] of symbolDefs)
|
|
127
|
-
graph.symbolDefs.set(k, v);
|
|
128
|
-
}
|
|
129
44
|
//# sourceMappingURL=codeGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeGraph.js","sourceRoot":"","sources":["../../src/core/codeGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codeGraph.js","sourceRoot":"","sources":["../../src/core/codeGraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAKnE,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAgB,EAChB,KAAkB,EAClB,aAAyB;IAEzB,MAAM,gBAAgB,GAAG,MAAM,sBAAsB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;IAChD,mEAAmE;IACnE,0EAA0E;IAC1E,mEAAmE;IACnE,MAAM,kBAAkB,CAAC,SAAS,EAAE,2BAA2B,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3F,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;QAClF,IAAI,KAAK;YAAE,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,wBAAwB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACvD,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,uBAAuB,CAC9E,UAAU,EACV,gBAAgB,CACjB,CAAC;IACF,YAAY,CAAC,UAAU,CAAC,CAAC;IACzB,aAAa,CAAC,UAAU,CAAC,CAAC;IAE1B,OAAO;QACL,KAAK,EAAE,UAAU;QACjB,gBAAgB;QAChB,cAAc;QACd,UAAU;QACV,YAAY,EAAE,UAAU,CAAC,IAAI;KAC9B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC,CAAC;IACpE,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FileEntry } from '../types.js';
|
|
2
|
+
import type { LanguageAdapter, LanguageResolveContext } from './languages/LanguageAdapter.js';
|
|
3
|
+
/**
|
|
4
|
+
* Per-adapter setup (e.g. Python package-root detection from
|
|
5
|
+
* pyproject.toml, Rust workspace detection from Cargo.toml). Run once
|
|
6
|
+
* per graph build; cheap relative to parsing.
|
|
7
|
+
*/
|
|
8
|
+
export declare function prepareAdapterContexts(rootPath: string, files: FileEntry[]): Promise<Map<LanguageAdapter, LanguageResolveContext>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { listAdapters } from './languages/registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Per-adapter setup (e.g. Python package-root detection from
|
|
4
|
+
* pyproject.toml, Rust workspace detection from Cargo.toml). Run once
|
|
5
|
+
* per graph build; cheap relative to parsing.
|
|
6
|
+
*/
|
|
7
|
+
export async function prepareAdapterContexts(rootPath, files) {
|
|
8
|
+
const contextByAdapter = new Map();
|
|
9
|
+
for (const adapter of listAdapters()) {
|
|
10
|
+
contextByAdapter.set(adapter, await adapter.preparePackageRoots(rootPath, files));
|
|
11
|
+
}
|
|
12
|
+
return contextByAdapter;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=codeGraphAdapterContexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeGraphAdapterContexts.js","sourceRoot":"","sources":["../../src/core/codeGraphAdapterContexts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,QAAgB,EAChB,KAAkB;IAElB,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA2C,CAAC;IAC5E,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,EAAE,CAAC;QACrC,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CodeGraph } from './codeGraphTypes.js';
|
|
2
|
+
/**
|
|
3
|
+
* 0.16.0: targeted incremental update for watch mode. Given a graph and a
|
|
4
|
+
* list of repo-relative paths that may have changed (added, modified, or
|
|
5
|
+
* deleted), update the graph in place: re-stat each path, re-parse changed
|
|
6
|
+
* ones, drop deleted ones, and fix up the cross-file derived indexes
|
|
7
|
+
* (`localImporters`, `packageImporters`, `symbolDefs`, per-function
|
|
8
|
+
* `fanIn`).
|
|
9
|
+
*
|
|
10
|
+
* Returns the same `graph` reference. Cheap: O(changedPaths) for the parse
|
|
11
|
+
* pass; the fan-in recomputation is O(graph.files) but it's a single
|
|
12
|
+
* walk over already-parsed entries (no IO).
|
|
13
|
+
*
|
|
14
|
+
* `changedPaths` should be repo-relative (forward-slash). Files that don't
|
|
15
|
+
* exist are treated as deletions; files that do exist are re-parsed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function incrementallyUpdateGraph(graph: CodeGraph, rootPath: string, changedPaths: string[]): Promise<CodeGraph>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { computeFanIn, computeFanOut } from './codeGraphFanMetrics.js';
|
|
3
|
+
import { rebuildCrossFileIndexes } from './codeGraphIndexes.js';
|
|
4
|
+
import { processChangedPath } from './codeGraphParsing.js';
|
|
5
|
+
import { expandLocalStarReexports, isLocalStarReexport } from './codeGraphReexports.js';
|
|
6
|
+
import { prepareAdapterContexts } from './codeGraphAdapterContexts.js';
|
|
7
|
+
/**
|
|
8
|
+
* 0.16.0: targeted incremental update for watch mode. Given a graph and a
|
|
9
|
+
* list of repo-relative paths that may have changed (added, modified, or
|
|
10
|
+
* deleted), update the graph in place: re-stat each path, re-parse changed
|
|
11
|
+
* ones, drop deleted ones, and fix up the cross-file derived indexes
|
|
12
|
+
* (`localImporters`, `packageImporters`, `symbolDefs`, per-function
|
|
13
|
+
* `fanIn`).
|
|
14
|
+
*
|
|
15
|
+
* Returns the same `graph` reference. Cheap: O(changedPaths) for the parse
|
|
16
|
+
* pass; the fan-in recomputation is O(graph.files) but it's a single
|
|
17
|
+
* walk over already-parsed entries (no IO).
|
|
18
|
+
*
|
|
19
|
+
* `changedPaths` should be repo-relative (forward-slash). Files that don't
|
|
20
|
+
* exist are treated as deletions; files that do exist are re-parsed.
|
|
21
|
+
*/
|
|
22
|
+
export async function incrementallyUpdateGraph(graph, rootPath, changedPaths) {
|
|
23
|
+
if (changedPaths.length === 0)
|
|
24
|
+
return graph;
|
|
25
|
+
// Re-parse changed files first, then derive adapter contexts against the
|
|
26
|
+
// post-update graph so manifest changes are visible before import expansion.
|
|
27
|
+
await Promise.all(changedPaths.map((rel) => processChangedPath(graph, rootPath, rel)));
|
|
28
|
+
await refreshLocalStarReexporters(graph, rootPath);
|
|
29
|
+
const contextByAdapter = await prepareAdapterContexts(rootPath, fakeFilesFromGraph(graph, rootPath));
|
|
30
|
+
expandLocalStarReexports(graph.files, contextByAdapter);
|
|
31
|
+
rebuildIndexesIntoGraph(graph, contextByAdapter);
|
|
32
|
+
computeFanIn(graph.files);
|
|
33
|
+
computeFanOut(graph.files);
|
|
34
|
+
graph.scannedFiles = graph.files.size;
|
|
35
|
+
return graph;
|
|
36
|
+
}
|
|
37
|
+
async function refreshLocalStarReexporters(graph, rootPath) {
|
|
38
|
+
const reexporters = [...graph.files.values()]
|
|
39
|
+
.filter((entry) => entry.imports.some(isLocalStarReexport))
|
|
40
|
+
.map((entry) => entry.relativePath);
|
|
41
|
+
await Promise.all(reexporters.map((rel) => processChangedPath(graph, rootPath, rel)));
|
|
42
|
+
}
|
|
43
|
+
function fakeFilesFromGraph(graph, rootPath) {
|
|
44
|
+
return [...graph.files.values()].map((gf) => ({
|
|
45
|
+
relativePath: gf.relativePath,
|
|
46
|
+
absolutePath: path.resolve(rootPath, gf.relativePath),
|
|
47
|
+
directory: path.dirname(gf.relativePath),
|
|
48
|
+
extension: path.extname(gf.relativePath),
|
|
49
|
+
sizeBytes: 0,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
function rebuildIndexesIntoGraph(graph, contextByAdapter) {
|
|
53
|
+
const { localImporters, packageImporters, symbolDefs } = rebuildCrossFileIndexes(graph.files, contextByAdapter);
|
|
54
|
+
graph.localImporters.clear();
|
|
55
|
+
for (const [k, v] of localImporters)
|
|
56
|
+
graph.localImporters.set(k, v);
|
|
57
|
+
graph.packageImporters.clear();
|
|
58
|
+
for (const [k, v] of packageImporters)
|
|
59
|
+
graph.packageImporters.set(k, v);
|
|
60
|
+
graph.symbolDefs.clear();
|
|
61
|
+
for (const [k, v] of symbolDefs)
|
|
62
|
+
graph.symbolDefs.set(k, v);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=codeGraphIncremental.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeGraphIncremental.js","sourceRoot":"","sources":["../../src/core/codeGraphIncremental.ts"],"names":[],"mappings":"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"}
|
|
@@ -62,6 +62,7 @@ export async function detectCollisions(rootPath, options = {}) {
|
|
|
62
62
|
path: w.path,
|
|
63
63
|
branch: w.branch,
|
|
64
64
|
changedFileCount: 0,
|
|
65
|
+
uncommittedChangedFileCount: 0,
|
|
65
66
|
baseRef: null,
|
|
66
67
|
}));
|
|
67
68
|
return {
|
|
@@ -81,6 +82,7 @@ export async function detectCollisions(rootPath, options = {}) {
|
|
|
81
82
|
return {
|
|
82
83
|
ref: w,
|
|
83
84
|
files: result.available ? result.files : [],
|
|
85
|
+
uncommittedFiles: result.available ? result.uncommittedFiles : [],
|
|
84
86
|
baseRef: result.baseRef,
|
|
85
87
|
};
|
|
86
88
|
}));
|
|
@@ -202,6 +204,7 @@ export async function detectCollisions(rootPath, options = {}) {
|
|
|
202
204
|
path: c.ref.path,
|
|
203
205
|
branch: c.ref.branch,
|
|
204
206
|
changedFileCount: c.files.length,
|
|
207
|
+
uncommittedChangedFileCount: c.uncommittedFiles.length,
|
|
205
208
|
baseRef: c.baseRef,
|
|
206
209
|
}));
|
|
207
210
|
return {
|