@codeyam/codeyam-cli 0.1.0-staging.d0ad4ae → 0.1.0-staging.d4f25c3

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 (1262) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +27 -27
  4. package/analyzer-template/packages/ai/index.ts +21 -5
  5. package/analyzer-template/packages/ai/package.json +3 -3
  6. package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
  7. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +226 -24
  8. package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
  9. package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +217 -13
  10. package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
  11. package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +181 -23
  12. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
  13. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
  14. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +15 -0
  15. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
  16. package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +1215 -29
  17. package/analyzer-template/packages/ai/src/lib/astScopes/sharedPatterns.ts +28 -0
  18. package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +265 -6
  19. package/analyzer-template/packages/ai/src/lib/completionCall.ts +247 -66
  20. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +2020 -334
  21. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +5 -1
  22. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +205 -0
  23. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +10 -2
  24. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
  25. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
  26. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +54 -3
  27. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +129 -20
  28. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
  29. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
  30. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +140 -14
  31. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
  32. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
  33. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +393 -90
  34. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
  35. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.ts +35 -0
  36. package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +183 -0
  37. package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
  38. package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
  39. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +4 -3
  40. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +86 -149
  41. package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +59 -3
  42. package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1458 -65
  43. package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +200 -196
  44. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +677 -0
  45. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
  46. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +2484 -0
  47. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
  48. package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +5 -5
  49. package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +328 -7
  50. package/analyzer-template/packages/ai/src/lib/mergeJsonTypeDefinitions.ts +5 -0
  51. package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +111 -87
  52. package/analyzer-template/packages/ai/src/lib/promptGenerators/collapseNullableObjects.ts +118 -0
  53. package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +10 -7
  54. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
  55. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +28 -170
  56. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
  57. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
  58. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +110 -6
  59. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -89
  60. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
  61. package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +11 -11
  62. package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
  63. package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +824 -0
  64. package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
  65. package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
  66. package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +122 -3
  67. package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +114 -2
  68. package/analyzer-template/packages/analyze/index.ts +2 -0
  69. package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +65 -59
  70. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +132 -33
  71. package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
  72. package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
  73. package/analyzer-template/packages/analyze/src/lib/asts/nodes/getNodeType.ts +1 -0
  74. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
  75. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
  76. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
  77. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
  78. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
  79. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
  80. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +447 -255
  81. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +39 -4
  82. package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
  83. package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +4 -2
  84. package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +33 -10
  85. package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +14 -14
  86. package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +4 -4
  87. package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +11 -12
  88. package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
  89. package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
  90. package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
  91. package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1352 -0
  92. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +193 -76
  93. package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +203 -41
  94. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -188
  95. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +355 -23
  96. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +166 -0
  97. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +1 -0
  98. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +2 -3
  99. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +845 -72
  100. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
  101. package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
  102. package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
  103. package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
  104. package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
  105. package/analyzer-template/packages/aws/package.json +10 -10
  106. package/analyzer-template/packages/database/index.ts +1 -0
  107. package/analyzer-template/packages/database/package.json +4 -4
  108. package/analyzer-template/packages/database/src/lib/analysisBranchToDb.ts +1 -1
  109. package/analyzer-template/packages/database/src/lib/analysisToDb.ts +1 -1
  110. package/analyzer-template/packages/database/src/lib/branchToDb.ts +1 -1
  111. package/analyzer-template/packages/database/src/lib/commitBranchToDb.ts +1 -1
  112. package/analyzer-template/packages/database/src/lib/commitToDb.ts +1 -1
  113. package/analyzer-template/packages/database/src/lib/fileToDb.ts +1 -1
  114. package/analyzer-template/packages/database/src/lib/kysely/db.ts +22 -1
  115. package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
  116. package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +17 -1
  117. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +164 -0
  118. package/analyzer-template/packages/database/src/lib/kysely/tables/labsRequestsTable.ts +52 -0
  119. package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
  120. package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +13 -0
  121. package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
  122. package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
  123. package/analyzer-template/packages/database/src/lib/loadCommits.ts +58 -19
  124. package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -9
  125. package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
  126. package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +5 -6
  127. package/analyzer-template/packages/database/src/lib/projectToDb.ts +1 -1
  128. package/analyzer-template/packages/database/src/lib/saveFiles.ts +1 -1
  129. package/analyzer-template/packages/database/src/lib/scenarioToDb.ts +1 -1
  130. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +96 -152
  131. package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
  132. package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
  133. package/analyzer-template/packages/database/src/lib/userScenarioToDb.ts +1 -1
  134. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
  135. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
  136. package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
  137. package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
  138. package/analyzer-template/packages/github/dist/database/index.js +1 -0
  139. package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
  140. package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js +1 -1
  141. package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js.map +1 -1
  142. package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js +1 -1
  143. package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js.map +1 -1
  144. package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js +1 -1
  145. package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js.map +1 -1
  146. package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js +1 -1
  147. package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js.map +1 -1
  148. package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js +1 -1
  149. package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js.map +1 -1
  150. package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js +1 -1
  151. package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js.map +1 -1
  152. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +4 -0
  153. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
  154. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +16 -1
  155. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
  156. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -18
  157. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
  158. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts +1 -0
  159. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
  160. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
  161. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  162. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +17 -1
  163. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
  164. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  165. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +29 -0
  166. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
  167. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +149 -0
  168. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
  169. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts +23 -0
  170. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts.map +1 -0
  171. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
  172. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
  173. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +6 -6
  174. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
  175. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts +2 -0
  176. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
  177. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
  178. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
  179. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
  180. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +8 -0
  181. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
  182. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
  183. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
  184. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
  185. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
  186. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.map +1 -1
  187. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -1
  188. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
  189. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +45 -14
  190. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
  191. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts +3 -1
  192. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  193. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +23 -10
  194. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  195. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
  196. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
  197. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js.map +1 -1
  198. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
  199. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +5 -5
  200. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  201. package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js +1 -1
  202. package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js.map +1 -1
  203. package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js +1 -1
  204. package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js.map +1 -1
  205. package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js +1 -1
  206. package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js.map +1 -1
  207. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts +2 -2
  208. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  209. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +76 -89
  210. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  211. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
  212. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
  213. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
  214. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
  215. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
  216. package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
  217. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
  218. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
  219. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
  220. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
  221. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
  222. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  223. package/analyzer-template/packages/github/dist/types/index.d.ts +3 -4
  224. package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
  225. package/analyzer-template/packages/github/dist/types/index.js +0 -1
  226. package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
  227. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  228. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  229. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  230. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  231. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +71 -27
  232. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
  233. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
  234. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
  235. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +8 -0
  236. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  237. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +13 -54
  238. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
  239. package/analyzer-template/packages/github/dist/types/src/types/Scenario.js +1 -21
  240. package/analyzer-template/packages/github/dist/types/src/types/Scenario.js.map +1 -1
  241. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +153 -5
  242. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  243. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  244. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  245. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
  246. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  247. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
  248. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  249. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
  250. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
  251. package/analyzer-template/packages/github/package.json +2 -2
  252. package/analyzer-template/packages/types/index.ts +3 -6
  253. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  254. package/analyzer-template/packages/types/src/types/Analysis.ts +87 -27
  255. package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
  256. package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +8 -0
  257. package/analyzer-template/packages/types/src/types/Scenario.ts +13 -77
  258. package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +181 -5
  259. package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
  260. package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
  261. package/analyzer-template/packages/ui-components/package.json +1 -1
  262. package/analyzer-template/packages/utils/dist/types/index.d.ts +3 -4
  263. package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
  264. package/analyzer-template/packages/utils/dist/types/index.js +0 -1
  265. package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
  266. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  267. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  268. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  269. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  270. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +71 -27
  271. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
  272. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
  273. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
  274. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +8 -0
  275. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  276. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +13 -54
  277. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
  278. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js +1 -21
  279. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js.map +1 -1
  280. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +153 -5
  281. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  282. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  283. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  284. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
  285. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  286. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
  287. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +98 -3
  288. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  289. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
  290. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  291. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
  292. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
  293. package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +121 -3
  294. package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
  295. package/analyzer-template/playwright/capture.ts +20 -8
  296. package/analyzer-template/playwright/captureFromUrl.ts +89 -82
  297. package/analyzer-template/playwright/captureStatic.ts +1 -1
  298. package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
  299. package/analyzer-template/project/analyzeBaselineCommit.ts +9 -0
  300. package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
  301. package/analyzer-template/project/analyzeFileEntities.ts +4 -0
  302. package/analyzer-template/project/analyzeRegularCommit.ts +9 -0
  303. package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
  304. package/analyzer-template/project/constructMockCode.ts +593 -91
  305. package/analyzer-template/project/controller/startController.ts +16 -1
  306. package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
  307. package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
  308. package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
  309. package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
  310. package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
  311. package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +18 -7
  312. package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
  313. package/analyzer-template/project/orchestrateCapture.ts +75 -7
  314. package/analyzer-template/project/reconcileMockDataKeys.ts +220 -1
  315. package/analyzer-template/project/runAnalysis.ts +6 -0
  316. package/analyzer-template/project/start.ts +49 -12
  317. package/analyzer-template/project/startScenarioCapture.ts +9 -0
  318. package/analyzer-template/project/writeClientLogRoute.ts +125 -0
  319. package/analyzer-template/project/writeMockDataTsx.ts +312 -10
  320. package/analyzer-template/project/writeScenarioComponents.ts +314 -43
  321. package/analyzer-template/project/writeSimpleRoot.ts +21 -11
  322. package/analyzer-template/scripts/comboWorkerLoop.cjs +98 -50
  323. package/analyzer-template/tsconfig.json +14 -1
  324. package/background/src/lib/local/createLocalAnalyzer.js +1 -1
  325. package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
  326. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +7 -1
  327. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
  328. package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
  329. package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
  330. package/background/src/lib/virtualized/project/analyzeFileEntities.js +2 -1
  331. package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
  332. package/background/src/lib/virtualized/project/analyzeRegularCommit.js +7 -1
  333. package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
  334. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
  335. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
  336. package/background/src/lib/virtualized/project/constructMockCode.js +493 -52
  337. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  338. package/background/src/lib/virtualized/project/controller/startController.js +11 -1
  339. package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
  340. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
  341. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
  342. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
  343. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
  344. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
  345. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
  346. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
  347. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
  348. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
  349. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
  350. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +7 -5
  351. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
  352. package/background/src/lib/virtualized/project/orchestrateCapture.js +62 -7
  353. package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
  354. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +184 -1
  355. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
  356. package/background/src/lib/virtualized/project/runAnalysis.js +5 -0
  357. package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
  358. package/background/src/lib/virtualized/project/start.js +44 -12
  359. package/background/src/lib/virtualized/project/start.js.map +1 -1
  360. package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
  361. package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
  362. package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
  363. package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
  364. package/background/src/lib/virtualized/project/writeMockDataTsx.js +263 -6
  365. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  366. package/background/src/lib/virtualized/project/writeScenarioComponents.js +237 -41
  367. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  368. package/background/src/lib/virtualized/project/writeSimpleRoot.js +21 -11
  369. package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
  370. package/codeyam-cli/scripts/apply-setup.js +386 -9
  371. package/codeyam-cli/scripts/apply-setup.js.map +1 -1
  372. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
  373. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
  374. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
  375. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
  376. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
  377. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
  378. package/codeyam-cli/src/cli.js +44 -24
  379. package/codeyam-cli/src/cli.js.map +1 -1
  380. package/codeyam-cli/src/codeyam-cli.js +18 -2
  381. package/codeyam-cli/src/codeyam-cli.js.map +1 -1
  382. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js +51 -0
  383. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js.map +1 -0
  384. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +56 -0
  385. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  386. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
  387. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  388. package/codeyam-cli/src/commands/analyze.js +21 -9
  389. package/codeyam-cli/src/commands/analyze.js.map +1 -1
  390. package/codeyam-cli/src/commands/baseline.js +10 -11
  391. package/codeyam-cli/src/commands/baseline.js.map +1 -1
  392. package/codeyam-cli/src/commands/debug.js +37 -23
  393. package/codeyam-cli/src/commands/debug.js.map +1 -1
  394. package/codeyam-cli/src/commands/default.js +43 -35
  395. package/codeyam-cli/src/commands/default.js.map +1 -1
  396. package/codeyam-cli/src/commands/editor.js +4630 -0
  397. package/codeyam-cli/src/commands/editor.js.map +1 -0
  398. package/codeyam-cli/src/commands/editorIsolateArgs.js +25 -0
  399. package/codeyam-cli/src/commands/editorIsolateArgs.js.map +1 -0
  400. package/codeyam-cli/src/commands/init.js +148 -292
  401. package/codeyam-cli/src/commands/init.js.map +1 -1
  402. package/codeyam-cli/src/commands/memory.js +278 -0
  403. package/codeyam-cli/src/commands/memory.js.map +1 -0
  404. package/codeyam-cli/src/commands/recapture.js +31 -18
  405. package/codeyam-cli/src/commands/recapture.js.map +1 -1
  406. package/codeyam-cli/src/commands/report.js +46 -1
  407. package/codeyam-cli/src/commands/report.js.map +1 -1
  408. package/codeyam-cli/src/commands/setup-sandbox.js +2 -0
  409. package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -1
  410. package/codeyam-cli/src/commands/setup-simulations.js +284 -0
  411. package/codeyam-cli/src/commands/setup-simulations.js.map +1 -0
  412. package/codeyam-cli/src/commands/start.js +8 -12
  413. package/codeyam-cli/src/commands/start.js.map +1 -1
  414. package/codeyam-cli/src/commands/telemetry.js +37 -0
  415. package/codeyam-cli/src/commands/telemetry.js.map +1 -0
  416. package/codeyam-cli/src/commands/test-startup.js +2 -0
  417. package/codeyam-cli/src/commands/test-startup.js.map +1 -1
  418. package/codeyam-cli/src/commands/verify.js +14 -2
  419. package/codeyam-cli/src/commands/verify.js.map +1 -1
  420. package/codeyam-cli/src/data/techStacks.js +77 -0
  421. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  422. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
  423. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  424. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  425. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  426. package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
  427. package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
  428. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +137 -0
  429. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
  430. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +2379 -0
  431. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
  432. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
  433. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
  434. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
  435. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
  436. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
  437. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
  438. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
  439. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
  440. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +194 -0
  441. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
  442. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +315 -0
  443. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
  444. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
  445. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
  446. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
  447. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
  448. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +594 -0
  449. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
  450. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
  451. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
  452. package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
  453. package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
  454. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
  455. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
  456. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +353 -0
  457. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
  458. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
  459. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  460. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  461. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  462. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
  463. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  464. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +1559 -0
  465. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
  466. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +280 -0
  467. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  468. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
  469. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
  470. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
  471. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
  472. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
  473. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
  474. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1857 -0
  475. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
  476. package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
  477. package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
  478. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
  479. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  480. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +185 -0
  481. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -0
  482. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
  483. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  484. package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
  485. package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
  486. package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
  487. package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
  488. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
  489. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
  490. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +284 -0
  491. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  492. package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
  493. package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
  494. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +672 -0
  495. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
  496. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
  497. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
  498. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +175 -82
  499. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  500. package/codeyam-cli/src/utils/__tests__/telemetry.test.js +159 -0
  501. package/codeyam-cli/src/utils/__tests__/telemetry.test.js.map +1 -0
  502. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  503. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  504. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
  505. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  506. package/codeyam-cli/src/utils/analysisRunner.js +32 -16
  507. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  508. package/codeyam-cli/src/utils/analyzer.js +16 -0
  509. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  510. package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
  511. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  512. package/codeyam-cli/src/utils/backgroundServer.js +203 -30
  513. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  514. package/codeyam-cli/src/utils/buildFlags.js +4 -0
  515. package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
  516. package/codeyam-cli/src/utils/database.js +37 -2
  517. package/codeyam-cli/src/utils/database.js.map +1 -1
  518. package/codeyam-cli/src/utils/devModeEvents.js +40 -0
  519. package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
  520. package/codeyam-cli/src/utils/devServerState.js +71 -0
  521. package/codeyam-cli/src/utils/devServerState.js.map +1 -0
  522. package/codeyam-cli/src/utils/editorApi.js +79 -0
  523. package/codeyam-cli/src/utils/editorApi.js.map +1 -0
  524. package/codeyam-cli/src/utils/editorAudit.js +480 -0
  525. package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
  526. package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
  527. package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
  528. package/codeyam-cli/src/utils/editorCapture.js +102 -0
  529. package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
  530. package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
  531. package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
  532. package/codeyam-cli/src/utils/editorDevServer.js +197 -0
  533. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
  534. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +50 -0
  535. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
  536. package/codeyam-cli/src/utils/editorEntityHelpers.js +144 -0
  537. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
  538. package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
  539. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
  540. package/codeyam-cli/src/utils/editorJournal.js +225 -0
  541. package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
  542. package/codeyam-cli/src/utils/editorLoaderHelpers.js +152 -0
  543. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
  544. package/codeyam-cli/src/utils/editorMigration.js +224 -0
  545. package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
  546. package/codeyam-cli/src/utils/editorMockState.js +248 -0
  547. package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
  548. package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
  549. package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
  550. package/codeyam-cli/src/utils/editorPreview.js +137 -0
  551. package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
  552. package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
  553. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  554. package/codeyam-cli/src/utils/editorScenarios.js +557 -0
  555. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
  556. package/codeyam-cli/src/utils/editorSeedAdapter.js +422 -0
  557. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  558. package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
  559. package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
  560. package/codeyam-cli/src/utils/entityChangeStatus.js +366 -0
  561. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
  562. package/codeyam-cli/src/utils/entityChangeStatus.server.js +196 -0
  563. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
  564. package/codeyam-cli/src/utils/fileMetadata.js +5 -0
  565. package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
  566. package/codeyam-cli/src/utils/fileWatcher.js +63 -9
  567. package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
  568. package/codeyam-cli/src/utils/generateReport.js +4 -3
  569. package/codeyam-cli/src/utils/generateReport.js.map +1 -1
  570. package/codeyam-cli/src/utils/git.js +103 -0
  571. package/codeyam-cli/src/utils/git.js.map +1 -1
  572. package/codeyam-cli/src/utils/install-skills.js +134 -39
  573. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  574. package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
  575. package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
  576. package/codeyam-cli/src/utils/labsAutoCheck.js +19 -0
  577. package/codeyam-cli/src/utils/labsAutoCheck.js.map +1 -0
  578. package/codeyam-cli/src/utils/npmVersionCheck.js +76 -0
  579. package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -0
  580. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  581. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  582. package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
  583. package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
  584. package/codeyam-cli/src/utils/progress.js +8 -1
  585. package/codeyam-cli/src/utils/progress.js.map +1 -1
  586. package/codeyam-cli/src/utils/project.js +15 -5
  587. package/codeyam-cli/src/utils/project.js.map +1 -1
  588. package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
  589. package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
  590. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
  591. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
  592. package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
  593. package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
  594. package/codeyam-cli/src/utils/queue/job.js +75 -1
  595. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  596. package/codeyam-cli/src/utils/queue/manager.js +7 -0
  597. package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
  598. package/codeyam-cli/src/utils/requireSimulations.js +10 -0
  599. package/codeyam-cli/src/utils/requireSimulations.js.map +1 -0
  600. package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
  601. package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
  602. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
  603. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
  604. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +229 -0
  605. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
  606. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
  607. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
  608. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
  609. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
  610. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
  611. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
  612. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
  613. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
  614. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +74 -0
  615. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
  616. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +376 -0
  617. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
  618. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +113 -0
  619. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
  620. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
  621. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
  622. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
  623. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
  624. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
  625. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
  626. package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
  627. package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
  628. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
  629. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
  630. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
  631. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
  632. package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
  633. package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
  634. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
  635. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
  636. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
  637. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
  638. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
  639. package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
  640. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
  641. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
  642. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +76 -0
  643. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
  644. package/codeyam-cli/src/utils/rules/index.js +7 -0
  645. package/codeyam-cli/src/utils/rules/index.js.map +1 -0
  646. package/codeyam-cli/src/utils/rules/parser.js +93 -0
  647. package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
  648. package/codeyam-cli/src/utils/rules/pathMatcher.js +49 -0
  649. package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
  650. package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
  651. package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
  652. package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
  653. package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
  654. package/codeyam-cli/src/utils/rules/sourceFiles.js +43 -0
  655. package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
  656. package/codeyam-cli/src/utils/rules/staleness.js +137 -0
  657. package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
  658. package/codeyam-cli/src/utils/scenarioCoverage.js +77 -0
  659. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  660. package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
  661. package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
  662. package/codeyam-cli/src/utils/scenariosManifest.js +285 -0
  663. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
  664. package/codeyam-cli/src/utils/serverState.js +94 -12
  665. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  666. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +96 -45
  667. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  668. package/codeyam-cli/src/utils/simulationGateMiddleware.js +166 -0
  669. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -0
  670. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  671. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  672. package/codeyam-cli/src/utils/syncMocksMiddleware.js +7 -26
  673. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  674. package/codeyam-cli/src/utils/telemetry.js +106 -0
  675. package/codeyam-cli/src/utils/telemetry.js.map +1 -0
  676. package/codeyam-cli/src/utils/telemetryMiddleware.js +22 -0
  677. package/codeyam-cli/src/utils/telemetryMiddleware.js.map +1 -0
  678. package/codeyam-cli/src/utils/testRunner.js +158 -0
  679. package/codeyam-cli/src/utils/testRunner.js.map +1 -0
  680. package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
  681. package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
  682. package/codeyam-cli/src/utils/versionInfo.js +67 -15
  683. package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
  684. package/codeyam-cli/src/utils/webappDetection.js +35 -2
  685. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  686. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
  687. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
  688. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +80 -0
  689. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  690. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js +66 -0
  691. package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js.map +1 -0
  692. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +628 -0
  693. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  694. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +217 -0
  695. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
  696. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +71 -0
  697. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  698. package/codeyam-cli/src/webserver/app/lib/database.js +63 -33
  699. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  700. package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
  701. package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
  702. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
  703. package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
  704. package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
  705. package/codeyam-cli/src/webserver/backgroundServer.js +186 -37
  706. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  707. package/codeyam-cli/src/webserver/bootstrap.js +51 -0
  708. package/codeyam-cli/src/webserver/bootstrap.js.map +1 -1
  709. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CLe80MMu.js +1 -0
  710. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-Crt_KN_U.js +11 -0
  711. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
  712. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-CD7lGABo.js +41 -0
  713. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-CgTNOhnu.js +1 -0
  714. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-CKeQT5Ty.js +25 -0
  715. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-D3s1MFkb.js +3 -0
  716. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B0GLXMsr.js → LoadingDots-By5zI316.js} +1 -1
  717. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-xgeCVgSM.js → LogViewer-CM5zg40N.js} +3 -3
  718. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-C2PLkej3.js +11 -0
  719. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DanvyBPb.js +1 -0
  720. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-DUMfcNVK.js +10 -0
  721. package/codeyam-cli/src/webserver/build/client/assets/Spinner-D0LgAaSa.js +34 -0
  722. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
  723. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-BA_Ry-rs.js +1 -0
  724. package/codeyam-cli/src/webserver/build/client/assets/_index-BAWd-Xjf.js +11 -0
  725. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-BOARiB-g.js +27 -0
  726. package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
  727. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
  728. package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-CHx25PAe.js +1 -0
  729. package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
  730. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-Bg3e7q4S.js +22 -0
  731. package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
  732. package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
  733. package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
  734. package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
  735. package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
  736. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
  737. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
  738. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
  739. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
  740. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
  741. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
  742. package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
  743. package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
  744. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  745. package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
  746. package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
  747. package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
  748. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
  749. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  750. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
  751. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
  752. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
  753. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
  754. package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
  755. package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
  756. package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
  757. package/codeyam-cli/src/webserver/build/client/assets/api.health-l0sNRNKZ.js +1 -0
  758. package/codeyam-cli/src/webserver/build/client/assets/api.labs-unlock-l0sNRNKZ.js +1 -0
  759. package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
  760. package/codeyam-cli/src/webserver/build/client/assets/api.restart-server-l0sNRNKZ.js +1 -0
  761. package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
  762. package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
  763. package/codeyam-cli/src/webserver/build/client/assets/book-open-CL-lMgHh.js +6 -0
  764. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-Cx24_aWc.js → chevron-down-GmAjGS9-.js} +2 -2
  765. package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-BAdwhyCx.js +43 -0
  766. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BOARzkeR.js → circle-check-DFcQkN5j.js} +2 -2
  767. package/codeyam-cli/src/webserver/build/client/assets/copy-C6iF61Xs.js +11 -0
  768. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-4ImjHTVC.js +41 -0
  769. package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-CCKUIm0S.svg} +2 -2
  770. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +1 -0
  771. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C8y4mmyv.js +1 -0
  772. package/codeyam-cli/src/webserver/build/client/assets/editor._tab-Gbk_i5Js.js +1 -0
  773. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DN5ouXAl.js +58 -0
  774. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-oepecPae.js +41 -0
  775. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-D0-YwkBh.js → entity._sha._-Blfy9UlN.js} +13 -13
  776. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-KTQuL0aj.js +6 -0
  777. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C6eeL24i.js +6 -0
  778. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DQM8E7L4.js +6 -0
  779. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C1H_a_Y3.js → entity._sha_.edit._scenarioId-CAoXLsQr.js} +2 -2
  780. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CS2cb_eZ.js → entry.client-SuW9syRS.js} +6 -6
  781. package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
  782. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
  783. package/codeyam-cli/src/webserver/build/client/assets/files-D-xGrg29.js +1 -0
  784. package/codeyam-cli/src/webserver/build/client/assets/git-Bq_fbXP5.js +1 -0
  785. package/codeyam-cli/src/webserver/build/client/assets/globals-fAqOD9ex.css +1 -0
  786. package/codeyam-cli/src/webserver/build/client/assets/{index-lzqtyFU8.js → index-Bp1l4hSv.js} +1 -1
  787. package/codeyam-cli/src/webserver/build/client/assets/{index-B1h680n5.js → index-CWV9XZiG.js} +1 -1
  788. package/codeyam-cli/src/webserver/build/client/assets/index-DE3jI_dv.js +15 -0
  789. package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
  790. package/codeyam-cli/src/webserver/build/client/assets/labs-B_IX45ih.js +1 -0
  791. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-B7B9V-bu.js → loader-circle-De-7qQ2u.js} +2 -2
  792. package/codeyam-cli/src/webserver/build/client/assets/manifest-389033be.js +1 -0
  793. package/codeyam-cli/src/webserver/build/client/assets/memory-Cx2xEx7s.js +101 -0
  794. package/codeyam-cli/src/webserver/build/client/assets/pause-CFxEKL1u.js +11 -0
  795. package/codeyam-cli/src/webserver/build/client/assets/root-DB3O9_9j.js +67 -0
  796. package/codeyam-cli/src/webserver/build/client/assets/{search-CxXUmBSd.js → search-BdBb5aqc.js} +2 -2
  797. package/codeyam-cli/src/webserver/build/client/assets/settings-DdE-Untf.js +1 -0
  798. package/codeyam-cli/src/webserver/build/client/assets/simulations-DSCdE99u.js +1 -0
  799. package/codeyam-cli/src/webserver/build/client/assets/terminal-CrplD4b1.js +11 -0
  800. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-B6LgvRJg.js → triangle-alert-DqJ0j69l.js} +2 -2
  801. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-DhXHbEjP.js +1 -0
  802. package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-BNd5hYuW.js +2 -0
  803. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-Cy5Qg_UR.js +1 -0
  804. package/codeyam-cli/src/webserver/build/client/assets/useToast-5HR2j9ZE.js +1 -0
  805. package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
  806. package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
  807. package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-D_1MSYeW.js +13 -0
  808. package/codeyam-cli/src/webserver/build/server/assets/index-ckWaCf_v.js +1 -0
  809. package/codeyam-cli/src/webserver/build/server/assets/init-ld124R4Z.js +10 -0
  810. package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
  811. package/codeyam-cli/src/webserver/build/server/assets/server-build-DzzNZGv_.js +551 -0
  812. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  813. package/codeyam-cli/src/webserver/build-info.json +5 -5
  814. package/codeyam-cli/src/webserver/devServer.js +39 -5
  815. package/codeyam-cli/src/webserver/devServer.js.map +1 -1
  816. package/codeyam-cli/src/webserver/editorProxy.js +976 -0
  817. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
  818. package/codeyam-cli/src/webserver/idleDetector.js +106 -0
  819. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
  820. package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
  821. package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
  822. package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
  823. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
  824. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +266 -0
  825. package/codeyam-cli/src/webserver/server.js +376 -26
  826. package/codeyam-cli/src/webserver/server.js.map +1 -1
  827. package/codeyam-cli/src/webserver/terminalServer.js +831 -0
  828. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
  829. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  830. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  831. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  832. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  833. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  834. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  835. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  836. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  837. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  838. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  839. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  840. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  841. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  842. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  843. package/codeyam-cli/templates/codeyam-editor-claude.md +147 -0
  844. package/codeyam-cli/templates/codeyam-editor-reference.md +214 -0
  845. package/codeyam-cli/templates/codeyam-memory-hook.sh +199 -0
  846. package/codeyam-cli/templates/commands/codeyam-diagnose.md +481 -0
  847. package/codeyam-cli/templates/editor-step-hook.py +321 -0
  848. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
  849. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  850. package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
  851. package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
  852. package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
  853. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
  854. package/codeyam-cli/templates/expo-react-native/app.json +18 -0
  855. package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
  856. package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
  857. package/codeyam-cli/templates/expo-react-native/global.css +3 -0
  858. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  859. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  860. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  861. package/codeyam-cli/templates/expo-react-native/package.json +38 -0
  862. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  863. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  864. package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
  865. package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
  866. package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
  867. package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
  868. package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
  869. package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
  870. package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
  871. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  872. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  873. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  874. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  875. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  876. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
  877. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
  878. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
  879. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
  880. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +24 -0
  881. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
  882. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  883. package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
  884. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
  885. package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
  886. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +39 -0
  887. package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
  888. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
  889. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +40 -0
  890. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
  891. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +127 -0
  892. package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
  893. package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
  894. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  895. package/codeyam-cli/templates/nextjs-prisma-supabase/SUPABASE_SETUP.md +104 -0
  896. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  897. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  898. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  899. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  900. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  901. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  902. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  903. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  904. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  905. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  906. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  907. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  908. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  909. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  910. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  911. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  912. package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
  913. package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
  914. package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
  915. package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
  916. package/codeyam-cli/templates/rule-notification-hook.py +83 -0
  917. package/codeyam-cli/templates/rule-reflection-hook.py +647 -0
  918. package/codeyam-cli/templates/rules-instructions.md +78 -0
  919. package/codeyam-cli/templates/seed-adapters/supabase.ts +282 -0
  920. package/codeyam-cli/templates/{codeyam-debug-skill.md → skills/codeyam-debug/SKILL.md} +48 -4
  921. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
  922. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +211 -0
  923. package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +611 -0
  924. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
  925. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
  926. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
  927. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
  928. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
  929. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
  930. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
  931. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
  932. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
  933. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
  934. package/codeyam-cli/templates/skills/codeyam-new-rule/SKILL.md +11 -0
  935. package/codeyam-cli/templates/{codeyam-setup-skill.md → skills/codeyam-setup/SKILL.md} +13 -1
  936. package/codeyam-cli/templates/{codeyam-sim-skill.md → skills/codeyam-sim/SKILL.md} +1 -1
  937. package/codeyam-cli/templates/{codeyam-test-skill.md → skills/codeyam-test/SKILL.md} +1 -1
  938. package/codeyam-cli/templates/{codeyam-verify-skill.md → skills/codeyam-verify/SKILL.md} +1 -1
  939. package/package.json +33 -22
  940. package/packages/ai/index.js +8 -6
  941. package/packages/ai/index.js.map +1 -1
  942. package/packages/ai/src/lib/analyzeScope.js +179 -13
  943. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  944. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
  945. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
  946. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +160 -13
  947. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
  948. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
  949. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
  950. package/packages/ai/src/lib/astScopes/methodSemantics.js +138 -23
  951. package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
  952. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
  953. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
  954. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
  955. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
  956. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +7 -0
  957. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
  958. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
  959. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
  960. package/packages/ai/src/lib/astScopes/processExpression.js +931 -29
  961. package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
  962. package/packages/ai/src/lib/astScopes/sharedPatterns.js +25 -0
  963. package/packages/ai/src/lib/astScopes/sharedPatterns.js.map +1 -1
  964. package/packages/ai/src/lib/completionCall.js +188 -38
  965. package/packages/ai/src/lib/completionCall.js.map +1 -1
  966. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1600 -189
  967. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  968. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +5 -1
  969. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
  970. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +179 -0
  971. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
  972. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +7 -1
  973. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
  974. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
  975. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
  976. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
  977. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
  978. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +52 -3
  979. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  980. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +111 -14
  981. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
  982. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
  983. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
  984. package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
  985. package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
  986. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +122 -12
  987. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
  988. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
  989. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
  990. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
  991. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
  992. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +333 -81
  993. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  994. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
  995. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
  996. package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
  997. package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
  998. package/packages/ai/src/lib/dataStructureChunking.js +130 -0
  999. package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
  1000. package/packages/ai/src/lib/e2eDataTracking.js +241 -0
  1001. package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
  1002. package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
  1003. package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
  1004. package/packages/ai/src/lib/generateChangesEntityScenarioData.js +4 -3
  1005. package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
  1006. package/packages/ai/src/lib/generateChangesEntityScenarios.js +78 -120
  1007. package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
  1008. package/packages/ai/src/lib/generateEntityDataStructure.js +47 -2
  1009. package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
  1010. package/packages/ai/src/lib/generateEntityScenarioData.js +1153 -60
  1011. package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
  1012. package/packages/ai/src/lib/generateEntityScenarios.js +177 -163
  1013. package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
  1014. package/packages/ai/src/lib/generateExecutionFlows.js +484 -0
  1015. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
  1016. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
  1017. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
  1018. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1807 -0
  1019. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
  1020. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
  1021. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
  1022. package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -2
  1023. package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
  1024. package/packages/ai/src/lib/isolateScopes.js +270 -7
  1025. package/packages/ai/src/lib/isolateScopes.js.map +1 -1
  1026. package/packages/ai/src/lib/mergeJsonTypeDefinitions.js +5 -0
  1027. package/packages/ai/src/lib/mergeJsonTypeDefinitions.js.map +1 -1
  1028. package/packages/ai/src/lib/mergeStatements.js +88 -46
  1029. package/packages/ai/src/lib/mergeStatements.js.map +1 -1
  1030. package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js +97 -0
  1031. package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js.map +1 -0
  1032. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +10 -4
  1033. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
  1034. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
  1035. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
  1036. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -119
  1037. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
  1038. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
  1039. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
  1040. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +83 -6
  1041. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
  1042. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -70
  1043. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
  1044. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
  1045. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
  1046. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +9 -9
  1047. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
  1048. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
  1049. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
  1050. package/packages/ai/src/lib/resolvePathToControllable.js +677 -0
  1051. package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
  1052. package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
  1053. package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
  1054. package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
  1055. package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
  1056. package/packages/ai/src/lib/worker/analyzeScopeWorker.js +94 -1
  1057. package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
  1058. package/packages/analyze/index.js +1 -0
  1059. package/packages/analyze/index.js.map +1 -1
  1060. package/packages/analyze/src/lib/FileAnalyzer.js +60 -36
  1061. package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
  1062. package/packages/analyze/src/lib/ProjectAnalyzer.js +109 -30
  1063. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  1064. package/packages/analyze/src/lib/analysisContext.js +30 -5
  1065. package/packages/analyze/src/lib/analysisContext.js.map +1 -1
  1066. package/packages/analyze/src/lib/asts/index.js +4 -2
  1067. package/packages/analyze/src/lib/asts/index.js.map +1 -1
  1068. package/packages/analyze/src/lib/asts/nodes/getNodeType.js +1 -0
  1069. package/packages/analyze/src/lib/asts/nodes/getNodeType.js.map +1 -1
  1070. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
  1071. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
  1072. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
  1073. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
  1074. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
  1075. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
  1076. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
  1077. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
  1078. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
  1079. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
  1080. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
  1081. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
  1082. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +189 -41
  1083. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  1084. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +28 -4
  1085. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  1086. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
  1087. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
  1088. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +2 -1
  1089. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
  1090. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +31 -10
  1091. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
  1092. package/packages/analyze/src/lib/files/analyzeChange.js +10 -10
  1093. package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
  1094. package/packages/analyze/src/lib/files/analyzeEntity.js +4 -4
  1095. package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
  1096. package/packages/analyze/src/lib/files/analyzeInitial.js +9 -10
  1097. package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
  1098. package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
  1099. package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
  1100. package/packages/analyze/src/lib/files/enums/steps.js +1 -1
  1101. package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
  1102. package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
  1103. package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
  1104. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +907 -0
  1105. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
  1106. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +164 -68
  1107. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
  1108. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +178 -31
  1109. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
  1110. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -129
  1111. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
  1112. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +252 -21
  1113. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  1114. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +104 -0
  1115. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
  1116. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +1 -0
  1117. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
  1118. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +2 -3
  1119. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
  1120. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +686 -55
  1121. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  1122. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
  1123. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
  1124. package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
  1125. package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
  1126. package/packages/analyze/src/lib/index.js +1 -0
  1127. package/packages/analyze/src/lib/index.js.map +1 -1
  1128. package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
  1129. package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
  1130. package/packages/database/index.js +1 -0
  1131. package/packages/database/index.js.map +1 -1
  1132. package/packages/database/src/lib/analysisBranchToDb.js +1 -1
  1133. package/packages/database/src/lib/analysisBranchToDb.js.map +1 -1
  1134. package/packages/database/src/lib/analysisToDb.js +1 -1
  1135. package/packages/database/src/lib/analysisToDb.js.map +1 -1
  1136. package/packages/database/src/lib/branchToDb.js +1 -1
  1137. package/packages/database/src/lib/branchToDb.js.map +1 -1
  1138. package/packages/database/src/lib/commitBranchToDb.js +1 -1
  1139. package/packages/database/src/lib/commitBranchToDb.js.map +1 -1
  1140. package/packages/database/src/lib/commitToDb.js +1 -1
  1141. package/packages/database/src/lib/commitToDb.js.map +1 -1
  1142. package/packages/database/src/lib/fileToDb.js +1 -1
  1143. package/packages/database/src/lib/fileToDb.js.map +1 -1
  1144. package/packages/database/src/lib/kysely/db.js +16 -1
  1145. package/packages/database/src/lib/kysely/db.js.map +1 -1
  1146. package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
  1147. package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  1148. package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  1149. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +149 -0
  1150. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
  1151. package/packages/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
  1152. package/packages/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
  1153. package/packages/database/src/lib/loadAnalyses.js +45 -2
  1154. package/packages/database/src/lib/loadAnalyses.js.map +1 -1
  1155. package/packages/database/src/lib/loadAnalysis.js +8 -0
  1156. package/packages/database/src/lib/loadAnalysis.js.map +1 -1
  1157. package/packages/database/src/lib/loadBranch.js +11 -1
  1158. package/packages/database/src/lib/loadBranch.js.map +1 -1
  1159. package/packages/database/src/lib/loadCommit.js +7 -0
  1160. package/packages/database/src/lib/loadCommit.js.map +1 -1
  1161. package/packages/database/src/lib/loadCommits.js +45 -14
  1162. package/packages/database/src/lib/loadCommits.js.map +1 -1
  1163. package/packages/database/src/lib/loadEntities.js +23 -10
  1164. package/packages/database/src/lib/loadEntities.js.map +1 -1
  1165. package/packages/database/src/lib/loadEntityBranches.js +9 -0
  1166. package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
  1167. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +5 -5
  1168. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  1169. package/packages/database/src/lib/projectToDb.js +1 -1
  1170. package/packages/database/src/lib/projectToDb.js.map +1 -1
  1171. package/packages/database/src/lib/saveFiles.js +1 -1
  1172. package/packages/database/src/lib/saveFiles.js.map +1 -1
  1173. package/packages/database/src/lib/scenarioToDb.js +1 -1
  1174. package/packages/database/src/lib/scenarioToDb.js.map +1 -1
  1175. package/packages/database/src/lib/updateCommitMetadata.js +76 -89
  1176. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  1177. package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
  1178. package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
  1179. package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
  1180. package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
  1181. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
  1182. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
  1183. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
  1184. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  1185. package/packages/types/index.js +0 -1
  1186. package/packages/types/index.js.map +1 -1
  1187. package/packages/types/src/enums/ProjectFramework.js +2 -0
  1188. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  1189. package/packages/types/src/types/Scenario.js +1 -21
  1190. package/packages/types/src/types/Scenario.js.map +1 -1
  1191. package/packages/utils/src/lib/fs/rsyncCopy.js +98 -3
  1192. package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  1193. package/packages/utils/src/lib/safeFileName.js +29 -3
  1194. package/packages/utils/src/lib/safeFileName.js.map +1 -1
  1195. package/scripts/npm-post-install.cjs +34 -0
  1196. package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -109
  1197. package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -584
  1198. package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -341
  1199. package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -495
  1200. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
  1201. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -120
  1202. package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -118
  1203. package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
  1204. package/codeyam-cli/src/commands/list.js +0 -31
  1205. package/codeyam-cli/src/commands/list.js.map +0 -1
  1206. package/codeyam-cli/src/commands/webapp-info.js +0 -146
  1207. package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
  1208. package/codeyam-cli/src/utils/universal-mocks.js +0 -152
  1209. package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
  1210. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-Cmysw5OP.js +0 -1
  1211. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-DLqD3qNt.js +0 -1
  1212. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-CAneekK2.js +0 -41
  1213. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-Cu16OUmx.js +0 -25
  1214. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-CVtiBnY5.js +0 -3
  1215. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-DcAUIpD_.js +0 -11
  1216. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DuDvi0jm.js +0 -1
  1217. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BMKg0SAF.js +0 -15
  1218. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-DyFZkK0l.js +0 -1
  1219. package/codeyam-cli/src/webserver/build/client/assets/_index-DSmTpjmK.js +0 -11
  1220. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-BF_aK4y6.js +0 -32
  1221. package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-CXRTFQ3F.js +0 -51
  1222. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-BdhJEx6B.js +0 -21
  1223. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-CKnwPCDr.js +0 -1
  1224. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-RJCf3Tvw.js +0 -1
  1225. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-EylcgScH.js +0 -1
  1226. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DMe7kvgo.js +0 -1
  1227. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DMJ7zii9.js +0 -1
  1228. package/codeyam-cli/src/webserver/build/client/assets/files-BW7Cyeyi.js +0 -1
  1229. package/codeyam-cli/src/webserver/build/client/assets/git-CZu4fif0.js +0 -15
  1230. package/codeyam-cli/src/webserver/build/client/assets/globals-wHVy_II5.css +0 -1
  1231. package/codeyam-cli/src/webserver/build/client/assets/keyAttributeCoverage-CTlFMihX.js +0 -1
  1232. package/codeyam-cli/src/webserver/build/client/assets/manifest-2d191949.js +0 -1
  1233. package/codeyam-cli/src/webserver/build/client/assets/root-FHgpM6gc.js +0 -56
  1234. package/codeyam-cli/src/webserver/build/client/assets/settings-6D8k8Jp5.js +0 -1
  1235. package/codeyam-cli/src/webserver/build/client/assets/simulations-CDJZnWhN.js +0 -1
  1236. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-Dv18q8LD.js +0 -1
  1237. package/codeyam-cli/src/webserver/build/client/assets/useInteractiveMode-0ToGk4K3.js +0 -1
  1238. package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-aSv48UbS.js +0 -2
  1239. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-1BX144Eg.js +0 -1
  1240. package/codeyam-cli/src/webserver/build/client/assets/useToast-mBRpZPiu.js +0 -1
  1241. package/codeyam-cli/src/webserver/build/server/assets/index-pU0o5t1o.js +0 -1
  1242. package/codeyam-cli/src/webserver/build/server/assets/server-build-YzfkRwdn.js +0 -178
  1243. package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
  1244. package/codeyam-cli/templates/debug-codeyam.md +0 -625
  1245. package/packages/ai/src/lib/findMatchingAttribute.js +0 -81
  1246. package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
  1247. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -425
  1248. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
  1249. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -267
  1250. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
  1251. package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -408
  1252. package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
  1253. package/packages/ai/src/lib/isFrontend.js +0 -5
  1254. package/packages/ai/src/lib/isFrontend.js.map +0 -1
  1255. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
  1256. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
  1257. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -77
  1258. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
  1259. package/scripts/finalize-analyzer.cjs +0 -81
  1260. /package/codeyam-cli/src/webserver/build/client/assets/{api.link-scenario-value-l0sNRNKZ.js → api.agent-transcripts-l0sNRNKZ.js} +0 -0
  1261. /package/codeyam-cli/src/webserver/build/client/assets/{api.update-key-attributes-l0sNRNKZ.js → api.dev-mode-events-l0sNRNKZ.js} +0 -0
  1262. /package/codeyam-cli/src/webserver/build/client/assets/{api.update-valid-values-l0sNRNKZ.js → api.editor-audit-l0sNRNKZ.js} +0 -0
@@ -0,0 +1,11 @@
1
+ import{c as e}from"./createLucideIcon-4ImjHTVC.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const t=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],c=e("file-code",t);/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const a=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],h=e("pause",a);export{c as F,h as P};
@@ -0,0 +1,67 @@
1
+ import{r as a,c as ie,a as ae,d as re,L as Y,w as le,D as ce,M as de,G as me,S as he,H as xe,I as pe,k as G,u as fe,f as ue,O as ye}from"./chunk-JZWAC4HX-BAdwhyCx.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{_ as ge}from"./preload-helper-ckwbz45p.js";import{c as ve}from"./cy-logo-cli-DcX-ZS3p.js";import{B as je,R as ke,S as be}from"./ReportIssueModal-C2PLkej3.js";import{a as we,R as Ce}from"./useReportContext-Cy5Qg_UR.js";import{L as Z}from"./loader-circle-De-7qQ2u.js";import{c as L}from"./createLucideIcon-4ImjHTVC.js";import{B as Ne}from"./book-open-CL-lMgHh.js";import{T as Se,u as Ee}from"./useToast-5HR2j9ZE.js";import{u as Le}from"./useLastLogLine-BNd5hYuW.js";import{L as Ae}from"./LogViewer-CM5zg40N.js";import{E as ze}from"./EntityTypeIcon-CD7lGABo.js";import{T as Me}from"./TruncatedFilePath-CK7-NaPZ.js";import{C as Te}from"./chevron-down-GmAjGS9-.js";import{C as Fe}from"./circle-check-DFcQkN5j.js";import{C as Be}from"./CopyButton-CLe80MMu.js";import"./triangle-alert-DqJ0j69l.js";import"./copy-C6iF61Xs.js";const _e=2e3,De=5e3;function Ie(t){return t.startsWith("/editor")?De:_e}function We(t){const{now:s,lastRevalidation:o,throttleMs:l}=t;if(o===0)return"immediate";const r=s-o;return r>=l?"immediate":{action:"deferred",delayMs:l-r}}function Pe({id:t,selected:s,onClick:o,icon:l,name:r}){const[d,i]=a.useState(!1);a.useEffect(()=>{i(!0)},[]);const N=a.useCallback(()=>{o==null||o(t)},[o,t]);return e.jsxs("button",{className:`
2
+ w-full px-1.5 py-2 cursor-pointer focus:outline-none
3
+ flex flex-col items-center justify-center gap-1 transition-colors
4
+ ${s?"text-[#CBF3FA]":"text-[#568B94] hover:text-[#CBF3FA]"}
5
+ `,onClick:N,children:[e.jsx("div",{className:`${s?"bg-[#CBF3FA] text-[#022A35]":""} w-9 h-9 rounded-lg flex items-center justify-center transition-colors`,children:d&&l}),e.jsx("span",{className:`text-[10px] font-normal text-center leading-tight ${s?"text-[#CBF3FA]":""}`,style:s?{color:"#CBF3FA !important"}:void 0,children:r})]})}/**
6
+ * @license lucide-react v0.577.0 - ISC
7
+ *
8
+ * This source code is licensed under the ISC license.
9
+ * See the LICENSE file in the root directory of this source tree.
10
+ */const Re=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Q=L("activity",Re);/**
11
+ * @license lucide-react v0.577.0 - ISC
12
+ *
13
+ * This source code is licensed under the ISC license.
14
+ * See the LICENSE file in the root directory of this source tree.
15
+ */const $e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]],He=L("circle-equal",$e);/**
16
+ * @license lucide-react v0.577.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */const Ve=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],Oe=L("component",Ve);/**
21
+ * @license lucide-react v0.577.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */const qe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Ue=L("file",qe);/**
26
+ * @license lucide-react v0.577.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */const Je=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Ye=L("flask-conical",Je);/**
31
+ * @license lucide-react v0.577.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */const Ge=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],se=L("git-commit-horizontal",Ge);/**
36
+ * @license lucide-react v0.577.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */const Qe=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Xe=L("house",Qe);/**
41
+ * @license lucide-react v0.577.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const Ke=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Ze=L("panels-top-left",Ke);/**
46
+ * @license lucide-react v0.577.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const et=[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],tt=L("pencil-ruler",et);/**
51
+ * @license lucide-react v0.577.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const st=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],nt=L("refresh-cw",st);function it({labs:t,isAdmin:s,editorMode:o}){var g;const l=ie(),r=ae(),[d,i]=a.useState(),[N,A]=a.useState(!1),[k,h]=a.useState(!1),[F,S]=a.useState(null),b=re();a.useEffect(()=>{b.state==="idle"&&!b.data&&b.load("/api/generate-report")},[b]);const $=((g=b.data)==null?void 0:g.defaultEmail)||"",x={width:"20px",height:"20px",strokeWidth:1.5},z=(t==null?void 0:t.simulations)??!1,B=[{id:"editor",icon:e.jsx(tt,{style:x}),link:"/editor",name:"Editor",hidden:!o},{id:"dashboard",icon:e.jsx(Xe,{style:x}),link:"/",name:"Dashboard",hidden:!z},{id:"simulations",icon:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:x,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations",hidden:!z},{id:"git",icon:e.jsx(se,{style:x}),link:"/git",name:"Git",hidden:!z},{id:"files",icon:e.jsx(Ue,{style:x}),link:"/files",name:"Files",hidden:!z},{id:"activity",icon:e.jsx(nt,{style:x}),link:"/activity",name:"Activity",hidden:!z},{id:"memory",icon:e.jsx(Ne,{style:x}),link:"/memory",name:"Memory"},{id:"labs",icon:e.jsx(Ye,{style:x}),link:"/labs",name:"Labs"},{id:"settings",icon:e.jsx(be,{style:x}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(se,{style:x}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(Ze,{style:x}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Oe,{style:x}),link:"/components",name:"Components",hidden:!0}],_=a.useCallback(c=>{const v=B.find(m=>m.id===c);v!=null&&v.link&&r(v.link),i(m=>m===c?void 0:c)},[B,r]);a.useEffect(()=>{const c={editor:["editor"],dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],memory:["memory","agent-transcripts"],files:["files"],labs:["labs"],settings:["settings"],pages:["pages"],components:["components"]};for(const[v,m]of Object.entries(c))if(m.some(u=>u==="/"?l.pathname==="/":l.pathname.includes(u))){i(v);return}i(void 0)},[l]);const D=async()=>{h(!0);try{const{default:c}=await ge(async()=>{const{default:u}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:u}},[]),m=(await c(document.body)).toDataURL("image/jpeg",.8);S(m),A(!0)}catch(c){console.error("Screenshot capture failed:",c),A(!0)}finally{h(!1)}},w=()=>{A(!1),S(null)},y=we();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"sticky top-0 w-full h-screen bg-[#051C22] flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{className:"py-3 mt-2 mb-4",children:e.jsx(Y,{to:"/",className:"flex items-center justify-center cursor-pointer",children:e.jsx("img",{src:ve,alt:"CodeYam",className:"h-6"})})}),B.filter(c=>!c.hidden).map(c=>e.jsx(Pe,{id:c.id,selected:c.id===d,onClick:_,icon:c.icon,name:c.name},`sidebar-button-${c.id}`))]}),s&&e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void D(),disabled:k,className:"w-full px-1.5 py-2 flex flex-col items-center justify-center gap-1 text-[#568B94] hover:text-[#CBF3FA] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",children:k?e.jsx(Z,{style:{width:"20px",height:"20px",strokeWidth:1.5},className:"animate-spin"}):e.jsx(je,{style:{width:"20px",height:"20px",strokeWidth:1.5}})}),e.jsx("span",{className:"text-[9px] font-normal text-center leading-tight whitespace-pre-line",children:k?"Capturing...":`Report
56
+ Bug`})]})})]}),N&&e.jsx(ke,{isOpen:!0,onClose:w,context:y,defaultEmail:$,screenshotDataUrl:F??void 0})]})}function ot({toast:t,onClose:s}){a.useEffect(()=>{const r=t.duration||5e3;if(r>0){const d=setTimeout(()=>{s(t.id)},r);return()=>clearTimeout(d)}},[t.id,t.duration,s]);const o={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},l={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${l[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:o[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>s(t.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function at({toasts:t,onClose:s}){return t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
57
+ @keyframes slideIn {
58
+ from {
59
+ transform: translateX(400px);
60
+ opacity: 0;
61
+ }
62
+ to {
63
+ transform: translateX(0);
64
+ opacity: 1;
65
+ }
66
+ }
67
+ `}),t.map(o=>e.jsx(ot,{toast:o,onClose:s},o.id))]})}function X({entity:t,nameSize:s="11px",pathSize:o="10px",pathMaxLength:l=50,showScenarioCount:r=!1,scenarioCount:d=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ze,{type:t.entityType||"other"}),e.jsxs(Y,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:s,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,r&&d>0&&` (${d})`]}),e.jsx(Me,{filePath:t.filePath,maxLength:l,style:{fontSize:o,color:"#8E8E8E"}})]}),i]})}const K={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function rt({currentRun:t,projectSlug:s,currentEntities:o=[],isAnalysisStarting:l=!1,queuedJobCount:r=0,queueJobs:d=[],currentlyExecuting:i=null,historicalRuns:N=[]}){var J,O,ee;const[A,k]=a.useState(!1),[h,F]=a.useState(!1),[S,b]=a.useState(null),[$,x]=a.useState(new Set),[z,B]=a.useState(new Set),[_,D]=a.useState(!1),w=!!i||d.length>0,y=!!i,g=(i==null?void 0:i.entities)||o,c=!!(t!=null&&t.analysisCompletedAt),v=(t==null?void 0:t.readyToBeCaptured)??0,m=(t==null?void 0:t.capturesCompleted)??0;t!=null&&t.captureCompletedAt||c&&(v===0||m>=v);const u=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,H=w,{lastLine:I}=Le(s,H),M=y||d.length>0,U=new Set(((J=i==null?void 0:i.entities)==null?void 0:J.map(n=>n.sha))||[]),P=N.filter(n=>!(n.currentEntityShas||[]).some(p=>U.has(p))),V=(()=>{const f=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&u){const p=t.analysisCompletedAt||t.createdAt;if(new Date(p).getTime()>f)return!0}if(P.length>0){const p=P[0],T=p.analysisCompletedAt||p.archivedAt||p.createdAt;if(T&&new Date(T).getTime()>f)return!0}return!1})();return a.useEffect(()=>{const n=(i==null?void 0:i.id)||null;w&&!h&&n!==S&&F(!0),!w&&S!==null&&b(null)},[w,i==null?void 0:i.id,h,S]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${h?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!h&&e.jsxs("div",{onClick:()=>{F(!0),b(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[M?e.jsx(Z,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(Q,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity: No Activity Yet"}),M&&e.jsx("button",{onClick:n=>{n.stopPropagation(),k(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),h&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[M?e.jsx(Z,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(Q,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>k(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{F(!1),b((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(Te,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[M&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Q,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:g.length>0?e.jsxs("div",{className:"space-y-1.5",children:[(_?g:g.slice(0,3)).map(n=>e.jsx(X,{entity:n,nameSize:"11px",pathSize:"10px",pathMaxLength:150},n.sha)),g.length>3&&e.jsx("button",{onClick:()=>D(n=>!n),className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:K,"aria-label":_?"Show fewer entities":`Show ${g.length-3} more entities`,children:_?"Show less":`+${g.length-3} more`}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((n,f)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:n},f)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((O=i.entityShas)==null?void 0:O.length)||0," ",((ee=i.entityShas)==null?void 0:ee.length)===1?"entity":"entities","..."]}),I&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:I})]})})]}),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(He,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:d.map(n=>{var T,R;const f=$.has(n.id),p=f?n.entities:n.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:n.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[p.map(E=>e.jsx(X,{entity:E,nameSize:"10px",pathSize:"9px",pathMaxLength:120},E.sha)),n.entities.length>3&&e.jsx("button",{onClick:()=>{x(E=>{const W=new Set(E);return W.has(n.id)?W.delete(n.id):W.add(n.id),W})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:K,"aria-label":f?"Show fewer entities":`Show ${n.entities.length-3} more entities`,children:f?"Show less":`+${n.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[n.type==="analysis"&&e.jsx(e.Fragment,{children:n.entityNames&&n.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[n.entityNames.slice(0,5).map((E,W)=>e.jsx("div",{children:E},W)),n.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",n.entityNames.length-5," more"]})]}):`Analyzing ${((T=n.entityShas)==null?void 0:T.length)||0} ${((R=n.entityShas)==null?void 0:R.length)===1?"entity":"entities"}`}),n.type==="recapture"&&"Recapturing scenario",n.type==="debug-setup"&&"Setting up debug environment"]})},n.id)})})]}),V&&P.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Fe,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:P.slice(0,3).map((n,f)=>{const p=n.entities||[],T=n.analysisCompletedAt||n.archivedAt||n.createdAt||"",R=(()=>{if(!T)return"";const C=Date.now()-new Date(T).getTime(),j=Math.floor(C/6e4),q=Math.floor(C/36e5);return q>0?`${q}h ago`:j>0?`${j}m ago`:"just now"})(),E=z.has(f),oe=(E?p:p.slice(0,3)).map(C=>{var j,q,te;return{...C,scenarioCount:((te=(q=(j=C.analyses)==null?void 0:j[0])==null?void 0:q.scenarios)==null?void 0:te.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:p.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[oe.map((C,j)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(X,{entity:C,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:C.scenarioCount})}),j===0&&R&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:R})]},C.sha)),p.length>3&&e.jsx("button",{onClick:()=>{B(C=>{const j=new Set(C);return j.has(f)?j.delete(f):j.add(f),j})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:K,"aria-label":E?"Show fewer entities":`Show ${p.length-3} more entities`,children:E?"Show less":`+${p.length-3} more`})]})},f)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(Y,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),A&&s&&e.jsx(Ae,{projectSlug:s,onClose:()=>k(!1)})]})}const lt="/assets/globals-fAqOD9ex.css";function ne({text:t,subtext:s,linkText:o,linkTo:l}){const[r,d]=a.useState(!1);return r?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:s})]}),e.jsx(Y,{to:l,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:o})]}),e.jsx("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}function ct({version:t}){return e.jsx("div",{className:"px-6 sm:px-12 pb-8 mt-auto pt-8",children:e.jsxs("div",{className:"border-t border-cygray-30 pt-6 flex flex-wrap justify-between items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-mono text-sm font-semibold tracking-widest text-cyblack-100",children:"CODEYAM"}),t&&e.jsx("span",{className:"font-mono text-xs text-gray-400",children:t})]}),e.jsxs("div",{className:"flex items-center gap-4 font-mono text-xs uppercase tracking-widest",children:[e.jsx("a",{href:"https://blog.codeyam.com/",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Read the Blog"}),e.jsx("span",{className:"text-cygray-30",children:"|"}),e.jsx("a",{href:"https://discord.gg/x4uAgaRdwF",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Join Discord"})]})]})})}function dt({serverVersion:t}){const[s,o]=a.useState("stale"),[l,r]=a.useState(null),d=async()=>{o("restarting"),r(null);try{if(!(await fetch("/api/restart-server",{method:"POST"})).ok)throw new Error("Failed to restart server");o("reconnecting");let N=0;const A=30,k=1e3,h=async()=>{try{if((await fetch("/api/health")).ok){window.location.reload();return}}catch{}N++,N<A?setTimeout(()=>void h(),k):(r("Server took too long to restart. Please refresh manually."),o("stale"))};setTimeout(()=>void h(),500)}catch(i){r(i instanceof Error?i.message:"Failed to restart server"),o("stale")}};return e.jsx("div",{className:"bg-amber-100 border rounded border-amber-700 shadow-sm mx-6 mt-6",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsxs("div",{className:"flex-1",children:[s==="stale"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Dashboard server is out of date"}),e.jsxs("p",{className:"text-xs text-amber-700 mt-0.5",children:["Server version: ",t,". A newer version of CodeYam CLI is installed. Restart the server to get the latest features."]}),l&&e.jsx("p",{className:"text-xs text-red-600 mt-1",children:l})]}),s==="restarting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Restarting server..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Please wait while the server restarts."})]}),s==="reconnecting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Reconnecting..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Waiting for the server to come back online."})]})]}),s==="stale"&&e.jsx("button",{type:"button",onClick:()=>void d(),className:"shrink-0 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded hover:bg-amber-700 transition-colors cursor-pointer",children:"Restart Server"}),(s==="restarting"||s==="reconnecting")&&e.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-4 py-2 text-amber-700 text-sm",children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),s==="restarting"?"Stopping...":"Reconnecting..."]})]})})})}function mt({currentVersion:t,latestVersion:s}){const[o,l]=a.useState(!1);if(o)return null;const r="npm install -g @codeyam/codeyam-cli@latest && codeyam stop && codeyam";return e.jsx("div",{className:"bg-emerald-100 border rounded border-emerald-700 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M7 11l5-5m0 0l5 5m-5-5v12"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"A new version of CodeYam CLI is available"}),e.jsxs("p",{className:"text-xs text-emerald-700 mt-0.5",children:["Current: ",t," → Latest: ",s]})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-emerald-200 text-emerald-900 px-2 py-1.5 rounded font-mono",children:r}),e.jsx(Be,{content:r,label:"Copy",copiedLabel:"Copied!",className:"px-3 py-1.5 bg-emerald-600 text-white text-xs font-medium rounded hover:bg-emerald-700 transition-colors"})]})]}),e.jsx("button",{type:"button",onClick:()=>l(!0),className:"shrink-0 ml-4 p-1 rounded text-emerald-600 hover:text-emerald-800 hover:bg-emerald-200 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const Ft=()=>[{rel:"stylesheet",href:lt},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function ht(){const{currentRun:t,projectSlug:s,currentEntities:o,availableAPIKeys:l,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:N,isServerOutOfDate:A,serverVersion:k,npmUpdate:h,labs:F,simulationsEnabled:S,isSimulationsReady:b,isAdmin:$,editorMode:x,displayVersion:z}=fe(),{toasts:B,closeToast:_}=Ee(),D=ue(),w=a.useRef(D),y=ie(),g=a.useRef(y.pathname);a.useEffect(()=>{w.current=D},[D]),a.useEffect(()=>{g.current=y.pathname},[y.pathname]);const c=y.pathname.startsWith("/entity/")&&y.pathname.includes("/edit/")||y.pathname.startsWith("/dev/")||y.pathname.startsWith("/editor"),v=y.pathname.includes("/fullscreen")||y.pathname.startsWith("/editor");return a.useEffect(()=>{let m=null,u=null,H=0;function I(){m||(m=new EventSource("/api/events"),m.addEventListener("message",P=>{const V=JSON.parse(P.data);(V.type==="queue"||V.type==="db-change")&&V.type;const J=Ie(g.current),O=We({now:Date.now(),lastRevalidation:H,throttleMs:J});O==="immediate"?(w.current.revalidate(),H=Date.now()):(u&&clearTimeout(u),u=setTimeout(()=>{w.current.revalidate(),H=Date.now(),u=null},O.delayMs))}),m.addEventListener("error",()=>{}))}function M(){u&&(clearTimeout(u),u=null),m&&(m.close(),m=null)}function U(){document.hidden?M():(I(),w.current.revalidate())}return document.hidden||I(),document.addEventListener("visibilitychange",U),()=>{document.removeEventListener("visibilitychange",U),M()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${c?"":"grid"} bg-cygray-10`,style:c?void 0:{gridTemplateColumns:"65px minmax(0, 1fr)"},children:[!c&&e.jsx(it,{labs:F,isAdmin:$,editorMode:x}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-cygray-10 flex flex-col min-h-screen",children:[A&&e.jsx(dt,{serverVersion:k}),h&&h.currentVersion&&e.jsx(mt,{currentVersion:h.currentVersion,latestVersion:h.latestVersion}),S&&l.length===0&&e.jsx(ne,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),S&&!b&&e.jsx(ne,{text:"Simulations enabled but not yet configured",subtext:"Run /codeyam-setup in Claude Code to install the analyzer and configure your dev server",linkText:"View Labs",linkTo:"/labs"}),e.jsx("div",{className:"flex-1",children:e.jsx(ye,{})}),e.jsx(ct,{version:z})]})]}),e.jsx(at,{toasts:B,onClose:_}),!v&&S&&e.jsx(rt,{currentRun:t,projectSlug:s,currentEntities:o,isAnalysisStarting:!1,queuedJobCount:r,queueJobs:d,currentlyExecuting:i,historicalRuns:N})]})}const Bt=le(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(de,{}),e.jsx(me,{})]}),e.jsxs("body",{children:[e.jsx(Se,{children:e.jsx(Ce,{children:e.jsx(ht,{})})}),e.jsx(he,{}),e.jsx(xe,{})]})]})});function xt(t){if(t instanceof TypeError&&/fetch/i.test(t.message)||t instanceof Error&&/fetch/i.test(t.message))return!0;const s=String(t);return/failed to fetch|fetch.*failed|load.*chunk/i.test(s)}const _t=ce(function(){const s=pe(),o=!G(s)&&xt(s),l=G(s)?s.status:500,r=G(s)?s.statusText||"Server Error":"Something went wrong";return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsxs("title",{children:[l," - CodeYam"]})]}),e.jsx("body",{style:{margin:0,fontFamily:'"IBM Plex Sans", system-ui, -apple-system, sans-serif',backgroundColor:"#F8F7F6",color:"#232323",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh"},children:e.jsxs("div",{style:{maxWidth:520,width:"100%",padding:"48px 32px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:64,fontWeight:700,color:"#005C75",lineHeight:1,marginBottom:8},children:l}),e.jsx("h1",{style:{fontSize:22,fontWeight:600,margin:"0 0 16px",color:"#232323"},children:r}),o?e.jsxs("div",{children:[e.jsx("p",{style:{fontSize:15,color:"#3E3E3E",lineHeight:1.6,margin:"0 0 24px"},children:"It looks like the CodeYam server is no longer running. This usually happens when the terminal session that started it was closed."}),e.jsx("div",{style:{backgroundColor:"#232323",color:"#D7FF63",borderRadius:8,padding:"14px 20px",fontFamily:'"IBM Plex Mono", monospace',fontSize:14,marginBottom:24,display:"inline-block"},children:"codeyam editor"}),e.jsx("p",{style:{fontSize:14,color:"#8E8E8E",margin:0},children:"Run this command in your project directory to restart the server, then refresh this page."})]}):e.jsxs("div",{children:[e.jsx("p",{style:{fontSize:15,color:"#3E3E3E",lineHeight:1.6,margin:"0 0 24px"},children:"An unexpected error occurred. Try refreshing the page."}),s instanceof Error&&s.message&&e.jsx("pre",{style:{backgroundColor:"#EFEFEF",borderRadius:8,padding:"14px 20px",fontFamily:'"IBM Plex Mono", monospace',fontSize:13,color:"#3E3E3E",textAlign:"left",overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:s.message})]})]})})]})});export{_t as ErrorBoundary,Bt as default,Ft as links};
@@ -1,5 +1,5 @@
1
- import{c}from"./createLucideIcon-BdhJEx6B.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c}from"./createLucideIcon-4ImjHTVC.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -0,0 +1 @@
1
+ import{w as ge,u as be,e as ye,d as fe,f as je,r}from"./chunk-JZWAC4HX-BAdwhyCx.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{u as ve}from"./useReportContext-Cy5Qg_UR.js";import{C as Ne}from"./CopyButton-CLe80MMu.js";import"./copy-C6iF61Xs.js";import"./createLucideIcon-4ImjHTVC.js";const Ie=()=>[{title:"Settings - CodeYam"},{name:"description",content:"Configure project settings"}];function X(d){if(!d)return"";const t=[d.command];return d.args&&d.args.length>0&&t.push(...d.args),t.join(" ")}function Z({mock:d,onSave:t,onCancel:o}){const[i,b]=r.useState(d.entityName),[h,c]=r.useState(d.filePath),[n,y]=r.useState(d.content),m=()=>{if(!i.trim()||!h.trim()||!n.trim()){alert("All fields are required");return}t({entityName:i,filePath:h,content:n})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:i,onChange:x=>b(x.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:h,onChange:x=>c(x.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., packages/database/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:n,onChange:x=>y(x.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:o,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Save"})]})]})}function we(d){try{return new Date(d).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return d}}const Ke=ge(function(){var G,Y,H,U,B;const{config:t,secrets:o,versionInfo:i,simulationsEnabled:b,error:h}=be(),c=ye(),n=fe(),y=je(),[m,x]=r.useState(b?"project-metadata":"memory");ve({source:"settings-page"});const[u,f]=r.useState((t==null?void 0:t.universalMocks)||[]),[N,P]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[I,ee]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[se,K]=r.useState((o==null?void 0:o.GROQ_API_KEY)||""),[te,R]=r.useState((o==null?void 0:o.ANTHROPIC_API_KEY)||""),[ae,T]=r.useState((o==null?void 0:o.OPENAI_API_KEY)||""),[w,re]=r.useState(!1),[C,ne]=r.useState(!1),[k,ie]=r.useState(!1),[E,j]=r.useState(!1),[_,oe]=r.useState(!1),[q,F]=r.useState(!1),[le,S]=r.useState(null),[de,v]=r.useState(!1),[A,O]=r.useState({}),[p,$]=r.useState(((G=t==null?void 0:t.memory)==null?void 0:G.conversationReflection)??!0),[g,D]=r.useState(((Y=t==null?void 0:t.memory)==null?void 0:Y.ruleMaintenance)??!0),[M,V]=r.useState(((H=t==null?void 0:t.memory)==null?void 0:H.promptModel)??"haiku");r.useEffect(()=>{var s,a,l,L;if(t){f(t.universalMocks||[]);const W=(t.pathsToIgnore||[]).join(", ");P(W),ee(W);const J={};(s=t.webapps)==null||s.forEach((Q,pe)=>{Q.startCommand&&(J[pe]=X(Q.startCommand))}),O(J),$(((a=t.memory)==null?void 0:a.conversationReflection)??!0),D(((l=t.memory)==null?void 0:l.ruleMaintenance)??!0),V(((L=t.memory)==null?void 0:L.promptModel)??"haiku")}o&&(K(o.GROQ_API_KEY||""),R(o.ANTHROPIC_API_KEY||""),T(o.OPENAI_API_KEY||""))},[t,o]),r.useEffect(()=>{if(c!=null&&c.success){j(!0);const s=setTimeout(()=>j(!1),3e3);return()=>clearTimeout(s)}},[c]),r.useEffect(()=>{if(n.state==="idle"&&n.data&&!q){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),j(!0),F(!0),(N!==I||s.requiresRestart)&&oe(!0),y.revalidate();const a=setTimeout(()=>{j(!1),F(!1)},3e3);return()=>clearTimeout(a)}}},[n.state,n.data,q,y,N,I]);const ce=s=>{s.preventDefault();const a=new FormData(s.currentTarget);a.set("universalMocks",JSON.stringify(u)),a.set("startCommands",JSON.stringify(A)),a.set("memorySettings",JSON.stringify({conversationReflection:p,ruleMaintenance:g,promptModel:M})),console.log("[Settings] Submitting form data:",{universalMocks:a.get("universalMocks"),startCommands:a.get("startCommands"),openAiApiKey:a.get("openAiApiKey")?"***":"(empty)"}),n.submit(a,{method:"post"})},me=s=>{f([...u,s]),v(!1)},xe=(s,a)=>{const l=[...u];l[s]=a,f(l),S(null)},ue=s=>{f(u.filter((a,l)=>l!==s))};if(h)return e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:h})})]});const z=[{id:"project-metadata",label:"Project Metadata"},{id:"ai-provider",label:"AI Provider Configuration"},{id:"commands",label:"Commands"},{id:"paths-to-ignore",label:"Paths To Ignore"},{id:"universal-mocks",label:"Universal Mocks"},{id:"memory",label:"Memory"},{id:"current-configuration",label:"Current Configuration"}],he=b?z:z.filter(s=>s.id==="memory");return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:e.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 pt-8 pb-12 font-sans",children:[e.jsxs("div",{className:"mb-8 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Settings"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"Project Configuration"})]}),e.jsx("button",{type:"submit",form:"settings-form",disabled:n.state==="submitting",className:"px-6 py-2 bg-[#005C75] text-white border-none rounded text-sm font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-[#004a5d] whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"})]}),(E||_||(c==null?void 0:c.error)||n.data&&typeof n.data=="object"&&"error"in n.data)&&e.jsxs("div",{className:"mb-4 space-y-3",children:[E&&e.jsx("div",{className:"text-emerald-600 text-sm font-medium bg-emerald-50 border border-emerald-200 rounded px-4 py-2",children:"Settings saved successfully!"}),_&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-4 py-2",children:[e.jsx("div",{children:"Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("code",{className:"bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"}),e.jsx(Ne,{content:"codeyam stop && codeyam",className:"px-2 py-1 text-xs bg-amber-200 hover:bg-amber-300 text-amber-800 rounded border-none transition-colors"})]})]}),(c==null?void 0:c.error)&&e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:c.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:s.error}):null}return null})()]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-8 items-start",children:[e.jsx("nav",{className:"w-full lg:w-64 flex-shrink-0",children:e.jsx("ul",{className:"flex lg:flex-col overflow-x-auto gap-1",children:he.map(s=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>x(s.id),className:`w-full text-left px-3 lg:px-0 py-2.5 text-sm transition-colors cursor-pointer whitespace-nowrap ${m===s.id?"text-[#005C75] font-medium":"text-gray-600 hover:text-gray-900"}`,children:s.label})},s.id))})}),e.jsx("div",{className:"flex-1 min-w-0 -mt-2",children:e.jsxs("form",{id:"settings-form",onSubmit:ce,className:"space-y-6",children:[m==="project-metadata"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>{var l;return e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",(l=s.startCommand.args)==null?void 0:l.join(" ")]})]})]})},a)})}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]})]}),m==="ai-provider"&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider API Keys"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:w?"text":"password",id:"groqApiKey",name:"groqApiKey",value:se,onChange:s=>K(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>re(!w),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:w?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:C?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:te,onChange:s=>R(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>ne(!C),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:C?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:k?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:ae,onChange:s=>T(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>ie(!k),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:k?"Hide":"Show"})]})]})]})]})]}),m==="commands"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Commands"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure start commands for your web applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-4",children:t.webapps.map((s,a)=>e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-gray-900 mb-1",children:s.path==="."?"Root":s.path}),e.jsx("div",{className:"text-sm text-gray-600",children:s.framework})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:`startCommand-${a}`,className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Command"}),e.jsx("input",{type:"text",id:`startCommand-${a}`,name:`startCommand-${a}`,value:A[a]||"",onChange:l=>O({...A,[a]:l.target.value}),placeholder:"e.g., pnpm dev --port $PORT",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Use $PORT as a placeholder for the dynamic port number"})]})]},a))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"})]}),m==="paths-to-ignore"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:N,onChange:s=>P(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-2 focus:ring-[#005C75]/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),m==="universal-mocks"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Universal Mocks"}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),u.length===0?e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-3",children:"No universal mocks configured"}),e.jsx("button",{type:"button",onClick:()=>v(!0),className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}):e.jsx("div",{className:"space-y-3",children:u.map((s,a)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:le===a?e.jsx(Z,{mock:s,onSave:l=>xe(a,l),onCancel:()=>S(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>S(a),className:"px-3 py-1 bg-teal-600 text-white border-none rounded text-sm cursor-pointer hover:bg-teal-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>ue(a),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},a))}),u.length>0&&e.jsx("button",{type:"button",onClick:()=>v(!0),className:"mt-4 px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}),m==="memory"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Memory"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure how CodeYam reflects on conversations and maintains rules between sessions."}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Conversation Reflection"}),e.jsx("p",{className:"text-sm text-gray-600",children:"After each conversation, an agent reviews the session for architectural decisions, tribal knowledge, confusion, or corrections that future sessions would benefit from knowing. It creates or updates Claude Rules based on what it learns."})]}),e.jsx("button",{type:"button",role:"switch","aria-checked":p,onClick:()=>$(!p),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${p?"bg-[#005C75]":"bg-gray-200"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${p?"translate-x-5":"translate-x-0"}`})})]})}),e.jsx("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Rule Maintenance"}),e.jsx("p",{className:"text-sm text-gray-600",children:"After each conversation, an agent checks if any existing Claude Rules have become stale based on recent code changes. It reviews the rule content against file diffs and updates rules that are out of date."})]}),e.jsx("button",{type:"button",role:"switch","aria-checked":g,onClick:()=>D(!g),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${g?"bg-[#005C75]":"bg-gray-200"}`,children:e.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${g?"translate-x-5":"translate-x-0"}`})})]})}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Memory Prompt Model"}),e.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Choose the Claude model used for conversation reflection and rule maintenance tasks."}),e.jsx("div",{className:"space-y-3",children:[{value:"haiku",label:"Haiku",badge:"Default, Recommended",description:"Fastest and cheapest. Good for routine reflection tasks."},{value:"sonnet",label:"Sonnet",badge:null,description:"Balanced speed and quality. Better at nuanced rule writing."},{value:"opus",label:"Opus",badge:null,description:"Highest quality. Best for complex architectural decisions. Costs significantly more."}].map(s=>e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${M===s.value?"border-[#005C75] bg-[#005C75]/5":"border-gray-200 hover:border-gray-300"}`,children:[e.jsx("input",{type:"radio",name:"promptModel",value:s.value,checked:M===s.value,onChange:()=>V(s.value),className:"mt-1 accent-[#005C75]"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-900",children:s.label}),s.badge&&e.jsx("span",{className:"px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:s.badge})]}),e.jsx("p",{className:"text-sm text-gray-600 mt-0.5",children:s.description})]})]},s.value))})]})]})]}),m==="current-configuration"&&e.jsxs("div",{className:"space-y-6",children:[t&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Current Configuration"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded mb-6",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[t.projectSlug&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Project Slug:"})," ",e.jsx("span",{className:"text-gray-900",children:t.projectSlug})]}),t.packageManager&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"})," ",e.jsx("span",{className:"text-gray-900",children:t.packageManager})]})]})}),t.webapps&&t.webapps.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Web Applications"}),e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsx("span",{className:"text-gray-900 font-mono text-xs",children:X(s.startCommand)})]})]})},a))})]})]}),i&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Version Information"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[i.webserverVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Webserver:"})," ",e.jsx("span",{className:"text-gray-900 font-mono",children:i.webserverVersion.version||"unknown"})]}),i.templateVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Analyzer Template:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.templateVersion.version||((U=i.templateVersion.gitCommit)==null?void 0:U.slice(0,7))||"unknown"}),i.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",we(i.templateVersion.buildTimestamp),")"]})]}),i.cachedAnalyzerVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.cachedAnalyzerVersion.version||((B=i.cachedAnalyzerVersion.gitCommit)==null?void 0:B.slice(0,7))||"unknown"}),i.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]}),!i.cachedAnalyzerVersion&&(t==null?void 0:t.projectSlug)&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})})]})]})]})})]}),de&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(Z,{mock:{entityName:"",filePath:"",content:""},onSave:me,onCancel:()=>v(!1)})]})})]})})});export{Ke as default,Ie as meta};
@@ -0,0 +1 @@
1
+ import{w as R,u as $,r as l,a as B,d as D,L as F}from"./chunk-JZWAC4HX-BAdwhyCx.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{u as O}from"./useReportContext-Cy5Qg_UR.js";import{S as U}from"./SafeScreenshot-DanvyBPb.js";import{L as V}from"./LoadingDots-By5zI316.js";import{E as P}from"./EntityTypeIcon-CD7lGABo.js";import{g as Y,a as Q,f as q}from"./fileTableUtils-Daa96Fr1.js";import{C as J}from"./chevron-down-GmAjGS9-.js";import{S as K}from"./search-BdBb5aqc.js";import{L as W}from"./loader-circle-De-7qQ2u.js";import"./createLucideIcon-4ImjHTVC.js";const ce=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],de=R(function(){const i=$(),c=i.entities,x=i.queueState;O({source:"simulations-page"});const[n,u]=l.useState(""),[d,S]=l.useState("visual"),g=l.useMemo(()=>{const a=[];return c.forEach(t=>{var y;const r=(y=t.analyses)==null?void 0:y[0];if(r!=null&&r.scenarios){const b=r.scenarios.filter(o=>{var m;return!((m=o.metadata)!=null&&m.sameAsDefault)}).map(o=>{var z,k,A,L,E;const m=(k=(z=o.metadata)==null?void 0:z.screenshotPaths)==null?void 0:k[0],N=(A=o.metadata)==null?void 0:A.noScreenshotSaved,M=m&&!N,T=(E=(L=r.status)==null?void 0:L.scenarios)==null?void 0:E.find(H=>H.name===o.name),I=T&&T.screenshotStartedAt&&!T.screenshotFinishedAt;let w;return M?w="completed":I?w="capturing":w="error",{scenarioName:o.name,scenarioDescription:o.description||"",screenshotPath:m||"",scenarioId:o.id,state:w}}).filter(o=>o.state==="completed"||o.state==="capturing");b.length>0&&a.push({entity:t,screenshots:b,createdAt:r.createdAt||""})}}),a.sort((t,r)=>new Date(r.createdAt).getTime()-new Date(t.createdAt).getTime()),a},[c]),v=l.useMemo(()=>c.filter(a=>{var y,b;const t=(y=a.analyses)==null?void 0:y[0];return!((b=t==null?void 0:t.scenarios)==null?void 0:b.some(o=>{var m,N;return(N=(m=o.metadata)==null?void 0:m.screenshotPaths)==null?void 0:N[0]}))}),[c]),p=l.useMemo(()=>g.filter(({entity:a})=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[g,n,d]),f=l.useMemo(()=>v.filter(a=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[v,n,d]),C=l.useCallback(a=>{u(a.target.value)},[]),j=l.useCallback(a=>{S(a.target.value)},[]),h=g.length>0;return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"px-20 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Simulations"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"A visual gallery of your recently captured simulations."})]}),!h&&e.jsx("div",{className:"bg-[#D1F3F9] border border-[#A5E8F0] rounded-lg p-4 mb-6",children:e.jsxs("p",{className:"text-sm text-gray-700 m-0",children:["This page will display a visual gallery of your recently captured component simulations."," ",e.jsx("strong",{children:"Start by analyzing your first component below."})]})}),e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-3",children:[e.jsx("div",{className:"text-[11px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 pr-8 text-[13px] h-[39px] cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:d,onChange:j,children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(J,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3 h-3 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(K,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 text-[13px] h-[39px] placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:n,onChange:C})]})]})]}),h&&p.length>0&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"flex items-center py-3",children:[e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em"},children:[e.jsx("span",{style:{color:"#000000"},children:p.length})," ",p.length===1?"entity":"entities"]}),e.jsxs("div",{className:"relative group inline-flex items-center ml-1.5",children:[e.jsx("svg",{className:"w-3 h-3 text-gray-400 cursor-help",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),e.jsx("div",{className:"absolute left-0 top-full mt-2 hidden group-hover:block z-50 w-80",children:e.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-lg px-3 py-2 shadow-lg",children:["In CodeYam, an entity is a discrete, analyzable unit of code that can be independently simulated and tested.",e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-900 transform rotate-45"})]})})]}),e.jsx("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#d1d5db",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:"|"}),e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:[e.jsx("span",{style:{color:"#000000"},children:p.reduce((a,{screenshots:t})=>a+t.length,0)})," ","scenarios"]})]})}),e.jsxs("div",{className:"flex flex-col gap-3",children:[h&&(p.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsx(e.Fragment,{children:p.map(({entity:a,screenshots:t})=>e.jsx(G,{entity:a,screenshots:t,queueJobs:(x==null?void 0:x.jobs)||[]},a.sha))})),!h&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No components found matching your filters."}):f.map(a=>e.jsx(X,{entity:a},a.sha)))]})]})})});function G({entity:s,screenshots:i,queueJobs:c}){var j,h,a;const x=B(),n=D(),[u,d]=l.useState(!1),S=i.length||(((a=(h=(j=s.analyses)==null?void 0:j[0])==null?void 0:h.scenarios)==null?void 0:a.length)??0),g=t=>{x(`/entity/${s.sha}/scenarios/${t}?from=simulations`)},v=()=>{d(!0),n.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};l.useEffect(()=>{n.state==="idle"&&u&&d(!1)},[n.state,u]);const p=Y(s,c),f=Q(p),C=p==="out-of-date";return e.jsx("div",{className:"rounded-[8px]",style:{backgroundColor:"#ffffff",border:"1px solid #e1e1e1"},children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center px-[15px] py-[15px]",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(P,{type:s.entityType||"other",size:"large"})}),e.jsxs("div",{className:"flex flex-col flex-shrink-0",style:{marginLeft:"15px",gap:"4px"},children:[e.jsxs("div",{className:"flex items-center gap-[5px]",children:[e.jsxs(F,{to:`/entity/${s.sha}`,className:"hover:underline cursor-pointer",title:s.name,style:{fontSize:"14px",lineHeight:"18px",color:"#343434",fontWeight:500},children:[s.name," (",S,")"]}),e.jsx("div",{className:"flex items-center justify-center px-2 rounded",style:{height:"20px",backgroundColor:f.bgColor,color:f.textColor,fontSize:"12px",lineHeight:"16px",fontWeight:400},children:f.text})]}),e.jsx("div",{style:{fontSize:"12px",lineHeight:"15px",color:"#b0b0b0",fontWeight:400},className:"font-mono",title:s.filePath,children:s.filePath})]}),e.jsx("div",{className:"flex-1"}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2",children:[C&&e.jsx(e.Fragment,{children:u||n.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin",style:{color:"#be185d"}}),e.jsx("span",{style:{color:"#be185d",fontSize:"10px",lineHeight:"20px",fontWeight:600},children:"Analyzing..."})]}):e.jsx("button",{onClick:v,className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#005c75",color:"#ffffff",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#004d5e"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#005c75"},children:"Re-analyze"})}),e.jsx("button",{onClick:()=>void x(`/entity/${s.sha}/logs`),className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#e0e9ec",color:"#005c75",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#d0dfe3"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#e0e9ec"},children:"View Logs"})]})]}),e.jsx("div",{className:"border-t border-gray-200"}),e.jsx("div",{className:"flex gap-2.5 overflow-x-auto pb-3 px-[15px] pt-3",style:{paddingLeft:"47px"},children:i.length>0?i.map(t=>e.jsxs("div",{className:"shrink-0 flex flex-col gap-2",children:[e.jsx("button",{onClick:()=>g(t.scenarioId||""),className:"block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border overflow-hidden flex items-center justify-center transition-all",style:{"--hover-border":"#005C75",backgroundColor:t.state==="capturing"?"#f9f9f9":"#f3f4f6",borderColor:t.state==="capturing"?"#efefef":"#d1d5db"},onMouseEnter:r=>{t.state==="completed"&&(r.currentTarget.style.borderColor="#005C75",r.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)")},onMouseLeave:r=>{r.currentTarget.style.borderColor=t.state==="capturing"?"#efefef":"#d1d5db",r.currentTarget.style.boxShadow="none"},children:t.state==="completed"?e.jsx(U,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain"}):t.state==="capturing"?e.jsx(V,{size:"medium"}):null})}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"text-left text-xs text-gray-600 cursor-default",style:{fontSize:"11px",lineHeight:"14px",maxWidth:"144px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.scenarioName}),e.jsx("div",{className:"fixed hidden group-hover:block pointer-events-none",style:{zIndex:1e4,transform:"translateY(8px)"},children:e.jsxs("div",{className:"bg-gray-100 text-gray-800 text-xs rounded-lg px-3 py-2 shadow-lg max-w-xs border border-gray-200",children:[t.scenarioName,t.scenarioDescription&&e.jsxs(e.Fragment,{children:[": ",t.scenarioDescription]}),e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-100 border-l border-t border-gray-200 transform rotate-45"})]})})]})]},t.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function X({entity:s}){const i=D(),[c,x]=l.useState(!1),n=()=>{x(!0),i.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};return l.useEffect(()=>{i.state==="idle"&&c&&x(!1)},[i.state,c]),e.jsx("div",{className:"bg-white rounded hover:bg-gray-100 transition-colors cursor-pointer border-b border-[#e1e1e1]",onClick:n,children:e.jsxs("div",{className:"px-5 py-4 flex items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(P,{type:s.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(F,{to:`/entity/${s.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:s.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:s.entityType==="visual"?"#7c3aed":s.entityType==="library"?"#0DBFE9":s.entityType==="type"?"#dc2626":s.entityType==="data"?"#2563eb":s.entityType==="index"?"#ea580c":s.entityType==="functionCall"?"#7c3aed":s.entityType==="class"?"#059669":s.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:s.entityType==="visual"?"#f3e8ff":s.entityType==="library"?"#cffafe":s.entityType==="type"?"#fee2e2":s.entityType==="data"?"#dbeafe":s.entityType==="index"?"#ffedd5":s.entityType==="functionCall"?"#f3e8ff":s.entityType==="class"?"#d1fae5":s.entityType==="method"?"#cffafe":"#f3f4f6"},children:s.entityType?s.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:s.filePath})]})]}),e.jsx("div",{className:"w-32 flex justify-center",children:e.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-100 px-2 py-1 rounded",children:"Not analyzed"})}),e.jsx("div",{className:"w-32 text-center text-[10px] text-gray-500",children:q(s.createdAt||null)}),e.jsx("div",{className:"w-24 flex justify-end",children:c||i.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin"}),"Analyzing..."]}):e.jsx("button",{onClick:n,className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer",children:"Analyze"})})]})})}export{de as default,ce as meta};
@@ -0,0 +1,11 @@
1
+ import{c as o}from"./createLucideIcon-4ImjHTVC.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=o("chevron-right",t);/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const e=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=o("terminal",e);export{c as C,a as T};
@@ -1,5 +1,5 @@
1
- import{c as e}from"./createLucideIcon-BdhJEx6B.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c as e}from"./createLucideIcon-4ImjHTVC.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -0,0 +1 @@
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r}from"./chunk-JZWAC4HX-BAdwhyCx.js";function D({currentWidth:d,currentHeight:u,devicePresets:l,customSizes:i,onApply:a,onSave:b,onRemove:x,onClose:s}){const[n,o]=r.useState(String(d)),[c,y]=r.useState(String(u)),[m,p]=r.useState(""),[v,L]=r.useState(!1),w=r.useRef(null),S=r.useRef(null);r.useEffect(()=>{const t=N=>{w.current&&!w.current.contains(N.target)&&s()};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[s]),r.useEffect(()=>{const t=N=>{N.key==="Escape"&&s()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[s]),r.useEffect(()=>{var t;(t=S.current)==null||t.select()},[]);const g=parseInt(n,10),f=parseInt(c,10),h=g>0&&f>0,k=h&&(g!==d||f!==u),C=()=>{h&&(a({name:"Custom",width:g,height:f}),s())},E=()=>{const t=m.trim();!t||!h||(b(t,g,f),a({name:t,width:g,height:f}),s())},j=t=>{t.key==="Enter"&&(v&&m.trim()?E():k&&C())};return e.jsxs("div",{ref:w,className:"absolute top-full mt-1 right-0 bg-[#2a2a2a] border border-[#444] rounded-lg shadow-xl z-50 w-64",children:[l&&l.length>0&&e.jsxs("div",{className:"border-b border-[#444]",children:[e.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-gray-500",children:"Presets"}),l.map(t=>e.jsxs("button",{onClick:()=>{a(t),s()},className:`w-full px-3 py-1.5 text-left text-xs transition-colors cursor-pointer ${t.width===d&&t.height===u?"text-white bg-[#444]":"text-gray-300 hover:text-white hover:bg-[#333]"}`,children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("span",{className:"text-gray-500 ml-1.5",children:[t.width,"×",t.height]})]},t.name))]}),i.length>0&&e.jsxs("div",{className:"border-b border-[#444]",children:[e.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-gray-500",children:"Saved Sizes"}),i.map(t=>e.jsxs("div",{className:"flex items-center group hover:bg-[#333] transition-colors",children:[e.jsxs("button",{onClick:()=>{a(t),s()},className:"flex-1 px-3 py-1.5 text-left text-xs text-gray-300 hover:text-white transition-colors cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("span",{className:"text-gray-500 ml-1.5",children:[t.width,"×",t.height]})]}),e.jsx("button",{onClick:()=>x(t.name),className:"px-2 py-1.5 text-gray-600 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-all cursor-pointer",title:"Remove",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]},t.name))]}),e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("input",{ref:S,type:"number",value:n,onChange:t=>o(t.target.value),onKeyDown:j,min:"100",max:"7680",className:"w-full px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white text-center focus:outline-none focus:border-[#007a99] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",placeholder:"Width"}),e.jsx("span",{className:"text-gray-500 text-xs flex-shrink-0",children:"×"}),e.jsx("input",{type:"number",value:c,onChange:t=>y(t.target.value),onKeyDown:j,min:"100",max:"7680",className:"w-full px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white text-center focus:outline-none focus:border-[#007a99] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",placeholder:"Height"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!h||!k,className:"flex-1 px-2 py-1.5 bg-[#007a99] text-white text-xs font-medium rounded hover:bg-[#006080] transition-colors cursor-pointer disabled:bg-[#333] disabled:text-gray-600 disabled:cursor-not-allowed",children:"Apply"}),v?e.jsxs("div",{className:"flex gap-1",children:[e.jsx("input",{type:"text",value:m,onChange:t=>p(t.target.value),onKeyDown:j,placeholder:"Name",className:"w-20 px-2 py-1.5 bg-[#1a1a1a] border border-[#555] rounded text-xs text-white focus:outline-none focus:border-[#007a99]",autoFocus:!0}),e.jsx("button",{onClick:E,disabled:!m.trim()||!h,className:"px-2 py-1.5 bg-[#007a99] text-white text-xs rounded hover:bg-[#006080] transition-colors cursor-pointer disabled:bg-[#333] disabled:text-gray-600 disabled:cursor-not-allowed",children:"OK"})]}):e.jsx("button",{onClick:()=>L(!0),disabled:!h,className:"px-2 py-1.5 bg-[#333] text-gray-300 text-xs rounded hover:bg-[#444] transition-colors cursor-pointer disabled:text-gray-600 disabled:cursor-not-allowed",title:"Save as preset",children:"Save"})]})]})]})}function I({width:d,height:u,onSave:l,onCancel:i}){const[a,b]=r.useState(""),[x,s]=r.useState(""),n=()=>{const o=a.trim();if(!o){s("Please enter a name");return}l(o)};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6 shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Save Custom Size"}),e.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 transition-colors cursor-pointer","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"mb-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Dimensions"}),e.jsxs("div",{className:"text-lg font-medium text-gray-900",children:[d,"px × ",u,"px"]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"custom-size-name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Name"}),e.jsx("input",{id:"custom-size-name",type:"text",value:a,onChange:o=>{b(o.target.value),s("")},onKeyDown:o=>{o.key==="Enter"&&a.trim()&&n(),o.key==="Escape"&&i()},placeholder:"e.g., iPhone 15 Pro",className:`w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[#005c75] focus:border-[#005c75] ${x?"border-red-300":"border-gray-300"}`,autoFocus:!0}),x&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:x})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:i,className:"px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-md hover:bg-gray-200 transition-colors cursor-pointer",children:"Cancel"}),e.jsx("button",{onClick:n,disabled:!a.trim(),className:"px-4 py-2 bg-[#005c75] text-white text-sm font-medium rounded-md hover:bg-[#004a5c] transition-colors cursor-pointer disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Save"})]})]})})}function R(d){const[u,l]=r.useState([]),i=d?`codeyam-custom-sizes-${d}`:null;r.useEffect(()=>{if(!i||typeof window>"u"){l([]);return}try{const s=localStorage.getItem(i);if(s){const n=JSON.parse(s);Array.isArray(n)&&l(n)}}catch(s){console.error("[useCustomSizes] Failed to load custom sizes:",s),l([])}},[i]);const a=r.useCallback(s=>{if(!(!i||typeof window>"u"))try{localStorage.setItem(i,JSON.stringify(s))}catch(n){console.error("[useCustomSizes] Failed to save custom sizes:",n)}},[i]),b=r.useCallback((s,n,o)=>{l(c=>{const y=c.findIndex(v=>v.name===s),m={name:s,width:n,height:o};let p;return y>=0?(p=[...c],p[y]=m):p=[...c,m],a(p),p})},[a]),x=r.useCallback(s=>{l(n=>{const o=n.filter(c=>c.name!==s);return a(o),o})},[a]);return{customSizes:u,addCustomSize:b,removeCustomSize:x}}export{D as C,I as S,R as u};
@@ -0,0 +1,2 @@
1
+ import{r as t}from"./chunk-JZWAC4HX-BAdwhyCx.js";function I(i,s){const[d,n]=t.useState(""),[g,l]=t.useState(!1),[h,a]=t.useState(null),[u,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),l(!1),a(null))},[s]),t.useEffect(()=>{if(!i||!s){s||n("");return}const L=async()=>{if(!u)try{const c=await fetch(`/api/logs/${i}`);if(c.ok){const o=(await c.text()).trim().split(`
2
+ `).filter(e=>e.length>0);if(o.length<3){l(!1),r(!1),a(null),n("");return}const f=o.filter(e=>e.includes("CodeYam Log Level 1"));if(f.length>0){const e=f[f.length-1];n(e.replace(/.*CodeYam Log Level 1: /,""))}const E=o.find(e=>e.includes("$$INTERACTIVE_SERVER_URL$$:"));if(E){const e=E.split("$$INTERACTIVE_SERVER_URL$$:")[1].trim();a(e),r(!0)}o.some(e=>e.includes("CodeYam: Exiting start.js"))&&l(!0)}}catch{}};L().catch(()=>{});const $=setInterval(()=>{L().catch(()=>{})},500);return()=>clearInterval($)},[i,s,u]);const m=t.useCallback(()=>{n(""),l(!1),a(null),r(!1)},[]);return{lastLine:d,interactiveUrl:h,isCompleted:g,resetLogs:m}}export{I as u};
@@ -0,0 +1 @@
1
+ import{j as i}from"./jsx-runtime-D_zvdyIk.js";import{r as e,c as x}from"./chunk-JZWAC4HX-BAdwhyCx.js";const s={source:"navbar"},r=e.createContext(void 0);function D({children:t}){const[n,o]=e.useState(s),a=e.useCallback(u=>{o(u)},[]),c=e.useCallback(()=>{o(s)},[]);return i.jsx(r.Provider,{value:{contextData:n,setContextData:a,resetContextData:c},children:t})}function p(t){const n=e.useContext(r),o=e.useRef(n);e.useEffect(()=>{if(o.current)return o.current.setContextData(t),()=>{var a;(a=o.current)==null||a.resetContextData()}},[t.source,t.entitySha,t.scenarioId,t.analysisId,t.entityName,t.entityType,t.scenarioName,t.errorMessage])}function m(){const t=e.useContext(r),n=x();return t?{source:t.contextData.source,entitySha:t.contextData.entitySha,scenarioId:t.contextData.scenarioId,analysisId:t.contextData.analysisId,currentUrl:n.pathname,entityName:t.contextData.entityName,entityType:t.contextData.entityType,scenarioName:t.contextData.scenarioName,errorMessage:t.contextData.errorMessage}:{source:"navbar",currentUrl:n.pathname}}export{D as R,m as a,p as u};
@@ -0,0 +1 @@
1
+ import{j as T}from"./jsx-runtime-D_zvdyIk.js";import{r as t}from"./chunk-JZWAC4HX-BAdwhyCx.js";const n=t.createContext(void 0);function p({children:o}){const[i,r]=t.useState([]),c=t.useCallback((s,e="info",a=5e3)=>{const d={id:`toast-${Date.now()}-${Math.random()}`,message:s,type:e,duration:a};r(x=>[...x,d])},[]),u=t.useCallback(s=>{r(e=>e.filter(a=>a.id!==s))},[]);return T.jsx(n.Provider,{value:{toasts:i,showToast:c,closeToast:u},children:o})}function v(){const o=t.useContext(n);if(!o)throw new Error("useToast must be used within a ToastProvider");return o}export{p as T,v as u};