@codeyam/codeyam-cli 0.1.0-staging.483fdc2 → 0.1.0-staging.57cd50f
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/log.txt +3 -3
- package/analyzer-template/package.json +24 -24
- package/analyzer-template/packages/ai/index.ts +1 -0
- package/analyzer-template/packages/ai/package.json +3 -3
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +23 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +101 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/sharedPatterns.ts +28 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +6 -0
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +114 -113
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +588 -13
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +5 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +11 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +2 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +140 -14
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +20 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +84 -19
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.ts +35 -0
- package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +40 -13
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +58 -3
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +124 -7
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +101 -2
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +359 -142
- package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +51 -3
- package/analyzer-template/packages/ai/src/lib/mergeJsonTypeDefinitions.ts +5 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/collapseNullableObjects.ts +118 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +24 -4
- package/analyzer-template/packages/analyze/index.ts +2 -0
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +19 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/getNodeType.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +69 -3
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +13 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1352 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +4 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +59 -26
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +277 -15
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +395 -61
- package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
- package/analyzer-template/packages/aws/package.json +10 -10
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +4 -4
- package/analyzer-template/packages/database/src/lib/analysisBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/analysisToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/branchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/fileToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +14 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +82 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/labsRequestsTable.ts +52 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/projectToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/saveFiles.ts +1 -1
- package/analyzer-template/packages/database/src/lib/scenarioToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +151 -135
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/database/src/lib/userScenarioToDb.ts +1 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +4 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +8 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +24 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +65 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts +23 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- 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/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.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 +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +100 -89
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- 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 +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +8 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +8 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/ui-components/package.json +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +8 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +98 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +121 -3
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +206 -51
- package/analyzer-template/project/orchestrateCapture.ts +4 -1
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +136 -17
- package/analyzer-template/project/writeScenarioComponents.ts +170 -29
- package/analyzer-template/project/writeSimpleRoot.ts +21 -11
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/local/createLocalAnalyzer.js +1 -1
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +175 -42
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +4 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +114 -13
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +143 -27
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +21 -11
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +252 -21
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
- package/codeyam-cli/src/cli.js +33 -24
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/codeyam-cli.js +18 -2
- package/codeyam-cli/src/codeyam-cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +21 -9
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +2 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -1
- package/codeyam-cli/src/commands/debug.js +2 -0
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +44 -21
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +2868 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +81 -260
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +97 -92
- package/codeyam-cli/src/commands/memory.js.map +1 -1
- package/codeyam-cli/src/commands/recapture.js +2 -0
- package/codeyam-cli/src/commands/recapture.js.map +1 -1
- package/codeyam-cli/src/commands/setup-sandbox.js +2 -0
- package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -1
- package/codeyam-cli/src/commands/setup-simulations.js +284 -0
- package/codeyam-cli/src/commands/setup-simulations.js.map +1 -0
- package/codeyam-cli/src/commands/test-startup.js +2 -0
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/verify.js +14 -2
- package/codeyam-cli/src/commands/verify.js.map +1 -1
- package/codeyam-cli/src/data/techStacks.js +77 -0
- package/codeyam-cli/src/data/techStacks.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +635 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +520 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +266 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +275 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1742 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +185 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +101 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +227 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +246 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +174 -86
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
- package/codeyam-cli/src/utils/analyzer.js +7 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +198 -29
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/devServerState.js +71 -0
- package/codeyam-cli/src/utils/devServerState.js.map +1 -0
- package/codeyam-cli/src/utils/editorApi.js +73 -0
- package/codeyam-cli/src/utils/editorApi.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +159 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorCapture.js +102 -0
- package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +197 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +225 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js +113 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +106 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +126 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js +349 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +2 -2
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +101 -56
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/labsAutoCheck.js +19 -0
- package/codeyam-cli/src/utils/labsAutoCheck.js.map +1 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js +76 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/progress.js +7 -0
- package/codeyam-cli/src/utils/progress.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +74 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js +10 -0
- package/codeyam-cli/src/utils/requireSimulations.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +229 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +74 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +376 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +113 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +76 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +2 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -1
- package/codeyam-cli/src/utils/rules/parser.js +16 -29
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -1
- package/codeyam-cli/src/utils/rules/pathMatcher.js +34 -3
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -1
- package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
- package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
- package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
- package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js +43 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
- package/codeyam-cli/src/utils/rules/staleness.js +16 -11
- package/codeyam-cli/src/utils/rules/staleness.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioCoverage.js +75 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +112 -0
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +94 -12
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +95 -47
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +159 -0
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -0
- package/codeyam-cli/src/utils/syncMocksMiddleware.js +5 -24
- package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
- package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
- package/codeyam-cli/src/utils/versionInfo.js +46 -0
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/webappDetection.js +35 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +31 -0
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js +66 -0
- package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +487 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +65 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +56 -30
- 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/app/lib/git.js +396 -0
- package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
- package/codeyam-cli/src/webserver/backgroundServer.js +166 -16
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/bootstrap.js +11 -0
- package/codeyam-cli/src/webserver/bootstrap.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-BPXZwM4t.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DsN1wKrm.js → EntityItem-BcgbViKV.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-DLqD3qNt.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-Ba2JVPzP.js → EntityTypeIcon-CQIG2qda.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-aht4aafF.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CVtiBnY5.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B0GLXMsr.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-xgeCVgSM.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-OApQuNyq.js → ReportIssueModal-BzHcG7SE.js} +5 -10
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DuDvi0jm.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DzccYyI8.js → ScenarioViewer-0DY_NKil.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-DyFZkK0l.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-BwqWJOgH.js → _index-DLxKhri3.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BwavGCpm.js → activity.(_tab)-BcY3q6nt.js} +10 -15
- package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-Bni3iiUj.js +22 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.agent-transcripts-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.labs-unlock-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/book-open-BYOypzCa.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-Cx24_aWc.js → chevron-down-C_Pmso5S.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-EPOLDU6W-CXRTFQ3F.js → chunk-JZWAC4HX-C4pqxYJB.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BOARzkeR.js → circle-check-BVMi9VA5.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/copy-n2FB0_Sw.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-Csi0_PMl.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-vgc8jrQL.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-BLQMSKZa.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-BJUiQqZF.js → entity._sha._-BF4oLwaE.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-C7YX6r3H.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CF164ouH.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CTBG2mmz.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CS2cb_eZ.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DMJ7zii9.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-CJ6lTdTA.js → files-BZrlFE1F.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-BkWJ_UNc.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-B1h680n5.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-lzqtyFU8.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-B7B9V-bu.js → loader-circle-DaAZ_H2w.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/manifest-05e71e0b.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-Bl2rpw8u.js +96 -0
- package/codeyam-cli/src/webserver/build/client/assets/pause-f5-1lKBt.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-ClvYBUSA.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-CxXUmBSd.js → search-Di64LWVb.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/settings-0OrEMU6J.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-DwFIBT09.js → simulations-DWT-CvLy.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/terminal-Br7MOqts.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-B6LgvRJg.js → triangle-alert-BLdiCuG-.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-CrAK28Bc.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DYxHZQuP.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-mBRpZPiu.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-B4lc-hKc.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BbkD6mNV.js +426 -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 +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +846 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +230 -0
- package/codeyam-cli/src/webserver/server.js +258 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +726 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
- package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
- package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/package.json +26 -0
- package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
- package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
- package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
- package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
- package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
- package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +68 -0
- package/codeyam-cli/templates/codeyam-memory-hook.sh +19 -20
- package/codeyam-cli/templates/commands/codeyam-diagnose.md +481 -0
- package/codeyam-cli/templates/editor-step-hook.py +231 -0
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app.json +18 -0
- package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
- package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
- package/codeyam-cli/templates/expo-react-native/global.css +3 -0
- package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
- package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
- package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
- package/codeyam-cli/templates/expo-react-native/package.json +37 -0
- package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
- package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
- package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +24 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +38 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +40 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/SUPABASE_SETUP.md +104 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +36 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
- package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
- package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
- package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
- package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
- package/codeyam-cli/templates/rule-notification-hook.py +83 -0
- package/codeyam-cli/templates/rule-reflection-hook.py +574 -88
- package/codeyam-cli/templates/rules-instructions.md +45 -93
- package/codeyam-cli/templates/{codeyam:debug.md → skills/codeyam-debug/SKILL.md} +1 -1
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +148 -0
- package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +611 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
- package/codeyam-cli/templates/skills/codeyam-new-rule/SKILL.md +11 -0
- package/codeyam-cli/templates/{codeyam:setup.md → skills/codeyam-setup/SKILL.md} +13 -1
- package/codeyam-cli/templates/{codeyam:sim.md → skills/codeyam-sim/SKILL.md} +1 -1
- package/codeyam-cli/templates/{codeyam:test.md → skills/codeyam-test/SKILL.md} +1 -1
- package/codeyam-cli/templates/{codeyam:verify.md → skills/codeyam-verify/SKILL.md} +1 -1
- package/package.json +28 -21
- package/packages/ai/index.js +1 -1
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +21 -1
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +78 -1
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/astScopes/sharedPatterns.js +25 -0
- package/packages/ai/src/lib/astScopes/sharedPatterns.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -7
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +495 -10
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +5 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +11 -2
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +2 -2
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +122 -12
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +15 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +78 -17
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/dataStructureChunking.js +30 -11
- package/packages/ai/src/lib/dataStructureChunking.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +46 -2
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +89 -5
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +86 -2
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +242 -81
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -1
- package/packages/ai/src/lib/isolateScopes.js +39 -3
- package/packages/ai/src/lib/isolateScopes.js.map +1 -1
- package/packages/ai/src/lib/mergeJsonTypeDefinitions.js +5 -0
- package/packages/ai/src/lib/mergeJsonTypeDefinitions.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js +97 -0
- package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +17 -2
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/analyze/index.js +1 -0
- package/packages/analyze/index.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +13 -4
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/index.js +4 -2
- package/packages/analyze/src/lib/asts/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/getNodeType.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/getNodeType.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +52 -2
- 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/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +907 -0
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +5 -1
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +51 -14
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +181 -13
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +328 -49
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/index.js +1 -0
- package/packages/analyze/src/lib/index.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/analysisBranchToDb.js +1 -1
- package/packages/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/packages/database/src/lib/analysisToDb.js +1 -1
- package/packages/database/src/lib/analysisToDb.js.map +1 -1
- package/packages/database/src/lib/branchToDb.js +1 -1
- package/packages/database/src/lib/branchToDb.js.map +1 -1
- package/packages/database/src/lib/commitBranchToDb.js +1 -1
- package/packages/database/src/lib/commitBranchToDb.js.map +1 -1
- package/packages/database/src/lib/commitToDb.js +1 -1
- package/packages/database/src/lib/commitToDb.js.map +1 -1
- package/packages/database/src/lib/fileToDb.js +1 -1
- package/packages/database/src/lib/fileToDb.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +8 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +65 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/projectToDb.js +1 -1
- package/packages/database/src/lib/projectToDb.js.map +1 -1
- package/packages/database/src/lib/saveFiles.js +1 -1
- package/packages/database/src/lib/saveFiles.js.map +1 -1
- package/packages/database/src/lib/scenarioToDb.js +1 -1
- package/packages/database/src/lib/scenarioToDb.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +100 -89
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/types/src/enums/ProjectFramework.js +2 -0
- package/packages/types/src/enums/ProjectFramework.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +98 -3
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -118
- package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
- package/codeyam-cli/src/commands/list.js +0 -31
- package/codeyam-cli/src/commands/list.js.map +0 -1
- package/codeyam-cli/src/commands/webapp-info.js +0 -146
- package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
- package/codeyam-cli/src/utils/reviewedRules.js +0 -92
- package/codeyam-cli/src/utils/reviewedRules.js.map +0 -1
- package/codeyam-cli/src/utils/universal-mocks.js +0 -152
- package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C8lyxW9k.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/copy-Bb-80kDT.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-BdhJEx6B.js +0 -21
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BBnGWYga.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D1T4TGjf.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/file-code-Dhef1kWN.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/git-CPTZZ-JZ.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/globals-CX9f-5xM.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-bba56ec1.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-DuTFSyJ2.js +0 -92
- package/codeyam-cli/src/webserver/build/client/assets/root-DTfSQARG.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/settings-CS5f3WzT.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-C1v1PQzo.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-aSv48UbS.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-TD1f-DHV.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BQ-1XyEa.js +0 -258
- package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
- package/codeyam-cli/templates/codeyam:diagnose.md +0 -803
- package/codeyam-cli/templates/codeyam:memory.md +0 -403
- package/codeyam-cli/templates/codeyam:new-rule.md +0 -52
- package/scripts/finalize-analyzer.cjs +0 -81
package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from '~codeyam/ai';
|
|
5
5
|
import { cleanKnownObjectFunctionsFromMapping } from '~codeyam/ai';
|
|
6
6
|
import { DataStructure, Entity, ReadonlyAnalysis } from '~codeyam/types';
|
|
7
|
+
import { transformationTracer } from './TransformationTracer';
|
|
7
8
|
|
|
8
9
|
export interface DataStructureInfo {
|
|
9
10
|
signatureSchema: { [key: string]: string };
|
|
@@ -51,6 +52,7 @@ const PRIMITIVE_TYPES = new Set([
|
|
|
51
52
|
|
|
52
53
|
// Check if a type string represents a primitive type
|
|
53
54
|
// Handles union types like "string | undefined" or "number | null"
|
|
55
|
+
// Also handles string literal unions like "'suggestion' | 'warning' | 'tip'"
|
|
54
56
|
function isPrimitiveType(typeStr: string): boolean {
|
|
55
57
|
if (PRIMITIVE_TYPES.has(typeStr)) {
|
|
56
58
|
return true;
|
|
@@ -58,13 +60,26 @@ function isPrimitiveType(typeStr: string): boolean {
|
|
|
58
60
|
// Check union types - if ALL parts of the union are primitives, it's primitive
|
|
59
61
|
// e.g., "string | undefined" -> ["string", "undefined"] -> both are primitive -> true
|
|
60
62
|
// e.g., "object | null" -> ["object", "null"] -> object is not primitive -> false
|
|
63
|
+
// e.g., "'suggestion' | 'warning'" -> string literal union -> true
|
|
61
64
|
if (typeStr.includes('|')) {
|
|
62
65
|
const parts = typeStr.split('|').map((p) => p.trim());
|
|
63
|
-
return parts.every(
|
|
66
|
+
return parts.every(
|
|
67
|
+
(part) =>
|
|
68
|
+
PRIMITIVE_TYPES.has(part) ||
|
|
69
|
+
// String literal values like 'suggestion', 'warning' are primitives
|
|
70
|
+
(part.startsWith("'") && part.endsWith("'")),
|
|
71
|
+
);
|
|
64
72
|
}
|
|
65
73
|
return false;
|
|
66
74
|
}
|
|
67
75
|
|
|
76
|
+
// Extract signature index from a path like "signature[0]" or "signature[0].foo"
|
|
77
|
+
// Returns the index number or undefined if not a signature path
|
|
78
|
+
function extractSignatureIndex(path: string): number | undefined {
|
|
79
|
+
const match = path.match(/^signature\[(\d+)\]/);
|
|
80
|
+
return match ? parseInt(match[1], 10) : undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
68
83
|
// Check if a new schema path would go through a primitive type
|
|
69
84
|
// e.g., if schema has 'entities[].scenarioCount': 'number', then
|
|
70
85
|
// 'entities[].scenarioCount.sha' would go through a primitive and should be rejected
|
|
@@ -102,9 +117,21 @@ function pathPartMatches(pathPart: string, schemaPathPart: string): boolean {
|
|
|
102
117
|
function bestValueFromOptions(options: Array<string | undefined>) {
|
|
103
118
|
options = options.filter(Boolean) as string[];
|
|
104
119
|
|
|
105
|
-
const known = options.
|
|
106
|
-
if (known) {
|
|
107
|
-
|
|
120
|
+
const known = options.filter((o) => !o.includes('unknown'));
|
|
121
|
+
if (known.length > 0) {
|
|
122
|
+
// Among known values, prefer string literal unions over bare primitives.
|
|
123
|
+
// e.g., "'draft' | 'inProgress' | 'paused' | 'completed'" is more specific than "string".
|
|
124
|
+
// This handles cases where a dependency schema has a bare type like "string" but the
|
|
125
|
+
// child entity's analysis has the actual literal union from TypeScript type resolution.
|
|
126
|
+
if (known.length > 1 && known.some((o) => PRIMITIVE_TYPES.has(o))) {
|
|
127
|
+
const literalUnion = known.find(
|
|
128
|
+
(o) => !PRIMITIVE_TYPES.has(o) && o.includes("'"),
|
|
129
|
+
);
|
|
130
|
+
if (literalUnion) {
|
|
131
|
+
return literalUnion;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return known[0];
|
|
108
135
|
}
|
|
109
136
|
|
|
110
137
|
const notUnknown = options.find((o) => o !== 'unknown');
|
|
@@ -202,6 +229,23 @@ export default function mergeInDependentDataStructure({
|
|
|
202
229
|
equivalentPostfixes: Record<string, string>;
|
|
203
230
|
}[] = [];
|
|
204
231
|
|
|
232
|
+
// O(1) index for findOrCreateEquivalentSchemaPathsEntry.
|
|
233
|
+
// Maps "(rootPath)::(normalizedFuncName)" → the entry containing that root.
|
|
234
|
+
// This replaces the O(E) linear search that was causing O(E²) gather performance.
|
|
235
|
+
const espIndex = new Map<string, (typeof equivalentSchemaPaths)[0]>();
|
|
236
|
+
const espIndexKey = (path: string, functionName: string | undefined) => {
|
|
237
|
+
const normalized = cleanFunctionName(functionName);
|
|
238
|
+
const funcKey =
|
|
239
|
+
normalized === rootScopeName ? '__self__' : normalized || '__self__';
|
|
240
|
+
return `${path}::${funcKey}`;
|
|
241
|
+
};
|
|
242
|
+
const updateEspIndex = (entry: (typeof equivalentSchemaPaths)[0]) => {
|
|
243
|
+
for (const root of entry.equivalentRoots) {
|
|
244
|
+
const funcName = root.function?.name ?? rootScopeName;
|
|
245
|
+
espIndex.set(espIndexKey(root.schemaRootPath, funcName), entry);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
|
|
205
249
|
// Pre-build a lookup map from cleaned function name to dependency for O(1) lookups.
|
|
206
250
|
// This avoids O(n) linear search in findRelevantDependency which was causing O(n²) performance.
|
|
207
251
|
const dependencyByCleanedName = new Map<
|
|
@@ -253,8 +297,17 @@ export default function mergeInDependentDataStructure({
|
|
|
253
297
|
return mergedDataStructure.dependencySchemas[filePath][name];
|
|
254
298
|
};
|
|
255
299
|
|
|
256
|
-
const cleanSchema = (
|
|
257
|
-
|
|
300
|
+
const cleanSchema = (
|
|
301
|
+
schema: { [key: string]: string },
|
|
302
|
+
context?: Record<string, any>,
|
|
303
|
+
) => {
|
|
304
|
+
transformationTracer.traceSchemaTransform(
|
|
305
|
+
rootScopeName,
|
|
306
|
+
'cleanKnownObjectFunctionsFromMapping',
|
|
307
|
+
schema,
|
|
308
|
+
cleanKnownObjectFunctionsFromMapping,
|
|
309
|
+
context,
|
|
310
|
+
);
|
|
258
311
|
};
|
|
259
312
|
|
|
260
313
|
const translatePath = (path: string, dependencyName: string) => {
|
|
@@ -307,6 +360,54 @@ export default function mergeInDependentDataStructure({
|
|
|
307
360
|
) => {
|
|
308
361
|
if (!sourceAndUsageEquivalencies) return;
|
|
309
362
|
|
|
363
|
+
// Pre-computed normalized schema index cache.
|
|
364
|
+
// Avoids repeated splitOutsideParenthesesAndArrays calls and function-name
|
|
365
|
+
// normalization for the same schema paths across multiple equivalency iterations.
|
|
366
|
+
// The normalization depends on `functionName` (constant per gatherAllEquivalentSchemaPaths call),
|
|
367
|
+
// so this cache is scoped to this call.
|
|
368
|
+
type NormalizedEntry = { path: string; parts: string[] };
|
|
369
|
+
const normalizedSchemaCache = new Map<
|
|
370
|
+
object,
|
|
371
|
+
{
|
|
372
|
+
byFirstPart: Map<string, NormalizedEntry[]>;
|
|
373
|
+
}
|
|
374
|
+
>();
|
|
375
|
+
const getSchemaIndex = (
|
|
376
|
+
schema: Record<string, string> | undefined,
|
|
377
|
+
): { byFirstPart: Map<string, NormalizedEntry[]> } => {
|
|
378
|
+
if (!schema) return { byFirstPart: new Map() };
|
|
379
|
+
const cached = normalizedSchemaCache.get(schema);
|
|
380
|
+
if (cached) return cached;
|
|
381
|
+
const byFirstPart = new Map<string, NormalizedEntry[]>();
|
|
382
|
+
for (const path in schema) {
|
|
383
|
+
let parts = splitOutsideParenthesesAndArrays(path);
|
|
384
|
+
if (parts[0].startsWith(functionName)) {
|
|
385
|
+
const baseName = cleanFunctionName(parts[0]);
|
|
386
|
+
if (!functionsWithMultipleTypeParams.has(baseName)) {
|
|
387
|
+
parts =
|
|
388
|
+
parts[1] === 'functionCallReturnValue'
|
|
389
|
+
? ['returnValue', ...parts.slice(2)]
|
|
390
|
+
: parts.slice(1);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
const entry: NormalizedEntry = { path, parts };
|
|
394
|
+
// Index by the base of the first part (before any function call args)
|
|
395
|
+
const firstPart = parts[0] ?? '';
|
|
396
|
+
const parenIdx = firstPart.indexOf('(');
|
|
397
|
+
const firstPartBase =
|
|
398
|
+
parenIdx >= 0 ? firstPart.slice(0, parenIdx) : firstPart;
|
|
399
|
+
let bucket = byFirstPart.get(firstPartBase);
|
|
400
|
+
if (!bucket) {
|
|
401
|
+
bucket = [];
|
|
402
|
+
byFirstPart.set(firstPartBase, bucket);
|
|
403
|
+
}
|
|
404
|
+
bucket.push(entry);
|
|
405
|
+
}
|
|
406
|
+
const result = { byFirstPart };
|
|
407
|
+
normalizedSchemaCache.set(schema, result);
|
|
408
|
+
return result;
|
|
409
|
+
};
|
|
410
|
+
|
|
310
411
|
const findOrCreateEquivalentSchemaPathsEntry = (
|
|
311
412
|
allPaths: { path: string; functionName?: string }[],
|
|
312
413
|
) => {
|
|
@@ -327,25 +428,102 @@ export default function mergeInDependentDataStructure({
|
|
|
327
428
|
let equivalentSchemaPathsEntry:
|
|
328
429
|
| (typeof equivalentSchemaPaths)[0]
|
|
329
430
|
| undefined;
|
|
431
|
+
|
|
432
|
+
// Collect the signature indices from the new roots we want to add
|
|
433
|
+
const newRootSignatureIndices = new Set<number>();
|
|
434
|
+
for (const root of equivalentRoots) {
|
|
435
|
+
const idx = extractSignatureIndex(root.schemaRootPath);
|
|
436
|
+
if (idx !== undefined) {
|
|
437
|
+
newRootSignatureIndices.add(idx);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Use espIndex Map for O(1) lookup instead of O(E) linear search.
|
|
442
|
+
// Falls back to linear search only when Map hit has a signature index conflict.
|
|
330
443
|
for (const pathInfo of allPaths) {
|
|
331
|
-
if (
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
444
|
+
if (equivalentSchemaPathsEntry) break;
|
|
445
|
+
const candidate = espIndex.get(
|
|
446
|
+
espIndexKey(pathInfo.path, pathInfo.functionName),
|
|
447
|
+
);
|
|
448
|
+
if (!candidate) continue;
|
|
449
|
+
|
|
450
|
+
// Verify no signature index conflict with the candidate entry
|
|
451
|
+
if (newRootSignatureIndices.size > 0) {
|
|
452
|
+
const existingIndicesByFunction = new Map<string, Set<number>>();
|
|
453
|
+
for (const er of candidate.equivalentRoots) {
|
|
454
|
+
const funcKey = er.function
|
|
455
|
+
? `${er.function.name}::${er.function.filePath}`
|
|
456
|
+
: '__self__';
|
|
457
|
+
const idx = extractSignatureIndex(er.schemaRootPath);
|
|
458
|
+
if (idx !== undefined) {
|
|
459
|
+
if (!existingIndicesByFunction.has(funcKey)) {
|
|
460
|
+
existingIndicesByFunction.set(funcKey, new Set());
|
|
461
|
+
}
|
|
462
|
+
existingIndicesByFunction.get(funcKey)!.add(idx);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
let hasConflict = false;
|
|
467
|
+
for (const newRoot of equivalentRoots) {
|
|
468
|
+
const funcKey = newRoot.function
|
|
469
|
+
? `${newRoot.function.name}::${newRoot.function.filePath}`
|
|
470
|
+
: '__self__';
|
|
471
|
+
const newIdx = extractSignatureIndex(newRoot.schemaRootPath);
|
|
472
|
+
if (newIdx !== undefined) {
|
|
473
|
+
const existingIndices = existingIndicesByFunction.get(funcKey);
|
|
474
|
+
if (existingIndices && existingIndices.size > 0) {
|
|
475
|
+
if (!existingIndices.has(newIdx)) {
|
|
476
|
+
hasConflict = true;
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (hasConflict) continue;
|
|
343
484
|
}
|
|
485
|
+
|
|
486
|
+
equivalentSchemaPathsEntry = candidate;
|
|
344
487
|
}
|
|
345
488
|
|
|
346
489
|
if (!equivalentSchemaPathsEntry) {
|
|
490
|
+
// Before creating a new entry, filter out roots that have conflicting
|
|
491
|
+
// signature indices from the same function. An entry should never contain
|
|
492
|
+
// roots with different signature indices from the same function.
|
|
493
|
+
// This prevents the bug where signature[1], signature[2], signature[4]
|
|
494
|
+
// all get merged together due to incorrect sourceEquivalencies.
|
|
495
|
+
let filteredRoots = equivalentRoots;
|
|
496
|
+
if (newRootSignatureIndices.size > 1) {
|
|
497
|
+
// There are multiple signature indices - we need to filter to keep only
|
|
498
|
+
// one consistent set. We'll keep the roots that match the PRIMARY index
|
|
499
|
+
// (the first signature index we encounter from self, or the lowest index).
|
|
500
|
+
|
|
501
|
+
// First, determine the primary index - prefer the self root's index
|
|
502
|
+
let primaryIndex: number | undefined;
|
|
503
|
+
for (const root of equivalentRoots) {
|
|
504
|
+
if (!root.function) {
|
|
505
|
+
// This is a self root
|
|
506
|
+
const idx = extractSignatureIndex(root.schemaRootPath);
|
|
507
|
+
if (idx !== undefined) {
|
|
508
|
+
primaryIndex = idx;
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
// If no self root has a signature index, use the lowest index
|
|
514
|
+
if (primaryIndex === undefined) {
|
|
515
|
+
primaryIndex = Math.min(...newRootSignatureIndices);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// Filter roots: keep if no signature index OR signature index matches primary
|
|
519
|
+
filteredRoots = equivalentRoots.filter((root) => {
|
|
520
|
+
const idx = extractSignatureIndex(root.schemaRootPath);
|
|
521
|
+
return idx === undefined || idx === primaryIndex;
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
|
|
347
525
|
equivalentSchemaPathsEntry = {
|
|
348
|
-
equivalentRoots,
|
|
526
|
+
equivalentRoots: filteredRoots,
|
|
349
527
|
equivalentPostfixes: {},
|
|
350
528
|
};
|
|
351
529
|
equivalentSchemaPaths.push(equivalentSchemaPathsEntry);
|
|
@@ -363,6 +541,9 @@ export default function mergeInDependentDataStructure({
|
|
|
363
541
|
return true;
|
|
364
542
|
});
|
|
365
543
|
|
|
544
|
+
// Keep the espIndex in sync after adding/deduplicating roots
|
|
545
|
+
updateEspIndex(equivalentSchemaPathsEntry);
|
|
546
|
+
|
|
366
547
|
return equivalentSchemaPathsEntry;
|
|
367
548
|
};
|
|
368
549
|
|
|
@@ -431,6 +612,8 @@ export default function mergeInDependentDataStructure({
|
|
|
431
612
|
);
|
|
432
613
|
|
|
433
614
|
const derivedBasePaths: { path: string; functionName?: string }[] = [];
|
|
615
|
+
const allPathSet = new Set(allPaths.map((p) => p.path));
|
|
616
|
+
const derivedBasePathSet = new Set<string>();
|
|
434
617
|
|
|
435
618
|
// For each child path, find its equivalent parent path and derive bases
|
|
436
619
|
for (const childPathInfo of childPaths) {
|
|
@@ -507,26 +690,28 @@ export default function mergeInDependentDataStructure({
|
|
|
507
690
|
!childHasArrayIterator &&
|
|
508
691
|
!childBaseIsGenericSignature
|
|
509
692
|
) {
|
|
510
|
-
// Add child base if not already present
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
693
|
+
// Add child base if not already present (O(1) Set lookup)
|
|
694
|
+
if (
|
|
695
|
+
!allPathSet.has(childBase) &&
|
|
696
|
+
!derivedBasePathSet.has(childBase)
|
|
697
|
+
) {
|
|
515
698
|
derivedBasePaths.push({
|
|
516
699
|
path: childBase,
|
|
517
700
|
functionName: childPathInfo.functionName,
|
|
518
701
|
});
|
|
702
|
+
derivedBasePathSet.add(childBase);
|
|
519
703
|
}
|
|
520
704
|
|
|
521
|
-
// Add parent base if not already present
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
705
|
+
// Add parent base if not already present (O(1) Set lookup)
|
|
706
|
+
if (
|
|
707
|
+
!allPathSet.has(parentBase) &&
|
|
708
|
+
!derivedBasePathSet.has(parentBase)
|
|
709
|
+
) {
|
|
526
710
|
derivedBasePaths.push({
|
|
527
711
|
path: parentBase,
|
|
528
712
|
functionName: parentPathInfo.functionName,
|
|
529
713
|
});
|
|
714
|
+
derivedBasePathSet.add(parentBase);
|
|
530
715
|
}
|
|
531
716
|
}
|
|
532
717
|
}
|
|
@@ -537,6 +722,26 @@ export default function mergeInDependentDataStructure({
|
|
|
537
722
|
allPaths.push(...derivedBasePaths);
|
|
538
723
|
|
|
539
724
|
const entry = findOrCreateEquivalentSchemaPathsEntry(allPaths);
|
|
725
|
+
|
|
726
|
+
// Trace equivalency gathering - helps debug why paths may not be connected
|
|
727
|
+
if (allPaths.length > 1) {
|
|
728
|
+
transformationTracer.operation(rootScopeName, {
|
|
729
|
+
operation: 'gatherEquivalency',
|
|
730
|
+
stage: 'gathering',
|
|
731
|
+
path: translatedPath,
|
|
732
|
+
context: {
|
|
733
|
+
sourceFunction: functionName,
|
|
734
|
+
equivalentPaths: allPaths.map((p) => ({
|
|
735
|
+
path: p.path,
|
|
736
|
+
function: p.functionName,
|
|
737
|
+
})),
|
|
738
|
+
equivalentRoots: entry.equivalentRoots.map((r) => ({
|
|
739
|
+
path: r.schemaRootPath,
|
|
740
|
+
function: r.function?.name,
|
|
741
|
+
})),
|
|
742
|
+
},
|
|
743
|
+
});
|
|
744
|
+
}
|
|
540
745
|
for (const equivalentRoot of entry.equivalentRoots) {
|
|
541
746
|
const dataStructures =
|
|
542
747
|
equivalentRoot.function &&
|
|
@@ -584,21 +789,20 @@ export default function mergeInDependentDataStructure({
|
|
|
584
789
|
}
|
|
585
790
|
|
|
586
791
|
for (const schema of schemas) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
792
|
+
// Use pre-computed index to only iterate schema entries whose
|
|
793
|
+
// normalized first part matches pathParts[0], instead of all entries.
|
|
794
|
+
const schemaIndex = getSchemaIndex(schema);
|
|
795
|
+
const lookupPart = pathParts[0] ?? '';
|
|
796
|
+
const lookupParenIdx = lookupPart.indexOf('(');
|
|
797
|
+
const lookupBase =
|
|
798
|
+
lookupParenIdx >= 0
|
|
799
|
+
? lookupPart.slice(0, lookupParenIdx)
|
|
800
|
+
: lookupPart;
|
|
801
|
+
const candidates = schemaIndex.byFirstPart.get(lookupBase) || [];
|
|
802
|
+
for (const {
|
|
803
|
+
path: schemaPath,
|
|
804
|
+
parts: schemaPathParts,
|
|
805
|
+
} of candidates) {
|
|
602
806
|
if (schemaPathParts.length < pathParts.length) continue;
|
|
603
807
|
|
|
604
808
|
// Check if all path parts match (allowing function call variants)
|
|
@@ -667,13 +871,29 @@ export default function mergeInDependentDataStructure({
|
|
|
667
871
|
schemaPathParts.slice(matchedUpToIndex),
|
|
668
872
|
);
|
|
669
873
|
|
|
670
|
-
entry.equivalentPostfixes[postfix]
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
874
|
+
const previousValue = entry.equivalentPostfixes[postfix];
|
|
875
|
+
const newValue = schema[schemaPath];
|
|
876
|
+
entry.equivalentPostfixes[postfix] = previousValue
|
|
877
|
+
? bestValueFromOptions([previousValue, newValue])
|
|
878
|
+
: newValue;
|
|
879
|
+
|
|
880
|
+
// Trace postfix gathering - shows where type info comes from
|
|
881
|
+
if (entry.equivalentPostfixes[postfix] !== previousValue) {
|
|
882
|
+
transformationTracer.operation(rootScopeName, {
|
|
883
|
+
operation: 'gatherPostfix',
|
|
884
|
+
stage: 'gathering',
|
|
885
|
+
path: postfix || '(root)',
|
|
886
|
+
before: previousValue,
|
|
887
|
+
after: entry.equivalentPostfixes[postfix],
|
|
888
|
+
context: {
|
|
889
|
+
sourceSchemaPath: schemaPath,
|
|
890
|
+
sourceFunction:
|
|
891
|
+
equivalentRoot.function?.name || rootScopeName,
|
|
892
|
+
equivalentRootPath: equivalentRoot.schemaRootPath,
|
|
893
|
+
rawValue: newValue,
|
|
894
|
+
},
|
|
895
|
+
});
|
|
896
|
+
}
|
|
677
897
|
}
|
|
678
898
|
}
|
|
679
899
|
}
|
|
@@ -710,10 +930,17 @@ export default function mergeInDependentDataStructure({
|
|
|
710
930
|
const entry = findOrCreateEquivalentSchemaPathsEntry([
|
|
711
931
|
{ path: translatedBasePath, functionName: functionName },
|
|
712
932
|
]);
|
|
713
|
-
|
|
933
|
+
const newRoot = {
|
|
714
934
|
schemaRootPath: translatedBasePath,
|
|
715
935
|
function: findRelevantDependency(functionName),
|
|
716
|
-
}
|
|
936
|
+
};
|
|
937
|
+
entry.equivalentRoots.push(newRoot);
|
|
938
|
+
// Update index for the newly added root
|
|
939
|
+
const newRootFuncName = newRoot.function?.name ?? rootScopeName;
|
|
940
|
+
espIndex.set(
|
|
941
|
+
espIndexKey(newRoot.schemaRootPath, newRootFuncName),
|
|
942
|
+
entry,
|
|
943
|
+
);
|
|
717
944
|
|
|
718
945
|
const basePathParts = splitOutsideParenthesesAndArrays(basePath);
|
|
719
946
|
for (const schemaPath in dataStructure.returnValueSchema) {
|
|
@@ -733,14 +960,14 @@ export default function mergeInDependentDataStructure({
|
|
|
733
960
|
const postfix = joinParenthesesAndArrays(
|
|
734
961
|
schemaPathParts.slice(basePathParts.length),
|
|
735
962
|
);
|
|
736
|
-
|
|
737
|
-
postfix
|
|
738
|
-
]
|
|
963
|
+
const newValue = entry.equivalentPostfixes[postfix]
|
|
739
964
|
? bestValueFromOptions([
|
|
740
965
|
entry.equivalentPostfixes[postfix],
|
|
741
966
|
dataStructure.returnValueSchema[schemaPath],
|
|
742
967
|
])
|
|
743
968
|
: dataStructure.returnValueSchema[schemaPath];
|
|
969
|
+
|
|
970
|
+
entry.equivalentPostfixes[postfix] = newValue;
|
|
744
971
|
}
|
|
745
972
|
}
|
|
746
973
|
}
|
|
@@ -795,6 +1022,10 @@ export default function mergeInDependentDataStructure({
|
|
|
795
1022
|
equivalentRootFunction: (typeof equivalentSchemaPaths)[0]['equivalentRoots'][0]['function'],
|
|
796
1023
|
) => {
|
|
797
1024
|
let postfix: string | undefined;
|
|
1025
|
+
|
|
1026
|
+
// Get the signature index we're looking for (if any)
|
|
1027
|
+
const lookingForSignatureIndex = extractSignatureIndex(schemaSubPath);
|
|
1028
|
+
|
|
798
1029
|
const equivalentEntry = mergedEquivalentSchemaPaths.find((esp) =>
|
|
799
1030
|
esp.equivalentRoots.some((er) => {
|
|
800
1031
|
if (
|
|
@@ -807,6 +1038,35 @@ export default function mergeInDependentDataStructure({
|
|
|
807
1038
|
}
|
|
808
1039
|
|
|
809
1040
|
if (schemaSubPath === er.schemaRootPath) {
|
|
1041
|
+
// Additional check: if we're looking for a signature path, make sure
|
|
1042
|
+
// the entry doesn't already have DIFFERENT signature indices.
|
|
1043
|
+
// This prevents entries with signature[1], signature[2], signature[4]
|
|
1044
|
+
// from all being merged together.
|
|
1045
|
+
if (lookingForSignatureIndex !== undefined) {
|
|
1046
|
+
const hasConflictingSignatureIndex = esp.equivalentRoots.some(
|
|
1047
|
+
(otherRoot) => {
|
|
1048
|
+
// Only check roots from the same function
|
|
1049
|
+
if (
|
|
1050
|
+
otherRoot.function?.name !== equivalentRootFunction?.name ||
|
|
1051
|
+
otherRoot.function?.filePath !==
|
|
1052
|
+
equivalentRootFunction?.filePath
|
|
1053
|
+
) {
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
const otherIndex = extractSignatureIndex(
|
|
1057
|
+
otherRoot.schemaRootPath,
|
|
1058
|
+
);
|
|
1059
|
+
return (
|
|
1060
|
+
otherIndex !== undefined &&
|
|
1061
|
+
otherIndex !== lookingForSignatureIndex
|
|
1062
|
+
);
|
|
1063
|
+
},
|
|
1064
|
+
);
|
|
1065
|
+
if (hasConflictingSignatureIndex) {
|
|
1066
|
+
return false;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
810
1070
|
postfix = er.postfix;
|
|
811
1071
|
return true;
|
|
812
1072
|
}
|
|
@@ -940,6 +1200,10 @@ export default function mergeInDependentDataStructure({
|
|
|
940
1200
|
|
|
941
1201
|
equivalentSchemaPaths = mergeAllEquivalentSchemaPaths();
|
|
942
1202
|
|
|
1203
|
+
// Collect schemas that need cleaning — batch the calls for the end instead of
|
|
1204
|
+
// calling cleanSchema inside the inner root loop (which was O(roots * schemaSize)).
|
|
1205
|
+
const schemasToClean = new Set<{ [key: string]: string }>();
|
|
1206
|
+
|
|
943
1207
|
for (const esp of equivalentSchemaPaths) {
|
|
944
1208
|
// Pre-compute which postfixes have children to avoid O(n²) lookups in the inner loop.
|
|
945
1209
|
// A postfix "has children" if there are other postfixes that extend it.
|
|
@@ -1037,6 +1301,15 @@ export default function mergeInDependentDataStructure({
|
|
|
1037
1301
|
// Skip paths that would go through a primitive type
|
|
1038
1302
|
// e.g., if schema has 'entities[].scenarioCount': 'number', skip 'entities[].scenarioCount.sha'
|
|
1039
1303
|
if (wouldGoThroughPrimitive(newSchemaPath, schema)) {
|
|
1304
|
+
transformationTracer.operation(rootScopeName, {
|
|
1305
|
+
operation: 'skipPrimitivePath',
|
|
1306
|
+
stage: 'merged',
|
|
1307
|
+
path: newSchemaPath,
|
|
1308
|
+
context: {
|
|
1309
|
+
reason: 'would go through primitive type',
|
|
1310
|
+
postfixValue,
|
|
1311
|
+
},
|
|
1312
|
+
});
|
|
1040
1313
|
continue;
|
|
1041
1314
|
}
|
|
1042
1315
|
|
|
@@ -1060,6 +1333,16 @@ export default function mergeInDependentDataStructure({
|
|
|
1060
1333
|
PRIMITIVE_TYPES.has(existingType) &&
|
|
1061
1334
|
(postfixValue === 'object' || postfixValue === 'array')
|
|
1062
1335
|
) {
|
|
1336
|
+
transformationTracer.operation(rootScopeName, {
|
|
1337
|
+
operation: 'skipTypeDowngrade',
|
|
1338
|
+
stage: 'merged',
|
|
1339
|
+
path: newSchemaPath,
|
|
1340
|
+
context: {
|
|
1341
|
+
reason: 'would overwrite primitive with object/array',
|
|
1342
|
+
existingType,
|
|
1343
|
+
newType: postfixValue,
|
|
1344
|
+
},
|
|
1345
|
+
});
|
|
1063
1346
|
continue;
|
|
1064
1347
|
}
|
|
1065
1348
|
// Don't overwrite a complex/union type with a primitive
|
|
@@ -1068,17 +1351,45 @@ export default function mergeInDependentDataStructure({
|
|
|
1068
1351
|
!PRIMITIVE_TYPES.has(existingType) &&
|
|
1069
1352
|
PRIMITIVE_TYPES.has(postfixValue)
|
|
1070
1353
|
) {
|
|
1354
|
+
transformationTracer.operation(rootScopeName, {
|
|
1355
|
+
operation: 'skipTypeDowngrade',
|
|
1356
|
+
stage: 'merged',
|
|
1357
|
+
path: newSchemaPath,
|
|
1358
|
+
context: {
|
|
1359
|
+
reason: 'would overwrite complex type with primitive',
|
|
1360
|
+
existingType,
|
|
1361
|
+
newType: postfixValue,
|
|
1362
|
+
},
|
|
1363
|
+
});
|
|
1071
1364
|
continue;
|
|
1072
1365
|
}
|
|
1073
1366
|
}
|
|
1074
1367
|
|
|
1368
|
+
// Log the successful postfix merge
|
|
1369
|
+
transformationTracer.operation(rootScopeName, {
|
|
1370
|
+
operation: 'mergePostfix',
|
|
1371
|
+
stage: 'merged',
|
|
1372
|
+
path: newSchemaPath,
|
|
1373
|
+
before: existingType,
|
|
1374
|
+
after: postfixValue,
|
|
1375
|
+
context: {
|
|
1376
|
+
schemaRootPath: equivalentRoot.schemaRootPath,
|
|
1377
|
+
postfix: relevantPostfix,
|
|
1378
|
+
dependency: equivalentRoot.function?.name,
|
|
1379
|
+
},
|
|
1380
|
+
});
|
|
1075
1381
|
schema[newSchemaPath] = postfixValue;
|
|
1076
1382
|
}
|
|
1077
1383
|
|
|
1078
|
-
|
|
1384
|
+
schemasToClean.add(schema);
|
|
1079
1385
|
}
|
|
1080
1386
|
}
|
|
1081
1387
|
|
|
1388
|
+
// Batch-clean all modified schemas once (instead of once per root per ESP entry)
|
|
1389
|
+
for (const schema of schemasToClean) {
|
|
1390
|
+
cleanSchema(schema, { stage: 'afterMergePostfix' });
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1082
1393
|
// Propagate equivalency-derived attributes to generic function call variants.
|
|
1083
1394
|
// When attributes are traced via equivalencies (e.g., fileComparisons from buildDataMap.signature[2]),
|
|
1084
1395
|
// they get written to non-generic paths (returnValue.data.x or funcName().functionCallReturnValue.data.x).
|
|
@@ -1197,6 +1508,14 @@ export default function mergeInDependentDataStructure({
|
|
|
1197
1508
|
`${dependency.name}().functionCallReturnValue`,
|
|
1198
1509
|
);
|
|
1199
1510
|
}
|
|
1511
|
+
transformationTracer.operation(rootScopeName, {
|
|
1512
|
+
operation: 'normalizeReturnValuePath',
|
|
1513
|
+
stage: 'merged',
|
|
1514
|
+
path: normalizedPath,
|
|
1515
|
+
before: path,
|
|
1516
|
+
after: normalizedPath,
|
|
1517
|
+
context: { dependency: dependency.name, value },
|
|
1518
|
+
});
|
|
1200
1519
|
depSchema.returnValueSchema[normalizedPath] = value;
|
|
1201
1520
|
}
|
|
1202
1521
|
|
|
@@ -1281,7 +1600,10 @@ export default function mergeInDependentDataStructure({
|
|
|
1281
1600
|
}
|
|
1282
1601
|
}
|
|
1283
1602
|
|
|
1284
|
-
cleanSchema(depSchema.returnValueSchema
|
|
1603
|
+
cleanSchema(depSchema.returnValueSchema, {
|
|
1604
|
+
stage: 'afterMockedDependencyMerge',
|
|
1605
|
+
dependency: dependency.name,
|
|
1606
|
+
});
|
|
1285
1607
|
|
|
1286
1608
|
// Pull signature requirements from downstream functions into the mocked return value.
|
|
1287
1609
|
// When a mocked function's return flows into another function's signature (via usageEquivalencies),
|
|
@@ -1358,7 +1680,10 @@ export default function mergeInDependentDataStructure({
|
|
|
1358
1680
|
}
|
|
1359
1681
|
}
|
|
1360
1682
|
|
|
1361
|
-
cleanSchema(depSchema.returnValueSchema
|
|
1683
|
+
cleanSchema(depSchema.returnValueSchema, {
|
|
1684
|
+
stage: 'afterSignatureRequirementsMerge',
|
|
1685
|
+
dependency: dependency.name,
|
|
1686
|
+
});
|
|
1362
1687
|
}
|
|
1363
1688
|
|
|
1364
1689
|
// Process the input dependencySchemas FIRST (before child dependentAnalyses).
|
|
@@ -1399,7 +1724,11 @@ export default function mergeInDependentDataStructure({
|
|
|
1399
1724
|
// from the copied schema. Without this, method call paths on primitives like
|
|
1400
1725
|
// "projectSlug.replace(...)" would cause convertDotNotation to create nested
|
|
1401
1726
|
// object structures instead of preserving the primitive type.
|
|
1402
|
-
cleanSchema(depSchema.returnValueSchema
|
|
1727
|
+
cleanSchema(depSchema.returnValueSchema, {
|
|
1728
|
+
stage: 'afterDependencySchemaCopy',
|
|
1729
|
+
filePath,
|
|
1730
|
+
dependency: name,
|
|
1731
|
+
});
|
|
1403
1732
|
}
|
|
1404
1733
|
|
|
1405
1734
|
// TYPE REFINEMENT: Check if dependentAnalyses has a more specific type for this dependency.
|
|
@@ -1470,7 +1799,12 @@ export default function mergeInDependentDataStructure({
|
|
|
1470
1799
|
srcSchema.returnValueSchema[path];
|
|
1471
1800
|
}
|
|
1472
1801
|
}
|
|
1473
|
-
cleanSchema(variantSchema.returnValueSchema
|
|
1802
|
+
cleanSchema(variantSchema.returnValueSchema, {
|
|
1803
|
+
stage: 'afterTypeVariantCopy',
|
|
1804
|
+
filePath,
|
|
1805
|
+
dependency: name,
|
|
1806
|
+
variant,
|
|
1807
|
+
});
|
|
1474
1808
|
}
|
|
1475
1809
|
}
|
|
1476
1810
|
}
|
|
@@ -4,3 +4,4 @@ export { type FunctionDependenciesMap } from './asts/sourceFiles/getPseudoFile';
|
|
|
4
4
|
export * as asts from './asts/index';
|
|
5
5
|
export * as projects from './projects/index';
|
|
6
6
|
export * as types from './types';
|
|
7
|
+
export { transformationTracer } from './files/scenarios/TransformationTracer';
|