scai 0.1.178 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -260
- package/dist/__tests__/CommitSuggesterCmd.test.js +112 -0
- package/dist/__tests__/CommitSuggesterCmd.test.js.map +1 -0
- package/dist/__tests__/EvalReportCmd.test.js +645 -0
- package/dist/__tests__/EvalReportCmd.test.js.map +1 -0
- package/dist/__tests__/ModelCmd.test.js +64 -0
- package/dist/__tests__/ModelCmd.test.js.map +1 -0
- package/dist/__tests__/agents/agentActions.test.js +345 -0
- package/dist/__tests__/agents/agentActions.test.js.map +1 -0
- package/dist/__tests__/agents/agentFeedback.test.js +118 -0
- package/dist/__tests__/agents/agentFeedback.test.js.map +1 -0
- package/dist/__tests__/agents/agentGeneralScope.test.js +74 -0
- package/dist/__tests__/agents/agentGeneralScope.test.js.map +1 -0
- package/dist/__tests__/agents/agentLoop.test.js +1723 -0
- package/dist/__tests__/agents/agentLoop.test.js.map +1 -0
- package/dist/__tests__/agents/agentPolicyState.test.js +948 -0
- package/dist/__tests__/agents/agentPolicyState.test.js.map +1 -0
- package/dist/__tests__/agents/agentReadEvidence.test.js +170 -0
- package/dist/__tests__/agents/agentReadEvidence.test.js.map +1 -0
- package/dist/__tests__/agents/agentReadPersistence.test.js +129 -0
- package/dist/__tests__/agents/agentReadPersistence.test.js.map +1 -0
- package/dist/__tests__/agents/agentResumeCheckpoint.test.js +90 -0
- package/dist/__tests__/agents/agentResumeCheckpoint.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchBatchPlanner.test.js +289 -0
- package/dist/__tests__/agents/agentSearchBatchPlanner.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchOwnership.test.js +166 -0
- package/dist/__tests__/agents/agentSearchOwnership.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchRanking.test.js +139 -0
- package/dist/__tests__/agents/agentSearchRanking.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchRouting.test.js +584 -0
- package/dist/__tests__/agents/agentSearchRouting.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchScoring.test.js +23 -0
- package/dist/__tests__/agents/agentSearchScoring.test.js.map +1 -0
- package/dist/__tests__/agents/agentSearchShared.test.js +78 -0
- package/dist/__tests__/agents/agentSearchShared.test.js.map +1 -0
- package/dist/__tests__/agents/agentStateMachine.test.js +58 -0
- package/dist/__tests__/agents/agentStateMachine.test.js.map +1 -0
- package/dist/__tests__/agents/agentTaskPersistence.test.js +156 -0
- package/dist/__tests__/agents/agentTaskPersistence.test.js.map +1 -0
- package/dist/__tests__/agents/agentTools.test.js +69 -0
- package/dist/__tests__/agents/agentTools.test.js.map +1 -0
- package/dist/__tests__/agents/agentTransform.test.js +779 -0
- package/dist/__tests__/agents/agentTransform.test.js.map +1 -0
- package/dist/__tests__/agents/analysisPlanGenStep.test.js +157 -0
- package/dist/__tests__/agents/analysisPlanGenStep.test.js.map +1 -0
- package/dist/__tests__/agents/answerOnlyCompletion.test.js +75 -0
- package/dist/__tests__/agents/answerOnlyCompletion.test.js.map +1 -0
- package/dist/__tests__/agents/decideNextAction.test.js +1662 -0
- package/dist/__tests__/agents/decideNextAction.test.js.map +1 -0
- package/dist/__tests__/agents/deriveFocusFromSearchStep.test.js +258 -0
- package/dist/__tests__/agents/deriveFocusFromSearchStep.test.js.map +1 -0
- package/dist/__tests__/agents/evidenceVerifierStep.test.js +113 -0
- package/dist/__tests__/agents/evidenceVerifierStep.test.js.map +1 -0
- package/dist/__tests__/agents/executionPolicyResolver.test.js +208 -0
- package/dist/__tests__/agents/executionPolicyResolver.test.js.map +1 -0
- package/dist/__tests__/agents/fileCheckStep.test.js +299 -0
- package/dist/__tests__/agents/fileCheckStep.test.js.map +1 -0
- package/dist/__tests__/agents/giveUpEvaluatorStep.test.js +35 -0
- package/dist/__tests__/agents/giveUpEvaluatorStep.test.js.map +1 -0
- package/dist/__tests__/agents/guardState.test.js +297 -0
- package/dist/__tests__/agents/guardState.test.js.map +1 -0
- package/dist/__tests__/agents/mainAgentHeuristics.test.js +72 -0
- package/dist/__tests__/agents/mainAgentHeuristics.test.js.map +1 -0
- package/dist/__tests__/agents/objectiveEvaluatorStep.test.js +60 -0
- package/dist/__tests__/agents/objectiveEvaluatorStep.test.js.map +1 -0
- package/dist/__tests__/agents/outerLoopRecoveryEvaluator.test.js +207 -0
- package/dist/__tests__/agents/outerLoopRecoveryEvaluator.test.js.map +1 -0
- package/dist/__tests__/agents/prompting.test.js +363 -0
- package/dist/__tests__/agents/prompting.test.js.map +1 -0
- package/dist/__tests__/agents/readinessGateStep.test.js +180 -0
- package/dist/__tests__/agents/readinessGateStep.test.js.map +1 -0
- package/dist/__tests__/agents/reasonNextStep.test.js +56 -0
- package/dist/__tests__/agents/reasonNextStep.test.js.map +1 -0
- package/dist/__tests__/agents/reasonNextTaskStep.test.js +284 -0
- package/dist/__tests__/agents/reasonNextTaskStep.test.js.map +1 -0
- package/dist/__tests__/agents/resolveAgentTargetClassification.test.js +170 -0
- package/dist/__tests__/agents/resolveAgentTargetClassification.test.js.map +1 -0
- package/dist/__tests__/agents/resolveProgressState.test.js +526 -0
- package/dist/__tests__/agents/resolveProgressState.test.js.map +1 -0
- package/dist/__tests__/agents/resumeCheckpoint.test.js +50 -0
- package/dist/__tests__/agents/resumeCheckpoint.test.js.map +1 -0
- package/dist/__tests__/agents/routingDecisionStep.test.js +134 -0
- package/dist/__tests__/agents/routingDecisionStep.test.js.map +1 -0
- package/dist/__tests__/agents/scopeClassificationStep.test.js +118 -0
- package/dist/__tests__/agents/scopeClassificationStep.test.js.map +1 -0
- package/dist/__tests__/agents/searchContext.test.js +97 -0
- package/dist/__tests__/agents/searchContext.test.js.map +1 -0
- package/dist/__tests__/agents/selectRelevantSourcesStep.test.js +73 -0
- package/dist/__tests__/agents/selectRelevantSourcesStep.test.js.map +1 -0
- package/dist/__tests__/agents/structuredOutput.test.js +45 -0
- package/dist/__tests__/agents/structuredOutput.test.js.map +1 -0
- package/dist/__tests__/agents/transformPlanGenStep.fallback.test.js +59 -0
- package/dist/__tests__/agents/transformPlanGenStep.fallback.test.js.map +1 -0
- package/dist/__tests__/agents/transformPlanGenStep.test.js +92 -0
- package/dist/__tests__/agents/transformPlanGenStep.test.js.map +1 -0
- package/dist/__tests__/agents/understandIntentStep.test.js +237 -0
- package/dist/__tests__/agents/understandIntentStep.test.js.map +1 -0
- package/dist/__tests__/agents/understandResumeContext.test.js +65 -0
- package/dist/__tests__/agents/understandResumeContext.test.js.map +1 -0
- package/dist/__tests__/agents/understandScope.test.js +227 -0
- package/dist/__tests__/agents/understandScope.test.js.map +1 -0
- package/dist/__tests__/agents/validateChangesStep.test.js +52 -0
- package/dist/__tests__/agents/validateChangesStep.test.js.map +1 -0
- package/dist/__tests__/askCommandTaskBinding.test.js +176 -0
- package/dist/__tests__/askCommandTaskBinding.test.js.map +1 -0
- package/dist/__tests__/commandVisibility.test.js +25 -0
- package/dist/__tests__/commandVisibility.test.js.map +1 -0
- package/dist/__tests__/config.devOutput.test.js +82 -0
- package/dist/__tests__/config.devOutput.test.js.map +1 -0
- package/dist/__tests__/currentContext.test.js +43 -0
- package/dist/__tests__/currentContext.test.js.map +1 -0
- package/dist/__tests__/daemonWorker.test.js +51 -0
- package/dist/__tests__/daemonWorker.test.js.map +1 -0
- package/dist/__tests__/dialogState.test.js +113 -0
- package/dist/__tests__/dialogState.test.js.map +1 -0
- package/dist/__tests__/evalCommands.test.js +506 -0
- package/dist/__tests__/evalCommands.test.js.map +1 -0
- package/dist/__tests__/evalCommandsSummary.test.js +68 -0
- package/dist/__tests__/evalCommandsSummary.test.js.map +1 -0
- package/dist/__tests__/example.test.js +1 -0
- package/dist/__tests__/example.test.js.map +1 -0
- package/dist/__tests__/factory.commitCommand.test.js +45 -0
- package/dist/__tests__/factory.commitCommand.test.js.map +1 -0
- package/dist/__tests__/factory.devOutputCommand.test.js +122 -0
- package/dist/__tests__/factory.devOutputCommand.test.js.map +1 -0
- package/dist/__tests__/factory.evalCommands.test.js +38 -0
- package/dist/__tests__/factory.evalCommands.test.js.map +1 -0
- package/dist/__tests__/factory.planCommand.test.js +35 -0
- package/dist/__tests__/factory.planCommand.test.js.map +1 -0
- package/dist/__tests__/factory.setupCommand.test.js +34 -0
- package/dist/__tests__/factory.setupCommand.test.js.map +1 -0
- package/dist/__tests__/factory.statusCommand.test.js +54 -0
- package/dist/__tests__/factory.statusCommand.test.js.map +1 -0
- package/dist/__tests__/fileRules/queryTokenRules.test.js +35 -0
- package/dist/__tests__/fileRules/queryTokenRules.test.js.map +1 -0
- package/dist/__tests__/fileRules/searchPathClassification.test.js +57 -0
- package/dist/__tests__/fileRules/searchPathClassification.test.js.map +1 -0
- package/dist/__tests__/generate.ollamaRecovery.test.js +344 -0
- package/dist/__tests__/generate.ollamaRecovery.test.js.map +1 -0
- package/dist/__tests__/index.modelStartup.test.js +24 -0
- package/dist/__tests__/index.modelStartup.test.js.map +1 -0
- package/dist/__tests__/indexCmd.test.js +85 -0
- package/dist/__tests__/indexCmd.test.js.map +1 -0
- package/dist/__tests__/indexSlashCommand.test.js +50 -0
- package/dist/__tests__/indexSlashCommand.test.js.map +1 -0
- package/dist/__tests__/ollamaService.test.js +103 -0
- package/dist/__tests__/ollamaService.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/codeTransformModule.small-file.test.js +68 -0
- package/dist/__tests__/pipeline/modules/codeTransformModule.small-file.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/commitSuggesterModule.test.js +68 -0
- package/dist/__tests__/pipeline/modules/commitSuggesterModule.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/fileSearchModule.test.js +284 -0
- package/dist/__tests__/pipeline/modules/fileSearchModule.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/finalAnswerModule.test.js +1139 -0
- package/dist/__tests__/pipeline/modules/finalAnswerModule.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/readFileModule.test.js +146 -0
- package/dist/__tests__/pipeline/modules/readFileModule.test.js.map +1 -0
- package/dist/__tests__/pipeline/modules/semanticAnalysisModule.test.js +192 -0
- package/dist/__tests__/pipeline/modules/semanticAnalysisModule.test.js.map +1 -0
- package/dist/__tests__/repoIdentity.test.js +31 -0
- package/dist/__tests__/repoIdentity.test.js.map +1 -0
- package/dist/__tests__/resumeContext.test.js +87 -0
- package/dist/__tests__/resumeContext.test.js.map +1 -0
- package/dist/__tests__/resumeState.test.js +239 -0
- package/dist/__tests__/resumeState.test.js.map +1 -0
- package/dist/__tests__/search/SearchOrchestrator.test.js +836 -0
- package/dist/__tests__/search/SearchOrchestrator.test.js.map +1 -0
- package/dist/__tests__/shellDialogUi.test.js +52 -0
- package/dist/__tests__/shellDialogUi.test.js.map +1 -0
- package/dist/__tests__/shellSession.test.js +102 -0
- package/dist/__tests__/shellSession.test.js.map +1 -0
- package/dist/__tests__/statusOwner.test.js +215 -0
- package/dist/__tests__/statusOwner.test.js.map +1 -0
- package/dist/__tests__/testing/contextEval.test.js +244 -0
- package/dist/__tests__/testing/contextEval.test.js.map +1 -0
- package/dist/__tests__/testing/harnessArtifacts.test.js +124 -0
- package/dist/__tests__/testing/harnessArtifacts.test.js.map +1 -0
- package/dist/__tests__/testing/llmTraceSession.test.js +67 -0
- package/dist/__tests__/testing/llmTraceSession.test.js.map +1 -0
- package/dist/__tests__/testing/registerDevCliCommands.test.js +35 -0
- package/dist/__tests__/testing/registerDevCliCommands.test.js.map +1 -0
- package/dist/__tests__/testing/runDiagnosis.test.js +159 -0
- package/dist/__tests__/testing/runDiagnosis.test.js.map +1 -0
- package/dist/__tests__/testing/runtimeLogReader.test.js +66 -0
- package/dist/__tests__/testing/runtimeLogReader.test.js.map +1 -0
- package/dist/__tests__/testing/testCommands.test.js +53 -0
- package/dist/__tests__/testing/testCommands.test.js.map +1 -0
- package/dist/__tests__/utils/compileSearchQuery.test.js +38 -0
- package/dist/__tests__/utils/compileSearchQuery.test.js.map +1 -0
- package/dist/__tests__/utils/consolePresentation.test.js +105 -0
- package/dist/__tests__/utils/consolePresentation.test.js.map +1 -0
- package/dist/__tests__/utils/extractFileReferences.test.js +41 -0
- package/dist/__tests__/utils/extractFileReferences.test.js.map +1 -0
- package/dist/__tests__/utils/log.test.js +34 -0
- package/dist/__tests__/utils/log.test.js.map +1 -0
- package/dist/__tests__/utils/runtimeLogger.test.js +200 -0
- package/dist/__tests__/utils/runtimeLogger.test.js.map +1 -0
- package/dist/__tests__/utils/spinner.test.js +31 -0
- package/dist/__tests__/utils/spinner.test.js.map +1 -0
- package/dist/__tests__/utils/verifyFocusPreference.test.js +41 -0
- package/dist/__tests__/utils/verifyFocusPreference.test.js.map +1 -0
- package/dist/agent/actions/index.js +301 -0
- package/dist/agent/actions/index.js.map +1 -0
- package/dist/agent/actions/normalize.js +360 -0
- package/dist/agent/actions/normalize.js.map +1 -0
- package/dist/agent/actions/schemas.js +129 -0
- package/dist/agent/actions/schemas.js.map +1 -0
- package/dist/agent/evidence/index.js +320 -0
- package/dist/agent/evidence/index.js.map +1 -0
- package/dist/agent/feedback/index.js +187 -0
- package/dist/agent/feedback/index.js.map +1 -0
- package/dist/agent/finalization/index.js +35 -0
- package/dist/agent/finalization/index.js.map +1 -0
- package/dist/agent/index.js +126 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/logging/index.js +350 -0
- package/dist/agent/logging/index.js.map +1 -0
- package/dist/agent/persistence/boot.js +58 -0
- package/dist/agent/persistence/boot.js.map +1 -0
- package/dist/agent/persistence/currentTask.js +36 -0
- package/dist/agent/persistence/currentTask.js.map +1 -0
- package/dist/agent/persistence/hydrate.js +42 -0
- package/dist/agent/persistence/hydrate.js.map +1 -0
- package/dist/agent/persistence/index.js +15 -0
- package/dist/agent/persistence/index.js.map +1 -0
- package/dist/agent/persistence/snapshots.js +97 -0
- package/dist/agent/persistence/snapshots.js.map +1 -0
- package/dist/agent/persistence/steps.js +95 -0
- package/dist/agent/persistence/steps.js.map +1 -0
- package/dist/agent/persistence/tasks.js +195 -0
- package/dist/agent/persistence/tasks.js.map +1 -0
- package/dist/agent/persistence/turns.js +92 -0
- package/dist/agent/persistence/turns.js.map +1 -0
- package/dist/agent/policy/ambiguityResolution.js +226 -0
- package/dist/agent/policy/ambiguityResolution.js.map +1 -0
- package/dist/agent/policy/contracts.js +2 -0
- package/dist/agent/policy/contracts.js.map +1 -0
- package/dist/agent/policy/coveragePolicy.js +309 -0
- package/dist/agent/policy/coveragePolicy.js.map +1 -0
- package/dist/agent/policy/endDecisionPolicy.js +31 -0
- package/dist/agent/policy/endDecisionPolicy.js.map +1 -0
- package/dist/agent/policy/index.js +344 -0
- package/dist/agent/policy/index.js.map +1 -0
- package/dist/agent/policy/loopReview.js +778 -0
- package/dist/agent/policy/loopReview.js.map +1 -0
- package/dist/agent/policy/readinessPolicy.js +108 -0
- package/dist/agent/policy/readinessPolicy.js.map +1 -0
- package/dist/agent/policy/resolutionPipeline.js +356 -0
- package/dist/agent/policy/resolutionPipeline.js.map +1 -0
- package/dist/agent/policy/targetClassification.js +33 -0
- package/dist/agent/policy/targetClassification.js.map +1 -0
- package/dist/agent/prompting/actionChoice.js +90 -0
- package/dist/agent/prompting/actionChoice.js.map +1 -0
- package/dist/agent/prompting/finalAnswer.js +38 -0
- package/dist/agent/prompting/finalAnswer.js.map +1 -0
- package/dist/agent/prompting/index.js +14 -0
- package/dist/agent/prompting/index.js.map +1 -0
- package/dist/agent/prompting/plan.js +59 -0
- package/dist/agent/prompting/plan.js.map +1 -0
- package/dist/agent/prompting/transform.js +175 -0
- package/dist/agent/prompting/transform.js.map +1 -0
- package/dist/agent/prompting/understand.js +70 -0
- package/dist/agent/prompting/understand.js.map +1 -0
- package/dist/agent/read/freshness.js +29 -0
- package/dist/agent/read/freshness.js.map +1 -0
- package/dist/agent/read/fullReadPrompt.js +43 -0
- package/dist/agent/read/fullReadPrompt.js.map +1 -0
- package/dist/agent/read/index.js +140 -0
- package/dist/agent/read/index.js.map +1 -0
- package/dist/agent/read/persistence.js +88 -0
- package/dist/agent/read/persistence.js.map +1 -0
- package/dist/agent/read/summarizeReadEvidence.js +733 -0
- package/dist/agent/read/summarizeReadEvidence.js.map +1 -0
- package/dist/agent/read/targetResolution.js +126 -0
- package/dist/agent/read/targetResolution.js.map +1 -0
- package/dist/agent/resume/checkpoint.js +41 -0
- package/dist/agent/resume/checkpoint.js.map +1 -0
- package/dist/agent/runtime/lifecycle.js +67 -0
- package/dist/agent/runtime/lifecycle.js.map +1 -0
- package/dist/agent/runtime/progress.js +178 -0
- package/dist/agent/runtime/progress.js.map +1 -0
- package/dist/agent/runtime/runAgentLoop.js +402 -0
- package/dist/agent/runtime/runAgentLoop.js.map +1 -0
- package/dist/agent/runtime/runAgentPlanOnly.js +127 -0
- package/dist/agent/runtime/runAgentPlanOnly.js.map +1 -0
- package/dist/agent/runtime/understand.js +336 -0
- package/dist/agent/runtime/understand.js.map +1 -0
- package/dist/agent/search/batchPlanner.js +274 -0
- package/dist/agent/search/batchPlanner.js.map +1 -0
- package/dist/agent/search/candidateRetentionPolicy.js +184 -0
- package/dist/agent/search/candidateRetentionPolicy.js.map +1 -0
- package/dist/agent/search/directory.js +51 -0
- package/dist/agent/search/directory.js.map +1 -0
- package/dist/agent/search/exactTarget.js +151 -0
- package/dist/agent/search/exactTarget.js.map +1 -0
- package/dist/agent/search/fragment.js +110 -0
- package/dist/agent/search/fragment.js.map +1 -0
- package/dist/agent/search/index.js +166 -0
- package/dist/agent/search/index.js.map +1 -0
- package/dist/agent/search/laneClassifier.js +119 -0
- package/dist/agent/search/laneClassifier.js.map +1 -0
- package/dist/agent/search/limits.js +10 -0
- package/dist/agent/search/limits.js.map +1 -0
- package/dist/agent/search/ranking.js +22 -0
- package/dist/agent/search/ranking.js.map +1 -0
- package/dist/agent/search/regex.js +83 -0
- package/dist/agent/search/regex.js.map +1 -0
- package/dist/agent/search/routePolicy.js +11 -0
- package/dist/agent/search/routePolicy.js.map +1 -0
- package/dist/agent/search/searchContext.js +128 -0
- package/dist/agent/search/searchContext.js.map +1 -0
- package/dist/agent/search/semantic.js +113 -0
- package/dist/agent/search/semantic.js.map +1 -0
- package/dist/agent/search/semanticIndexSearch.js +202 -0
- package/dist/agent/search/semanticIndexSearch.js.map +1 -0
- package/dist/agent/search/shared.js +283 -0
- package/dist/agent/search/shared.js.map +1 -0
- package/dist/agent/search/shell.js +202 -0
- package/dist/agent/search/shell.js.map +1 -0
- package/dist/agent/search/snippetEvidence.js +57 -0
- package/dist/agent/search/snippetEvidence.js.map +1 -0
- package/dist/agent/search/types.js +2 -0
- package/dist/agent/search/types.js.map +1 -0
- package/dist/agent/state/index.js +99 -0
- package/dist/agent/state/index.js.map +1 -0
- package/dist/agent/state/memory.js +56 -0
- package/dist/agent/state/memory.js.map +1 -0
- package/dist/agent/structuredOutput/index.js +28 -0
- package/dist/agent/structuredOutput/index.js.map +1 -0
- package/dist/agent/tools/index.js +199 -0
- package/dist/agent/tools/index.js.map +1 -0
- package/dist/agent/transform/index.js +519 -0
- package/dist/agent/transform/index.js.map +1 -0
- package/dist/agent/transform/syntax.js +49 -0
- package/dist/agent/transform/syntax.js.map +1 -0
- package/dist/agent/types.js +20 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/agents/actionRegistry.js +114 -0
- package/dist/agents/actionRegistry.js.map +1 -0
- package/dist/agents/agent.js +5 -0
- package/dist/agents/agent.js.map +1 -0
- package/dist/agents/agentActions.js +5 -0
- package/dist/agents/agentActions.js.map +1 -0
- package/dist/agents/agentEvidence.js +5 -0
- package/dist/agents/agentEvidence.js.map +1 -0
- package/dist/agents/agentFeedback.js +5 -0
- package/dist/agents/agentFeedback.js.map +1 -0
- package/dist/agents/agentLogging.js +5 -0
- package/dist/agents/agentLogging.js.map +1 -0
- package/dist/agents/agentLoop.js +5 -0
- package/dist/agents/agentLoop.js.map +1 -0
- package/dist/agents/agentMemory.js +5 -0
- package/dist/agents/agentMemory.js.map +1 -0
- package/dist/agents/agentPlanMode.js +5 -0
- package/dist/agents/agentPlanMode.js.map +1 -0
- package/dist/agents/agentPolicyState.js +5 -0
- package/dist/agents/agentPolicyState.js.map +1 -0
- package/dist/agents/agentProgress.js +93 -0
- package/dist/agents/agentProgress.js.map +1 -0
- package/dist/agents/agentSchemas.js +5 -0
- package/dist/agents/agentSchemas.js.map +1 -0
- package/dist/agents/agentSearchScoring.js +5 -0
- package/dist/agents/agentSearchScoring.js.map +1 -0
- package/dist/agents/agentStateMachine.js +5 -0
- package/dist/agents/agentStateMachine.js.map +1 -0
- package/dist/agents/agentTools.js +5 -0
- package/dist/agents/agentTools.js.map +1 -0
- package/dist/agents/agentTypes.js +5 -0
- package/dist/agents/agentTypes.js.map +1 -0
- package/dist/agents/agentUnderstand.js +5 -0
- package/dist/agents/agentUnderstand.js.map +1 -0
- package/dist/agents/analysisPlanGenStep.js +194 -17
- package/dist/agents/analysisPlanGenStep.js.map +1 -0
- package/dist/agents/answerOnlyCompletion.js +32 -0
- package/dist/agents/answerOnlyCompletion.js.map +1 -0
- package/dist/agents/collaboratorStep.js +1 -0
- package/dist/agents/collaboratorStep.js.map +1 -0
- package/dist/agents/decideNextAction.js +444 -0
- package/dist/agents/decideNextAction.js.map +1 -0
- package/dist/agents/deriveFocusFromSearchStep.js +83 -0
- package/dist/agents/deriveFocusFromSearchStep.js.map +1 -0
- package/dist/agents/evidenceVerifierStep.js +104 -13
- package/dist/agents/evidenceVerifierStep.js.map +1 -0
- package/dist/agents/fileCheckStep.js +381 -12
- package/dist/agents/fileCheckStep.js.map +1 -0
- package/dist/agents/giveUpEvaluatorStep.js +63 -0
- package/dist/agents/giveUpEvaluatorStep.js.map +1 -0
- package/dist/agents/guardPolicy.js +20 -0
- package/dist/agents/guardPolicy.js.map +1 -0
- package/dist/agents/guards/executionPolicyResolver.js +165 -0
- package/dist/agents/guards/executionPolicyResolver.js.map +1 -0
- package/dist/agents/guards/guardState.js +195 -0
- package/dist/agents/guards/guardState.js.map +1 -0
- package/dist/agents/guards/resolveProgressState.js +403 -0
- package/dist/agents/guards/resolveProgressState.js.map +1 -0
- package/dist/agents/infoPlanGenStep.js +66 -8
- package/dist/agents/infoPlanGenStep.js.map +1 -0
- package/dist/agents/integrateFeedbackStep.js +1 -0
- package/dist/agents/integrateFeedbackStep.js.map +1 -0
- package/dist/agents/iterationFileSelector.js +8 -7
- package/dist/agents/iterationFileSelector.js.map +1 -0
- package/dist/agents/mainAgentActivityLog.js +85 -0
- package/dist/agents/mainAgentActivityLog.js.map +1 -0
- package/dist/agents/mainAgentHeuristics.js +173 -0
- package/dist/agents/mainAgentHeuristics.js.map +1 -0
- package/dist/agents/mainAgentVerify.js +159 -0
- package/dist/agents/mainAgentVerify.js.map +1 -0
- package/dist/agents/objectiveEvaluatorStep.js +103 -0
- package/dist/agents/objectiveEvaluatorStep.js.map +1 -0
- package/dist/agents/outerLoopRecoveryEvaluator.js +108 -0
- package/dist/agents/outerLoopRecoveryEvaluator.js.map +1 -0
- package/dist/agents/readinessGateStep.js +95 -9
- package/dist/agents/readinessGateStep.js.map +1 -0
- package/dist/agents/reasonNextStep.js +9 -8
- package/dist/agents/reasonNextStep.js.map +1 -0
- package/dist/agents/reasonNextTaskStep.js +267 -144
- package/dist/agents/reasonNextTaskStep.js.map +1 -0
- package/dist/agents/researchPlanGenStep.js +61 -25
- package/dist/agents/researchPlanGenStep.js.map +1 -0
- package/dist/agents/resolveAgentTargetClassification.js +5 -0
- package/dist/agents/resolveAgentTargetClassification.js.map +1 -0
- package/dist/agents/resolveExecutionModeStep.js +1 -0
- package/dist/agents/resolveExecutionModeStep.js.map +1 -0
- package/dist/agents/resolveExplicitTargetsStep.js +74 -0
- package/dist/agents/resolveExplicitTargetsStep.js.map +1 -0
- package/dist/agents/routingDecisionStep.js +58 -11
- package/dist/agents/routingDecisionStep.js.map +1 -0
- package/dist/agents/scopeClassificationStep.js +66 -3
- package/dist/agents/scopeClassificationStep.js.map +1 -0
- package/dist/agents/selectRelevantSourcesStep.js +13 -5
- package/dist/agents/selectRelevantSourcesStep.js.map +1 -0
- package/dist/agents/structuralPreloadStep.js +3 -4
- package/dist/agents/structuralPreloadStep.js.map +1 -0
- package/dist/agents/transformPlanGenStep.js +105 -18
- package/dist/agents/transformPlanGenStep.js.map +1 -0
- package/dist/agents/understandIntentStep.js +237 -17
- package/dist/agents/understandIntentStep.js.map +1 -0
- package/dist/agents/validateChangesStep.js +16 -2
- package/dist/agents/validateChangesStep.js.map +1 -0
- package/dist/agents/writeFileStep.js +1 -0
- package/dist/agents/writeFileStep.js.map +1 -0
- package/dist/commands/AskCmd.js +139 -44
- package/dist/commands/AskCmd.js.map +1 -0
- package/dist/commands/BackupCmd.js +1 -0
- package/dist/commands/BackupCmd.js.map +1 -0
- package/dist/commands/ChangeLogUpdateCmd.js +1 -0
- package/dist/commands/ChangeLogUpdateCmd.js.map +1 -0
- package/dist/commands/CommitSuggesterCmd.js +55 -13
- package/dist/commands/CommitSuggesterCmd.js.map +1 -0
- package/dist/commands/DaemonCmd.js +52 -14
- package/dist/commands/DaemonCmd.js.map +1 -0
- package/dist/commands/DeleteIndex.js +1 -0
- package/dist/commands/DeleteIndex.js.map +1 -0
- package/dist/commands/EvalReportCmd.js +374 -0
- package/dist/commands/EvalReportCmd.js.map +1 -0
- package/dist/commands/FindCmd.js +1 -0
- package/dist/commands/FindCmd.js.map +1 -0
- package/dist/commands/GitCmd.js +1 -0
- package/dist/commands/GitCmd.js.map +1 -0
- package/dist/commands/IndexCmd.js +11 -79
- package/dist/commands/IndexCmd.js.map +1 -0
- package/dist/commands/InspectCmd.js +1 -0
- package/dist/commands/InspectCmd.js.map +1 -0
- package/dist/commands/ModelCmd.js +24 -0
- package/dist/commands/ModelCmd.js.map +1 -0
- package/dist/commands/ReadlineSingleton.js +1 -0
- package/dist/commands/ReadlineSingleton.js.map +1 -0
- package/dist/commands/ResetDbCmd.js +18 -1
- package/dist/commands/ResetDbCmd.js.map +1 -0
- package/dist/commands/ReviewCmd.js +1 -0
- package/dist/commands/ReviewCmd.js.map +1 -0
- package/dist/commands/StatusCmd.js +22 -0
- package/dist/commands/StatusCmd.js.map +1 -0
- package/dist/commands/StopDaemonCmd.js +1 -0
- package/dist/commands/StopDaemonCmd.js.map +1 -0
- package/dist/commands/SummaryCmd.js +1 -0
- package/dist/commands/SummaryCmd.js.map +1 -0
- package/dist/commands/SwitchCmd.js +9 -15
- package/dist/commands/SwitchCmd.js.map +1 -0
- package/dist/commands/TasksCmd.js +142 -57
- package/dist/commands/TasksCmd.js.map +1 -0
- package/dist/commands/TestCmd.js +66 -0
- package/dist/commands/TestCmd.js.map +1 -0
- package/dist/commands/WorkflowCmd.js +1 -0
- package/dist/commands/WorkflowCmd.js.map +1 -0
- package/dist/commands/commandVisibility.js +27 -0
- package/dist/commands/commandVisibility.js.map +1 -0
- package/dist/commands/evalCommands.js +1337 -0
- package/dist/commands/evalCommands.js.map +1 -0
- package/dist/commands/factory.js +206 -38
- package/dist/commands/factory.js.map +1 -0
- package/dist/config.js +62 -11
- package/dist/config.js.map +1 -0
- package/dist/constants.js +21 -3
- package/dist/constants.js.map +1 -0
- package/dist/context.js +33 -32
- package/dist/context.js.map +1 -0
- package/dist/daemon/daemonQueues.js +1 -20
- package/dist/daemon/daemonQueues.js.map +1 -0
- package/dist/daemon/daemonWorker.js +26 -37
- package/dist/daemon/daemonWorker.js.map +1 -0
- package/dist/daemon/generateSummaries.js +1 -0
- package/dist/daemon/generateSummaries.js.map +1 -0
- package/dist/daemon/runFolderCapsuleBatch.js +1 -0
- package/dist/daemon/runFolderCapsuleBatch.js.map +1 -0
- package/dist/daemon/runIndexingBatch.js +1 -0
- package/dist/daemon/runIndexingBatch.js.map +1 -0
- package/dist/daemon/runKgBatch.js +9 -1
- package/dist/daemon/runKgBatch.js.map +1 -0
- package/dist/db/backup.js +1 -0
- package/dist/db/backup.js.map +1 -0
- package/dist/db/client.js +18 -3
- package/dist/db/client.js.map +1 -0
- package/dist/db/fileIndex.js +110 -152
- package/dist/db/fileIndex.js.map +1 -0
- package/dist/db/functionExtractors/extractFromJava.js +1 -0
- package/dist/db/functionExtractors/extractFromJava.js.map +1 -0
- package/dist/db/functionExtractors/extractFromJs.js +1 -0
- package/dist/db/functionExtractors/extractFromJs.js.map +1 -0
- package/dist/db/functionExtractors/extractFromTs.js +1 -0
- package/dist/db/functionExtractors/extractFromTs.js.map +1 -0
- package/dist/db/functionExtractors/extractFromXML.js +1 -0
- package/dist/db/functionExtractors/extractFromXML.js.map +1 -0
- package/dist/db/functionExtractors/index.js +1 -0
- package/dist/db/functionExtractors/index.js.map +1 -0
- package/dist/db/functionIndex.js +9 -0
- package/dist/db/functionIndex.js.map +1 -0
- package/dist/db/schema.js +314 -99
- package/dist/db/schema.js.map +1 -0
- package/dist/db/sqlTemplates.js +1 -0
- package/dist/db/sqlTemplates.js.map +1 -0
- package/dist/fileRules/builtins.js +1 -0
- package/dist/fileRules/builtins.js.map +1 -0
- package/dist/fileRules/classifyFile.js +1 -0
- package/dist/fileRules/classifyFile.js.map +1 -0
- package/dist/fileRules/codeAllowedExtensions.js +1 -0
- package/dist/fileRules/codeAllowedExtensions.js.map +1 -0
- package/dist/fileRules/detectFileType.js +1 -0
- package/dist/fileRules/detectFileType.js.map +1 -0
- package/dist/fileRules/fileClassifier.js +1 -0
- package/dist/fileRules/fileClassifier.js.map +1 -0
- package/dist/fileRules/fileExceptions.js +1 -0
- package/dist/fileRules/fileExceptions.js.map +1 -0
- package/dist/fileRules/ignoredExtensions.js +1 -0
- package/dist/fileRules/ignoredExtensions.js.map +1 -0
- package/dist/fileRules/ignoredPaths.js +48 -5
- package/dist/fileRules/ignoredPaths.js.map +1 -0
- package/dist/fileRules/queryTokenRules.js +176 -0
- package/dist/fileRules/queryTokenRules.js.map +1 -0
- package/dist/fileRules/searchPathClassification.js +58 -0
- package/dist/fileRules/searchPathClassification.js.map +1 -0
- package/dist/fileRules/shouldIgnoreFiles.js +1 -0
- package/dist/fileRules/shouldIgnoreFiles.js.map +1 -0
- package/dist/fileRules/stopWords.js +9 -0
- package/dist/fileRules/stopWords.js.map +1 -0
- package/dist/fileRules/wellKnownRepoFiles.js +1 -0
- package/dist/fileRules/wellKnownRepoFiles.js.map +1 -0
- package/dist/git/commitSummary.js +227 -0
- package/dist/git/commitSummary.js.map +1 -0
- package/dist/github/api.js +1 -0
- package/dist/github/api.js.map +1 -0
- package/dist/github/auth.js +1 -0
- package/dist/github/auth.js.map +1 -0
- package/dist/github/github.js +1 -0
- package/dist/github/github.js.map +1 -0
- package/dist/github/githubAuthCheck.js +1 -0
- package/dist/github/githubAuthCheck.js.map +1 -0
- package/dist/github/postComments.js +1 -0
- package/dist/github/postComments.js.map +1 -0
- package/dist/github/repo.js +15 -24
- package/dist/github/repo.js.map +1 -0
- package/dist/github/token.js +1 -0
- package/dist/github/token.js.map +1 -0
- package/dist/github/types.js +1 -0
- package/dist/github/types.js.map +1 -0
- package/dist/index.js +318 -37
- package/dist/index.js.map +1 -0
- package/dist/lib/generate.js +264 -20
- package/dist/lib/generate.js.map +1 -0
- package/dist/lib/generateFolderCapsules.js +1 -0
- package/dist/lib/generateFolderCapsules.js.map +1 -0
- package/dist/lib/ollamaModelPolicy.js +59 -0
- package/dist/lib/ollamaModelPolicy.js.map +1 -0
- package/dist/lib/spinner.js +29 -9
- package/dist/lib/spinner.js.map +1 -0
- package/dist/modelSetup.js +25 -78
- package/dist/modelSetup.js.map +1 -0
- package/dist/pipeline/modules/changeLogModule.js +10 -1
- package/dist/pipeline/modules/changeLogModule.js.map +1 -0
- package/dist/pipeline/modules/cleanupModule.js +1 -0
- package/dist/pipeline/modules/cleanupModule.js.map +1 -0
- package/dist/pipeline/modules/codeTransformModule.js +10 -16
- package/dist/pipeline/modules/codeTransformModule.js.map +1 -0
- package/dist/pipeline/modules/commentModule.js +12 -0
- package/dist/pipeline/modules/commentModule.js.map +1 -0
- package/dist/pipeline/modules/commitSuggesterModule.js +82 -12
- package/dist/pipeline/modules/commitSuggesterModule.js.map +1 -0
- package/dist/pipeline/modules/contextReviewModule.js +12 -1
- package/dist/pipeline/modules/contextReviewModule.js.map +1 -0
- package/dist/pipeline/modules/dialogAnswerModule.js +58 -0
- package/dist/pipeline/modules/dialogAnswerModule.js.map +1 -0
- package/dist/pipeline/modules/fileSearchModule.js +5 -143
- package/dist/pipeline/modules/fileSearchModule.js.map +1 -0
- package/dist/pipeline/modules/finalAnswerModule.js +1176 -151
- package/dist/pipeline/modules/finalAnswerModule.js.map +1 -0
- package/dist/pipeline/modules/kgModule.js +18 -1
- package/dist/pipeline/modules/kgModule.js.map +1 -0
- package/dist/pipeline/modules/planAnswerModule.js +99 -0
- package/dist/pipeline/modules/planAnswerModule.js.map +1 -0
- package/dist/pipeline/modules/readFileModule.js +300 -0
- package/dist/pipeline/modules/readFileModule.js.map +1 -0
- package/dist/pipeline/modules/reviewModule.js +10 -1
- package/dist/pipeline/modules/reviewModule.js.map +1 -0
- package/dist/pipeline/modules/searchDbModule.js +159 -0
- package/dist/pipeline/modules/searchDbModule.js.map +1 -0
- package/dist/pipeline/modules/searchListDirectoryModule.js +62 -0
- package/dist/pipeline/modules/searchListDirectoryModule.js.map +1 -0
- package/dist/pipeline/modules/searchModuleShared.js +71 -0
- package/dist/pipeline/modules/searchModuleShared.js.map +1 -0
- package/dist/pipeline/modules/searchRegexModule.js +59 -0
- package/dist/pipeline/modules/searchRegexModule.js.map +1 -0
- package/dist/pipeline/modules/semanticAnalysisModule.js +185 -28
- package/dist/pipeline/modules/semanticAnalysisModule.js.map +1 -0
- package/dist/pipeline/modules/summaryModule.js +11 -1
- package/dist/pipeline/modules/summaryModule.js.map +1 -0
- package/dist/pipeline/registry/moduleRegistry.js +9 -0
- package/dist/pipeline/registry/moduleRegistry.js.map +1 -0
- package/dist/pipeline/runModulePipeline.js +1 -0
- package/dist/pipeline/runModulePipeline.js.map +1 -0
- package/dist/scripts/dbScriptSupport.js +172 -0
- package/dist/scripts/dbScriptSupport.js.map +1 -0
- package/dist/scripts/dbcheck.js +173 -267
- package/dist/scripts/dbcheck.js.map +1 -0
- package/dist/scripts/dboverview.js +161 -0
- package/dist/scripts/dboverview.js.map +1 -0
- package/dist/scripts/migrateDb.js +1 -0
- package/dist/scripts/migrateDb.js.map +1 -0
- package/dist/search/SearchOrchestrator.js +928 -0
- package/dist/search/SearchOrchestrator.js.map +1 -0
- package/dist/search/sharedRankingPolicy.js +283 -0
- package/dist/search/sharedRankingPolicy.js.map +1 -0
- package/dist/setup/reindexOwner.js +97 -0
- package/dist/setup/reindexOwner.js.map +1 -0
- package/dist/setup/setupOwner.js +100 -0
- package/dist/setup/setupOwner.js.map +1 -0
- package/dist/shell/dialogUi.js +81 -0
- package/dist/shell/dialogUi.js.map +1 -0
- package/dist/shellSession.js +126 -0
- package/dist/shellSession.js.map +1 -0
- package/dist/status/statusOwner.js +239 -0
- package/dist/status/statusOwner.js.map +1 -0
- package/dist/testing/contextEval.js +514 -0
- package/dist/testing/contextEval.js.map +1 -0
- package/dist/testing/fixtures/transform/small-file.input.js +5 -0
- package/dist/testing/fixtures/transform/small-file.input.js.map +1 -0
- package/dist/testing/harnessArtifacts.js +112 -0
- package/dist/testing/harnessArtifacts.js.map +1 -0
- package/dist/testing/llmTraceSession.js +67 -0
- package/dist/testing/llmTraceSession.js.map +1 -0
- package/dist/testing/registerDevCliCommands.js +43 -0
- package/dist/testing/registerDevCliCommands.js.map +1 -0
- package/dist/testing/runDiagnosis.js +248 -0
- package/dist/testing/runDiagnosis.js.map +1 -0
- package/dist/testing/runtimeLogReader.js +144 -0
- package/dist/testing/runtimeLogReader.js.map +1 -0
- package/dist/testing/testCommands.js +35 -303
- package/dist/testing/testCommands.js.map +1 -0
- package/dist/testing/testRegistry.js +233 -0
- package/dist/testing/testRegistry.js.map +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/buildContextualPrompt.js +26 -75
- package/dist/utils/buildContextualPrompt.js.map +1 -0
- package/dist/utils/changeLogPrompt.js +1 -0
- package/dist/utils/changeLogPrompt.js.map +1 -0
- package/dist/utils/checkModel.js +17 -92
- package/dist/utils/checkModel.js.map +1 -0
- package/dist/utils/commentMap.js +1 -0
- package/dist/utils/commentMap.js.map +1 -0
- package/dist/utils/compileSearchQuery.js +23 -9
- package/dist/utils/compileSearchQuery.js.map +1 -0
- package/dist/utils/consolePresentation.js +208 -0
- package/dist/utils/consolePresentation.js.map +1 -0
- package/dist/utils/contentUtils.js +17 -2
- package/dist/utils/contentUtils.js.map +1 -0
- package/dist/utils/debugContext.js +1 -0
- package/dist/utils/debugContext.js.map +1 -0
- package/dist/utils/dialogState.js +201 -0
- package/dist/utils/dialogState.js.map +1 -0
- package/dist/utils/editor.js +1 -0
- package/dist/utils/editor.js.map +1 -0
- package/dist/utils/executionEvidence.js +50 -0
- package/dist/utils/executionEvidence.js.map +1 -0
- package/dist/utils/extractFileReferences.js +140 -6
- package/dist/utils/extractFileReferences.js.map +1 -0
- package/dist/utils/fileEvidenceCache.js +50 -0
- package/dist/utils/fileEvidenceCache.js.map +1 -0
- package/dist/utils/fileTree.js +1 -0
- package/dist/utils/fileTree.js.map +1 -0
- package/dist/utils/loadRelevantFolderCapsules.js +35 -5
- package/dist/utils/loadRelevantFolderCapsules.js.map +1 -0
- package/dist/utils/log.js +10 -1
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/normalizeData.js +1 -0
- package/dist/utils/normalizeData.js.map +1 -0
- package/dist/utils/ollamaModelStatus.js +28 -0
- package/dist/utils/ollamaModelStatus.js.map +1 -0
- package/dist/utils/ollamaService.js +294 -0
- package/dist/utils/ollamaService.js.map +1 -0
- package/dist/utils/outputFormatter.js +1 -0
- package/dist/utils/outputFormatter.js.map +1 -0
- package/dist/utils/parseTaggedContent.js +1 -0
- package/dist/utils/parseTaggedContent.js.map +1 -0
- package/dist/utils/planActions.js +27 -46
- package/dist/utils/planActions.js.map +1 -0
- package/dist/utils/promptBuilderHelper.js +1 -0
- package/dist/utils/promptBuilderHelper.js.map +1 -0
- package/dist/utils/promptLogHelper.js +29 -13
- package/dist/utils/promptLogHelper.js.map +1 -0
- package/dist/utils/queryAnchors.js +71 -0
- package/dist/utils/queryAnchors.js.map +1 -0
- package/dist/utils/repoIdentity.js +82 -0
- package/dist/utils/repoIdentity.js.map +1 -0
- package/dist/utils/repoKey.js +1 -0
- package/dist/utils/repoKey.js.map +1 -0
- package/dist/utils/resolveTargetsToFiles.js +1 -0
- package/dist/utils/resolveTargetsToFiles.js.map +1 -0
- package/dist/utils/resumeContext.js +219 -0
- package/dist/utils/resumeContext.js.map +1 -0
- package/dist/utils/resumeState.js +310 -0
- package/dist/utils/resumeState.js.map +1 -0
- package/dist/utils/rollingPlan.js +118 -0
- package/dist/utils/rollingPlan.js.map +1 -0
- package/dist/utils/runQueryWithDaemonControl.js +11 -3
- package/dist/utils/runQueryWithDaemonControl.js.map +1 -0
- package/dist/utils/runtimeLogger.js +252 -0
- package/dist/utils/runtimeLogger.js.map +1 -0
- package/dist/utils/sanitizeQuery.js +1 -0
- package/dist/utils/sanitizeQuery.js.map +1 -0
- package/dist/utils/sharedUtils.js +1 -0
- package/dist/utils/sharedUtils.js.map +1 -0
- package/dist/utils/sleep.js +1 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/splitCodeIntoChunk.js +1 -0
- package/dist/utils/splitCodeIntoChunk.js.map +1 -0
- package/dist/utils/time.js +66 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/verifyFocusPreference.js +107 -0
- package/dist/utils/verifyFocusPreference.js.map +1 -0
- package/dist/utils/vscode.js +1 -0
- package/dist/utils/vscode.js.map +1 -0
- package/dist/workflow/workflowResolver.js +1 -0
- package/dist/workflow/workflowResolver.js.map +1 -0
- package/dist/workflow/workflowRunner.js +1 -0
- package/dist/workflow/workflowRunner.js.map +1 -0
- package/package.json +3 -3
- package/dist/agents/MainAgent.js +0 -1886
- package/dist/agents/contextReviewStep.js +0 -101
- package/dist/agents/finalPlanGenStep.js +0 -107
- package/dist/agents/structuralAnalysisStep.js +0 -46
- package/dist/agents/validationAnalysisStep.js +0 -87
- package/dist/pipeline/modules/chunkManagerModule.js +0 -24
- package/dist/pipeline/modules/cleanGeneratedTestsModule.js +0 -33
- package/dist/pipeline/modules/fileReaderModule.js +0 -72
- package/dist/pipeline/modules/gatherInfoModule.js +0 -181
- package/dist/pipeline/modules/generateTestsModule.js +0 -68
- package/dist/pipeline/modules/preserveCodeModule.js +0 -195
- package/dist/pipeline/modules/refactorModule.js +0 -40
- package/dist/pipeline/modules/repairTestsModule.js +0 -48
- package/dist/pipeline/modules/runTestsModule.js +0 -37
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derives one structured review packet for every action-choice turn.
|
|
3
|
+
*
|
|
4
|
+
* Why this file exists:
|
|
5
|
+
* - loop review should stay separate from loop execution and step evaluation
|
|
6
|
+
* - grounded reads and unread candidates need one shared comparison owner
|
|
7
|
+
* - action-choice should reason from stable review signals instead of raw state dumps
|
|
8
|
+
* - wrapper files and follow-up references should be judged from code shape, not names
|
|
9
|
+
*/
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import { classifyFileRulePath } from "../../fileRules/searchPathClassification.js";
|
|
13
|
+
import { extractQuotedFragments } from "../search/searchContext.js";
|
|
14
|
+
const MAX_REVIEW_CANDIDATES = 5;
|
|
15
|
+
const OWNER_LIKE_LAYERS = new Set(["owner", "registration", "router", "config"]);
|
|
16
|
+
const PURE_REEXPORT_PATTERN = /^export\s+(?:\*|\{[^}]+\})\s+from\s+["'][^"']+["'];?$/;
|
|
17
|
+
const THIN_BRIDGE_PATTERN = /\b(re-exports?|legacy path|bridge|compat)\b/;
|
|
18
|
+
function normalizePath(filePath) {
|
|
19
|
+
return String(filePath ?? "").replace(/\\/g, "/");
|
|
20
|
+
}
|
|
21
|
+
function getCandidatePriority(memory, filePath) {
|
|
22
|
+
const metadata = memory.evidence.candidateMetadata?.[filePath];
|
|
23
|
+
return metadata?.readPriority ?? metadata?.triageScore ?? metadata?.searchScore ?? 0;
|
|
24
|
+
}
|
|
25
|
+
function buildLayerHints(parts) {
|
|
26
|
+
return parts.filter(Boolean).join(" ").toLowerCase();
|
|
27
|
+
}
|
|
28
|
+
function collectGroundingCode(read) {
|
|
29
|
+
const excerptCode = (read.excerpts ?? []).map((excerpt) => excerpt.code).join("\n");
|
|
30
|
+
const snippetCode = (read.snippets ?? []).join("\n");
|
|
31
|
+
return [excerptCode, snippetCode].filter(Boolean).join("\n");
|
|
32
|
+
}
|
|
33
|
+
function collectNonCommentCodeLines(content) {
|
|
34
|
+
return content
|
|
35
|
+
.split("\n")
|
|
36
|
+
.map((line) => line.replace(/^\s*\d+:\s*/, "").trim())
|
|
37
|
+
.filter(Boolean)
|
|
38
|
+
.filter((line) => line !== "/**" && line !== "*/" && !line.startsWith("*") && !line.startsWith("//"));
|
|
39
|
+
}
|
|
40
|
+
function uniqueStrings(values) {
|
|
41
|
+
return Array.from(new Set(values.filter((value) => typeof value === "string" && value.trim().length > 0)));
|
|
42
|
+
}
|
|
43
|
+
function summarizeReadFact(read) {
|
|
44
|
+
const purpose = read.relevantContext.find((context) => context.kind === "purpose")?.text;
|
|
45
|
+
const summary = purpose ?? read.summary ?? read.relevanceExplanation ?? "";
|
|
46
|
+
const normalized = summary.replace(/\s+/g, " ").trim();
|
|
47
|
+
return `${path.basename(read.filePath)}: ${normalized || "grounded read recorded."}`;
|
|
48
|
+
}
|
|
49
|
+
function collectReadFactTokens(read) {
|
|
50
|
+
return uniqueStrings([
|
|
51
|
+
...(read.keySymbols ?? []).map((symbol) => `symbol:${symbol}`),
|
|
52
|
+
read.summary ? `summary:${read.summary.trim()}` : undefined,
|
|
53
|
+
read.relevanceExplanation ? `why:${read.relevanceExplanation.trim()}` : undefined,
|
|
54
|
+
...(read.relevantContext ?? []).map((context) => `${context.kind}:${context.text.trim()}`),
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
function extractQuotedRefs(code) {
|
|
58
|
+
const refs = [];
|
|
59
|
+
const patterns = [
|
|
60
|
+
[/\bexport\s+(?:\*|\{[^}]+\})\s+from\s+["']([^"']+)["']/g, "reexport"],
|
|
61
|
+
[/\bimport\s+[^"']+\s+from\s+["']([^"']+)["']/g, "import"],
|
|
62
|
+
[/\brequire\(\s*["']([^"']+)["']\s*\)/g, "import"],
|
|
63
|
+
];
|
|
64
|
+
for (const [pattern, relation] of patterns) {
|
|
65
|
+
let match;
|
|
66
|
+
while ((match = pattern.exec(code)) !== null) {
|
|
67
|
+
refs.push({
|
|
68
|
+
relation,
|
|
69
|
+
specifier: match[1],
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return refs;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolves local code references from TS import specifiers to real repo files.
|
|
77
|
+
* Example: `../agent/runtime/runAgentLoop.js` can resolve to `runAgentLoop.ts`.
|
|
78
|
+
*/
|
|
79
|
+
function resolveLocalRefCandidates(sourceFilePath, specifier) {
|
|
80
|
+
if (!specifier.startsWith(".")) {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
const sourceDir = path.dirname(sourceFilePath);
|
|
84
|
+
const resolved = path.resolve(sourceDir, specifier);
|
|
85
|
+
const candidates = new Set([resolved]);
|
|
86
|
+
if (/\.(?:js|mjs|cjs)$/i.test(resolved)) {
|
|
87
|
+
candidates.add(resolved.replace(/\.(?:js|mjs|cjs)$/i, ".ts"));
|
|
88
|
+
candidates.add(resolved.replace(/\.(?:js|mjs|cjs)$/i, ".tsx"));
|
|
89
|
+
}
|
|
90
|
+
else if (!path.extname(resolved)) {
|
|
91
|
+
candidates.add(`${resolved}.ts`);
|
|
92
|
+
candidates.add(`${resolved}.tsx`);
|
|
93
|
+
candidates.add(`${resolved}.js`);
|
|
94
|
+
candidates.add(path.join(resolved, "index.ts"));
|
|
95
|
+
candidates.add(path.join(resolved, "index.tsx"));
|
|
96
|
+
candidates.add(path.join(resolved, "index.js"));
|
|
97
|
+
}
|
|
98
|
+
return Array.from(candidates).filter((candidate) => fs.existsSync(candidate));
|
|
99
|
+
}
|
|
100
|
+
function classifyGroundingDepth(read) {
|
|
101
|
+
const codeLines = collectNonCommentCodeLines(collectGroundingCode(read));
|
|
102
|
+
const relevantText = `${read.summary ?? ""} ${read.relevanceExplanation ?? ""}`.toLowerCase();
|
|
103
|
+
const hasAnyReexportBody = codeLines.some((line) => PURE_REEXPORT_PATTERN.test(line));
|
|
104
|
+
const hasPureReexportBody = codeLines.length > 0 && codeLines.every((line) => PURE_REEXPORT_PATTERN.test(line));
|
|
105
|
+
const hasThinBridgeComment = THIN_BRIDGE_PATTERN.test(relevantText);
|
|
106
|
+
const hasRealBody = codeLines.some((line) => /\bexport\s+(?:async\s+)?function\b/.test(line))
|
|
107
|
+
|| codeLines.some((line) => /\bexport\s+(?:const|let|var|class|interface|type|enum)\b/.test(line))
|
|
108
|
+
|| codeLines.some((line) => /\bmodule\.exports\b/.test(line))
|
|
109
|
+
|| normalizePath(read.filePath).toLowerCase().endsWith("/package.json");
|
|
110
|
+
if (hasPureReexportBody && !hasRealBody) {
|
|
111
|
+
return {
|
|
112
|
+
groundingDepth: "wrapper",
|
|
113
|
+
signals: {
|
|
114
|
+
nonCommentCodeLineCount: codeLines.length,
|
|
115
|
+
hasPureReexportBody,
|
|
116
|
+
hasThinBridgeComment,
|
|
117
|
+
hasRealBody,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
if ((hasAnyReexportBody || hasThinBridgeComment) && hasRealBody) {
|
|
122
|
+
return {
|
|
123
|
+
groundingDepth: "mixed",
|
|
124
|
+
signals: {
|
|
125
|
+
nonCommentCodeLineCount: codeLines.length,
|
|
126
|
+
hasPureReexportBody,
|
|
127
|
+
hasThinBridgeComment,
|
|
128
|
+
hasRealBody,
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
if (!hasRealBody && hasThinBridgeComment && codeLines.length <= 3) {
|
|
133
|
+
return {
|
|
134
|
+
groundingDepth: "wrapper",
|
|
135
|
+
signals: {
|
|
136
|
+
nonCommentCodeLineCount: codeLines.length,
|
|
137
|
+
hasPureReexportBody,
|
|
138
|
+
hasThinBridgeComment,
|
|
139
|
+
hasRealBody,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
groundingDepth: "direct",
|
|
145
|
+
signals: {
|
|
146
|
+
nonCommentCodeLineCount: codeLines.length,
|
|
147
|
+
hasPureReexportBody,
|
|
148
|
+
hasThinBridgeComment,
|
|
149
|
+
hasRealBody,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function classifyLayer(filePath, hints, read) {
|
|
154
|
+
const normalizedPath = normalizePath(filePath).toLowerCase();
|
|
155
|
+
const compactHints = hints.replace(/\s+/g, "");
|
|
156
|
+
const code = read ? collectGroundingCode(read) : "";
|
|
157
|
+
const codeLines = collectNonCommentCodeLines(code);
|
|
158
|
+
const hasCommandRegistration = /\.command\(\s*["'`]/.test(code) || /\.action\(\s*\(/.test(code);
|
|
159
|
+
const hasConfigObject = /\bprocess\.env\b/.test(code) || normalizedPath.endsWith("/package.json");
|
|
160
|
+
const hasRealImplementationBody = codeLines.some((line) => /\bexport\s+(?:async\s+)?function\b/.test(line))
|
|
161
|
+
|| codeLines.some((line) => /\bexport\s+(?:const|let|var|class|interface|type|enum)\b/.test(line));
|
|
162
|
+
const hasPureReexportBody = codeLines.length > 0 && codeLines.every((line) => PURE_REEXPORT_PATTERN.test(line));
|
|
163
|
+
if (normalizedPath.includes("/__tests__/")
|
|
164
|
+
|| normalizedPath.endsWith(".test.ts")
|
|
165
|
+
|| normalizedPath.endsWith(".spec.ts")
|
|
166
|
+
|| /\b(test harness|fixture|expected|snapshot)\b/.test(hints)) {
|
|
167
|
+
return "test-harness";
|
|
168
|
+
}
|
|
169
|
+
if (hasCommandRegistration) {
|
|
170
|
+
return "registration";
|
|
171
|
+
}
|
|
172
|
+
if (hasConfigObject) {
|
|
173
|
+
return "config";
|
|
174
|
+
}
|
|
175
|
+
if (hasPureReexportBody && !hasRealImplementationBody) {
|
|
176
|
+
return "unknown";
|
|
177
|
+
}
|
|
178
|
+
if (/register[a-z0-9]*command/i.test(normalizedPath)
|
|
179
|
+
|| /register[a-z0-9]*command/i.test(compactHints)
|
|
180
|
+
|| /\b(command|commands|entrypoint|entrypoints|test-run|integration-run)\b/.test(hints)) {
|
|
181
|
+
return "registration";
|
|
182
|
+
}
|
|
183
|
+
if (/\.config\./.test(normalizedPath)
|
|
184
|
+
|| /\b(config|configuration|configured|default|defaults|setting|settings)\b/.test(hints)) {
|
|
185
|
+
return "config";
|
|
186
|
+
}
|
|
187
|
+
if (/\b(router|route|routing|dispatch|handler|orchestrator|state machine|pipeline)\b/.test(hints)) {
|
|
188
|
+
return "router";
|
|
189
|
+
}
|
|
190
|
+
if (hasRealImplementationBody
|
|
191
|
+
|| /\b(owner|owns|define|defines|defined|definition|primary|main|source of truth|entry point)\b/.test(hints)
|
|
192
|
+
|| /(^|\/)(index|main)\.[a-z0-9]+$/i.test(normalizedPath)) {
|
|
193
|
+
return "owner";
|
|
194
|
+
}
|
|
195
|
+
return "unknown";
|
|
196
|
+
}
|
|
197
|
+
function resolveQueryShape(memory) {
|
|
198
|
+
if (extractQuotedFragments(memory.task.initialQuery).length > 0) {
|
|
199
|
+
return "snippet";
|
|
200
|
+
}
|
|
201
|
+
const combined = `${memory.task.normalizedQuery} ${memory.task.primaryIntent}`.toLowerCase();
|
|
202
|
+
if (/\b(entrypoint|entrypoints|configured|configuration|where\b.*\b(set|register|configured)|how\b.*\bwire|how\b.*\brun tests?)\b/.test(combined)) {
|
|
203
|
+
return "config-entrypoint";
|
|
204
|
+
}
|
|
205
|
+
if (memory.task.queryScope === "broad-repo") {
|
|
206
|
+
return "broad-repo";
|
|
207
|
+
}
|
|
208
|
+
if (memory.task.queryScope === "multi-file"
|
|
209
|
+
|| /\b(compare|between|versus|vs|divide responsibilities|responsibilit(?:y|ies)|architecture)\b/.test(combined)) {
|
|
210
|
+
return "multi-file";
|
|
211
|
+
}
|
|
212
|
+
return "targeted";
|
|
213
|
+
}
|
|
214
|
+
function isDistinctOwnerLayer(layer) {
|
|
215
|
+
return OWNER_LIKE_LAYERS.has(layer);
|
|
216
|
+
}
|
|
217
|
+
function classifyRelationToGrounded(filePath, layer, groundedLayers) {
|
|
218
|
+
const normalizedPath = normalizePath(filePath).toLowerCase();
|
|
219
|
+
if (layer === "test-harness") {
|
|
220
|
+
return "duplicate";
|
|
221
|
+
}
|
|
222
|
+
if (isDistinctOwnerLayer(layer) && groundedLayers.some((groundedLayer) => groundedLayer === "registration" || groundedLayer === "router")) {
|
|
223
|
+
return "parent-owner";
|
|
224
|
+
}
|
|
225
|
+
if (isDistinctOwnerLayer(layer) && groundedLayers.some((groundedLayer) => groundedLayer === layer)) {
|
|
226
|
+
return "sibling-owner";
|
|
227
|
+
}
|
|
228
|
+
if (groundedLayers.length > 0 && (normalizedPath.includes("/src/") || normalizedPath.endsWith(".ts"))) {
|
|
229
|
+
return "supporting";
|
|
230
|
+
}
|
|
231
|
+
return "unknown";
|
|
232
|
+
}
|
|
233
|
+
function resolveGroundedOwnerCount(groundedFiles, queryShape) {
|
|
234
|
+
return groundedFiles.filter((file) => {
|
|
235
|
+
if (!isDistinctOwnerLayer(file.looksLikeLayer)) {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
if ((queryShape === "multi-file" || queryShape === "config-entrypoint") && file.groundingDepth === "wrapper") {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
return true;
|
|
242
|
+
}).length;
|
|
243
|
+
}
|
|
244
|
+
function buildTargetCoverageSummary(explicitTargetPaths, groundedReads) {
|
|
245
|
+
const explicitTargetSet = new Set(explicitTargetPaths);
|
|
246
|
+
const groundedExplicitTargets = uniqueStrings(groundedReads
|
|
247
|
+
.map((read) => read.filePath)
|
|
248
|
+
.filter((filePath) => explicitTargetSet.has(filePath)));
|
|
249
|
+
const missingExplicitTargets = explicitTargetPaths.filter((filePath) => !groundedExplicitTargets.includes(filePath));
|
|
250
|
+
return {
|
|
251
|
+
explicitTargetCount: explicitTargetPaths.length,
|
|
252
|
+
groundedExplicitTargetCount: groundedExplicitTargets.length,
|
|
253
|
+
groundedExplicitTargets,
|
|
254
|
+
missingExplicitTargets,
|
|
255
|
+
allExplicitTargetsGrounded: explicitTargetPaths.length > 0 && missingExplicitTargets.length === 0,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function buildDiscoveredSoFarSummary(groundedReads, targetCoverage) {
|
|
259
|
+
const explicitTargetSet = new Set(targetCoverage.groundedExplicitTargets);
|
|
260
|
+
const targetFacts = groundedReads
|
|
261
|
+
.filter((read) => explicitTargetSet.has(read.filePath))
|
|
262
|
+
.slice(0, 3)
|
|
263
|
+
.map((read) => summarizeReadFact(read));
|
|
264
|
+
const supportingFacts = groundedReads
|
|
265
|
+
.filter((read) => !explicitTargetSet.has(read.filePath))
|
|
266
|
+
.slice(0, 2)
|
|
267
|
+
.map((read) => summarizeReadFact(read));
|
|
268
|
+
const missingGaps = targetCoverage.missingExplicitTargets.length > 0
|
|
269
|
+
? targetCoverage.missingExplicitTargets.map((filePath) => `Need a grounded read for ${path.basename(filePath)}.`)
|
|
270
|
+
: [];
|
|
271
|
+
return {
|
|
272
|
+
targetFacts,
|
|
273
|
+
supportingFacts,
|
|
274
|
+
missingGaps,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function buildTargetFollowupSourceSet(explicitTargetPaths, groundedReads, queryShape, candidateFiles) {
|
|
278
|
+
const explicitTargetSet = new Set(explicitTargetPaths);
|
|
279
|
+
const linkedPaths = new Set(explicitTargetPaths);
|
|
280
|
+
for (const read of groundedReads) {
|
|
281
|
+
if (!explicitTargetSet.has(read.filePath)) {
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
for (const candidate of deriveFollowupReferenceCandidates(read, queryShape, candidateFiles)) {
|
|
285
|
+
linkedPaths.add(candidate.filePath);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return linkedPaths;
|
|
289
|
+
}
|
|
290
|
+
function buildRecentProgressSummary(groundedReads, targetCoverage, targetFollowupPaths) {
|
|
291
|
+
const recentReads = [...groundedReads]
|
|
292
|
+
.sort((left, right) => Date.parse(right.recordedAt) - Date.parse(left.recordedAt))
|
|
293
|
+
.slice(0, 3);
|
|
294
|
+
const olderFactTokens = new Set(groundedReads
|
|
295
|
+
.filter((read) => !recentReads.includes(read))
|
|
296
|
+
.flatMap((read) => collectReadFactTokens(read)));
|
|
297
|
+
const targetLinkedReadCount = recentReads.filter((read) => targetFollowupPaths.has(read.filePath)).length;
|
|
298
|
+
const newTargetLinkedFactCount = recentReads.reduce((count, read) => {
|
|
299
|
+
if (!targetFollowupPaths.has(read.filePath)) {
|
|
300
|
+
return count;
|
|
301
|
+
}
|
|
302
|
+
const hasNewFact = collectReadFactTokens(read).some((token) => !olderFactTokens.has(token));
|
|
303
|
+
return count + (hasNewFact ? 1 : 0);
|
|
304
|
+
}, 0);
|
|
305
|
+
const recentNonTargetStreak = recentReads
|
|
306
|
+
.slice(0, 2)
|
|
307
|
+
.every((read) => !targetFollowupPaths.has(read.filePath));
|
|
308
|
+
const stalled = targetCoverage.allExplicitTargetsGrounded &&
|
|
309
|
+
recentReads.length >= 2 &&
|
|
310
|
+
(recentNonTargetStreak || targetLinkedReadCount === 0 || newTargetLinkedFactCount === 0);
|
|
311
|
+
const reason = targetCoverage.allExplicitTargetsGrounded
|
|
312
|
+
? stalled
|
|
313
|
+
? "Recent reads did not add new target-linked facts after target coverage was complete."
|
|
314
|
+
: newTargetLinkedFactCount > 0
|
|
315
|
+
? "Recent reads still added target-linked facts after the requested files were covered."
|
|
316
|
+
: "Requested files are covered and no recent follow-up reads were needed."
|
|
317
|
+
: targetCoverage.missingExplicitTargets.length > 0
|
|
318
|
+
? "Recent work is still focused on covering the remaining requested files."
|
|
319
|
+
: "Recent reads still add grounded facts.";
|
|
320
|
+
return {
|
|
321
|
+
recentReadCount: recentReads.length,
|
|
322
|
+
targetLinkedReadCount,
|
|
323
|
+
newTargetLinkedFactCount,
|
|
324
|
+
stalled,
|
|
325
|
+
reason,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function scoreUnreadCandidateForReview(candidate, args) {
|
|
329
|
+
let score = candidate.followupScore ?? candidate.readPriority ?? candidate.triageScore ?? candidate.searchScore ?? 0;
|
|
330
|
+
const derivedFromExplicitTarget = candidate.derivedFromFilePath != null && args.explicitTargetSet.has(candidate.derivedFromFilePath);
|
|
331
|
+
if (derivedFromExplicitTarget) {
|
|
332
|
+
score += 100;
|
|
333
|
+
}
|
|
334
|
+
if (candidate.followupRelation === "reexport") {
|
|
335
|
+
score += 35;
|
|
336
|
+
}
|
|
337
|
+
else if (candidate.followupRelation === "import") {
|
|
338
|
+
score += 12;
|
|
339
|
+
}
|
|
340
|
+
if (args.queryShape === "config-entrypoint" &&
|
|
341
|
+
candidate.relationToGrounded === "parent-owner" &&
|
|
342
|
+
(candidate.looksLikeLayer === "owner" || candidate.looksLikeLayer === "config")) {
|
|
343
|
+
score += 18;
|
|
344
|
+
}
|
|
345
|
+
if (args.targetCoverage.allExplicitTargetsGrounded &&
|
|
346
|
+
candidate.followupRelation === "unknown" &&
|
|
347
|
+
candidate.relationToGrounded === "parent-owner") {
|
|
348
|
+
score -= 80;
|
|
349
|
+
}
|
|
350
|
+
if (args.targetCoverage.allExplicitTargetsGrounded &&
|
|
351
|
+
candidate.followupRelation === "unknown" &&
|
|
352
|
+
candidate.looksLikeLayer === "owner") {
|
|
353
|
+
score -= 40;
|
|
354
|
+
}
|
|
355
|
+
return score;
|
|
356
|
+
}
|
|
357
|
+
function buildExpansionAssessment(queryShape, topUnreadCandidates, targetCoverage, groundedFiles) {
|
|
358
|
+
const bestCandidate = topUnreadCandidates[0];
|
|
359
|
+
if (!bestCandidate) {
|
|
360
|
+
return {
|
|
361
|
+
shouldExpand: false,
|
|
362
|
+
reason: "No unread follow-up candidate is strong enough to justify another read.",
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
const groundedTargetSet = new Set(targetCoverage.groundedExplicitTargets);
|
|
366
|
+
const sourceGroundedSet = groundedTargetSet.size > 0
|
|
367
|
+
? groundedTargetSet
|
|
368
|
+
: new Set(groundedFiles.map((file) => file.filePath));
|
|
369
|
+
const derivedFromGroundedTarget = bestCandidate.derivedFromFilePath != null && sourceGroundedSet.has(bestCandidate.derivedFromFilePath);
|
|
370
|
+
const hasGroundedWiringLayer = groundedFiles.some((file) => sourceGroundedSet.has(file.filePath) &&
|
|
371
|
+
(file.looksLikeLayer === "registration" || file.looksLikeLayer === "router"));
|
|
372
|
+
const configHandoffFollowup = queryShape === "config-entrypoint" &&
|
|
373
|
+
hasGroundedWiringLayer &&
|
|
374
|
+
(bestCandidate.relationToGrounded === "parent-owner" || bestCandidate.relationToGrounded === "sibling-owner") &&
|
|
375
|
+
(bestCandidate.looksLikeLayer === "owner"
|
|
376
|
+
|| bestCandidate.looksLikeLayer === "config"
|
|
377
|
+
|| bestCandidate.looksLikeLayer === "registration");
|
|
378
|
+
if (derivedFromGroundedTarget) {
|
|
379
|
+
const gap = bestCandidate.followupRelation === "reexport"
|
|
380
|
+
? "Resolve the grounded target wrapper into its implementation."
|
|
381
|
+
: "Follow a direct target-linked reference into the next implementation file.";
|
|
382
|
+
return {
|
|
383
|
+
shouldExpand: true,
|
|
384
|
+
bestCandidatePath: bestCandidate.filePath,
|
|
385
|
+
gap,
|
|
386
|
+
relation: bestCandidate.followupRelation,
|
|
387
|
+
reason: `${path.basename(bestCandidate.filePath)} directly follows from a grounded requested file.`,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
if (configHandoffFollowup) {
|
|
391
|
+
return {
|
|
392
|
+
shouldExpand: true,
|
|
393
|
+
bestCandidatePath: bestCandidate.filePath,
|
|
394
|
+
gap: "Follow the grounded wiring layer into the owner or config implementation.",
|
|
395
|
+
relation: bestCandidate.relationToGrounded,
|
|
396
|
+
reason: `${path.basename(bestCandidate.filePath)} closes a config or runtime handoff gap for the query.`,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
return {
|
|
400
|
+
shouldExpand: false,
|
|
401
|
+
bestCandidatePath: bestCandidate.filePath,
|
|
402
|
+
relation: bestCandidate.followupRelation !== "unknown" ? bestCandidate.followupRelation : bestCandidate.relationToGrounded,
|
|
403
|
+
reason: `${path.basename(bestCandidate.filePath)} is not strongly linked to the requested target coverage.`,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function buildDriftAssessment(targetCoverage, recentProgress, expansionAssessment, topUnreadCandidates) {
|
|
407
|
+
const bestCandidate = topUnreadCandidates[0];
|
|
408
|
+
if (!targetCoverage.allExplicitTargetsGrounded) {
|
|
409
|
+
return {
|
|
410
|
+
status: "on-track",
|
|
411
|
+
blocksExpansion: false,
|
|
412
|
+
reason: "Requested target coverage is still incomplete.",
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
if (expansionAssessment.shouldExpand) {
|
|
416
|
+
return {
|
|
417
|
+
status: "on-track",
|
|
418
|
+
blocksExpansion: false,
|
|
419
|
+
reason: expansionAssessment.reason,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
if (bestCandidate &&
|
|
423
|
+
recentProgress.stalled &&
|
|
424
|
+
bestCandidate.followupRelation === "unknown" &&
|
|
425
|
+
(bestCandidate.relationToGrounded === "parent-owner" || bestCandidate.looksLikeLayer === "owner")) {
|
|
426
|
+
return {
|
|
427
|
+
status: "hard-drift",
|
|
428
|
+
blocksExpansion: true,
|
|
429
|
+
reason: "Recent reads stalled after target coverage, and the next candidate is only a generic owner follow-up.",
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (bestCandidate) {
|
|
433
|
+
return {
|
|
434
|
+
status: "weak-drift",
|
|
435
|
+
blocksExpansion: false,
|
|
436
|
+
reason: `${path.basename(bestCandidate.filePath)} is a weak follow-up now that the requested files are already covered.`,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
return {
|
|
440
|
+
status: "on-track",
|
|
441
|
+
blocksExpansion: false,
|
|
442
|
+
reason: "No unread follow-up remains.",
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function buildFollowupSignals(args) {
|
|
446
|
+
const signals = [];
|
|
447
|
+
if (args.groundedCoverageCount < args.requiredGroundedCoverage) {
|
|
448
|
+
signals.push("Grounded coverage is still below the required threshold for this query.");
|
|
449
|
+
}
|
|
450
|
+
if (args.groundedLayers.some((layer) => layer === "registration" || layer === "router")
|
|
451
|
+
&& args.topUnreadCandidates.some((candidate) => candidate.relationToGrounded === "parent-owner")) {
|
|
452
|
+
signals.push("A grounded wiring layer exists, but a likely owner or parent layer is still unread.");
|
|
453
|
+
}
|
|
454
|
+
if ((args.queryShape === "multi-file" || args.queryShape === "snippet" || args.queryShape === "config-entrypoint")
|
|
455
|
+
&& args.hasUnreadDistinctOwner) {
|
|
456
|
+
signals.push("The query needs multiple grounded owners, and at least one distinct unread owner remains.");
|
|
457
|
+
}
|
|
458
|
+
if (args.queryShape === "config-entrypoint"
|
|
459
|
+
&& args.topUnreadCandidates.some((candidate) => candidate.looksLikeLayer === "config" || candidate.looksLikeLayer === "owner")) {
|
|
460
|
+
signals.push("This looks like a configuration or entrypoint question, and a stronger owner-like unread candidate remains.");
|
|
461
|
+
}
|
|
462
|
+
if (args.topUnreadCandidates.some((candidate) => candidate.followupRelation === "reexport")) {
|
|
463
|
+
signals.push("A grounded wrapper points at a local implementation file that still has not been read.");
|
|
464
|
+
}
|
|
465
|
+
return signals;
|
|
466
|
+
}
|
|
467
|
+
function resolveStopAssessment(args) {
|
|
468
|
+
if (args.hasUnresolvedHardFileRequirement) {
|
|
469
|
+
return {
|
|
470
|
+
canStop: false,
|
|
471
|
+
stopRisk: "high",
|
|
472
|
+
reason: "A required explicit target still has not resolved inside the repo.",
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
if (args.hasStructuredTargetRequirement && args.hasUnreadStructuredTargets) {
|
|
476
|
+
return {
|
|
477
|
+
canStop: false,
|
|
478
|
+
stopRisk: "high",
|
|
479
|
+
reason: "A required explicit file or folder target still needs grounded reads.",
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
if (args.groundedCoverageCount === 0) {
|
|
483
|
+
return {
|
|
484
|
+
canStop: false,
|
|
485
|
+
stopRisk: "high",
|
|
486
|
+
reason: "No grounded file evidence exists yet.",
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
const broadEnough = args.groundedCoverageCount >= Math.min(args.requiredGroundedCoverage, 2);
|
|
490
|
+
if (args.queryShape === "broad-repo") {
|
|
491
|
+
if (broadEnough && !args.hasUnreadDistinctOwner && !args.referenceFollowupNeeded) {
|
|
492
|
+
return {
|
|
493
|
+
canStop: true,
|
|
494
|
+
stopRisk: "low",
|
|
495
|
+
reason: "Representative grounded coverage exists for the broad repo question.",
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
return {
|
|
499
|
+
canStop: false,
|
|
500
|
+
stopRisk: args.hasUnreadDistinctOwner || args.referenceFollowupNeeded ? "medium" : "high",
|
|
501
|
+
reason: "Broad repo coverage is still missing a representative grounded owner.",
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
if (args.expansionAssessment.shouldExpand) {
|
|
505
|
+
return {
|
|
506
|
+
canStop: false,
|
|
507
|
+
stopRisk: "high",
|
|
508
|
+
reason: args.expansionAssessment.reason,
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
if (args.targetCoverage.explicitTargetCount > 0 &&
|
|
512
|
+
!args.targetCoverage.allExplicitTargetsGrounded &&
|
|
513
|
+
(args.referenceFollowupNeeded || args.hasUnreadDistinctOwner)) {
|
|
514
|
+
return {
|
|
515
|
+
canStop: false,
|
|
516
|
+
stopRisk: "high",
|
|
517
|
+
reason: "Unread distinct-owner candidates still make the answer incomplete.",
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
if (args.fullReadCoverageCount < args.requiredFullReadCoverage) {
|
|
521
|
+
return {
|
|
522
|
+
canStop: false,
|
|
523
|
+
stopRisk: "high",
|
|
524
|
+
reason: "The answer still needs more grounded full reads.",
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
if (args.groundedCoverageCount < args.requiredGroundedCoverage) {
|
|
528
|
+
return {
|
|
529
|
+
canStop: false,
|
|
530
|
+
stopRisk: "high",
|
|
531
|
+
reason: "Grounded coverage is still below the required threshold.",
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
return {
|
|
535
|
+
canStop: true,
|
|
536
|
+
stopRisk: "low",
|
|
537
|
+
reason: "Grounded coverage is complete enough to stop.",
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
function scoreFollowupReferenceCandidate(args) {
|
|
541
|
+
const pathClass = classifyFileRulePath(args.filePath);
|
|
542
|
+
if (pathClass.isArtifact || pathClass.isGeneratedBuild || pathClass.isSourceMap || pathClass.isHarnessLike) {
|
|
543
|
+
return null;
|
|
544
|
+
}
|
|
545
|
+
let score = 0;
|
|
546
|
+
const reasons = [];
|
|
547
|
+
if (args.relation === "reexport") {
|
|
548
|
+
score += 5;
|
|
549
|
+
reasons.push("reexport-path");
|
|
550
|
+
}
|
|
551
|
+
else if (args.relation === "config-link") {
|
|
552
|
+
score += 4;
|
|
553
|
+
reasons.push("config-link");
|
|
554
|
+
}
|
|
555
|
+
else if (args.relation === "registration-call") {
|
|
556
|
+
score += 3;
|
|
557
|
+
reasons.push("registration-link");
|
|
558
|
+
}
|
|
559
|
+
else if (args.relation === "import") {
|
|
560
|
+
score += 1;
|
|
561
|
+
reasons.push("import-path");
|
|
562
|
+
}
|
|
563
|
+
if (args.queryShape === "multi-file" || args.queryShape === "config-entrypoint") {
|
|
564
|
+
score += 2;
|
|
565
|
+
reasons.push("query-shape-match");
|
|
566
|
+
}
|
|
567
|
+
if (args.candidateFiles.includes(args.filePath)) {
|
|
568
|
+
score += 2;
|
|
569
|
+
reasons.push("candidate-frontier");
|
|
570
|
+
}
|
|
571
|
+
return score >= 4
|
|
572
|
+
? {
|
|
573
|
+
filePath: args.filePath,
|
|
574
|
+
relation: args.relation,
|
|
575
|
+
score,
|
|
576
|
+
reasons,
|
|
577
|
+
derivedFromFilePath: args.derivedFromFilePath,
|
|
578
|
+
}
|
|
579
|
+
: null;
|
|
580
|
+
}
|
|
581
|
+
function deriveFollowupReferenceCandidates(read, queryShape, candidateFiles) {
|
|
582
|
+
const code = collectGroundingCode(read);
|
|
583
|
+
const refs = extractQuotedRefs(code);
|
|
584
|
+
const candidates = [];
|
|
585
|
+
for (const ref of refs) {
|
|
586
|
+
for (const filePath of resolveLocalRefCandidates(read.filePath, ref.specifier)) {
|
|
587
|
+
const candidate = scoreFollowupReferenceCandidate({
|
|
588
|
+
filePath,
|
|
589
|
+
relation: ref.relation,
|
|
590
|
+
derivedFromFilePath: read.filePath,
|
|
591
|
+
queryShape,
|
|
592
|
+
candidateFiles,
|
|
593
|
+
});
|
|
594
|
+
if (candidate) {
|
|
595
|
+
candidates.push(candidate);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return candidates.sort((left, right) => right.score - left.score);
|
|
600
|
+
}
|
|
601
|
+
export function buildLoopReviewPacket(memory, coverage) {
|
|
602
|
+
const queryShape = resolveQueryShape(memory);
|
|
603
|
+
const groundedReads = Object.values(memory.evidence.fileReads)
|
|
604
|
+
.sort((left, right) => getCandidatePriority(memory, right.filePath) - getCandidatePriority(memory, left.filePath));
|
|
605
|
+
const explicitTargetPaths = uniqueStrings([
|
|
606
|
+
...coverage.hardFileTargets,
|
|
607
|
+
...coverage.requiredFolderTargets,
|
|
608
|
+
]);
|
|
609
|
+
const explicitTargetSet = new Set(explicitTargetPaths);
|
|
610
|
+
const targetCoverage = buildTargetCoverageSummary(explicitTargetPaths, groundedReads);
|
|
611
|
+
const discoveredSoFar = buildDiscoveredSoFarSummary(groundedReads, targetCoverage);
|
|
612
|
+
const targetFollowupPaths = buildTargetFollowupSourceSet(explicitTargetPaths, groundedReads, queryShape, memory.evidence.candidateFiles);
|
|
613
|
+
const recentProgress = buildRecentProgressSummary(groundedReads, targetCoverage, targetFollowupPaths);
|
|
614
|
+
const groundedFiles = groundedReads.map((read) => {
|
|
615
|
+
const hints = buildLayerHints([
|
|
616
|
+
read.summary,
|
|
617
|
+
read.relevanceExplanation,
|
|
618
|
+
...(read.relevantContext ?? []).map((context) => context.text),
|
|
619
|
+
...(read.keySymbols ?? []),
|
|
620
|
+
]);
|
|
621
|
+
const { groundingDepth } = classifyGroundingDepth(read);
|
|
622
|
+
return {
|
|
623
|
+
filePath: read.filePath,
|
|
624
|
+
role: read.role ?? "contextual",
|
|
625
|
+
readMode: read.readMode ?? "full",
|
|
626
|
+
keySymbols: read.keySymbols ?? [],
|
|
627
|
+
matchedTerms: read.matchedTerms ?? [],
|
|
628
|
+
relevantContext: (read.relevantContext ?? []).map((context) => context.text),
|
|
629
|
+
looksLikeLayer: classifyLayer(read.filePath, hints, read),
|
|
630
|
+
groundingDepth,
|
|
631
|
+
};
|
|
632
|
+
});
|
|
633
|
+
const groundedLayers = groundedFiles.map((file) => file.looksLikeLayer);
|
|
634
|
+
const fullReadCoverageCount = groundedFiles
|
|
635
|
+
.filter((file) => file.readMode === "full" && file.groundingDepth !== "wrapper")
|
|
636
|
+
.length;
|
|
637
|
+
const baseUnreadCandidates = memory.evidence.candidateFiles
|
|
638
|
+
.filter((filePath) => !memory.evidence.fileReads[filePath])
|
|
639
|
+
.sort((left, right) => getCandidatePriority(memory, right) - getCandidatePriority(memory, left))
|
|
640
|
+
.map((filePath) => {
|
|
641
|
+
const metadata = memory.evidence.candidateMetadata?.[filePath];
|
|
642
|
+
const hints = buildLayerHints([
|
|
643
|
+
path.basename(filePath),
|
|
644
|
+
...(metadata?.searchReasons ?? []),
|
|
645
|
+
...(metadata?.searchMatches ?? []).flatMap((match) => match.reasons ?? []),
|
|
646
|
+
]);
|
|
647
|
+
const looksLikeLayer = classifyLayer(filePath, hints);
|
|
648
|
+
return {
|
|
649
|
+
filePath,
|
|
650
|
+
searchScore: metadata?.searchScore,
|
|
651
|
+
triageScore: metadata?.triageScore,
|
|
652
|
+
readPriority: metadata?.readPriority,
|
|
653
|
+
searchReasons: metadata?.searchReasons,
|
|
654
|
+
looksLikeLayer,
|
|
655
|
+
relationToGrounded: classifyRelationToGrounded(filePath, looksLikeLayer, groundedLayers),
|
|
656
|
+
followupRelation: "unknown",
|
|
657
|
+
followupScore: undefined,
|
|
658
|
+
derivedFromFilePath: undefined,
|
|
659
|
+
};
|
|
660
|
+
});
|
|
661
|
+
const followupByPath = new Map();
|
|
662
|
+
for (const read of groundedReads) {
|
|
663
|
+
for (const candidate of deriveFollowupReferenceCandidates(read, queryShape, memory.evidence.candidateFiles)) {
|
|
664
|
+
if (memory.evidence.fileReads[candidate.filePath]) {
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
const previous = followupByPath.get(candidate.filePath);
|
|
668
|
+
if (!previous || candidate.score > previous.score) {
|
|
669
|
+
followupByPath.set(candidate.filePath, candidate);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
const unreadCandidates = Array.from(new Set([
|
|
674
|
+
...baseUnreadCandidates.map((candidate) => candidate.filePath),
|
|
675
|
+
...Array.from(followupByPath.keys()),
|
|
676
|
+
]))
|
|
677
|
+
.map((filePath) => {
|
|
678
|
+
const baseCandidate = baseUnreadCandidates.find((candidate) => candidate.filePath === filePath);
|
|
679
|
+
const metadata = memory.evidence.candidateMetadata?.[filePath];
|
|
680
|
+
const followup = followupByPath.get(filePath);
|
|
681
|
+
const hints = buildLayerHints([
|
|
682
|
+
path.basename(filePath),
|
|
683
|
+
...(metadata?.searchReasons ?? []),
|
|
684
|
+
...(followup?.reasons ?? []),
|
|
685
|
+
]);
|
|
686
|
+
const looksLikeLayer = baseCandidate?.looksLikeLayer ?? classifyLayer(filePath, hints);
|
|
687
|
+
return {
|
|
688
|
+
filePath,
|
|
689
|
+
searchScore: metadata?.searchScore ?? baseCandidate?.searchScore,
|
|
690
|
+
triageScore: metadata?.triageScore ?? baseCandidate?.triageScore,
|
|
691
|
+
readPriority: metadata?.readPriority ?? baseCandidate?.readPriority ?? followup?.score,
|
|
692
|
+
searchReasons: metadata?.searchReasons ?? baseCandidate?.searchReasons ?? followup?.reasons,
|
|
693
|
+
looksLikeLayer,
|
|
694
|
+
relationToGrounded: baseCandidate?.relationToGrounded ?? classifyRelationToGrounded(filePath, looksLikeLayer, groundedLayers),
|
|
695
|
+
followupRelation: followup?.relation ?? "unknown",
|
|
696
|
+
followupScore: followup?.score,
|
|
697
|
+
derivedFromFilePath: followup?.derivedFromFilePath,
|
|
698
|
+
};
|
|
699
|
+
})
|
|
700
|
+
.sort((left, right) => {
|
|
701
|
+
const rightScore = scoreUnreadCandidateForReview(right, {
|
|
702
|
+
queryShape,
|
|
703
|
+
targetCoverage,
|
|
704
|
+
explicitTargetSet,
|
|
705
|
+
});
|
|
706
|
+
const leftScore = scoreUnreadCandidateForReview(left, {
|
|
707
|
+
queryShape,
|
|
708
|
+
targetCoverage,
|
|
709
|
+
explicitTargetSet,
|
|
710
|
+
});
|
|
711
|
+
if (rightScore !== leftScore) {
|
|
712
|
+
return rightScore - leftScore;
|
|
713
|
+
}
|
|
714
|
+
return getCandidatePriority(memory, right.filePath) - getCandidatePriority(memory, left.filePath);
|
|
715
|
+
})
|
|
716
|
+
.slice(0, MAX_REVIEW_CANDIDATES);
|
|
717
|
+
const groundedOwnerCount = resolveGroundedOwnerCount(groundedFiles, queryShape);
|
|
718
|
+
const hasUnreadDistinctOwner = unreadCandidates.some((candidate) => candidate.followupRelation === "reexport"
|
|
719
|
+
|| candidate.relationToGrounded === "parent-owner"
|
|
720
|
+
|| candidate.relationToGrounded === "sibling-owner"
|
|
721
|
+
|| ((queryShape === "multi-file" || queryShape === "snippet" || queryShape === "config-entrypoint")
|
|
722
|
+
&& candidate.relationToGrounded !== "duplicate"
|
|
723
|
+
&& candidate.looksLikeLayer !== "test-harness"));
|
|
724
|
+
const followupSignals = buildFollowupSignals({
|
|
725
|
+
queryShape,
|
|
726
|
+
groundedCoverageCount: groundedFiles.filter((file) => file.groundingDepth !== "wrapper").length,
|
|
727
|
+
requiredGroundedCoverage: coverage.requiredGroundedCoverage,
|
|
728
|
+
groundedLayers,
|
|
729
|
+
topUnreadCandidates: unreadCandidates,
|
|
730
|
+
hasUnreadDistinctOwner,
|
|
731
|
+
});
|
|
732
|
+
const expansionAssessment = buildExpansionAssessment(queryShape, unreadCandidates, targetCoverage, groundedFiles);
|
|
733
|
+
const driftAssessment = buildDriftAssessment(targetCoverage, recentProgress, expansionAssessment, unreadCandidates);
|
|
734
|
+
if (expansionAssessment.shouldExpand && expansionAssessment.gap) {
|
|
735
|
+
discoveredSoFar.missingGaps.push(expansionAssessment.gap);
|
|
736
|
+
}
|
|
737
|
+
const referenceFollowupNeeded = expansionAssessment.shouldExpand;
|
|
738
|
+
const stopAssessment = resolveStopAssessment({
|
|
739
|
+
queryShape,
|
|
740
|
+
groundedCoverageCount: groundedFiles.filter((file) => file.groundingDepth !== "wrapper").length,
|
|
741
|
+
requiredGroundedCoverage: coverage.requiredGroundedCoverage,
|
|
742
|
+
fullReadCoverageCount,
|
|
743
|
+
requiredFullReadCoverage: coverage.requiredFullReadCoverage,
|
|
744
|
+
hasUnreadDistinctOwner,
|
|
745
|
+
referenceFollowupNeeded,
|
|
746
|
+
targetCoverage,
|
|
747
|
+
expansionAssessment,
|
|
748
|
+
hasStructuredTargetRequirement: coverage.hasStructuredTargetRequirement,
|
|
749
|
+
hasUnreadStructuredTargets: coverage.unreadHardFileTargets.length > 0,
|
|
750
|
+
hasUnresolvedHardFileRequirement: coverage.hasUnresolvedHardFileRequirement,
|
|
751
|
+
});
|
|
752
|
+
return {
|
|
753
|
+
groundingStatus: stopAssessment.canStop
|
|
754
|
+
? "solid"
|
|
755
|
+
: groundedFiles.length > 0
|
|
756
|
+
? "partial"
|
|
757
|
+
: "weak",
|
|
758
|
+
queryShape,
|
|
759
|
+
requiredGroundedCoverage: coverage.requiredGroundedCoverage,
|
|
760
|
+
groundedCoverageCount: groundedFiles.length,
|
|
761
|
+
targetCoverage,
|
|
762
|
+
groundedFiles,
|
|
763
|
+
discoveredSoFar,
|
|
764
|
+
topUnreadCandidates: unreadCandidates,
|
|
765
|
+
followupSignals,
|
|
766
|
+
recentProgress,
|
|
767
|
+
expansionAssessment,
|
|
768
|
+
driftAssessment,
|
|
769
|
+
multiFileStatus: {
|
|
770
|
+
required: queryShape === "multi-file" || queryShape === "snippet" || queryShape === "config-entrypoint",
|
|
771
|
+
groundedOwnerCount,
|
|
772
|
+
hasUnreadDistinctOwner,
|
|
773
|
+
},
|
|
774
|
+
stopAssessment,
|
|
775
|
+
referenceFollowupNeeded,
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
//# sourceMappingURL=loopReview.js.map
|