@codeyam/codeyam-cli 0.1.0-staging.1 → 0.1.0-staging.28f73cf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +8 -7
- package/analyzer-template/packages/ai/index.ts +2 -1
- package/analyzer-template/packages/ai/package.json +2 -2
- package/analyzer-template/packages/ai/scripts/ai-test-matrix.mjs +424 -0
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +24 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +6 -16
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +197 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/paths.ts +28 -2
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +127 -4
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +1 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +1821 -542
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.ts +138 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +139 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/DebugTracer.ts +224 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/PathManager.ts +203 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/README.md +294 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +161 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.ts +235 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +14 -6
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/selectBestValue.ts +70 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.ts +113 -0
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +36 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityDocumentation.ts +20 -2
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +51 -107
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +56 -160
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +79 -265
- package/analyzer-template/packages/ai/src/lib/generateEntityDocumentation.ts +16 -2
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +53 -176
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +53 -154
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +84 -254
- package/analyzer-template/packages/ai/src/lib/generateStatementAnalysis.ts +48 -71
- package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +27 -6
- package/analyzer-template/packages/ai/src/lib/getLLMCallStats.ts +0 -14
- package/analyzer-template/packages/ai/src/lib/modelInfo.ts +15 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +42 -4
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityDocumentationGenerator.ts +8 -33
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +54 -62
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +93 -109
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityDocumentationGenerator.ts +8 -27
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +33 -38
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +30 -30
- package/analyzer-template/packages/ai/src/lib/types/index.ts +2 -0
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +39 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +52 -6
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +238 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.ts +25 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/index.ts +2 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +8 -10
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +6 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +8 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.ts +5 -13
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +34 -15
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +17 -3
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +35 -16
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +7 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +6 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +15 -7
- package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.d.ts +23 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.d.ts.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.js +30 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/getPresignedUrl.js.map +1 -0
- package/analyzer-template/packages/aws/package.json +5 -4
- package/analyzer-template/packages/aws/s3/index.ts +4 -0
- package/analyzer-template/packages/aws/src/lib/s3/getPresignedUrl.ts +62 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +28 -21
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.ts +18 -11
- package/analyzer-template/packages/generate/src/lib/scenarioComponent.ts +6 -3
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +28 -21
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.js +18 -11
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.js +5 -3
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponent.js.map +1 -1
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.js +3 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tableRelations.d.ts +2 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tableRelations.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.d.ts +37 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.js +27 -0
- package/analyzer-template/packages/github/dist/supabase/src/lib/kysely/tables/debugReportsTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/utils/index.d.ts +2 -0
- package/analyzer-template/packages/github/dist/utils/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/index.js +2 -0
- package/analyzer-template/packages/github/dist/utils/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.d.ts +25 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.js +40 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/Semaphore.js.map +1 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js +5 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.js +2 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.d.ts +12 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.js +32 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.js.map +1 -0
- package/analyzer-template/packages/supabase/src/lib/kysely/db.ts +6 -0
- package/analyzer-template/packages/supabase/src/lib/kysely/tableRelations.ts +3 -0
- package/analyzer-template/packages/supabase/src/lib/kysely/tables/debugReportsTable.ts +61 -0
- package/analyzer-template/packages/ui-components/src/scenario-editor/components/DataItemEditor.tsx +1 -1
- package/analyzer-template/packages/utils/dist/utils/index.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/utils/index.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/index.js +2 -0
- package/analyzer-template/packages/utils/dist/utils/index.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.d.ts +25 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.d.ts.map +1 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.js +40 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/Semaphore.js.map +1 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js +5 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.js +2 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/nextRouteFileNameToRoute.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.d.ts +12 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.d.ts.map +1 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.js +32 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/sanitizeNextRouteSegments.js.map +1 -0
- package/analyzer-template/packages/utils/index.ts +2 -0
- package/analyzer-template/packages/utils/src/lib/Semaphore.ts +42 -0
- package/analyzer-template/packages/utils/src/lib/frameworks/getNextRoutePath.ts +8 -3
- package/analyzer-template/packages/utils/src/lib/frameworks/getRemixRoutePath.ts +2 -1
- package/analyzer-template/packages/utils/src/lib/frameworks/nextRouteFileNameToRoute.ts +2 -1
- package/analyzer-template/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.ts +1 -0
- package/analyzer-template/packages/utils/src/lib/frameworks/sanitizeNextRouteSegments.ts +33 -0
- package/analyzer-template/project/constructMockCode.ts +170 -6
- package/analyzer-template/project/reconcileMockDataKeys.ts +13 -0
- package/analyzer-template/project/start.ts +1 -11
- package/analyzer-template/project/startScenarioCapture.ts +24 -0
- package/analyzer-template/project/trackGeneratedFiles.ts +41 -0
- package/analyzer-template/project/writeMockDataTsx.ts +125 -4
- package/analyzer-template/project/writeScenarioComponents.ts +199 -45
- package/analyzer-template/project/writeUniversalMocks.ts +72 -10
- package/background/src/lib/virtualized/project/constructMockCode.js +158 -7
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +12 -0
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +1 -8
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +18 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/trackGeneratedFiles.js +30 -0
- package/background/src/lib/virtualized/project/trackGeneratedFiles.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +95 -3
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +144 -28
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeUniversalMocks.js +59 -9
- package/background/src/lib/virtualized/project/writeUniversalMocks.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +288 -0
- package/codeyam-cli/scripts/apply-setup.js.map +1 -0
- package/codeyam-cli/scripts/extract-setup.js +130 -0
- package/codeyam-cli/scripts/extract-setup.js.map +1 -0
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +238 -0
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +1 -0
- package/codeyam-cli/src/cli.js +6 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/codeyam-cli.js +0 -0
- package/codeyam-cli/src/commands/debug.js +221 -0
- package/codeyam-cli/src/commands/debug.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +4 -23
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/report.js +102 -0
- package/codeyam-cli/src/commands/report.js.map +1 -0
- package/codeyam-cli/src/commands/setup-sandbox.js +164 -0
- package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/cleanupAnalysisFiles.test.js +6 -6
- package/codeyam-cli/src/utils/__tests__/cleanupAnalysisFiles.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +8 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +4 -3
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +30 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +25 -5
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/cleanupAnalysisFiles.js +2 -2
- package/codeyam-cli/src/utils/cleanupAnalysisFiles.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +75 -5
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +219 -0
- package/codeyam-cli/src/utils/generateReport.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +7 -0
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/job.pidTracking.test.js +1 -0
- package/codeyam-cli/src/utils/queue/__tests__/job.pidTracking.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +8 -3
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +4 -0
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/webappDetection.js +2 -1
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +63 -2
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +15 -35
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-D5ZHFomX.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-Dh-FldQK.js → InteractivePreview-XDSzQLOY.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-BYVx9KFp.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-Dp6DC845.js → LogViewer-CRcT5fOZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-BORLgi0X.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-Bual6h18.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bi-YUMa-.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-4D2vLLJz.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/_index-BC200mfN.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CxvZPkCv.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.generate-report-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chart-column-B2I7jQx2.js → chart-column-B8fb6wnw.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-WWGJGFF6-De6i8FUT.js +26 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-alert-GwwOAbhw.js → circle-alert-IdsgAK39.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-BACUUf75.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/clock-vWeoCemX.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CS7XDrKv.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DIOEw_3i.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-1Z6D0fLM.js → entity._sha._-8Els_3Wb.js} +10 -10
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-C3FZJx1w.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-YJz_igar.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/entityStatus-BEqj2qBy.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entityVersioning-DO2gCvXv.js → entityVersioning-Bk_YB1jM.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-DiP0q291.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/file-text-LM0mgxXE.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/files-Dxh9CcaV.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-BXmqrWCH.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-BGS74ED-.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-D-zYbzFZ.js +8 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-DN7Vr40D.js → loader-circle-BXPKbHEb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-1af162d4.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-DB7VgjCY.js +16 -0
- package/codeyam-cli/src/webserver/build/client/assets/{settings-MZc4XdmE.js → settings-5zF_GOcS.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-Dc4MlMpK.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-BQ-02-jB.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-D7k-ArFa.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-BBlyqxij.js → useLastLogLine-AlhS7g5F.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-Ddo4UQv7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{zap-B4gsLUZQ.js → zap-_jw-9DCp.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-D4JpXSIO.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-vwbN7n65.js +169 -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/server.js +1 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/templates/codeyam-setup-skill.md +85 -94
- package/codeyam-cli/templates/debug-command.md +125 -0
- package/package.json +9 -11
- package/packages/ai/index.js +1 -2
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +13 -0
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +6 -15
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/methodSemantics.js +134 -0
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/paths.js +28 -3
- package/packages/ai/src/lib/astScopes/paths.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +111 -3
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/checkAllAttributes.js +1 -3
- package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1320 -396
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.js +137 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/FunctionCallManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +112 -0
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/DebugTracer.js +176 -0
- package/packages/ai/src/lib/dataStructure/helpers/DebugTracer.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/PathManager.js +178 -0
- package/packages/ai/src/lib/dataStructure/helpers/PathManager.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +138 -0
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.js +199 -0
- package/packages/ai/src/lib/dataStructure/helpers/VisitedTracker.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +14 -6
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/selectBestValue.js +62 -0
- package/packages/ai/src/lib/dataStructure/helpers/selectBestValue.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.js +90 -0
- package/packages/ai/src/lib/dataStructure/helpers/uniqueIdUtils.js.map +1 -0
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +22 -0
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityDocumentation.js +19 -1
- package/packages/ai/src/lib/generateChangesEntityDocumentation.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +51 -107
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +55 -156
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +79 -262
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDocumentation.js +15 -1
- package/packages/ai/src/lib/generateEntityDocumentation.js.map +1 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +53 -176
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +52 -152
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +88 -258
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateStatementAnalysis.js +46 -71
- package/packages/ai/src/lib/generateStatementAnalysis.js.map +1 -1
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js +13 -8
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
- package/packages/ai/src/lib/getLLMCallStats.js +0 -14
- package/packages/ai/src/lib/getLLMCallStats.js.map +1 -1
- package/packages/ai/src/lib/modelInfo.js +15 -0
- package/packages/ai/src/lib/modelInfo.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +36 -3
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityDocumentationGenerator.js +8 -33
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityDocumentationGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +35 -41
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +59 -72
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityDocumentationGenerator.js +8 -27
- package/packages/ai/src/lib/promptGenerators/generateEntityDocumentationGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +24 -27
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +21 -22
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/types/index.js +2 -0
- package/packages/ai/src/lib/types/index.js.map +1 -1
- package/packages/ai/src/lib/worker/SerializableDataStructure.js +7 -0
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +45 -5
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/index.js +2 -1
- package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +191 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js +16 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js.map +1 -0
- package/packages/analyze/src/lib/asts/sourceFiles/index.js +2 -0
- package/packages/analyze/src/lib/asts/sourceFiles/index.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +6 -8
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +5 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +8 -2
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js +5 -8
- package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +21 -9
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +10 -4
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +21 -9
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +6 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +9 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +5 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +9 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +16 -7
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +28 -21
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.js +18 -11
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageRemix.js.map +1 -1
- package/packages/generate/src/lib/scenarioComponent.js +5 -3
- package/packages/generate/src/lib/scenarioComponent.js.map +1 -1
- package/packages/supabase/src/lib/kysely/db.js +3 -0
- package/packages/supabase/src/lib/kysely/db.js.map +1 -1
- package/packages/supabase/src/lib/kysely/tables/debugReportsTable.js +27 -0
- package/packages/supabase/src/lib/kysely/tables/debugReportsTable.js.map +1 -0
- package/packages/utils/index.js +2 -0
- package/packages/utils/index.js.map +1 -1
- package/packages/utils/src/lib/Semaphore.js +40 -0
- package/packages/utils/src/lib/Semaphore.js.map +1 -0
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js +5 -3
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/packages/utils/src/lib/frameworks/getRemixRoutePath.js +2 -1
- package/packages/utils/src/lib/frameworks/getRemixRoutePath.js.map +1 -1
- package/packages/utils/src/lib/frameworks/nextRouteFileNameToRoute.js +2 -1
- package/packages/utils/src/lib/frameworks/nextRouteFileNameToRoute.js.map +1 -1
- package/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.js +1 -0
- package/packages/utils/src/lib/frameworks/remixRouteFileNameToRoute.js.map +1 -1
- package/packages/utils/src/lib/frameworks/sanitizeNextRouteSegments.js +32 -0
- package/packages/utils/src/lib/frameworks/sanitizeNextRouteSegments.js.map +1 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityDataMap.ts +0 -375
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-GqWwt5wG.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-p0fuyqGQ.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-xwuhwsZH.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bl2IRh55.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-M2QuSHKC.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/_index-CAVtep9Q.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CLmzsLsT.js +0 -10
- package/codeyam-cli/src/webserver/build/client/assets/components-CAx5ONX_.js +0 -40
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CgyOwWip.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DGy3zrli.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-ChAdTrrU.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-D9L7267w.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-C6FRgjPr.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-C3-cQjgv.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-Dp4EB9nv.js +0 -12
- package/codeyam-cli/src/webserver/build/client/assets/globals-Da3jt49-.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-172a4629.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-COyVTsPq.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-CvyP_1Lo.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-Hbf8b7J_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-BMBi0VzO.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-C_VxoXTh.js +0 -1
- package/codeyam-cli/src/webserver/build/client/cy-logo-cli.svg +0 -13
- package/codeyam-cli/src/webserver/build/server/assets/index-eAULANMV.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-lutv16q5.js +0 -161
- package/codeyam-cli/src/webserver/public/cy-logo-cli.svg +0 -13
- package/packages/ai/src/lib/generateEntityDataMap.js +0 -335
- package/packages/ai/src/lib/generateEntityDataMap.js.map +0 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityDataMapGenerator.js +0 -17
- package/packages/ai/src/lib/promptGenerators/generateEntityDataMapGenerator.js.map +0 -1
|
@@ -57,8 +57,8 @@ export default async function generateEntityKeyAttributes({
|
|
|
57
57
|
staticAnalysisContext,
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
console.
|
|
61
|
-
console.
|
|
60
|
+
console.log('Generated prompt for generateEntityKeyAttributes:');
|
|
61
|
+
console.log(prompt);
|
|
62
62
|
|
|
63
63
|
const response = await completionCall({
|
|
64
64
|
type: `generateEntityKeyAttributes`,
|
|
@@ -151,224 +151,101 @@ export default async function generateEntityKeyAttributes({
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
const FRONTEND_SYSTEM_MESSAGE = `
|
|
154
|
+
const FRONTEND_SYSTEM_MESSAGE = `You analyze frontend components to identify key data attributes that significantly impact rendering.
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
## What Makes a Key Attribute
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
A key attribute is a data path from "Attributes and Value Types" that dramatically changes how the component renders:
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
- Controls a conditional that shows/hides significant UI sections
|
|
161
|
+
- Changes the component's primary visual state (not just minor text differences)
|
|
162
|
+
- Determines which branch of rendering logic executes
|
|
161
163
|
|
|
162
|
-
|
|
164
|
+
NOT key attributes:
|
|
165
|
+
- Values that only affect non-visible behavior (hrefs, image srcs)
|
|
166
|
+
- Fallback values that won't be used if primary values exist
|
|
167
|
+
- Values that would cause errors if changed
|
|
168
|
+
- Guard clauses that render literally nothing
|
|
163
169
|
|
|
164
|
-
|
|
170
|
+
## Conditional Key Attributes
|
|
165
171
|
|
|
166
|
-
|
|
172
|
+
We've provided a list of variables that are used in conditional statements in the code. These are very likely key attributes.
|
|
167
173
|
|
|
168
|
-
|
|
174
|
+
Each conditional lists it's source and how it is used. This should help you identify which attributes to include and what values to suggest.
|
|
169
175
|
|
|
170
|
-
|
|
176
|
+
## Path Format
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
Only return attributes from the "Attributes and Value Types" list — these are the only values we can control. Use the exact \`fullPath\` provided. Use \`functionCallReturnValue\` for function return values. Use \`[]\` for array items (e.g., \`items[]\`).
|
|
173
179
|
|
|
174
|
-
|
|
180
|
+
## Valid Value Options
|
|
175
181
|
|
|
176
|
-
-
|
|
182
|
+
- For \`validValueOptions\`, include boundary/extreme values that trigger different behavior
|
|
183
|
+
- Be very specific with values. Do not make them ambiguous in any way
|
|
184
|
+
— Do NOT include values that would cause unexpected/unhandled errors.
|
|
185
|
+
- Ensure all values or value ranges that will trigger different rendering behavior are included
|
|
177
186
|
|
|
178
|
-
|
|
187
|
+
## Response Format
|
|
179
188
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
- Changing the value of this variable will cause a guard clause around the whole method or function to be triggered that results in nothing at all being displayed.
|
|
183
|
-
|
|
184
|
-
- Changing the value of this variable will cause a minor change in display that is not significant (e.g. slightly different text).
|
|
185
|
-
|
|
186
|
-
- The value is used as a fallback or alternative for another value and won't even be used if the other value is present.
|
|
187
|
-
|
|
188
|
-
- The value changes non-visible behavior (e.g. the href in a link or src in an image - all images sources are mocked out).
|
|
189
|
-
|
|
190
|
-
## Instructions
|
|
191
|
-
|
|
192
|
-
- Read each line of code. Pay particular attention to the return value of the function and how this frontend component will be displayed. What will cause it display distinctly different but functional and robust results to the user?
|
|
193
|
-
- Find the most impactful key attributes that will change how the frontend component is displayed. This should be a limited subset of the "Attributes and Value Types" provided.
|
|
194
|
-
- Return each key attribute with the following information:
|
|
195
|
-
- \`fullPath\`: The fullPath to the data attribute in the code
|
|
196
|
-
- \`description\`: A short description of the data attribute and how it is used in the code.
|
|
197
|
-
- \`validValueOptions\`: A list of possible values for the data attribute that should be tested. This list should be minimal and only include values that the code will handle properly and will clearly make a difference in how the component is displayed. Do not make up arbitrary values without clear evidence that each different value will cause a different display behavior.
|
|
198
|
-
- List the key attributes in the order of importance (most important first, with importance determined by how much changing the attribute will impact how the component is displayed).
|
|
199
|
-
- Each attribute should reference exactly the full fullPath of a data attribute provided in the "Attributes and Value Types" section.
|
|
200
|
-
|
|
201
|
-
## Example
|
|
202
|
-
|
|
203
|
-
Given the following "Attributes and Value Types":
|
|
204
|
-
\`\`\`
|
|
205
|
-
'notification.read': { fullPath: 'signature[0].notification.read', type: 'boolean' }
|
|
206
|
-
'notification.message': { fullPath: 'signature[0].notification.message', type: 'string' }
|
|
207
|
-
\`\`\`
|
|
208
|
-
|
|
209
|
-
and code:
|
|
210
|
-
|
|
211
|
-
\`\`\`typescript
|
|
212
|
-
const NotificationText = (notification) => {
|
|
213
|
-
if (notification.read) {
|
|
214
|
-
return (
|
|
215
|
-
<span onClick={markAsRead(notification.id)}>
|
|
216
|
-
<img src={notification.icon} alt="Notification Icon" />
|
|
217
|
-
{notification.message}
|
|
218
|
-
</span>
|
|
219
|
-
);
|
|
220
|
-
} else {
|
|
221
|
-
return <strong>{notification.message}</strong>;
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
\`\`\`
|
|
225
|
-
|
|
226
|
-
The response might be:
|
|
189
|
+
List all key attributes in order from most impactful to least impactful regarding how dramatically they will change the rendering of the component using the following format:
|
|
227
190
|
|
|
228
191
|
\`\`\`json
|
|
229
192
|
{
|
|
230
193
|
"keyAttributes": [
|
|
231
194
|
{
|
|
232
|
-
"fullPath": "signature[0].
|
|
233
|
-
"description": "
|
|
234
|
-
"validValueOptions": [
|
|
235
|
-
"true",
|
|
236
|
-
"false"
|
|
237
|
-
]
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"fullPath": "signature[0].notification.message",
|
|
241
|
-
"description": "The message text is displayed and should be tested for various lengths.",
|
|
242
|
-
"validValueOptions": [
|
|
243
|
-
"An empty message (no characters)",
|
|
244
|
-
"A medium message (around 100 characters)",
|
|
245
|
-
"A long message (longer than 200 characters)"
|
|
246
|
-
]
|
|
195
|
+
"fullPath": "signature[0].user",
|
|
196
|
+
"description": "Controls whether the main form or redirect screen displays",
|
|
197
|
+
"validValueOptions": ["an empty object {}", "null/undefined"]
|
|
247
198
|
}
|
|
248
199
|
]
|
|
249
200
|
}
|
|
250
201
|
\`\`\`
|
|
251
|
-
|
|
252
|
-
## Important
|
|
253
|
-
|
|
254
|
-
- A key attribute must be an exact attribute fullPath from the "Attributes and Value Types" provided. Do not return any other attribute fullPaths. The only data we can provide to the function comes from these attributes so any other attribute is useless. For internally computed variables trace them back to one of the higher level variables that we can actually impact. Be sure to match the text from the attribute list exactly including spaces, commas, etc.
|
|
255
202
|
`;
|
|
256
203
|
|
|
257
|
-
const BACKEND_SYSTEM_MESSAGE = `
|
|
258
|
-
|
|
259
|
-
Can you help us identify the key data attributes in the code that will cause the function to return distinctly different but functional and robust results?
|
|
260
|
-
|
|
261
|
-
We're not interested in causing errors or in high-level guard clauses that result in nothing being returned. We're interested in always returning a robust result that demonstrates the core intent of the function.
|
|
204
|
+
const BACKEND_SYSTEM_MESSAGE = `You analyze backend functions to identify key data attributes that significantly impact behavior.
|
|
262
205
|
|
|
263
|
-
|
|
206
|
+
## What Makes a Key Attribute
|
|
264
207
|
|
|
265
|
-
|
|
208
|
+
A key attribute is a data path from "Attributes and Value Types" that dramatically changes the function's behavior:
|
|
266
209
|
|
|
267
|
-
|
|
210
|
+
- Controls a conditional that significantly alters execution flow or return value
|
|
211
|
+
- Determines which branch of logic executes
|
|
212
|
+
- For side-effect functions: changes how external systems are called (database, email, etc.)
|
|
268
213
|
|
|
269
|
-
|
|
214
|
+
NOT key attributes:
|
|
215
|
+
- Fallback values that won't be used if primary values exist
|
|
216
|
+
- Values that would cause errors if changed
|
|
217
|
+
- Guard clauses that return nothing/minimal data
|
|
270
218
|
|
|
271
|
-
|
|
219
|
+
## Conditional Key Attributes
|
|
272
220
|
|
|
273
|
-
|
|
221
|
+
We've provided a list of variables that are used in conditional statements in the code. These are very likely key attributes.
|
|
274
222
|
|
|
275
|
-
|
|
223
|
+
Each conditional lists it's source and how it is used. This should help you identify which attributes to include and what values to suggest.
|
|
276
224
|
|
|
277
|
-
|
|
225
|
+
## Path Format
|
|
278
226
|
|
|
279
|
-
|
|
227
|
+
Only return attributes from the "Attributes and Value Types" list — these are the only values we can control. Use the exact \`fullPath\` provided. Use \`functionCallReturnValue\` for function return values. Use \`[]\` for array items (e.g., \`items[]\`).
|
|
280
228
|
|
|
281
|
-
|
|
229
|
+
## Valid Value Options
|
|
282
230
|
|
|
283
|
-
-
|
|
231
|
+
- For \`validValueOptions\`, include boundary/extreme values that trigger different behavior
|
|
232
|
+
- Be very specific with values. Do not make them ambiguous in any way
|
|
233
|
+
— Do NOT include values that would cause unexpected/unhandled errors.
|
|
234
|
+
- Ensure all values or value ranges that will trigger different rendering behavior are included
|
|
284
235
|
|
|
285
|
-
|
|
236
|
+
## Response Format
|
|
286
237
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
- Changing the value of this variable will cause a guard clause to be triggered that results in nothing or very little being returned.
|
|
290
|
-
|
|
291
|
-
- The value is used as a fallback or alternative for another value and won't even be used if the other value is present.
|
|
292
|
-
|
|
293
|
-
## Instructions
|
|
294
|
-
|
|
295
|
-
- Read each line of code. Pay particular attention to the return value of the function. What data attributes will cause it to return distinctly different but functional and robust results?
|
|
296
|
-
- Find the most impactful key attributes that will impact the return value of the function. This should be a limited subset of the "Attributes and Value Types" provided.
|
|
297
|
-
- Return each key attribute with the following information:
|
|
298
|
-
- \`fullPath\`: The fullPath to the data attribute in the code
|
|
299
|
-
- \`description\`: A short description of the data attribute and how it is used in the code.
|
|
300
|
-
- \`validValueOptions\`: A list of possible values for the data attribute that should be tested. This list should be minimal and only include values that the code will handle properly and will clearly make a difference in the functions's behavior. Do not make up arbitrary values without clear evidence that each different value will clearly result in a different function behavior.
|
|
301
|
-
- List the key attributes in the order of importance (most important first, with importance determined by how much changing the attribute will change the return value of the function).
|
|
302
|
-
- Each attribute should reference exactly the fullPath of a data attribute provided in the "Attributes and Value Types" section.
|
|
303
|
-
|
|
304
|
-
## Example
|
|
305
|
-
|
|
306
|
-
Given the following "Attributes and Value Types":
|
|
307
|
-
\`\`\`
|
|
308
|
-
[
|
|
309
|
-
items[].quantity: { fullPath: 'signature[0][].quantity', type: 'number' },
|
|
310
|
-
items[].price: { fullPath: 'signature[0][].price', type: 'number' },
|
|
311
|
-
discount: { fullPath: 'signature[1]', type: 'number' },
|
|
312
|
-
taxRate: { fullPath: 'signature[2]', type: 'number' },
|
|
313
|
-
]
|
|
314
|
-
\`\`\`
|
|
315
|
-
|
|
316
|
-
and code:
|
|
317
|
-
|
|
318
|
-
\`\`\`typescript
|
|
319
|
-
const calculateTotal = (items, discount, taxRate) => {
|
|
320
|
-
const subtotal = items.reduce((sum, item) => sum + item.quantity * item.price, 0);
|
|
321
|
-
const discountedTotal = subtotal - discount;
|
|
322
|
-
const tax = discountedTotal * taxRate;
|
|
323
|
-
return discountedTotal + tax;
|
|
324
|
-
}
|
|
325
|
-
\`\`\`
|
|
326
|
-
|
|
327
|
-
The response might be:
|
|
238
|
+
List all key attributes in order from most impactful to least impactful using the following format:
|
|
328
239
|
|
|
329
240
|
\`\`\`json
|
|
330
241
|
{
|
|
331
242
|
"keyAttributes": [
|
|
332
243
|
{
|
|
333
|
-
"fullPath": "signature[0]
|
|
334
|
-
"description": "
|
|
335
|
-
"validValueOptions": [
|
|
336
|
-
"0 (no items)",
|
|
337
|
-
"1 (single item)",
|
|
338
|
-
"5 (multiple items)",
|
|
339
|
-
"100 (large quantity)"
|
|
340
|
-
]
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"fullPath": "signature[0][].price",
|
|
344
|
-
"description": "The price of each item affects the subtotal calculation.",
|
|
345
|
-
"validValueOptions": [
|
|
346
|
-
"0.00 (free item)",
|
|
347
|
-
"19.99 (average price)",
|
|
348
|
-
"999.99 (high price)"
|
|
349
|
-
]
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"fullPath": "signature[1]",
|
|
353
|
-
"description": "The discount amount directly reduces the subtotal.",
|
|
354
|
-
"validValueOptions": [
|
|
355
|
-
"0 (no discount)",
|
|
356
|
-
"20.00 (discount)"
|
|
357
|
-
]
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"fullPath": "signature[2]",
|
|
361
|
-
"description": "The tax rate affects the final total calculation.",
|
|
362
|
-
"validValueOptions": [
|
|
363
|
-
"0 (no tax)",
|
|
364
|
-
"0.20 (20% tax)"
|
|
365
|
-
]
|
|
244
|
+
"fullPath": "signature[0].config.enabled",
|
|
245
|
+
"description": "Controls whether the main processing logic runs",
|
|
246
|
+
"validValueOptions": ["true", "false"]
|
|
366
247
|
}
|
|
367
248
|
]
|
|
368
249
|
}
|
|
369
250
|
\`\`\`
|
|
370
|
-
|
|
371
|
-
## Important
|
|
372
|
-
|
|
373
|
-
- A key attribute must be an exact attribute fullPath from the "Attributes and Value Types" provided. Do not return any other attribute fullPaths. The only data we can provide to the function comes from these attributes so any other attribute is useless. For internally computed variables trace them back to one of the higher level variables that we can actually impact. Be sure to match the text from the attribute list exactly including spaces, commas, etc.
|
|
374
251
|
`;
|
|
@@ -280,176 +280,75 @@ export default async function generateEntityScenarioData({
|
|
|
280
280
|
export const generateSystemMessage = (
|
|
281
281
|
scenarioName: string,
|
|
282
282
|
defaultScenario: boolean,
|
|
283
|
-
) =>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
- The data generated will be merged into the Default Scenario Data in order to create the full data for this scenario.
|
|
314
|
-
`
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
## Example Response
|
|
318
|
-
|
|
319
|
-
{
|
|
320
|
-
"scenarioData": {
|
|
321
|
-
"scenarioName": ${scenarioName},
|
|
322
|
-
"data': {
|
|
323
|
-
"mockData": {
|
|
324
|
-
"useUser()": {
|
|
325
|
-
"user": {
|
|
326
|
-
"name": "John Doe",
|
|
327
|
-
"metadata": {
|
|
328
|
-
"hobbies": ["fishing", "hiking", "camping"]
|
|
329
|
-
"favoriteColor": "blue",
|
|
330
|
-
},
|
|
331
|
-
"joinedAt": {
|
|
332
|
-
"~~codeyam-code~~": "new Date(Date.now() - 3 * 24 * 60 * 60 * 1000)"
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
},
|
|
336
|
-
"loadProject()": {
|
|
337
|
-
"project": {
|
|
338
|
-
"name": "New Project",
|
|
339
|
-
"slug": "new-project",
|
|
340
|
-
"files": [
|
|
341
|
-
{
|
|
342
|
-
"name": "File 1",
|
|
343
|
-
"slug": "file-1",
|
|
344
|
-
"content": "This is the content of file 1"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"name": "File 2",
|
|
348
|
-
"slug": "file-2",
|
|
349
|
-
"content": "This is the content of file 2"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"name": "File 3",
|
|
353
|
-
"slug": "file-3",
|
|
354
|
-
"content": "This is the content of file 3"
|
|
355
|
-
}
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
"argumentsData": [
|
|
361
|
-
{
|
|
362
|
-
"open": "true",
|
|
363
|
-
"children: {
|
|
364
|
-
"~~codeyam-jsx~~": "<div>Hi!</div>"
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
## scenarioData
|
|
373
|
-
|
|
374
|
-
You will return a JSON object called scenarioData containing the name and data for this scenario.
|
|
375
|
-
|
|
376
|
-
If you encounter a "date" then you should use "~~codeyam-code~~" along with code in string format. That string will be evaled to create the date or timestamp needed.
|
|
377
|
-
|
|
378
|
-
For example the "timestamp" above should probably not be a hard-coded timestamp but should be a function that returns a timestamp. If you want to return a timestamp that is 24 hours in the future, you would return this object:
|
|
283
|
+
) => {
|
|
284
|
+
const scenarioType = defaultScenario
|
|
285
|
+
? `## Default Scenario
|
|
286
|
+
Generate COMPLETE, robust data for the entire data structure.
|
|
287
|
+
- Fill ALL fields with realistic values (except error attributes)
|
|
288
|
+
- Arrays should have 2-3 items
|
|
289
|
+
- Don't skip nested attributes
|
|
290
|
+
- This provides the baseline data for all other scenarios`
|
|
291
|
+
: `## Non-Default Scenario
|
|
292
|
+
Generate ONLY the differences from the default scenario.
|
|
293
|
+
- Include only fields that need to change
|
|
294
|
+
- Set to \`null\` to remove data
|
|
295
|
+
- Omit unchanged fields—they merge from default`;
|
|
296
|
+
|
|
297
|
+
return `You are a test data generator. Create mock data matching a data structure and scenario requirements.
|
|
298
|
+
|
|
299
|
+
${scenarioType}
|
|
300
|
+
|
|
301
|
+
## CRITICAL: NO ERROR DATA
|
|
302
|
+
NEVER include "error" fields in responses. Skip them entirely.
|
|
303
|
+
- If structure has \`{ data: {...}, error: {...} }\`, only fill \`data\`
|
|
304
|
+
- Leave out any attribute named "error"—do not set to null, omit entirely
|
|
305
|
+
|
|
306
|
+
## Special Markers
|
|
307
|
+
|
|
308
|
+
### Dynamic Dates (\`~~codeyam-code~~\`)
|
|
309
|
+
\`\`\`json
|
|
310
|
+
{ "createdAt": { "~~codeyam-code~~": "new Date(Date.now() - 24*60*60*1000)" } }
|
|
311
|
+
\`\`\`
|
|
312
|
+
Use for relative dates. Code runs in Node (no browser APIs, no external libraries).
|
|
379
313
|
|
|
314
|
+
### JSX Children (\`~~codeyam-jsx~~\`)
|
|
315
|
+
\`\`\`json
|
|
316
|
+
{ "children": { "~~codeyam-jsx~~": "<div>Hello</div>" } }
|
|
380
317
|
\`\`\`
|
|
318
|
+
Use simple elements only (\`<div>\`, \`<span>\`). No custom components.
|
|
319
|
+
|
|
320
|
+
## Function Keys
|
|
321
|
+
Preserve function call syntax exactly as written in the structure:
|
|
322
|
+
\`\`\`json
|
|
381
323
|
{
|
|
382
|
-
"
|
|
383
|
-
"
|
|
384
|
-
"
|
|
385
|
-
"mockData": {
|
|
386
|
-
"dataLoaders": {
|
|
387
|
-
"fetchUser()": {
|
|
388
|
-
"user": {
|
|
389
|
-
"name": "John Doe",
|
|
390
|
-
"metadata": {
|
|
391
|
-
"hobbies": ["fishing", "hiking", "camping"],
|
|
392
|
-
"favoriteColor": "blue"
|
|
393
|
-
},
|
|
394
|
-
"joinedAt": {
|
|
395
|
-
"~~codeyam-code~~": "new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString()"
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
324
|
+
"mockData": {
|
|
325
|
+
"useUser()": { "user": { "name": "John" } },
|
|
326
|
+
"from().select()": [{ "id": "1" }]
|
|
402
327
|
}
|
|
403
328
|
}
|
|
404
329
|
\`\`\`
|
|
405
330
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
All code should be written in JavaScript. It will run in a node environment (not the browser) with no reference to external libraries. It will essentially be run in a sandboxed environment. Do not reference any external libraries in the code.
|
|
409
|
-
|
|
410
|
-
With argumentsData you may also need to return a "children" argument. "children" can either be a string or a jsx element.
|
|
411
|
-
|
|
412
|
-
If you want to return a jsx element you would return something like this:
|
|
413
|
-
|
|
414
|
-
\`\`\`
|
|
331
|
+
## Response Format
|
|
332
|
+
\`\`\`json
|
|
415
333
|
{
|
|
416
334
|
"scenarioData": {
|
|
417
|
-
"scenarioName": ${scenarioName},
|
|
335
|
+
"scenarioName": "${scenarioName}",
|
|
418
336
|
"data": {
|
|
419
|
-
"
|
|
420
|
-
|
|
421
|
-
"children": {
|
|
422
|
-
"~~codeyam-jsx~~": "<div>Click Me!</div>"
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
]
|
|
337
|
+
"mockData": { ... },
|
|
338
|
+
"argumentsData": [ ... ]
|
|
426
339
|
}
|
|
427
340
|
}
|
|
428
341
|
}
|
|
429
342
|
\`\`\`
|
|
430
343
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
If an object inside of mockData or argumentsData is intended to not exist you can set it to null.
|
|
438
|
-
|
|
439
|
-
Never use "~~codeyam-code~~" or "~~codeyam-jsx~~" as a partial key in the response. Even if the key looks like it should have a relative date or code. "~~codeyam-code~~" and "~~codeyam-jsx~~" are only used as independent keys used to mark values that are code.
|
|
440
|
-
|
|
441
|
-
## Common Mistakes
|
|
442
|
-
|
|
443
|
-
- Do not use the term undefined in the response. If something is missing leave it out or use null.
|
|
444
|
-
- Leave out error data (e.g. a data attribute labeled as "error"), especially when it is in a data structure that has success data as well. Only include the success data and simply leave out the error data. Error data is usually labeled as "error" in the structure. Leave it out entirely.
|
|
445
|
-
- Please double check this. Ensure no error data is included in the response unless specifically requested. ${defaultScenario ? `This includes the ${`DEFAULT_SCENARIO_NAME`}.` : ''} Leave out any error attributes from the response completely!
|
|
446
|
-
- Do not reference data in the response (e.g. if there was a "posts" field you can not say "posts[0]" elsewhere in the response - you need to duplicate the data). Unfortunately all data must be written out directly in the response.
|
|
447
|
-
- Ensure each scenario in the response matches the full scenario name, commas and all, in the scenarios provided.
|
|
448
|
-
- Do not throw errors from this data in any manner. Simple leave out any error data.
|
|
449
|
-
- If the data structure contains a type that is a "date" then use ~~codeyam-code~~ to generate a dynamic timestamp or date. Do not hard-code dates unless it needs to be a very specific date. Otherwise it should be a relative, dynamic date.
|
|
450
|
-
- The response must be valid JSON. Do not include raw code in the response.
|
|
451
|
-
${defaultScenario ? `- As the ${DEFAULT_SCENARIO_NAME} be very robust in generating data that reflects common real-world usage. All arrays and attributes, except error attributes, should be filled in with high quality data so that default simulation provides a good default of how the function behaves` : ''}
|
|
344
|
+
## Rules
|
|
345
|
+
- Valid JSON only—no raw code outside markers
|
|
346
|
+
- No \`undefined\`—use \`null\` or omit
|
|
347
|
+
- No data references (can't use \`posts[0]\` elsewhere—duplicate the value)
|
|
348
|
+
- Scenario name must match exactly: "${scenarioName}"
|
|
349
|
+
- Empty mockData: \`{}\`, empty argumentsData: \`[]\`
|
|
452
350
|
`;
|
|
351
|
+
};
|
|
453
352
|
|
|
454
353
|
export const generateIncompleteSystemMessage = (
|
|
455
354
|
scenarioName: string,
|