projscan 4.6.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 +25 -12
- package/dist/cli/_shared.js +12 -44
- package/dist/cli/_shared.js.map +1 -1
- package/dist/cli/changedOnly.d.ts +16 -0
- package/dist/cli/changedOnly.js +28 -0
- package/dist/cli/changedOnly.js.map +1 -0
- 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/cli/formatOptions.d.ts +4 -0
- package/dist/cli/formatOptions.js +30 -0
- package/dist/cli/formatOptions.js.map +1 -0
- package/dist/core/agentBrief.js +6 -1
- package/dist/core/agentBrief.js.map +1 -1
- 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/astBodySignals.js +2 -3
- package/dist/core/astBodySignals.js.map +1 -1
- package/dist/core/astMembers.d.ts +1 -0
- package/dist/core/astMembers.js +38 -9
- package/dist/core/astMembers.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/bugHunt.js +2 -142
- package/dist/core/bugHunt.js.map +1 -1
- package/dist/core/bugHuntHotspotFindings.d.ts +2 -0
- package/dist/core/bugHuntHotspotFindings.js +68 -0
- package/dist/core/bugHuntHotspotFindings.js.map +1 -0
- package/dist/core/bugHuntPreflightFindings.d.ts +3 -0
- package/dist/core/bugHuntPreflightFindings.js +115 -0
- package/dist/core/bugHuntPreflightFindings.js.map +1 -0
- package/dist/core/codeGraph.d.ts +2 -24
- package/dist/core/codeGraph.js +8 -119
- 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/codeGraphFileSelection.d.ts +7 -0
- package/dist/core/codeGraphFileSelection.js +19 -0
- package/dist/core/codeGraphFileSelection.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/codeGraphQueries.d.ts +9 -0
- package/dist/core/codeGraphQueries.js +25 -0
- package/dist/core/codeGraphQueries.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/dataflow.js +3 -338
- package/dist/core/dataflow.js.map +1 -1
- package/dist/core/dataflowDatabaseSinks.d.ts +8 -0
- package/dist/core/dataflowDatabaseSinks.js +78 -0
- package/dist/core/dataflowDatabaseSinks.js.map +1 -0
- package/dist/core/dataflowRiskAssembly.d.ts +11 -0
- package/dist/core/dataflowRiskAssembly.js +117 -0
- package/dist/core/dataflowRiskAssembly.js.map +1 -0
- package/dist/core/dataflowTraversal.d.ts +25 -0
- package/dist/core/dataflowTraversal.js +200 -0
- package/dist/core/dataflowTraversal.js.map +1 -0
- package/dist/core/fileInspectionReport.d.ts +13 -0
- package/dist/core/fileInspectionReport.js +49 -0
- package/dist/core/fileInspectionReport.js.map +1 -0
- package/dist/core/fileInspector.d.ts +3 -11
- package/dist/core/fileInspector.js +2 -46
- package/dist/core/fileInspector.js.map +1 -1
- package/dist/core/fixSuggest.d.ts +1 -9
- package/dist/core/fixSuggest.js +2 -58
- package/dist/core/fixSuggest.js.map +1 -1
- package/dist/core/fixSuggestDependencyNames.d.ts +1 -0
- package/dist/core/fixSuggestDependencyNames.js +9 -0
- package/dist/core/fixSuggestDependencyNames.js.map +1 -0
- package/dist/core/fixSuggestPreview.d.ts +10 -0
- package/dist/core/fixSuggestPreview.js +87 -0
- package/dist/core/fixSuggestPreview.js.map +1 -0
- 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 +12 -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/frameworkNextRouteSources.d.ts +6 -1
- package/dist/core/frameworkNextRouteSources.js +31 -1
- package/dist/core/frameworkNextRouteSources.js.map +1 -1
- package/dist/core/frameworkRemixSources.d.ts +2 -0
- package/dist/core/frameworkRemixSources.js +63 -0
- package/dist/core/frameworkRemixSources.js.map +1 -0
- 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 +3 -3
- package/dist/core/frameworkSources.js +17 -15
- 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 +4 -14
- package/dist/core/intentRouter.js +2 -33
- package/dist/core/intentRouter.js.map +1 -1
- package/dist/core/intentRouterCatalog.js +49 -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 +36 -0
- package/dist/core/intentRouterKeywordWeights.js.map +1 -1
- package/dist/core/intentRouterReleaseSignals.js +104 -39
- 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/intentRouterResult.d.ts +16 -0
- package/dist/core/intentRouterResult.js +34 -0
- package/dist/core/intentRouterResult.js.map +1 -0
- package/dist/core/intentRouterWorkSignals.js +18 -0
- package/dist/core/intentRouterWorkSignals.js.map +1 -1
- package/dist/core/languages/pythonLockfiles.d.ts +4 -0
- package/dist/core/languages/pythonLockfiles.js +6 -2
- package/dist/core/languages/pythonLockfiles.js.map +1 -1
- package/dist/core/languages/pythonManifests.js +11 -24
- 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 +215 -24
- 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/pluginManifestValidation.d.ts +41 -0
- package/dist/core/pluginManifestValidation.js +179 -0
- package/dist/core/pluginManifestValidation.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 +11 -126
- package/dist/core/plugins.js +13 -478
- 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/regressionPlan.d.ts +2 -1
- package/dist/core/regressionPlan.js +7 -1
- package/dist/core/regressionPlan.js.map +1 -1
- package/dist/core/releaseEvidence.js +6 -120
- package/dist/core/releaseEvidence.js.map +1 -1
- package/dist/core/releaseEvidenceArtifacts.d.ts +3 -0
- package/dist/core/releaseEvidenceArtifacts.js +65 -0
- package/dist/core/releaseEvidenceArtifacts.js.map +1 -0
- package/dist/core/releaseEvidenceVerdict.d.ts +6 -0
- package/dist/core/releaseEvidenceVerdict.js +54 -0
- package/dist/core/releaseEvidenceVerdict.js.map +1 -0
- package/dist/core/reportPathRedaction.d.ts +4 -0
- package/dist/core/reportPathRedaction.js +64 -0
- package/dist/core/reportPathRedaction.js.map +1 -0
- package/dist/core/reportScope.js +2 -163
- package/dist/core/reportScope.js.map +1 -1
- package/dist/core/reportScopeFiltering.d.ts +9 -0
- package/dist/core/reportScopeFiltering.js +102 -0
- package/dist/core/reportScopeFiltering.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/searchIndex.d.ts +2 -14
- package/dist/core/searchIndex.js +4 -227
- package/dist/core/searchIndex.js.map +1 -1
- package/dist/core/searchIndexFiles.d.ts +1 -0
- package/dist/core/searchIndexFiles.js +26 -0
- package/dist/core/searchIndexFiles.js.map +1 -0
- package/dist/core/searchIndexText.d.ts +15 -0
- package/dist/core/searchIndexText.js +204 -0
- package/dist/core/searchIndexText.js.map +1 -0
- package/dist/core/start.js +5 -46
- package/dist/core/start.js.map +1 -1
- 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/startEvidence.d.ts +1 -1
- package/dist/core/startEvidence.js +16 -1
- package/dist/core/startEvidence.js.map +1 -1
- 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/startInputs.d.ts +1 -0
- package/dist/core/startInputs.js +4 -1
- package/dist/core/startInputs.js.map +1 -1
- 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 +12 -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/startReportBuilder.d.ts +1 -0
- package/dist/core/startReportBuilder.js +1 -0
- package/dist/core/startReportBuilder.js.map +1 -1
- package/dist/core/startReportContext.d.ts +23 -0
- package/dist/core/startReportContext.js +51 -0
- package/dist/core/startReportContext.js.map +1 -0
- package/dist/core/startRoadmapPreview.d.ts +2 -0
- package/dist/core/startRoadmapPreview.js +31 -0
- package/dist/core/startRoadmapPreview.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/taint.d.ts +2 -67
- package/dist/core/taint.js +41 -164
- package/dist/core/taint.js.map +1 -1
- package/dist/core/taintIndex.d.ts +20 -0
- package/dist/core/taintIndex.js +81 -0
- package/dist/core/taintIndex.js.map +1 -0
- package/dist/core/taintTraversal.d.ts +8 -0
- package/dist/core/taintTraversal.js +113 -0
- package/dist/core/taintTraversal.js.map +1 -0
- package/dist/core/taintTypes.d.ts +67 -0
- package/dist/core/taintTypes.js +2 -0
- package/dist/core/taintTypes.js.map +1 -0
- package/dist/core/telemetry.d.ts +9 -89
- package/dist/core/telemetry.js +35 -387
- 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/core/upgradePreviewPython.js +1 -1
- package/dist/core/upgradePreviewPython.js.map +1 -1
- 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 -13
- 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/consoleFixReporter.d.ts +3 -0
- package/dist/reporters/consoleFixReporter.js +41 -0
- package/dist/reporters/consoleFixReporter.js.map +1 -0
- package/dist/reporters/consoleReporter.d.ts +1 -3
- package/dist/reporters/consoleReporter.js +1 -42
- package/dist/reporters/consoleReporter.js.map +1 -1
- 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 -437
- 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 +18 -7
- 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,16 +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.
|
|
39
|
-
|
|
40
|
-
4.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
- **
|
|
38
|
+
## What's New in 4.8.0
|
|
39
|
+
|
|
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
|
+
|
|
44
|
+
- **SvelteKit dataflow coverage.** `RequestEvent` handlers and hooks now
|
|
45
|
+
classify request body readers, headers, URL, params, and cookies through
|
|
46
|
+
framework-gated source patterns.
|
|
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.
|
|
48
61
|
|
|
49
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">
|
|
50
63
|
|
|
@@ -487,7 +500,7 @@ projscan start --intent "what should an intern work on?" # Routes to bug-hunt pr
|
|
|
487
500
|
projscan start --intent "what is a low risk improvement?" # Routes to bug-hunt prioritization
|
|
488
501
|
projscan start --intent "pick a small safe task" # Routes to bug-hunt prioritization
|
|
489
502
|
projscan start --intent "what should I do next?" # Routes to an ordered before-edit workplan
|
|
490
|
-
projscan start --intent "what should we build next?" # Routes to a
|
|
503
|
+
projscan start --intent "what should we build next?" # Routes to a before-edit implementation workplan
|
|
491
504
|
projscan start --intent "explain issue missing-test-framework" # Routes to deep issue context
|
|
492
505
|
projscan start --intent "fix issue missing-test-framework" # Routes to a concrete fix suggestion
|
|
493
506
|
projscan start --intent "is user input reaching SQL sinks?" # Routes to hardening dataflow analysis
|
|
@@ -1334,7 +1347,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
|
|
|
1334
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.
|
|
1335
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.
|
|
1336
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.)
|
|
1337
|
-
- **`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.
|
|
1338
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)_.
|
|
1339
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`.
|
|
1340
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.
|
package/dist/cli/_shared.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
import readline from 'node:readline';
|
|
5
4
|
import { readFileSync } from 'node:fs';
|
|
@@ -9,13 +8,13 @@ import { setLogLevel } from '../utils/logger.js';
|
|
|
9
8
|
import { showBanner, showCompactBanner } from '../utils/banner.js';
|
|
10
9
|
import { recordCommandTelemetry } from '../core/telemetry.js';
|
|
11
10
|
import { enableOfflineMode } from '../core/privacy.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { changedFilesAvailableMessage, changedFilesUnavailableMessage, changedIssueFilterMessage, filterIssuesToChangedFiles, } from './changedIssueFilter.js';
|
|
11
|
+
import { formatList } from '../utils/formatSupport.js';
|
|
12
|
+
import { filterIssuesByChangedFilesForCli } from './changedOnly.js';
|
|
15
13
|
import { loadCliProjectConfig } from './projectConfig.js';
|
|
16
14
|
import { renderCliPluginReporterIfRequested } from './pluginReporter.js';
|
|
17
15
|
import { cliCommandPath } from './commandPath.js';
|
|
18
16
|
import { renderCliBanner } from './bannerDisplay.js';
|
|
17
|
+
import { assertCliFormatSupported, resolveCliFormat } from './formatOptions.js';
|
|
19
18
|
export { buildArchitectureLayers } from './architectureLayers.js';
|
|
20
19
|
export { sliceCliTree } from './treeSlice.js';
|
|
21
20
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -58,26 +57,10 @@ program.hook('postAction', async (_thisCommand, actionCommand) => {
|
|
|
58
57
|
}).catch(() => undefined);
|
|
59
58
|
});
|
|
60
59
|
export function getFormat() {
|
|
61
|
-
|
|
62
|
-
const f = opts.format;
|
|
63
|
-
if (OUTPUT_FORMATS.includes(f))
|
|
64
|
-
return f;
|
|
65
|
-
console.error(chalk.red(`Unsupported --format ${f}.`));
|
|
66
|
-
console.error(chalk.dim(`Supported formats: ${formatList()}`));
|
|
67
|
-
process.exit(1);
|
|
60
|
+
return resolveCliFormat(program.opts().format);
|
|
68
61
|
}
|
|
69
62
|
export function assertFormatSupported(commandName) {
|
|
70
|
-
|
|
71
|
-
const supported = getCommandFormatSupport(commandName);
|
|
72
|
-
if (!supported) {
|
|
73
|
-
console.error(chalk.red(`Internal error: no --format support metadata for projscan ${commandName}.`));
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
if (supported.includes(format))
|
|
77
|
-
return format;
|
|
78
|
-
console.error(chalk.red(`projscan ${commandName} does not support --format ${format}.`));
|
|
79
|
-
console.error(chalk.dim(`Supported formats: ${formatList(supported)}`));
|
|
80
|
-
process.exit(1);
|
|
63
|
+
return assertCliFormatSupported(commandName, program.opts().format);
|
|
81
64
|
}
|
|
82
65
|
export function getRootPath() {
|
|
83
66
|
return process.cwd();
|
|
@@ -92,28 +75,13 @@ export async function loadProjectConfig() {
|
|
|
92
75
|
});
|
|
93
76
|
}
|
|
94
77
|
export async function filterIssuesByChangedFiles(issues, rootPath, baseRef) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
writeChangedOnlyNotice(changedFilesAvailableMessage(result.baseRef, result.files.length), format, quiet, 'dim');
|
|
103
|
-
const filtered = filterIssuesToChangedFiles(issues, result.files);
|
|
104
|
-
const filterMessage = changedIssueFilterMessage(filtered);
|
|
105
|
-
if (filterMessage)
|
|
106
|
-
writeChangedOnlyNotice(filterMessage, format, quiet, 'dim');
|
|
107
|
-
return filtered.issues;
|
|
108
|
-
}
|
|
109
|
-
function writeChangedOnlyNotice(message, format, quiet, style) {
|
|
110
|
-
if (quiet)
|
|
111
|
-
return;
|
|
112
|
-
if (format !== 'console') {
|
|
113
|
-
console.error(message.trim());
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
console.error(style === 'warning' ? chalk.yellow(message) : chalk.dim(message));
|
|
78
|
+
return await filterIssuesByChangedFilesForCli({
|
|
79
|
+
issues,
|
|
80
|
+
rootPath,
|
|
81
|
+
baseRef,
|
|
82
|
+
format: getFormat(),
|
|
83
|
+
quiet: Boolean(program.opts().quiet),
|
|
84
|
+
});
|
|
117
85
|
}
|
|
118
86
|
export function setupLogLevel() {
|
|
119
87
|
const opts = program.opts();
|
package/dist/cli/_shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/cli/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/cli/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAA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ACrB,OAAgB;IAEhB,OAAO,MAAM,kCAAkC,CAAC;QAC9C,OAAO;QACP,YAAY;QACZ,OAAO;QACP,MAAM,EAAE,SAAS,EAAE;QACnB,QAAQ,EAAE,WAAW,EAAE;KACxB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAgB;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC/B,OAAO,MAAM,kBAAkB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YAC/B,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ChangedFilesResult } from '../utils/changedFiles.js';
|
|
2
|
+
import type { ReportFormat } from '../types/config.js';
|
|
3
|
+
import type { Issue } from '../types.js';
|
|
4
|
+
type ChangedFilesLoader = (rootPath: string, explicitBaseRef?: string) => Promise<ChangedFilesResult>;
|
|
5
|
+
type NoticeWriter = (message: string) => void;
|
|
6
|
+
export interface ChangedOnlyFilterOptions {
|
|
7
|
+
issues: Issue[];
|
|
8
|
+
rootPath: string;
|
|
9
|
+
baseRef?: string;
|
|
10
|
+
format: ReportFormat;
|
|
11
|
+
quiet: boolean;
|
|
12
|
+
getChangedFiles?: ChangedFilesLoader;
|
|
13
|
+
write?: NoticeWriter;
|
|
14
|
+
}
|
|
15
|
+
export declare function filterIssuesByChangedFilesForCli(options: ChangedOnlyFilterOptions): Promise<Issue[]>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { getChangedFiles } from '../utils/changedFiles.js';
|
|
3
|
+
import { changedFilesAvailableMessage, changedFilesUnavailableMessage, changedIssueFilterMessage, filterIssuesToChangedFiles, } from './changedIssueFilter.js';
|
|
4
|
+
export async function filterIssuesByChangedFilesForCli(options) {
|
|
5
|
+
const loadChangedFiles = options.getChangedFiles ?? getChangedFiles;
|
|
6
|
+
const result = await loadChangedFiles(options.rootPath, options.baseRef);
|
|
7
|
+
if (!result.available) {
|
|
8
|
+
writeChangedOnlyNotice(changedFilesUnavailableMessage(result.reason), options.format, options.quiet, 'warning', options.write);
|
|
9
|
+
return options.issues;
|
|
10
|
+
}
|
|
11
|
+
writeChangedOnlyNotice(changedFilesAvailableMessage(result.baseRef, result.files.length), options.format, options.quiet, 'dim', options.write);
|
|
12
|
+
const filtered = filterIssuesToChangedFiles(options.issues, result.files);
|
|
13
|
+
const filterMessage = changedIssueFilterMessage(filtered);
|
|
14
|
+
if (filterMessage) {
|
|
15
|
+
writeChangedOnlyNotice(filterMessage, options.format, options.quiet, 'dim', options.write);
|
|
16
|
+
}
|
|
17
|
+
return filtered.issues;
|
|
18
|
+
}
|
|
19
|
+
function writeChangedOnlyNotice(message, format, quiet, style, write = console.error) {
|
|
20
|
+
if (quiet)
|
|
21
|
+
return;
|
|
22
|
+
if (format !== 'console') {
|
|
23
|
+
write(message.trim());
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
write(style === 'warning' ? chalk.yellow(message) : chalk.dim(message));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=changedOnly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,CAAC,KAAK,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC;AACzB,CAAC;AAED,SAAS,sBAAsB,CAC7B,OAAe,EACf,MAAoB,EACpB,KAAc,EACd,KAAwB,EACxB,QAAsB,OAAO,CAAC,KAAK;IAEnC,IAAI,KAAK;QAAE,OAAO;IAClB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACtB,OAAO;IACT,CAAC;IACD,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReportFormat } from '../types/config.js';
|
|
2
|
+
export type CliFormatFailure = (messages: string[]) => never;
|
|
3
|
+
export declare function resolveCliFormat(formatOption: unknown, fail?: CliFormatFailure): ReportFormat;
|
|
4
|
+
export declare function assertCliFormatSupported(commandName: string, formatOption: unknown, fail?: CliFormatFailure): ReportFormat;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { OUTPUT_FORMATS, formatList, getCommandFormatSupport } from '../utils/formatSupport.js';
|
|
3
|
+
export function resolveCliFormat(formatOption, fail = exitWithFormatMessages) {
|
|
4
|
+
const format = String(formatOption);
|
|
5
|
+
if (OUTPUT_FORMATS.includes(format))
|
|
6
|
+
return format;
|
|
7
|
+
fail([
|
|
8
|
+
chalk.red(`Unsupported --format ${format}.`),
|
|
9
|
+
chalk.dim(`Supported formats: ${formatList()}`),
|
|
10
|
+
]);
|
|
11
|
+
}
|
|
12
|
+
export function assertCliFormatSupported(commandName, formatOption, fail = exitWithFormatMessages) {
|
|
13
|
+
const format = resolveCliFormat(formatOption, fail);
|
|
14
|
+
const supported = getCommandFormatSupport(commandName);
|
|
15
|
+
if (!supported) {
|
|
16
|
+
fail([chalk.red(`Internal error: no --format support metadata for projscan ${commandName}.`)]);
|
|
17
|
+
}
|
|
18
|
+
if (supported.includes(format))
|
|
19
|
+
return format;
|
|
20
|
+
fail([
|
|
21
|
+
chalk.red(`projscan ${commandName} does not support --format ${format}.`),
|
|
22
|
+
chalk.dim(`Supported formats: ${formatList(supported)}`),
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
function exitWithFormatMessages(messages) {
|
|
26
|
+
for (const message of messages)
|
|
27
|
+
console.error(message);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=formatOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatOptions.js","sourceRoot":"","sources":["../../src/cli/formatOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAKhG,MAAM,UAAU,gBAAgB,CAC9B,YAAqB,EACrB,OAAyB,sBAAsB;IAE/C,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IACpC,IAAK,cAAoC,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAsB,CAAC;IAC1F,IAAI,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,wBAAwB,MAAM,GAAG,CAAC;QAC5C,KAAK,CAAC,GAAG,CAAC,sBAAsB,UAAU,EAAE,EAAE,CAAC;KAChD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,WAAmB,EACnB,YAAqB,EACrB,OAAyB,sBAAsB;IAE/C,MAAM,MAAM,GAAG,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,6DAA6D,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;IACjG,CAAC;IACD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9C,IAAI,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,YAAY,WAAW,8BAA8B,MAAM,GAAG,CAAC;QACzE,KAAK,CAAC,GAAG,CAAC,sBAAsB,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;KACzD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,QAAkB;IAChD,KAAK,MAAM,OAAO,IAAI,QAAQ;QAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/core/agentBrief.js
CHANGED
|
@@ -95,11 +95,16 @@ function swarmCoordinationHints(summary) {
|
|
|
95
95
|
const hints = toCoordinationHints(summary);
|
|
96
96
|
if (hints.length === 0)
|
|
97
97
|
return [];
|
|
98
|
+
const hintMessage = hints.join(' ');
|
|
99
|
+
const sessionBoundary = summary.evidence?.sessionSeparation.rememberedContext;
|
|
100
|
+
const message = sessionBoundary && !hintMessage.includes(sessionBoundary)
|
|
101
|
+
? `${hintMessage} ${sessionBoundary}`
|
|
102
|
+
: hintMessage;
|
|
98
103
|
return [
|
|
99
104
|
{
|
|
100
105
|
id: 'swarm-coordination',
|
|
101
106
|
label: 'Swarm coordination',
|
|
102
|
-
message
|
|
107
|
+
message,
|
|
103
108
|
command: 'projscan coordinate --format json',
|
|
104
109
|
},
|
|
105
110
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentBrief.js","sourceRoot":"","sources":["../../src/core/agentBrief.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAkB,MAAM,gBAAgB,C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AAgB,CAAC,QAA2B;IACnD,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,QAA0B;IAC9C,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAChC,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,IAAI,CAAC,KAAa;IACzB,OAAO,CACL,KAAK;SACF,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,WAAW,EAAE,IAAI,MAAM,CAC3B,CAAC;AACJ,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { babelCalleeName, babelQualifiedMemberName,
|
|
1
|
+
import { babelCalleeName, babelQualifiedMemberName, bindingIdentifierNames, collectMemberAliases, collectMemberReadIdents, isMemberExpressionNode, } from './astMembers.js';
|
|
2
2
|
import { isFunctionNode } from './astFunctionNodes.js';
|
|
3
3
|
import { childAstNodes, isDecisionPoint } from './astProgramSignals.js';
|
|
4
4
|
/**
|
|
@@ -34,8 +34,7 @@ export function functionParamNames(fnNode) {
|
|
|
34
34
|
const params = fnNode.params ?? [];
|
|
35
35
|
const out = new Set();
|
|
36
36
|
for (const param of params) {
|
|
37
|
-
const name
|
|
38
|
-
if (name)
|
|
37
|
+
for (const name of bindingIdentifierNames(param))
|
|
39
38
|
out.add(name);
|
|
40
39
|
}
|
|
41
40
|
return [...out];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astBodySignals.js","sourceRoot":"","sources":["../../src/core/astBodySignals.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"astBodySignals.js","sourceRoot":"","sources":["../../src/core/astBodySignals.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAYxE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAY;IAC3C,MAAM,IAAI,GAAI,MAA0B,CAAC,IAAI,CAAC;IAC9C,IAAI,CAAC,IAAI;QACP,OAAO;YACL,EAAE,EAAE,CAAC;YACL,SAAS,EAAE,EAAE;YACb,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,EAAE;YACnB,aAAa,EAAE,EAAE;YACjB,gBAAgB,EAAE,EAAE;YACpB,UAAU,EAAE,EAAE;SACf,CAAC;IACJ,MAAM,OAAO,GAAG,sBAAsB,EAAE,CAAC;IACzC,2BAA2B,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACnF,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,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S;QAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjD,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,gBAAgB;QAC9B,IAAI,CAAC,IAAI,KAAK,wBAAwB;QACtC,IAAI,CAAC,IAAI,KAAK,eAAe,CAC9B,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAU,EAAE,KAAwB;IACvE,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO;IAC9C,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;YAAE,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Node } from '@babel/types';
|
|
2
2
|
export declare function bindingIdentifierName(node: Node | null | undefined): string | null;
|
|
3
|
+
export declare function bindingIdentifierNames(node: Node | null | undefined): string[];
|
|
3
4
|
export declare function isMemberExpressionNode(node: Node): boolean;
|
|
4
5
|
/**
|
|
5
6
|
* Walk a member-expression chain (`a.b.c`, `req.body.x`, `process.env.SECRET`)
|
package/dist/core/astMembers.js
CHANGED
|
@@ -1,15 +1,44 @@
|
|
|
1
1
|
export function bindingIdentifierName(node) {
|
|
2
|
+
return bindingIdentifierNames(node)[0] ?? null;
|
|
3
|
+
}
|
|
4
|
+
const BINDING_NAME_READERS = {
|
|
5
|
+
Identifier: identifierBindingNames,
|
|
6
|
+
AssignmentPattern: assignmentPatternBindingNames,
|
|
7
|
+
RestElement: restElementBindingNames,
|
|
8
|
+
ObjectPattern: objectPatternBindingNames,
|
|
9
|
+
ArrayPattern: arrayPatternBindingNames,
|
|
10
|
+
};
|
|
11
|
+
export function bindingIdentifierNames(node) {
|
|
2
12
|
if (!node)
|
|
3
|
-
return
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
return [];
|
|
14
|
+
return BINDING_NAME_READERS[node.type]?.(node) ?? [];
|
|
15
|
+
}
|
|
16
|
+
function identifierBindingNames(node) {
|
|
17
|
+
const name = node.name;
|
|
18
|
+
return name ? [name] : [];
|
|
19
|
+
}
|
|
20
|
+
function assignmentPatternBindingNames(node) {
|
|
21
|
+
return bindingIdentifierNames(node.left);
|
|
22
|
+
}
|
|
23
|
+
function restElementBindingNames(node) {
|
|
24
|
+
return bindingIdentifierNames(node.argument);
|
|
25
|
+
}
|
|
26
|
+
function objectPatternBindingNames(node) {
|
|
27
|
+
return (node.properties ?? []).flatMap(bindingNamesFromObjectPatternProperty);
|
|
28
|
+
}
|
|
29
|
+
function arrayPatternBindingNames(node) {
|
|
30
|
+
return (node.elements ?? []).flatMap(bindingIdentifierNames);
|
|
31
|
+
}
|
|
32
|
+
function bindingNamesFromObjectPatternProperty(property) {
|
|
33
|
+
if (!property)
|
|
34
|
+
return [];
|
|
35
|
+
if (property.type === 'RestElement') {
|
|
36
|
+
return bindingIdentifierNames(property.argument);
|
|
11
37
|
}
|
|
12
|
-
|
|
38
|
+
if (property.type !== 'ObjectProperty')
|
|
39
|
+
return [];
|
|
40
|
+
const value = property.value;
|
|
41
|
+
return bindingIdentifierNames(value);
|
|
13
42
|
}
|
|
14
43
|
export function isMemberExpressionNode(node) {
|
|
15
44
|
return node.type === 'MemberExpression' || node.type === 'OptionalMemberExpression';
|