@codeyam/codeyam-cli 0.1.0-staging.b8a55ba → 0.1.0-staging.c90f8c9
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/analyzer-template/.build-info.json +8 -8
- package/analyzer-template/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -6
- package/analyzer-template/packages/ai/index.ts +10 -3
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +126 -6
- package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +116 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +140 -6
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +15 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +849 -9
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +244 -0
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +216 -36
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +892 -117
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +2 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +296 -35
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +120 -76
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +80 -5
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +8 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
- package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +156 -0
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
- package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +86 -142
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +1 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1111 -87
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +191 -191
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +570 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +1977 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
- package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +5 -5
- package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +276 -3
- package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +33 -3
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -142
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +90 -6
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -89
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +11 -11
- package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
- package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +812 -0
- package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
- package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +118 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +14 -0
- package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +381 -265
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +18 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +33 -7
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +31 -15
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +11 -7
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +11 -12
- package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +148 -41
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +506 -59
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +157 -74
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +156 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +35 -129
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +2 -3
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +420 -87
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
- package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
- package/analyzer-template/packages/aws/package.json +3 -3
- package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
- package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
- package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
- package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +17 -1
- package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +16 -0
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -3
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +7 -3
- package/analyzer-template/packages/generate/index.ts +3 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +193 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
- package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -18
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +17 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +2 -6
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +13 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts +3 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +23 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
- package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.js +3 -0
- package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.d.ts +3 -4
- package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.js +0 -1
- package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +71 -27
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +9 -54
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.js +1 -21
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +148 -0
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
- package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
- package/analyzer-template/packages/process/index.ts +2 -0
- package/analyzer-template/packages/process/package.json +12 -0
- package/analyzer-template/packages/process/tsconfig.json +8 -0
- package/analyzer-template/packages/types/index.ts +3 -6
- package/analyzer-template/packages/types/src/types/Analysis.ts +87 -27
- package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +9 -77
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +175 -0
- package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/index.d.ts +3 -4
- package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/index.js +0 -1
- package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +71 -27
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +9 -54
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js +1 -21
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +148 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
- package/analyzer-template/playwright/capture.ts +37 -18
- package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
- package/analyzer-template/playwright/waitForServer.ts +21 -6
- package/analyzer-template/project/analyzeBaselineCommit.ts +4 -0
- package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
- package/analyzer-template/project/analyzeFileEntities.ts +4 -0
- package/analyzer-template/project/analyzeRegularCommit.ts +4 -0
- package/analyzer-template/project/constructMockCode.ts +1112 -169
- package/analyzer-template/project/controller/startController.ts +16 -1
- package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
- package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
- package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
- package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +7 -1
- package/analyzer-template/project/orchestrateCapture.ts +36 -3
- package/analyzer-template/project/reconcileMockDataKeys.ts +220 -78
- package/analyzer-template/project/runAnalysis.ts +11 -0
- package/analyzer-template/project/serverOnlyModules.ts +127 -2
- package/analyzer-template/project/start.ts +16 -4
- package/analyzer-template/project/startScenarioCapture.ts +6 -0
- package/analyzer-template/project/writeMockDataTsx.ts +164 -24
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +304 -112
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +11 -35
- package/analyzer-template/scripts/comboWorkerLoop.cjs +1 -0
- package/analyzer-template/scripts/defaultCmd.sh +9 -0
- package/analyzer-template/tsconfig.json +2 -1
- package/background/src/lib/local/createLocalAnalyzer.js +1 -29
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/local/execAsync.js +1 -1
- package/background/src/lib/local/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/common/execAsync.js +1 -1
- package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +2 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js +2 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js +2 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +987 -130
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/controller/startController.js +11 -1
- package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +3 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +27 -4
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +188 -47
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +9 -0
- package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +106 -3
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +15 -4
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +7 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +139 -23
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +228 -95
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
- package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +11 -34
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/src/cli.js +5 -1
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +1 -1
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +174 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -0
- package/codeyam-cli/src/commands/debug.js +28 -18
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +0 -15
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/recapture.js +29 -18
- package/codeyam-cli/src/commands/recapture.js.map +1 -1
- package/codeyam-cli/src/commands/report.js +46 -1
- package/codeyam-cli/src/commands/report.js.map +1 -1
- package/codeyam-cli/src/commands/start.js +8 -12
- package/codeyam-cli/src/commands/start.js.map +1 -1
- package/codeyam-cli/src/commands/status.js +23 -1
- package/codeyam-cli/src/commands/status.js.map +1 -1
- package/codeyam-cli/src/commands/test-startup.js +1 -1
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/wipe.js +108 -0
- package/codeyam-cli/src/commands/wipe.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +31 -27
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +28 -14
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +12 -2
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/database.js +91 -5
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +4 -3
- package/codeyam-cli/src/utils/generateReport.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +79 -0
- package/codeyam-cli/src/utils/git.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +31 -17
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +105 -0
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +6 -0
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +7 -5
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/versionInfo.js +25 -19
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/wipe.js +128 -0
- package/codeyam-cli/src/utils/wipe.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +73 -20
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/bootstrap.js +40 -0
- package/codeyam-cli/src/webserver/bootstrap.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-BXhEawa3.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CzGX-miz.js → EntityTypeBadge-DLqD3qNt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-Ba2JVPzP.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C8lyxW9k.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-aht4aafF.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CBQPrpT0.js → LibraryFunctionPreview-CVtiBnY5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-D1CdlbrV.js → LoadingDots-B0GLXMsr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-wDPcZNKx.js → LogViewer-xgeCVgSM.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-D4TZhLuw.js +21 -0
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-BfmDgXxG.js → SafeScreenshot-DuDvi0jm.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-DEx02QDa.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-6J7zDUD5.js → TruncatedFilePath-DyFZkK0l.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-BwqWJOgH.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DoLIqZX2.js +37 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BYimnrHg.js → chevron-down-Cx24_aWc.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-CXRTFQ3F.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-CaVsIRxt.js → circle-check-BOARzkeR.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-CgUsG7ib.js → createLucideIcon-BdhJEx6B.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-CCKUIm0S.svg} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BRb-0kQl.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-zUEpfPsu.js → entity._sha._-C2N4Op8e.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D1T4TGjf.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CfLCUi9S.js → entity._sha_.edit._scenarioId-CTBG2mmz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DKJyZfAY.js → entry.client-CS2cb_eZ.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DAtOlaWE.js → fileTableUtils-DMJ7zii9.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-Cs4MdYtv.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{git-D62Lxxmv.js → git-B4RJRvYB.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/git-commit-horizontal-CysbcZxi.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-DMUaGAqV.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CzNNiTkw.js → index-B1h680n5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-BosqDOlH.js → index-lzqtyFU8.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-CNp9QFCX.js → loader-circle-B7B9V-bu.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-f874c610.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-Bz5TunQg.js +57 -0
- package/codeyam-cli/src/webserver/build/client/assets/rules-hEkvVw2-.js +97 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DDGjYAMJ.js → search-CxXUmBSd.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-CS5f3WzT.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-DwFIBT09.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CBc5dE1s.js → triangle-alert-B6LgvRJg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-C1v1PQzo.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-BqPPNjAl.js → useLastLogLine-aSv48UbS.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DYxHZQuP.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-DWHcCcl1.js → useToast-mBRpZPiu.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-uNNbimct.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-B08qC4Y7.js +257 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/server.js +35 -25
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/templates/codeyam-power-rules-hook.sh +200 -0
- package/codeyam-cli/templates/{codeyam-debug-skill.md → codeyam:debug.md} +48 -4
- package/codeyam-cli/templates/{debug-codeyam.md → codeyam:diagnose.md} +185 -23
- package/codeyam-cli/templates/codeyam:new-rule.md +13 -0
- package/codeyam-cli/templates/codeyam:power-rules.md +449 -0
- package/codeyam-cli/templates/{codeyam-setup-skill.md → codeyam:setup.md} +139 -4
- package/codeyam-cli/templates/{codeyam-sim-skill.md → codeyam:sim.md} +1 -1
- package/codeyam-cli/templates/{codeyam-test-skill.md → codeyam:test.md} +1 -1
- package/codeyam-cli/templates/{codeyam-verify-skill.md → codeyam:verify.md} +1 -1
- package/package.json +6 -5
- package/packages/ai/index.js +5 -4
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +97 -0
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +84 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
- package/packages/ai/src/lib/astScopes/methodSemantics.js +97 -6
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +7 -0
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +654 -13
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/checkAllAttributes.js +24 -9
- package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +178 -31
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +715 -64
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +2 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +230 -23
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +77 -55
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +67 -3
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +6 -1
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructureChunking.js +111 -0
- package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
- package/packages/ai/src/lib/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.js.map +1 -0
- package/packages/ai/src/lib/e2eDataTracking.js +241 -0
- package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +62 -5
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +78 -120
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +1 -0
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +906 -82
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +170 -162
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +392 -0
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1440 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -2
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
- package/packages/ai/src/lib/isolateScopes.js +231 -4
- package/packages/ai/src/lib/isolateScopes.js.map +1 -1
- package/packages/ai/src/lib/mergeStatements.js +26 -3
- package/packages/ai/src/lib/mergeStatements.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -100
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +68 -6
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -70
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +9 -9
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
- package/packages/ai/src/lib/resolvePathToControllable.js +667 -0
- package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
- package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
- package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
- package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +15 -0
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/analysisContext.js +30 -5
- package/packages/analyze/src/lib/analysisContext.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +151 -52
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +10 -0
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +2 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +31 -7
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +21 -11
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +9 -8
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +9 -10
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +121 -37
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +410 -55
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -34
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +126 -57
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +96 -0
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +27 -98
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +2 -3
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +342 -83
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/packages/database/src/lib/loadAnalyses.js +45 -2
- package/packages/database/src/lib/loadAnalyses.js.map +1 -1
- package/packages/database/src/lib/loadCommits.js +13 -1
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +23 -4
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/generate/index.js +3 -0
- package/packages/generate/index.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
- package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
- package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/packages/process/index.js +3 -0
- package/packages/process/index.js.map +1 -0
- package/packages/process/src/GlobalProcessManager.js.map +1 -0
- package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
- package/packages/process/src/ProcessManager.js.map +1 -0
- package/packages/process/src/index.js.map +1 -0
- package/packages/process/src/managedExecAsync.js.map +1 -0
- package/packages/types/index.js +0 -1
- package/packages/types/index.js.map +1 -1
- package/packages/types/src/types/Scenario.js +1 -21
- package/packages/types/src/types/Scenario.js.map +1 -1
- package/packages/utils/src/lib/safeFileName.js +29 -3
- package/packages/utils/src/lib/safeFileName.js.map +1 -1
- package/scripts/finalize-analyzer.cjs +3 -3
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -409
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -288
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -495
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -120
- package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
- package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
- package/analyzer-template/process/README.md +0 -507
- package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
- package/background/src/lib/process/ProcessManager.js.map +0 -1
- package/background/src/lib/process/index.js.map +0 -1
- package/background/src/lib/process/managedExecAsync.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js +0 -7
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-wXL1Z2Aq.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-CXFKsCOD.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-D-9pXIaY.js +0 -25
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-4lcOlid-.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CUxUNEEC.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/_index-DHImXdXq.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-2mG6mjVb.js +0 -32
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-BambyYE_.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-CKnwPCDr.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DW_hdGUc.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D_3ero5o.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-ClR0d32A.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-C6vQASxy.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/keyAttributeCoverage-CTlFMihX.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-09d684be.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-BxJUvKau.js +0 -56
- package/codeyam-cli/src/webserver/build/client/assets/settings-DgTyB-Wg.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CoNWGt0K.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BMIGFP-m.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useInteractiveMode-Dk_FQqWJ.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DsJbgMY9.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-CV6i1S1A.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BDlyhfrv.js +0 -175
- package/packages/ai/src/lib/findMatchingAttribute.js +0 -77
- package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -298
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -226
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -408
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/isFrontend.js +0 -5
- package/packages/ai/src/lib/isFrontend.js.map +0 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -77
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
- /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
- /package/codeyam-cli/src/webserver/build/client/assets/{api.link-scenario-value-l0sNRNKZ.js → api.health-l0sNRNKZ.js} +0 -0
- /package/codeyam-cli/src/webserver/build/client/assets/{api.update-key-attributes-l0sNRNKZ.js → api.restart-server-l0sNRNKZ.js} +0 -0
- /package/codeyam-cli/src/webserver/build/client/assets/{api.update-valid-values-l0sNRNKZ.js → api.rules-l0sNRNKZ.js} +0 -0
- /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
|
@@ -142,9 +142,147 @@ export interface VariablePath {
|
|
|
142
142
|
segments: PathSegment[];
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Represents the effect of a setter call within a conditional block.
|
|
147
|
+
* This tracks what state changes occur when specific conditions are met.
|
|
148
|
+
*
|
|
149
|
+
* Example: if (data.success) { setShowModal(true); }
|
|
150
|
+
* - condition: data.success = truthy
|
|
151
|
+
* - effect: setShowModal called with true
|
|
152
|
+
*/
|
|
153
|
+
export interface ConditionalEffect {
|
|
154
|
+
/**
|
|
155
|
+
* Single condition that controls this effect.
|
|
156
|
+
* Use this for simple if statements with a single condition.
|
|
157
|
+
*/
|
|
158
|
+
condition?: {
|
|
159
|
+
/** The path being checked (e.g., "data.success") */
|
|
160
|
+
path: string;
|
|
161
|
+
/** Type of condition check */
|
|
162
|
+
conditionType: 'truthiness' | 'comparison' | 'switch';
|
|
163
|
+
/** Values being compared against (for comparison/switch) */
|
|
164
|
+
comparedValues?: string[];
|
|
165
|
+
/** The value required for this effect to occur */
|
|
166
|
+
requiredValue: string | boolean;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Multiple conditions that all must be true for this effect.
|
|
171
|
+
* Use this for compound conditions (a && b && c).
|
|
172
|
+
*/
|
|
173
|
+
conditions?: Array<{
|
|
174
|
+
/** The path being checked */
|
|
175
|
+
path: string;
|
|
176
|
+
/** Type of condition check */
|
|
177
|
+
conditionType: 'truthiness' | 'comparison' | 'switch';
|
|
178
|
+
/** Values being compared against */
|
|
179
|
+
comparedValues?: string[];
|
|
180
|
+
/** The value required for this condition to be true */
|
|
181
|
+
requiredValue: string | boolean;
|
|
182
|
+
}>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The effect that occurs when the condition(s) are met.
|
|
186
|
+
*/
|
|
187
|
+
effect: {
|
|
188
|
+
/** Type of effect - currently only 'setter' for useState setters */
|
|
189
|
+
type: 'setter';
|
|
190
|
+
/** The state variable name (e.g., "showModal" from [showModal, setShowModal]) */
|
|
191
|
+
stateVariable: string;
|
|
192
|
+
/** The setter function name (e.g., "setShowModal") */
|
|
193
|
+
setterName: string;
|
|
194
|
+
/** The value being set (literal or expression text) */
|
|
195
|
+
value: string;
|
|
196
|
+
/** The type of value being set */
|
|
197
|
+
valueType: 'string' | 'number' | 'boolean' | 'null' | 'dynamic';
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Source location for this conditional effect
|
|
202
|
+
*/
|
|
203
|
+
sourceLocation?: {
|
|
204
|
+
lineNumber: number;
|
|
205
|
+
column: number;
|
|
206
|
+
codeSnippet: string;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
145
210
|
/**
|
|
146
211
|
* Results of AST-based scope analysis
|
|
147
212
|
*/
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Operation types for derived variables.
|
|
216
|
+
* - notNull/isNull: null checks (x !== null, x === null)
|
|
217
|
+
* - equals/notEquals: value comparisons (x === 'value', x !== 'value')
|
|
218
|
+
* - or/and: logical combinations (a || b, a && b)
|
|
219
|
+
* - arrayIncludes/arraySome/arrayEvery: array predicate methods
|
|
220
|
+
* - arrayLength: array.length property access
|
|
221
|
+
*/
|
|
222
|
+
export type DerivedVariableOperation =
|
|
223
|
+
| 'notNull'
|
|
224
|
+
| 'isNull'
|
|
225
|
+
| 'equals'
|
|
226
|
+
| 'notEquals'
|
|
227
|
+
| 'or'
|
|
228
|
+
| 'and'
|
|
229
|
+
| 'arrayIncludes'
|
|
230
|
+
| 'arraySome'
|
|
231
|
+
| 'arrayEvery'
|
|
232
|
+
| 'arrayLength';
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Information about how a variable was derived from other variables.
|
|
236
|
+
* Used to trace derived boolean variables back to their data sources.
|
|
237
|
+
*/
|
|
238
|
+
export interface DerivedVariableInfo {
|
|
239
|
+
/** For single-source derivations (notNull, equals, array predicates, etc.) */
|
|
240
|
+
sourcePath?: string;
|
|
241
|
+
/** For multi-source derivations (or, and) */
|
|
242
|
+
sourcePaths?: string[];
|
|
243
|
+
/** The operation that derived this variable */
|
|
244
|
+
operation: DerivedVariableOperation;
|
|
245
|
+
/** For comparison operations, the value being compared to */
|
|
246
|
+
comparedValue?: string;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Represents a JSX rendering usage where arrays or strings are rendered directly.
|
|
251
|
+
* Used to generate execution flows for array sizes and text lengths
|
|
252
|
+
* even without explicit conditionals.
|
|
253
|
+
*
|
|
254
|
+
* Examples:
|
|
255
|
+
* - `{items.map(i => <Item {...i} />)}` → array-map usage for 'items'
|
|
256
|
+
* - `{user.name}` → text-interpolation usage for 'user.name'
|
|
257
|
+
*/
|
|
258
|
+
export interface JsxRenderingUsage {
|
|
259
|
+
/**
|
|
260
|
+
* The path to the rendered value (e.g., "items", "data.users", "user.name")
|
|
261
|
+
*/
|
|
262
|
+
path: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Type of rendering:
|
|
266
|
+
* - 'array-map': Array rendered via .map() method
|
|
267
|
+
* - 'text-interpolation': String rendered directly in JSX
|
|
268
|
+
*/
|
|
269
|
+
renderingType: 'array-map' | 'text-interpolation';
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The detected type of the value being rendered
|
|
273
|
+
*/
|
|
274
|
+
valueType?: 'array' | 'string' | 'unknown';
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Source location information
|
|
278
|
+
*/
|
|
279
|
+
sourceLocation?: {
|
|
280
|
+
lineNumber: number;
|
|
281
|
+
column: number;
|
|
282
|
+
codeSnippet: string;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
148
286
|
export interface AstScopeAnalysisResult {
|
|
149
287
|
// Variable structure map (variable path -> type)
|
|
150
288
|
structure: Record<string, string>;
|
|
@@ -162,6 +300,24 @@ export interface AstScopeAnalysisResult {
|
|
|
162
300
|
// Compound conditionals grouped by chain (all conditions must be true together)
|
|
163
301
|
compoundConditionals?: CompoundConditional[];
|
|
164
302
|
|
|
303
|
+
// Conditional effects - tracks what setter calls happen inside conditionals
|
|
304
|
+
// This allows us to determine what data conditions must be true for different state changes
|
|
305
|
+
conditionalEffects: ConditionalEffect[];
|
|
306
|
+
|
|
307
|
+
// Derived variables - variables computed from boolean expressions
|
|
308
|
+
// Maps variable name to derivation info (e.g., hasAnalysis -> { sourcePath: 'analysis', operation: 'notNull' })
|
|
309
|
+
derivedVariables?: Record<string, DerivedVariableInfo>;
|
|
310
|
+
|
|
311
|
+
// Child boundary gating conditions - tracks which conditions must be true for a child component to render
|
|
312
|
+
// Maps child component name to array of conditional usages that gate its rendering
|
|
313
|
+
// Example: {hasAnalysis && <ScenarioViewer />} → { ScenarioViewer: [{ path: 'hasAnalysis', ... }] }
|
|
314
|
+
childBoundaryGatingConditions?: Record<string, ConditionalUsage[]>;
|
|
315
|
+
|
|
316
|
+
// JSX rendering usages - tracks arrays rendered via .map() and strings interpolated in JSX
|
|
317
|
+
// Used to generate execution flows for array sizes and text lengths without explicit conditionals
|
|
318
|
+
// Example: {items.map(i => <Item {...i} />)} → array-map usage for 'items'
|
|
319
|
+
jsxRenderingUsages?: JsxRenderingUsage[];
|
|
320
|
+
|
|
165
321
|
// Whether the analysis is complete enough to skip LLM calls
|
|
166
322
|
isComplete: boolean;
|
|
167
323
|
|
|
@@ -217,6 +373,45 @@ export interface ConditionalUsage {
|
|
|
217
373
|
chainExpression?: string;
|
|
218
374
|
/** Whether this condition is negated (e.g., !foo) */
|
|
219
375
|
isNegated?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Whether this conditional controls JSX rendering.
|
|
378
|
+
* True when the conditional appears in a JSX expression like {cond && <Component />}
|
|
379
|
+
* or {cond ? <A /> : <B />}. Used to identify high-impact execution flows.
|
|
380
|
+
*/
|
|
381
|
+
controlsJsxRendering?: boolean;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Information about how this variable was derived from other variables.
|
|
385
|
+
* Used to trace derived boolean variables back to their data sources.
|
|
386
|
+
*
|
|
387
|
+
* Examples:
|
|
388
|
+
* - `const hasAnalysis = analysis !== null` → { sourcePath: 'analysis', operation: 'notNull' }
|
|
389
|
+
* - `const isLoading = status === 'loading'` → { sourcePath: 'status', operation: 'equals', comparedValue: 'loading' }
|
|
390
|
+
* - `const isBusy = isRunning || isQueued` → { operation: 'or', sourcePaths: ['isRunning', 'isQueued'] }
|
|
391
|
+
*/
|
|
392
|
+
derivedFrom?: {
|
|
393
|
+
/** For single-source derivations (notNull, equals, array predicates, etc.) */
|
|
394
|
+
sourcePath?: string;
|
|
395
|
+
/** For multi-source derivations (or, and) */
|
|
396
|
+
sourcePaths?: string[];
|
|
397
|
+
/** The operation that derived this variable */
|
|
398
|
+
operation: DerivedVariableOperation;
|
|
399
|
+
/** For comparison operations, the value being compared to */
|
|
400
|
+
comparedValue?: string;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The full original expression as a semantic constraint for LLM reasoning.
|
|
405
|
+
* Used when the path contains complex operations (filter, map, etc.) that
|
|
406
|
+
* can't be simply resolved to a mock value.
|
|
407
|
+
*
|
|
408
|
+
* Examples:
|
|
409
|
+
* - `scenarios.filter(s => s.active).length > 1`
|
|
410
|
+
* - `users.some(u => u.role === 'admin' && u.active)`
|
|
411
|
+
*
|
|
412
|
+
* The LLM can interpret this constraint to generate appropriate mock data.
|
|
413
|
+
*/
|
|
414
|
+
constraintExpression?: string;
|
|
220
415
|
}
|
|
221
416
|
|
|
222
417
|
/**
|
|
@@ -236,6 +431,14 @@ export interface CompoundConditional {
|
|
|
236
431
|
isNegated: boolean;
|
|
237
432
|
/** Required value for this condition to be true */
|
|
238
433
|
requiredValue?: string | boolean;
|
|
434
|
+
/**
|
|
435
|
+
* When conditions are part of an OR expression within an && chain,
|
|
436
|
+
* they share the same orGroupId. Conditions with the same orGroupId
|
|
437
|
+
* are alternatives - only ONE needs to be satisfied.
|
|
438
|
+
* Example: `A && (B || C)` creates conditions where B and C share an orGroupId.
|
|
439
|
+
* This allows flow generation to expand into separate flows: A&&B and A&&C.
|
|
440
|
+
*/
|
|
441
|
+
orGroupId?: string;
|
|
239
442
|
}[];
|
|
240
443
|
/** Where this compound conditional occurs */
|
|
241
444
|
location: 'if' | 'ternary' | 'logical-and' | 'switch';
|
|
@@ -245,6 +448,12 @@ export interface CompoundConditional {
|
|
|
245
448
|
column: number;
|
|
246
449
|
codeSnippet: string;
|
|
247
450
|
};
|
|
451
|
+
/**
|
|
452
|
+
* Whether this compound conditional controls JSX rendering.
|
|
453
|
+
* True when the conditional appears in a JSX expression like {a && b && <Component />}
|
|
454
|
+
* Used to identify high-impact execution flows.
|
|
455
|
+
*/
|
|
456
|
+
controlsJsxRendering?: boolean;
|
|
248
457
|
}
|
|
249
458
|
|
|
250
459
|
/**
|
|
@@ -372,6 +581,28 @@ export interface AnalysisContext {
|
|
|
372
581
|
// Get all conditional usages
|
|
373
582
|
getConditionalUsages(): Record<string, ConditionalUsage[]>;
|
|
374
583
|
|
|
584
|
+
// Add a gating condition for a child component
|
|
585
|
+
// Called when we see patterns like: {hasAnalysis && <ChildComponent />}
|
|
586
|
+
addChildBoundaryGatingCondition(
|
|
587
|
+
childComponentName: string,
|
|
588
|
+
gatingCondition: ConditionalUsage,
|
|
589
|
+
): void;
|
|
590
|
+
|
|
591
|
+
// Get all child boundary gating conditions
|
|
592
|
+
getChildBoundaryGatingConditions(): Record<string, ConditionalUsage[]>;
|
|
593
|
+
|
|
594
|
+
// Record a derived variable and its source expression
|
|
595
|
+
// Called when we see patterns like: const hasAnalysis = analysis !== null
|
|
596
|
+
addDerivedVariable(
|
|
597
|
+
variableName: string,
|
|
598
|
+
derivationInfo: {
|
|
599
|
+
sourcePath?: string;
|
|
600
|
+
sourcePaths?: string[];
|
|
601
|
+
operation: DerivedVariableOperation;
|
|
602
|
+
comparedValue?: string;
|
|
603
|
+
},
|
|
604
|
+
): void;
|
|
605
|
+
|
|
375
606
|
// Add a compound conditional for key attribute dependency detection
|
|
376
607
|
addCompoundConditional(compound: CompoundConditional): void;
|
|
377
608
|
|
|
@@ -381,4 +612,17 @@ export interface AnalysisContext {
|
|
|
381
612
|
// Update a schema type, typically used when switch statements reveal
|
|
382
613
|
// the valid values for a parameter (creating a union type)
|
|
383
614
|
updateSchemaType(path: string | StructuredPath, newType: string): void;
|
|
615
|
+
|
|
616
|
+
// Add a conditional effect (setter call inside a conditional)
|
|
617
|
+
addConditionalEffect(effect: ConditionalEffect): void;
|
|
618
|
+
|
|
619
|
+
// Get all conditional effects
|
|
620
|
+
getConditionalEffects(): ConditionalEffect[];
|
|
621
|
+
|
|
622
|
+
// Add a JSX rendering usage (array.map() or text interpolation)
|
|
623
|
+
// Called when we see patterns like: {items.map(i => <Item />)} or {user.name}
|
|
624
|
+
addJsxRenderingUsage(usage: JsxRenderingUsage): void;
|
|
625
|
+
|
|
626
|
+
// Get all JSX rendering usages
|
|
627
|
+
getJsxRenderingUsages(): JsxRenderingUsage[];
|
|
384
628
|
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
export default function checkAllAttributes(
|
|
2
|
-
|
|
1
|
+
export default function checkAllAttributes(
|
|
2
|
+
data: { [key: string]: unknown } | unknown,
|
|
3
|
+
): unknown {
|
|
4
|
+
// Handle non-object values (strings, numbers, etc.) - return them as-is
|
|
5
|
+
if (data === null || data === undefined) {
|
|
6
|
+
return data;
|
|
7
|
+
}
|
|
8
|
+
if (typeof data !== 'object') {
|
|
9
|
+
return data;
|
|
10
|
+
}
|
|
11
|
+
// Handle arrays - recurse into each element
|
|
12
|
+
if (Array.isArray(data)) {
|
|
13
|
+
return data.map((item) => checkAllAttributes(item));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const obj = data as { [key: string]: unknown };
|
|
17
|
+
for (const key of Object.keys(obj)) {
|
|
3
18
|
try {
|
|
4
|
-
if (
|
|
5
|
-
delete
|
|
19
|
+
if (obj[key] === undefined) {
|
|
20
|
+
delete obj[key];
|
|
6
21
|
continue;
|
|
7
22
|
}
|
|
8
23
|
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
if (Array.isArray(obj[key])) {
|
|
25
|
+
obj[key] = (obj[key] as unknown[]).map((item) =>
|
|
26
|
+
checkAllAttributes(item),
|
|
27
|
+
);
|
|
28
|
+
} else if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
29
|
+
checkAllAttributes(obj[key]);
|
|
30
|
+
} else if (typeof obj[key] === 'string') {
|
|
31
|
+
obj[key] = (obj[key] as string).replace(/\n/g, '\\n');
|
|
13
32
|
}
|
|
14
33
|
} catch (e) {
|
|
15
34
|
console.error('Error checking all attributes', {
|
|
16
35
|
key,
|
|
17
|
-
data,
|
|
36
|
+
data: obj,
|
|
18
37
|
error: e,
|
|
19
38
|
});
|
|
20
39
|
throw e;
|
|
21
40
|
}
|
|
22
41
|
}
|
|
23
42
|
|
|
24
|
-
return
|
|
43
|
+
return obj;
|
|
25
44
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OpenAI from 'openai';
|
|
2
2
|
import * as lib from '../lib';
|
|
3
|
+
import { trackDataSnapshot } from './e2eDataTracking';
|
|
3
4
|
|
|
4
5
|
import PQueue from 'p-queue';
|
|
5
6
|
import { default as PRetry, Options } from 'p-retry';
|
|
@@ -9,6 +10,7 @@ import { getModelInfo } from './modelInfo';
|
|
|
9
10
|
import { AI } from './types';
|
|
10
11
|
import { callClaudeCli } from './services/claudeCliAIService';
|
|
11
12
|
import { isClaudeCliMode } from './services/aiServiceMode';
|
|
13
|
+
import { awsLogDebugLevel } from '~codeyam/utils';
|
|
12
14
|
|
|
13
15
|
// set to 'true' only locally for e.g. benchmarking unassisted error rates
|
|
14
16
|
const RETRIES_DISABLED = false;
|
|
@@ -66,7 +68,11 @@ export default async function completionCall({
|
|
|
66
68
|
// When CODEYAM_LLM_FIXTURES_DIR is set, load responses from captured JSON files
|
|
67
69
|
// instead of making real API calls
|
|
68
70
|
if (process.env.CODEYAM_LLM_FIXTURES_DIR) {
|
|
69
|
-
return await replayLlmCall(
|
|
71
|
+
return await replayLlmCall(
|
|
72
|
+
type,
|
|
73
|
+
process.env.CODEYAM_LLM_FIXTURES_DIR,
|
|
74
|
+
systemMessage,
|
|
75
|
+
);
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
console.log(
|
|
@@ -133,10 +139,35 @@ export default async function completionCall({
|
|
|
133
139
|
() => {
|
|
134
140
|
queueEndTime = Date.now();
|
|
135
141
|
return PRetry(
|
|
136
|
-
() => {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
async () => {
|
|
143
|
+
const callStartTime = Date.now();
|
|
144
|
+
const waitingMessages = [
|
|
145
|
+
'Waiting for LLM response',
|
|
146
|
+
'Still waiting for LLM response',
|
|
147
|
+
'LLM call in progress',
|
|
148
|
+
'Processing LLM request',
|
|
149
|
+
'Awaiting LLM completion',
|
|
150
|
+
];
|
|
151
|
+
|
|
152
|
+
const logInterval = setInterval(() => {
|
|
153
|
+
const elapsedSeconds = Math.floor(
|
|
154
|
+
(Date.now() - callStartTime) / 1000,
|
|
155
|
+
);
|
|
156
|
+
const messageIndex =
|
|
157
|
+
Math.floor(elapsedSeconds / 10) % waitingMessages.length;
|
|
158
|
+
awsLogDebugLevel(
|
|
159
|
+
1,
|
|
160
|
+
`${waitingMessages[messageIndex]} [type=${type}, model=${model}, elapsed=${elapsedSeconds}s]`,
|
|
161
|
+
);
|
|
162
|
+
}, 10000);
|
|
163
|
+
|
|
164
|
+
try {
|
|
165
|
+
return await openai.chat.completions.create(params, {
|
|
166
|
+
timeout: 5 * 60 * 1000, // 5 minute timeout
|
|
167
|
+
});
|
|
168
|
+
} finally {
|
|
169
|
+
clearInterval(logInterval);
|
|
170
|
+
}
|
|
140
171
|
},
|
|
141
172
|
{
|
|
142
173
|
...defaultRetryOptions,
|
|
@@ -282,21 +313,46 @@ Please provide a corrected version with valid JSON only. Do not include any expl
|
|
|
282
313
|
const correctionChatCompletion = await queue.add(
|
|
283
314
|
() => {
|
|
284
315
|
return PRetry(
|
|
285
|
-
() => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
316
|
+
async () => {
|
|
317
|
+
const correctionStartTime = Date.now();
|
|
318
|
+
const waitingMessages = [
|
|
319
|
+
'Waiting for LLM correction response',
|
|
320
|
+
'Still waiting for LLM correction',
|
|
321
|
+
'LLM correction in progress',
|
|
322
|
+
'Processing LLM correction request',
|
|
323
|
+
'Awaiting LLM correction completion',
|
|
324
|
+
];
|
|
325
|
+
|
|
326
|
+
const logInterval = setInterval(() => {
|
|
327
|
+
const elapsedSeconds = Math.floor(
|
|
328
|
+
(Date.now() - correctionStartTime) / 1000,
|
|
329
|
+
);
|
|
330
|
+
const messageIndex =
|
|
331
|
+
Math.floor(elapsedSeconds / 10) % waitingMessages.length;
|
|
332
|
+
awsLogDebugLevel(
|
|
333
|
+
1,
|
|
334
|
+
`${waitingMessages[messageIndex]} [type=${type}, model=${model}, elapsed=${elapsedSeconds}s]`,
|
|
335
|
+
);
|
|
336
|
+
}, 10000);
|
|
337
|
+
|
|
338
|
+
try {
|
|
339
|
+
return await openai.chat.completions.create(
|
|
340
|
+
{
|
|
341
|
+
...params,
|
|
342
|
+
messages: [
|
|
343
|
+
{ role: 'system', content: systemMessage },
|
|
344
|
+
{ role: 'user', content: prompt },
|
|
345
|
+
{ role: 'assistant', content: completion },
|
|
346
|
+
{ role: 'user', content: correctionPrompt },
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
timeout: 5 * 60 * 1000,
|
|
351
|
+
},
|
|
352
|
+
);
|
|
353
|
+
} finally {
|
|
354
|
+
clearInterval(logInterval);
|
|
355
|
+
}
|
|
300
356
|
},
|
|
301
357
|
{
|
|
302
358
|
...defaultRetryOptions,
|
|
@@ -372,6 +428,12 @@ Please provide a corrected version with valid JSON only. Do not include any expl
|
|
|
372
428
|
}
|
|
373
429
|
}
|
|
374
430
|
|
|
431
|
+
// Track the completion for E2E debugging
|
|
432
|
+
trackDataSnapshot(`completionCall_${type}`, {
|
|
433
|
+
completion,
|
|
434
|
+
finishReason: chatCompletion.choices[0].finish_reason,
|
|
435
|
+
});
|
|
436
|
+
|
|
375
437
|
return {
|
|
376
438
|
finishReason: chatCompletion.choices[0].finish_reason,
|
|
377
439
|
completion,
|
|
@@ -388,11 +450,13 @@ export const QueueSize = () => queue.size;
|
|
|
388
450
|
*
|
|
389
451
|
* @param type - The prompt type to look up (e.g., 'generateEntityScenarios')
|
|
390
452
|
* @param fixturesDir - Directory containing captured LLM call JSON files
|
|
453
|
+
* @param systemMessage - The system message for the call (used for content-based matching)
|
|
391
454
|
* @returns Mocked completion response matching the structure of a real LLM call
|
|
392
455
|
*/
|
|
393
456
|
async function replayLlmCall(
|
|
394
457
|
type: string,
|
|
395
458
|
fixturesDir: string,
|
|
459
|
+
systemMessage?: string,
|
|
396
460
|
): Promise<{
|
|
397
461
|
finishReason: string;
|
|
398
462
|
completion: string;
|
|
@@ -443,43 +507,159 @@ async function replayLlmCall(
|
|
|
443
507
|
}
|
|
444
508
|
}
|
|
445
509
|
|
|
510
|
+
// Sort fixtures by created_at timestamp to ensure deterministic ordering
|
|
511
|
+
// This is critical because filesystem order is not guaranteed
|
|
512
|
+
for (const promptType of Object.keys(callsByType)) {
|
|
513
|
+
callsByType[promptType].sort((a, b) => {
|
|
514
|
+
const timeA = a.created_at ?? 0;
|
|
515
|
+
const timeB = b.created_at ?? 0;
|
|
516
|
+
return timeA - timeB;
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
446
520
|
const matchingCalls = callsByType[type];
|
|
447
521
|
|
|
448
522
|
if (!matchingCalls || matchingCalls.length === 0) {
|
|
449
523
|
const availableTypes = Object.keys(callsByType).join(', ');
|
|
450
|
-
|
|
451
|
-
`No captured LLM call found for type '${type}'. Available types: ${availableTypes}`,
|
|
524
|
+
console.warn(
|
|
525
|
+
`CodeYam Test: No captured LLM call found for type '${type}'. Available types: ${availableTypes}`,
|
|
452
526
|
);
|
|
527
|
+
// Return empty response - callers should handle gracefully
|
|
528
|
+
// This allows new LLM call types to be added without breaking existing fixtures
|
|
529
|
+
return {
|
|
530
|
+
finishReason: 'stop',
|
|
531
|
+
completion: '{}',
|
|
532
|
+
stats: {
|
|
533
|
+
model: 'fixture-fallback',
|
|
534
|
+
prompt_type: type,
|
|
535
|
+
system_message: '',
|
|
536
|
+
prompt_text: '',
|
|
537
|
+
response: '{}',
|
|
538
|
+
input_tokens: 0,
|
|
539
|
+
output_tokens: 0,
|
|
540
|
+
cost: 0,
|
|
541
|
+
},
|
|
542
|
+
};
|
|
453
543
|
}
|
|
454
544
|
|
|
455
|
-
//
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
545
|
+
// For scenario data generation calls, match by scenario name instead of cycling by index.
|
|
546
|
+
// This is critical because scenarios may be processed in parallel with Promise.all,
|
|
547
|
+
// causing non-deterministic call order. Matching by scenario name ensures each call
|
|
548
|
+
// gets the correct fixture regardless of execution order.
|
|
549
|
+
//
|
|
550
|
+
// We group fixtures by scenario name and track indices per scenario to handle
|
|
551
|
+
// multiple calls for the same scenario (e.g., main call + continuation call).
|
|
552
|
+
let call: any;
|
|
553
|
+
const scenarioBasedTypes = [
|
|
554
|
+
'generateEntityScenarioData',
|
|
555
|
+
'generateChunkMockData',
|
|
556
|
+
'generateMissingMockData',
|
|
557
|
+
];
|
|
558
|
+
|
|
559
|
+
if (scenarioBasedTypes.includes(type) && systemMessage) {
|
|
560
|
+
// Extract scenario name from system message: 'Scenario name must match exactly: "NAME"'
|
|
561
|
+
// or from chunk system message which includes scenario name
|
|
562
|
+
const scenarioNameMatch = systemMessage.match(
|
|
563
|
+
/Scenario name must match exactly: "([^"]+)"/,
|
|
564
|
+
);
|
|
565
|
+
const requestedScenarioName = scenarioNameMatch?.[1];
|
|
566
|
+
|
|
567
|
+
if (requestedScenarioName) {
|
|
568
|
+
// Group fixtures by scenario name
|
|
569
|
+
const fixturesByScenario: Record<string, any[]> = {};
|
|
570
|
+
for (const fixture of matchingCalls) {
|
|
571
|
+
try {
|
|
572
|
+
const props = JSON.parse(fixture.props || '{}');
|
|
573
|
+
const scenarioName = props.scenario?.name || '__NO_SCENARIO__';
|
|
574
|
+
if (!fixturesByScenario[scenarioName]) {
|
|
575
|
+
fixturesByScenario[scenarioName] = [];
|
|
576
|
+
}
|
|
577
|
+
fixturesByScenario[scenarioName].push(fixture);
|
|
578
|
+
} catch {
|
|
579
|
+
// Skip fixtures that can't be parsed
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
const scenarioFixtures = fixturesByScenario[requestedScenarioName];
|
|
584
|
+
if (scenarioFixtures && scenarioFixtures.length > 0) {
|
|
585
|
+
// Track call index per (type, scenario) combination
|
|
586
|
+
const scenarioCallKey = `${fixturesDir}::${type}::${requestedScenarioName}`;
|
|
587
|
+
if (callIndexByType[scenarioCallKey] === undefined) {
|
|
588
|
+
callIndexByType[scenarioCallKey] = 0;
|
|
589
|
+
}
|
|
590
|
+
const scenarioCallIndex = callIndexByType[scenarioCallKey];
|
|
591
|
+
callIndexByType[scenarioCallKey] =
|
|
592
|
+
(scenarioCallIndex + 1) % scenarioFixtures.length;
|
|
593
|
+
|
|
594
|
+
call = scenarioFixtures[scenarioCallIndex];
|
|
595
|
+
console.log(
|
|
596
|
+
`CodeYam Test: ✅ Matched fixture for scenario '${requestedScenarioName}' [${scenarioCallIndex + 1}/${scenarioFixtures.length}]`,
|
|
597
|
+
);
|
|
598
|
+
} else {
|
|
599
|
+
const availableScenarios = Object.keys(fixturesByScenario).join(', ');
|
|
600
|
+
console.warn(
|
|
601
|
+
`CodeYam Test: ⚠️ No fixture found for scenario '${requestedScenarioName}'. Available: [${availableScenarios}]`,
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
} else {
|
|
605
|
+
console.warn(
|
|
606
|
+
`CodeYam Test: ⚠️ Could not extract scenario name from system message for type '${type}'`,
|
|
607
|
+
);
|
|
608
|
+
}
|
|
459
609
|
}
|
|
460
|
-
const callIndex = callIndexByType[callKey];
|
|
461
|
-
callIndexByType[callKey] = (callIndex + 1) % matchingCalls.length;
|
|
462
610
|
|
|
463
|
-
|
|
611
|
+
// Fall back to index-based cycling if no scenario match was found
|
|
612
|
+
if (!call) {
|
|
613
|
+
const callKey = `${fixturesDir}::${type}`;
|
|
614
|
+
if (callIndexByType[callKey] === undefined) {
|
|
615
|
+
callIndexByType[callKey] = 0;
|
|
616
|
+
}
|
|
617
|
+
const callIndex = callIndexByType[callKey];
|
|
618
|
+
callIndexByType[callKey] = (callIndex + 1) % matchingCalls.length;
|
|
619
|
+
call = matchingCalls[callIndex];
|
|
464
620
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
621
|
+
console.log(
|
|
622
|
+
`CodeYam Test: Replaying LLM response for '${type}' [${callIndex + 1}/${matchingCalls.length}]`,
|
|
623
|
+
);
|
|
624
|
+
}
|
|
468
625
|
|
|
469
626
|
// Extract the actual completion content from the OpenAI response
|
|
470
627
|
// The response field contains the full OpenAI API response as a JSON string
|
|
471
|
-
let
|
|
628
|
+
let rawCompletion: string;
|
|
472
629
|
try {
|
|
473
630
|
const responseObj = JSON.parse(call.response);
|
|
474
|
-
|
|
631
|
+
rawCompletion =
|
|
632
|
+
responseObj.choices?.[0]?.message?.content || call.response;
|
|
475
633
|
} catch {
|
|
476
634
|
// If parsing fails, use the response as-is (for backwards compatibility)
|
|
477
|
-
|
|
635
|
+
rawCompletion = call.response;
|
|
478
636
|
}
|
|
479
637
|
|
|
638
|
+
// Apply the same post-processing as real completionCall() does
|
|
639
|
+
// This ensures replayed responses are processed identically to real API calls
|
|
640
|
+
// Step 1: Remove <think>...</think> sections that some models include
|
|
641
|
+
let processedCompletion = rawCompletion;
|
|
642
|
+
if (rawCompletion) {
|
|
643
|
+
processedCompletion = rawCompletion
|
|
644
|
+
.replace(/<think>[\s\S]*?<\/think>/g, '')
|
|
645
|
+
.trim();
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// Step 2: Extract JSON from text that might have extra content around it
|
|
649
|
+
// (Only for JSON responses - we assume most LLM calls expect JSON)
|
|
650
|
+
const completion = processedCompletion
|
|
651
|
+
? (processedCompletion.match(/\{[\s\S]*\}/)?.[0] ?? processedCompletion)
|
|
652
|
+
: processedCompletion;
|
|
653
|
+
|
|
654
|
+
// Track the replayed completion for E2E debugging
|
|
655
|
+
trackDataSnapshot(`completionCall_${type}`, {
|
|
656
|
+
completion: completion || '',
|
|
657
|
+
finishReason: 'stop',
|
|
658
|
+
});
|
|
659
|
+
|
|
480
660
|
return {
|
|
481
661
|
finishReason: 'stop',
|
|
482
|
-
completion,
|
|
662
|
+
completion: completion || '',
|
|
483
663
|
stats: {
|
|
484
664
|
model: call.model ?? 'fixture',
|
|
485
665
|
prompt_type: type,
|