@codeyam/codeyam-cli 0.1.0-staging.30dc541 → 0.1.0-staging.346f50f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analyzer-template/.build-info.json +8 -8
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +4 -4
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +135 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/nodeToSource.ts +19 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/paths.ts +11 -4
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +36 -9
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.ts +10 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +16 -6
- package/analyzer-template/packages/analyze/index.ts +4 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +28 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +5 -36
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +10 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +9 -12
- package/analyzer-template/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.ts +21 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +82 -10
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +4 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +4 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyzeNextRoute.ts +8 -3
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +239 -58
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +1684 -1462
- package/analyzer-template/packages/aws/package.json +6 -6
- package/analyzer-template/packages/database/package.json +2 -2
- package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +25 -15
- package/analyzer-template/packages/database/src/lib/loadEntity.ts +19 -8
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +7 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts +4 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js +5 -5
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts +3 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +22 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +27 -0
- package/analyzer-template/project/analyzeFileEntities.ts +26 -0
- package/analyzer-template/project/runMultiScenarioServer.ts +26 -3
- package/background/src/lib/virtualized/project/analyzeFileEntities.js +22 -0
- package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js +23 -3
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js.map +1 -1
- package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js +47 -0
- package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js +71 -0
- package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/editor.designSystem.test.js +30 -0
- package/codeyam-cli/src/commands/__tests__/editor.designSystem.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/editor.statePersistence.test.js +55 -0
- package/codeyam-cli/src/commands/__tests__/editor.statePersistence.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +39 -3
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +1648 -225
- package/codeyam-cli/src/commands/editor.js.map +1 -1
- package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js +23 -0
- package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +20 -0
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/data/designSystems.js +27 -0
- package/codeyam-cli/src/data/designSystems.js.map +1 -0
- package/codeyam-cli/src/data/techStacks.js +1 -1
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js +93 -1
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +44 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +2387 -907
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +11 -3
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +98 -1
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js +1108 -0
- package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +120 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +160 -1
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +134 -1
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +33 -1
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/envFile.test.js +125 -0
- package/codeyam-cli/src/utils/__tests__/envFile.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/handoffContext.test.js +500 -0
- package/codeyam-cli/src/utils/__tests__/handoffContext.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js +302 -0
- package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js +84 -0
- package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/testRunner.test.js +216 -0
- package/codeyam-cli/src/utils/__tests__/testRunner.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +6 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +36 -7
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +11 -1
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/designSystemShowcase.js +810 -0
- package/codeyam-cli/src/utils/designSystemShowcase.js.map +1 -0
- package/codeyam-cli/src/utils/devServerState.js +32 -0
- package/codeyam-cli/src/utils/devServerState.js.map +1 -1
- package/codeyam-cli/src/utils/editorApi.js +16 -0
- package/codeyam-cli/src/utils/editorApi.js.map +1 -1
- package/codeyam-cli/src/utils/editorAudit.js +345 -22
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
- package/codeyam-cli/src/utils/editorPreview.js +5 -3
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
- package/codeyam-cli/src/utils/editorRoadmap.js +574 -0
- package/codeyam-cli/src/utils/editorRoadmap.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +27 -12
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -1
- package/codeyam-cli/src/utils/editorScenarios.js +107 -4
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
- package/codeyam-cli/src/utils/editorSeedAdapter.js +69 -16
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -1
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +31 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -1
- package/codeyam-cli/src/utils/envFile.js +90 -0
- package/codeyam-cli/src/utils/envFile.js.map +1 -0
- package/codeyam-cli/src/utils/handoffContext.js +257 -0
- package/codeyam-cli/src/utils/handoffContext.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +36 -6
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/manualEntityAnalysis.js +196 -0
- package/codeyam-cli/src/utils/manualEntityAnalysis.js.map +1 -0
- package/codeyam-cli/src/utils/queue/__tests__/job.interactiveStart.test.js +159 -0
- package/codeyam-cli/src/utils/queue/__tests__/job.interactiveStart.test.js.map +1 -0
- package/codeyam-cli/src/utils/queue/job.js +35 -6
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/registerScenarioResult.js +52 -0
- package/codeyam-cli/src/utils/registerScenarioResult.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +8 -2
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
- package/codeyam-cli/src/utils/screenshotHash.js +26 -0
- package/codeyam-cli/src/utils/screenshotHash.js.map +1 -0
- package/codeyam-cli/src/utils/techStackConfig.js +38 -0
- package/codeyam-cli/src/utils/techStackConfig.js.map +1 -0
- package/codeyam-cli/src/utils/techStackConfig.test.js +85 -0
- package/codeyam-cli/src/utils/techStackConfig.test.js.map +1 -0
- package/codeyam-cli/src/utils/testResultCache.js +53 -0
- package/codeyam-cli/src/utils/testResultCache.js.map +1 -0
- package/codeyam-cli/src/utils/testResultCache.server.js +81 -0
- package/codeyam-cli/src/utils/testResultCache.server.js.map +1 -0
- package/codeyam-cli/src/utils/testResultCache.server.test.js +187 -0
- package/codeyam-cli/src/utils/testResultCache.server.test.js.map +1 -0
- package/codeyam-cli/src/utils/testResultCache.test.js +230 -0
- package/codeyam-cli/src/utils/testResultCache.test.js.map +1 -0
- package/codeyam-cli/src/utils/testRunner.js +193 -1
- package/codeyam-cli/src/utils/testRunner.js.map +1 -1
- package/codeyam-cli/src/utils/webappDetection.js +4 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/api.interactive-switch-scenario.test.js +99 -0
- package/codeyam-cli/src/webserver/__tests__/api.interactive-switch-scenario.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +119 -1
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +28 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +384 -12
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +89 -2
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +57 -1
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +15 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/routes/api.interactive-switch-scenario.js +34 -0
- package/codeyam-cli/src/webserver/app/routes/api.interactive-switch-scenario.js.map +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-CLe80MMu.js → CopyButton-DTBZZfSk.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-Crt_KN_U.js → EntityItem-BxclONWq.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CD7lGABo.js → EntityTypeIcon-BsnEOJZ_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-CgTNOhnu.js → InlineSpinner-ByaELMbv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-CKeQT5Ty.js → InteractivePreview-6WjVfhxX.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-D3s1MFkb.js → LibraryFunctionPreview-ChX-Hp7W.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CM5zg40N.js → LogViewer-C-9zQdXg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/MiniClaudeChat-Bs2_Oua4.js +36 -0
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-C2PLkej3.js → ReportIssueModal-DQsceHVv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DanvyBPb.js → SafeScreenshot-DThcm_9M.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DUMfcNVK.js → ScenarioViewer-Cl4oOA3A.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-CIil5-gb.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/{ViewportInspectBar-BA_Ry-rs.js → ViewportInspectBar-BqkA9zyZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{_index-BAWd-Xjf.js → _index-DnOgyseQ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BOARiB-g.js → activity.(_tab)-DqM9hbNE.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{addon-web-links-CHx25PAe.js → addon-web-links-C58dYPwR.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-Bg3e7q4S.js → agent-transcripts-B8NCeOrm.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-database-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-github-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-handoff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-hosting-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-roadmap-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-schema-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-verify-routes-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.interactive-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-CL-lMgHh.js → book-open-BFSIqZgO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-GmAjGS9-.js → chevron-down-B9fDzFVh.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-UVKPFVEO-Bmq2apuh.js +43 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DFcQkN5j.js → circle-check-DLPObLUx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{copy-C6iF61Xs.js → copy-DXEmO0TD.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-4ImjHTVC.js → createLucideIcon-BwyFiRot.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-Coe5NhbS.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-CCKUIm0S.svg → cy-logo-cli-DoA97ML3.svg} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-C8y4mmyv.js → dev.empty-iRhRIFlp.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor._tab-BZPBzV73.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DhtVC4aI.js +161 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-C6fEYHrh.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-Blfy9UlN.js → entity._sha._-pc-vc6wO.js} +13 -12
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.dev-KTQuL0aj.js → entity._sha.scenarios._scenarioId.dev-C8AyYgYT.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-C6eeL24i.js → entity._sha.scenarios._scenarioId.fullscreen-DziaVQX1.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-DQM8E7L4.js → entity._sha_.create-scenario-BTcpgIpC.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CAoXLsQr.js → entity._sha_.edit._scenarioId-D_O_ajfZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-SuW9syRS.js → entry.client-j1Vi0bco.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/{files-D-xGrg29.js → files-kuny2Q_s.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-Bq_fbXP5.js → git-DgCZPMie.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-L-aUIeux.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-Bp1l4hSv.js → index-BliGSSpl.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DE3jI_dv.js → index-SqjQKTdH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-CWV9XZiG.js → index-vyrZD2g4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{labs-B_IX45ih.js → labs-c3yLxSEp.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-De-7qQ2u.js → loader-circle-D-q28GLF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-79d0d81a.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{memory-Cx2xEx7s.js → memory-CEWIUC4t.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{pause-CFxEKL1u.js → pause-BP6fitdh.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-L2V0jea7.js +80 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-BdBb5aqc.js → search-BooqacKS.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{settings-DdE-Untf.js → settings-BM0nbryO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-DSCdE99u.js → simulations-ovy6FjRY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-CrplD4b1.js → terminal-DHemCJIs.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DqJ0j69l.js → triangle-alert-D87ekDl8.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-DhXHbEjP.js → useCustomSizes-Dk0Tciqg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C8QvIe05.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-Cy5Qg_UR.js → useReportContext-jkCytuYz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-5HR2j9ZE.js → useToast-BgqkixU9.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-QgInFGdU.js +16 -0
- package/codeyam-cli/src/webserver/build/server/assets/{index-Cd-ufawF.js → index-zblh9auj.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/init-DaE0CBjk.js +14 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CNvgz1cC.js +853 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/editorProxy.js +310 -23
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
- package/codeyam-cli/src/webserver/idleDetector.js +27 -3
- package/codeyam-cli/src/webserver/idleDetector.js.map +1 -1
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +17 -0
- package/codeyam-cli/src/webserver/server.js +119 -14
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +173 -27
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
- package/codeyam-cli/templates/codeyam-editor-codex.md +61 -0
- package/codeyam-cli/templates/codeyam-editor-gemini.md +59 -0
- package/codeyam-cli/templates/codeyam-editor-reference.md +8 -6
- package/codeyam-cli/templates/design-systems/clean-dashboard-design-system.md +255 -0
- package/codeyam-cli/templates/design-systems/editorial-design-system.md +267 -0
- package/codeyam-cli/templates/design-systems/mono-brutalist-design-system.md +256 -0
- package/codeyam-cli/templates/design-systems/neo-brutalist-design-system.md +294 -0
- package/codeyam-cli/templates/editor-step-hook.py +25 -4
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +204 -5
- package/codeyam-cli/templates/expo-react-native/__tests__/.gitkeep +0 -0
- package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +6 -3
- package/codeyam-cli/templates/expo-react-native/app/index.tsx +36 -0
- package/codeyam-cli/templates/expo-react-native/app.json +11 -0
- package/codeyam-cli/templates/expo-react-native/babel.config.js +1 -0
- package/codeyam-cli/templates/expo-react-native/gitignore +2 -0
- package/codeyam-cli/templates/expo-react-native/global.css +7 -0
- package/codeyam-cli/templates/expo-react-native/lib/theme.ts +73 -0
- package/codeyam-cli/templates/expo-react-native/package.json +32 -16
- package/codeyam-cli/templates/expo-react-native/patches/expo-modules-autolinking+3.0.24.patch +29 -0
- package/codeyam-cli/templates/isolation-route/expo-router.tsx.template +54 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +1 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +47 -34
- package/codeyam-cli/templates/seed-adapters/supabase.ts +271 -78
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +34 -1
- package/package.json +1 -1
- package/packages/ai/src/lib/astScopes/methodSemantics.js +99 -0
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/nodeToSource.js +16 -0
- package/packages/ai/src/lib/astScopes/nodeToSource.js.map +1 -1
- package/packages/ai/src/lib/astScopes/paths.js +12 -3
- package/packages/ai/src/lib/astScopes/paths.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +27 -10
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js +9 -2
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +14 -4
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/analyze/index.js +1 -1
- package/packages/analyze/index.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +16 -2
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +6 -26
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +3 -2
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +9 -7
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js +14 -0
- package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +44 -11
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +1 -0
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +1 -0
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeNextRoute.js +5 -1
- package/packages/analyze/src/lib/files/analyzeNextRoute.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +120 -28
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +1368 -1193
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/src/lib/loadAnalysis.js +7 -1
- package/packages/database/src/lib/loadAnalysis.js.map +1 -1
- package/packages/database/src/lib/loadEntity.js +5 -5
- package/packages/database/src/lib/loadEntity.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +22 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-D0LgAaSa.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-BAdwhyCx.js +0 -43
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor._tab-Gbk_i5Js.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-CGzKlIHg.js +0 -58
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-oepecPae.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/globals-Yn9W3zp3.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-2ef99f38.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-BxUQigda.js +0 -67
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-BNd5hYuW.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-BPmOG9bE.js +0 -13
- package/codeyam-cli/src/webserver/build/server/assets/init-CzeBGOto.js +0 -10
- package/codeyam-cli/src/webserver/build/server/assets/server-build-Dht7CKXY.js +0 -552
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +0 -33
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +0 -12
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"designSystemShowcase.js","sourceRoot":"","sources":["../../../../src/utils/designSystemShowcase.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB;;;GAGG;AACH,SAAS,sBAAsB,CAAC,QAAgB;IAC9C,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAG,wBAAwB,CAAC;IACvC,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/C,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAE5B,8E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAoaqB,IAAI;MAEhC,gBAAgB;QACd,CAAC,CAAC;;;WAGC;QACH,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgQI,CAAC;AACT,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;IACtE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAExC,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -68,4 +68,36 @@ export function computeDevServerTransition(current, response) {
|
|
|
68
68
|
// Unknown status — no changes
|
|
69
69
|
return { ...current, shouldAutoStart: false };
|
|
70
70
|
}
|
|
71
|
+
// ─── Server Error Auto-Restart Logic ────────────────────────────────
|
|
72
|
+
/** Max consecutive auto-restarts before requiring manual intervention. */
|
|
73
|
+
export const MAX_AUTO_RESTARTS = 2;
|
|
74
|
+
/** Minimum interval (ms) between auto-restart attempts. */
|
|
75
|
+
export const AUTO_RESTART_COOLDOWN_MS = 30000;
|
|
76
|
+
/**
|
|
77
|
+
* Decide whether to auto-restart the dev server after an error page
|
|
78
|
+
* is shown in the preview iframe. Pure function for testability.
|
|
79
|
+
*
|
|
80
|
+
* Prevents restart loops by enforcing:
|
|
81
|
+
* - A 30-second cooldown between auto-restarts
|
|
82
|
+
* - A maximum of 2 consecutive auto-restarts (reset when server comes up)
|
|
83
|
+
* - No restart if the server is already starting
|
|
84
|
+
*/
|
|
85
|
+
export function shouldAutoRestartOnError(state, isStarting, now) {
|
|
86
|
+
if (isStarting) {
|
|
87
|
+
return { shouldRestart: false, nextState: state };
|
|
88
|
+
}
|
|
89
|
+
if (now - state.lastAutoRestartAt < AUTO_RESTART_COOLDOWN_MS) {
|
|
90
|
+
return { shouldRestart: false, nextState: state };
|
|
91
|
+
}
|
|
92
|
+
if (state.autoRestartCount >= MAX_AUTO_RESTARTS) {
|
|
93
|
+
return { shouldRestart: false, nextState: state };
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
shouldRestart: true,
|
|
97
|
+
nextState: {
|
|
98
|
+
lastAutoRestartAt: now,
|
|
99
|
+
autoRestartCount: state.autoRestartCount + 1,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
71
103
|
//# sourceMappingURL=devServerState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devServerState.js","sourceRoot":"","sources":["../../../../src/utils/devServerState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuBH;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAuB,EACvB,QAA8B;IAE9B,IAAI,QAAQ,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAChC,OAAO;YACL,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,QAAQ,CAAC,YAAY,IAAI,oBAAoB;YACpD,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,kBAAkB,EAAE,OAAO,CAAC,kB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
|
}),
|
|
56
|
+
'verify-routes': (jsonArg) => {
|
|
57
|
+
if (!jsonArg) {
|
|
58
|
+
throw new Error('JSON argument is required for verify-routes. Example: \'{"paths":["/library"],"apiRoutes":["/api/users"]}\'');
|
|
59
|
+
}
|
|
60
|
+
const body = JSON.parse(jsonArg);
|
|
61
|
+
const hasPaths = Array.isArray(body.paths) && body.paths.length > 0;
|
|
62
|
+
const hasApiRoutes = Array.isArray(body.apiRoutes) && body.apiRoutes.length > 0;
|
|
63
|
+
if (!hasPaths && !hasApiRoutes) {
|
|
64
|
+
throw new Error('verify-routes requires at least one entry in "paths" or "apiRoutes"');
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
endpoint: '/api/editor-verify-routes',
|
|
69
|
+
body,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
56
72
|
};
|
|
57
73
|
export function buildEditorApiRequest(subcommand, jsonArg) {
|
|
58
74
|
const builder = SUBCOMMAND_MAP[subcommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorApi.js","sourceRoot":"","sources":["../../../../src/utils/editorApi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,cAAc,GAA2D;IAC7E,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE;QACnB,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvD,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,0IAA0I,CAC3I,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,uBAAuB;YACjC,IAAI;SACL,CAAC;IACJ,CAAC;IAED,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;QACrB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,0BAA0B;KACrC,C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E,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -4,17 +4,34 @@
|
|
|
4
4
|
* Cross-references glossary entries against registered scenarios (components)
|
|
5
5
|
* and test files (functions) to detect gaps Claude may have missed.
|
|
6
6
|
*/
|
|
7
|
-
import { isIsolationUrl, } from "./entityChangeStatus.js";
|
|
7
|
+
import { isIsolationUrl, scenarioEntityName, } from "./entityChangeStatus.js";
|
|
8
8
|
// ─── Logic ───────────────────────────────────────────────────────────
|
|
9
9
|
const COMPONENT_RETURN_PATTERNS = ['JSX', 'React', 'Element', 'ReactNode'];
|
|
10
|
+
/** File names that indicate page/route files — these are visual components
|
|
11
|
+
* verified via screenshots, not functions that need unit tests. */
|
|
12
|
+
const PAGE_FILE_NAMES = new Set([
|
|
13
|
+
'page.tsx',
|
|
14
|
+
'page.ts',
|
|
15
|
+
'index.tsx',
|
|
16
|
+
'index.ts',
|
|
17
|
+
]);
|
|
10
18
|
/**
|
|
11
|
-
* Returns true when the entry
|
|
12
|
-
*
|
|
19
|
+
* Returns true when the entry represents a visual component (needs scenarios,
|
|
20
|
+
* not unit tests). Matches on returnType containing JSX/React patterns, OR
|
|
21
|
+
* on file path patterns for page/route files.
|
|
13
22
|
*/
|
|
14
23
|
export function isComponent(entry) {
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
if (entry.returnType &&
|
|
25
|
+
COMPONENT_RETURN_PATTERNS.some((pat) => entry.returnType.includes(pat))) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// Page/route files are visual components — verified via app scenarios, not tests
|
|
29
|
+
if (entry.filePath) {
|
|
30
|
+
const fileName = entry.filePath.split('/').pop() || '';
|
|
31
|
+
if (PAGE_FILE_NAMES.has(fileName))
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
18
35
|
}
|
|
19
36
|
/**
|
|
20
37
|
* Split glossary entries into components (JSX-returning) and functions (everything else).
|
|
@@ -40,7 +57,7 @@ export function classifyGlossaryEntries(entries) {
|
|
|
40
57
|
* @param scenarioCounts - Map of component_name → number of registered scenarios
|
|
41
58
|
* @param testFileExistence - Map of testFile path → whether the file exists on disk
|
|
42
59
|
*/
|
|
43
|
-
export function computeAudit({ components, functions, scenarioCounts, testFileExistence, testResults, clientErrors, totalScenarioCounts, entityChangeStatus, }) {
|
|
60
|
+
export function computeAudit({ components, functions, scenarioCounts, testFileExistence, testResults, clientErrors, totalScenarioCounts, entityChangeStatus, analysisFailedEntities, testCaseCounts, }) {
|
|
44
61
|
const componentResults = components.map((c) => {
|
|
45
62
|
const count = scenarioCounts[c.name] || 0;
|
|
46
63
|
const totalCount = totalScenarioCounts?.[c.name] || 0;
|
|
@@ -48,7 +65,10 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
48
65
|
const errors = clientErrors?.[c.name];
|
|
49
66
|
const hasErrors = count > 0 && errors && errors.length > 0;
|
|
50
67
|
let status;
|
|
51
|
-
if (
|
|
68
|
+
if (analysisFailedEntities?.has(c.name)) {
|
|
69
|
+
status = 'analysis_failed';
|
|
70
|
+
}
|
|
71
|
+
else if (count === 0) {
|
|
52
72
|
// Entities with existing scenarios from prior sessions don't need
|
|
53
73
|
// new scenarios — they need recapture. This applies to both "edited"
|
|
54
74
|
// and "impacted" entities: an edited page may not have been re-registered
|
|
@@ -66,12 +86,33 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
66
86
|
else {
|
|
67
87
|
status = 'ok';
|
|
68
88
|
}
|
|
89
|
+
// Generate actionable hint for missing or needs_recapture components
|
|
90
|
+
let hint;
|
|
91
|
+
if (status === 'missing') {
|
|
92
|
+
const fileName = c.filePath.split('/').pop() || '';
|
|
93
|
+
if (fileName === 'layout.tsx' || fileName === 'layout.ts') {
|
|
94
|
+
hint = `This is a layout file — register an app-level scenario with pageFilePath instead of componentName: codeyam editor register '{"name":"${c.name} - Default","pageFilePath":"${c.filePath}","url":"/<route>","dimensions":["Desktop"]}'`;
|
|
95
|
+
}
|
|
96
|
+
else if (fileName === 'page.tsx' || fileName === 'page.ts') {
|
|
97
|
+
hint = `This is a page file — register an app-level scenario with pageFilePath: codeyam editor register '{"name":"${c.name} - Default","pageFilePath":"${c.filePath}","url":"/<route>","dimensions":["Desktop"]}'`;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
hint = `Register a component scenario via an isolation route: codeyam editor isolate ${c.name} then codeyam editor register '{"name":"${c.name} - Default","componentName":"${c.name}","url":"/isolated-components/${c.name}?s=Default","dimensions":["Desktop"]}'`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (status === 'needs_recapture') {
|
|
104
|
+
hint = `This component's code or dependencies changed — recapture existing scenarios to update screenshots: codeyam editor recapture ${c.name}`;
|
|
105
|
+
}
|
|
106
|
+
else if (status === 'analysis_failed') {
|
|
107
|
+
hint = `Analysis failed for this component (likely timed out due to complex dependencies). The component has partial data but may be missing some dependency schemas. Try re-analyzing: codeyam editor analyze-imports`;
|
|
108
|
+
}
|
|
69
109
|
return {
|
|
70
110
|
name: c.name,
|
|
71
111
|
filePath: c.filePath,
|
|
72
112
|
scenarioCount: status === 'needs_recapture' ? totalCount : count,
|
|
73
113
|
status,
|
|
74
114
|
...(hasErrors ? { clientErrors: errors } : {}),
|
|
115
|
+
...(hint ? { hint } : {}),
|
|
75
116
|
};
|
|
76
117
|
});
|
|
77
118
|
const functionResults = functions.map((f) => {
|
|
@@ -79,12 +120,17 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
79
120
|
? (testFileExistence[f.testFile] ?? false)
|
|
80
121
|
: false;
|
|
81
122
|
if (!exists) {
|
|
123
|
+
// Suggest conventional test file path when testFile isn't in the glossary
|
|
124
|
+
const suggestedTestFile = !f.testFile
|
|
125
|
+
? f.filePath.replace(/\.tsx?$/, '.test.ts')
|
|
126
|
+
: undefined;
|
|
82
127
|
return {
|
|
83
128
|
name: f.name,
|
|
84
129
|
filePath: f.filePath,
|
|
85
130
|
testFile: f.testFile,
|
|
86
131
|
testFileExists: false,
|
|
87
132
|
status: 'missing',
|
|
133
|
+
...(suggestedTestFile ? { suggestedTestFile } : {}),
|
|
88
134
|
};
|
|
89
135
|
}
|
|
90
136
|
// If we have test results for this file, use them for deeper status
|
|
@@ -112,6 +158,14 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
112
158
|
else {
|
|
113
159
|
status = 'ok';
|
|
114
160
|
}
|
|
161
|
+
// Generate actionable hint for non-ok functions
|
|
162
|
+
let hint;
|
|
163
|
+
if (status === 'name_mismatch') {
|
|
164
|
+
hint = `Tests pass but won't show in the CodeYam UI. Add a top-level describe("${f.name}", ...) block in ${f.testFile}`;
|
|
165
|
+
}
|
|
166
|
+
else if (status === 'runner_error' && tr.errorMessage) {
|
|
167
|
+
hint = `Test runner crashed (not a test failure): ${tr.errorMessage}`;
|
|
168
|
+
}
|
|
115
169
|
return {
|
|
116
170
|
name: f.name,
|
|
117
171
|
filePath: f.filePath,
|
|
@@ -121,17 +175,23 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
121
175
|
testsVisibleInUi: tr.hasEntityNameDescribe,
|
|
122
176
|
status,
|
|
123
177
|
...(tr.errorMessage ? { errorMessage: tr.errorMessage } : {}),
|
|
178
|
+
...(hint ? { hint } : {}),
|
|
179
|
+
...(testCaseCounts?.[f.name] !== undefined
|
|
180
|
+
? { testCaseCount: testCaseCounts[f.name] }
|
|
181
|
+
: {}),
|
|
124
182
|
};
|
|
125
183
|
});
|
|
126
|
-
const componentsOk = componentResults.filter((c) => c.status === 'ok'
|
|
184
|
+
const componentsOk = componentResults.filter((c) => c.status === 'ok').length;
|
|
127
185
|
const componentsWithErrors = componentResults.filter((c) => c.status === 'has_errors').length;
|
|
128
186
|
const componentsMissing = componentResults.filter((c) => c.status === 'missing').length;
|
|
129
187
|
const componentsNeedingRecapture = componentResults.filter((c) => c.status === 'needs_recapture').length;
|
|
188
|
+
const componentsAnalysisFailed = componentResults.filter((c) => c.status === 'analysis_failed').length;
|
|
130
189
|
const functionsOk = functionResults.filter((f) => f.status === 'ok').length;
|
|
131
190
|
const functionsFailing = functionResults.filter((f) => f.status === 'failing').length;
|
|
132
191
|
const functionsRunnerError = functionResults.filter((f) => f.status === 'runner_error').length;
|
|
133
192
|
const functionsNameMismatch = functionResults.filter((f) => f.status === 'name_mismatch').length;
|
|
134
193
|
const functionsMissing = functionResults.filter((f) => f.status === 'missing').length;
|
|
194
|
+
const functionsThinCoverage = functionResults.filter((f) => f.status === 'ok' && f.testCaseCount !== undefined && f.testCaseCount < 3).length;
|
|
135
195
|
return {
|
|
136
196
|
components: componentResults,
|
|
137
197
|
functions: functionResults,
|
|
@@ -141,14 +201,17 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
141
201
|
componentsMissing,
|
|
142
202
|
componentsWithErrors,
|
|
143
203
|
componentsNeedingRecapture,
|
|
204
|
+
componentsAnalysisFailed,
|
|
144
205
|
totalFunctions: functionResults.length,
|
|
145
206
|
functionsOk,
|
|
146
207
|
functionsMissing,
|
|
147
208
|
functionsFailing,
|
|
148
209
|
functionsRunnerError,
|
|
149
210
|
functionsNameMismatch,
|
|
211
|
+
functionsThinCoverage,
|
|
150
212
|
allPassing: componentsMissing === 0 &&
|
|
151
213
|
componentsWithErrors === 0 &&
|
|
214
|
+
componentsAnalysisFailed === 0 &&
|
|
152
215
|
functionsFailing === 0 &&
|
|
153
216
|
functionsRunnerError === 0 &&
|
|
154
217
|
functionsNameMismatch === 0 &&
|
|
@@ -157,32 +220,167 @@ export function computeAudit({ components, functions, scenarioCounts, testFileEx
|
|
|
157
220
|
};
|
|
158
221
|
}
|
|
159
222
|
/**
|
|
160
|
-
* Returns true when the audit failure can be auto-fixed
|
|
161
|
-
*
|
|
162
|
-
*
|
|
223
|
+
* Returns true when the audit failure can be auto-fixed inline.
|
|
224
|
+
*
|
|
225
|
+
* Always returns false — full analyze-imports takes minutes on large projects
|
|
226
|
+
* and must never run as part of the audit. The audit only does lightweight
|
|
227
|
+
* entity SHA backfill. Users should run `codeyam editor analyze-imports`
|
|
228
|
+
* separately if incomplete entities persist.
|
|
163
229
|
*/
|
|
164
|
-
export function isAutoRemediable(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
230
|
+
export function isAutoRemediable(_summary, _alreadyAttempted) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Determine whether the audit should auto-recapture stale scenarios.
|
|
235
|
+
* Returns true when the `--fix` flag is set AND there are stale scenarios.
|
|
236
|
+
*/
|
|
237
|
+
export function shouldAutoRecapture(params) {
|
|
238
|
+
return params.fix && params.scenariosNeedingRecapture.length > 0;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Extract unique file paths that need targeted analysis from audit results.
|
|
242
|
+
*
|
|
243
|
+
* After a DB-only backfill attempt fails, these are the files that need
|
|
244
|
+
* `analyze-imports` to create entity records. Unlike full analyze-imports
|
|
245
|
+
* (which scans ALL glossary + page files), this returns only the specific
|
|
246
|
+
* files that have unresolved associations — typically 1-3 files.
|
|
247
|
+
*/
|
|
248
|
+
export function determineTargetedAnalysisPaths(auditData) {
|
|
249
|
+
const paths = new Set();
|
|
250
|
+
for (const u of auditData.unassociatedScenarios) {
|
|
251
|
+
if (u.filePath)
|
|
252
|
+
paths.add(u.filePath);
|
|
253
|
+
}
|
|
254
|
+
for (const e of auditData.incompleteEntities) {
|
|
255
|
+
if (e.filePath)
|
|
256
|
+
paths.add(e.filePath);
|
|
257
|
+
}
|
|
258
|
+
return [...paths];
|
|
170
259
|
}
|
|
171
260
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
261
|
+
* Generate clear, actionable guidance for an incomplete entity.
|
|
262
|
+
*
|
|
263
|
+
* Tells Claude exactly what's wrong, whether it's pre-existing, and
|
|
264
|
+
* the exact command to fix it — no guessing required.
|
|
265
|
+
*/
|
|
266
|
+
export function formatIncompleteEntityGuidance(entity) {
|
|
267
|
+
const parts = [];
|
|
268
|
+
if (entity.preExisting) {
|
|
269
|
+
parts.push(`${entity.name}: ${entity.scenarioCount} scenario(s) without import graph (pre-existing issue, not from this session).`);
|
|
270
|
+
parts.push(`This is non-blocking — the entity had scenarios before this session but analyze-imports was never run for it.`);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
parts.push(`${entity.name}: ${entity.scenarioCount} scenario(s) without import graph — analyze-imports has not been run for this entity.`);
|
|
274
|
+
parts.push(`The entity has scenarios registered but its import graph is not built, so the editor cannot track its dependencies.`);
|
|
275
|
+
}
|
|
276
|
+
parts.push(`Fix: Run \`codeyam editor analyze-imports\` to build the import graph for all entities.`);
|
|
277
|
+
return parts.join(' ');
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Generate step-by-step manual analysis instructions for an entity
|
|
281
|
+
* whose automated analysis has persistently failed.
|
|
282
|
+
*
|
|
283
|
+
* Used by the audit when analysis-failures.json contains the entity.
|
|
284
|
+
* Tells Claude exactly how to read the source, gather imports/types,
|
|
285
|
+
* and run `codeyam editor manual-entity` to unblock the audit.
|
|
286
|
+
*/
|
|
287
|
+
export function formatManualAnalysisGuidance(entity) {
|
|
288
|
+
const lines = [];
|
|
289
|
+
lines.push(`${entity.name}: ${entity.scenarioCount} scenario(s) — automated analysis failed`);
|
|
290
|
+
lines.push(`Error: ${entity.error}`);
|
|
291
|
+
lines.push('');
|
|
292
|
+
lines.push('MANUAL ANALYSIS REQUIRED — follow these steps:');
|
|
293
|
+
lines.push(`1. Read ${entity.filePath}`);
|
|
294
|
+
lines.push('2. Identify which glossary entities it imports (check .codeyam/glossary.json)');
|
|
295
|
+
lines.push('3. Determine entity type: "visual" if it returns JSX, "library" otherwise');
|
|
296
|
+
lines.push('4. Identify the type structure:');
|
|
297
|
+
lines.push(' - For components: props interface and hook return types');
|
|
298
|
+
lines.push(' - For functions: parameter types and return type');
|
|
299
|
+
lines.push(`5. Write the JSON to .codeyam/tmp/manual-entity.json then run: codeyam editor manual-entity @.codeyam/tmp/manual-entity.json`);
|
|
300
|
+
return lines.join('\n');
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Resolve incomplete entity SHAs to their source file paths.
|
|
304
|
+
*
|
|
305
|
+
* Used by the audit to run targeted analysis on just the files that need it,
|
|
306
|
+
* instead of scanning all 117+ project files. Returns deduplicated file paths.
|
|
307
|
+
*/
|
|
308
|
+
export async function getIncompleteEntityFilePaths(db, incompleteEntities) {
|
|
309
|
+
if (incompleteEntities.length === 0)
|
|
310
|
+
return [];
|
|
311
|
+
const shas = incompleteEntities.map((e) => e.entitySha);
|
|
312
|
+
const rows = await db
|
|
313
|
+
.selectFrom('entities')
|
|
314
|
+
.select('file_path')
|
|
315
|
+
.where('sha', 'in', shas)
|
|
316
|
+
.execute();
|
|
317
|
+
const paths = new Set();
|
|
318
|
+
for (const row of rows) {
|
|
319
|
+
if (row.file_path)
|
|
320
|
+
paths.add(row.file_path);
|
|
321
|
+
}
|
|
322
|
+
return [...paths];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Returns true when the only audit failures are auto-fixable entity issues
|
|
326
|
+
* (incompleteEntities and/or unassociatedScenarios) — all other failure
|
|
327
|
+
* counts are zero. Used to decide whether auto-running analyze-imports +
|
|
328
|
+
* entity SHA sync can fix the audit without manual intervention.
|
|
175
329
|
*/
|
|
176
330
|
export function isOnlyIncompleteEntities(summary) {
|
|
177
331
|
return ((summary.componentsMissing ?? 0) === 0 &&
|
|
178
332
|
(summary.componentsWithErrors ?? 0) === 0 &&
|
|
179
333
|
(summary.functionsFailing ?? 0) === 0 &&
|
|
334
|
+
(summary.functionsRunnerError ?? 0) === 0 &&
|
|
180
335
|
(summary.functionsNameMismatch ?? 0) === 0 &&
|
|
181
336
|
(summary.functionsMissing ?? 0) === 0 &&
|
|
182
337
|
(summary.missingFromGlossary ?? 0) === 0 &&
|
|
183
338
|
(summary.miscategorizedScenarios ?? 0) === 0 &&
|
|
184
339
|
(summary.scenariosNeedingRecapture ?? 0) === 0);
|
|
185
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Returns true when the only audit failures are incomplete entities that ALL
|
|
343
|
+
* existed before the current session. Used by the step gate to avoid blocking
|
|
344
|
+
* progress on pre-existing issues the user didn't cause.
|
|
345
|
+
*
|
|
346
|
+
* Requires both the summary (to confirm no other failure types) and the
|
|
347
|
+
* incompleteEntities array (to verify every entry is pre-existing).
|
|
348
|
+
*/
|
|
349
|
+
export function isOnlyPreExistingIncomplete(summary, incompleteEntities) {
|
|
350
|
+
// Must have at least one incomplete entity to be relevant
|
|
351
|
+
if (!incompleteEntities || incompleteEntities.length === 0)
|
|
352
|
+
return false;
|
|
353
|
+
// All other failure types must be zero
|
|
354
|
+
if (!isOnlyIncompleteEntities(summary))
|
|
355
|
+
return false;
|
|
356
|
+
// Every incomplete entity must be pre-existing
|
|
357
|
+
return incompleteEntities.every((e) => e.preExisting);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Filter a list of file paths to only those that need analysis.
|
|
361
|
+
*
|
|
362
|
+
* A file is excluded if ANY entity at that file path has an analysis
|
|
363
|
+
* record (direct or inherited from a sibling version with the same
|
|
364
|
+
* name+filePath). Everything else passes through.
|
|
365
|
+
*
|
|
366
|
+
* Used by handleAnalyzeImports to avoid re-analyzing ~120 files when
|
|
367
|
+
* only a few need it.
|
|
368
|
+
*/
|
|
369
|
+
export async function filterToIncompleteFilePaths(db, _projectId, allFilePaths) {
|
|
370
|
+
if (allFilePaths.length === 0)
|
|
371
|
+
return [];
|
|
372
|
+
// Single query: find all file paths that have at least one entity
|
|
373
|
+
// with an analysis record. These are already analyzed and can be skipped.
|
|
374
|
+
const analyzedRows = await db
|
|
375
|
+
.selectFrom('entities')
|
|
376
|
+
.innerJoin('analyses', 'analyses.entity_sha', 'entities.sha')
|
|
377
|
+
.select('entities.file_path')
|
|
378
|
+
.where('entities.file_path', 'in', allFilePaths)
|
|
379
|
+
.groupBy('entities.file_path')
|
|
380
|
+
.execute();
|
|
381
|
+
const analyzedFilePaths = new Set(analyzedRows.map((r) => r.file_path));
|
|
382
|
+
return allFilePaths.filter((fp) => !analyzedFilePaths.has(fp));
|
|
383
|
+
}
|
|
186
384
|
/**
|
|
187
385
|
* Ensures the two audit filters — glossary scoping and scenario-count scoping —
|
|
188
386
|
* are consistent. When entityChangeStatus is empty/undefined (meaning the glossary
|
|
@@ -298,7 +496,7 @@ export async function queryIncompleteEntities(db, projectId, featureStartedAt) {
|
|
|
298
496
|
const name = entityNameMap.get(sha);
|
|
299
497
|
const filePath = entityFilePathMap.get(sha);
|
|
300
498
|
if (!name)
|
|
301
|
-
return
|
|
499
|
+
return false; // No entity record (phantom SHA) — skip, not fixable by analysis
|
|
302
500
|
const key = `${name}::${filePath}`;
|
|
303
501
|
return !keysWithInheritedAnalyses.has(key);
|
|
304
502
|
});
|
|
@@ -466,6 +664,72 @@ export async function queryPageScenarioCounts(db, projectId, featureStartedAt) {
|
|
|
466
664
|
}
|
|
467
665
|
return counts;
|
|
468
666
|
}
|
|
667
|
+
// ─── Unassociated Scenarios ───────────────────────────────────────────
|
|
668
|
+
/**
|
|
669
|
+
* Find scenarios with NULL entity_sha that have a file path
|
|
670
|
+
* (component_path or page_file_path). These scenarios were registered
|
|
671
|
+
* before entity records existed in the DB — typically because a subagent
|
|
672
|
+
* registered scenarios without running analyze-imports first.
|
|
673
|
+
*
|
|
674
|
+
* Fix: run `codeyam editor analyze-imports` to create entity records,
|
|
675
|
+
* then entity_sha backfill will associate them automatically.
|
|
676
|
+
*
|
|
677
|
+
* Optionally scoped to the current feature session via featureStartedAt.
|
|
678
|
+
*/
|
|
679
|
+
export async function queryUnassociatedScenarios(db, projectId, featureStartedAt) {
|
|
680
|
+
let query = db
|
|
681
|
+
.selectFrom('editor_scenarios')
|
|
682
|
+
.select(['component_name', 'component_path', 'page_file_path', 'name'])
|
|
683
|
+
.where('project_id', '=', projectId)
|
|
684
|
+
.where('entity_sha', 'is', null)
|
|
685
|
+
.where((eb) => eb.or([
|
|
686
|
+
eb('component_path', 'is not', null),
|
|
687
|
+
eb('page_file_path', 'is not', null),
|
|
688
|
+
]));
|
|
689
|
+
if (featureStartedAt) {
|
|
690
|
+
const sqliteTimestamp = featureStartedAt
|
|
691
|
+
.replace('T', ' ')
|
|
692
|
+
.replace(/\.\d{3}Z$/, '');
|
|
693
|
+
query = query.where((eb) => eb.or([
|
|
694
|
+
eb('created_at', '>=', sqliteTimestamp),
|
|
695
|
+
eb('updated_at', '>=', sqliteTimestamp),
|
|
696
|
+
]));
|
|
697
|
+
}
|
|
698
|
+
const rows = await query.execute();
|
|
699
|
+
if (rows.length === 0)
|
|
700
|
+
return [];
|
|
701
|
+
// Group by file path (component_path or page_file_path)
|
|
702
|
+
const groups = new Map();
|
|
703
|
+
for (const row of rows) {
|
|
704
|
+
const r = row;
|
|
705
|
+
const filePath = r.component_path || r.page_file_path;
|
|
706
|
+
const existing = groups.get(filePath);
|
|
707
|
+
if (existing) {
|
|
708
|
+
existing.scenarioNames.push(r.name);
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
// Derive a display name: use component_name if available,
|
|
712
|
+
// otherwise extract from file path (e.g., "src/lib/LibraryApp.tsx" → "LibraryApp")
|
|
713
|
+
const displayName = r.component_name ||
|
|
714
|
+
filePath
|
|
715
|
+
.split('/')
|
|
716
|
+
.pop()
|
|
717
|
+
?.replace(/\.\w+$/, '') ||
|
|
718
|
+
filePath;
|
|
719
|
+
groups.set(filePath, {
|
|
720
|
+
name: displayName,
|
|
721
|
+
filePath,
|
|
722
|
+
scenarioNames: [r.name],
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return [...groups.values()].map((g) => ({
|
|
727
|
+
name: g.name,
|
|
728
|
+
filePath: g.filePath,
|
|
729
|
+
scenarioCount: g.scenarioNames.length,
|
|
730
|
+
scenarioNames: g.scenarioNames,
|
|
731
|
+
}));
|
|
732
|
+
}
|
|
469
733
|
// ─── Duplicate Name Detection ─────────────────────────────────────────
|
|
470
734
|
/**
|
|
471
735
|
* Detect glossary entries that share the same `name`.
|
|
@@ -515,6 +779,10 @@ export function identifyScenariosNeedingRecapture(params) {
|
|
|
515
779
|
const changeStatus = entityChangeStatus[scenario.entityName];
|
|
516
780
|
if (!changeStatus)
|
|
517
781
|
continue;
|
|
782
|
+
// "new" entities need initial scenario creation, not recapture.
|
|
783
|
+
// Only "edited" and "impacted" entities have stale screenshots.
|
|
784
|
+
if (changeStatus.status === 'new')
|
|
785
|
+
continue;
|
|
518
786
|
result.push({
|
|
519
787
|
scenarioName: scenario.name,
|
|
520
788
|
entityName: scenario.entityName,
|
|
@@ -523,4 +791,59 @@ export function identifyScenariosNeedingRecapture(params) {
|
|
|
523
791
|
}
|
|
524
792
|
return result;
|
|
525
793
|
}
|
|
794
|
+
// ─── Client Error Aggregation ─────────────────────────────────────────
|
|
795
|
+
/**
|
|
796
|
+
* Aggregate client errors by component name using scenario metadata.
|
|
797
|
+
*
|
|
798
|
+
* Given a map of scenario ID → { scenarioName, errors } and a list of
|
|
799
|
+
* scenario metadata (with componentName from the DB), group errors by
|
|
800
|
+
* the component they belong to.
|
|
801
|
+
*
|
|
802
|
+
* For component scenarios: use the `componentName` field directly.
|
|
803
|
+
* For app-level scenarios (no componentName): derive the entity name
|
|
804
|
+
* using `scenarioEntityName()` — the same canonical function used by
|
|
805
|
+
* recapture detection and entity change status. This ensures the keys
|
|
806
|
+
* match what `computeAudit` checks against glossary entry names.
|
|
807
|
+
*
|
|
808
|
+
* This replaces the fragile "parse component name from scenario name"
|
|
809
|
+
* approach which fails for app-level scenarios like "Full Page with Library".
|
|
810
|
+
*/
|
|
811
|
+
export function aggregateClientErrorsByComponent(clientErrors, scenarioMetadata) {
|
|
812
|
+
const result = {};
|
|
813
|
+
// Build a lookup from scenario name → component/entity name.
|
|
814
|
+
// Uses scenarioEntityName() for consistency with the rest of the system
|
|
815
|
+
// (recapture detection, entity change status, journal filtering).
|
|
816
|
+
const scenarioToComponent = new Map();
|
|
817
|
+
for (const meta of scenarioMetadata) {
|
|
818
|
+
const entityName = scenarioEntityName({
|
|
819
|
+
componentName: meta.componentName,
|
|
820
|
+
pageFilePath: meta.pageFilePath,
|
|
821
|
+
url: meta.url,
|
|
822
|
+
});
|
|
823
|
+
if (entityName) {
|
|
824
|
+
scenarioToComponent.set(meta.name, entityName);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
for (const [, data] of Object.entries(clientErrors)) {
|
|
828
|
+
if (data.errors.length === 0)
|
|
829
|
+
continue;
|
|
830
|
+
// First try: look up via scenario metadata (authoritative)
|
|
831
|
+
let componentName = scenarioToComponent.get(data.scenarioName);
|
|
832
|
+
// Fallback: parse from scenario name convention "ComponentName - Variant"
|
|
833
|
+
if (!componentName) {
|
|
834
|
+
const dashIndex = data.scenarioName.indexOf(' - ');
|
|
835
|
+
componentName =
|
|
836
|
+
dashIndex >= 0
|
|
837
|
+
? data.scenarioName.slice(0, dashIndex)
|
|
838
|
+
: data.scenarioName;
|
|
839
|
+
}
|
|
840
|
+
if (componentName) {
|
|
841
|
+
if (!result[componentName]) {
|
|
842
|
+
result[componentName] = [];
|
|
843
|
+
}
|
|
844
|
+
result[componentName].push(...data.errors);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return result;
|
|
848
|
+
}
|
|
526
849
|
//# sourceMappingURL=editorAudit.js.map
|