@codeyam/codeyam-cli 0.1.0-staging.b8a55ba → 0.1.0-staging.b8ee127

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.
Files changed (1506) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/common/execAsync.ts +1 -1
  3. package/analyzer-template/log.txt +3 -3
  4. package/analyzer-template/package.json +32 -29
  5. package/analyzer-template/packages/ai/index.ts +21 -5
  6. package/analyzer-template/packages/ai/package.json +4 -4
  7. package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
  8. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +226 -24
  9. package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
  10. package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +217 -13
  11. package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
  12. package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +316 -23
  13. package/analyzer-template/packages/ai/src/lib/astScopes/nodeToSource.ts +19 -0
  14. package/analyzer-template/packages/ai/src/lib/astScopes/paths.ts +11 -4
  15. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
  16. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
  17. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +15 -0
  18. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
  19. package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +1229 -30
  20. package/analyzer-template/packages/ai/src/lib/astScopes/sharedPatterns.ts +28 -0
  21. package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +265 -6
  22. package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
  23. package/analyzer-template/packages/ai/src/lib/completionCall.ts +247 -66
  24. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +2183 -369
  25. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.ts +10 -3
  26. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +7 -2
  27. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +296 -35
  28. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +120 -76
  29. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
  30. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
  31. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +70 -9
  32. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +140 -20
  33. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
  34. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
  35. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +140 -14
  36. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
  37. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
  38. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
  39. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +393 -90
  40. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
  41. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.ts +35 -0
  42. package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +183 -0
  43. package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
  44. package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
  45. package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
  46. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
  47. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +86 -142
  48. package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +59 -3
  49. package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1497 -88
  50. package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +200 -196
  51. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +677 -0
  52. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
  53. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +2484 -0
  54. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
  55. package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +5 -5
  56. package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +328 -7
  57. package/analyzer-template/packages/ai/src/lib/mergeJsonTypeDefinitions.ts +5 -0
  58. package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +111 -87
  59. package/analyzer-template/packages/ai/src/lib/promptGenerators/collapseNullableObjects.ts +118 -0
  60. package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +10 -7
  61. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
  62. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -142
  63. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
  64. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
  65. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +110 -6
  66. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -89
  67. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
  68. package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +11 -11
  69. package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
  70. package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +824 -0
  71. package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
  72. package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
  73. package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +122 -3
  74. package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +114 -2
  75. package/analyzer-template/packages/analyze/index.ts +6 -1
  76. package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +79 -59
  77. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +132 -33
  78. package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
  79. package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
  80. package/analyzer-template/packages/analyze/src/lib/asts/nodes/getNodeType.ts +1 -0
  81. package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
  82. package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
  83. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
  84. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
  85. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
  86. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
  87. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
  88. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
  89. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +491 -269
  90. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +47 -37
  91. package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +25 -6
  92. package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +13 -14
  93. package/analyzer-template/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.ts +21 -0
  94. package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +115 -20
  95. package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +35 -15
  96. package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +11 -7
  97. package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +15 -12
  98. package/analyzer-template/packages/analyze/src/lib/files/analyzeNextRoute.ts +8 -3
  99. package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
  100. package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
  101. package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
  102. package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1352 -0
  103. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +201 -46
  104. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
  105. package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +593 -84
  106. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
  107. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +649 -92
  108. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +166 -0
  109. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +35 -129
  110. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +2 -3
  111. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +1872 -801
  112. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
  113. package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
  114. package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
  115. package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
  116. package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
  117. package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
  118. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
  119. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
  120. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
  121. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
  122. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
  123. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
  124. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
  125. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
  126. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
  127. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
  128. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
  129. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
  130. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
  131. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
  132. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
  133. package/analyzer-template/packages/aws/package.json +10 -10
  134. package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
  135. package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
  136. package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
  137. package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
  138. package/analyzer-template/packages/database/index.ts +1 -0
  139. package/analyzer-template/packages/database/package.json +4 -4
  140. package/analyzer-template/packages/database/src/lib/analysisBranchToDb.ts +1 -1
  141. package/analyzer-template/packages/database/src/lib/analysisToDb.ts +1 -1
  142. package/analyzer-template/packages/database/src/lib/branchToDb.ts +1 -1
  143. package/analyzer-template/packages/database/src/lib/commitBranchToDb.ts +1 -1
  144. package/analyzer-template/packages/database/src/lib/commitToDb.ts +1 -1
  145. package/analyzer-template/packages/database/src/lib/fileToDb.ts +1 -1
  146. package/analyzer-template/packages/database/src/lib/kysely/db.ts +22 -1
  147. package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
  148. package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +17 -1
  149. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +164 -0
  150. package/analyzer-template/packages/database/src/lib/kysely/tables/labsRequestsTable.ts +52 -0
  151. package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
  152. package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +38 -15
  153. package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
  154. package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
  155. package/analyzer-template/packages/database/src/lib/loadCommits.ts +58 -19
  156. package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -9
  157. package/analyzer-template/packages/database/src/lib/loadEntity.ts +19 -8
  158. package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
  159. package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +5 -6
  160. package/analyzer-template/packages/database/src/lib/projectToDb.ts +1 -1
  161. package/analyzer-template/packages/database/src/lib/saveFiles.ts +1 -1
  162. package/analyzer-template/packages/database/src/lib/scenarioToDb.ts +1 -1
  163. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +96 -152
  164. package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
  165. package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
  166. package/analyzer-template/packages/database/src/lib/userScenarioToDb.ts +1 -1
  167. package/analyzer-template/packages/generate/index.ts +3 -0
  168. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
  169. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +221 -0
  170. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
  171. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
  172. package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
  173. package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
  174. package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
  175. package/analyzer-template/packages/github/dist/database/index.js +1 -0
  176. package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
  177. package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js +1 -1
  178. package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js.map +1 -1
  179. package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js +1 -1
  180. package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js.map +1 -1
  181. package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js +1 -1
  182. package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js.map +1 -1
  183. package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js +1 -1
  184. package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js.map +1 -1
  185. package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js +1 -1
  186. package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js.map +1 -1
  187. package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js +1 -1
  188. package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js.map +1 -1
  189. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +4 -0
  190. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
  191. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +16 -1
  192. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
  193. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -18
  194. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
  195. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts +1 -0
  196. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
  197. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
  198. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  199. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +17 -1
  200. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
  201. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  202. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +29 -0
  203. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
  204. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +149 -0
  205. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
  206. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
  207. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
  208. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts +23 -0
  209. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts.map +1 -0
  210. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
  211. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
  212. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +7 -6
  213. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
  214. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts +2 -0
  215. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
  216. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
  217. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
  218. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
  219. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +15 -1
  220. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
  221. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
  222. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
  223. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
  224. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
  225. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.map +1 -1
  226. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -1
  227. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
  228. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +45 -14
  229. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
  230. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts +3 -1
  231. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  232. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +23 -10
  233. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  234. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts +4 -1
  235. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts.map +1 -1
  236. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js +5 -5
  237. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js.map +1 -1
  238. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
  239. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
  240. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js.map +1 -1
  241. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
  242. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +5 -5
  243. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  244. package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js +1 -1
  245. package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js.map +1 -1
  246. package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js +1 -1
  247. package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js.map +1 -1
  248. package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js +1 -1
  249. package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js.map +1 -1
  250. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts +2 -2
  251. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  252. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +76 -89
  253. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  254. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
  255. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
  256. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
  257. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
  258. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
  259. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
  260. package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
  261. package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
  262. package/analyzer-template/packages/github/dist/generate/index.js +3 -0
  263. package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
  264. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
  265. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
  266. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
  267. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
  268. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
  269. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +217 -0
  270. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
  271. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
  272. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
  273. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
  274. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
  275. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
  276. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
  277. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  278. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
  279. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
  280. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
  281. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
  282. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
  283. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
  284. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
  285. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
  286. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
  287. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
  288. package/analyzer-template/packages/github/dist/types/index.d.ts +3 -4
  289. package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
  290. package/analyzer-template/packages/github/dist/types/index.js +0 -1
  291. package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
  292. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  293. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  294. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  295. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  296. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +71 -27
  297. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
  298. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
  299. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
  300. package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
  301. package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
  302. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +8 -0
  303. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  304. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +19 -54
  305. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
  306. package/analyzer-template/packages/github/dist/types/src/types/Scenario.js +1 -21
  307. package/analyzer-template/packages/github/dist/types/src/types/Scenario.js.map +1 -1
  308. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +153 -5
  309. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  310. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  311. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  312. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
  313. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  314. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
  315. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  316. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
  317. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
  318. package/analyzer-template/packages/github/package.json +2 -2
  319. package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
  320. package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
  321. package/analyzer-template/packages/process/index.ts +2 -0
  322. package/analyzer-template/packages/process/package.json +12 -0
  323. package/analyzer-template/packages/process/tsconfig.json +8 -0
  324. package/analyzer-template/packages/types/index.ts +3 -6
  325. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  326. package/analyzer-template/packages/types/src/types/Analysis.ts +87 -27
  327. package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
  328. package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
  329. package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +8 -0
  330. package/analyzer-template/packages/types/src/types/Scenario.ts +19 -77
  331. package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +181 -5
  332. package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
  333. package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
  334. package/analyzer-template/packages/ui-components/package.json +1 -1
  335. package/analyzer-template/packages/utils/dist/types/index.d.ts +3 -4
  336. package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
  337. package/analyzer-template/packages/utils/dist/types/index.js +0 -1
  338. package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
  339. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  340. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  341. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  342. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  343. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +71 -27
  344. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
  345. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
  346. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
  347. package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
  348. package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
  349. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +8 -0
  350. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  351. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +19 -54
  352. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
  353. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js +1 -21
  354. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js.map +1 -1
  355. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +153 -5
  356. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  357. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  358. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  359. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
  360. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  361. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts +3 -1
  362. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
  363. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +120 -4
  364. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  365. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
  366. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  367. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
  368. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
  369. package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +148 -3
  370. package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
  371. package/analyzer-template/playwright/capture.ts +57 -26
  372. package/analyzer-template/playwright/captureFromUrl.ts +89 -82
  373. package/analyzer-template/playwright/captureStatic.ts +1 -1
  374. package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
  375. package/analyzer-template/playwright/waitForServer.ts +21 -6
  376. package/analyzer-template/project/analyzeBaselineCommit.ts +9 -0
  377. package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
  378. package/analyzer-template/project/analyzeFileEntities.ts +30 -0
  379. package/analyzer-template/project/analyzeRegularCommit.ts +9 -0
  380. package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
  381. package/analyzer-template/project/constructMockCode.ts +1341 -198
  382. package/analyzer-template/project/controller/startController.ts +16 -1
  383. package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
  384. package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
  385. package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
  386. package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
  387. package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
  388. package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
  389. package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +18 -7
  390. package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
  391. package/analyzer-template/project/orchestrateCapture.ts +85 -10
  392. package/analyzer-template/project/reconcileMockDataKeys.ts +231 -84
  393. package/analyzer-template/project/runAnalysis.ts +11 -0
  394. package/analyzer-template/project/runMultiScenarioServer.ts +26 -3
  395. package/analyzer-template/project/serverOnlyModules.ts +127 -2
  396. package/analyzer-template/project/start.ts +54 -15
  397. package/analyzer-template/project/startScenarioCapture.ts +15 -0
  398. package/analyzer-template/project/writeClientLogRoute.ts +125 -0
  399. package/analyzer-template/project/writeMockDataTsx.ts +362 -32
  400. package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
  401. package/analyzer-template/project/writeScenarioComponents.ts +466 -133
  402. package/analyzer-template/project/writeScenarioFiles.ts +26 -0
  403. package/analyzer-template/project/writeSimpleRoot.ts +28 -42
  404. package/analyzer-template/scripts/comboWorkerLoop.cjs +99 -50
  405. package/analyzer-template/scripts/defaultCmd.sh +9 -0
  406. package/analyzer-template/tsconfig.json +14 -1
  407. package/background/src/lib/local/createLocalAnalyzer.js +2 -30
  408. package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
  409. package/background/src/lib/local/execAsync.js +1 -1
  410. package/background/src/lib/local/execAsync.js.map +1 -1
  411. package/background/src/lib/virtualized/common/execAsync.js +1 -1
  412. package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
  413. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +7 -1
  414. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
  415. package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
  416. package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
  417. package/background/src/lib/virtualized/project/analyzeFileEntities.js +24 -1
  418. package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
  419. package/background/src/lib/virtualized/project/analyzeRegularCommit.js +7 -1
  420. package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
  421. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
  422. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
  423. package/background/src/lib/virtualized/project/constructMockCode.js +1179 -147
  424. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  425. package/background/src/lib/virtualized/project/controller/startController.js +11 -1
  426. package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
  427. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
  428. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
  429. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
  430. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
  431. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
  432. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
  433. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
  434. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
  435. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
  436. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
  437. package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
  438. package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
  439. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +7 -5
  440. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
  441. package/background/src/lib/virtualized/project/orchestrateCapture.js +69 -11
  442. package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
  443. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +198 -51
  444. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
  445. package/background/src/lib/virtualized/project/runAnalysis.js +9 -0
  446. package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
  447. package/background/src/lib/virtualized/project/runMultiScenarioServer.js +23 -3
  448. package/background/src/lib/virtualized/project/runMultiScenarioServer.js.map +1 -1
  449. package/background/src/lib/virtualized/project/serverOnlyModules.js +106 -3
  450. package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
  451. package/background/src/lib/virtualized/project/start.js +49 -15
  452. package/background/src/lib/virtualized/project/start.js.map +1 -1
  453. package/background/src/lib/virtualized/project/startScenarioCapture.js +12 -0
  454. package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
  455. package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
  456. package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
  457. package/background/src/lib/virtualized/project/writeMockDataTsx.js +313 -27
  458. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  459. package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
  460. package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
  461. package/background/src/lib/virtualized/project/writeScenarioComponents.js +359 -110
  462. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  463. package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
  464. package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
  465. package/background/src/lib/virtualized/project/writeSimpleRoot.js +28 -41
  466. package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
  467. package/codeyam-cli/scripts/apply-setup.js +386 -9
  468. package/codeyam-cli/scripts/apply-setup.js.map +1 -1
  469. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
  470. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
  471. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
  472. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
  473. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
  474. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
  475. package/codeyam-cli/src/cli.js +62 -23
  476. package/codeyam-cli/src/cli.js.map +1 -1
  477. package/codeyam-cli/src/codeyam-cli.js +18 -2
  478. package/codeyam-cli/src/codeyam-cli.js.map +1 -1
  479. package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js +47 -0
  480. package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js.map +1 -0
  481. package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js +71 -0
  482. package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js.map +1 -0
  483. package/codeyam-cli/src/commands/__tests__/editor.designSystem.test.js +30 -0
  484. package/codeyam-cli/src/commands/__tests__/editor.designSystem.test.js.map +1 -0
  485. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js +51 -0
  486. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js.map +1 -0
  487. package/codeyam-cli/src/commands/__tests__/editor.statePersistence.test.js +55 -0
  488. package/codeyam-cli/src/commands/__tests__/editor.statePersistence.test.js.map +1 -0
  489. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +56 -0
  490. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  491. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +136 -47
  492. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  493. package/codeyam-cli/src/commands/analyze.js +22 -10
  494. package/codeyam-cli/src/commands/analyze.js.map +1 -1
  495. package/codeyam-cli/src/commands/baseline.js +176 -0
  496. package/codeyam-cli/src/commands/baseline.js.map +1 -0
  497. package/codeyam-cli/src/commands/debug.js +37 -23
  498. package/codeyam-cli/src/commands/debug.js.map +1 -1
  499. package/codeyam-cli/src/commands/default.js +43 -35
  500. package/codeyam-cli/src/commands/default.js.map +1 -1
  501. package/codeyam-cli/src/commands/editor.js +6274 -0
  502. package/codeyam-cli/src/commands/editor.js.map +1 -0
  503. package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js +23 -0
  504. package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js.map +1 -0
  505. package/codeyam-cli/src/commands/editorIsolateArgs.js +25 -0
  506. package/codeyam-cli/src/commands/editorIsolateArgs.js.map +1 -0
  507. package/codeyam-cli/src/commands/init.js +167 -292
  508. package/codeyam-cli/src/commands/init.js.map +1 -1
  509. package/codeyam-cli/src/commands/memory.js +278 -0
  510. package/codeyam-cli/src/commands/memory.js.map +1 -0
  511. package/codeyam-cli/src/commands/recapture.js +31 -18
  512. package/codeyam-cli/src/commands/recapture.js.map +1 -1
  513. package/codeyam-cli/src/commands/report.js +46 -1
  514. package/codeyam-cli/src/commands/report.js.map +1 -1
  515. package/codeyam-cli/src/commands/setup-sandbox.js +2 -0
  516. package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -1
  517. package/codeyam-cli/src/commands/setup-simulations.js +284 -0
  518. package/codeyam-cli/src/commands/setup-simulations.js.map +1 -0
  519. package/codeyam-cli/src/commands/start.js +8 -12
  520. package/codeyam-cli/src/commands/start.js.map +1 -1
  521. package/codeyam-cli/src/commands/status.js +23 -1
  522. package/codeyam-cli/src/commands/status.js.map +1 -1
  523. package/codeyam-cli/src/commands/telemetry.js +37 -0
  524. package/codeyam-cli/src/commands/telemetry.js.map +1 -0
  525. package/codeyam-cli/src/commands/test-startup.js +3 -1
  526. package/codeyam-cli/src/commands/test-startup.js.map +1 -1
  527. package/codeyam-cli/src/commands/verify.js +14 -2
  528. package/codeyam-cli/src/commands/verify.js.map +1 -1
  529. package/codeyam-cli/src/commands/wipe.js +108 -0
  530. package/codeyam-cli/src/commands/wipe.js.map +1 -0
  531. package/codeyam-cli/src/data/designSystems.js +27 -0
  532. package/codeyam-cli/src/data/designSystems.js.map +1 -0
  533. package/codeyam-cli/src/data/techStacks.js +77 -0
  534. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  535. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
  536. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  537. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  538. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  539. package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
  540. package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
  541. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +181 -0
  542. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
  543. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +4160 -0
  544. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
  545. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
  546. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
  547. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
  548. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
  549. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js +137 -0
  550. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js.map +1 -0
  551. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
  552. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
  553. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
  554. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
  555. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +194 -0
  556. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
  557. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +381 -0
  558. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
  559. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js +67 -0
  560. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js.map +1 -0
  561. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
  562. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
  563. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
  564. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
  565. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +594 -0
  566. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
  567. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
  568. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
  569. package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
  570. package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
  571. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
  572. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
  573. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +361 -0
  574. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
  575. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +250 -0
  576. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  577. package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js +398 -0
  578. package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js.map +1 -0
  579. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  580. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  581. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +411 -0
  582. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  583. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +1768 -0
  584. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
  585. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +413 -0
  586. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  587. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
  588. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
  589. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
  590. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
  591. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
  592. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
  593. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +2121 -0
  594. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
  595. package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
  596. package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
  597. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js +177 -0
  598. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js.map +1 -0
  599. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +122 -0
  600. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  601. package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js +302 -0
  602. package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js.map +1 -0
  603. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +185 -0
  604. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -0
  605. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
  606. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  607. package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
  608. package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
  609. package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
  610. package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
  611. package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js +127 -0
  612. package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js.map +1 -0
  613. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
  614. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
  615. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +284 -0
  616. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  617. package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
  618. package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
  619. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +672 -0
  620. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
  621. package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js +84 -0
  622. package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js.map +1 -0
  623. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
  624. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
  625. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +175 -82
  626. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  627. package/codeyam-cli/src/utils/__tests__/telemetry.test.js +159 -0
  628. package/codeyam-cli/src/utils/__tests__/telemetry.test.js.map +1 -0
  629. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  630. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  631. package/codeyam-cli/src/utils/__tests__/testRunner.test.js +216 -0
  632. package/codeyam-cli/src/utils/__tests__/testRunner.test.js.map +1 -0
  633. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +148 -0
  634. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  635. package/codeyam-cli/src/utils/analysisRunner.js +67 -22
  636. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  637. package/codeyam-cli/src/utils/analyzer.js +26 -0
  638. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  639. package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
  640. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  641. package/codeyam-cli/src/utils/backgroundServer.js +203 -30
  642. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  643. package/codeyam-cli/src/utils/buildFlags.js +4 -0
  644. package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
  645. package/codeyam-cli/src/utils/database.js +128 -7
  646. package/codeyam-cli/src/utils/database.js.map +1 -1
  647. package/codeyam-cli/src/utils/designSystemShowcase.js +810 -0
  648. package/codeyam-cli/src/utils/designSystemShowcase.js.map +1 -0
  649. package/codeyam-cli/src/utils/devModeEvents.js +40 -0
  650. package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
  651. package/codeyam-cli/src/utils/devServerState.js +71 -0
  652. package/codeyam-cli/src/utils/devServerState.js.map +1 -0
  653. package/codeyam-cli/src/utils/editorApi.js +95 -0
  654. package/codeyam-cli/src/utils/editorApi.js.map +1 -0
  655. package/codeyam-cli/src/utils/editorAudit.js +849 -0
  656. package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
  657. package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
  658. package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
  659. package/codeyam-cli/src/utils/editorCapture.js +102 -0
  660. package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
  661. package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
  662. package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
  663. package/codeyam-cli/src/utils/editorDevServer.js +197 -0
  664. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
  665. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +50 -0
  666. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
  667. package/codeyam-cli/src/utils/editorEntityHelpers.js +144 -0
  668. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
  669. package/codeyam-cli/src/utils/editorGuard.js +36 -0
  670. package/codeyam-cli/src/utils/editorGuard.js.map +1 -0
  671. package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
  672. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
  673. package/codeyam-cli/src/utils/editorJournal.js +225 -0
  674. package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
  675. package/codeyam-cli/src/utils/editorLoaderHelpers.js +152 -0
  676. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
  677. package/codeyam-cli/src/utils/editorMigration.js +224 -0
  678. package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
  679. package/codeyam-cli/src/utils/editorMockState.js +248 -0
  680. package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
  681. package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
  682. package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
  683. package/codeyam-cli/src/utils/editorPreview.js +139 -0
  684. package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
  685. package/codeyam-cli/src/utils/editorRecapture.js +109 -0
  686. package/codeyam-cli/src/utils/editorRecapture.js.map +1 -0
  687. package/codeyam-cli/src/utils/editorRoadmap.js +301 -0
  688. package/codeyam-cli/src/utils/editorRoadmap.js.map +1 -0
  689. package/codeyam-cli/src/utils/editorScenarioSwitch.js +149 -0
  690. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  691. package/codeyam-cli/src/utils/editorScenarios.js +687 -0
  692. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
  693. package/codeyam-cli/src/utils/editorSeedAdapter.js +475 -0
  694. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  695. package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
  696. package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
  697. package/codeyam-cli/src/utils/entityChangeStatus.js +394 -0
  698. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
  699. package/codeyam-cli/src/utils/entityChangeStatus.server.js +227 -0
  700. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
  701. package/codeyam-cli/src/utils/fileMetadata.js +5 -0
  702. package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
  703. package/codeyam-cli/src/utils/fileWatcher.js +63 -9
  704. package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
  705. package/codeyam-cli/src/utils/generateReport.js +4 -3
  706. package/codeyam-cli/src/utils/generateReport.js.map +1 -1
  707. package/codeyam-cli/src/utils/git.js +182 -0
  708. package/codeyam-cli/src/utils/git.js.map +1 -0
  709. package/codeyam-cli/src/utils/glossaryAdd.js +74 -0
  710. package/codeyam-cli/src/utils/glossaryAdd.js.map +1 -0
  711. package/codeyam-cli/src/utils/install-skills.js +155 -39
  712. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  713. package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
  714. package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
  715. package/codeyam-cli/src/utils/labsAutoCheck.js +19 -0
  716. package/codeyam-cli/src/utils/labsAutoCheck.js.map +1 -0
  717. package/codeyam-cli/src/utils/manualEntityAnalysis.js +196 -0
  718. package/codeyam-cli/src/utils/manualEntityAnalysis.js.map +1 -0
  719. package/codeyam-cli/src/utils/npmVersionCheck.js +76 -0
  720. package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -0
  721. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  722. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  723. package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
  724. package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
  725. package/codeyam-cli/src/utils/progress.js +8 -1
  726. package/codeyam-cli/src/utils/progress.js.map +1 -1
  727. package/codeyam-cli/src/utils/project.js +15 -5
  728. package/codeyam-cli/src/utils/project.js.map +1 -1
  729. package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
  730. package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
  731. package/codeyam-cli/src/utils/queue/__tests__/job.interactiveStart.test.js +159 -0
  732. package/codeyam-cli/src/utils/queue/__tests__/job.interactiveStart.test.js.map +1 -0
  733. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
  734. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
  735. package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
  736. package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
  737. package/codeyam-cli/src/utils/queue/job.js +214 -7
  738. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  739. package/codeyam-cli/src/utils/queue/manager.js +7 -0
  740. package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
  741. package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
  742. package/codeyam-cli/src/utils/registerScenarioResult.js +52 -0
  743. package/codeyam-cli/src/utils/registerScenarioResult.js.map +1 -0
  744. package/codeyam-cli/src/utils/requireSimulations.js +10 -0
  745. package/codeyam-cli/src/utils/requireSimulations.js.map +1 -0
  746. package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
  747. package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
  748. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
  749. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
  750. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +229 -0
  751. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
  752. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
  753. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
  754. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
  755. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
  756. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
  757. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
  758. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
  759. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
  760. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +74 -0
  761. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
  762. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +376 -0
  763. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
  764. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +113 -0
  765. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
  766. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
  767. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
  768. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
  769. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
  770. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
  771. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
  772. package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
  773. package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
  774. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
  775. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
  776. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
  777. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
  778. package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
  779. package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
  780. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
  781. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
  782. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
  783. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
  784. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
  785. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
  786. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
  787. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
  788. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +76 -0
  789. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
  790. package/codeyam-cli/src/utils/rules/index.js +7 -0
  791. package/codeyam-cli/src/utils/rules/index.js.map +1 -0
  792. package/codeyam-cli/src/utils/rules/parser.js +93 -0
  793. package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
  794. package/codeyam-cli/src/utils/rules/pathMatcher.js +49 -0
  795. package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
  796. package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
  797. package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
  798. package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
  799. package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
  800. package/codeyam-cli/src/utils/rules/sourceFiles.js +43 -0
  801. package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
  802. package/codeyam-cli/src/utils/rules/staleness.js +137 -0
  803. package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
  804. package/codeyam-cli/src/utils/scenarioCoverage.js +77 -0
  805. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  806. package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
  807. package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
  808. package/codeyam-cli/src/utils/scenariosManifest.js +313 -0
  809. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
  810. package/codeyam-cli/src/utils/screenshotHash.js +26 -0
  811. package/codeyam-cli/src/utils/screenshotHash.js.map +1 -0
  812. package/codeyam-cli/src/utils/serverState.js +94 -12
  813. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  814. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +96 -45
  815. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  816. package/codeyam-cli/src/utils/simulationGateMiddleware.js +175 -0
  817. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -0
  818. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  819. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  820. package/codeyam-cli/src/utils/syncMocksMiddleware.js +7 -26
  821. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  822. package/codeyam-cli/src/utils/telemetry.js +106 -0
  823. package/codeyam-cli/src/utils/telemetry.js.map +1 -0
  824. package/codeyam-cli/src/utils/telemetryMiddleware.js +22 -0
  825. package/codeyam-cli/src/utils/telemetryMiddleware.js.map +1 -0
  826. package/codeyam-cli/src/utils/testResultCache.js +53 -0
  827. package/codeyam-cli/src/utils/testResultCache.js.map +1 -0
  828. package/codeyam-cli/src/utils/testResultCache.server.js +81 -0
  829. package/codeyam-cli/src/utils/testResultCache.server.js.map +1 -0
  830. package/codeyam-cli/src/utils/testResultCache.server.test.js +187 -0
  831. package/codeyam-cli/src/utils/testResultCache.server.test.js.map +1 -0
  832. package/codeyam-cli/src/utils/testResultCache.test.js +230 -0
  833. package/codeyam-cli/src/utils/testResultCache.test.js.map +1 -0
  834. package/codeyam-cli/src/utils/testRunner.js +350 -0
  835. package/codeyam-cli/src/utils/testRunner.js.map +1 -0
  836. package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
  837. package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
  838. package/codeyam-cli/src/utils/versionInfo.js +67 -15
  839. package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
  840. package/codeyam-cli/src/utils/webappDetection.js +38 -3
  841. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  842. package/codeyam-cli/src/utils/wipe.js +128 -0
  843. package/codeyam-cli/src/utils/wipe.js.map +1 -0
  844. package/codeyam-cli/src/webserver/__tests__/api.interactive-switch-scenario.test.js +99 -0
  845. package/codeyam-cli/src/webserver/__tests__/api.interactive-switch-scenario.test.js.map +1 -0
  846. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
  847. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
  848. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +107 -0
  849. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  850. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js +66 -0
  851. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js.map +1 -0
  852. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +762 -0
  853. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  854. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +315 -0
  855. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
  856. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +135 -0
  857. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -0
  858. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +86 -0
  859. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  860. package/codeyam-cli/src/webserver/app/lib/database.js +129 -50
  861. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  862. package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
  863. package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
  864. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
  865. package/codeyam-cli/src/webserver/app/routes/api.interactive-switch-scenario.js +34 -0
  866. package/codeyam-cli/src/webserver/app/routes/api.interactive-switch-scenario.js.map +1 -0
  867. package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
  868. package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
  869. package/codeyam-cli/src/webserver/backgroundServer.js +186 -37
  870. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  871. package/codeyam-cli/src/webserver/bootstrap.js +51 -0
  872. package/codeyam-cli/src/webserver/bootstrap.js.map +1 -1
  873. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-DTBZZfSk.js +1 -0
  874. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-BxclONWq.js +11 -0
  875. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
  876. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-BsnEOJZ_.js +41 -0
  877. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-ByaELMbv.js +1 -0
  878. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-6WjVfhxX.js +25 -0
  879. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-ChX-Hp7W.js +3 -0
  880. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-D1CdlbrV.js → LoadingDots-By5zI316.js} +1 -1
  881. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-wDPcZNKx.js → LogViewer-C-9zQdXg.js} +3 -3
  882. package/codeyam-cli/src/webserver/build/client/assets/MiniClaudeChat-BusrvT2F.js +36 -0
  883. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-DQsceHVv.js +11 -0
  884. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DThcm_9M.js +1 -0
  885. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-Cl4oOA3A.js +10 -0
  886. package/codeyam-cli/src/webserver/build/client/assets/Spinner-CIil5-gb.js +34 -0
  887. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
  888. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-BqkA9zyZ.js +1 -0
  889. package/codeyam-cli/src/webserver/build/client/assets/_index-DnOgyseQ.js +11 -0
  890. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DqM9hbNE.js +27 -0
  891. package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
  892. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
  893. package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-C58dYPwR.js +1 -0
  894. package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
  895. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-B8NCeOrm.js +22 -0
  896. package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
  897. package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
  898. package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
  899. package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
  900. package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
  901. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
  902. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
  903. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
  904. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
  905. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
  906. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
  907. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
  908. package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
  909. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  910. package/codeyam-cli/src/webserver/build/client/assets/api.editor-recapture-stale-l0sNRNKZ.js +1 -0
  911. package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
  912. package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
  913. package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
  914. package/codeyam-cli/src/webserver/build/client/assets/api.editor-roadmap-l0sNRNKZ.js +1 -0
  915. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-scenario-data-l0sNRNKZ.js +1 -0
  916. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
  917. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  918. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
  919. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
  920. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
  921. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
  922. package/codeyam-cli/src/webserver/build/client/assets/api.editor-schema-l0sNRNKZ.js +1 -0
  923. package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
  924. package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
  925. package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
  926. package/codeyam-cli/src/webserver/build/client/assets/api.editor-verify-routes-l0sNRNKZ.js +1 -0
  927. package/codeyam-cli/src/webserver/build/client/assets/api.health-l0sNRNKZ.js +1 -0
  928. package/codeyam-cli/src/webserver/build/client/assets/api.interactive-switch-scenario-l0sNRNKZ.js +1 -0
  929. package/codeyam-cli/src/webserver/build/client/assets/api.labs-unlock-l0sNRNKZ.js +1 -0
  930. package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
  931. package/codeyam-cli/src/webserver/build/client/assets/api.restart-server-l0sNRNKZ.js +1 -0
  932. package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
  933. package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
  934. package/codeyam-cli/src/webserver/build/client/assets/book-open-BFSIqZgO.js +6 -0
  935. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BYimnrHg.js → chevron-down-B9fDzFVh.js} +2 -2
  936. package/codeyam-cli/src/webserver/build/client/assets/chunk-UVKPFVEO-Bmq2apuh.js +43 -0
  937. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-CaVsIRxt.js → circle-check-DLPObLUx.js} +2 -2
  938. package/codeyam-cli/src/webserver/build/client/assets/copy-DXEmO0TD.js +11 -0
  939. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-BwyFiRot.js +41 -0
  940. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-Coe5NhbS.js +1 -0
  941. package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-DoA97ML3.svg} +2 -2
  942. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-iRhRIFlp.js +1 -0
  943. package/codeyam-cli/src/webserver/build/client/assets/editor._tab-BZPBzV73.js +1 -0
  944. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-CsYVRiNH.js +147 -0
  945. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-C6fEYHrh.js +41 -0
  946. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-zUEpfPsu.js → entity._sha._-Ce1s4OQ1.js} +14 -13
  947. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-C8AyYgYT.js +6 -0
  948. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DziaVQX1.js +6 -0
  949. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-BTcpgIpC.js +6 -0
  950. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CfLCUi9S.js → entity._sha_.edit._scenarioId-D_O_ajfZ.js} +2 -2
  951. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DKJyZfAY.js → entry.client-j1Vi0bco.js} +6 -6
  952. package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
  953. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
  954. package/codeyam-cli/src/webserver/build/client/assets/files-kuny2Q_s.js +1 -0
  955. package/codeyam-cli/src/webserver/build/client/assets/git-DgCZPMie.js +1 -0
  956. package/codeyam-cli/src/webserver/build/client/assets/globals-Gp2o-NMc.css +1 -0
  957. package/codeyam-cli/src/webserver/build/client/assets/{index-BosqDOlH.js → index-BliGSSpl.js} +1 -1
  958. package/codeyam-cli/src/webserver/build/client/assets/index-SqjQKTdH.js +15 -0
  959. package/codeyam-cli/src/webserver/build/client/assets/{index-CzNNiTkw.js → index-vyrZD2g4.js} +1 -1
  960. package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
  961. package/codeyam-cli/src/webserver/build/client/assets/labs-c3yLxSEp.js +1 -0
  962. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-CNp9QFCX.js → loader-circle-D-q28GLF.js} +2 -2
  963. package/codeyam-cli/src/webserver/build/client/assets/manifest-ef0f624d.js +1 -0
  964. package/codeyam-cli/src/webserver/build/client/assets/memory-CEWIUC4t.js +101 -0
  965. package/codeyam-cli/src/webserver/build/client/assets/pause-BP6fitdh.js +11 -0
  966. package/codeyam-cli/src/webserver/build/client/assets/root-Didv9PLi.js +80 -0
  967. package/codeyam-cli/src/webserver/build/client/assets/{search-DDGjYAMJ.js → search-BooqacKS.js} +2 -2
  968. package/codeyam-cli/src/webserver/build/client/assets/settings-BM0nbryO.js +1 -0
  969. package/codeyam-cli/src/webserver/build/client/assets/simulations-ovy6FjRY.js +1 -0
  970. package/codeyam-cli/src/webserver/build/client/assets/terminal-DHemCJIs.js +11 -0
  971. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CBc5dE1s.js → triangle-alert-D87ekDl8.js} +2 -2
  972. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-Dk0Tciqg.js +1 -0
  973. package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C8QvIe05.js +2 -0
  974. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-jkCytuYz.js +1 -0
  975. package/codeyam-cli/src/webserver/build/client/assets/useToast-BgqkixU9.js +1 -0
  976. package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
  977. package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
  978. package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-BKMsxwqe.js +16 -0
  979. package/codeyam-cli/src/webserver/build/server/assets/index-CvuvIPEn.js +1 -0
  980. package/codeyam-cli/src/webserver/build/server/assets/init-B3gVLAAJ.js +14 -0
  981. package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
  982. package/codeyam-cli/src/webserver/build/server/assets/server-build-B4LxStYP.js +741 -0
  983. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  984. package/codeyam-cli/src/webserver/build-info.json +5 -5
  985. package/codeyam-cli/src/webserver/devServer.js +39 -5
  986. package/codeyam-cli/src/webserver/devServer.js.map +1 -1
  987. package/codeyam-cli/src/webserver/editorProxy.js +1101 -0
  988. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
  989. package/codeyam-cli/src/webserver/idleDetector.js +130 -0
  990. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
  991. package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
  992. package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
  993. package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
  994. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
  995. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +283 -0
  996. package/codeyam-cli/src/webserver/server.js +481 -26
  997. package/codeyam-cli/src/webserver/server.js.map +1 -1
  998. package/codeyam-cli/src/webserver/terminalServer.js +973 -0
  999. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
  1000. package/codeyam-cli/templates/__tests__/editor-step-hook.prompt-capture.test.ts +118 -0
  1001. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  1002. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  1003. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  1004. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  1005. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  1006. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  1007. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  1008. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  1009. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  1010. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  1011. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  1012. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  1013. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  1014. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  1015. package/codeyam-cli/templates/codeyam-editor-claude.md +149 -0
  1016. package/codeyam-cli/templates/codeyam-editor-gemini.md +59 -0
  1017. package/codeyam-cli/templates/codeyam-editor-reference.md +216 -0
  1018. package/codeyam-cli/templates/codeyam-memory-hook.sh +199 -0
  1019. package/codeyam-cli/templates/commands/codeyam-diagnose.md +481 -0
  1020. package/codeyam-cli/templates/design-systems/clean-dashboard-design-system.md +255 -0
  1021. package/codeyam-cli/templates/design-systems/editorial-design-system.md +267 -0
  1022. package/codeyam-cli/templates/design-systems/mono-brutalist-design-system.md +256 -0
  1023. package/codeyam-cli/templates/design-systems/neo-brutalist-design-system.md +294 -0
  1024. package/codeyam-cli/templates/editor-step-hook.py +368 -0
  1025. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +288 -0
  1026. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  1027. package/codeyam-cli/templates/expo-react-native/__tests__/.gitkeep +0 -0
  1028. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +15 -0
  1029. package/codeyam-cli/templates/expo-react-native/app/index.tsx +36 -0
  1030. package/codeyam-cli/templates/expo-react-native/app.json +29 -0
  1031. package/codeyam-cli/templates/expo-react-native/babel.config.js +10 -0
  1032. package/codeyam-cli/templates/expo-react-native/gitignore +14 -0
  1033. package/codeyam-cli/templates/expo-react-native/global.css +10 -0
  1034. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  1035. package/codeyam-cli/templates/expo-react-native/lib/theme.ts +73 -0
  1036. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  1037. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  1038. package/codeyam-cli/templates/expo-react-native/package.json +54 -0
  1039. package/codeyam-cli/templates/expo-react-native/patches/expo-modules-autolinking+3.0.24.patch +29 -0
  1040. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  1041. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  1042. package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
  1043. package/codeyam-cli/templates/isolation-route/expo-router.tsx.template +54 -0
  1044. package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
  1045. package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
  1046. package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
  1047. package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
  1048. package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
  1049. package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
  1050. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  1051. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  1052. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  1053. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  1054. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  1055. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
  1056. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
  1057. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
  1058. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
  1059. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +24 -0
  1060. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
  1061. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  1062. package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
  1063. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
  1064. package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
  1065. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +39 -0
  1066. package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
  1067. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
  1068. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +40 -0
  1069. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
  1070. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +140 -0
  1071. package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
  1072. package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
  1073. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  1074. package/codeyam-cli/templates/nextjs-prisma-supabase/SUPABASE_SETUP.md +104 -0
  1075. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  1076. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  1077. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  1078. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  1079. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  1080. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  1081. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  1082. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  1083. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  1084. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  1085. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  1086. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  1087. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  1088. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  1089. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  1090. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  1091. package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
  1092. package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
  1093. package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
  1094. package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
  1095. package/codeyam-cli/templates/rule-notification-hook.py +83 -0
  1096. package/codeyam-cli/templates/rule-reflection-hook.py +647 -0
  1097. package/codeyam-cli/templates/rules-instructions.md +78 -0
  1098. package/codeyam-cli/templates/seed-adapters/supabase.ts +363 -0
  1099. package/codeyam-cli/templates/{codeyam-debug-skill.md → skills/codeyam-debug/SKILL.md} +48 -4
  1100. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
  1101. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +244 -0
  1102. package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +611 -0
  1103. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
  1104. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
  1105. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
  1106. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
  1107. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
  1108. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
  1109. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
  1110. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
  1111. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
  1112. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
  1113. package/codeyam-cli/templates/skills/codeyam-new-rule/SKILL.md +11 -0
  1114. package/codeyam-cli/templates/{codeyam-setup-skill.md → skills/codeyam-setup/SKILL.md} +151 -4
  1115. package/codeyam-cli/templates/{codeyam-sim-skill.md → skills/codeyam-sim/SKILL.md} +1 -1
  1116. package/codeyam-cli/templates/{codeyam-test-skill.md → skills/codeyam-test/SKILL.md} +1 -1
  1117. package/codeyam-cli/templates/{codeyam-verify-skill.md → skills/codeyam-verify/SKILL.md} +1 -1
  1118. package/package.json +35 -24
  1119. package/packages/ai/index.js +8 -6
  1120. package/packages/ai/index.js.map +1 -1
  1121. package/packages/ai/src/lib/analyzeScope.js +179 -13
  1122. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  1123. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
  1124. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
  1125. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +160 -13
  1126. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
  1127. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
  1128. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
  1129. package/packages/ai/src/lib/astScopes/methodSemantics.js +237 -23
  1130. package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
  1131. package/packages/ai/src/lib/astScopes/nodeToSource.js +16 -0
  1132. package/packages/ai/src/lib/astScopes/nodeToSource.js.map +1 -1
  1133. package/packages/ai/src/lib/astScopes/paths.js +12 -3
  1134. package/packages/ai/src/lib/astScopes/paths.js.map +1 -1
  1135. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
  1136. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
  1137. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
  1138. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
  1139. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +7 -0
  1140. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
  1141. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
  1142. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
  1143. package/packages/ai/src/lib/astScopes/processExpression.js +944 -30
  1144. package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
  1145. package/packages/ai/src/lib/astScopes/sharedPatterns.js +25 -0
  1146. package/packages/ai/src/lib/astScopes/sharedPatterns.js.map +1 -1
  1147. package/packages/ai/src/lib/checkAllAttributes.js +24 -9
  1148. package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
  1149. package/packages/ai/src/lib/completionCall.js +188 -38
  1150. package/packages/ai/src/lib/completionCall.js.map +1 -1
  1151. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1720 -216
  1152. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  1153. package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js +9 -2
  1154. package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js.map +1 -1
  1155. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +7 -2
  1156. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
  1157. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +230 -23
  1158. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
  1159. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +77 -55
  1160. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
  1161. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
  1162. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
  1163. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
  1164. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
  1165. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +66 -7
  1166. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  1167. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +122 -14
  1168. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
  1169. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
  1170. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
  1171. package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
  1172. package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
  1173. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +122 -12
  1174. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
  1175. package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
  1176. package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
  1177. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
  1178. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
  1179. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
  1180. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
  1181. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +333 -81
  1182. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  1183. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
  1184. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
  1185. package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
  1186. package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
  1187. package/packages/ai/src/lib/dataStructureChunking.js +130 -0
  1188. package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
  1189. package/packages/ai/src/lib/deepEqual.js +32 -0
  1190. package/packages/ai/src/lib/deepEqual.js.map +1 -0
  1191. package/packages/ai/src/lib/e2eDataTracking.js +241 -0
  1192. package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
  1193. package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
  1194. package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
  1195. package/packages/ai/src/lib/generateChangesEntityScenarioData.js +62 -5
  1196. package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
  1197. package/packages/ai/src/lib/generateChangesEntityScenarios.js +78 -120
  1198. package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
  1199. package/packages/ai/src/lib/generateEntityDataStructure.js +47 -2
  1200. package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
  1201. package/packages/ai/src/lib/generateEntityScenarioData.js +1185 -83
  1202. package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
  1203. package/packages/ai/src/lib/generateEntityScenarios.js +177 -163
  1204. package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
  1205. package/packages/ai/src/lib/generateExecutionFlows.js +484 -0
  1206. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
  1207. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
  1208. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
  1209. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1807 -0
  1210. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
  1211. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
  1212. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
  1213. package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -2
  1214. package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
  1215. package/packages/ai/src/lib/isolateScopes.js +270 -7
  1216. package/packages/ai/src/lib/isolateScopes.js.map +1 -1
  1217. package/packages/ai/src/lib/mergeJsonTypeDefinitions.js +5 -0
  1218. package/packages/ai/src/lib/mergeJsonTypeDefinitions.js.map +1 -1
  1219. package/packages/ai/src/lib/mergeStatements.js +88 -46
  1220. package/packages/ai/src/lib/mergeStatements.js.map +1 -1
  1221. package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js +97 -0
  1222. package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js.map +1 -0
  1223. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +10 -4
  1224. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
  1225. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
  1226. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
  1227. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -100
  1228. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
  1229. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
  1230. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
  1231. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +83 -6
  1232. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
  1233. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -70
  1234. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
  1235. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
  1236. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
  1237. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +9 -9
  1238. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
  1239. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
  1240. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
  1241. package/packages/ai/src/lib/resolvePathToControllable.js +677 -0
  1242. package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
  1243. package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
  1244. package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
  1245. package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
  1246. package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
  1247. package/packages/ai/src/lib/worker/analyzeScopeWorker.js +94 -1
  1248. package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
  1249. package/packages/analyze/index.js +2 -1
  1250. package/packages/analyze/index.js.map +1 -1
  1251. package/packages/analyze/src/lib/FileAnalyzer.js +75 -36
  1252. package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
  1253. package/packages/analyze/src/lib/ProjectAnalyzer.js +109 -30
  1254. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  1255. package/packages/analyze/src/lib/analysisContext.js +30 -5
  1256. package/packages/analyze/src/lib/analysisContext.js.map +1 -1
  1257. package/packages/analyze/src/lib/asts/index.js +4 -2
  1258. package/packages/analyze/src/lib/asts/index.js.map +1 -1
  1259. package/packages/analyze/src/lib/asts/nodes/getNodeType.js +1 -0
  1260. package/packages/analyze/src/lib/asts/nodes/getNodeType.js.map +1 -1
  1261. package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
  1262. package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
  1263. package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
  1264. package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
  1265. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
  1266. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
  1267. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
  1268. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
  1269. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
  1270. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
  1271. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
  1272. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
  1273. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
  1274. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
  1275. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
  1276. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
  1277. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +225 -54
  1278. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  1279. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +37 -27
  1280. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  1281. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +14 -2
  1282. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
  1283. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +11 -8
  1284. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
  1285. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js +14 -0
  1286. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js.map +1 -1
  1287. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +75 -21
  1288. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
  1289. package/packages/analyze/src/lib/files/analyzeChange.js +22 -11
  1290. package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
  1291. package/packages/analyze/src/lib/files/analyzeEntity.js +9 -8
  1292. package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
  1293. package/packages/analyze/src/lib/files/analyzeInitial.js +10 -10
  1294. package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
  1295. package/packages/analyze/src/lib/files/analyzeNextRoute.js +5 -1
  1296. package/packages/analyze/src/lib/files/analyzeNextRoute.js.map +1 -1
  1297. package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
  1298. package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
  1299. package/packages/analyze/src/lib/files/enums/steps.js +1 -1
  1300. package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
  1301. package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
  1302. package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
  1303. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +907 -0
  1304. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
  1305. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +170 -40
  1306. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
  1307. package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
  1308. package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
  1309. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +480 -71
  1310. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
  1311. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -34
  1312. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
  1313. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +431 -72
  1314. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  1315. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +104 -0
  1316. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
  1317. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +27 -98
  1318. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
  1319. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +2 -3
  1320. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
  1321. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +1507 -635
  1322. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  1323. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
  1324. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
  1325. package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
  1326. package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
  1327. package/packages/analyze/src/lib/index.js +1 -0
  1328. package/packages/analyze/src/lib/index.js.map +1 -1
  1329. package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
  1330. package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
  1331. package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
  1332. package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
  1333. package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
  1334. package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
  1335. package/packages/database/index.js +1 -0
  1336. package/packages/database/index.js.map +1 -1
  1337. package/packages/database/src/lib/analysisBranchToDb.js +1 -1
  1338. package/packages/database/src/lib/analysisBranchToDb.js.map +1 -1
  1339. package/packages/database/src/lib/analysisToDb.js +1 -1
  1340. package/packages/database/src/lib/analysisToDb.js.map +1 -1
  1341. package/packages/database/src/lib/branchToDb.js +1 -1
  1342. package/packages/database/src/lib/branchToDb.js.map +1 -1
  1343. package/packages/database/src/lib/commitBranchToDb.js +1 -1
  1344. package/packages/database/src/lib/commitBranchToDb.js.map +1 -1
  1345. package/packages/database/src/lib/commitToDb.js +1 -1
  1346. package/packages/database/src/lib/commitToDb.js.map +1 -1
  1347. package/packages/database/src/lib/fileToDb.js +1 -1
  1348. package/packages/database/src/lib/fileToDb.js.map +1 -1
  1349. package/packages/database/src/lib/kysely/db.js +16 -1
  1350. package/packages/database/src/lib/kysely/db.js.map +1 -1
  1351. package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
  1352. package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  1353. package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  1354. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +149 -0
  1355. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
  1356. package/packages/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
  1357. package/packages/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
  1358. package/packages/database/src/lib/loadAnalyses.js +45 -2
  1359. package/packages/database/src/lib/loadAnalyses.js.map +1 -1
  1360. package/packages/database/src/lib/loadAnalysis.js +15 -1
  1361. package/packages/database/src/lib/loadAnalysis.js.map +1 -1
  1362. package/packages/database/src/lib/loadBranch.js +11 -1
  1363. package/packages/database/src/lib/loadBranch.js.map +1 -1
  1364. package/packages/database/src/lib/loadCommit.js +7 -0
  1365. package/packages/database/src/lib/loadCommit.js.map +1 -1
  1366. package/packages/database/src/lib/loadCommits.js +45 -14
  1367. package/packages/database/src/lib/loadCommits.js.map +1 -1
  1368. package/packages/database/src/lib/loadEntities.js +23 -10
  1369. package/packages/database/src/lib/loadEntities.js.map +1 -1
  1370. package/packages/database/src/lib/loadEntity.js +5 -5
  1371. package/packages/database/src/lib/loadEntity.js.map +1 -1
  1372. package/packages/database/src/lib/loadEntityBranches.js +9 -0
  1373. package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
  1374. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +5 -5
  1375. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  1376. package/packages/database/src/lib/projectToDb.js +1 -1
  1377. package/packages/database/src/lib/projectToDb.js.map +1 -1
  1378. package/packages/database/src/lib/saveFiles.js +1 -1
  1379. package/packages/database/src/lib/saveFiles.js.map +1 -1
  1380. package/packages/database/src/lib/scenarioToDb.js +1 -1
  1381. package/packages/database/src/lib/scenarioToDb.js.map +1 -1
  1382. package/packages/database/src/lib/updateCommitMetadata.js +76 -89
  1383. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  1384. package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
  1385. package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
  1386. package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
  1387. package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
  1388. package/packages/generate/index.js +3 -0
  1389. package/packages/generate/index.js.map +1 -1
  1390. package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
  1391. package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
  1392. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +217 -0
  1393. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
  1394. package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
  1395. package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
  1396. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
  1397. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  1398. package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
  1399. package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
  1400. package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
  1401. package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
  1402. package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
  1403. package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
  1404. package/packages/process/index.js +3 -0
  1405. package/packages/process/index.js.map +1 -0
  1406. package/packages/process/src/GlobalProcessManager.js.map +1 -0
  1407. package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
  1408. package/packages/process/src/ProcessManager.js.map +1 -0
  1409. package/packages/process/src/index.js.map +1 -0
  1410. package/packages/process/src/managedExecAsync.js.map +1 -0
  1411. package/packages/types/index.js +0 -1
  1412. package/packages/types/index.js.map +1 -1
  1413. package/packages/types/src/enums/ProjectFramework.js +2 -0
  1414. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  1415. package/packages/types/src/types/Scenario.js +1 -21
  1416. package/packages/types/src/types/Scenario.js.map +1 -1
  1417. package/packages/utils/src/lib/fs/rsyncCopy.js +120 -4
  1418. package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  1419. package/packages/utils/src/lib/safeFileName.js +29 -3
  1420. package/packages/utils/src/lib/safeFileName.js.map +1 -1
  1421. package/scripts/npm-post-install.cjs +34 -0
  1422. package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
  1423. package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -409
  1424. package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -288
  1425. package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -495
  1426. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
  1427. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -120
  1428. package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
  1429. package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
  1430. package/analyzer-template/process/README.md +0 -507
  1431. package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
  1432. package/background/src/lib/process/ProcessManager.js.map +0 -1
  1433. package/background/src/lib/process/index.js.map +0 -1
  1434. package/background/src/lib/process/managedExecAsync.js.map +0 -1
  1435. package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
  1436. package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
  1437. package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js +0 -7
  1438. package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js.map +0 -1
  1439. package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -118
  1440. package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
  1441. package/codeyam-cli/src/commands/list.js +0 -31
  1442. package/codeyam-cli/src/commands/list.js.map +0 -1
  1443. package/codeyam-cli/src/commands/webapp-info.js +0 -146
  1444. package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
  1445. package/codeyam-cli/src/utils/universal-mocks.js +0 -152
  1446. package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
  1447. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-wXL1Z2Aq.js +0 -1
  1448. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CzGX-miz.js +0 -1
  1449. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-CXFKsCOD.js +0 -41
  1450. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-D-9pXIaY.js +0 -25
  1451. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-CBQPrpT0.js +0 -3
  1452. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-4lcOlid-.js +0 -11
  1453. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BfmDgXxG.js +0 -1
  1454. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CUxUNEEC.js +0 -15
  1455. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-6J7zDUD5.js +0 -1
  1456. package/codeyam-cli/src/webserver/build/client/assets/_index-DHImXdXq.js +0 -11
  1457. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-2mG6mjVb.js +0 -32
  1458. package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-BambyYE_.js +0 -51
  1459. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CgUsG7ib.js +0 -21
  1460. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-CKnwPCDr.js +0 -1
  1461. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DW_hdGUc.js +0 -1
  1462. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js +0 -1
  1463. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D_3ero5o.js +0 -1
  1464. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DAtOlaWE.js +0 -1
  1465. package/codeyam-cli/src/webserver/build/client/assets/files-ClR0d32A.js +0 -1
  1466. package/codeyam-cli/src/webserver/build/client/assets/git-D62Lxxmv.js +0 -15
  1467. package/codeyam-cli/src/webserver/build/client/assets/globals-C6vQASxy.css +0 -1
  1468. package/codeyam-cli/src/webserver/build/client/assets/keyAttributeCoverage-CTlFMihX.js +0 -1
  1469. package/codeyam-cli/src/webserver/build/client/assets/manifest-09d684be.js +0 -1
  1470. package/codeyam-cli/src/webserver/build/client/assets/root-BxJUvKau.js +0 -56
  1471. package/codeyam-cli/src/webserver/build/client/assets/settings-DgTyB-Wg.js +0 -1
  1472. package/codeyam-cli/src/webserver/build/client/assets/simulations-CoNWGt0K.js +0 -1
  1473. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BMIGFP-m.js +0 -1
  1474. package/codeyam-cli/src/webserver/build/client/assets/useInteractiveMode-Dk_FQqWJ.js +0 -1
  1475. package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-BqPPNjAl.js +0 -2
  1476. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DsJbgMY9.js +0 -1
  1477. package/codeyam-cli/src/webserver/build/client/assets/useToast-DWHcCcl1.js +0 -1
  1478. package/codeyam-cli/src/webserver/build/server/assets/index-CV6i1S1A.js +0 -1
  1479. package/codeyam-cli/src/webserver/build/server/assets/server-build-BDlyhfrv.js +0 -175
  1480. package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
  1481. package/codeyam-cli/templates/debug-codeyam.md +0 -620
  1482. package/packages/ai/src/lib/findMatchingAttribute.js +0 -77
  1483. package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
  1484. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -298
  1485. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
  1486. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -226
  1487. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
  1488. package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -408
  1489. package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
  1490. package/packages/ai/src/lib/isFrontend.js +0 -5
  1491. package/packages/ai/src/lib/isFrontend.js.map +0 -1
  1492. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
  1493. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
  1494. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -77
  1495. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
  1496. package/scripts/finalize-analyzer.cjs +0 -81
  1497. /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
  1498. /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
  1499. /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
  1500. /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
  1501. /package/codeyam-cli/src/webserver/build/client/assets/{api.link-scenario-value-l0sNRNKZ.js → api.agent-transcripts-l0sNRNKZ.js} +0 -0
  1502. /package/codeyam-cli/src/webserver/build/client/assets/{api.update-key-attributes-l0sNRNKZ.js → api.dev-mode-events-l0sNRNKZ.js} +0 -0
  1503. /package/codeyam-cli/src/webserver/build/client/assets/{api.update-valid-values-l0sNRNKZ.js → api.editor-audit-l0sNRNKZ.js} +0 -0
  1504. /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
  1505. /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
  1506. /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
@@ -0,0 +1,1101 @@
1
+ import http from 'http';
2
+ import net from 'net';
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import { getProjectRoot } from "../state.js";
6
+ import { createMockStateManager, } from "../utils/editorMockState.js";
7
+ import { computeEditorPorts } from "../utils/editorDevServer.js";
8
+ import { mockStateEventEmitter } from "./mockStateEvents.js";
9
+ /**
10
+ * Normalize a target URL by stripping trailing slashes for consistency.
11
+ *
12
+ * Previously this also replaced `localhost` with `127.0.0.1`, but that broke
13
+ * forwarding to dev servers that bind to IPv6 only (e.g. Vite 6 on macOS
14
+ * binds to `[::1]`). The hostname is now left as-is — `resolveLoopbackAddress`
15
+ * probes the actual target at startup to pick the right address.
16
+ */
17
+ export function normalizeTargetUrl(url) {
18
+ try {
19
+ const parsed = new URL(url);
20
+ return parsed.toString().replace(/\/$/, '');
21
+ }
22
+ catch {
23
+ return url;
24
+ }
25
+ }
26
+ /**
27
+ * Probe a localhost port to determine the correct loopback address.
28
+ * Dev servers may bind to IPv4 (127.0.0.1), IPv6 (::1), or both.
29
+ * Returns the first address that accepts a TCP connection.
30
+ */
31
+ export async function resolveLoopbackAddress(port) {
32
+ const candidates = ['127.0.0.1', '::1'];
33
+ for (const host of candidates) {
34
+ try {
35
+ const connected = await new Promise((resolve) => {
36
+ const socket = new net.Socket();
37
+ socket.setTimeout(1000);
38
+ socket.once('connect', () => {
39
+ socket.destroy();
40
+ resolve(true);
41
+ });
42
+ socket.once('error', () => {
43
+ socket.destroy();
44
+ resolve(false);
45
+ });
46
+ socket.once('timeout', () => {
47
+ socket.destroy();
48
+ resolve(false);
49
+ });
50
+ socket.connect(port, host);
51
+ });
52
+ if (connected) {
53
+ return host;
54
+ }
55
+ }
56
+ catch {
57
+ // Try next candidate
58
+ }
59
+ }
60
+ return null;
61
+ }
62
+ // Global key so the proxy survives HMR
63
+ const GLOBAL_KEY = '__codeyam_editor_proxy__';
64
+ // ─── Live Preview Health ─────────────────────────────────────────────
65
+ const PREVIEW_HEALTH_KEY = '__codeyam_preview_health__';
66
+ function getPreviewHealth() {
67
+ return globalThis[PREVIEW_HEALTH_KEY] ?? null;
68
+ }
69
+ function setPreviewHealth(report) {
70
+ globalThis[PREVIEW_HEALTH_KEY] = report;
71
+ }
72
+ /**
73
+ * Get the current live preview health report (read by API endpoint).
74
+ */
75
+ export function getPreviewHealthReport() {
76
+ return getPreviewHealth();
77
+ }
78
+ /**
79
+ * Reset preview health state (called when a new HTML page is served).
80
+ */
81
+ export function resetPreviewHealth() {
82
+ setPreviewHealth(null);
83
+ }
84
+ /**
85
+ * Error-catching script injected into HTML responses.
86
+ * Uses vanilla JS for maximum compatibility.
87
+ */
88
+ export const PREVIEW_HEALTH_SCRIPT = `<script data-codeyam-health>
89
+ (function() {
90
+ var errors = [];
91
+ var reported = false;
92
+ function report(type, msg, stack) {
93
+ errors.push({ type: type, message: msg, stack: stack, timestamp: Date.now() });
94
+ if (!reported) {
95
+ reported = true;
96
+ setTimeout(function() { flush(); }, 500);
97
+ }
98
+ }
99
+ function flush() {
100
+ fetch('/__codeyam__/preview-health', {
101
+ method: 'POST',
102
+ headers: { 'Content-Type': 'application/json' },
103
+ body: JSON.stringify({ errors: errors, url: location.href })
104
+ }).catch(function(){});
105
+ reported = false;
106
+ errors = [];
107
+ }
108
+ window.addEventListener('error', function(e) {
109
+ report('error', e.message, e.error && e.error.stack);
110
+ });
111
+ window.addEventListener('unhandledrejection', function(e) {
112
+ report('unhandledrejection', String(e.reason), e.reason && e.reason.stack);
113
+ });
114
+ var origError = console.error;
115
+ console.error = function() {
116
+ report('console.error', Array.prototype.join.call(arguments, ' '));
117
+ origError.apply(console, arguments);
118
+ };
119
+ window.addEventListener('load', function() {
120
+ setTimeout(function() {
121
+ var hasContent = document.body && document.body.innerText.trim().length > 0;
122
+ fetch('/__codeyam__/preview-health', {
123
+ method: 'POST',
124
+ headers: { 'Content-Type': 'application/json' },
125
+ body: JSON.stringify({
126
+ loaded: true,
127
+ hasContent: hasContent,
128
+ url: location.href,
129
+ errorCount: errors.length
130
+ })
131
+ }).catch(function(){});
132
+ }, 1000);
133
+ });
134
+
135
+ // Network-idle detection: notify the parent editor when all initial
136
+ // fetch requests have completed, so it can show the preview after
137
+ // client-side data (API calls) has arrived — not just when the DOM loads.
138
+ var inflight = 0;
139
+ var settled = false;
140
+ var settleTimer = null;
141
+ var origFetch = window.fetch;
142
+ window.fetch = function() {
143
+ if (!settled) inflight++;
144
+ return origFetch.apply(this, arguments).then(function(resp) {
145
+ if (!settled) { inflight--; checkSettle(); }
146
+ return resp;
147
+ }, function(err) {
148
+ if (!settled) { inflight--; checkSettle(); }
149
+ throw err;
150
+ });
151
+ };
152
+ function checkSettle() {
153
+ if (inflight <= 0 && !settled) {
154
+ clearTimeout(settleTimer);
155
+ // Small delay to allow React to re-render with the fetched data
156
+ settleTimer = setTimeout(function() {
157
+ if (inflight <= 0) {
158
+ settled = true;
159
+ try {
160
+ window.parent.postMessage({ type: 'codeyam-preview-ready' }, '*');
161
+ } catch(e) {}
162
+ }
163
+ }, 100);
164
+ }
165
+ }
166
+ // Fallback: if no fetches happen (static page), settle after load
167
+ window.addEventListener('load', function() {
168
+ setTimeout(function() { checkSettle(); }, 200);
169
+ });
170
+ })();
171
+ </script>`;
172
+ const CACHE_TTL_MS = 500;
173
+ let scenarioCache = { data: null, timestamp: 0 };
174
+ // Session config extracted from the active scenario — drives cookie injection
175
+ let sessionConfig = undefined;
176
+ /** Session cookies from the seed adapter (e.g. Supabase auth tokens). */
177
+ let seedSessionCookies = undefined;
178
+ // localStorage config extracted from the active scenario — drives HTML injection
179
+ let localStorageConfig = null;
180
+ // Active scenario ID — used to gate localStorage seeding (only re-seed on switch)
181
+ let activeScenarioId = null;
182
+ // Prototype ID — used to gate a one-time localStorage.clear() when a new project is scaffolded
183
+ let currentPrototypeId = null;
184
+ // Current scenario type — 'application'/'user' for seed-based, 'component' for mock-based
185
+ let currentScenarioType = null;
186
+ // Max body size to buffer for mock matching (10MB)
187
+ const MAX_BODY_SIZE = 10 * 1024 * 1024;
188
+ function getProxyState() {
189
+ return globalThis[GLOBAL_KEY] ?? null;
190
+ }
191
+ function setProxyState(state) {
192
+ globalThis[GLOBAL_KEY] = state;
193
+ }
194
+ /**
195
+ * Get or create the mock state manager (survives HMR via globalThis).
196
+ */
197
+ function getMockStateManager() {
198
+ const key = '__codeyam_mock_state__';
199
+ if (!globalThis[key]) {
200
+ globalThis[key] = createMockStateManager();
201
+ }
202
+ return globalThis[key];
203
+ }
204
+ /**
205
+ * Get the proxy URL if the proxy is running.
206
+ */
207
+ export function getProxyUrl() {
208
+ const state = getProxyState();
209
+ if (!state)
210
+ return null;
211
+ return `http://localhost:${state.port}`;
212
+ }
213
+ /**
214
+ * Read the active scenario's mock data from disk, with brief caching.
215
+ * Feeds the data into the MockStateManager.
216
+ *
217
+ * For application/user scenarios (type-aware): only loads `externalApis`
218
+ * into the mock state manager. All DB-backed routes flow through to the
219
+ * real app (database is seeded with real data).
220
+ *
221
+ * For component scenarios (or legacy): loads all routes as before.
222
+ */
223
+ function readScenarioData() {
224
+ const now = Date.now();
225
+ if (scenarioCache.data !== null &&
226
+ now - scenarioCache.timestamp < CACHE_TTL_MS) {
227
+ return scenarioCache.data;
228
+ }
229
+ const projectRoot = getProjectRoot() || process.env.CODEYAM_ROOT_PATH || process.cwd();
230
+ const activeScenarioPath = path.join(projectRoot, '.codeyam', 'active-scenario.json');
231
+ try {
232
+ if (!fs.existsSync(activeScenarioPath)) {
233
+ scenarioCache = { data: null, timestamp: now };
234
+ return null;
235
+ }
236
+ const active = JSON.parse(fs.readFileSync(activeScenarioPath, 'utf-8'));
237
+ const scenarioId = active.scenarioId;
238
+ if (!scenarioId) {
239
+ // No active scenario — but may have a prototypeId for localStorage clearing
240
+ currentPrototypeId = active.prototypeId || null;
241
+ scenarioCache = { data: null, timestamp: now };
242
+ return null;
243
+ }
244
+ const dataFilePath = path.join(projectRoot, '.codeyam', 'editor-scenarios', `${scenarioId}.json`);
245
+ if (!fs.existsSync(dataFilePath)) {
246
+ console.log(`[editorProxy] Scenario data file not found: ${dataFilePath}`);
247
+ scenarioCache = { data: null, timestamp: now };
248
+ return null;
249
+ }
250
+ const rawData = JSON.parse(fs.readFileSync(dataFilePath, 'utf-8'));
251
+ // Extract session config for cookie injection
252
+ sessionConfig = rawData.session || null;
253
+ // Extract seed adapter session cookies (e.g. Supabase auth)
254
+ seedSessionCookies = rawData.sessionCookies || undefined;
255
+ // Extract localStorage config for HTML injection
256
+ localStorageConfig = rawData.localStorage || null;
257
+ activeScenarioId = scenarioId;
258
+ // Type-aware: for seed-based scenarios, only serve externalApis via proxy
259
+ const scenarioType = active.type || rawData.type || null;
260
+ currentScenarioType = scenarioType;
261
+ let mockData;
262
+ if ((scenarioType === 'application' || scenarioType === 'user') &&
263
+ rawData.seed) {
264
+ // Seed-based scenario: only load externalApis as routes for the proxy
265
+ if (rawData.externalApis && typeof rawData.externalApis === 'object') {
266
+ mockData = { routes: rawData.externalApis };
267
+ }
268
+ else {
269
+ // No external APIs — proxy passes everything through
270
+ mockData = {};
271
+ }
272
+ }
273
+ else {
274
+ // Component/legacy scenario: load all data
275
+ mockData = rawData;
276
+ }
277
+ scenarioCache = { data: mockData, timestamp: now };
278
+ // Feed into mock state manager (smart reload handles dedup)
279
+ getMockStateManager().loadScenario(mockData);
280
+ return mockData;
281
+ }
282
+ catch (err) {
283
+ console.warn('[editorProxy] Error reading scenario data:', err);
284
+ scenarioCache = { data: null, timestamp: now };
285
+ return null;
286
+ }
287
+ }
288
+ /**
289
+ * Buffer the request body, up to MAX_BODY_SIZE.
290
+ * Returns null if the body exceeds the limit.
291
+ */
292
+ function bufferRequestBody(req) {
293
+ return new Promise((resolve) => {
294
+ const chunks = [];
295
+ let totalSize = 0;
296
+ req.on('data', (chunk) => {
297
+ totalSize += chunk.length;
298
+ if (totalSize > MAX_BODY_SIZE) {
299
+ resolve(null); // Too large — skip mock matching
300
+ req.resume(); // Drain remaining
301
+ }
302
+ else {
303
+ chunks.push(chunk);
304
+ }
305
+ });
306
+ req.on('end', () => {
307
+ if (totalSize > MAX_BODY_SIZE)
308
+ return; // Already resolved
309
+ resolve(Buffer.concat(chunks));
310
+ });
311
+ req.on('error', () => {
312
+ resolve(null);
313
+ });
314
+ });
315
+ }
316
+ /**
317
+ * Strip IPv6 bracket notation for use with http.request hostname.
318
+ * URL.hostname returns `[::1]` for IPv6 but http.request needs `::1`.
319
+ */
320
+ function stripIPv6Brackets(hostname) {
321
+ if (hostname.startsWith('[') && hostname.endsWith(']')) {
322
+ return hostname.slice(1, -1);
323
+ }
324
+ return hostname;
325
+ }
326
+ /**
327
+ * Forward a buffered request to the target dev server.
328
+ * Unlike the streaming forwardRequest, this replays a buffered body.
329
+ */
330
+ function forwardBufferedRequest(req, res, targetUrl, bodyBuffer) {
331
+ const target = new URL(targetUrl);
332
+ const hostname = stripIPv6Brackets(target.hostname);
333
+ const headers = { ...req.headers, host: `${target.hostname}:${target.port}` };
334
+ // Remove accept-encoding so the dev server returns uncompressed responses.
335
+ // The proxy injects a health script into HTML — this fails on compressed bodies.
336
+ delete headers['accept-encoding'];
337
+ // Inject session cookies into the request so the dev server sees auth
338
+ // on the first request after a scenario switch (before the browser has
339
+ // stored them from Set-Cookie responses).
340
+ injectRequestCookies(headers);
341
+ // Update content-length if we have the body buffer
342
+ if (bodyBuffer) {
343
+ headers['content-length'] = String(bodyBuffer.length);
344
+ }
345
+ const options = {
346
+ hostname,
347
+ port: target.port,
348
+ path: req.url,
349
+ method: req.method,
350
+ headers,
351
+ };
352
+ const proxyReq = http.request(options, (proxyRes) => {
353
+ const status = proxyRes.statusCode || 200;
354
+ if (status >= 300 && status < 400) {
355
+ console.log(`[editorProxy] Target redirect ${status} for ${req.method} ${req.url} → ${proxyRes.headers.location}`);
356
+ }
357
+ if (status >= 400) {
358
+ console.warn(`[editorProxy] Target returned ${status} for ${req.method} ${req.url}`);
359
+ }
360
+ const headers = { ...proxyRes.headers };
361
+ injectSessionCookie(headers);
362
+ // Check if response is HTML — if so, buffer and inject health script
363
+ const contentType = proxyRes.headers['content-type'] || '';
364
+ if (contentType.includes('text/html')) {
365
+ resetPreviewHealth();
366
+ const chunks = [];
367
+ proxyRes.on('data', (chunk) => chunks.push(chunk));
368
+ proxyRes.on('end', () => {
369
+ const body = Buffer.concat(chunks).toString('utf-8');
370
+ const lsScript = buildLocalStorageScript(localStorageConfig, activeScenarioId || '', currentPrototypeId);
371
+ const injected = injectHealthScript(body, lsScript);
372
+ delete headers['content-length'];
373
+ delete headers['content-encoding'];
374
+ // Prevent browser from caching HTML responses — scenario switches
375
+ // serve different content from the same URL (seed data changes the
376
+ // rendered page but the proxy URL stays the same).
377
+ headers['cache-control'] = 'no-store, must-revalidate';
378
+ res.writeHead(status, headers);
379
+ res.end(injected);
380
+ });
381
+ return;
382
+ }
383
+ res.writeHead(status, headers);
384
+ proxyRes.pipe(res, { end: true });
385
+ });
386
+ proxyReq.on('error', (err) => {
387
+ console.warn(`[editorProxy] Forward error for ${req.method} ${req.url}: ${err.message}`);
388
+ if (!res.headersSent) {
389
+ res.writeHead(502, { 'Content-Type': 'text/plain' });
390
+ res.end('Bad Gateway — dev server unreachable');
391
+ }
392
+ });
393
+ if (bodyBuffer && bodyBuffer.length > 0) {
394
+ proxyReq.end(bodyBuffer);
395
+ }
396
+ else {
397
+ proxyReq.end();
398
+ }
399
+ }
400
+ /**
401
+ * Forward an HTTP request to the target dev server.
402
+ * For HTML responses: buffers body to inject health-check script.
403
+ * For non-HTML responses: pipes directly (no buffering).
404
+ */
405
+ function forwardRequest(req, res, targetUrl) {
406
+ const target = new URL(targetUrl);
407
+ const hostname = stripIPv6Brackets(target.hostname);
408
+ // Build headers, stripping accept-encoding so the dev server returns uncompressed
409
+ // responses. The proxy injects a health script into HTML — this fails on compressed bodies.
410
+ const { 'accept-encoding': _ae, ...forwardHeaders } = req.headers;
411
+ const reqHeaders = {
412
+ ...forwardHeaders,
413
+ host: `${target.hostname}:${target.port}`,
414
+ };
415
+ // Inject session cookies into the request so the dev server sees auth
416
+ // on the first request after a scenario switch.
417
+ injectRequestCookies(reqHeaders);
418
+ const options = {
419
+ hostname,
420
+ port: target.port,
421
+ path: req.url,
422
+ method: req.method,
423
+ headers: reqHeaders,
424
+ };
425
+ const proxyReq = http.request(options, (proxyRes) => {
426
+ const status = proxyRes.statusCode || 200;
427
+ if (status >= 300 && status < 400) {
428
+ console.log(`[editorProxy] Target redirect ${status} for ${req.method} ${req.url} → ${proxyRes.headers.location}`);
429
+ }
430
+ if (status >= 400) {
431
+ console.warn(`[editorProxy] Target returned ${status} for ${req.method} ${req.url}`);
432
+ }
433
+ const headers = { ...proxyRes.headers };
434
+ injectSessionCookie(headers);
435
+ // Check if response is HTML — if so, buffer and inject health script
436
+ const contentType = proxyRes.headers['content-type'] || '';
437
+ if (contentType.includes('text/html')) {
438
+ // Reset health state for new page loads
439
+ resetPreviewHealth();
440
+ const chunks = [];
441
+ proxyRes.on('data', (chunk) => chunks.push(chunk));
442
+ proxyRes.on('end', () => {
443
+ const body = Buffer.concat(chunks).toString('utf-8');
444
+ const lsScript = buildLocalStorageScript(localStorageConfig, activeScenarioId || '', currentPrototypeId);
445
+ const injected = injectHealthScript(body, lsScript);
446
+ // Remove content-length since body size changed; use chunked transfer
447
+ delete headers['content-length'];
448
+ // Remove content-encoding since we're serving uncompressed
449
+ delete headers['content-encoding'];
450
+ // Prevent browser from caching HTML responses — scenario switches
451
+ // serve different content from the same URL (seed data changes the
452
+ // rendered page but the proxy URL stays the same).
453
+ headers['cache-control'] = 'no-store, must-revalidate';
454
+ res.writeHead(status, headers);
455
+ res.end(injected);
456
+ });
457
+ return;
458
+ }
459
+ res.writeHead(status, headers);
460
+ proxyRes.pipe(res, { end: true });
461
+ });
462
+ proxyReq.on('error', (err) => {
463
+ console.warn(`[editorProxy] Forward error for ${req.method} ${req.url}: ${err.message}`);
464
+ if (!res.headersSent) {
465
+ res.writeHead(502, { 'Content-Type': 'text/plain' });
466
+ res.end('Bad Gateway — dev server unreachable');
467
+ }
468
+ });
469
+ req.pipe(proxyReq, { end: true });
470
+ }
471
+ /**
472
+ * Inject or clear the session-token cookie on proxied responses.
473
+ * When a scenario has session.cookieValue, sets the cookie to auto-log the user in.
474
+ * When a scenario has no session field (null), clears any existing session cookie.
475
+ * When sessionConfig is undefined (no scenario loaded yet), does nothing.
476
+ */
477
+ function injectSessionCookie(headers) {
478
+ const cookies = [];
479
+ // Dev auth cookie (built-in session-token)
480
+ if (sessionConfig !== undefined) {
481
+ if (sessionConfig?.cookieValue) {
482
+ cookies.push(`session-token=${sessionConfig.cookieValue}; Path=/; SameSite=Lax`);
483
+ }
484
+ else {
485
+ cookies.push(`session-token=; Path=/; Max-Age=0`);
486
+ }
487
+ }
488
+ // Seed adapter session cookies (e.g. Supabase auth tokens)
489
+ if (seedSessionCookies && seedSessionCookies.length > 0) {
490
+ for (const sc of seedSessionCookies) {
491
+ const cookiePath = sc.path || '/';
492
+ const sameSite = sc.sameSite || 'Lax';
493
+ cookies.push(`${sc.name}=${sc.value}; Path=${cookiePath}; SameSite=${sameSite}`);
494
+ }
495
+ }
496
+ if (cookies.length === 0)
497
+ return;
498
+ const existing = headers['set-cookie'];
499
+ if (existing) {
500
+ headers['set-cookie'] = [
501
+ ...(Array.isArray(existing) ? existing : [existing]),
502
+ ...cookies,
503
+ ];
504
+ }
505
+ else {
506
+ headers['set-cookie'] = cookies;
507
+ }
508
+ }
509
+ /**
510
+ * Get session cookies that should be injected into requests forwarded to the
511
+ * dev server. Returns an array of {name, value} pairs, or null if no session
512
+ * cookies are configured.
513
+ *
514
+ * This is the counterpart to `injectSessionCookie()` (which adds Set-Cookie
515
+ * to responses). Without request-side injection, the first request after a
516
+ * scenario switch has no cookies — the dev server's auth middleware sees no
517
+ * session and redirects to the login page before the browser ever receives
518
+ * the Set-Cookie response.
519
+ */
520
+ export function getRequestCookieInjection() {
521
+ const cookies = [];
522
+ if (sessionConfig?.cookieValue) {
523
+ cookies.push({ name: 'session-token', value: sessionConfig.cookieValue });
524
+ }
525
+ if (seedSessionCookies && seedSessionCookies.length > 0) {
526
+ for (const sc of seedSessionCookies) {
527
+ cookies.push({ name: sc.name, value: sc.value });
528
+ }
529
+ }
530
+ return cookies.length > 0 ? cookies : null;
531
+ }
532
+ /**
533
+ * Inject session cookies into the request's Cookie header before forwarding
534
+ * to the dev server. This ensures the dev server sees auth cookies on the
535
+ * very first request after a scenario switch (before the browser has stored
536
+ * them from Set-Cookie responses).
537
+ */
538
+ function injectRequestCookies(headers) {
539
+ const injection = getRequestCookieInjection();
540
+ if (!injection)
541
+ return;
542
+ // Parse existing cookies from the request
543
+ const existing = typeof headers.cookie === 'string' ? headers.cookie : '';
544
+ const existingPairs = existing
545
+ ? existing.split(';').map((s) => s.trim())
546
+ : [];
547
+ // Build a map of existing cookies for deduplication
548
+ const cookieMap = new Map();
549
+ for (const pair of existingPairs) {
550
+ const eqIdx = pair.indexOf('=');
551
+ if (eqIdx !== -1) {
552
+ cookieMap.set(pair.slice(0, eqIdx), pair.slice(eqIdx + 1));
553
+ }
554
+ }
555
+ // Override with injected cookies
556
+ for (const { name, value } of injection) {
557
+ cookieMap.set(name, value);
558
+ }
559
+ // Reassemble
560
+ const parts = [];
561
+ for (const [k, v] of cookieMap) {
562
+ parts.push(`${k}=${v}`);
563
+ }
564
+ if (parts.length > 0) {
565
+ headers.cookie = parts.join('; ');
566
+ }
567
+ }
568
+ /**
569
+ * Get the current session config (for testing).
570
+ */
571
+ export function getSessionConfig() {
572
+ return sessionConfig;
573
+ }
574
+ /**
575
+ * Get the current localStorage config (for testing and script generation).
576
+ */
577
+ export function getLocalStorageConfig() {
578
+ return localStorageConfig;
579
+ }
580
+ /**
581
+ * Get the active scenario ID (for testing and script generation).
582
+ */
583
+ export function getActiveScenarioId() {
584
+ return activeScenarioId;
585
+ }
586
+ /**
587
+ * Get the current prototype ID (for testing).
588
+ */
589
+ export function getCurrentPrototypeId() {
590
+ return currentPrototypeId;
591
+ }
592
+ /**
593
+ * Simple djb2 hash — fast, deterministic, good enough for cache busting.
594
+ * Not cryptographic — just detects when localStorage config content changes.
595
+ */
596
+ function simpleHash(str) {
597
+ let hash = 5381;
598
+ for (let i = 0; i < str.length; i++) {
599
+ hash = ((hash << 5) + hash + str.charCodeAt(i)) | 0;
600
+ }
601
+ return (hash >>> 0).toString(36);
602
+ }
603
+ /**
604
+ * Build a script tag that seeds localStorage with scenario data on first load.
605
+ * Gated by scenario ID — only seeds when the scenario changes, preserving
606
+ * interactive modifications across page reloads / HMR.
607
+ *
608
+ * Returns empty string if no localStorage config is provided.
609
+ */
610
+ export function buildLocalStorageScript(localStorageConfig, scenarioId, prototypeId) {
611
+ // null/undefined means no localStorage config at all — clean up keys
612
+ // that were set by a previous scenario so stale filter/sort state
613
+ // doesn't bleed through and hide data in the new scenario.
614
+ if (!localStorageConfig || typeof localStorageConfig !== 'object') {
615
+ // Always clean up previous scenario's keys, gated by scenarioId
616
+ // so it only runs once per switch (not on every HMR reload).
617
+ const guardValue = scenarioId ? `clear:${scenarioId}` : '';
618
+ if (prototypeId) {
619
+ return `<script data-codeyam-ls>
620
+ (function() {
621
+ if (localStorage.getItem('__codeyam_proto__') === ${JSON.stringify(prototypeId)}) return;
622
+ localStorage.clear();
623
+ localStorage.setItem('__codeyam_proto__', ${JSON.stringify(prototypeId)});
624
+ })();
625
+ </script>`;
626
+ }
627
+ if (scenarioId) {
628
+ // No prototypeId but we do have a scenarioId — clean up keys
629
+ // from the previous scenario without doing a full clear.
630
+ return `<script data-codeyam-ls>
631
+ (function() {
632
+ if (localStorage.getItem('__codeyam_ls_sid__') === ${JSON.stringify(guardValue)}) return;
633
+ var prev = JSON.parse(localStorage.getItem('__codeyam_ls_keys__') || '[]');
634
+ for (var i = 0; i < prev.length; i++) localStorage.removeItem(prev[i]);
635
+ localStorage.removeItem('__codeyam_ls_keys__');
636
+ localStorage.setItem('__codeyam_ls_sid__', ${JSON.stringify(guardValue)});
637
+ })();
638
+ </script>`;
639
+ }
640
+ return '';
641
+ }
642
+ // Even an empty object needs a cleanup script — switching from a scenario
643
+ // with localStorage data to one without must clear the previous keys.
644
+ const entries = Object.entries(localStorageConfig);
645
+ const keys = entries.map(([k]) => k);
646
+ // Build setItem calls — stringify non-string values
647
+ const setStatements = entries
648
+ .map(([key, value]) => {
649
+ const serialized = typeof value === 'string' ? value : JSON.stringify(value);
650
+ return `localStorage.setItem(${JSON.stringify(key)}, ${JSON.stringify(serialized)});`;
651
+ })
652
+ .join('\n');
653
+ // Guard value includes a content hash so re-registering a scenario with
654
+ // updated data (same ID, different content) busts the cache. Without this,
655
+ // the browser skips re-seeding because the scenario ID hasn't changed,
656
+ // causing stale data in the live preview while screenshots show fresh data.
657
+ const contentHash = simpleHash(JSON.stringify(localStorageConfig));
658
+ const guardValue = `${scenarioId}:${contentHash}`;
659
+ return (`<script data-codeyam-ls>
660
+ (function() {
661
+ if (localStorage.getItem('__codeyam_ls_sid__') === ${JSON.stringify(guardValue)}) return;
662
+ var prev = JSON.parse(localStorage.getItem('__codeyam_ls_keys__') || '[]');
663
+ for (var i = 0; i < prev.length; i++) localStorage.removeItem(prev[i]);
664
+ ${setStatements}
665
+ localStorage.setItem('__codeyam_ls_keys__', ${JSON.stringify(JSON.stringify(keys))});
666
+ localStorage.setItem('__codeyam_ls_sid__', ${JSON.stringify(guardValue)});
667
+ })();
668
+ </script>` + buildLocalStorageWatcherScript());
669
+ }
670
+ /**
671
+ * Build a script that watches for localStorage mutations and notifies the parent
672
+ * frame via postMessage. Also responds to `codeyam-get-localstorage` requests so
673
+ * the editor can read the current localStorage state when saving.
674
+ */
675
+ function buildLocalStorageWatcherScript() {
676
+ return `<script data-codeyam-ls-watcher>
677
+ (function() {
678
+ if (window.__codeyam_ls_watcher_installed__) return;
679
+ window.__codeyam_ls_watcher_installed__ = true;
680
+
681
+ var origSet = localStorage.setItem.bind(localStorage);
682
+ var origRemove = localStorage.removeItem.bind(localStorage);
683
+ var origClear = localStorage.clear.bind(localStorage);
684
+ window.__codeyam_orig_setItem__ = origSet;
685
+ window.__codeyam_orig_removeItem__ = origRemove;
686
+ window.__codeyam_orig_clear__ = origClear;
687
+
688
+ function isInternal(key) {
689
+ return typeof key === 'string' && key.indexOf('__codeyam_') === 0;
690
+ }
691
+
692
+ localStorage.setItem = function(key, value) {
693
+ origSet(key, value);
694
+ if (!isInternal(key) && window.parent !== window) {
695
+ window.parent.postMessage({ type: 'codeyam-localstorage-changed', action: 'set', key: key }, '*');
696
+ }
697
+ };
698
+
699
+ localStorage.removeItem = function(key) {
700
+ origRemove(key);
701
+ if (!isInternal(key) && window.parent !== window) {
702
+ window.parent.postMessage({ type: 'codeyam-localstorage-changed', action: 'remove', key: key }, '*');
703
+ }
704
+ };
705
+
706
+ localStorage.clear = function() {
707
+ origClear();
708
+ if (window.parent !== window) {
709
+ window.parent.postMessage({ type: 'codeyam-localstorage-changed', action: 'clear' }, '*');
710
+ }
711
+ };
712
+
713
+ window.addEventListener('message', function(event) {
714
+ if (event.data && event.data.type === 'codeyam-get-localstorage') {
715
+ var data = {};
716
+ for (var i = 0; i < localStorage.length; i++) {
717
+ var k = localStorage.key(i);
718
+ if (k && !isInternal(k)) {
719
+ data[k] = localStorage.getItem(k);
720
+ }
721
+ }
722
+ event.source.postMessage({ type: 'codeyam-localstorage-state', data: data }, '*');
723
+ }
724
+ });
725
+ })();
726
+ </script>`;
727
+ }
728
+ /**
729
+ * Inject the health-check script (and optional localStorage script) into an HTML response body.
730
+ * Inserts before </head> if present, otherwise before </body>, otherwise appends.
731
+ * When a localStorageScript is provided, it's injected BEFORE the health script
732
+ * so localStorage is populated before the app loads.
733
+ */
734
+ export function injectHealthScript(html, localStorageScript) {
735
+ const scripts = (localStorageScript || '') + PREVIEW_HEALTH_SCRIPT;
736
+ if (html.includes('</head>')) {
737
+ return html.replace('</head>', scripts + '</head>');
738
+ }
739
+ if (html.includes('</body>')) {
740
+ return html.replace('</body>', scripts + '</body>');
741
+ }
742
+ return html + scripts;
743
+ }
744
+ /**
745
+ * Handle POST /__codeyam__/preview-health — store health data in globalThis.
746
+ */
747
+ function handlePreviewHealthPost(req, res) {
748
+ const chunks = [];
749
+ req.on('data', (chunk) => chunks.push(chunk));
750
+ req.on('end', () => {
751
+ try {
752
+ const body = JSON.parse(Buffer.concat(chunks).toString('utf-8'));
753
+ const current = getPreviewHealth() || {
754
+ errors: [],
755
+ loaded: false,
756
+ hasContent: false,
757
+ url: '',
758
+ lastUpdated: 0,
759
+ };
760
+ if (body.errors && Array.isArray(body.errors)) {
761
+ current.errors = current.errors.concat(body.errors);
762
+ }
763
+ if (body.loaded !== undefined) {
764
+ current.loaded = body.loaded;
765
+ }
766
+ if (body.hasContent !== undefined) {
767
+ current.hasContent = body.hasContent;
768
+ }
769
+ if (body.url) {
770
+ current.url = body.url;
771
+ }
772
+ current.lastUpdated = Date.now();
773
+ setPreviewHealth(current);
774
+ }
775
+ catch {
776
+ // Ignore malformed JSON
777
+ }
778
+ res.writeHead(204);
779
+ res.end();
780
+ });
781
+ }
782
+ /**
783
+ * Handle WebSocket upgrade by piping to the target dev server.
784
+ */
785
+ function handleUpgrade(req, socket, head, targetUrl) {
786
+ const target = new URL(targetUrl);
787
+ const hostname = stripIPv6Brackets(target.hostname);
788
+ const port = parseInt(target.port, 10) || 80;
789
+ console.log(`[editorProxy] WebSocket upgrade: ${req.url} → ${hostname}:${port}`);
790
+ const proxySocket = net.connect(port, hostname, () => {
791
+ // Reconstruct the HTTP upgrade request
792
+ const requestLine = `${req.method} ${req.url} HTTP/${req.httpVersion}\r\n`;
793
+ const headers = Object.entries(req.headers)
794
+ .filter(([, v]) => v != null)
795
+ .map(([k, v]) => `${k}: ${Array.isArray(v) ? v.join(', ') : v}`)
796
+ .join('\r\n');
797
+ proxySocket.write(requestLine + headers + '\r\n\r\n');
798
+ if (head.length > 0) {
799
+ proxySocket.write(head);
800
+ }
801
+ // Pipe both directions
802
+ proxySocket.pipe(socket, { end: true });
803
+ socket.pipe(proxySocket, { end: true });
804
+ });
805
+ proxySocket.on('error', (err) => {
806
+ console.warn(`[editorProxy] WebSocket proxy error: ${err.message}`);
807
+ socket.destroy();
808
+ });
809
+ socket.on('error', () => {
810
+ proxySocket.destroy();
811
+ });
812
+ }
813
+ /**
814
+ * Write proxy-config.json so the preload module can discover the proxy.
815
+ */
816
+ function writeProxyConfig(proxyPort, targetUrl) {
817
+ const projectRoot = getProjectRoot() || process.env.CODEYAM_ROOT_PATH || process.cwd();
818
+ const configPath = path.join(projectRoot, '.codeyam', 'proxy-config.json');
819
+ try {
820
+ fs.mkdirSync(path.dirname(configPath), { recursive: true });
821
+ fs.writeFileSync(configPath, JSON.stringify({
822
+ proxyUrl: `http://localhost:${proxyPort}`,
823
+ devServerUrl: targetUrl,
824
+ }), 'utf-8');
825
+ console.log(`[editorProxy] Wrote proxy config to ${configPath}`);
826
+ }
827
+ catch (err) {
828
+ console.warn('[editorProxy] Failed to write proxy-config.json:', err);
829
+ }
830
+ }
831
+ /**
832
+ * Remove proxy-config.json on proxy stop.
833
+ */
834
+ function removeProxyConfig() {
835
+ const projectRoot = getProjectRoot() || process.env.CODEYAM_ROOT_PATH || process.cwd();
836
+ const configPath = path.join(projectRoot, '.codeyam', 'proxy-config.json');
837
+ try {
838
+ if (fs.existsSync(configPath)) {
839
+ fs.unlinkSync(configPath);
840
+ }
841
+ }
842
+ catch {
843
+ // Best effort
844
+ }
845
+ }
846
+ /**
847
+ * Start the editor proxy server.
848
+ * Intercepts requests to API routes matching the active scenario, forwards everything else.
849
+ * Supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) with body buffering.
850
+ */
851
+ export async function startEditorProxy(options) {
852
+ // If proxy is already running, reuse it (prevents second tab from killing first tab's proxy)
853
+ const existing = getProxyState();
854
+ if (existing) {
855
+ console.log(`[editorProxy] Proxy already running on port ${existing.port} → ${existing.targetUrl}`);
856
+ return { port: existing.port };
857
+ }
858
+ // Stop any leftover state (shouldn't happen, but defensive)
859
+ await stopEditorProxy();
860
+ let targetUrl = normalizeTargetUrl(options.targetUrl);
861
+ let port = options.port;
862
+ // When the target is localhost, probe to find the correct loopback address.
863
+ // Dev servers may bind to IPv4 (127.0.0.1) or IPv6 (::1) — Vite 6 on macOS
864
+ // binds to ::1 by default. We need to match the actual binding.
865
+ try {
866
+ const parsed = new URL(targetUrl);
867
+ if (parsed.hostname === 'localhost') {
868
+ const targetPort = parseInt(parsed.port || '80', 10);
869
+ const resolvedHost = await resolveLoopbackAddress(targetPort);
870
+ if (resolvedHost) {
871
+ parsed.hostname = resolvedHost;
872
+ targetUrl = parsed.toString().replace(/\/$/, '');
873
+ console.log(`[editorProxy] Resolved localhost to ${resolvedHost} for port ${targetPort}`);
874
+ }
875
+ }
876
+ }
877
+ catch {
878
+ // Keep original targetUrl
879
+ }
880
+ console.log(`[editorProxy] Starting proxy (requested port ${port}, target ${targetUrl})`);
881
+ const mockState = getMockStateManager();
882
+ const server = http.createServer((req, res) => {
883
+ void (async () => {
884
+ const parsedUrl = new URL(req.url || '/', `http://localhost:${port}`);
885
+ const pathname = parsedUrl.pathname;
886
+ const method = req.method || 'GET';
887
+ // CORS preflight — permissive 204 for browser cross-origin requests
888
+ if (method === 'OPTIONS') {
889
+ res.writeHead(204, {
890
+ 'Access-Control-Allow-Origin': '*',
891
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
892
+ 'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-Requested-With',
893
+ 'Access-Control-Max-Age': '86400',
894
+ });
895
+ res.end();
896
+ return;
897
+ }
898
+ // Intercept preview health reports from the injected script
899
+ if (method === 'POST' && pathname === '/__codeyam__/preview-health') {
900
+ handlePreviewHealthPost(req, res);
901
+ return;
902
+ }
903
+ // Load scenario data (also feeds MockStateManager)
904
+ readScenarioData();
905
+ // For methods that may carry a body, buffer it first
906
+ const needsBody = method === 'POST' ||
907
+ method === 'PUT' ||
908
+ method === 'DELETE' ||
909
+ method === 'PATCH';
910
+ if (needsBody) {
911
+ const bodyBuffer = await bufferRequestBody(req);
912
+ if (bodyBuffer === null) {
913
+ // Body too large — forward without mock matching
914
+ forwardBufferedRequest(req, res, targetUrl, null);
915
+ return;
916
+ }
917
+ // Try to parse body as JSON for mock matching
918
+ let parsedBody = undefined;
919
+ if (bodyBuffer.length > 0) {
920
+ try {
921
+ parsedBody = JSON.parse(bodyBuffer.toString('utf-8'));
922
+ }
923
+ catch {
924
+ // Not JSON — that's fine, still try mock matching without parsed body
925
+ }
926
+ }
927
+ const match = mockState.matchRequest(method, pathname, parsedBody);
928
+ if (match) {
929
+ console.log(`[editorProxy] Intercepted ${method} ${pathname} → mock response (status ${match.status})`);
930
+ res.writeHead(match.status, {
931
+ 'Content-Type': 'application/json',
932
+ 'Access-Control-Allow-Origin': '*',
933
+ 'X-CodeYam-Proxy': 'scenario-data',
934
+ 'Cache-Control': 'no-store',
935
+ });
936
+ res.end(match.body != null ? JSON.stringify(match.body) : '');
937
+ return;
938
+ }
939
+ // No mock match — forward with buffered body
940
+ if ((currentScenarioType === 'application' ||
941
+ currentScenarioType === 'user') &&
942
+ pathname.startsWith('/api/')) {
943
+ mockStateEventEmitter.emitDataMutationForwarded(method, pathname);
944
+ }
945
+ forwardBufferedRequest(req, res, targetUrl, bodyBuffer);
946
+ return;
947
+ }
948
+ // GET, HEAD, etc. — try mock matching (no body)
949
+ const match = mockState.matchRequest(method, pathname);
950
+ if (match) {
951
+ console.log(`[editorProxy] Intercepted ${method} ${pathname} → mock response (status ${match.status})`);
952
+ res.writeHead(match.status, {
953
+ 'Content-Type': 'application/json',
954
+ 'Access-Control-Allow-Origin': '*',
955
+ 'X-CodeYam-Proxy': 'scenario-data',
956
+ 'Cache-Control': 'no-store',
957
+ });
958
+ res.end(match.body != null ? JSON.stringify(match.body) : '');
959
+ return;
960
+ }
961
+ // Forward everything else to the dev server
962
+ forwardRequest(req, res, targetUrl);
963
+ })();
964
+ });
965
+ // Handle WebSocket upgrades (for HMR)
966
+ server.on('upgrade', (req, socket, head) => {
967
+ handleUpgrade(req, socket, head, targetUrl);
968
+ });
969
+ // Try to bind, with port fallback
970
+ const maxAttempts = 10;
971
+ for (let attempt = 0; attempt < maxAttempts; attempt++) {
972
+ const currentPort = port + attempt;
973
+ try {
974
+ await new Promise((resolve, reject) => {
975
+ server.once('error', reject);
976
+ server.listen(currentPort, '0.0.0.0', () => {
977
+ server.removeListener('error', reject);
978
+ resolve();
979
+ });
980
+ });
981
+ // When port 0 is requested, the OS assigns an ephemeral port
982
+ const addr = server.address();
983
+ port =
984
+ typeof addr === 'object' && addr !== null ? addr.port : currentPort;
985
+ const state = { server, port, targetUrl };
986
+ setProxyState(state);
987
+ // Write proxy-config.json for the preload module
988
+ writeProxyConfig(port, targetUrl);
989
+ console.log(`[editorProxy] Proxy started on port ${port}, forwarding to ${targetUrl}`);
990
+ return { port };
991
+ }
992
+ catch (err) {
993
+ if (err?.code === 'EADDRINUSE' && attempt < maxAttempts - 1) {
994
+ console.log(`[editorProxy] Port ${currentPort} in use, trying ${currentPort + 1}`);
995
+ continue;
996
+ }
997
+ console.error(`[editorProxy] Failed to start proxy:`, err);
998
+ return null;
999
+ }
1000
+ }
1001
+ return null;
1002
+ }
1003
+ /**
1004
+ * Stop the editor proxy server.
1005
+ */
1006
+ export async function stopEditorProxy() {
1007
+ const state = getProxyState();
1008
+ if (!state)
1009
+ return;
1010
+ console.log(`[editorProxy] Stopping proxy on port ${state.port}`);
1011
+ removeProxyConfig();
1012
+ return new Promise((resolve) => {
1013
+ state.server.close(() => {
1014
+ console.log('[editorProxy] Proxy stopped');
1015
+ resolve();
1016
+ });
1017
+ setProxyState(null);
1018
+ // Force-close after 2s if graceful close doesn't happen
1019
+ setTimeout(resolve, 2000);
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Invalidate the scenario data cache (e.g., after writing a new active-scenario.json).
1024
+ */
1025
+ export function invalidateScenarioCache() {
1026
+ scenarioCache = { data: null, timestamp: 0 };
1027
+ sessionConfig = undefined;
1028
+ seedSessionCookies = undefined;
1029
+ localStorageConfig = null;
1030
+ activeScenarioId = null;
1031
+ currentPrototypeId = null;
1032
+ }
1033
+ /**
1034
+ * Verify that the proxy can successfully forward a request to the target dev server.
1035
+ * Makes a HEAD request through the proxy and checks that it gets a response (any status).
1036
+ * Returns false if the proxy isn't running or if the request fails entirely.
1037
+ */
1038
+ export async function verifyProxyForwarding() {
1039
+ const state = getProxyState();
1040
+ if (!state) {
1041
+ console.warn('[editorProxy] Cannot verify — proxy is not running');
1042
+ return false;
1043
+ }
1044
+ try {
1045
+ const response = await fetch(`http://127.0.0.1:${state.port}/`, {
1046
+ method: 'HEAD',
1047
+ signal: AbortSignal.timeout(5000),
1048
+ });
1049
+ // Any response from the target (even 404) means forwarding works.
1050
+ // Only 502 (our own Bad Gateway) means the target is unreachable.
1051
+ if (response.status === 502) {
1052
+ console.warn(`[editorProxy] Verification failed — proxy returned 502 (target unreachable)`);
1053
+ return false;
1054
+ }
1055
+ console.log(`[editorProxy] Verification passed — proxy forwarding to ${state.targetUrl} (status ${response.status})`);
1056
+ return true;
1057
+ }
1058
+ catch (err) {
1059
+ console.warn(`[editorProxy] Verification failed — could not reach proxy on port ${state.port}`);
1060
+ return false;
1061
+ }
1062
+ }
1063
+ /**
1064
+ * Ensure the proxy is running. If it's not, start it using the current dev server URL.
1065
+ * Returns the proxy URL once ready, or null if it can't be started.
1066
+ *
1067
+ * Used by capture flows to guarantee the proxy is listening before Playwright navigates.
1068
+ */
1069
+ export async function ensureProxyRunning() {
1070
+ // Already running?
1071
+ const existing = getProxyUrl();
1072
+ if (existing) {
1073
+ console.log(`[editorProxy] Proxy already running at ${existing}`);
1074
+ return existing;
1075
+ }
1076
+ // Try to start it — we need the dev server URL
1077
+ const devServer = globalThis.__codeyam_editor_dev_server__;
1078
+ if (!devServer || devServer.status !== 'running' || !devServer.url) {
1079
+ console.log('[editorProxy] Cannot start proxy — dev server not running');
1080
+ return null;
1081
+ }
1082
+ const codeyamPort = parseInt(process.env.CODEYAM_PORT || '3111', 10);
1083
+ const { proxyPort } = computeEditorPorts(codeyamPort);
1084
+ console.log(`[editorProxy] Proxy not running, starting on-demand (port ${proxyPort}, target ${devServer.url})`);
1085
+ const result = await startEditorProxy({
1086
+ port: proxyPort,
1087
+ targetUrl: devServer.url,
1088
+ });
1089
+ if (result) {
1090
+ const url = `http://localhost:${result.port}`;
1091
+ console.log(`[editorProxy] On-demand proxy started at ${url}`);
1092
+ return url;
1093
+ }
1094
+ console.error('[editorProxy] Failed to start on-demand proxy');
1095
+ return null;
1096
+ }
1097
+ /**
1098
+ * Test-only export: trigger readScenarioData so tests can verify session config extraction.
1099
+ */
1100
+ export const _readScenarioDataForTest = readScenarioData;
1101
+ //# sourceMappingURL=editorProxy.js.map