@codeyam/codeyam-cli 0.1.0-staging.15d0f46 → 0.1.0-staging.1669d45
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 +7 -7
- package/analyzer-template/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -5
- package/analyzer-template/packages/ai/index.ts +5 -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 +152 -6
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +107 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +42 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +38 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +301 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +972 -106
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +232 -0
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +18 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +1409 -138
- 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 +771 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +233 -75
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +19 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +39 -4
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +23 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +42 -2
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +89 -112
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +6 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +486 -86
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +182 -104
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +201 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +1019 -0
- package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +143 -31
- package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +8 -2
- 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/gatherAttributesMap.ts +7 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -102
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +71 -4
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -53
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +28 -2
- package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +690 -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 +102 -0
- package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +8 -1
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +14 -0
- 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 +458 -267
- 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/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 +196 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +588 -52
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +299 -133
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +156 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +78 -83
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +4 -8
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +384 -94
- 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/checkS3ObjectExists.d.ts +15 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js +31 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js.map +1 -0
- 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 +2 -2
- package/analyzer-template/packages/aws/s3/index.ts +1 -0
- 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/checkS3ObjectExists.ts +47 -0
- package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +4 -4
- package/analyzer-template/packages/database/src/lib/kysely/tableRelations.ts +2 -2
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +36 -9
- 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/componentScenarioPage/getIFrameMessageListenerCode.ts +9 -4
- package/analyzer-template/packages/generate/src/lib/deepMerge.ts +26 -1
- package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tableRelations.d.ts +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -11
- 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 +30 -7
- 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 +9 -3
- 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/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/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js +27 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js.map +1 -1
- 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 +2 -2
- package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -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 +63 -13
- 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 +11 -6
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +146 -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/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 +4 -0
- package/analyzer-template/packages/types/src/types/Analysis.ts +79 -13
- package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +11 -10
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +161 -0
- package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/index.d.ts +2 -2
- package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -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 +63 -13
- 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 +11 -6
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +146 -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/playwright/capture.ts +37 -18
- package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
- package/analyzer-template/playwright/takeElementScreenshot.ts +26 -11
- 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 +868 -132
- 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 +49 -33
- package/analyzer-template/project/orchestrateCapture.ts +10 -3
- package/analyzer-template/project/reconcileMockDataKeys.ts +102 -2
- package/analyzer-template/project/runAnalysis.ts +7 -0
- package/analyzer-template/project/serverOnlyModules.ts +127 -2
- package/analyzer-template/project/start.ts +26 -4
- package/analyzer-template/project/startScenarioCapture.ts +72 -40
- package/analyzer-template/project/writeMockDataTsx.ts +118 -55
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +263 -92
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +13 -15
- 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 +799 -121
- 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 +42 -28
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +7 -4
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +87 -2
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +6 -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 +21 -4
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +56 -30
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +110 -48
- 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 +211 -75
- 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 +13 -13
- 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 +44 -23
- package/codeyam-cli/src/commands/recapture.js.map +1 -1
- package/codeyam-cli/src/commands/report.js +72 -24
- 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 +27 -27
- package/codeyam-cli/src/utils/analysisRunner.js +8 -13
- 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 +253 -106
- 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 +11 -11
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +38 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +239 -16
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +19 -7
- 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 +5 -5
- 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 +96 -0
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +2 -5
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-vauWK972.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-DKdsUF7Y.js → EntityTypeBadge-COi5OvsN.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-BwdQv49w.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-CEleMv_j.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-D68KarMg.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-L75Wvqgw.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/LoadingDots-C53WM8qn.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-CrNkmy4i.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-DzJRkCkr.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-CQifa1n-.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CyaBFX7l.js +20 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-CWjSsLqY.js → TruncatedFilePath-D36O1rzU.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-Be83mo_j.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-BN6wu6Y-.js +37 -0
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-DgTPh8H-.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-DdQKK6on.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-Dmr2bb1R.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-Do4ZLUYa.js +21 -0
- 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-Bn6aCAy_.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-CbdFyxZh.js +23 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-B4iCfs5M.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-wDWZZO1W.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-BMbl7MeQ.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-5wRKRIH9.js +29 -0
- package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DD3SDH7t.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/files-DKyMFI90.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-zXjT7J0G.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-DTTQ3gY7.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-fmIEn3Bc.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-DLbXwndH.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-gPZ-lad1.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-BsPXJ81F.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-22590fcf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/preload-helper-ckwbz45p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-BsAarjAM.js +57 -0
- package/codeyam-cli/src/webserver/build/client/assets/scenarioStatus-B_8jpV3e.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/search-P2FKIUql.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/settings-B2eDuBj8.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-L18M6-kN.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-BDz7kbVA.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-29dDmbH8.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-CmrTPlIB.js → useLastLogLine-BUm0UVJm.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-CkIOKTrZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-C1ig_BmP.js → useToast-KKw5kTn-.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-BND5I5fv.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CFXnd7MG.js +228 -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/devServer.js +1 -3
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/server.js +35 -25
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/templates/{codeyam-debug-skill.md → codeyam:debug.md} +1 -1
- package/codeyam-cli/templates/codeyam:diagnose.md +625 -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 +8 -8
- package/packages/ai/index.js +2 -4
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +107 -0
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +76 -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 +29 -0
- 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 +23 -0
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +239 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +728 -87
- 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 +17 -1
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1126 -82
- 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 +482 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +173 -55
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +16 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +35 -2
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +20 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.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 +34 -3
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.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 +81 -90
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +5 -0
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +398 -81
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +168 -82
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +123 -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 +742 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js +84 -14
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -1
- 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/gatherAttributesMap.js +6 -0
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.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 -64
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +58 -4
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -34
- 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 +16 -3
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
- package/packages/ai/src/lib/resolvePathToControllable.js +563 -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 +22 -0
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js +4 -0
- package/packages/ai/src/lib/worker/analyzeScopeWorker.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/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 +214 -50
- 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/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 +159 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -0
- 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 +458 -48
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.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 +235 -81
- 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 +56 -69
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +4 -8
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +307 -89
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.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/db.js +2 -2
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
- package/packages/database/src/lib/kysely/tables/debugReportsTable.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/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/generate/src/lib/deepMerge.js +27 -1
- package/packages/generate/src/lib/deepMerge.js.map +1 -1
- 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.map +1 -1
- package/scripts/finalize-analyzer.cjs +3 -1
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -197
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -271
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -294
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -115
- 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/src/webserver/build/client/assets/EntityItem-D0VW1-W7.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-BAk4S4pI.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-Y756iZxZ.js +0 -25
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-zzrrjW1p.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-QMn7bJg6.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-DmP5mRxX.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BXwvsbLw.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-DAmUX_1y.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/_index-Df-nk4J5.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-_ZUyFdie.js +0 -7
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-Eoh0PhcW.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-WWGJGFF6-CZgPLy5i.js +0 -26
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-DI-p9ZLZ.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-DvyV2x6y.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DURu2qlF.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-DDobn9Xh.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-CGdWnLD_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-DgMmzrKs.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-DEVXuhkn.js +0 -13
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-WPRQyc68.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-B9u3lJer.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-YGnKIuHU.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/globals-28lrWTTo.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/index-CJ0uPJjV.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/index-CfqeA2XG.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-DIjSvh6B.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-8125c15c.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/preload-helper-BXl3LOEh.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-C-g286WP.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-xBKWfOxd.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-DVY_wGOx.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-Be1pJo5A.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-CR-FkSvx.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DABetnSj.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-DcR7DH9q.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BDBrfp7e.js +0 -175
- package/codeyam-cli/templates/debug-codeyam.md +0 -527
- 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 -136
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -220
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -241
- 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 -72
- 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/{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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"buildTimestamp": "
|
|
3
|
-
"buildTime":
|
|
4
|
-
"gitCommit": "
|
|
2
|
+
"buildTimestamp": "2026-01-21T15:32:00.721Z",
|
|
3
|
+
"buildTime": 1769009520721,
|
|
4
|
+
"gitCommit": "1669d4579d4212b661c5b5f872516c46dc39c48c",
|
|
5
5
|
"nodeVersion": "v20.19.6",
|
|
6
|
-
"contentHash": "
|
|
7
|
-
"buildNumber":
|
|
8
|
-
"semanticVersion": "0.1.
|
|
9
|
-
"version": "0.1.
|
|
6
|
+
"contentHash": "d47ce71ca17d37da11228a938a9ab3a41c22d9db644db0104a74089f8fd3e173",
|
|
7
|
+
"buildNumber": 471,
|
|
8
|
+
"semanticVersion": "0.1.471",
|
|
9
|
+
"version": "0.1.471 (2026-01-21T15:32+d47ce71)"
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ import * as fs from 'fs';
|
|
|
6
6
|
import { ChildProcessWithoutNullStreams, spawn } from 'child_process';
|
|
7
7
|
|
|
8
8
|
import { loadEnv } from '~codeyam/utils/server';
|
|
9
|
-
import { getGlobalProcessManager, ProcessType } from '
|
|
9
|
+
import { getGlobalProcessManager, ProcessType } from '~codeyam/process';
|
|
10
10
|
|
|
11
11
|
loadEnv();
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
[
|
|
3
|
-
[
|
|
2
|
+
[1/21/2026, 3:32:00 PM] > codeyam-combo@1.0.0 mergeDependencies
|
|
3
|
+
[1/21/2026, 3:32:00 PM] > node ./scripts/mergePackageJsonFiles.cjs
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
[
|
|
6
|
+
[1/21/2026, 3:32:00 PM] Merged dependencies into root package.json
|
|
7
7
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"build": "tsc && node ./scripts/postbuild.cjs"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
11
|
-
"@aws-sdk/client-cloudfront": "^3.
|
|
10
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.966.0",
|
|
11
|
+
"@aws-sdk/client-cloudfront": "^3.966.0",
|
|
12
12
|
"@aws-sdk/client-codebuild": "^3.948.0",
|
|
13
13
|
"@aws-sdk/client-dynamodb": "^3.956.0",
|
|
14
14
|
"@aws-sdk/client-ec2": "^3.899.0",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@aws-sdk/client-s3": "^3.940.0",
|
|
18
18
|
"@aws-sdk/client-sqs": "^3.956.0",
|
|
19
19
|
"@aws-sdk/lib-storage": "^3.940.0",
|
|
20
|
-
"@aws-sdk/util-dynamodb": "^3.
|
|
20
|
+
"@aws-sdk/util-dynamodb": "^3.971.0",
|
|
21
21
|
"@octokit/auth-app": "^8.1.0",
|
|
22
22
|
"@octokit/rest": "^22.0.0",
|
|
23
23
|
"@sendgrid/mail": "^8.1.4",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"jsdom": "^27.4.0",
|
|
32
32
|
"jsonc-parser": "^3.2.1",
|
|
33
33
|
"lru-cache": "^11.2.4",
|
|
34
|
-
"openai": "^6.
|
|
34
|
+
"openai": "^6.16.0",
|
|
35
35
|
"p-queue": "^8.1.0",
|
|
36
|
-
"p-retry": "^
|
|
36
|
+
"p-retry": "^7.1.1",
|
|
37
37
|
"piscina": "^5.1.4",
|
|
38
38
|
"pixelmatch": "^5.3.0",
|
|
39
39
|
"playwright": "^1.56.1",
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"undici": "^7.16.0",
|
|
43
43
|
"uuid": "^11.1.0",
|
|
44
44
|
"pluralize": "^8.0.0",
|
|
45
|
+
"yargs": "^18.0.0",
|
|
46
|
+
"json5": "^2.2.3",
|
|
45
47
|
"@anthropic-ai/sdk": "^0.71.0",
|
|
46
48
|
"@aws-sdk/s3-request-presigner": "^3.940.0",
|
|
47
49
|
"better-sqlite3": "^12.4.1",
|
|
@@ -55,6 +57,8 @@
|
|
|
55
57
|
"devDependencies": {
|
|
56
58
|
"typescript": "^5.9.3",
|
|
57
59
|
"@jest/types": "^30.2.0",
|
|
60
|
+
"@types/node": "^25.0.2",
|
|
61
|
+
"@types/yargs": "^17.0.34",
|
|
58
62
|
"@types/jsdom": "^27.0.0",
|
|
59
63
|
"@types/better-sqlite3": "^7.6.13",
|
|
60
64
|
"@types/jest": "^30.0.0",
|
|
@@ -21,8 +21,7 @@ export {
|
|
|
21
21
|
} from './src/lib/generateEntityScenarioData';
|
|
22
22
|
export { default as generateChangesEntityScenarios } from './src/lib/generateChangesEntityScenarios';
|
|
23
23
|
export { default as generateChangesEntityScenarioData } from './src/lib/generateChangesEntityScenarioData';
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as generateChangesEntityKeyAttributes } from './src/lib/generateChangesEntityKeyAttributes';
|
|
24
|
+
export { default as generateExecutionFlows } from './src/lib/generateExecutionFlows';
|
|
26
25
|
export {
|
|
27
26
|
default as guessScenarioDataFromName,
|
|
28
27
|
type GuessScenarioDataFromNameArgs,
|
|
@@ -30,6 +29,7 @@ export {
|
|
|
30
29
|
export {
|
|
31
30
|
default as guessScenarioDataFromDescription,
|
|
32
31
|
type GuessScenarioDataFromDescriptionArgs,
|
|
32
|
+
type ExecutionFlowSelection,
|
|
33
33
|
} from './src/lib/guessScenarioDataFromDescription';
|
|
34
34
|
export { default as generateBranchSummary } from './src/lib/generateBranchSummary';
|
|
35
35
|
export { default as extractOverlappingMocks } from './src/lib/extractOverlappingMocks';
|
|
@@ -57,7 +57,6 @@ export { default as convertDotNotation } from './src/lib/dataStructure/helpers/c
|
|
|
57
57
|
export { default as cleanOutBoundary } from './src/lib/cleanOutBoundary';
|
|
58
58
|
export { fillInDirectSchemaGapsAndUnknowns } from './src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns';
|
|
59
59
|
export { default as deduplicateFunctionSchemas } from './src/lib/dataStructure/helpers/deduplicateFunctionSchemas';
|
|
60
|
-
export { default as gatherRelevantDependentKeyAttributes } from './src/lib/gatherRelevantDependentKeyAttributes';
|
|
61
60
|
export { default as getConditionalUsagesFromCode } from './src/lib/getConditionalUsagesFromCode';
|
|
62
61
|
export type {
|
|
63
62
|
ScopeInfo,
|
|
@@ -79,6 +78,9 @@ export {
|
|
|
79
78
|
getSourceEquivalencies,
|
|
80
79
|
getEquivalentSignatureVariables,
|
|
81
80
|
getConditionalUsages,
|
|
81
|
+
getConditionalEffects,
|
|
82
|
+
getCompoundConditionals,
|
|
83
|
+
getChildBoundaryGatingConditions,
|
|
82
84
|
} from './src/lib/worker/SerializableDataStructure';
|
|
83
85
|
export { parseJsonSafe } from './src/lib/parsers/parseJsonSafe';
|
|
84
86
|
export { default as completionCall } from './src/lib/completionCall';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
1
3
|
import OpenAI from 'openai';
|
|
2
4
|
import * as lib from '../../lib';
|
|
3
5
|
import { AI } from '../../lib/types';
|
|
@@ -23,6 +25,121 @@ interface CompletionCallProps {
|
|
|
23
25
|
attempts?: number;
|
|
24
26
|
}
|
|
25
27
|
|
|
28
|
+
// Track which fixture index to use for each type (for LLM replay)
|
|
29
|
+
const callIndexByType: Record<string, number> = {};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Replays a captured LLM call from test fixtures instead of making a real API call.
|
|
33
|
+
*/
|
|
34
|
+
function replayLlmCall(
|
|
35
|
+
type: string,
|
|
36
|
+
fixturesDir: string,
|
|
37
|
+
): {
|
|
38
|
+
finishReason: string;
|
|
39
|
+
completion: string;
|
|
40
|
+
stats: lib.types.LlmCallStats;
|
|
41
|
+
} {
|
|
42
|
+
console.log(
|
|
43
|
+
`CodeYam Test: Replaying LLM call for type '${type}' from ${fixturesDir}`,
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
// Ensure the fixtures directory exists
|
|
47
|
+
if (!fs.existsSync(fixturesDir)) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`No LLM fixture files found - directory does not exist: ${fixturesDir}`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Load all JSON files from fixtures directory
|
|
54
|
+
const files = fs
|
|
55
|
+
.readdirSync(fixturesDir)
|
|
56
|
+
.filter((f) => f.endsWith('.json'));
|
|
57
|
+
|
|
58
|
+
if (files.length === 0) {
|
|
59
|
+
throw new Error(`No LLM fixture files found in ${fixturesDir}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Track calls of each type to handle multiple calls with same type
|
|
63
|
+
const callsByType: Record<string, any[]> = {};
|
|
64
|
+
|
|
65
|
+
for (const file of files) {
|
|
66
|
+
try {
|
|
67
|
+
const content = fs.readFileSync(path.join(fixturesDir, file), 'utf-8');
|
|
68
|
+
const call = JSON.parse(content);
|
|
69
|
+
|
|
70
|
+
if (!callsByType[call.prompt_type]) {
|
|
71
|
+
callsByType[call.prompt_type] = [];
|
|
72
|
+
}
|
|
73
|
+
callsByType[call.prompt_type].push(call);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.warn(`Failed to parse LLM fixture file ${file}:`, error);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const matchingCalls = callsByType[type];
|
|
80
|
+
|
|
81
|
+
if (!matchingCalls || matchingCalls.length === 0) {
|
|
82
|
+
const availableTypes = Object.keys(callsByType).join(', ');
|
|
83
|
+
console.warn(
|
|
84
|
+
`CodeYam Test: No captured LLM call found for type '${type}'. Available types: ${availableTypes}`,
|
|
85
|
+
);
|
|
86
|
+
// Return empty response - callers should handle gracefully
|
|
87
|
+
// This allows new LLM call types to be added without breaking existing fixtures
|
|
88
|
+
return {
|
|
89
|
+
finishReason: 'stop',
|
|
90
|
+
completion: '{}',
|
|
91
|
+
stats: {
|
|
92
|
+
model: 'fixture-fallback',
|
|
93
|
+
prompt_type: type,
|
|
94
|
+
system_message: '',
|
|
95
|
+
prompt_text: '',
|
|
96
|
+
response: '{}',
|
|
97
|
+
input_tokens: 0,
|
|
98
|
+
output_tokens: 0,
|
|
99
|
+
cost: 0,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Track call count per type and cycle through multiple responses
|
|
105
|
+
const callKey = `${fixturesDir}::${type}`;
|
|
106
|
+
if (!callIndexByType[callKey]) {
|
|
107
|
+
callIndexByType[callKey] = 0;
|
|
108
|
+
}
|
|
109
|
+
const callIndex = callIndexByType[callKey];
|
|
110
|
+
callIndexByType[callKey] = (callIndex + 1) % matchingCalls.length;
|
|
111
|
+
|
|
112
|
+
const call = matchingCalls[callIndex];
|
|
113
|
+
|
|
114
|
+
console.log(
|
|
115
|
+
`CodeYam Test: Replaying LLM response for '${type}' [${callIndex + 1}/${matchingCalls.length}]`,
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
// Extract the actual completion content from the OpenAI response
|
|
119
|
+
let completion: string;
|
|
120
|
+
try {
|
|
121
|
+
const responseObj = JSON.parse(call.response);
|
|
122
|
+
completion = responseObj.choices?.[0]?.message?.content || call.response;
|
|
123
|
+
} catch {
|
|
124
|
+
completion = call.response;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
finishReason: 'stop',
|
|
129
|
+
completion,
|
|
130
|
+
stats: {
|
|
131
|
+
model: call.model ?? 'fixture',
|
|
132
|
+
prompt_type: type,
|
|
133
|
+
system_message: call.system_message ?? '',
|
|
134
|
+
prompt_text: call.prompt_text ?? '',
|
|
135
|
+
response: call.response ?? '',
|
|
136
|
+
input_tokens: call.input_tokens ?? 0,
|
|
137
|
+
output_tokens: call.output_tokens ?? 0,
|
|
138
|
+
cost: call.cost ?? 0,
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
26
143
|
export default async function completionCall({
|
|
27
144
|
type,
|
|
28
145
|
systemMessage,
|
|
@@ -34,6 +151,11 @@ export default async function completionCall({
|
|
|
34
151
|
// model = AI.Model.DEEPSEEK_CHAT,
|
|
35
152
|
attempts = 0,
|
|
36
153
|
}: CompletionCallProps) {
|
|
154
|
+
// Support for E2E testing with replayed LLM calls
|
|
155
|
+
if (process.env.CODEYAM_LLM_FIXTURES_DIR) {
|
|
156
|
+
return replayLlmCall(type, process.env.CODEYAM_LLM_FIXTURES_DIR);
|
|
157
|
+
}
|
|
158
|
+
|
|
37
159
|
const modelInfo = getModelInfo(model);
|
|
38
160
|
const apiKey = process.env[modelInfo.provider.apiKeyEnvVar];
|
|
39
161
|
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
import FunctionCallManager from './dataStructure/equivalencyManagers/FunctionCallManager';
|
|
33
33
|
import { ReactFrameworkManager } from './dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager';
|
|
34
34
|
import { JavascriptFrameworkManager } from './dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager';
|
|
35
|
+
import { MuiManager } from './dataStructure/equivalencyManagers/frameworks/MuiManager';
|
|
35
36
|
import ParentScopeManager from './dataStructure/equivalencyManagers/ParentScopeManager';
|
|
36
37
|
import { AI } from '~codeyam/ai';
|
|
37
38
|
import Piscina from 'piscina';
|
|
@@ -163,12 +164,23 @@ export async function analyzeScopeLocal({
|
|
|
163
164
|
// Collect conditional usages from all statement analyses
|
|
164
165
|
const allConditionalUsages: Record<
|
|
165
166
|
string,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
import('./astScopes/types').ConditionalUsage[]
|
|
168
|
+
> = {};
|
|
169
|
+
// Collect conditional effects (setter calls inside conditionals)
|
|
170
|
+
const allConditionalEffects: import('./astScopes/types').ConditionalEffect[] =
|
|
171
|
+
[];
|
|
172
|
+
// Collect compound conditionals (grouped conditions that must all be true)
|
|
173
|
+
const allCompoundConditionals: import('./astScopes/types').CompoundConditional[] =
|
|
174
|
+
[];
|
|
175
|
+
// Collect derived variables (variables computed from boolean expressions)
|
|
176
|
+
const allDerivedVariables: Record<
|
|
177
|
+
string,
|
|
178
|
+
import('./astScopes/types').DerivedVariableInfo
|
|
179
|
+
> = {};
|
|
180
|
+
// Collect child boundary gating conditions across all statements
|
|
181
|
+
const allChildBoundaryGatingConditions: Record<
|
|
182
|
+
string,
|
|
183
|
+
import('./astScopes/types').ConditionalUsage[]
|
|
172
184
|
> = {};
|
|
173
185
|
|
|
174
186
|
const astAnalysisResultWithStatements = statementScopes.map(
|
|
@@ -190,6 +202,45 @@ export async function analyzeScopeLocal({
|
|
|
190
202
|
}
|
|
191
203
|
allConditionalUsages[path].push(...usages);
|
|
192
204
|
}
|
|
205
|
+
// Collect conditional effects from AST analysis
|
|
206
|
+
if (astAnalysisResult.conditionalEffects?.length > 0) {
|
|
207
|
+
console.log(
|
|
208
|
+
`[ConditionalEffects] analyzeScope collecting from statement "${statementScope.name}":`,
|
|
209
|
+
astAnalysisResult.conditionalEffects.map((e) => ({
|
|
210
|
+
setter: e.effect.setterName,
|
|
211
|
+
value: e.effect.value,
|
|
212
|
+
condition:
|
|
213
|
+
e.condition?.path ||
|
|
214
|
+
e.conditions?.map((c) => c.path).join(' && '),
|
|
215
|
+
})),
|
|
216
|
+
);
|
|
217
|
+
allConditionalEffects.push(...astAnalysisResult.conditionalEffects);
|
|
218
|
+
}
|
|
219
|
+
// Collect compound conditionals from AST analysis
|
|
220
|
+
if (astAnalysisResult.compoundConditionals?.length > 0) {
|
|
221
|
+
allCompoundConditionals.push(
|
|
222
|
+
...astAnalysisResult.compoundConditionals,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
// Collect derived variables from AST analysis
|
|
226
|
+
if (astAnalysisResult.derivedVariables) {
|
|
227
|
+
for (const [varName, derivationInfo] of Object.entries(
|
|
228
|
+
astAnalysisResult.derivedVariables,
|
|
229
|
+
)) {
|
|
230
|
+
allDerivedVariables[varName] = derivationInfo;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// Collect child boundary gating conditions from AST analysis
|
|
234
|
+
if (astAnalysisResult.childBoundaryGatingConditions) {
|
|
235
|
+
for (const [childName, usages] of Object.entries(
|
|
236
|
+
astAnalysisResult.childBoundaryGatingConditions,
|
|
237
|
+
)) {
|
|
238
|
+
if (!allChildBoundaryGatingConditions[childName]) {
|
|
239
|
+
allChildBoundaryGatingConditions[childName] = [];
|
|
240
|
+
}
|
|
241
|
+
allChildBoundaryGatingConditions[childName].push(...usages);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
193
244
|
return {
|
|
194
245
|
statementScope,
|
|
195
246
|
astAnalysisResult,
|
|
@@ -473,6 +524,7 @@ export async function analyzeScopeLocal({
|
|
|
473
524
|
new FunctionCallManager(),
|
|
474
525
|
new ReactFrameworkManager(),
|
|
475
526
|
new JavascriptFrameworkManager(),
|
|
527
|
+
new MuiManager(),
|
|
476
528
|
new ParentScopeManager(),
|
|
477
529
|
],
|
|
478
530
|
scope.name,
|
|
@@ -489,11 +541,94 @@ export async function analyzeScopeLocal({
|
|
|
489
541
|
);
|
|
490
542
|
}
|
|
491
543
|
|
|
544
|
+
// Enrich conditional usages with derived variable info
|
|
545
|
+
// This must happen after all statements are processed so derived variables from
|
|
546
|
+
// earlier statements can be used to enrich usages from later statements
|
|
547
|
+
if (Object.keys(allDerivedVariables).length > 0) {
|
|
548
|
+
for (const [path, usages] of Object.entries(allConditionalUsages)) {
|
|
549
|
+
for (const usage of usages) {
|
|
550
|
+
if (!usage.derivedFrom && allDerivedVariables[path]) {
|
|
551
|
+
usage.derivedFrom = allDerivedVariables[path];
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
492
557
|
// Add conditional usages from this scope's analysis
|
|
493
558
|
if (Object.keys(allConditionalUsages).length > 0) {
|
|
494
559
|
scopeDataStructure.addConditionalUsages(allConditionalUsages);
|
|
495
560
|
}
|
|
496
561
|
|
|
562
|
+
// Add conditional effects from this scope's analysis
|
|
563
|
+
if (allConditionalEffects.length > 0) {
|
|
564
|
+
console.log(
|
|
565
|
+
`[ConditionalEffects] analyzeScope adding ${allConditionalEffects.length} effects to scopeDataStructure for scope "${scope.name}"`,
|
|
566
|
+
);
|
|
567
|
+
scopeDataStructure.addConditionalEffects(allConditionalEffects);
|
|
568
|
+
} else {
|
|
569
|
+
console.log(
|
|
570
|
+
`[ConditionalEffects] analyzeScope: no conditional effects found for scope "${scope.name}"`,
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// Add compound conditionals from this scope's analysis
|
|
575
|
+
if (allCompoundConditionals.length > 0) {
|
|
576
|
+
scopeDataStructure.addCompoundConditionals(allCompoundConditionals);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
// Merge extracted gating conditions from JSX extraction (processJSXForScope)
|
|
580
|
+
// These were detected BEFORE JSX was simplified, so they have the full context
|
|
581
|
+
if (scope.extractedGatingConditions) {
|
|
582
|
+
for (const [childName, conditions] of Object.entries(
|
|
583
|
+
scope.extractedGatingConditions,
|
|
584
|
+
)) {
|
|
585
|
+
if (!allChildBoundaryGatingConditions[childName]) {
|
|
586
|
+
allChildBoundaryGatingConditions[childName] = [];
|
|
587
|
+
}
|
|
588
|
+
for (const condition of conditions) {
|
|
589
|
+
// Convert to full ConditionalUsage format
|
|
590
|
+
allChildBoundaryGatingConditions[childName].push({
|
|
591
|
+
path: condition.path,
|
|
592
|
+
conditionType: condition.conditionType,
|
|
593
|
+
location: condition.location,
|
|
594
|
+
isNegated: condition.isNegated,
|
|
595
|
+
controlsJsxRendering: true,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
// Enrich child boundary gating conditions with derived variable info
|
|
602
|
+
// This must happen after all statements are processed so derived variables from
|
|
603
|
+
// earlier statements can be used to enrich gating conditions from later statements
|
|
604
|
+
if (Object.keys(allDerivedVariables).length > 0) {
|
|
605
|
+
for (const [_childName, conditions] of Object.entries(
|
|
606
|
+
allChildBoundaryGatingConditions,
|
|
607
|
+
)) {
|
|
608
|
+
for (const condition of conditions) {
|
|
609
|
+
if (!condition.derivedFrom && allDerivedVariables[condition.path]) {
|
|
610
|
+
condition.derivedFrom = allDerivedVariables[condition.path];
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// Add child boundary gating conditions from this scope's analysis
|
|
617
|
+
if (Object.keys(allChildBoundaryGatingConditions).length > 0) {
|
|
618
|
+
scopeDataStructure.addChildBoundaryGatingConditions(
|
|
619
|
+
allChildBoundaryGatingConditions,
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// Log child scopes that will be processed
|
|
624
|
+
const childScopeNames = Object.keys(scope.childScopes);
|
|
625
|
+
if (childScopeNames.length > 0) {
|
|
626
|
+
console.log(
|
|
627
|
+
`[ConditionalEffects] analyzeScope will process ${childScopeNames.length} child scopes:`,
|
|
628
|
+
childScopeNames,
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
|
|
497
632
|
await Promise.all(
|
|
498
633
|
Object.values(scope.childScopes).map(async (childScope) => {
|
|
499
634
|
// This is awkward but need to identify class scopes
|
|
@@ -572,6 +707,7 @@ export default async function analyzeScope(
|
|
|
572
707
|
end: scope.end,
|
|
573
708
|
variables: scope.variables,
|
|
574
709
|
childScopes: scope.childScopes,
|
|
710
|
+
extractedGatingConditions: scope.extractedGatingConditions,
|
|
575
711
|
},
|
|
576
712
|
model: args.model,
|
|
577
713
|
};
|
|
@@ -583,6 +719,16 @@ export default async function analyzeScope(
|
|
|
583
719
|
try {
|
|
584
720
|
const result = await workerPool.run(workerInput);
|
|
585
721
|
|
|
722
|
+
// Log the conditional effects from the worker result
|
|
723
|
+
const workerConditionalEffects =
|
|
724
|
+
result.dataStructure?.conditionalEffects || [];
|
|
725
|
+
console.log(
|
|
726
|
+
`[ConditionalEffects] Worker returned ${workerConditionalEffects.length} conditional effects for ${entity.name}:`,
|
|
727
|
+
workerConditionalEffects.map(
|
|
728
|
+
(e: any) => `${e.effect?.setterName}(${e.effect?.value})`,
|
|
729
|
+
),
|
|
730
|
+
);
|
|
731
|
+
|
|
586
732
|
// Store the serializable data structure in the scope
|
|
587
733
|
scope.dataStructure = result.dataStructure as any;
|
|
588
734
|
return;
|
|
@@ -5,7 +5,9 @@ import {
|
|
|
5
5
|
AnalysisIssue,
|
|
6
6
|
AstScopeAnalysisResult,
|
|
7
7
|
CompletenessInfo,
|
|
8
|
+
CompoundConditional,
|
|
8
9
|
ConditionalUsage,
|
|
10
|
+
DerivedVariableInfo,
|
|
9
11
|
} from './types';
|
|
10
12
|
import { PatternHandler } from './patterns/patternHandler';
|
|
11
13
|
import { VariableDeclarationHandler } from './patterns/variableDeclarationHandler';
|
|
@@ -103,6 +105,16 @@ export class ASTScopeAnalyzer {
|
|
|
103
105
|
private equivalentVariables: Record<string, string> = {};
|
|
104
106
|
private environmentVariables: string[] = [];
|
|
105
107
|
private conditionalUsages: Record<string, ConditionalUsage[]> = {};
|
|
108
|
+
private compoundConditionals: CompoundConditional[] = [];
|
|
109
|
+
private conditionalEffects: import('./types').ConditionalEffect[] = [];
|
|
110
|
+
private childBoundaryGatingConditions: Record<string, ConditionalUsage[]> =
|
|
111
|
+
{};
|
|
112
|
+
/**
|
|
113
|
+
* Tracks derived boolean variables and their source expressions.
|
|
114
|
+
* Maps variable name to derivation info.
|
|
115
|
+
* Example: { hasAnalysis: { sourcePath: 'analysis', operation: 'notNull' } }
|
|
116
|
+
*/
|
|
117
|
+
private derivedVariables: Record<string, DerivedVariableInfo> = {};
|
|
106
118
|
private sourceFile: ts.SourceFile;
|
|
107
119
|
private statementInfo: StatementInfo;
|
|
108
120
|
private issues: AnalysisIssue[] = [];
|
|
@@ -203,6 +215,10 @@ export class ASTScopeAnalyzer {
|
|
|
203
215
|
equivalentVariables: this.equivalentVariables,
|
|
204
216
|
environmentVariables: this.environmentVariables,
|
|
205
217
|
conditionalUsages: this.conditionalUsages,
|
|
218
|
+
compoundConditionals: this.compoundConditionals,
|
|
219
|
+
conditionalEffects: this.conditionalEffects,
|
|
220
|
+
derivedVariables: this.derivedVariables,
|
|
221
|
+
childBoundaryGatingConditions: this.childBoundaryGatingConditions,
|
|
206
222
|
isComplete:
|
|
207
223
|
completeness.equivalences === 'full' &&
|
|
208
224
|
completeness.structures === 'full',
|
|
@@ -245,7 +261,18 @@ export class ASTScopeAnalyzer {
|
|
|
245
261
|
processExpression({ node, context, targetPath }),
|
|
246
262
|
addConditionalUsage: (usage) => this.addConditionalUsage(usage),
|
|
247
263
|
getConditionalUsages: () => this.conditionalUsages,
|
|
264
|
+
addChildBoundaryGatingCondition: (childName, condition) =>
|
|
265
|
+
this.addChildBoundaryGatingCondition(childName, condition),
|
|
266
|
+
getChildBoundaryGatingConditions: () =>
|
|
267
|
+
this.childBoundaryGatingConditions,
|
|
268
|
+
addDerivedVariable: (variableName, derivationInfo) =>
|
|
269
|
+
this.addDerivedVariable(variableName, derivationInfo),
|
|
270
|
+
addCompoundConditional: (compound) =>
|
|
271
|
+
this.addCompoundConditional(compound),
|
|
272
|
+
getCompoundConditionals: () => this.compoundConditionals,
|
|
248
273
|
updateSchemaType: (path, newType) => this.updateSchemaType(path, newType),
|
|
274
|
+
addConditionalEffect: (effect) => this.addConditionalEffect(effect),
|
|
275
|
+
getConditionalEffects: () => this.conditionalEffects,
|
|
249
276
|
};
|
|
250
277
|
return context;
|
|
251
278
|
}
|
|
@@ -607,11 +634,39 @@ export class ASTScopeAnalyzer {
|
|
|
607
634
|
}
|
|
608
635
|
}
|
|
609
636
|
|
|
637
|
+
/**
|
|
638
|
+
* Record a derived variable and its source expression.
|
|
639
|
+
* Called when we see patterns like:
|
|
640
|
+
* - const hasAnalysis = analysis !== null
|
|
641
|
+
* - const isLoading = status === 'loading'
|
|
642
|
+
* - const isBusy = isRunning || isQueued
|
|
643
|
+
*/
|
|
644
|
+
private addDerivedVariable(
|
|
645
|
+
variableName: string,
|
|
646
|
+
derivationInfo: DerivedVariableInfo,
|
|
647
|
+
): void {
|
|
648
|
+
this.derivedVariables[variableName] = derivationInfo;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Get derivation info for a variable if it was derived from another expression.
|
|
653
|
+
*/
|
|
654
|
+
private getDerivedVariableInfo(
|
|
655
|
+
variableName: string,
|
|
656
|
+
): DerivedVariableInfo | undefined {
|
|
657
|
+
return this.derivedVariables[variableName];
|
|
658
|
+
}
|
|
659
|
+
|
|
610
660
|
/**
|
|
611
661
|
* Add a conditional usage for key attribute detection
|
|
612
|
-
* Groups usages by path for easy lookup
|
|
662
|
+
* Groups usages by path for easy lookup.
|
|
663
|
+
* Also enriches the usage with derivation info if the variable is derived.
|
|
613
664
|
*/
|
|
614
665
|
private addConditionalUsage(usage: ConditionalUsage): void {
|
|
666
|
+
// Note: Derivation info enrichment now happens in analyzeScope.ts after all
|
|
667
|
+
// statements are processed, so derived variables from earlier statements can
|
|
668
|
+
// be used to enrich usages from later statements.
|
|
669
|
+
|
|
615
670
|
if (!this.conditionalUsages[usage.path]) {
|
|
616
671
|
this.conditionalUsages[usage.path] = [];
|
|
617
672
|
}
|
|
@@ -628,6 +683,57 @@ export class ASTScopeAnalyzer {
|
|
|
628
683
|
}
|
|
629
684
|
}
|
|
630
685
|
|
|
686
|
+
/**
|
|
687
|
+
* Add a gating condition for a child component.
|
|
688
|
+
* Called when we see patterns like: {hasAnalysis && <ChildComponent />}
|
|
689
|
+
* Groups conditions by child component name.
|
|
690
|
+
*/
|
|
691
|
+
private addChildBoundaryGatingCondition(
|
|
692
|
+
childComponentName: string,
|
|
693
|
+
gatingCondition: ConditionalUsage,
|
|
694
|
+
): void {
|
|
695
|
+
if (!this.childBoundaryGatingConditions[childComponentName]) {
|
|
696
|
+
this.childBoundaryGatingConditions[childComponentName] = [];
|
|
697
|
+
}
|
|
698
|
+
// Avoid duplicates with same path and conditionType
|
|
699
|
+
const exists = this.childBoundaryGatingConditions[childComponentName].some(
|
|
700
|
+
(existing) =>
|
|
701
|
+
existing.path === gatingCondition.path &&
|
|
702
|
+
existing.conditionType === gatingCondition.conditionType &&
|
|
703
|
+
existing.isNegated === gatingCondition.isNegated,
|
|
704
|
+
);
|
|
705
|
+
if (!exists) {
|
|
706
|
+
this.childBoundaryGatingConditions[childComponentName].push(
|
|
707
|
+
gatingCondition,
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Add a compound conditional for key attribute dependency detection
|
|
714
|
+
*/
|
|
715
|
+
private addCompoundConditional(compound: CompoundConditional): void {
|
|
716
|
+
// Avoid duplicates by expression and location (chainId is generated each time)
|
|
717
|
+
const exists = this.compoundConditionals.some(
|
|
718
|
+
(existing) =>
|
|
719
|
+
existing.expression === compound.expression &&
|
|
720
|
+
existing.sourceLocation.lineNumber ===
|
|
721
|
+
compound.sourceLocation.lineNumber,
|
|
722
|
+
);
|
|
723
|
+
if (!exists) {
|
|
724
|
+
this.compoundConditionals.push(compound);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Add a conditional effect (setter call inside a conditional)
|
|
730
|
+
*/
|
|
731
|
+
private addConditionalEffect(
|
|
732
|
+
effect: import('./types').ConditionalEffect,
|
|
733
|
+
): void {
|
|
734
|
+
this.conditionalEffects.push(effect);
|
|
735
|
+
}
|
|
736
|
+
|
|
631
737
|
/**
|
|
632
738
|
* Updates the schema type for a path, typically used when switch statements
|
|
633
739
|
* reveal the valid values for a parameter (creating a union type like "'a' | 'b' | 'c'")
|